summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackLivio <jack@livio.io>2020-11-05 08:56:34 -0800
committerGitHub <noreply@github.com>2020-11-05 08:56:34 -0800
commitf270af493ab11d2491da67390f1614ba4e24ea4e (patch)
tree2a939d5f8f58a4ec7928c9314a16c9ddce5e74ca
parent0ce76256232bad18bac986e7e68f35c2ae510a29 (diff)
parent618a5e003c73d2102410af2372608792348d9b69 (diff)
downloadsdl_core-f270af493ab11d2491da67390f1614ba4e24ea4e.tar.gz
Merge pull request #3551 from smartdevicelink/release/7.0.07.0.0
7.0.0 Release
-rw-r--r--README.md8
-rw-r--r--cppcheck.xml0
-rw-r--r--src/3rd_party/CMakeLists.txt3
-rw-r--r--src/appMain/CMakeLists.txt14
-rw-r--r--src/appMain/core.sh8
-rw-r--r--src/appMain/core_external_proprietary.sh9
-rw-r--r--src/appMain/daemon.sh142
-rwxr-xr-xsrc/appMain/hmi_capabilities.json1183
-rw-r--r--src/appMain/life_cycle_impl.cc62
-rw-r--r--src/appMain/low_voltage_signals_handler.cc20
-rw-r--r--src/appMain/main.cc65
-rw-r--r--src/appMain/sdl_preloaded_pt.json275
-rw-r--r--src/appMain/signal_handlers.cc2
-rw-r--r--src/appMain/smartDeviceLink.ini5
-rw-r--r--src/appMain/start.sh18
-rw-r--r--src/appMain/start_external_proprietary.sh23
-rw-r--r--src/components/application_manager/include/application_manager/app_extension.h28
-rw-r--r--src/components/application_manager/include/application_manager/application.h22
-rw-r--r--src/components/application_manager/include/application_manager/application_data_impl.h17
-rw-r--r--src/components/application_manager/include/application_manager/application_impl.h17
-rw-r--r--src/components/application_manager/include/application_manager/application_manager_impl.h147
-rw-r--r--src/components/application_manager/include/application_manager/application_state.h20
-rw-r--r--src/components/application_manager/include/application_manager/commands/command.h12
-rw-r--r--src/components/application_manager/include/application_manager/commands/command_impl.h22
-rw-r--r--src/components/application_manager/include/application_manager/commands/command_notification_impl.h9
-rw-r--r--src/components/application_manager/include/application_manager/commands/command_request_impl.h10
-rw-r--r--src/components/application_manager/include/application_manager/commands/request_to_hmi.h31
-rw-r--r--src/components/application_manager/include/application_manager/display_capabilities_builder.h28
-rw-r--r--src/components/application_manager/include/application_manager/hmi_capabilities_impl.h523
-rw-r--r--src/components/application_manager/include/application_manager/hmi_state.h177
-rw-r--r--src/components/application_manager/include/application_manager/message_helper.h366
-rw-r--r--src/components/application_manager/include/application_manager/policies/policy_handler.h40
-rw-r--r--src/components/application_manager/include/application_manager/postponed_activation_controller.h78
-rw-r--r--src/components/application_manager/include/application_manager/request_info.h5
-rw-r--r--src/components/application_manager/include/application_manager/resumption/pending_resumption_handler.h91
-rw-r--r--src/components/application_manager/include/application_manager/resumption/resume_ctrl.h58
-rw-r--r--src/components/application_manager/include/application_manager/resumption/resume_ctrl_impl.h133
-rw-r--r--src/components/application_manager/include/application_manager/resumption/resumption_data_processor.h112
-rw-r--r--src/components/application_manager/include/application_manager/resumption/resumption_data_processor_impl.h393
-rw-r--r--src/components/application_manager/include/application_manager/rpc_handler_impl.h1
-rw-r--r--src/components/application_manager/include/application_manager/rpc_service_impl.h6
-rw-r--r--src/components/application_manager/include/application_manager/smart_object_keys.h21
-rw-r--r--src/components/application_manager/include/application_manager/state_controller_impl.h24
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/app_service_app_extension.h13
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/app_service_rpc_plugin.h4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_app_extension.cc42
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_command_factory.cc9
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc17
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc11
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_rpc_plugin.cc15
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc17
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_to_hmi.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_from_hmi.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_to_hmi.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_from_hmi.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_to_hmi.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_from_hmi.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_to_hmi.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc15
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification_from_hmi.cc22
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request_to_mobile.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response_from_mobile.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification.cc23
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc28
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request.cc8
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request_to_mobile.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response_from_mobile.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/app_service_plugin/app_service_app_extension_test.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_request.h2
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_manager.h7
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_manager_impl.h2
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_app_extension.h66
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_capabilities_manager.h8
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_helpers.h15
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h11
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_pending_resumption_handler.h165
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_rpc_plugin.h35
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_button_press_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_button_press_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_consent_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_consent_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_request.cc23
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_interior_vehicle_data_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_remote_control_settings_notification.cc32
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_global_properties_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_global_properties_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_interior_vehicle_data_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_interior_vehicle_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_request.cc21
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_consent_request.cc99
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_consent_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc116
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/on_interior_vehicle_data_notification.cc13
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/release_interior_vehicle_data_module_request.cc37
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/release_interior_vehicle_data_module_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc67
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc48
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/interior_data_cache_impl.cc34
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/interior_data_manager_impl.cc49
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc169
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_capabilities_manager_impl.cc282
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_command_factory.cc20
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_consent_manager_impl.cc55
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_helpers.cc88
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_pending_resumption_handler.cc343
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc80
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc163
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/CMakeLists.txt3
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc18
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc154
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_interior_vehicle_data_notification_test.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc17
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/release_interior_vehicle_data_module_request_test.cc49
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc20
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_interior_data_manager.h2
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_rc_helpers.h11
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/mock_rc_helpers.cc15
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/rc_app_extension_test.cc198
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/rc_pending_resumption_handler_test.cc421
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager/CMakeLists.txt1
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager/resource_allocation_manager_impl_test.cc34
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/CMakeLists.txt2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/button_get_capabilities_request.h7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_system_info_request.h7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_system_info_response.h3
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_start_stream_request.h2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_start_stream_request.h2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_request.h2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_subtle_alert_pressed_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_update_file_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_update_sub_menu_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_get_capabilities_request.h7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_is_ready_request.h6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_capabilities_request.h7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_language_request.h7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_supported_languages_request.h7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_is_ready_request.h7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_set_global_properties_request.h2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_command_request.h2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_submenu_request.h2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_create_window_request.h2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_capabilities_request.h7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_language_request.h7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_supported_languages_request.h7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_is_ready_request.h9
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_global_properties_request.h2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_subtle_alert_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_subtle_alert_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_add_command_request.h2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_capabilities_request.h7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_language_request.h7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_supported_languages_request.h7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_is_ready_request.h8
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_request.h3
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_sub_menu_request.h23
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_app_interface_unregistered_notification.h6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_subtle_alert_pressed_notification.h80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_update_file_notification.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_update_sub_menu_notification.h79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_request.h105
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/reset_global_properties_request.h34
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_global_properties_request.h2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subtle_alert_request.h152
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subtle_alert_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/extensions/system_capability_app_extension.h9
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/sdl_rpc_plugin.h33
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/waypoints_app_extension.h69
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/waypoints_pending_resumption_handler.h108
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_request.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_response.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/add_statistics_info_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_response.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_on_awake_sdl.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_request.cc15
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_request.cc9
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_request.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_response.cc23
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_request.cc9
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_response.cc35
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_request.cc101
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_request.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_request.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_request.cc55
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_request.cc103
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_request.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_request.cc13
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_allow_sdl_functionality_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_activated_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_deactivated_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_changed_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_consent_notification.cc8
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_properties_change_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_registered_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_unregistered_notification.cc8
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_audio_data_streaming_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc17
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification_from_hmi.cc30
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_event_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_press_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_subscription_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_chosen_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_state_changed_notification.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_driver_distraction_notification.cc9
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_event_changed_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_all_applications_notification.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_application_notification.cc15
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_file_removed_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_find_applications.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ignition_cycle_over_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_tbt_client_state_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_way_point_change_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_policy_update.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_put_file_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ready_notification.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_received_policy_update.cc12
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_record_start_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_resume_audio_source_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_close_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_consent_needed_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_persistence_complete_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_service_update_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_start_device_discovery.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_status_update_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_context_notification.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_error_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_info_changed_notification.cc9
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_request_notification.cc43
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_time_ready_notification.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc23
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_reset_timeout_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_started_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_stopped_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_command_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_keyboard_input_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc16
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_reset_timeout_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_subtle_alert_pressed_notification.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_touch_event_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_update_file_notification.cc90
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_update_sub_menu_notification.cc82
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_update_device_list.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_acc_pedal_position_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_belt_status_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_body_information_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_device_status_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_driver_braking_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_engine_torque_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_external_temperature_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_state_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_gps_data_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_head_lamp_status_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_my_key_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_odometer_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_prndl_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_rpm_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_speed_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_tire_pressure_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_vin_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_wiper_status_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_video_data_streaming_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_command_notification.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc23
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_started_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_stopped_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_request.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_response.cc30
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_request.cc29
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_request.cc118
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_request.cc20
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_request.cc26
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update_response.cc7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_request.cc9
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_response.cc27
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_request.cc9
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_response.cc27
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_request.cc9
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_response.cc22
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_request.cc38
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_request.cc12
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_request.cc13
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_request.cc12
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_request.cc13
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_request.cc9
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_response.cc99
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_request.cc9
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_response.cc26
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_request.cc9
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_response.cc22
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc38
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_request.cc12
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_response.cc5
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_subtle_alert_request.cc71
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_subtle_alert_response.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_request.cc14
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_request.cc13
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_request.cc9
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_response.cc29
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_request.cc9
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_response.cc26
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_request.cc9
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc14
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_request.cc37
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc86
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc56
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_request.cc47
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc79
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_request.cc11
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_response.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_request.cc105
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_request.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc106
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_response.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_request.cc54
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_request.cc56
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_request.cc11
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_response.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_request.cc40
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_response.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_request.cc80
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_request.cc21
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_request.cc21
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_request.cc8
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_request.cc8
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_request.cc56
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_response.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc28
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_request.cc21
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_request.cc14
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc14
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_audio_pass_thru_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc37
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc44
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_command_notification.cc11
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_driver_distraction_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hash_change_notification.cc7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc11
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification_from_mobile.cc21
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_keyboard_input_notification.cc9
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_language_change_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_permissions_change_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_subtle_alert_pressed_notification.cc76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc89
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc33
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_tbt_client_state_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_touch_event_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_update_file_notification.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_update_sub_menu_notification.cc64
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_way_point_change_notification.cc5
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc315
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc51
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_response.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc1059
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_response.cc20
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_request.cc192
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_request.cc16
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_request.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_request.cc43
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_request.cc8
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_request.cc27
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_request.cc150
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_request.cc22
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc27
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_request.cc48
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc87
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_request.cc37
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_request.cc33
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc24
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_response.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_request.cc17
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_request.cc459
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_response.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_request.cc388
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_request.cc11
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_request.cc15
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_response.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_request.cc17
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_request.cc37
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/extensions/system_capability_app_extension.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc31
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/mobile_command_factory.cc25
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_rpc_plugin.cc53
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/waypoints_app_extension.cc76
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/waypoints_pending_resumption_handler.cc203
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/button_get_capabilities_request_test.cc116
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/button_get_capabilities_response_test.cc18
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc23
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_system_info_response_test.cc33
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc94
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_audio_start_stream_request_test.cc56
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_set_video_config_request_test.cc27
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_start_stream_request_test.cc56
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/on_bc_system_capability_updated_notification_from_hmi_test.cc3
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/on_driver_distraction_notification_test.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_request_test.cc106
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_response_test.cc18
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_is_ready_request_test.cc85
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_activate_app_request_test.cc30
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_get_user_friendly_message_request_test.cc43
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_requests_to_hmi_test.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_response_from_hmi_test.cc3
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_capabilities_request_test.cc117
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_capabilities_response_test.cc40
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_language_request_test.cc115
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_language_response_test.cc30
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_supported_languages_request_test.cc118
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_supported_languages_response_test.cc22
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_is_ready_request_test.cc252
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_request_test.cc115
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_response_test.cc45
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_language_request_test.cc115
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_language_response_test.cc28
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_supported_languages_request_test.cc118
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_supported_languages_response_test.cc22
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_is_ready_request_test.cc27
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_sdl_request_test.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_sdl_response_test.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_capabilities_request_test.cc115
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_capabilities_response_test.cc21
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_language_request_test.cc115
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_language_response_test.cc30
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_request_test.cc118
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_response_test.cc22
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_is_ready_request_test.cc38
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_sub_menu_request_test.cc25
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/change_registration_test.cc18
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/create_interaction_choice_set_test.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_command_request_test.cc19
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_interaction_choice_set_test.cc21
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_sub_menu_test.cc24
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_app_interface_unregistered_notification_test.cc140
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_button_notification_commands_test.cc1
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_command_notification_test.cc8
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_capability_updated_notification_test.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_request_notification_test.cc65
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_way_point_change_notification_test.cc66
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/register_app_interface_request_test.cc419
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/reset_global_properties_test.cc241
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_notification_commands_test.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/subscribe_way_points_request_test.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unregister_app_interface_request_test.cc11
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unsubscribe_way_points_request_test.cc8
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_type_request.h7
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_is_ready_request.h5
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_subscribe_vehicle_data_request.h2
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_app_extension.h60
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_pending_resumption_handler.h150
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_plugin.h27
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/on_vi_vehicle_data_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_request.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_response.cc26
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_request.cc31
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_request.cc19
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_request.cc13
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_request.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc12
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc18
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_request.cc19
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc78
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc46
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/custom_vehicle_data_manager_impl.cc36
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_data_item_schema.cc36
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc129
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc21
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc18
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_pending_resumption_handler.cc424
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_plugin.cc127
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/CMakeLists.txt2
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_get_vehicle_data_response_test.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_get_vehicle_type_request_test.cc109
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_get_vehicle_type_response_test.cc142
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_is_ready_request_test.cc105
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/subscribe_vehicle_request_test.cc346
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/unsubscribe_vehicle_request_test.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/vehicle_data_item_schema_test.cc1
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/vehicle_info_pending_resumption_test.cc696
-rw-r--r--src/components/application_manager/src/app_launch/app_launch_ctrl_impl.cc10
-rw-r--r--src/components/application_manager/src/app_launch/app_launch_data_db.cc177
-rw-r--r--src/components/application_manager/src/app_launch/app_launch_data_impl.cc18
-rw-r--r--src/components/application_manager/src/app_launch/app_launch_data_json.cc51
-rw-r--r--src/components/application_manager/src/app_launch/apps_launcher.cc20
-rw-r--r--src/components/application_manager/src/app_launch/device_apps_launcher.cc23
-rw-r--r--src/components/application_manager/src/app_service_manager.cc98
-rw-r--r--src/components/application_manager/src/application_data_impl.cc155
-rw-r--r--src/components/application_manager/src/application_impl.cc274
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc1416
-rw-r--r--src/components/application_manager/src/application_state.cc178
-rw-r--r--src/components/application_manager/src/command_holder_impl.cc37
-rw-r--r--src/components/application_manager/src/commands/command_impl.cc76
-rw-r--r--src/components/application_manager/src/commands/command_notification_from_mobile_impl.cc4
-rw-r--r--src/components/application_manager/src/commands/command_notification_impl.cc9
-rw-r--r--src/components/application_manager/src/commands/command_request_impl.cc175
-rw-r--r--src/components/application_manager/src/commands/command_response_impl.cc4
-rw-r--r--src/components/application_manager/src/commands/notification_from_hmi.cc6
-rw-r--r--src/components/application_manager/src/commands/request_from_hmi.cc44
-rw-r--r--src/components/application_manager/src/commands/request_to_hmi.cc136
-rw-r--r--src/components/application_manager/src/commands/response_from_hmi.cc6
-rw-r--r--src/components/application_manager/src/display_capabilities_builder.cc121
-rw-r--r--src/components/application_manager/src/event_engine/event_dispatcher_impl.cc14
-rw-r--r--src/components/application_manager/src/help_prompt_manager_impl.cc87
-rw-r--r--src/components/application_manager/src/helpers/application_helper.cc32
-rw-r--r--src/components/application_manager/src/hmi_capabilities_impl.cc1836
-rw-r--r--src/components/application_manager/src/hmi_interfaces_impl.cc1
-rw-r--r--src/components/application_manager/src/hmi_language_handler.cc106
-rw-r--r--src/components/application_manager/src/hmi_state.cc267
-rw-r--r--src/components/application_manager/src/message_helper/message_helper.cc788
-rw-r--r--src/components/application_manager/src/mobile_message_handler.cc37
-rw-r--r--src/components/application_manager/src/plugin_manager/rpc_plugin_manager_impl.cc32
-rw-r--r--src/components/application_manager/src/policies/delegates/app_permission_delegate.cc4
-rw-r--r--src/components/application_manager/src/policies/delegates/statistics_delegate.cc6
-rw-r--r--src/components/application_manager/src/policies/policy_event_observer.cc6
-rw-r--r--src/components/application_manager/src/policies/policy_handler.cc1378
-rw-r--r--src/components/application_manager/src/policies/policy_retry_sequence.cc9
-rw-r--r--src/components/application_manager/src/postponed_activation_controller.cc (renamed from src/components/utils/src/logger.cc)54
-rw-r--r--src/components/application_manager/src/request_controller.cc246
-rw-r--r--src/components/application_manager/src/request_info.cc39
-rw-r--r--src/components/application_manager/src/request_tracker.cc37
-rw-r--r--src/components/application_manager/src/resumption/pending_resumption_handler.cc66
-rw-r--r--src/components/application_manager/src/resumption/resume_ctrl_impl.cc698
-rw-r--r--src/components/application_manager/src/resumption/resumption_data.cc57
-rw-r--r--src/components/application_manager/src/resumption/resumption_data_db.cc732
-rw-r--r--src/components/application_manager/src/resumption/resumption_data_json.cc125
-rw-r--r--src/components/application_manager/src/resumption/resumption_data_processor_impl.cc1136
-rw-r--r--src/components/application_manager/src/rpc_handler_impl.cc183
-rw-r--r--src/components/application_manager/src/rpc_passing_handler.cc61
-rw-r--r--src/components/application_manager/src/rpc_protection_manager_impl.cc70
-rw-r--r--src/components/application_manager/src/rpc_service_impl.cc157
-rw-r--r--src/components/application_manager/src/smart_object_keys.cc21
-rw-r--r--src/components/application_manager/src/state_controller_impl.cc463
-rw-r--r--src/components/application_manager/src/system_time/system_time_handler_impl.cc35
-rwxr-xr-xsrc/components/application_manager/test/CMakeLists.txt4
-rw-r--r--src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc3
-rw-r--r--src/components/application_manager/test/application_helper_test.cc41
-rw-r--r--src/components/application_manager/test/application_impl_test.cc126
-rw-r--r--src/components/application_manager/test/application_manager_impl_test.cc404
-rw-r--r--src/components/application_manager/test/application_state_test.cc122
-rw-r--r--src/components/application_manager/test/commands/command_request_impl_test.cc16
-rw-r--r--src/components/application_manager/test/hmi_capabilities.json731
-rw-r--r--src/components/application_manager/test/hmi_capabilities_old_apt.json2
-rw-r--r--src/components/application_manager/test/hmi_capabilities_sc2.json6
-rw-r--r--src/components/application_manager/test/hmi_capabilities_test.cc1538
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_app_service_manager.h2
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_application.h19
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_command_holder.h (renamed from src/components/application_manager/test/include/application_manager/hmi_capabilities_for_testing.h)32
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_hmi_capabilities.h49
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_message_helper.h98
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_request.h2
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_resume_ctrl.h30
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_resumption_data_processor.h (renamed from src/components/utils/test/log_message_loop_thread_test.cc)60
-rw-r--r--src/components/application_manager/test/include/application_manager/resumption_data_test.h14
-rw-r--r--src/components/application_manager/test/include/application_manager/test_resumption_data_db.h5
-rw-r--r--src/components/application_manager/test/message_helper/message_helper_test.cc314
-rw-r--r--src/components/application_manager/test/mock_message_helper.cc186
-rw-r--r--src/components/application_manager/test/policy_handler_test.cc84
-rw-r--r--src/components/application_manager/test/rc_policy_handler_test.cc6
-rw-r--r--src/components/application_manager/test/request_info_test.cc1
-rw-r--r--src/components/application_manager/test/resumption/resume_ctrl_test.cc403
-rw-r--r--src/components/application_manager/test/resumption/resumption_data_db_test.cc12
-rw-r--r--src/components/application_manager/test/resumption/resumption_data_test.cc43
-rw-r--r--src/components/application_manager/test/rpc_service_impl_test.cc837
-rw-r--r--src/components/application_manager/test/sdl_preloaded_pt.json22
-rw-r--r--src/components/application_manager/test/sdl_pt_update.json21
-rw-r--r--src/components/application_manager/test/state_controller/state_controller_test.cc488
-rw-r--r--src/components/config_profile/include/config_profile/ini_file.h2
-rw-r--r--src/components/config_profile/include/config_profile/profile.h7
-rw-r--r--src/components/config_profile/src/ini_file.cc20
-rw-r--r--src/components/config_profile/src/profile.cc58
-rw-r--r--src/components/config_profile/test/profile_test.cc58
-rw-r--r--src/components/config_profile/test/smartDeviceLink_invalid_string.ini4
-rw-r--r--src/components/connection_handler/include/connection_handler/connection.h39
-rw-r--r--src/components/connection_handler/include/connection_handler/connection_handler_impl.h46
-rw-r--r--src/components/connection_handler/src/connection.cc183
-rw-r--r--src/components/connection_handler/src/connection_handler_impl.cc595
-rw-r--r--src/components/connection_handler/src/device.cc7
-rw-r--r--src/components/connection_handler/src/heartbeat_monitor.cc55
-rw-r--r--src/components/connection_handler/test/connection_handler_impl_test.cc115
-rw-r--r--src/components/formatters/include/formatters/CSmartFactory.h11
-rw-r--r--src/components/formatters/src/CFormatterJsonBase.cc2
-rw-r--r--src/components/formatters/test/include/formatters/SmartFactoryTestHelper.h4
-rw-r--r--src/components/formatters/test/src/SmartFactoryTestHelper.cc27
-rw-r--r--src/components/formatters/test/src/create_smartSchema.cc13
-rw-r--r--src/components/formatters/test/src/meta_formatter_test_helper.cc2
-rw-r--r--src/components/hmi_message_handler/include/hmi_message_handler/mb_controller.h39
-rw-r--r--src/components/hmi_message_handler/include/hmi_message_handler/websocket_session.h4
-rw-r--r--src/components/hmi_message_handler/src/hmi_message_handler_impl.cc30
-rw-r--r--src/components/hmi_message_handler/src/mb_controller.cc319
-rw-r--r--src/components/hmi_message_handler/src/messagebroker_adapter.cc34
-rw-r--r--src/components/hmi_message_handler/src/websocket_session.cc31
-rw-r--r--src/components/hmi_message_handler/test/hmi_message_handler_impl_test.cc9
-rw-r--r--src/components/include/application_manager/application_manager.h108
-rw-r--r--src/components/include/application_manager/application_manager_settings.h3
-rw-r--r--src/components/include/application_manager/hmi_capabilities.h286
-rw-r--r--src/components/include/application_manager/policies/policy_handler_interface.h32
-rw-r--r--src/components/include/application_manager/rpc_service.h14
-rw-r--r--src/components/include/application_manager/state_controller.h28
-rw-r--r--src/components/include/connection_handler/connection_handler.h20
-rw-r--r--src/components/include/media_manager/media_manager.h24
-rw-r--r--src/components/include/policy/policy_external/policy/policy_manager.h20
-rw-r--r--src/components/include/policy/policy_regular/policy/policy_manager.h25
-rw-r--r--src/components/include/protocol/rpc_type.h1
-rw-r--r--src/components/include/protocol/service_type.h1
-rw-r--r--src/components/include/protocol_handler/protocol_handler.h5
-rw-r--r--src/components/include/protocol_handler/session_observer.h29
-rw-r--r--src/components/include/security_manager/security_manager_listener.h1
-rw-r--r--src/components/include/test/application_manager/mock_app_extension.h3
-rw-r--r--src/components/include/test/application_manager/mock_application_manager.h43
-rw-r--r--src/components/include/test/application_manager/mock_application_manager_settings.h3
-rw-r--r--src/components/include/test/application_manager/mock_rpc_service.h10
-rw-r--r--src/components/include/test/application_manager/mock_state_controller.h7
-rw-r--r--src/components/include/test/application_manager/policies/mock_policy_handler_interface.h14
-rw-r--r--src/components/include/test/connection_handler/mock_connection_handler.h8
-rw-r--r--src/components/include/test/media_manager/mock_media_manager.h8
-rw-r--r--src/components/include/test/policy/policy_external/policy/mock_cache_manager.h8
-rw-r--r--src/components/include/test/policy/policy_external/policy/mock_policy_manager.h7
-rw-r--r--src/components/include/test/policy/policy_regular/policy/mock_cache_manager.h8
-rw-r--r--src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h8
-rw-r--r--src/components/include/test/protocol_handler/mock_protocol_handler.h5
-rw-r--r--src/components/include/test/protocol_handler/mock_session_observer.h19
-rw-r--r--src/components/include/utils/auto_trace.h9
-rw-r--r--src/components/include/utils/ilogger.h (renamed from src/components/include/utils/push_log.h)68
-rw-r--r--src/components/include/utils/logger.h174
-rw-r--r--src/components/include/utils/logger_status.h52
-rw-r--r--src/components/include/utils/macro.h19
-rw-r--r--src/components/include/utils/message_queue.h10
-rw-r--r--src/components/include/utils/messagemeter.h25
-rw-r--r--src/components/include/utils/rwlock.h34
-rw-r--r--src/components/include/utils/threads/message_loop_thread.h12
-rw-r--r--src/components/include/utils/threads/thread.h230
-rw-r--r--src/components/interfaces/HMI_API.xml445
-rw-r--r--src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h16
-rw-r--r--src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h10
-rw-r--r--src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h17
-rw-r--r--src/components/media_manager/include/media_manager/media_manager_impl.h25
-rw-r--r--src/components/media_manager/include/media_manager/streamer_adapter.h2
-rw-r--r--src/components/media_manager/src/audio/a2dp_source_player_adapter.cc49
-rw-r--r--src/components/media_manager/src/audio/audio_stream_sender_thread.cc36
-rw-r--r--src/components/media_manager/src/audio/from_mic_recorder_adapter.cc46
-rw-r--r--src/components/media_manager/src/audio/from_mic_recorder_listener.cc25
-rw-r--r--src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc107
-rw-r--r--src/components/media_manager/src/file_streamer_adapter.cc20
-rw-r--r--src/components/media_manager/src/media_adapter_impl.cc6
-rw-r--r--src/components/media_manager/src/media_manager_impl.cc124
-rw-r--r--src/components/media_manager/src/pipe_streamer_adapter.cc54
-rw-r--r--src/components/media_manager/src/socket_streamer_adapter.cc29
-rw-r--r--src/components/media_manager/src/streamer_adapter.cc48
-rw-r--r--src/components/media_manager/src/streamer_listener.cc14
-rw-r--r--src/components/media_manager/src/video/video_stream_to_file_adapter.cc49
-rw-r--r--src/components/media_manager/test/media_manager_impl_test.cc29
-rw-r--r--src/components/policy/policy_external/include/policy/cache_manager.h19
-rw-r--r--src/components/policy/policy_external/include/policy/cache_manager_interface.h15
-rw-r--r--src/components/policy/policy_external/include/policy/policy_helper.h16
-rw-r--r--src/components/policy/policy_external/include/policy/policy_manager_impl.h8
-rw-r--r--src/components/policy/policy_external/include/policy/policy_table/types.h11
-rw-r--r--src/components/policy/policy_external/include/policy/policy_table_interface_ext.xml5
-rw-r--r--src/components/policy/policy_external/include/policy/sql_pt_queries.h2
-rw-r--r--src/components/policy/policy_external/include/policy/sql_pt_representation.h2
-rw-r--r--src/components/policy/policy_external/src/access_remote_impl.cc31
-rw-r--r--src/components/policy/policy_external/src/cache_manager.cc473
-rw-r--r--src/components/policy/policy_external/src/policy_helper.cc108
-rw-r--r--src/components/policy/policy_external/src/policy_manager_impl.cc465
-rw-r--r--src/components/policy/policy_external/src/policy_table.cc4
-rw-r--r--src/components/policy/policy_external/src/policy_table/types.cc93
-rw-r--r--src/components/policy/policy_external/src/policy_table/validation.cc58
-rw-r--r--src/components/policy/policy_external/src/sql_pt_ext_representation.cc381
-rw-r--r--src/components/policy/policy_external/src/sql_pt_queries.cc28
-rw-r--r--src/components/policy/policy_external/src/sql_pt_representation.cc633
-rw-r--r--src/components/policy/policy_external/src/update_status_manager.cc66
-rw-r--r--src/components/policy/policy_external/test/CMakeLists.txt20
-rw-r--r--src/components/policy/policy_external/test/cache_manager_test.cc2174
-rw-r--r--src/components/policy/policy_external/test/counter_test.cc184
-rw-r--r--src/components/policy/policy_external/test/generated_code_test.cc230
-rw-r--r--src/components/policy/policy_external/test/include/policy/policy_manager_impl_test_base.h310
-rw-r--r--src/components/policy/policy_external/test/json/PTU.json2173
-rw-r--r--src/components/policy/policy_external/test/json/PTU2.json2172
-rw-r--r--src/components/policy/policy_external/test/json/PTU3.json2174
-rw-r--r--src/components/policy/policy_external/test/json/PTU_default_app.json319
-rw-r--r--src/components/policy/policy_external/test/json/PTU_default_app_app_invalid_values_RequestType_array.json317
-rw-r--r--src/components/policy/policy_external/test/json/PTU_default_app_empty_RequestType_array.json314
-rw-r--r--src/components/policy/policy_external/test/json/PTU_default_app_omitted_RequestType_array.json313
-rw-r--r--src/components/policy/policy_external/test/json/PTU_default_app_one_invalid_value_RequestType_array.json320
-rw-r--r--src/components/policy/policy_external/test/json/PTU_functional_grouping.json11
-rw-r--r--src/components/policy/policy_external/test/json/PTU_pre_data_consent_app.json319
-rw-r--r--src/components/policy/policy_external/test/json/PTU_pre_data_consent_app_empty_RequestType_array.json314
-rw-r--r--src/components/policy/policy_external/test/json/PTU_pre_data_consent_app_invalid_values_RequestType_array.json315
-rw-r--r--src/components/policy/policy_external/test/json/PTU_pre_data_consent_app_omitted_RequestType_array.json307
-rw-r--r--src/components/policy/policy_external/test/json/PTU_pre_data_consent_app_one_invalid_value_RequestType_array.json320
-rw-r--r--src/components/policy/policy_external/test/json/PTU_with_empty_requestType_array.json1747
-rw-r--r--src/components/policy/policy_external/test/json/PTU_with_invalid_requestType_between_correct.json1750
-rw-r--r--src/components/policy/policy_external/test/json/PTU_with_one_invalid_requestType.json1747
-rw-r--r--src/components/policy/policy_external/test/json/PTU_without_requestType_field.json1746
-rw-r--r--src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_reqestType_between_valid.json1964
-rw-r--r--src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_requestType.json1962
-rw-r--r--src/components/policy/policy_external/test/json/preloadedPT_with_several_invalid_default_requestTypes.json1963
-rw-r--r--src/components/policy/policy_external/test/json/ptu2_requestType.json2635
-rw-r--r--src/components/policy/policy_external/test/json/ptu_requestType.json2625
-rw-r--r--src/components/policy/policy_external/test/json/sdl_preloaded_pt.json1965
-rw-r--r--src/components/policy/policy_external/test/json/sdl_preloaded_pt_for_merge_initial.json2452
-rw-r--r--src/components/policy/policy_external/test/json/sdl_preloaded_pt_for_merge_latest.json2448
-rw-r--r--src/components/policy/policy_external/test/json/sdl_preloaded_pt_send_location.json2341
-rw-r--r--src/components/policy/policy_external/test/json/sdl_pt_first_update.json1764
-rw-r--r--src/components/policy/policy_external/test/json/sdl_pt_second_update.json1764
-rw-r--r--src/components/policy/policy_external/test/json/sdl_pt_update.json1748
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_have_params.json2360
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1.json2362
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1_omitted_in2.json2350
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_send_location.json2349
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_send_location_all_params.json2361
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_send_location_no_params.json2350
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_send_location_some_params.json2355
-rw-r--r--src/components/policy/policy_external/test/json/valid_sdl_pt_update.json1746
-rw-r--r--src/components/policy/policy_external/test/policy_manager_impl_ptu_test.cc1825
-rw-r--r--src/components/policy/policy_external/test/policy_manager_impl_snapshot_test.cc342
-rw-r--r--src/components/policy/policy_external/test/policy_manager_impl_stress_test.cc293
-rw-r--r--src/components/policy/policy_external/test/policy_manager_impl_test.cc1646
-rw-r--r--src/components/policy/policy_external/test/policy_manager_impl_test_base.cc970
-rw-r--r--src/components/policy/policy_external/test/policy_manager_impl_user_consent_test.cc691
-rw-r--r--src/components/policy/policy_external/test/sql_pt_ext_representation_storage_test.cc126
-rw-r--r--src/components/policy/policy_external/test/sql_pt_ext_representation_test.cc33
-rw-r--r--src/components/policy/policy_external/test/sql_pt_representation_storage_test.cc129
-rw-r--r--src/components/policy/policy_external/test/sql_pt_representation_test.cc95
-rw-r--r--src/components/policy/policy_regular/include/policy/cache_manager.h19
-rw-r--r--src/components/policy/policy_regular/include/policy/cache_manager_interface.h15
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_helper.h16
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_manager_impl.h15
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_table/types.h10
-rw-r--r--src/components/policy/policy_regular/include/policy/pt_representation.h6
-rw-r--r--src/components/policy/policy_regular/include/policy/sql_pt_queries.h3
-rw-r--r--src/components/policy/policy_regular/include/policy/sql_pt_representation.h5
-rw-r--r--src/components/policy/policy_regular/src/access_remote_impl.cc31
-rw-r--r--src/components/policy/policy_regular/src/cache_manager.cc374
-rw-r--r--src/components/policy/policy_regular/src/policy_helper.cc108
-rw-r--r--src/components/policy/policy_regular/src/policy_manager_impl.cc345
-rw-r--r--src/components/policy/policy_regular/src/policy_table.cc4
-rw-r--r--src/components/policy/policy_regular/src/policy_table/types.cc104
-rw-r--r--src/components/policy/policy_regular/src/policy_table/validation.cc55
-rw-r--r--src/components/policy/policy_regular/src/sql_pt_queries.cc38
-rw-r--r--src/components/policy/policy_regular/src/sql_pt_representation.cc692
-rw-r--r--src/components/policy/policy_regular/src/update_status_manager.cc30
-rw-r--r--src/components/policy/policy_regular/test/CMakeLists.txt31
-rw-r--r--src/components/policy/policy_regular/test/PTU.json1968
-rw-r--r--src/components/policy/policy_regular/test/PTU2.json1973
-rw-r--r--src/components/policy/policy_regular/test/PTU3.json1970
-rw-r--r--src/components/policy/policy_regular/test/PTU4.json1974
-rw-r--r--src/components/policy/policy_regular/test/cache_manager_test.cc1240
-rw-r--r--src/components/policy/policy_regular/test/counter_test.cc194
-rw-r--r--src/components/policy/policy_regular/test/generated_code_test.cc74
-rw-r--r--src/components/policy/policy_regular/test/include/policy/mock_pt_representation.h3
-rw-r--r--src/components/policy/policy_regular/test/json/sdl_preloaded_pt_for_merge_initial.json (renamed from src/components/policy/policy_external/test/json/sdl_preloaded_pt1.json)23
-rw-r--r--src/components/policy/policy_regular/test/json/sdl_preloaded_pt_for_merge_latest.json2448
-rw-r--r--src/components/policy/policy_regular/test/policy_manager_impl_test.cc2210
-rw-r--r--src/components/policy/policy_regular/test/ptu2_requestType.json2635
-rw-r--r--src/components/policy/policy_regular/test/ptu_requestType.json2630
-rw-r--r--src/components/policy/policy_regular/test/sdl_preloaded_pt.json1965
-rw-r--r--src/components/policy/policy_regular/test/sdl_pt_first_update.json1764
-rw-r--r--src/components/policy/policy_regular/test/sdl_pt_second_update.json1764
-rw-r--r--src/components/policy/policy_regular/test/sdl_pt_update.json1742
-rw-r--r--src/components/policy/policy_regular/test/shared_library_test.cc2
-rw-r--r--src/components/policy/policy_regular/test/smartDeviceLink.ini3
-rw-r--r--src/components/policy/policy_regular/test/smartDeviceLink2.ini12
-rw-r--r--src/components/policy/policy_regular/test/smartDeviceLink3.ini12
-rw-r--r--src/components/policy/policy_regular/test/sql_pt_representation_storage_test.cc133
-rw-r--r--src/components/policy/policy_regular/test/sql_pt_representation_test.cc566
-rw-r--r--src/components/policy/policy_regular/test/valid_sdl_pt_update.json1746
-rw-r--r--src/components/policy/policy_regular/test/vehicle_data_item_type_test.cc15
-rw-r--r--src/components/protocol/src/rpc_type.cc9
-rw-r--r--src/components/protocol/src/service_type.cc9
-rw-r--r--src/components/protocol_handler/include/protocol_handler/handshake_handler.h5
-rw-r--r--src/components/protocol_handler/include/protocol_handler/incoming_data_handler.h2
-rw-r--r--src/components/protocol_handler/include/protocol_handler/multiframe_builder.h2
-rw-r--r--src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h19
-rw-r--r--src/components/protocol_handler/include/protocol_handler/protocol_packet.h4
-rw-r--r--src/components/protocol_handler/src/handshake_handler.cc93
-rw-r--r--src/components/protocol_handler/src/incoming_data_handler.cc83
-rw-r--r--src/components/protocol_handler/src/multiframe_builder.cc125
-rw-r--r--src/components/protocol_handler/src/protocol_handler_impl.cc824
-rw-r--r--src/components/protocol_handler/src/protocol_packet.cc116
-rw-r--r--src/components/protocol_handler/src/protocol_payload.cc3
-rw-r--r--src/components/protocol_handler/src/service_status_update_handler.cc9
-rw-r--r--src/components/protocol_handler/test/incoming_data_handler_test.cc32
-rw-r--r--src/components/protocol_handler/test/protocol_handler_tm_test.cc472
-rw-r--r--src/components/protocol_handler/test/protocol_payload_test.cc5
-rw-r--r--src/components/resumption/src/last_state_impl.cc29
-rw-r--r--src/components/resumption/src/last_state_wrapper_impl.cc4
-rw-r--r--src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h2
-rw-r--r--src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h7
-rw-r--r--src/components/security_manager/include/security_manager/security_manager_impl.h4
-rw-r--r--src/components/security_manager/src/crypto_manager_impl.cc179
-rw-r--r--src/components/security_manager/src/security_manager_impl.cc170
-rw-r--r--src/components/security_manager/src/ssl_context_impl.cc101
-rw-r--r--src/components/security_manager/test/security_manager_test.cc38
-rw-r--r--src/components/security_manager/test/security_query_matcher.cc14
-rw-r--r--src/components/smart_objects/include/smart_objects/always_false_schema_item.h4
-rw-r--r--src/components/smart_objects/include/smart_objects/always_true_schema_item.h4
-rw-r--r--src/components/smart_objects/include/smart_objects/array_schema_item.h15
-rw-r--r--src/components/smart_objects/include/smart_objects/bool_schema_item.h2
-rw-r--r--src/components/smart_objects/include/smart_objects/default_shema_item.h8
-rw-r--r--src/components/smart_objects/include/smart_objects/enum_schema_item.h82
-rw-r--r--src/components/smart_objects/include/smart_objects/number_schema_item.h19
-rw-r--r--src/components/smart_objects/include/smart_objects/object_schema_item.h32
-rw-r--r--src/components/smart_objects/include/smart_objects/schema_item.h39
-rw-r--r--src/components/smart_objects/include/smart_objects/smart_object.h4
-rw-r--r--src/components/smart_objects/include/smart_objects/smart_schema.h15
-rw-r--r--src/components/smart_objects/include/smart_objects/string_schema_item.h6
-rw-r--r--src/components/smart_objects/src/always_false_schema_item.cc4
-rw-r--r--src/components/smart_objects/src/always_true_schema_item.cc2
-rw-r--r--src/components/smart_objects/src/array_schema_item.cc56
-rw-r--r--src/components/smart_objects/src/bool_schema_item.cc4
-rw-r--r--src/components/smart_objects/src/object_schema_item.cc68
-rw-r--r--src/components/smart_objects/src/schema_item.cc13
-rw-r--r--src/components/smart_objects/src/smart_object.cc5
-rw-r--r--src/components/smart_objects/src/smart_schema.cc14
-rw-r--r--src/components/smart_objects/src/string_schema_item.cc12
-rw-r--r--src/components/smart_objects/test/ArraySchemaItem_test.cc195
-rw-r--r--src/components/smart_objects/test/CObjectSchemaItem_test.cc150
-rw-r--r--src/components/smart_objects/test/SmartObjectConvertionTime_test.cc590
-rw-r--r--src/components/smart_objects/test/SmartObjectUnit_test.cc4
-rw-r--r--src/components/telemetry_monitor/src/protocol_handler_observer.cc7
-rw-r--r--src/components/telemetry_monitor/src/telemetry_monitor.cc75
-rw-r--r--src/components/test_main.cc21
-rw-r--r--src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_transport_adapter.h5
-rw-r--r--src/components/transport_manager/include/transport_manager/tcp/platform_specific/linux/platform_specific_network_interface_listener_impl.h42
-rw-r--r--src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h6
-rw-r--r--src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h10
-rw-r--r--src/components/transport_manager/include/transport_manager/usb/libusb/usb_connection.h2
-rw-r--r--src/components/transport_manager/include/transport_manager/usb/libusb/usb_handler.h8
-rw-r--r--src/components/transport_manager/include/transport_manager/websocket_server/websocket_connection.h14
-rw-r--r--src/components/transport_manager/include/transport_manager/websocket_server/websocket_secure_session.h6
-rw-r--r--src/components/transport_manager/include/transport_manager/websocket_server/websocket_session.h22
-rw-r--r--src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc7
-rw-r--r--src/components/transport_manager/src/bluetooth/bluetooth_device.cc26
-rw-r--r--src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc113
-rw-r--r--src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc37
-rw-r--r--src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc14
-rw-r--r--src/components/transport_manager/src/cloud/cloud_device.cc4
-rw-r--r--src/components/transport_manager/src/cloud/cloud_websocket_connection_factory.cc7
-rw-r--r--src/components/transport_manager/src/cloud/cloud_websocket_transport_adapter.cc17
-rw-r--r--src/components/transport_manager/src/cloud/websocket_client_connection.cc69
-rw-r--r--src/components/transport_manager/src/iap2_emulation/iap2_transport_adapter.cc56
-rw-r--r--src/components/transport_manager/src/tcp/network_interface_listener_impl.cc14
-rw-r--r--src/components/transport_manager/src/tcp/platform_specific/linux/platform_specific_network_interface_listener.cc259
-rw-r--r--src/components/transport_manager/src/tcp/platform_specific/qnx/platform_specific_network_interface_listener.cc12
-rw-r--r--src/components/transport_manager/src/tcp/tcp_client_listener.cc193
-rw-r--r--src/components/transport_manager/src/tcp/tcp_connection_factory.cc14
-rw-r--r--src/components/transport_manager/src/tcp/tcp_device.cc67
-rw-r--r--src/components/transport_manager/src/tcp/tcp_server_originated_socket_connection.cc24
-rw-r--r--src/components/transport_manager/src/tcp/tcp_socket_connection.cc2
-rw-r--r--src/components/transport_manager/src/tcp/tcp_transport_adapter.cc12
-rw-r--r--src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc116
-rw-r--r--src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc408
-rw-r--r--src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc123
-rw-r--r--src/components/transport_manager/src/transport_manager_default.cc12
-rw-r--r--src/components/transport_manager/src/transport_manager_impl.cc537
-rw-r--r--src/components/transport_manager/src/usb/libusb/platform_usb_device.cc13
-rw-r--r--src/components/transport_manager/src/usb/libusb/usb_connection.cc123
-rw-r--r--src/components/transport_manager/src/usb/libusb/usb_handler.cc205
-rw-r--r--src/components/transport_manager/src/usb/qnx/platform_usb_device.cc4
-rw-r--r--src/components/transport_manager/src/usb/qnx/usb_connection.cc62
-rw-r--r--src/components/transport_manager/src/usb/qnx/usb_handler.cc77
-rw-r--r--src/components/transport_manager/src/usb/usb_aoa_adapter.cc16
-rw-r--r--src/components/transport_manager/src/usb/usb_connection_factory.cc27
-rw-r--r--src/components/transport_manager/src/usb/usb_device_scanner.cc36
-rw-r--r--src/components/transport_manager/src/websocket_server/websocket_connection.cc84
-rw-r--r--src/components/transport_manager/src/websocket_server/websocket_device.cc4
-rw-r--r--src/components/transport_manager/src/websocket_server/websocket_listener.cc69
-rw-r--r--src/components/transport_manager/src/websocket_server/websocket_secure_session.cc18
-rw-r--r--src/components/transport_manager/src/websocket_server/websocket_server_transport_adapter.cc20
-rw-r--r--src/components/transport_manager/src/websocket_server/websocket_session.cc43
-rw-r--r--src/components/transport_manager/test/include/transport_manager/raw_message_matcher.h3
-rw-r--r--src/components/transport_manager/test/network_interface_listener_test.cc14
-rw-r--r--src/components/transport_manager/test/platform_specific/linux/linux_network_interface_listener_test.cc146
-rw-r--r--src/components/transport_manager/test/raw_message_matcher.cc1
-rw-r--r--src/components/transport_manager/test/tcp_client_listener_test.cc18
-rw-r--r--src/components/transport_manager/test/transport_manager_impl_test.cc8
-rw-r--r--src/components/transport_manager/test/websocket_client_connection_test.cc2
-rw-r--r--src/components/transport_manager/test/websocket_sample_client/websocket_sample_client.cc4
-rw-r--r--src/components/utils/CMakeLists.txt5
-rw-r--r--src/components/utils/include/utils/file_system.h8
-rw-r--r--src/components/utils/include/utils/logger/log4cxxlogger.h (renamed from src/components/utils/src/logger_status.cc)20
-rw-r--r--src/components/utils/include/utils/logger/logger_impl.h (renamed from src/components/utils/include/utils/log_message_loop_thread.h)53
-rw-r--r--src/components/utils/src/auto_trace.cc43
-rw-r--r--src/components/utils/src/conditional_variable_boost.cc10
-rw-r--r--src/components/utils/src/date_time.cc13
-rw-r--r--src/components/utils/src/file_system.cc218
-rw-r--r--src/components/utils/src/jsoncpp_reader_wrapper.cc8
-rw-r--r--src/components/utils/src/lock_boost.cc13
-rw-r--r--src/components/utils/src/log_message_loop_thread.cc56
-rw-r--r--src/components/utils/src/logger/log4cxxlogger.cc123
-rw-r--r--src/components/utils/src/logger/logger_impl.cc125
-rw-r--r--src/components/utils/src/push_log.cc139
-rw-r--r--src/components/utils/src/qdb_wrapper/sql_database.cc6
-rw-r--r--src/components/utils/src/qdb_wrapper/sql_query.cc4
-rw-r--r--src/components/utils/src/resource_usage.cc21
-rw-r--r--src/components/utils/src/rwlock_posix.cc16
-rw-r--r--src/components/utils/src/system.cc15
-rw-r--r--src/components/utils/src/threads/async_runner.cc24
-rw-r--r--src/components/utils/src/threads/pulse_thread_delegate.cc41
-rw-r--r--src/components/utils/src/threads/thread_delegate.cc4
-rw-r--r--src/components/utils/src/threads/thread_manager.cc2
-rw-r--r--src/components/utils/src/threads/thread_posix.cc445
-rw-r--r--src/components/utils/src/threads/thread_validator.cc22
-rw-r--r--src/components/utils/src/timer.cc30
-rw-r--r--src/components/utils/test/CMakeLists.txt1
-rw-r--r--src/components/utils/test/auto_trace_test.cc145
-rw-r--r--src/components/utils/test/posix_thread_test.cc542
-rwxr-xr-xtools/InterfaceGenerator/generator/generators/SmartFactoryBase.py123
-rw-r--r--tools/policy_table_validator/main.cpp23
m---------tools/rpc_spec0
1095 files changed, 50935 insertions, 106525 deletions
diff --git a/README.md b/README.md
index d75e14465b..0046a0f679 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
[![Slack Status](http://sdlslack.herokuapp.com/badge.svg)](http://slack.smartdevicelink.com)
-[![Build Status](http://opensdl-jenkins.luxoft.com:8080/view/develop/job/develop_nightly_coverage/badge/icon)](http://opensdl-jenkins.luxoft.com:8080/view/develop/job/develop_nightly_coverage/)
+[![Build Status](https://opensdl-jenkins.prjdmz.luxoft.com/job/develop_weekly_coverage/badge/icon?subject=UT%20coverage%20build)](https://opensdl-jenkins.prjdmz.luxoft.com/job/develop_weekly_coverage/)
+[![Build Status](https://opensdl-jenkins.prjdmz.luxoft.com/view/Smokes/job/Develop_TCP_ATF_Smoke_P/badge/icon?subject=Smoke%20tests)](https://opensdl-jenkins.prjdmz.luxoft.com/view/Smokes/job/Develop_TCP_ATF_Smoke_P/)
+[![Build Status](https://opensdl-jenkins.prjdmz.luxoft.com/job/Develop_SDL_Checkstyle/badge/icon?subject=Coding%20style)](https://opensdl-jenkins.prjdmz.luxoft.com/job/Develop_SDL_Checkstyle/)
# SmartDeviceLink (SDL)
@@ -11,14 +13,14 @@ SmartDeviceLink (SDL) is a standard set of protocols and messages that connect a
## SDL Core
-The Core component of SDL runs on a vehicle's computing system (head unit). Core’s primary responsibility is to route messages between connected smartphone applications and the vehicle HMI. It can connect a smartphone to a vehicle's head unit via a variety of transport protocols such as Bluetooth, USB, Android AOA, and TCP. Once a connection is established, Core discovers compatible applications and displays them to the driver for interaction via voice or display. The Core component is configured to follow a set of policies defined in its local policy database and updated by a [policy server](https://www.github.com/smartdevicelink/sdl_server). The messaging between a connected application and SDL Core is defined by the [Mobile API](https://github.com/smartdevicelink/sdl_core/blob/master/src/components/interfaces/MOBILE_API.xml) and the messaging between SDL Core and the vehicle is defined by the [HMI API](https://github.com/smartdevicelink/sdl_core/blob/master/src/components/interfaces/HMI_API.xml).
+The Core component of SDL runs on a vehicle's computing system (head unit). Core’s primary responsibility is to route messages between connected smartphone applications and the vehicle HMI. It can connect a smartphone to a vehicle's head unit via a variety of transport protocols such as Bluetooth, USB, Android AOA, and TCP. Once a connection is established, Core discovers compatible applications and displays them to the driver for interaction via voice or display. The Core component is configured to follow a set of policies defined in its local policy database and updated by a [policy server](https://www.github.com/smartdevicelink/sdl_server). The messaging between a connected application and SDL Core is defined by the [Mobile API](https://github.com/smartdevicelink/rpc_spec/blob/master/MOBILE_API.xml) and the messaging between SDL Core and the vehicle is defined by the [HMI API](https://github.com/smartdevicelink/sdl_core/blob/master/src/components/interfaces/HMI_API.xml).
Pull Requests Welcome!
## Environment
Currently supported:
* Ubuntu Linux 16.04 with GCC 5.4.x
-* Ubuntu Linux 18.04 with GCC 7.3.x
+* Ubuntu Linux 18.04 with GCC 7.5.x
* [C++11 standard](https://github.com/smartdevicelink/sdl_evolution/issues/132)
## Getting Started
diff --git a/cppcheck.xml b/cppcheck.xml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/cppcheck.xml
diff --git a/src/3rd_party/CMakeLists.txt b/src/3rd_party/CMakeLists.txt
index 4415a1bd7b..0fdc0ba013 100644
--- a/src/3rd_party/CMakeLists.txt
+++ b/src/3rd_party/CMakeLists.txt
@@ -235,7 +235,8 @@ if (NOT ${Boost_FOUND})
include(ExternalProject)
ExternalProject_Add(
Boost
- URL https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz
+ URL https://mirror.bazel.build/dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.gz
+ URL_HASH SHA256=da3411ea45622579d419bfda66f45cd0f8c32a181d84adfa936f5688388995cf
DOWNLOAD_DIR ${BOOST_LIB_SOURCE_DIRECTORY}
SOURCE_DIR ${BOOST_LIB_SOURCE_DIRECTORY}
CONFIGURE_COMMAND ./bootstrap.sh --with-libraries=system,thread,date_time,filesystem,regex --prefix=${3RD_PARTY_INSTALL_PREFIX}
diff --git a/src/appMain/CMakeLists.txt b/src/appMain/CMakeLists.txt
index 86be828c6b..c2b7255ecc 100644
--- a/src/appMain/CMakeLists.txt
+++ b/src/appMain/CMakeLists.txt
@@ -167,8 +167,8 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/smartDeviceLink.ini DESTINATION ${CMAKE_CU
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/hmi_capabilities.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/sdl_preloaded_pt.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/sample_policy_manager.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/start.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/start_external_proprietary.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/core.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/core_external_proprietary.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/init_policy.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
endif ()
@@ -246,15 +246,19 @@ if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
endif ()
if (${EXTENDED_POLICY} STREQUAL "EXTERNAL_PROPRIETARY")
- install(FILES start_external_proprietary.sh DESTINATION bin
+ install(FILES core_external_proprietary.sh DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
- GROUP_EXECUTE WORLD_READ WORLD_EXECUTE RENAME start.sh)
+ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE RENAME core.sh)
else()
- install(FILES start.sh DESTINATION bin
+ install(FILES core.sh DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif()
+install(FILES start.sh daemon.sh DESTINATION bin
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
+ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+
if(BUILD_TESTS)
add_subdirectory(test)
endif()
diff --git a/src/appMain/core.sh b/src/appMain/core.sh
new file mode 100644
index 0000000000..6604368993
--- /dev/null
+++ b/src/appMain/core.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+DIR=$(dirname $0)
+
+EXTERNAL_POLICIES=false
+if [ "$2" = "true" ]; then
+ EXTERNAL_POLICIES=true
+fi
+$DIR/daemon.sh $1 $EXTERNAL_POLICIES
diff --git a/src/appMain/core_external_proprietary.sh b/src/appMain/core_external_proprietary.sh
new file mode 100644
index 0000000000..dc43bfb42c
--- /dev/null
+++ b/src/appMain/core_external_proprietary.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+DIR=$(dirname $0)
+
+EXTERNAL_POLICIES=true
+# Allow for manual override to disable sample policy server
+if [ "$2" = "false" ]; then
+ EXTERNAL_POLICIES=false
+fi
+$DIR/daemon.sh $1 $EXTERNAL_POLICIES
diff --git a/src/appMain/daemon.sh b/src/appMain/daemon.sh
new file mode 100644
index 0000000000..fbde0d750a
--- /dev/null
+++ b/src/appMain/daemon.sh
@@ -0,0 +1,142 @@
+#!/bin/bash
+cd $(dirname $0)
+COMMAND=$1
+EXTERNAL_POLICIES=$2
+DIR=$(pwd)
+
+CORE_PID_FILE=${DIR}/core.pid
+CORE_APPLICATION_NAME=smartDeviceLinkCore
+PM_PID_FILE=${DIR}/policy_manager.pid
+PM_APPLICATION_NAME=sample_policy_manager.py
+
+function core_start() {
+ if [ -f "$CORE_PID_FILE" ] && [ -n "$(ps -p $(cat $CORE_PID_FILE) -o pid=)" ]; then
+ echo "Core is already running"
+ return 1
+ elif [ -n "$(pgrep -f $CORE_APPLICATION_NAME)" ]; then
+ echo "Core is already running outside of this script"
+ echo "All instances of Core can be stopped using the \"kill\" command"
+ return 2
+ else
+ echo "Starting SmartDeviceLink Core"
+ LD_LIBRARY_PATH=$DIR ${DIR}/${CORE_APPLICATION_NAME} &
+ CORE_PID=$!
+ echo $CORE_PID > $CORE_PID_FILE
+ return 0
+ fi
+}
+
+function core_stop() {
+ RESULT=1
+ if [ -f "$CORE_PID_FILE" ] && [ -n "$(ps -p $(cat $CORE_PID_FILE) -o pid=)" ]; then
+ echo "Stopping SmartDeviceLink Core"
+ CORE_PID=$(cat $CORE_PID_FILE)
+ kill $CORE_PID
+
+ # If Core doesn't close normally within 10 seconds, force-close it
+ timeout 10s tail --pid=$CORE_PID -f /dev/null
+ if [ -n "$(ps -p $CORE_PID -o pid=)" ]; then
+ echo "Core did not shut down properly, force-killing"
+ kill -9 $CORE_PID
+ fi
+ RESULT=0
+ fi
+
+ if [ -f "$CORE_PID_FILE" ]; then
+ rm $CORE_PID_FILE
+ fi
+ return $RESULT
+}
+
+function pm_install_dependencies() {
+ pip3 list | grep -F tornado > /dev/null
+ if [ $? -eq 1 ]; then
+ echo "Installing tornado python package"
+ sudo -H pip3 install tornado
+ fi
+}
+
+function pm_start() {
+ if [ -f "$PM_PID_FILE" ] && [ -n "$(ps -p $(cat $PM_PID_FILE) -o pid=)" ]; then
+ echo "Policy Server is already running"
+ return 1
+ elif [ -n "$(pgrep -f $PM_APPLICATION_NAME)" ]; then
+ echo "Policy Server is already running outside of this script"
+ echo "All instances of Core can be stopped using the \"kill\" command"
+ return 2
+ else
+ pm_install_dependencies
+ echo "Starting Policy Manager"
+ python3 ${DIR}/${PM_APPLICATION_NAME} --pack_port 8088 --unpack_port 8089 --add_http_header --encryption &
+ PM_PID=$!
+ echo $PM_PID > $PM_PID_FILE
+ return 0
+ fi
+}
+
+function pm_stop() {
+ RESULT=1
+ if [ -f "$PM_PID_FILE" ] && [ -n "$(ps -p $(cat $PM_PID_FILE) -o pid=)" ]; then
+ echo "Stopping Policy Manager"
+ kill -INT $(cat $PM_PID_FILE)
+ kill -9 $(cat $PM_PID_FILE)
+ RESULT=0
+ fi
+
+ # Clear PID regardless of whether the process was running or not
+ if [ -f "$PM_PID_FILE" ]; then
+ rm $PM_PID_FILE
+ fi
+ return $RESULT
+}
+
+if [ "$COMMAND" == "stop" ]; then
+ core_stop
+ if [ "$?" -ne 0 ]; then
+ echo "Core is not running (or was started outside of this script)"
+ fi
+
+ if [ "$EXTERNAL_POLICIES" == "true" ]; then
+ pm_stop
+ if [ "$?" -ne 0 ]; then
+ echo "Policy Server is not running (or was started outside of this script)"
+ fi
+ fi
+elif [ "$COMMAND" == "restart" ]; then
+ core_stop
+ if [ "$?" -eq 0 ]; then
+ core_start
+ else
+ echo "Core is not running (or was started outside of this script)"
+ fi
+
+ if [ "$EXTERNAL_POLICIES" == "true" ]; then
+ pm_stop
+ if [ "$?" -eq 0 ]; then
+ pm_start
+ else
+ echo "Policy Server is not running (or was started outside of this script)"
+ fi
+ fi
+elif [ "$COMMAND" == "start" ]; then
+ core_start
+ if [ "$EXTERNAL_POLICIES" == "true" ]; then
+ pm_start
+ fi
+elif [ "$COMMAND" == "kill" ]; then
+ core_stop
+ pkill -9 -f $CORE_APPLICATION_NAME
+ if [ "$?" -eq 0 ]; then
+ echo "Killed all lingering instances of SDL Core"
+ fi
+
+ if [ "$EXTERNAL_POLICIES" == "true" ]; then
+ pm_stop
+ pkill -9 -f $PM_APPLICATION_NAME
+ if [ "$?" -eq 0 ]; then
+ echo "Killed all lingering instances of the Policy Server"
+ fi
+ fi
+else
+ echo "usage: daemon.sh [start/restart/stop/kill] [use_sample_policy_manager?]"
+fi
diff --git a/src/appMain/hmi_capabilities.json b/src/appMain/hmi_capabilities.json
index 91ddaf6d6c..1e1c5aea79 100755
--- a/src/appMain/hmi_capabilities.json
+++ b/src/appMain/hmi_capabilities.json
@@ -10,169 +10,169 @@
"displayName": "GENERIC_DISPLAY",
"textFields": [{
"name": "mainField1",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "mainField2",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "mainField3",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "mainField4",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "statusBar",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "mediaClock",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "mediaTrack",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "alertText1",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "alertText2",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "alertText3",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "scrollableMessageBody",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "initialInteractionText",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "navigationText1",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "navigationText2",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "ETA",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "totalDistance",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "navigationText",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "audioPassThruDisplayText1",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "audioPassThruDisplayText2",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "sliderHeader",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "sliderFooter",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "notificationText",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "menuName",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "secondaryText",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "tertiaryText",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "timeToDestination",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "turnText",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
},
{
"name": "menuTitle",
- "characterSet": "TYPE2SET",
+ "characterSet": "UTF_8",
"width": 500,
"rows": 1
}
@@ -287,12 +287,12 @@
},
"audioPassThruCapabilities": [{
"samplingRate": "44KHZ",
- "bitsPerSample": "RATE_8_BIT",
+ "bitsPerSample": "8_BIT",
"audioType": "PCM"
}],
"pcmStreamCapabilities": {
"samplingRate": "16KHZ",
- "bitsPerSample": "RATE_16_BIT",
+ "bitsPerSample": "16_BIT",
"audioType": "PCM"
},
"hmiZoneCapabilities": "FRONT",
@@ -325,611 +325,617 @@
"pixelPerInch": 117,
"scale": 1
},
- "seatLocationCapability": {
- "rows": 2,
- "columns": 3,
- "levels": 1,
- "seats": [
- {
- "row": 0,
- "col": 0,
- "level": 0,
- "rowspan": 1,
- "levelspan": 1,
- "colspan": 1
- }
- ]
- },
- "remoteControlCapability": {
- "buttonCapabilities": [
- {
- "longPressAvailable": true,
- "name": "AC_MAX",
- "moduleInfo": {
- "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "driverDistractionCapability": {
+ "menuLength": 10,
+ "subMenuDepth": 3
+ }
+ }
+ },
+ "RC" : {
+ "remoteControlCapability" : {
+ "buttonCapabilities": [
+ {
+ "longPressAvailable": true,
+ "name": "AC_MAX",
+ "moduleInfo": {
+ "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
+ "allowMultipleAccess": false
},
- {
- "longPressAvailable": true,
- "name": "AC",
- "moduleInfo": {
- "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "AC",
+ "moduleInfo": {
+ "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
+ "allowMultipleAccess": false
},
- {
- "longPressAvailable": true,
- "name": "RECIRCULATE",
- "moduleInfo": {
- "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "RECIRCULATE",
+ "moduleInfo": {
+ "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
+ "allowMultipleAccess": false
},
- {
- "longPressAvailable": true,
- "name": "FAN_UP",
- "moduleInfo": {
- "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "FAN_UP",
+ "moduleInfo": {
+ "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
+ "allowMultipleAccess": false
},
- {
- "longPressAvailable": true,
- "name": "FAN_DOWN",
- "moduleInfo": {
- "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "FAN_DOWN",
+ "moduleInfo": {
+ "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
+ "allowMultipleAccess": false
},
- {
- "longPressAvailable": true,
- "name": "TEMP_UP",
- "moduleInfo": {
- "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "TEMP_UP",
+ "moduleInfo": {
+ "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
+ "allowMultipleAccess": false
+ },
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "TEMP_DOWN",
+ "moduleInfo": {
+ "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
+ "allowMultipleAccess": false
+ },
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "DEFROST_MAX",
+ "moduleInfo": {
+ "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
+ "allowMultipleAccess": false
},
- {
- "longPressAvailable": true,
- "name": "TEMP_DOWN",
- "moduleInfo": {
- "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "DEFROST",
+ "moduleInfo": {
+ "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
+ "allowMultipleAccess": false
},
- {
- "longPressAvailable": true,
- "name": "DEFROST_MAX",
- "moduleInfo": {
- "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "DEFROST_REAR",
+ "moduleInfo": {
+ "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
+ "allowMultipleAccess": false
+ },
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "UPPER_VENT",
+ "moduleInfo": {
+ "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
+ "allowMultipleAccess": false
},
- {
- "longPressAvailable": true,
- "name": "DEFROST",
- "moduleInfo": {
- "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "LOWER_VENT",
+ "moduleInfo": {
+ "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
+ "allowMultipleAccess": false
},
- {
- "longPressAvailable": true,
- "name": "DEFROST_REAR",
- "moduleInfo": {
- "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "VOLUME_UP",
+ "moduleInfo": {
+ "moduleId": "eb7739ea-b263-4fe1-af9c-9311d1acac2d",
+ "allowMultipleAccess": false
},
- {
- "longPressAvailable": true,
- "name": "UPPER_VENT",
- "moduleInfo": {
- "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "VOLUME_DOWN",
+ "moduleInfo": {
+ "moduleId": "eb7739ea-b263-4fe1-af9c-9311d1acac2d",
+ "allowMultipleAccess": false
},
- {
- "longPressAvailable": true,
- "name": "LOWER_VENT",
- "moduleInfo": {
- "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "EJECT",
+ "moduleInfo": {
+ "moduleId": "eb7739ea-b263-4fe1-af9c-9311d1acac2d",
+ "allowMultipleAccess": false
},
- {
- "longPressAvailable": true,
- "name": "VOLUME_UP",
- "moduleInfo": {
- "moduleId": "eb7739ea-b263-4fe1-af9c-9311d1acac2d",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "SOURCE",
+ "moduleInfo": {
+ "moduleId": "eb7739ea-b263-4fe1-af9c-9311d1acac2d",
+ "allowMultipleAccess": false
},
- {
- "longPressAvailable": true,
- "name": "VOLUME_DOWN",
- "moduleInfo": {
- "moduleId": "eb7739ea-b263-4fe1-af9c-9311d1acac2d",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "SHUFFLE",
+ "moduleInfo": {
+ "moduleId": "eb7739ea-b263-4fe1-af9c-9311d1acac2d",
+ "allowMultipleAccess": false
},
- {
- "longPressAvailable": true,
- "name": "EJECT",
- "moduleInfo": {
- "moduleId": "eb7739ea-b263-4fe1-af9c-9311d1acac2d",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "longPressAvailable": true,
+ "name": "REPEAT",
+ "moduleInfo": {
+ "moduleId": "eb7739ea-b263-4fe1-af9c-9311d1acac2d",
+ "allowMultipleAccess": false
},
- {
- "longPressAvailable": true,
- "name": "SOURCE",
- "moduleInfo": {
- "moduleId": "eb7739ea-b263-4fe1-af9c-9311d1acac2d",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "shortPressAvailable": true,
+ "upDownAvailable": false
+ }
+ ],
+ "climateControlCapabilities": [
+ {
+ "moduleInfo": {
+ "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
+ "allowMultipleAccess": false
},
- {
- "longPressAvailable": true,
- "name": "SHUFFLE",
- "moduleInfo": {
- "moduleId": "eb7739ea-b263-4fe1-af9c-9311d1acac2d",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
+ "acEnableAvailable": true,
+ "acMaxEnableAvailable": true,
+ "autoModeEnableAvailable": true,
+ "circulateAirEnableAvailable": true,
+ "climateEnableAvailable": true,
+ "currentTemperatureAvailable": true,
+ "defrostZone": [
+ "FRONT",
+ "REAR",
+ "ALL",
+ "NONE"
+ ],
+ "defrostZoneAvailable": true,
+ "desiredTemperatureAvailable": true,
+ "dualModeEnableAvailable": true,
+ "heatedMirrorsAvailable":true,
+ "heatedRearWindowAvailable":true,
+ "heatedSteeringWheelAvailable":true,
+ "heatedWindshieldAvailable":true,
+ "fanSpeedAvailable": true,
+ "moduleName": "primary_climate",
+ "ventilationMode": [
+ "UPPER",
+ "LOWER",
+ "BOTH",
+ "NONE"
+ ],
+ "ventilationModeAvailable": true
+ }
+ ],
+ "radioControlCapabilities": [
+ {
+ "moduleInfo": {
+ "moduleId": "eb7739ea-b263-4fe1-af9c-9311d1acac2d",
+ "allowMultipleAccess": true
},
- {
- "longPressAvailable": true,
- "name": "REPEAT",
- "moduleInfo": {
- "moduleId": "eb7739ea-b263-4fe1-af9c-9311d1acac2d",
- "allowMultipleAccess": false
- },
- "shortPressAvailable": true,
- "upDownAvailable": false
- }
- ],
- "climateControlCapabilities": [
- {
- "moduleInfo": {
- "moduleId": "34045662-a9dc-4823-8435-91056d4c26cb",
- "allowMultipleAccess": false
- },
- "acEnableAvailable": true,
- "acMaxEnableAvailable": true,
- "autoModeEnableAvailable": true,
- "circulateAirEnableAvailable": true,
- "climateEnableAvailable": true,
- "currentTemperatureAvailable": true,
- "defrostZone": [
- "FRONT",
- "REAR",
- "ALL",
- "NONE"
- ],
- "defrostZoneAvailable": true,
- "desiredTemperatureAvailable": true,
- "dualModeEnableAvailable": true,
- "heatedMirrorsAvailable":true,
- "heatedRearWindowAvailable":true,
- "heatedSteeringWheelAvailable":true,
- "heatedWindshieldAvailable":true,
- "fanSpeedAvailable": true,
- "moduleName": "primary_climate",
- "ventilationMode": [
- "UPPER",
- "LOWER",
- "BOTH",
- "NONE"
- ],
- "ventilationModeAvailable": true
- }
- ],
- "radioControlCapabilities": [
- {
- "moduleInfo": {
- "moduleId": "eb7739ea-b263-4fe1-af9c-9311d1acac2d",
- "allowMultipleAccess": true
- },
- "availableHdChannelsAvailable": true,
- "hdChannelAvailable": true,
- "moduleName": "radio",
- "radioBandAvailable": true,
- "radioEnableAvailable": true,
- "radioFrequencyAvailable": true,
- "rdsDataAvailable": true,
- "signalChangeThresholdAvailable": true,
- "signalStrengthAvailable": true,
- "hdRadioEnableAvailable" : true,
- "siriusxmRadioAvailable" : true,
- "sisDataAvailable":true,
- "stateAvailable": true
- }
- ],
- "audioControlCapabilities": [
- {
- "moduleName": "audio",
- "moduleInfo": {
- "moduleId": "a279fe12-4587-4d12-8514-50f4ea9e9537",
- "allowMultipleAccess": true
- },
- "sourceAvailable": true,
- "volumeAvailable": true,
- "equalizerAvailable": true,
- "keepContextAvailable" : true,
- "equalizerMaxChannelId": 10
- }
- ],
- "seatControlCapabilities": [
- {
- "moduleName": "driver_seat",
- "moduleInfo": {
- "moduleId": "06cdec22-920e-4865-bf2e-9518463edc68",
- "allowMultipleAccess": false
- },
- "heatingEnabledAvailable" : true,
- "coolingEnabledAvailable": true,
- "heatingLevelAvailable": true,
- "coolingLevelAvailable": true,
- "horizontalPositionAvailable": true,
- "verticalPositionAvailable" : true,
- "frontVerticalPositionAvailable": true,
- "backVerticalPositionAvailable": true,
- "backTiltAngleAvailable": true,
- "headSupportHorizontalPositionAvailable": true,
- "headSupportVerticalPositionAvailable" : true,
- "massageEnabledAvailable": true,
- "massageModeAvailable": true,
- "massageCushionFirmnessAvailable": true,
- "memoryAvailable": true
- }
- ],
- "lightControlCapabilities": {
- "moduleName": "light",
- "moduleInfo": {
- "moduleId": "8d73e369-6a1f-4459-ab5a-6e432631881d",
- "allowMultipleAccess": false
- },
- "supportedLights":[
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"FRONT_LEFT_HIGH_BEAM",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"FRONT_RIGHT_HIGH_BEAM",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"FRONT_LEFT_LOW_BEAM",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"FRONT_RIGHT_LOW_BEAM",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"FRONT_LEFT_PARKING_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"FRONT_RIGHT_PARKING_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"FRONT_LEFT_FOG_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"FRONT_RIGHT_FOG_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"FRONT_LEFT_DAYTIME_RUNNING_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"FRONT_RIGHT_DAYTIME_RUNNING_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"FRONT_LEFT_TURN_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"FRONT_RIGHT_TURN_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"REAR_LEFT_FOG_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"REAR_RIGHT_FOG_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"REAR_LEFT_TAIL_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"REAR_RIGHT_TAIL_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"REAR_LEFT_BRAKE_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"REAR_RIGHT_BRAKE_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"REAR_LEFT_TURN_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"REAR_RIGHT_TURN_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"REAR_REGISTRATION_PLATE_LIGHT",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"HIGH_BEAMS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"LOW_BEAMS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"FOG_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"RUNNING_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"PARKING_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"BRAKE_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"REAR_REVERSING_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"SIDE_MARKER_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"LEFT_TURN_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"RIGHT_TURN_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"HAZARD_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"AMBIENT_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"OVERHEAD_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"READING_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"TRUNK_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"EXTERIOR_FRONT_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"EXTERIOR_REAR_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"EXTERIOR_LEFT_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
- "statusAvailable":true,
- "densityAvailable":true,
- "name":"EXTERIOR_RIGHT_LIGHTS",
- "rgbColorSpaceAvailable":true
- },
- {
+ "availableHdChannelsAvailable": true,
+ "hdChannelAvailable": true,
+ "moduleName": "radio",
+ "radioBandAvailable": true,
+ "radioEnableAvailable": true,
+ "radioFrequencyAvailable": true,
+ "rdsDataAvailable": true,
+ "signalChangeThresholdAvailable": true,
+ "signalStrengthAvailable": true,
+ "hdRadioEnableAvailable" : true,
+ "siriusxmRadioAvailable" : true,
+ "sisDataAvailable":true,
+ "stateAvailable": true
+ }
+ ],
+ "audioControlCapabilities": [
+ {
+ "moduleName": "audio",
+ "moduleInfo": {
+ "moduleId": "a279fe12-4587-4d12-8514-50f4ea9e9537",
+ "allowMultipleAccess": true
+ },
+ "sourceAvailable": true,
+ "volumeAvailable": true,
+ "equalizerAvailable": true,
+ "keepContextAvailable" : true,
+ "equalizerMaxChannelId": 10
+ }
+ ],
+ "seatControlCapabilities": [
+ {
+ "moduleName": "driver_seat",
+ "moduleInfo": {
+ "moduleId": "06cdec22-920e-4865-bf2e-9518463edc68",
+ "allowMultipleAccess": false
+ },
+ "heatingEnabledAvailable" : true,
+ "coolingEnabledAvailable": true,
+ "heatingLevelAvailable": true,
+ "coolingLevelAvailable": true,
+ "horizontalPositionAvailable": true,
+ "verticalPositionAvailable" : true,
+ "frontVerticalPositionAvailable": true,
+ "backVerticalPositionAvailable": true,
+ "backTiltAngleAvailable": true,
+ "headSupportHorizontalPositionAvailable": true,
+ "headSupportVerticalPositionAvailable" : true,
+ "massageEnabledAvailable": true,
+ "massageModeAvailable": true,
+ "massageCushionFirmnessAvailable": true,
+ "memoryAvailable": true
+ }
+ ],
+ "lightControlCapabilities": {
+ "moduleName": "light",
+ "moduleInfo": {
+ "moduleId": "8d73e369-6a1f-4459-ab5a-6e432631881d",
+ "allowMultipleAccess": false
+ },
+ "supportedLights":[
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"FRONT_LEFT_HIGH_BEAM",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"FRONT_RIGHT_HIGH_BEAM",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"FRONT_LEFT_LOW_BEAM",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"FRONT_RIGHT_LOW_BEAM",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"FRONT_LEFT_PARKING_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"FRONT_RIGHT_PARKING_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"FRONT_LEFT_FOG_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"FRONT_RIGHT_FOG_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"FRONT_LEFT_DAYTIME_RUNNING_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"FRONT_RIGHT_DAYTIME_RUNNING_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"FRONT_LEFT_TURN_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"FRONT_RIGHT_TURN_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"REAR_LEFT_FOG_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"REAR_RIGHT_FOG_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"REAR_LEFT_TAIL_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"REAR_RIGHT_TAIL_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"REAR_LEFT_BRAKE_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"REAR_RIGHT_BRAKE_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"REAR_LEFT_TURN_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"REAR_RIGHT_TURN_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"REAR_REGISTRATION_PLATE_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"HIGH_BEAMS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"LOW_BEAMS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"FOG_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"RUNNING_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"PARKING_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"BRAKE_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"REAR_REVERSING_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"SIDE_MARKER_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"LEFT_TURN_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"RIGHT_TURN_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"HAZARD_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"AMBIENT_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"OVERHEAD_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"READING_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"TRUNK_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"EXTERIOR_FRONT_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"EXTERIOR_REAR_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"EXTERIOR_LEFT_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "statusAvailable":true,
+ "densityAvailable":true,
+ "name":"EXTERIOR_RIGHT_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
"statusAvailable":false,
"densityAvailable":false,
"name":"REAR_CARGO_LIGHTS",
"rgbColorSpaceAvailable":false
- },
- {
+ },
+ {
"statusAvailable":false,
"densityAvailable":false,
"name":"REAR_TRUCK_BED_LIGHTS",
"rgbColorSpaceAvailable":false
- },
- {
+ },
+ {
"statusAvailable":false,
"densityAvailable":false,
"name":"REAR_TRAILER_LIGHTS",
"rgbColorSpaceAvailable":false
- },
- {
+ },
+ {
"statusAvailable":false,
"densityAvailable":false,
"name":"LEFT_SPOT_LIGHTS",
"rgbColorSpaceAvailable":false
- },
- {
+ },
+ {
"statusAvailable":false,
"densityAvailable":false,
"name":"RIGHT_SPOT_LIGHTS",
"rgbColorSpaceAvailable":false
- },
- {
+ },
+ {
"statusAvailable":false,
"densityAvailable":false,
"name":"LEFT_PUDDLE_LIGHTS",
"rgbColorSpaceAvailable":false
- },
- {
+ },
+ {
"statusAvailable":false,
"densityAvailable":false,
"name":"RIGHT_PUDDLE_LIGHTS",
"rgbColorSpaceAvailable":false
- },
- {
+ },
+ {
"statusAvailable":true,
"densityAvailable":false,
"name":"EXTERIOR_ALL_LIGHTS",
"rgbColorSpaceAvailable":false
- }
- ]
- },
- "hmiSettingsControlCapabilities": {
- "moduleName": "hmiSettings",
- "moduleInfo": {
- "moduleId": "c8cace3c-d482-4be1-8862-624a21e34563",
- "allowMultipleAccess": true
- },
- "distanceUnitAvailable": true,
- "temperatureUnitAvailable": true,
- "displayModeUnitAvailable": true
- }
+ }
+ ]
+ },
+ "hmiSettingsControlCapabilities": {
+ "moduleName": "hmiSettings",
+ "moduleInfo": {
+ "moduleId": "c8cace3c-d482-4be1-8862-624a21e34563",
+ "allowMultipleAccess": true
+ },
+ "distanceUnitAvailable": true,
+ "temperatureUnitAvailable": true,
+ "displayModeUnitAvailable": true
}
+ },
+ "seatLocationCapability": {
+ "rows": 2,
+ "columns": 3,
+ "levels": 1,
+ "seats": [
+ {
+ "row": 0,
+ "col": 0,
+ "level": 0,
+ "rowspan": 1,
+ "levelspan": 1,
+ "colspan": 1
+ }
+ ]
}
},
"VR": {
- "capabilities": ["TEXT"],
+ "vrCapabilities": ["TEXT"],
"language": "EN-US",
"languages": [
"EN-US", "ES-MX", "FR-CA", "DE-DE", "ES-ES", "EN-GB", "RU-RU", "TR-TR", "PL-PL", "FR-FR", "IT-IT", "SV-SE", "PT-PT", "NL-NL", "ZH-TW",
@@ -937,7 +943,8 @@
]
},
"TTS": {
- "capabilities": ["TEXT"],
+ "speechCapabilities": ["TEXT"],
+ "prerecordedSpeechCapabilities": ["HELP_JINGLE"],
"language": "EN-US",
"languages": [
"EN-US", "ES-MX", "FR-CA", "DE-DE", "ES-ES", "EN-GB", "RU-RU", "TR-TR", "PL-PL", "FR-FR", "IT-IT", "SV-SE", "PT-PT", "NL-NL", "ZH-TW",
@@ -1047,10 +1054,12 @@
}
},
"VehicleInfo": {
- "make": "SDL",
- "model": "Generic",
- "modelYear": "2019",
- "trim": "SE"
+ "vehicleType": {
+ "make": "SDL",
+ "model": "Generic",
+ "modelYear": "2019",
+ "trim": "SE"
+ }
},
"SyncMessageVersion": {
"majorVersion": 3,
diff --git a/src/appMain/life_cycle_impl.cc b/src/appMain/life_cycle_impl.cc
index 4c2d1e88ac..a14ca1240c 100644
--- a/src/appMain/life_cycle_impl.cc
+++ b/src/appMain/life_cycle_impl.cc
@@ -43,17 +43,13 @@
#include "security_manager/security_manager_impl.h"
#endif // ENABLE_SECURITY
-#ifdef ENABLE_LOG
-#include "utils/log_message_loop_thread.h"
-#endif // ENABLE_LOG
-
#include "appMain/low_voltage_signals_handler.h"
using threads::Thread;
namespace main_namespace {
-CREATE_LOGGERPTR_GLOBAL(logger_, "SDLMain")
+SDL_CREATE_LOG_VARIABLE("SDLMain")
LifeCycleImpl::LifeCycleImpl(const profile::Profile& profile)
: transport_manager_(NULL)
@@ -78,7 +74,7 @@ LifeCycleImpl::LifeCycleImpl(const profile::Profile& profile)
}
bool LifeCycleImpl::StartComponents() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(!last_state_wrapper_);
auto last_state = std::make_shared<resumption::LastStateImpl>(
@@ -123,7 +119,7 @@ bool LifeCycleImpl::StartComponents() {
app_manager_->set_connection_handler(connection_handler_);
app_manager_->AddPolicyObserver(protocol_handler_);
if (!app_manager_->Init(last_state_wrapper_, media_manager_)) {
- LOG4CXX_ERROR(logger_, "Application manager init failed.");
+ SDL_LOG_ERROR("Application manager init failed.");
return false;
}
@@ -146,7 +142,7 @@ bool LifeCycleImpl::StartComponents() {
app_manager_->AddPolicyObserver(security_manager_);
if (!crypto_manager_->Init()) {
- LOG4CXX_ERROR(logger_, "CryptoManager initialization fail.");
+ SDL_LOG_ERROR("CryptoManager initialization fail.");
return false;
}
#endif // ENABLE_SECURITY
@@ -175,7 +171,7 @@ bool LifeCycleImpl::StartComponents() {
app_manager_->set_protocol_handler(protocol_handler_);
if (transport_manager::E_SUCCESS !=
transport_manager_->Init(last_state_wrapper_)) {
- LOG4CXX_ERROR(logger_, "Transport manager init failed.");
+ SDL_LOG_ERROR("Transport manager init failed.");
return false;
}
// start transport manager
@@ -193,7 +189,7 @@ bool LifeCycleImpl::StartComponents() {
}
void LifeCycleImpl::LowVoltage() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
transport_manager_->PerformActionOnClients(
transport_manager::TransportAction::kListeningOff);
transport_manager_->StopEventsProcessing();
@@ -202,12 +198,12 @@ void LifeCycleImpl::LowVoltage() {
}
void LifeCycleImpl::IgnitionOff() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
kill(getpid(), SIGINT);
}
void LifeCycleImpl::WakeUp() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
transport_manager_->Reinit();
transport_manager_->PerformActionOnClients(
transport_manager::TransportAction::kListeningOn);
@@ -235,35 +231,35 @@ namespace {
void sig_handler(int sig) {
switch (sig) {
case SIGINT:
- LOG4CXX_DEBUG(logger_, "SIGINT signal has been caught");
+ SDL_LOG_DEBUG("SIGINT signal has been caught");
break;
case SIGTERM:
- LOG4CXX_DEBUG(logger_, "SIGTERM signal has been caught");
+ SDL_LOG_DEBUG("SIGTERM signal has been caught");
break;
case SIGSEGV:
- LOG4CXX_DEBUG(logger_, "SIGSEGV signal has been caught");
- FLUSH_LOGGER();
+ SDL_LOG_DEBUG("SIGSEGV signal has been caught");
+ SDL_FLUSH_LOGGER();
// exit need to prevent endless sending SIGSEGV
// http://stackoverflow.com/questions/2663456/how-to-write-a-signal-handler-to-catch-sigsegv
abort();
default:
- LOG4CXX_DEBUG(logger_, "Unexpected signal has been caught");
+ SDL_LOG_DEBUG("Unexpected signal has been caught");
exit(EXIT_FAILURE);
}
}
} // namespace
void LifeCycleImpl::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Register signal handlers and wait sys signals
// from OS
if (!utils::Signals::WaitTerminationSignals(&sig_handler)) {
- LOG4CXX_FATAL(logger_, "Fail to catch system signal!");
+ SDL_LOG_FATAL("Fail to catch system signal!");
}
}
void LifeCycleImpl::StopComponents() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(hmi_handler_);
hmi_handler_->set_message_observer(NULL);
@@ -277,7 +273,7 @@ void LifeCycleImpl::StopComponents() {
DCHECK_OR_RETURN_VOID(app_manager_);
app_manager_->Stop();
- LOG4CXX_INFO(logger_, "Stopping Protocol Handler");
+ SDL_LOG_INFO("Stopping Protocol Handler");
DCHECK_OR_RETURN_VOID(protocol_handler_);
protocol_handler_->RemoveProtocolObserver(media_manager_);
@@ -285,23 +281,23 @@ void LifeCycleImpl::StopComponents() {
protocol_handler_->RemoveProtocolObserver(security_manager_);
if (security_manager_) {
security_manager_->RemoveListener(app_manager_);
- LOG4CXX_INFO(logger_, "Destroying Crypto Manager");
+ SDL_LOG_INFO("Destroying Crypto Manager");
delete crypto_manager_;
crypto_manager_ = NULL;
- LOG4CXX_INFO(logger_, "Destroying Security Manager");
+ SDL_LOG_INFO("Destroying Security Manager");
delete security_manager_;
security_manager_ = NULL;
}
#endif // ENABLE_SECURITY
protocol_handler_->Stop();
- LOG4CXX_INFO(logger_, "Destroying Media Manager");
+ SDL_LOG_INFO("Destroying Media Manager");
DCHECK_OR_RETURN_VOID(media_manager_);
media_manager_->SetProtocolHandler(NULL);
delete media_manager_;
media_manager_ = NULL;
- LOG4CXX_INFO(logger_, "Destroying Transport Manager.");
+ SDL_LOG_INFO("Destroying Transport Manager.");
DCHECK_OR_RETURN_VOID(transport_manager_);
transport_manager_->PerformActionOnClients(
transport_manager::TransportAction::kVisibilityOff);
@@ -309,31 +305,31 @@ void LifeCycleImpl::StopComponents() {
delete transport_manager_;
transport_manager_ = NULL;
- LOG4CXX_INFO(logger_, "Stopping Connection Handler.");
+ SDL_LOG_INFO("Stopping Connection Handler.");
DCHECK_OR_RETURN_VOID(connection_handler_);
connection_handler_->Stop();
- LOG4CXX_INFO(logger_, "Destroying Protocol Handler");
+ SDL_LOG_INFO("Destroying Protocol Handler");
DCHECK(protocol_handler_);
delete protocol_handler_;
protocol_handler_ = NULL;
- LOG4CXX_INFO(logger_, "Destroying Connection Handler.");
+ SDL_LOG_INFO("Destroying Connection Handler.");
delete connection_handler_;
connection_handler_ = NULL;
- LOG4CXX_INFO(logger_, "Destroying Last State.");
+ SDL_LOG_INFO("Destroying Last State.");
last_state_wrapper_.reset();
- LOG4CXX_INFO(logger_, "Destroying Application Manager.");
+ SDL_LOG_INFO("Destroying Application Manager.");
DCHECK(app_manager_);
delete app_manager_;
app_manager_ = NULL;
- LOG4CXX_INFO(logger_, "Destroying Low Voltage Signals Handler.");
+ SDL_LOG_INFO("Destroying Low Voltage Signals Handler.");
low_voltage_signals_handler_.reset();
- LOG4CXX_INFO(logger_, "Destroying HMI Message Handler and MB adapter.");
+ SDL_LOG_INFO("Destroying HMI Message Handler and MB adapter.");
#ifdef MESSAGEBROKER_HMIADAPTER
if (mb_adapter_) {
@@ -349,7 +345,7 @@ void LifeCycleImpl::StopComponents() {
delete mb_adapter_thread_;
mb_adapter_thread_ = NULL;
}
- LOG4CXX_INFO(logger_, "Destroying Message Broker");
+ SDL_LOG_INFO("Destroying Message Broker");
#endif // MESSAGEBROKER_HMIADAPTER
DCHECK_OR_RETURN_VOID(hmi_handler_);
delete hmi_handler_;
diff --git a/src/appMain/low_voltage_signals_handler.cc b/src/appMain/low_voltage_signals_handler.cc
index bb7bbfbac7..e9760e94e8 100644
--- a/src/appMain/low_voltage_signals_handler.cc
+++ b/src/appMain/low_voltage_signals_handler.cc
@@ -46,7 +46,7 @@
namespace main_namespace {
-CREATE_LOGGERPTR_GLOBAL(logger_, "LowVoltageSignalsHandler")
+SDL_CREATE_LOG_VARIABLE("LowVoltageSignalsHandler")
LowVoltageSignalsHandler::LowVoltageSignalsHandler(
LifeCycle& life_cycle, const LowVoltageSignalsOffset& offset_data)
@@ -60,7 +60,7 @@ LowVoltageSignalsHandler::LowVoltageSignalsHandler(
, cpid_(-1) {
sigemptyset(&lv_mask_);
sigaddset(&lv_mask_, SIGLOWVOLTAGE_);
- signals_handler_thread_->start();
+ signals_handler_thread_->Start();
}
sigset_t LowVoltageSignalsHandler::LowVoltageSignalsMask() const {
@@ -81,7 +81,7 @@ int LowVoltageSignalsHandler::ignition_off_signo() const {
void LowVoltageSignalsHandler::Destroy() {
if (signals_handler_thread_) {
- signals_handler_thread_->join();
+ signals_handler_thread_->Stop(threads::Thread::kThreadSoftStop);
}
notifications_delegate_.reset();
threads::DeleteThread(signals_handler_thread_);
@@ -93,22 +93,21 @@ LowVoltageSignalsHandler::~LowVoltageSignalsHandler() {
void LowVoltageSignalsHandler::HandleSignal(const int signo) {
if (SIGLOWVOLTAGE_ == signo) {
- LOG4CXX_DEBUG(logger_, "Received LOW_VOLTAGE signal");
+ SDL_LOG_DEBUG("Received LOW_VOLTAGE signal");
life_cycle_.LowVoltage();
cpid_ = utils::Signals::Fork();
if (0 > cpid_) {
- LOG4CXX_FATAL(logger_,
- "Error due fork() call. Error: " << strerror(errno));
+ SDL_LOG_FATAL("Error due fork() call. Error: " << strerror(errno));
utils::Signals::ExitProcess(EXIT_FAILURE);
}
if (0 != cpid_) {
// In Parent process
- LOG4CXX_DEBUG(logger_, "Child PID: " << cpid_);
+ SDL_LOG_DEBUG("Child PID: " << cpid_);
utils::Signals::WaitPid(cpid_, nullptr, 0);
- LOG4CXX_DEBUG(logger_, "Child process: " << cpid_ << " is stopped");
+ SDL_LOG_DEBUG("Child process: " << cpid_ << " is stopped");
life_cycle_.WakeUp();
} else {
// In Child process
@@ -148,8 +147,7 @@ void NotificationThreadDelegate::threadMain() {
low_voltage_signals_handler_.LowVoltageSignalsMask();
const int err = sigwait(&lv_mask, &signo);
if (0 != err) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Sigwait() error! Signals set contains an invalid signal number!");
continue;
}
@@ -158,7 +156,7 @@ void NotificationThreadDelegate::threadMain() {
}
void NotificationThreadDelegate::exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ThreadDelegate::exitThreadMain();
}
diff --git a/src/appMain/main.cc b/src/appMain/main.cc
index cb59f63b1d..34c5b4dbfa 100644
--- a/src/appMain/main.cc
+++ b/src/appMain/main.cc
@@ -42,10 +42,11 @@
#include <vector>
// ----------------------------------------------------------------------------
-
#ifdef ENABLE_LOG
-#include "utils/log_message_loop_thread.h"
+#include "utils/logger/log4cxxlogger.h"
+#include "utils/logger/logger_impl.h"
#endif // ENABLE_LOG
+
#include "utils/logger.h"
#include "appMain/life_cycle_impl.h"
@@ -62,7 +63,7 @@
#include "media_manager/media_manager_impl.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "SDLMain")
+SDL_CREATE_LOG_VARIABLE("SDLMain")
namespace {
@@ -79,7 +80,7 @@ const std::string kLocalHostAddress = "127.0.0.1";
bool InitHmi(std::string hmi_link) {
struct stat sb;
if (stat(hmi_link.c_str(), &sb) == -1) {
- LOG4CXX_FATAL(logger_, "HMI index file " << hmi_link << " doesn't exist!");
+ SDL_LOG_FATAL("HMI index file " << hmi_link << " doesn't exist!");
return false;
}
return utils::System(kBrowser, kBrowserName)
@@ -103,6 +104,12 @@ int32_t main(int32_t argc, char** argv) {
exit(EXIT_FAILURE);
}
+#ifdef ENABLE_LOG
+ auto logger_impl =
+ std::unique_ptr<logger::LoggerImpl>(new logger::LoggerImpl());
+ logger::Logger::instance(logger_impl.get());
+#endif // ENABLE_LOG
+
// --------------------------------------------------------------------------
// Components initialization
profile::Profile profile_instance;
@@ -131,57 +138,61 @@ int32_t main(int32_t argc, char** argv) {
exit(EXIT_FAILURE);
}
- // --------------------------------------------------------------------------
- // Logger initialization
- INIT_LOGGER("log4cxx.properties", profile_instance.logs_enabled());
+#ifdef ENABLE_LOG
+ if (profile_instance.logs_enabled()) {
+ // Logger initialization
+ // Redefine for each paticular logger implementation
+ auto logger = std::unique_ptr<logger::Log4CXXLogger>(
+ new logger::Log4CXXLogger("log4cxx.properties"));
+ logger_impl->Init(std::move(logger));
+ }
+#endif
- threads::Thread::SetNameForId(threads::Thread::CurrentId(), "MainThread");
+ threads::Thread::SetNameForId(threads::Thread::CurrentId(), "SDLCore");
if (!utils::appenders_loader.Loaded()) {
- LOG4CXX_ERROR(logger_,
- "Appenders plugin not loaded, file logging disabled");
+ SDL_LOG_ERROR("Appenders plugin not loaded, file logging disabled");
}
- LOG4CXX_INFO(logger_, "Application started!");
- LOG4CXX_INFO(logger_, "SDL version: " << profile_instance.sdl_version());
+ SDL_LOG_INFO("Application started!");
+ SDL_LOG_INFO("SDL version: " << profile_instance.sdl_version());
// Check if no error values were read from config file
if (profile_instance.ErrorOccured()) {
- LOG4CXX_FATAL(logger_, profile_instance.ErrorDescription());
- FLUSH_LOGGER();
- DEINIT_LOGGER();
+ SDL_LOG_FATAL(profile_instance.ErrorDescription());
+ SDL_DEINIT_LOGGER();
exit(EXIT_FAILURE);
}
// --------------------------------------------------------------------------
// Components initialization
if (!life_cycle->StartComponents()) {
- LOG4CXX_FATAL(logger_, "Failed to start components");
+ SDL_LOG_FATAL("Failed to start components");
life_cycle->StopComponents();
- DEINIT_LOGGER();
+ SDL_DEINIT_LOGGER();
exit(EXIT_FAILURE);
}
- LOG4CXX_INFO(logger_, "Components Started");
+ SDL_LOG_INFO("Components Started");
// --------------------------------------------------------------------------
// Third-Party components initialization.
if (!life_cycle->InitMessageSystem()) {
- LOG4CXX_FATAL(logger_, "Failed to init message system");
+ SDL_LOG_FATAL("Failed to init message system");
life_cycle->StopComponents();
- DEINIT_LOGGER();
+ SDL_DEINIT_LOGGER();
_exit(EXIT_FAILURE);
}
- LOG4CXX_INFO(logger_, "InitMessageBroker successful");
+ SDL_LOG_INFO("InitMessageBroker successful");
if (profile_instance.launch_hmi()) {
if (profile_instance.server_address() == kLocalHostAddress) {
- LOG4CXX_INFO(logger_, "Start HMI on localhost");
+ SDL_LOG_INFO("Start HMI on localhost");
#ifdef WEB_HMI
if (!InitHmi(profile_instance.link_to_web_hmi())) {
- LOG4CXX_INFO(logger_, "InitHmi successful");
+ SDL_LOG_INFO("InitHmi successful");
} else {
- LOG4CXX_WARN(logger_, "Failed to init HMI");
+ SDL_LOG_WARN("Failed to init HMI");
}
#endif
}
@@ -189,12 +200,12 @@ int32_t main(int32_t argc, char** argv) {
// --------------------------------------------------------------------------
life_cycle->Run();
- LOG4CXX_INFO(logger_, "Stop SDL due to caught signal");
+ SDL_LOG_INFO("Stop SDL due to caught signal");
life_cycle->StopComponents();
- LOG4CXX_INFO(logger_, "Application has been stopped successfuly");
+ SDL_LOG_INFO("Application has been stopped successfuly");
- DEINIT_LOGGER();
+ SDL_DEINIT_LOGGER();
return EXIT_SUCCESS;
}
diff --git a/src/appMain/sdl_preloaded_pt.json b/src/appMain/sdl_preloaded_pt.json
index 4f97d90b09..eff433fd1e 100644
--- a/src/appMain/sdl_preloaded_pt.json
+++ b/src/appMain/sdl_preloaded_pt.json
@@ -54,6 +54,15 @@
"NORMAL": 4,
"NONE": 0
},
+ "subtle_notifications_per_minute_by_priority": {
+ "EMERGENCY": 60,
+ "NAVIGATION": 20,
+ "PROJECTION": 20,
+ "VOICECOM": 30,
+ "COMMUNICATION": 15,
+ "NORMAL": 10,
+ "NONE": 0
+ },
"lock_screen_dismissal_enabled": true
},
"functional_groupings": {
@@ -84,6 +93,20 @@
"LIMITED"
]
},
+ "SubtleAlert": {
+ "hmi_levels": [
+ "FULL",
+ "LIMITED",
+ "BACKGROUND"
+ ]
+ },
+ "OnSubtleAlertPressed": {
+ "hmi_levels": [
+ "FULL",
+ "LIMITED",
+ "BACKGROUND"
+ ]
+ },
"ChangeRegistration": {
"hmi_levels": [
"BACKGROUND",
@@ -399,6 +422,20 @@
"LIMITED",
"BACKGROUND"
]
+ },
+ "OnUpdateFile": {
+ "hmi_levels": [
+ "FULL",
+ "LIMITED",
+ "BACKGROUND"
+ ]
+ },
+ "OnUpdateSubMenu": {
+ "hmi_levels": [
+ "FULL",
+ "LIMITED",
+ "BACKGROUND"
+ ]
}
}
},
@@ -506,7 +543,9 @@
"myKey",
"prndl",
"rpm",
- "steeringWheelAngle"
+ "steeringWheelAngle",
+ "gearStatus",
+ "handsOffSteering"
]
},
"OnVehicleData": {
@@ -523,7 +562,9 @@
"myKey",
"prndl",
"rpm",
- "steeringWheelAngle"
+ "steeringWheelAngle",
+ "gearStatus",
+ "handsOffSteering"
]
},
"SubscribeVehicleData": {
@@ -540,7 +581,9 @@
"myKey",
"prndl",
"rpm",
- "steeringWheelAngle"
+ "steeringWheelAngle",
+ "gearStatus",
+ "handsOffSteering"
]
},
"UnsubscribeVehicleData": {
@@ -557,7 +600,9 @@
"myKey",
"prndl",
"rpm",
- "steeringWheelAngle"
+ "steeringWheelAngle",
+ "gearStatus",
+ "handsOffSteering"
]
}
}
@@ -587,7 +632,9 @@
"odometer",
"tirePressure",
"vin",
- "wiperStatus"
+ "wiperStatus",
+ "stabilityControlsStatus",
+ "windowStatus"
]
},
"OnVehicleData": {
@@ -612,7 +659,9 @@
"odometer",
"tirePressure",
"vin",
- "wiperStatus"
+ "wiperStatus",
+ "stabilityControlsStatus",
+ "windowStatus"
]
},
"SubscribeVehicleData": {
@@ -636,7 +685,9 @@
"cloudAppVehicleID",
"odometer",
"tirePressure",
- "wiperStatus"
+ "wiperStatus",
+ "stabilityControlsStatus",
+ "windowStatus"
]
},
"UnsubscribeVehicleData": {
@@ -660,7 +711,9 @@
"cloudAppVehicleID",
"odometer",
"tirePressure",
- "wiperStatus"
+ "wiperStatus",
+ "stabilityControlsStatus",
+ "windowStatus"
]
}
}
@@ -1622,6 +1675,17 @@
]
}
}
+ },
+ "DialNumber": {
+ "rpcs": {
+ "DialNumber": {
+ "hmi_levels": [
+ "BACKGROUND",
+ "FULL",
+ "LIMITED"
+ ]
+ }
+ }
}
},
"consumer_friendly_messages": {
@@ -3334,13 +3398,17 @@
"type": "Float",
"mandatory": false,
"minvalue": -6,
- "maxvalue": 106
+ "maxvalue": 106,
+ "deprecated": true,
+ "since": "7.0"
},
{
"name": "fuelLevel_State",
"key": "OEM_REF_FUEL_LEV_ST",
"type": "ComponentVolumeStatus",
- "mandatory": false
+ "mandatory": false,
+ "deprecated": true,
+ "since": "7.0"
},
{
"name": "instantFuelConsumption",
@@ -3366,6 +3434,38 @@
"mandatory": false,
"minvalue": 0,
"maxvalue": 10000
+ },
+ {
+ "name": "level",
+ "key": "OEM_REF_FUEL_RAN_LVL",
+ "type": "Float",
+ "minvalue": -6,
+ "maxvalue": 1000000,
+ "mandatory": false,
+ "since": "7.0"
+ },
+ {
+ "name": "levelState",
+ "key": "OEM_REF_FUEL_RAN_LVL_STATE",
+ "type": "ComponentVolumeStatus",
+ "mandatory": false,
+ "since": "7.0"
+ },
+ {
+ "name": "capacity",
+ "key": "OEM_REF_FUEL_RAN_CAP",
+ "type": "Float",
+ "minvalue": 0,
+ "maxvalue": 1000000,
+ "mandatory": false,
+ "since": "7.0"
+ },
+ {
+ "name": "capacityUnit",
+ "key": "OEM_REF_FUEL_RAN_CAP_UNIT",
+ "type": "CapacityUnit",
+ "mandatory": false,
+ "since": "7.0"
}
],
"key": "OEM_REF_FUEL_RAN",
@@ -3403,7 +3503,36 @@
"name": "prndl",
"key": "OEM_REF_PRNDL",
"type": "PRNDL",
- "mandatory": false
+ "mandatory": false,
+ "since": "2.0",
+ "until": "7.0"
+ },
+ {
+ "name": "gearStatus",
+ "params": [
+ {
+ "name": "userSelectedGear",
+ "key": "OEM_REF_USER_GEAR",
+ "type": "PRNDL",
+ "mandatory": false
+ },
+ {
+ "name": "actualGear",
+ "key": "OEM_REF_ACT_GEAR",
+ "type": "PRNDL",
+ "mandatory": false
+ },
+ {
+ "name": "transmissionType",
+ "key": "OEM_REF_TR_TYPE",
+ "type": "TransmissionType",
+ "mandatory": false
+ }
+ ],
+ "key": "OEM_REF_GEAR_STATUS",
+ "type": "Struct",
+ "mandatory": false,
+ "since": "7.0"
},
{
"name": "tirePressure",
@@ -3908,6 +4037,27 @@
"since": "5.0"
},
{
+ "name": "stabilityControlsStatus",
+ "params": [
+ {
+ "name": "escSystem",
+ "key": "OEM_REF_ESC_SYSTEM",
+ "type": "VehicleDataStatus",
+ "mandatory": false
+ },
+ {
+ "name": "trailerSwayControl",
+ "key": "OEM_REF_TRAIL_SW_CTRL",
+ "type": "VehicleDataStatus",
+ "mandatory": false
+ }
+ ],
+ "key": "OEM_REF_STAB_CTRLS_ST",
+ "type": "Struct",
+ "mandatory": false,
+ "since": "7.0"
+ },
+ {
"name": "cloudAppVehicleID",
"key": "OEM_REF_CL_APP_VEH_ID",
"type": "String",
@@ -3915,6 +4065,102 @@
"since": "5.1"
},
{
+ "name": "windowStatus",
+ "params": [
+ {
+ "name": "location",
+ "params": [
+ {
+ "name": "col",
+ "key": "OEM_REF_WND_LOC_COL",
+ "type": "Integer",
+ "mandatory": true,
+ "minvalue": -1,
+ "maxvalue": 100
+ },
+ {
+ "name": "row",
+ "key": "OEM_REF_WND_LOC_ROW",
+ "type": "Integer",
+ "mandatory": true,
+ "minvalue": -1,
+ "maxvalue": 100
+ },
+ {
+ "name": "level",
+ "key": "OEM_REF_WND_LOC_LVL",
+ "type": "Integer",
+ "mandatory": false,
+ "defvalue" : "0",
+ "minvalue": -1,
+ "maxvalue": 100
+ },
+ {
+ "name": "colspan",
+ "key": "OEM_REF_WND_LOC_COLSPN",
+ "type": "Integer",
+ "mandatory": false,
+ "defvalue" : "1",
+ "minvalue": 1,
+ "maxvalue": 100
+ },
+ {
+ "name": "rowspan",
+ "key": "OEM_REF_WND_LOC_ROWSPN",
+ "type": "Integer",
+ "mandatory": false,
+ "defvalue" : "1",
+ "minvalue": 1,
+ "maxvalue": 100
+ },
+ {
+ "name": "levelspan",
+ "key": "OEM_REF_WND_LOC_LVLSPN",
+ "type": "Integer",
+ "mandatory": false,
+ "defvalue" : "1",
+ "minvalue": 1,
+ "maxvalue": 100
+ }
+ ],
+ "key": "OEM_REF_WND_LOC",
+ "type": "Struct",
+ "mandatory": true
+ },
+ {
+ "name": "state",
+ "params": [
+ {
+ "name": "approximatePosition",
+ "key": "OEM_REF_WND_STATE_APRPOS",
+ "type": "Integer",
+ "mandatory": true,
+ "minvalue": 0,
+ "maxvalue": 100
+ },
+ {
+ "name": "deviation",
+ "key": "OEM_REF_WND_STATE_DEV",
+ "type": "Integer",
+ "mandatory": true,
+ "minvalue": 0,
+ "maxvalue": 100
+ }
+ ],
+ "key": "OEM_REF_WND_STATE",
+ "type": "Struct",
+ "mandatory": true
+ }
+ ],
+ "key": "OEM_REF_WND_STATUS",
+ "array": true,
+ "type": "Struct",
+ "mandatory": false,
+ "minsize": 0,
+ "maxsize": 100,
+ "since": "7.0"
+ },
+ {
"name": "eCallInfo",
"params": [
{
@@ -4082,6 +4328,13 @@
"key": "OEM_REF_MY_KEY",
"type": "Struct",
"mandatory": false
+ },
+ {
+ "name": "handsOffSteering",
+ "key": "OEM_REF_HANDS_OFF_STRNG",
+ "type": "Boolean",
+ "mandatory": false,
+ "since": "7.0"
}
]
}
diff --git a/src/appMain/signal_handlers.cc b/src/appMain/signal_handlers.cc
index c9c09d10a2..5386cacc99 100644
--- a/src/appMain/signal_handlers.cc
+++ b/src/appMain/signal_handlers.cc
@@ -35,6 +35,6 @@
#include "utils/logger.h"
namespace main_namespace {
-CREATE_LOGGERPTR_GLOBAL(logger_, "SDLMain")
+SDL_CREATE_LOG_VARIABLE("SDLMain")
} // namespace main_namespace
diff --git a/src/appMain/smartDeviceLink.ini b/src/appMain/smartDeviceLink.ini
index 31302f24c6..0b27e6263a 100644
--- a/src/appMain/smartDeviceLink.ini
+++ b/src/appMain/smartDeviceLink.ini
@@ -51,6 +51,8 @@ ThreadStackSize = 20480
MixingAudioSupported = true
; In case HMI doesn’t send some capabilities to SDL, the values from the file are used by SDL
HMICapabilities = hmi_capabilities.json
+; Path to file containing cached response for UI.GetCapabilities/GetSupportedLanguages
+HMICapabilitiesCacheFile = hmi_capabilities_cache.json
; Maximum cmdId of VR command which may be registered on SDL
; Bigger value used for system VR commands processing by SDL
MaxCmdID = 2000000000
@@ -314,7 +316,8 @@ OpenAttemptTimeoutMsResumptionDB = 500
; Social, BackgroundProcess, Testing, System, Projection, RemoteControl,
; EmptyApp
; Possible transport types: TCP_WIFI, IAP_CARPLAY, IAP_USB_HOST_MODE, IAP_USB_DEVICE_MODE,
-; IAP_USB, AOA_USB, IAP_BLUETOOTH, SPP_BLUETOOTH
+; IAP_USB, AOA_USB, IAP_BLUETOOTH, SPP_BLUETOOTH, WEBSOCKET,
+; WEBENGINE
;
; The default behavior is to always enable resumption. If an AppHMIType is not listed in this
; section, resumption is enabled for an app with the AppHMIType.
diff --git a/src/appMain/start.sh b/src/appMain/start.sh
index ea6dea9d50..df867c75af 100644
--- a/src/appMain/start.sh
+++ b/src/appMain/start.sh
@@ -1,2 +1,18 @@
#!/bin/bash
-LD_LIBRARY_PATH=. ./smartDeviceLinkCore \ No newline at end of file
+trap close INT
+
+function close() {
+ $DIR/core.sh stop
+}
+
+DIR=$(dirname $0)
+CORE_PID_FILE=${DIR}/core.pid
+
+$DIR/core.sh start
+
+# Wait for the application to close
+CORE_PID=$(cat $CORE_PID_FILE)
+tail --pid=$CORE_PID -f /dev/null
+
+# Verify that the application closed sucessfully
+close > /dev/null
diff --git a/src/appMain/start_external_proprietary.sh b/src/appMain/start_external_proprietary.sh
deleted file mode 100644
index 35d4fe900c..0000000000
--- a/src/appMain/start_external_proprietary.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-pip3 list | grep -F tornado > /dev/null
-
-if [ $? -eq 1 ]
- then
- echo "Installing tornado python package"
- sudo -H pip3 install tornado
-fi
-
-echo "Starting Policy Manager"
-python3 sample_policy_manager.py --pack_port 8088 --unpack_port 8089 --add_http_header --encryption &
-POLICY_MANAGER=$!
-
-trap ctrl_c INT
-
-function ctrl_c() {
- echo "Stopping SmartDeviceLinkCore"
- kill -INT $POLICY_MANAGER
- kill -9 $POLICY_MANAGER
-}
-
-echo "Starting SmartDeviceLinkCore"
-LD_LIBRARY_PATH=. ./smartDeviceLinkCore
diff --git a/src/components/application_manager/include/application_manager/app_extension.h b/src/components/application_manager/include/application_manager/app_extension.h
index 5167aa88c0..3b1db4de57 100644
--- a/src/components/application_manager/include/application_manager/app_extension.h
+++ b/src/components/application_manager/include/application_manager/app_extension.h
@@ -33,15 +33,18 @@
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APP_EXTENSION_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APP_EXTENSION_H_
+#include <functional>
#include <memory>
-namespace ns_smart_device_link {
-namespace ns_smart_objects {
-class SmartObject;
-}
-} // namespace ns_smart_device_link
+#include "smart_objects/smart_object.h"
+
+namespace resumption {
+struct ResumptionRequest;
+class ResumptionDataProcessor;
+} // namespace resumption
namespace application_manager {
+namespace ns_smart = ns_smart_device_link::ns_smart_objects;
typedef int AppExtensionUID;
@@ -59,16 +62,23 @@ class AppExtension {
* @param resumption_data data reference to data, that will be appended by
* plugin
*/
- virtual void SaveResumptionData(
- ns_smart_device_link::ns_smart_objects::SmartObject& resumption_data) = 0;
+ virtual void SaveResumptionData(ns_smart::SmartObject& resumption_data) = 0;
/**
* @brief ProcessResumption Method called by SDL during resumption.
* @param resumption_data list of resumption data
+ * @param subscriber callbacks for subscribing
*/
virtual void ProcessResumption(
- const ns_smart_device_link::ns_smart_objects::SmartObject&
- resumption_data) = 0;
+ const ns_smart::SmartObject& resumption_data) = 0;
+
+ /**
+ * @brief RevertResumption Method called by SDL during revert resumption.
+ * @param resumption_data Resumption data in the SmartObject representation
+ * that contains subscription (VehicleInfo, RemoteControl, etc.)
+ */
+ virtual void RevertResumption(
+ const ns_smart::SmartObject& resumption_data) = 0;
private:
const AppExtensionUID kUid_;
diff --git a/src/components/application_manager/include/application_manager/application.h b/src/components/application_manager/include/application_manager/application.h
index e9dcf2bcb0..c08bb37082 100644
--- a/src/components/application_manager/include/application_manager/application.h
+++ b/src/components/application_manager/include/application_manager/application.h
@@ -348,7 +348,7 @@ class DynamicApplicationData {
/*
* @brief Finds command with the specified command id
*/
- virtual smart_objects::SmartObject* FindCommand(uint32_t cmd_id) = 0;
+ virtual smart_objects::SmartObject FindCommand(uint32_t cmd_id) = 0;
/*
* @brief Adds a menu to the application
@@ -364,12 +364,13 @@ class DynamicApplicationData {
/*
* @brief Finds menu with the specified id
*/
- virtual smart_objects::SmartObject* FindSubMenu(uint32_t menu_id) const = 0;
+ virtual smart_objects::SmartObject FindSubMenu(uint32_t menu_id) const = 0;
/*
* @brief Returns true if sub menu with such name already exist
*/
- virtual bool IsSubMenuNameAlreadyExist(const std::string& name) = 0;
+ virtual bool IsSubMenuNameAlreadyExist(const std::string& name,
+ const uint32_t parent_id) = 0;
/*
* @brief Adds a interaction choice set to the application
@@ -406,7 +407,7 @@ class DynamicApplicationData {
*
* @param choice_set_id Unique ID of the interaction choice set
*/
- virtual smart_objects::SmartObject* FindChoiceSet(uint32_t choice_set_id) = 0;
+ virtual smart_objects::SmartObject FindChoiceSet(uint32_t choice_set_id) = 0;
/*
* @brief Adds perform interaction choice set to the application
@@ -519,6 +520,10 @@ class DynamicApplicationData {
class Application : public virtual InitialApplicationData,
public virtual DynamicApplicationData {
public:
+ /**
+ * @brief The StreamingState enum defines current streaming state
+ */
+ enum class StreamingState { kStopped, kStarted, kSuspended };
enum ApplicationRegisterState { kRegistered = 0, kWaitingForRegistration };
Application() : is_greyed_out_(false) {}
@@ -609,6 +614,9 @@ class Application : public virtual InitialApplicationData,
virtual void set_mobile_projection_enabled(bool option) = 0;
virtual bool mobile_projection_enabled() const = 0;
+ virtual void set_webengine_projection_enabled(const bool option) = 0;
+ virtual bool webengine_projection_enabled() const = 0;
+
virtual bool video_streaming_approved() const = 0;
virtual void set_video_streaming_approved(bool state) = 0;
virtual bool audio_streaming_approved() const = 0;
@@ -656,10 +664,8 @@ class Application : public virtual InitialApplicationData,
/**
* @brief Wakes up streaming process for application
* @param service_type Type of streaming service
- * @param timer_len The amount of time in ms the timer will wait
*/
- virtual void WakeUpStreaming(protocol_handler::ServiceType service_type,
- uint32_t timer_len = 0) = 0;
+ virtual void WakeUpStreaming(protocol_handler::ServiceType service_type) = 0;
virtual bool is_voice_communication_supported() const = 0;
virtual void set_voice_communication_supported(
@@ -667,6 +673,8 @@ class Application : public virtual InitialApplicationData,
virtual bool app_allowed() const = 0;
virtual bool has_been_activated() const = 0;
virtual bool set_activated(bool is_active) = 0;
+ virtual bool is_ready() const = 0;
+ virtual bool set_is_ready(bool is_ready) = 0;
virtual const Version& version() const = 0;
virtual void set_hmi_application_id(uint32_t hmi_app_id) = 0;
diff --git a/src/components/application_manager/include/application_manager/application_data_impl.h b/src/components/application_manager/include/application_manager/application_data_impl.h
index 5f62c8d5b5..a64e0c8f33 100644
--- a/src/components/application_manager/include/application_manager/application_data_impl.h
+++ b/src/components/application_manager/include/application_manager/application_data_impl.h
@@ -174,7 +174,7 @@ class DynamicApplicationDataImpl : public virtual Application {
* @brief Finds command with the specified command id
* @param[in] cmd_id Command id
*/
- smart_objects::SmartObject* FindCommand(const uint32_t cmd_id);
+ smart_objects::SmartObject FindCommand(const uint32_t cmd_id) OVERRIDE;
/*
* @brief Adds a menu to the application
@@ -189,12 +189,13 @@ class DynamicApplicationDataImpl : public virtual Application {
/*
* @brief Finds menu with the specified id
*/
- smart_objects::SmartObject* FindSubMenu(uint32_t menu_id) const;
+ smart_objects::SmartObject FindSubMenu(uint32_t menu_id) const OVERRIDE;
/*
* @brief Returns true if sub menu with such name already exist
*/
- bool IsSubMenuNameAlreadyExist(const std::string& name);
+ bool IsSubMenuNameAlreadyExist(const std::string& name,
+ const uint32_t parent_id);
void SetWindowInfo(const WindowID window_id,
const smart_objects::SmartObject& window_info) OVERRIDE;
@@ -222,7 +223,7 @@ class DynamicApplicationDataImpl : public virtual Application {
*
* @param choice_set_id Unique ID of the interaction choice set
*/
- smart_objects::SmartObject* FindChoiceSet(uint32_t choice_set_id);
+ smart_objects::SmartObject FindChoiceSet(uint32_t choice_set_id) OVERRIDE;
/*
* @brief Adds perform interaction choice set to the application
@@ -329,14 +330,16 @@ class DynamicApplicationDataImpl : public virtual Application {
CommandsMap commands_;
mutable std::shared_ptr<sync_primitives::RecursiveLock> commands_lock_ptr_;
SubMenuMap sub_menu_;
- mutable std::shared_ptr<sync_primitives::Lock> sub_menu_lock_ptr_;
+ mutable std::shared_ptr<sync_primitives::RecursiveLock> sub_menu_lock_ptr_;
ChoiceSetMap choice_set_map_;
- mutable std::shared_ptr<sync_primitives::Lock> choice_set_map_lock_ptr_;
+ mutable std::shared_ptr<sync_primitives::RecursiveLock>
+ choice_set_map_lock_ptr_;
PerformChoiceSetMap performinteraction_choice_set_map_;
mutable std::shared_ptr<sync_primitives::RecursiveLock>
performinteraction_choice_set_lock_ptr_;
WindowParamsMap window_params_map_;
- mutable std::shared_ptr<sync_primitives::Lock> window_params_map_lock_ptr_;
+ mutable std::shared_ptr<sync_primitives::RecursiveLock>
+ window_params_map_lock_ptr_;
uint32_t is_perform_interaction_active_;
bool is_reset_global_properties_active_;
int32_t perform_interaction_mode_;
diff --git a/src/components/application_manager/include/application_manager/application_impl.h b/src/components/application_manager/include/application_manager/application_impl.h
index 185d700d58..88668a2505 100644
--- a/src/components/application_manager/include/application_manager/application_impl.h
+++ b/src/components/application_manager/include/application_manager/application_impl.h
@@ -113,7 +113,7 @@ class ApplicationImpl : public virtual Application,
inline bool is_navi() const {
return is_navi_;
}
- void set_is_navi(bool allow);
+ void set_is_navi(bool option);
virtual bool is_remote_control_supported() const;
@@ -123,6 +123,9 @@ class ApplicationImpl : public virtual Application,
bool mobile_projection_enabled() const;
+ void set_webengine_projection_enabled(const bool option) OVERRIDE;
+ bool webengine_projection_enabled() const OVERRIDE;
+
bool video_streaming_approved() const;
void set_video_streaming_approved(bool state);
bool audio_streaming_approved() const;
@@ -139,15 +142,15 @@ class ApplicationImpl : public virtual Application,
void StopStreamingForce(protocol_handler::ServiceType service_type);
void StopStreaming(protocol_handler::ServiceType service_type);
void SuspendStreaming(protocol_handler::ServiceType service_type);
- void WakeUpStreaming(protocol_handler::ServiceType service_type,
- uint32_t timer_len = 0);
+ void WakeUpStreaming(protocol_handler::ServiceType service_type);
virtual bool is_voice_communication_supported() const;
- virtual void set_voice_communication_supported(
- bool is_voice_communication_supported);
+ virtual void set_voice_communication_supported(bool option);
inline bool app_allowed() const;
bool has_been_activated() const;
bool set_activated(bool is_active);
+ bool is_ready() const;
+ bool set_is_ready(bool is_ready);
const Version& version() const;
void set_hmi_application_id(uint32_t hmi_app_id);
@@ -184,7 +187,7 @@ class ApplicationImpl : public virtual Application,
bool keep_context();
void set_version(const Version& ver);
void set_name(const custom_str::CustomString& name);
- void set_is_media_application(bool is_media);
+ void set_is_media_application(bool option);
void increment_put_file_in_none_count();
void increment_delete_file_in_none_count();
void increment_list_files_in_none_count();
@@ -565,6 +568,7 @@ class ApplicationImpl : public virtual Application,
bool is_navi_;
bool is_remote_control_supported_;
bool mobile_projection_enabled_;
+ bool webengine_projection_enabled_;
bool video_streaming_approved_;
bool audio_streaming_approved_;
@@ -579,6 +583,7 @@ class ApplicationImpl : public virtual Application,
bool is_app_allowed_;
bool is_app_data_resumption_allowed_;
bool has_been_activated_;
+ bool is_ready_;
bool tts_properties_in_none_;
bool tts_properties_in_full_;
bool keep_context_;
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 49059e4955..bda1e5f49e 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
@@ -35,6 +35,7 @@
#include <stdint.h>
#include <algorithm>
+#include <atomic>
#include <deque>
#include <map>
#include <memory>
@@ -132,7 +133,7 @@ struct AppIconInfo {
: endpoint(ws_endpoint), pending_request(pending) {}
};
-CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationManager")
+SDL_CREATE_LOG_VARIABLE("ApplicationManager")
typedef std::shared_ptr<timer::Timer> TimerSPtr;
class ApplicationManagerImpl
@@ -271,11 +272,28 @@ class ApplicationManagerImpl
/**
* @brief Checks if Application is subscribed for way points
- * @param Application pointer
+ * @param Application id
+ * @return true if Application is subscribed for way points
+ * otherwise false
+ */
+ bool IsAppSubscribedForWayPoints(uint32_t app_id) const OVERRIDE;
+
+ /**
+ * @brief Checks if Application is subscribed for way points
+ * @param Application reference
* @return true if Application is subscribed for way points
* otherwise false
*/
- bool IsAppSubscribedForWayPoints(ApplicationSharedPtr app) const OVERRIDE;
+ bool IsAppSubscribedForWayPoints(Application& app) const OVERRIDE;
+
+ void SaveWayPointsMessage(
+ smart_objects::SmartObjectSPtr way_points_message) OVERRIDE;
+
+ /**
+ * @brief Subscribe Application for way points
+ * @param Application id
+ */
+ void SubscribeAppForWayPoints(uint32_t app_id) OVERRIDE;
/**
* @brief Subscribe Application for way points
@@ -285,6 +303,12 @@ class ApplicationManagerImpl
/**
* @brief Unsubscribe Application for way points
+ * @param Application id
+ */
+ void UnsubscribeAppFromWayPoints(uint32_t app_id) OVERRIDE;
+
+ /**
+ * @brief Unsubscribe Application for way points
* @param Application pointer
*/
void UnsubscribeAppFromWayPoints(ApplicationSharedPtr app) OVERRIDE;
@@ -346,6 +370,9 @@ class ApplicationManagerImpl
ApplicationSharedPtr RegisterApplication(
const std::shared_ptr<smart_objects::SmartObject>&
request_for_registration) OVERRIDE;
+
+ void FinalizeAppRegistration(ApplicationSharedPtr application,
+ const uint32_t connection_key) OVERRIDE;
/*
* @brief Closes application by id
*
@@ -388,6 +415,7 @@ class ApplicationManagerImpl
* @brief Closes all registered applications
*/
void UnregisterAllApplications();
+
bool ActivateApplication(ApplicationSharedPtr app) OVERRIDE;
/**
@@ -400,7 +428,10 @@ class ApplicationManagerImpl
mobile_api::HMILevel::eType IsHmiLevelFullAllowed(ApplicationSharedPtr app);
void ConnectToDevice(const std::string& device_mac) OVERRIDE;
- void OnHMIStartedCooperation() OVERRIDE;
+
+ void OnHMIReady() OVERRIDE;
+
+ void RequestForInterfacesAvailability() OVERRIDE;
void DisconnectCloudApp(ApplicationSharedPtr app) OVERRIDE;
@@ -840,29 +871,16 @@ class ApplicationManagerImpl
void ForbidStreaming(uint32_t app_id,
protocol_handler::ServiceType service_type) OVERRIDE;
- /**
- * @brief Called when application completes streaming configuration
- * @param app_id Streaming application id
- * @param service_type Streaming service type
- * @param result true if configuration is successful, false otherwise
- * @param rejected_params list of rejected parameters' name. Valid
- * only when result is false.
- */
- void OnStreamingConfigured(
- uint32_t app_id,
- protocol_handler::ServiceType service_type,
- bool result,
- std::vector<std::string>& rejected_params) OVERRIDE;
+ void OnStreamingConfigurationSuccessful(
+ uint32_t app_id, protocol_handler::ServiceType service_type) OVERRIDE;
+
+ void OnStreamingConfigurationFailed(uint32_t app_id,
+ std::vector<std::string>& rejected_params,
+ const std::string& reason) OVERRIDE;
- /**
- * @brief Callback calls when application starts/stops data streaming
- * @param app_id Streaming application id
- * @param service_type Streaming service type
- * @param state Shows if streaming started or stopped
- */
void OnAppStreaming(uint32_t app_id,
protocol_handler::ServiceType service_type,
- bool state) OVERRIDE;
+ const Application::StreamingState new_state) OVERRIDE;
mobile_api::HMILevel::eType GetDefaultHmiLevel(
ApplicationConstSharedPtr application) const;
@@ -934,6 +952,7 @@ class ApplicationManagerImpl
*/
bool IsHMICooperating() const OVERRIDE;
+ void SetHMICooperating(const bool hmi_cooperating) OVERRIDE;
/**
* @brief Method used to send default app tts globalProperties
* in case they were not provided from mobile side after defined time
@@ -956,6 +975,13 @@ class ApplicationManagerImpl
*/
void RemoveAppFromTTSGlobalPropertiesList(const uint32_t app_id) OVERRIDE;
+ ResetGlobalPropertiesResult ResetGlobalProperties(
+ const smart_objects::SmartObject& global_properties_ids,
+ const uint32_t app_id) OVERRIDE;
+
+ ResetGlobalPropertiesResult ResetAllApplicationGlobalProperties(
+ const uint32_t app_id) OVERRIDE;
+
// TODO(AOleynik): Temporary added, to fix build. Should be reworked.
connection_handler::ConnectionHandler& connection_handler() const OVERRIDE;
protocol_handler::ProtocolHandler& protocol_handler() const OVERRIDE;
@@ -1195,21 +1221,6 @@ class ApplicationManagerImpl
smart_objects::SmartObject& vrSynonym);
/**
- * @brief Method transforms string to AppHMIType
- * @param str contains string AppHMIType
- * @return enum AppHMIType
- */
- mobile_apis::AppHMIType::eType StringToAppHMIType(std::string str);
-
- /**
- * @brief Returns a string representation of AppHMIType
- * @param type an enum value of AppHMIType
- * @return string representation of the enum value
- */
- const std::string AppHMITypeToString(
- mobile_apis::AppHMIType::eType type) const;
-
- /**
* @brief Method compares arrays of app HMI type
* @param from_policy contains app HMI type from policy
* @param from_application contains app HMI type from application
@@ -1226,17 +1237,15 @@ class ApplicationManagerImpl
const bool allow_unknown_parameters = false);
template <typename ApplicationList>
- void PrepareApplicationListSO(ApplicationList app_list,
+ void PrepareApplicationListSO(ApplicationList& app_list,
smart_objects::SmartObject& applications,
ApplicationManager& app_mngr) {
- CREATE_LOGGERPTR_LOCAL(logger_, "ApplicationManager");
-
smart_objects::SmartArray* app_array = applications.asArray();
uint32_t app_count = NULL == app_array ? 0 : app_array->size();
typename ApplicationList::const_iterator it;
for (it = app_list.begin(); it != app_list.end(); ++it) {
if (it->use_count() == 0) {
- LOG4CXX_ERROR(logger_, "Application not found ");
+ SDL_LOG_ERROR("Application not found");
continue;
}
@@ -1250,12 +1259,12 @@ class ApplicationManagerImpl
app_mngr)) {
applications[app_count++] = hmi_application;
} else {
- LOG4CXX_DEBUG(logger_, "Can't CreateHMIApplicationStruct ");
+ SDL_LOG_DEBUG("Can't CreateHMIApplicationStruct");
}
}
if (0 == app_count) {
- LOG4CXX_WARN(logger_, "Empty applications list");
+ SDL_LOG_WARN("Empty applications list");
}
}
@@ -1316,6 +1325,39 @@ class ApplicationManagerImpl
*/
void SendMobileMessage(smart_objects::SmartObjectSPtr message);
+ /**
+ * @brief Sets default value of the HELPPROMT global property
+ * to the first vrCommand of the Command Menu registered in application
+ *
+ * @param app Registered application
+ * @param is_timeout_promp Flag indicating that timeout prompt
+ * should be reset
+ *
+ * @return TRUE on success, otherwise FALSE
+ */
+ bool ResetHelpPromt(ApplicationSharedPtr app) const;
+
+ /**
+ * @brief Sets default value of the TIMEOUTPROMT global property
+ * to the first vrCommand of the Command Menu registered in application
+ *
+ * @param app Registered application
+ *
+ * @return TRUE on success, otherwise FALSE
+ */
+ bool ResetTimeoutPromt(ApplicationSharedPtr app) const;
+
+ /**
+ * @brief Sets default value of the VRHELPTITLE global property
+ * to the application name and value of the VRHELPITEMS global property
+ * to value equal to registered command -1(default command “Help / Cancel”.)
+ *
+ * @param app Registered application
+ *
+ * @return TRUE on success, otherwise FALSE
+ */
+ bool ResetVrHelpTitleItems(ApplicationSharedPtr app) const;
+
private:
/*
* NaviServiceStatusMap shows which navi service (audio/video) is opened
@@ -1340,6 +1382,16 @@ class ApplicationManagerImpl
const std::string& policy_app_id) const;
/**
+ * @brief CreateAllAppGlobalPropsIDList creates an array of all application
+ * global properties IDs. Used as utility to call
+ * ApplicationManger::ResetGlobalProperties
+ * with all global properties.
+ * @return array smart object with global properties identifiers.
+ */
+ const smart_objects::SmartObjectSPtr CreateAllAppGlobalPropsIDList(
+ const uint32_t app_id) const;
+
+ /**
* @brief Removes suspended and stopped timers from timer pool
*/
void ClearTimerPool();
@@ -1510,6 +1562,8 @@ class ApplicationManagerImpl
*/
std::set<uint32_t> subscribed_way_points_apps_list_;
+ smart_objects::SmartObjectSPtr way_points_data_;
+
/**
* @brief Map contains applications which
* will send TTS global properties to HMI after timeout
@@ -1589,7 +1643,6 @@ class ApplicationManagerImpl
sync_primitives::Lock close_app_timer_pool_lock_;
sync_primitives::Lock end_stream_timer_pool_lock_;
- mutable sync_primitives::RecursiveLock stopping_application_mng_lock_;
StateControllerImpl state_ctrl_;
std::unique_ptr<app_launch::AppLaunchData> app_launch_dto_;
std::unique_ptr<app_launch::AppLaunchCtrl> app_launch_ctrl_;
@@ -1623,7 +1676,7 @@ class ApplicationManagerImpl
std::atomic<bool> registered_during_timer_execution_;
- volatile bool is_stopping_;
+ std::atomic<bool> is_stopping_;
std::unique_ptr<CommandHolder> commands_holder_;
diff --git a/src/components/application_manager/include/application_manager/application_state.h b/src/components/application_manager/include/application_manager/application_state.h
index 8c4d2d49d6..9d80df0590 100644
--- a/src/components/application_manager/include/application_manager/application_state.h
+++ b/src/components/application_manager/include/application_manager/application_state.h
@@ -45,6 +45,7 @@ namespace application_manager {
typedef std::vector<WindowID> WindowIds;
typedef std::vector<HmiStatePtr> HmiStates;
typedef std::map<WindowID, HmiStates> HmiStatesMap;
+typedef std::map<WindowID, HmiStatePtr> HmiStateMap;
typedef std::vector<std::string> WindowNames;
typedef std::map<WindowID, std::string> WindowNamesMap;
@@ -143,6 +144,15 @@ class ApplicationState {
void RemoveHMIState(const WindowID window_id, HmiState::StateID state_id);
/**
+ * @brief EraseHMIState safely erases an HMI State from a window's HMIStates
+ * list
+ *
+ * @param hmi_states HMI States list.
+ * @param it Iterator pointing to element to be removed.
+ */
+ void EraseHMIState(HmiStates& hmi_states, HmiStates::iterator it);
+
+ /**
* @brief RemoveWindowHMIStates removes all HMI states related to specified
* window
* @param window_id window ID to remove
@@ -202,6 +212,16 @@ class ApplicationState {
*/
mutable sync_primitives::Lock hmi_states_map_lock_;
+ /**
+ * @brief Postponed states of application
+ */
+ HmiStateMap postponed_states_map_;
+
+ /**
+ * @brief postponed_states_map_lock_
+ */
+ mutable sync_primitives::Lock postponed_states_map_lock_;
+
DISALLOW_COPY_AND_ASSIGN(ApplicationState);
};
} // namespace application_manager
diff --git a/src/components/application_manager/include/application_manager/commands/command.h b/src/components/application_manager/include/application_manager/commands/command.h
index 0536c7aee1..a7241ce16d 100644
--- a/src/components/application_manager/include/application_manager/commands/command.h
+++ b/src/components/application_manager/include/application_manager/commands/command.h
@@ -98,6 +98,18 @@ class Command {
*/
virtual WindowID window_id() const = 0;
+ /**
+ * @brief Set warning info string, to be sent on a successful response
+ * @param info Warning info string
+ */
+ virtual void set_warning_info(const std::string info) = 0;
+
+ /**
+ * @brief Returns warning info string
+ * @return Warning info string
+ */
+ virtual std::string warning_info() const = 0;
+
/*
* @brief Function is called by RequestController when request execution time
* has exceed it's limit
diff --git a/src/components/application_manager/include/application_manager/commands/command_impl.h b/src/components/application_manager/include/application_manager/commands/command_impl.h
index 4af7f124fa..e3e30a9eff 100644
--- a/src/components/application_manager/include/application_manager/commands/command_impl.h
+++ b/src/components/application_manager/include/application_manager/commands/command_impl.h
@@ -122,6 +122,10 @@ class CommandImpl : public Command {
*/
WindowID window_id() const OVERRIDE;
+ void set_warning_info(const std::string info) OVERRIDE;
+
+ std::string warning_info() const OVERRIDE;
+
/*
* @brief Function is called by RequestController when request execution time
* has exceed it's limit
@@ -155,6 +159,14 @@ class CommandImpl : public Command {
static uint32_t CalcCommandInternalConsecutiveNumber(
application_manager::ApplicationConstSharedPtr app);
+ /**
+ * @brief Check syntax of string from mobile
+ * @param str - string that need to be checked
+ * @param allow_empty_string if true methods allow empty sting
+ * @return true if success otherwise return false
+ */
+ bool CheckSyntax(const std::string& str, bool allow_empty_line = false) const;
+
// members
static const int32_t hmi_protocol_type_;
static const int32_t mobile_protocol_type_;
@@ -197,13 +209,15 @@ class CommandImpl : public Command {
HMICapabilities& hmi_capabilities_;
policy::PolicyHandlerInterface& policy_handler_;
+ /**
+ * @brief warning_info_ Defines a warning message to send in the case of a
+ * successful response
+ */
+ std::string warning_info_;
+
CommandParametersPermissions parameters_permissions_;
CommandParametersPermissions removed_parameters_permissions_;
-#ifdef ENABLE_LOG
- static log4cxx::LoggerPtr logger_;
-#endif // ENABLE_LOG
-
private:
DISALLOW_COPY_AND_ASSIGN(CommandImpl);
};
diff --git a/src/components/application_manager/include/application_manager/commands/command_notification_impl.h b/src/components/application_manager/include/application_manager/commands/command_notification_impl.h
index 2274bc5f3b..2f6db37eb8 100644
--- a/src/components/application_manager/include/application_manager/commands/command_notification_impl.h
+++ b/src/components/application_manager/include/application_manager/commands/command_notification_impl.h
@@ -51,7 +51,14 @@ class CommandNotificationImpl : public CommandImpl {
virtual bool Init();
virtual bool CleanUp();
virtual void Run();
- void SendNotification();
+
+ /**
+ * @brief SendNotification Constructs the message with Message Type
+ * Notification and send it to mobile.
+ * @param final_message if true - connection to mobile will be closed
+ * after processing this message
+ */
+ void SendNotification(const bool final_message = false);
private:
DISALLOW_COPY_AND_ASSIGN(CommandNotificationImpl);
diff --git a/src/components/application_manager/include/application_manager/commands/command_request_impl.h b/src/components/application_manager/include/application_manager/commands/command_request_impl.h
index 08b1c9cf28..87c19ca1d1 100644
--- a/src/components/application_manager/include/application_manager/commands/command_request_impl.h
+++ b/src/components/application_manager/include/application_manager/commands/command_request_impl.h
@@ -166,14 +166,6 @@ class CommandRequestImpl : public CommandImpl,
const smart_objects::SmartObject* response_params = NULL,
const std::vector<uint8_t> binary_data = std::vector<uint8_t>());
- /**
- * @brief Check syntax of string from mobile
- * @param str - string that need to be checked
- * @param allow_empty_string if true methods allow empty sting
- * @return true if success otherwise return false
- */
- bool CheckSyntax(const std::string& str, bool allow_empty_line = false);
-
void SendProviderRequest(
const mobile_apis::FunctionID::eType& mobile_function_id,
const hmi_apis::FunctionID::eType& hmi_function_id,
@@ -388,7 +380,7 @@ class CommandRequestImpl : public CommandImpl,
* @param info string with disallowed params enumeration
* @param param disallowed param
*/
- void AddDissalowedParameterToInfoString(std::string& info,
+ void AddDisallowedParameterToInfoString(std::string& info,
const std::string& param) const;
/**
diff --git a/src/components/application_manager/include/application_manager/commands/request_to_hmi.h b/src/components/application_manager/include/application_manager/commands/request_to_hmi.h
index e8850fbe8d..3057476937 100644
--- a/src/components/application_manager/include/application_manager/commands/request_to_hmi.h
+++ b/src/components/application_manager/include/application_manager/commands/request_to_hmi.h
@@ -74,6 +74,21 @@ class RequestToHMI : public CommandImpl {
virtual void Run();
void SendRequest();
+ /**
+ * @brief Updates required requests that should be send to the HMI to get
+ * required HMI capabilities
+ * @param interface_name Interface name (e.g. UI, TTS, VR, RC or VehicleInfo)
+ */
+ void UpdateRequiredInterfaceCapabilitiesRequests(
+ const std::string& interface_name);
+
+ /**
+ * @brief According to the specified interface sends appropriate requests to
+ * HMI for fetching of capabilities
+ * @param interface_name Interface name (e.g. UI, TTS, VR, RC or VehicleInfo)
+ */
+ void RequestInterfaceCapabilities(const char* interface_name);
+
/*
* @brief Retrieves application ID
*/
@@ -83,6 +98,22 @@ class RequestToHMI : public CommandImpl {
private:
DISALLOW_COPY_AND_ASSIGN(RequestToHMI);
+
+ /**
+ * @brief Updates required requests that should be send to
+ * the HMI to get required HMI capabilities according to the passed function
+ * ids
+ * @param requests_to_send_to_hmi Collection of the function ids
+ */
+ void UpdateRequestsRequiredForCapabilities(
+ const std::set<hmi_apis::FunctionID::eType>& requests_to_send_to_hmi);
+
+ /**
+ * @brief Sends request to HMI for fetching of capabilities according to the
+ * passed function ids
+ */
+ void RequestCapabilities(
+ const std::set<hmi_apis::FunctionID::eType>& requests_to_send_to_hmi);
};
} // namespace commands
diff --git a/src/components/application_manager/include/application_manager/display_capabilities_builder.h b/src/components/application_manager/include/application_manager/display_capabilities_builder.h
index 529c9a32c1..6810bfee8c 100644
--- a/src/components/application_manager/include/application_manager/display_capabilities_builder.h
+++ b/src/components/application_manager/include/application_manager/display_capabilities_builder.h
@@ -68,6 +68,16 @@ class DisplayCapabilitiesBuilder {
const smart_objects::SmartObject& display_capabilities);
/**
+ * @brief IsWaitingForWindowCapabilities checks wheter builder is waiting for
+ * a capabilities notification for at least one window or not
+ * @param incoming_display_capabilities capabilities to analyze
+ * @return true if builder is waiting for capabilities for at least one
+ * window, otherwise returns false
+ */
+ bool IsWaitingForWindowCapabilities(
+ const smart_objects::SmartObject& incoming_display_capabilities) const;
+
+ /**
* @brief ResetDisplayCapabilities resets stored notification
*/
void ResetDisplayCapabilities();
@@ -84,13 +94,29 @@ class DisplayCapabilitiesBuilder {
*/
const smart_objects::SmartObjectSPtr display_capabilities() const;
+ /**
+ * @brief IsWindowResumptionNeeded checks that is there a need for
+ * resumption of windows (except main window)
+ * @return true if data about windows to be resumed was saved in window_info,
+ * otherwise returns false
+ */
+
+ bool IsWindowResumptionNeeded() const;
+
private:
+ /**
+ * @brief InvokeResumeCallback invokes resume callback function if all
+ * required criteria is met
+ */
+ void InvokeResumeCallback();
+
smart_objects::SmartObjectSPtr display_capabilities_;
typedef std::set<WindowID> WindowIDsToResume;
WindowIDsToResume window_ids_to_resume_;
Application& owner_;
ResumeCallback resume_callback_;
- sync_primitives::Lock display_capabilities_lock_;
+ mutable sync_primitives::Lock display_capabilities_lock_;
+ bool is_widget_windows_resumption_;
};
} // namespace application_manager
#endif
diff --git a/src/components/application_manager/include/application_manager/hmi_capabilities_impl.h b/src/components/application_manager/include/application_manager/hmi_capabilities_impl.h
index b7f41ca297..0bc98827c8 100644
--- a/src/components/application_manager/include/application_manager/hmi_capabilities_impl.h
+++ b/src/components/application_manager/include/application_manager/hmi_capabilities_impl.h
@@ -38,40 +38,27 @@
#include "interfaces/HMI_API.h"
#include "interfaces/MOBILE_API.h"
#include "json/json.h"
-#include "smart_objects/smart_object.h"
#include "utils/macro.h"
+#include "utils/rwlock.h"
namespace application_manager {
class ApplicationManager;
class HMICapabilitiesImpl : public HMICapabilities {
public:
- /*
+ /**
* @ Class constructor
- *
* @param app_mngr Application manager pointer
*/
explicit HMICapabilitiesImpl(ApplicationManager& app_mngr);
- /*
+ /**
* @brief Class destructor
- *
*/
virtual ~HMICapabilitiesImpl();
- /*
- * @brief Checks is image type(Static/Dynamic) requested by
- * Mobile Device is supported on current HMI.
- * @param image_type recieved type of image from Enum.
- * @return Bool true if supported
- */
bool VerifyImageType(const int32_t image_type) const OVERRIDE;
- /**
- * @brief Checks if all HMI capabilities received
- *
- * @return TRUE if all information received, otherwise FALSE
- */
bool is_vr_cooperating() const OVERRIDE;
void set_is_vr_cooperating(const bool value) OVERRIDE;
@@ -90,365 +77,139 @@ class HMICapabilitiesImpl : public HMICapabilities {
bool is_rc_cooperating() const OVERRIDE;
void set_is_rc_cooperating(const bool value) OVERRIDE;
- /*
- * @brief Interface used to store information about software version of the
- *target
- *
- * @param ccpu_version Received system/hmi software version
- */
void set_ccpu_version(const std::string& ccpu_version) OVERRIDE;
- /*
- * @brief Returns software version of the target
- *
- * @return TRUE if it supported, otherwise FALSE
- */
const std::string& ccpu_version() const OVERRIDE;
- /*
- * @brief Retrieves if mixing audio is supported by HMI
- * (ie recording TTS command and playing audio)
- *
- * @return Current state of the mixing audio flag
- */
bool attenuated_supported() const OVERRIDE;
- /*
- * @brief Sets state for mixing audio
- *
- * @param state New state to be set
- */
void set_attenuated_supported(const bool state) OVERRIDE;
- /*
- * @brief Retrieves currently active UI language
- *
- * @return Currently active UI language
- */
const hmi_apis::Common_Language::eType active_ui_language() const OVERRIDE;
- /*
- * @brief Sets currently active UI language
- *
- * @param language Currently active UI language
- */
void set_active_ui_language(
const hmi_apis::Common_Language::eType language) OVERRIDE;
- /*
- * @brief Retrieves UI supported languages
- *
- * @return Currently supported UI languages
- */
- const smart_objects::SmartObject* ui_supported_languages() const OVERRIDE;
+ const smart_objects::SmartObjectSPtr ui_supported_languages() const OVERRIDE;
- /*
- * @brief Sets supported UI languages
- *
- * @param supported_languages Supported UI languages
- */
void set_ui_supported_languages(
const smart_objects::SmartObject& supported_languages) OVERRIDE;
- /*
- * @brief Retrieves currently active VR language
- *
- * @return Currently active VR language
- */
const hmi_apis::Common_Language::eType active_vr_language() const OVERRIDE;
- /*
- * @brief Sets currently active VR language
- *
- * @param language Currently active VR language
- */
void set_active_vr_language(
const hmi_apis::Common_Language::eType language) OVERRIDE;
- /*
- * @brief Retrieves VR supported languages
- *
- * @return Currently supported VR languages
- */
- const smart_objects::SmartObject* vr_supported_languages() const OVERRIDE;
+ const smart_objects::SmartObjectSPtr vr_supported_languages() const OVERRIDE;
- /*
- * @brief Sets supported VR languages
- *
- * @param supported_languages Supported VR languages
- */
void set_vr_supported_languages(
const smart_objects::SmartObject& supported_languages) OVERRIDE;
- /*
- * @brief Retrieves currently active TTS language
- *
- * @return Currently active TTS language
- */
const hmi_apis::Common_Language::eType active_tts_language() const OVERRIDE;
- /*
- * @brief Sets currently active TTS language
- *
- * @param language Currently active TTS language
- */
void set_active_tts_language(
const hmi_apis::Common_Language::eType language) OVERRIDE;
- /*
- * @brief Retrieves TTS supported languages
- *
- * @return Currently supported TTS languages
- */
- const smart_objects::SmartObject* tts_supported_languages() const OVERRIDE;
+ const smart_objects::SmartObjectSPtr tts_supported_languages() const OVERRIDE;
- /*
- * @brief Sets supported TTS languages
- *
- * @param supported_languages Supported TTS languages
- */
void set_tts_supported_languages(
const smart_objects::SmartObject& supported_languages) OVERRIDE;
- /*
- * @brief Retrieves information about the display capabilities
- *
- * @return Currently supported display capabilities
- */
const smart_objects::SmartObjectSPtr display_capabilities() const OVERRIDE;
- /*
- * @brief Sets supported display capabilities
- *
- * @param display_capabilities supported display capabilities
- */
void set_display_capabilities(
const smart_objects::SmartObject& display_capabilities) OVERRIDE;
- /*
- * @brief Retrieves information about the display capability
- * @return Currently supported display capability
- */
const smart_objects::SmartObjectSPtr system_display_capabilities()
const OVERRIDE;
- /*
- * @brief Sets supported display capability
- * @param display_capabilities supported display capability
- */
void set_system_display_capabilities(
const smart_objects::SmartObject& display_capabilities);
- /*
- * @brief Retrieves information about the HMI zone capabilities
- *
- * @return Currently supported HMI zone capabilities
- */
const smart_objects::SmartObjectSPtr hmi_zone_capabilities() const OVERRIDE;
- /*
- * @brief Sets supported HMI zone capabilities
- *
- * @param hmi_zone_capabilities supported HMI zone capabilities
- */
void set_hmi_zone_capabilities(
const smart_objects::SmartObject& hmi_zone_capabilities) OVERRIDE;
- /*
- * @brief Retrieves information about the SoftButton's capabilities
- *
- * @return Currently supported SoftButton's capabilities
- */
const smart_objects::SmartObjectSPtr soft_button_capabilities()
const OVERRIDE;
- /*
- * @brief Sets supported SoftButton's capabilities
- *
- * @param soft_button_capabilities supported SoftButton's capabilities
- */
void set_soft_button_capabilities(
const smart_objects::SmartObject& soft_button_capabilities) OVERRIDE;
- /*
- * @brief Retrieves information about the Button's capabilities
- *
- * @return Currently supported Button's capabilities
- */
const smart_objects::SmartObjectSPtr button_capabilities() const OVERRIDE;
- /*
- * @brief Sets supported Button's capabilities
- *
- * @param soft_button_capabilities supported Button's capabilities
- */
void set_button_capabilities(
const smart_objects::SmartObject& button_capabilities) OVERRIDE;
- /*
- * @brief Sets supported speech capabilities
- *
- * @param speech_capabilities supported speech capabilities
- */
void set_speech_capabilities(
const smart_objects::SmartObject& speech_capabilities) OVERRIDE;
- /*
- * @brief Retrieves information about the speech capabilities
- *
- * @return Currently supported speech capabilities
- */
const smart_objects::SmartObjectSPtr speech_capabilities() const OVERRIDE;
- /*
- * @brief Sets supported VR capabilities
- *
- * @param vr_capabilities supported VR capabilities
- */
void set_vr_capabilities(
const smart_objects::SmartObject& vr_capabilities) OVERRIDE;
- /*
- * @brief Retrieves information about the VR capabilities
- *
- * @return Currently supported VR capabilities
- */
const smart_objects::SmartObjectSPtr vr_capabilities() const OVERRIDE;
- /*
- * @brief Sets supported audio_pass_thru capabilities
- *
- * @param vr_capabilities supported audio_pass_thru capabilities
- */
void set_audio_pass_thru_capabilities(
const smart_objects::SmartObject& audio_pass_thru_capabilities) OVERRIDE;
- /*
- * @brief Retrieves information about the audio_pass_thru capabilities
- *
- * @return Currently supported audio_pass_thru capabilities
- */
const smart_objects::SmartObjectSPtr audio_pass_thru_capabilities()
const OVERRIDE;
- /*
- * @brief Sets supported pcm_stream capabilities
- *
- * @param supported pcm_stream capabilities
- */
void set_pcm_stream_capabilities(
const smart_objects::SmartObject& pcm_stream_capabilities) OVERRIDE;
- /*
- * @brief Retrieves information about the pcm_stream capabilities
- *
- * @return Currently supported pcm_streaming capabilities
- */
const smart_objects::SmartObjectSPtr pcm_stream_capabilities() const OVERRIDE;
- /*
- * @brief Retrieves information about the preset bank capabilities
- *
- * @return Currently supported preset bank capabilities
- */
const smart_objects::SmartObjectSPtr preset_bank_capabilities()
const OVERRIDE;
- /*
- * @brief Sets supported preset bank capabilities
- *
- * @param soft_button_capabilities supported preset bank capabilities
- */
void set_preset_bank_capabilities(
const smart_objects::SmartObject& preset_bank_capabilities) OVERRIDE;
- /*
- * @brief Sets vehicle information(make, model, modelYear)
- *
- * @param vehicle_type Cuurent vehicle information
- */
void set_vehicle_type(
const smart_objects::SmartObject& vehicle_type) OVERRIDE;
- /*
- * @brief Retrieves vehicle information(make, model, modelYear)
- *
- * @param vehicle_type Cuurent vehicle information
- */
const smart_objects::SmartObjectSPtr vehicle_type() const OVERRIDE;
- /*
- * @brief Retrieves information about the prerecorded speech
- *
- * @return Currently supported prerecorded speech
- */
const smart_objects::SmartObjectSPtr prerecorded_speech() const OVERRIDE;
- /*
- * @brief Sets supported prerecorded speech
- *
- * @param prerecorded_speech supported prerecorded speech
- */
void set_prerecorded_speech(
const smart_objects::SmartObject& prerecorded_speech) OVERRIDE;
- /*
- * @brief Interface used to store information if navigation
- * supported by the system
- *
- * @param supported Indicates if navigation supported by the system
- */
void set_navigation_supported(const bool supported) OVERRIDE;
- /*
- * @brief Retrieves information if navi supported by the system
- *
- * @return TRUE if it supported, otherwise FALSE
- */
bool navigation_supported() const OVERRIDE;
- /*
- * @brief Interface used to store information if phone call
- * supported by the system
- *
- * @param supported Indicates if navigation supported by the sustem
- */
void set_phone_call_supported(const bool supported) OVERRIDE;
- /*
- * @brief Retrieves information if phone call supported by the system
- *
- * @return TRUE if it supported, otherwise FALSE
- */
bool phone_call_supported() const OVERRIDE;
- /*
- * @brief Interface to store whether HMI supports video streaming
- *
- * @param supported Indicates whether video streaming is supported by HMI
- */
void set_video_streaming_supported(const bool supported) OVERRIDE;
- /*
- * @brief Retrieves whether HMI supports video streaming
- *
- * @return TRUE if it supported, otherwise FALSE
- */
bool video_streaming_supported() const OVERRIDE;
+ void set_rc_supported(const bool supported) OVERRIDE;
+
+ bool rc_supported() const OVERRIDE;
+
/*
- * @brief Interface to store whether HMI supports remote control
+ * @brief Interface to store whether HMI supports driver distraction menu
+ * limits
*
- * @param supported Indicates whether video streaming is supported by HMI
+ * @param supported Indicates whether driver distraction menu limits is
+ * supported by HMI
*/
- void set_rc_supported(const bool supported) OVERRIDE;
+ void set_driver_distraction_supported(const bool supported) OVERRIDE;
/*
- * @brief Retrieves whether HMI supports remote control
+ * @brief Retrieves whether HMI supports driver distraction menu limits
*
* @return TRUE if it supported, otherwise FALSE
*/
- bool rc_supported() const OVERRIDE;
+ bool driver_distraction_supported() const OVERRIDE;
/*
* @brief Interface used to store information regarding
@@ -460,121 +221,224 @@ class HMICapabilitiesImpl : public HMICapabilities {
void set_navigation_capability(
const smart_objects::SmartObject& navigation_capability) OVERRIDE;
- /*
- * @brief Retrieves information regarding the navigation system capability
- *
- * @return NAVIGATION system capability
- */
- const smart_objects::SmartObject* navigation_capability() const OVERRIDE;
+ const smart_objects::SmartObjectSPtr navigation_capability() const OVERRIDE;
- /*
- * @brief Interface used to store information regarding
- * the phone "System Capability"
- *
- * @param phone_capability contains information related
- * to the phone system capability.
- */
void set_phone_capability(
const smart_objects::SmartObject& phone_capability) OVERRIDE;
- /*
- * @brief Retrieves information regarding the phone call system capability
- *
- * @return PHONE_CALL system capability
- */
-
- const smart_objects::SmartObject* phone_capability() const OVERRIDE;
+ const smart_objects::SmartObjectSPtr phone_capability() const OVERRIDE;
- /*
- * @brief Sets HMI's video streaming related capability information
- *
- * @param video_streaming_capability the video streaming related capabilities
- */
void set_video_streaming_capability(
const smart_objects::SmartObject& video_streaming_capability) OVERRIDE;
- /*
- * @brief Retrieves HMI's video streaming related capabilities
- *
- * @return HMI's video streaming related capability information
- */
- const smart_objects::SmartObject* video_streaming_capability() const OVERRIDE;
+ const smart_objects::SmartObjectSPtr video_streaming_capability()
+ const OVERRIDE;
void set_rc_capability(
const smart_objects::SmartObject& rc_capability) OVERRIDE;
- const smart_objects::SmartObject* rc_capability() const OVERRIDE;
+ const smart_objects::SmartObjectSPtr rc_capability() const OVERRIDE;
+
+ void set_driver_distraction_capability(
+ const smart_objects::SmartObject& driver_distraction_capability) OVERRIDE;
+
+ const smart_objects::SmartObjectSPtr driver_distraction_capability()
+ const OVERRIDE;
void set_seat_location_capability(
const smart_objects::SmartObject& seat_location_capability) OVERRIDE;
- const smart_objects::SmartObject* seat_location_capability() const OVERRIDE;
+ const smart_objects::SmartObjectSPtr seat_location_capability()
+ const OVERRIDE;
void Init(resumption::LastStateWrapperPtr last_state_wrapper) OVERRIDE;
DEPRECATED
void Init(resumption::LastState* last_state) OVERRIDE;
- /*
- * @brief return component which follows for correctness of
- * languages
- * @return HMI language handler
- */
HMILanguageHandler& get_hmi_language_handler() OVERRIDE;
- /**
- * @brief Trigger waiting for response
- * @param request Request object
- */
void set_handle_response_for(
const smart_objects::SmartObject& request) OVERRIDE;
+ bool SaveCachedCapabilitiesToFile(
+ const std::string& interface_name,
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema) OVERRIDE;
+
+ bool DeleteCachedCapabilitiesFile() const OVERRIDE;
+
+ bool IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::eType function_id) const OVERRIDE;
+
+ void UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::eType requested_interface) OVERRIDE;
+
+ void OnSoftwareVersionReceived(const std::string& ccpu_version) OVERRIDE;
+
+ void UpdateCachedCapabilities() OVERRIDE;
+
protected:
- /*
+ /**
* @brief Loads capabilities from local file in case SDL was launched
* without HMI
*
* @return TRUE if capabilities loaded successfully, otherwise FALSE.
*/
- bool load_capabilities_from_file();
-
- /*
- * @brief function checks if json member exists
- *
- * @param json_member from file hmi_capabilities.json
- * @param name_of_member name which we should check
- * hmi_capabilities.json
- *
- * @returns TRUE if member exists and returns FALSE if
- * member does not exist.
- */
- bool check_existing_json_member(const Json::Value& json_member,
- const char* name_of_member) const OVERRIDE;
+ bool LoadCapabilitiesFromFile();
- /*
+ /**
* @brief function converts json object "languages" to smart object
- *
* @param json_languages from file hmi_capabilities.json
* @param languages - the converted object
*
*/
void convert_json_languages_to_obj(
const Json::Value& json_languages,
- smart_objects::SmartObject& languages) const OVERRIDE;
+ smart_objects::SmartObject& languages) const;
- /*
+ /**
* @brief function that converts a single entry of audio pass thru capability
* to smart object
- *
* @param capability json object that represents a single entry of audio pass
* thru capability
* @param output_so the converted object
*/
void convert_audio_capability_to_obj(
const Json::Value& capability,
- smart_objects::SmartObject& output_so) const OVERRIDE;
+ smart_objects::SmartObject& output_so) const;
private:
+ /**
+ * @brief Checks are all updating fields are currently saved in the JSON
+ * structure
+ * @param root_node reference to root node of JSON structure
+ * @param interface_name name of interface to check
+ * @param sections_to_check reference to list of fields to check
+ * @return true if all fields from the list are saved in the JSON structure,
+ * otherwise returns false
+ */
+ bool AllFieldsSaved(const Json::Value& root_node,
+ const std::string& interface_name,
+ const std::vector<std::string>& sections_to_check) const;
+
+ /**
+ * @brief Remove received interface from default initialized capabilities
+ * @param requested_interface interface which should be removed
+ */
+ void RemoveFromRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::eType requested_interface);
+
+ /**
+ * @brief Gets the currently active language depending on interface
+ * @param interface_name name of interface of currently active language
+ * @return active language for specified interface
+ *
+ */
+ hmi_apis::Common_Language::eType GetActiveLanguageForInterface(
+ const std::string& interface_name) const;
+
+ /**
+ * @brief Prepares specified JSON structure according to sections which
+ * should be updated
+ * @param interface_name name of interface to prepare
+ * @param sections_to_update reference to list of fields to update
+ * @param schema reference to schema which should be unapplied before field
+ * updating
+ * @param out_root_node reference to JSON structure to update
+ */
+ void PrepareJsonValueForSaving(
+ const char* interface_name,
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema,
+ Json::Value& out_root_node) const;
+
+ /**
+ * @brief Prepares specified JSON structure for UI interface according to
+ * sections which should be updated
+ * @param sections_to_update reference to list of fields to update
+ * @param schema reference to schema which should be unapplied before field
+ * updating
+ * @param out_node reference to JSON structure to update
+ */
+ void PrepareUiJsonValueForSaving(
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema,
+ Json::Value& out_node) const;
+
+ /**
+ * @brief Prepares specified JSON structure for VR interface according to
+ * sections which should be updated
+ * @param sections_to_update reference to list of fields to update
+ * @param schema reference to schema which should be unapplied before field
+ * updating
+ * @param out_node reference to JSON structure to update
+ */
+ void PrepareVrJsonValueForSaving(
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema,
+ Json::Value& out_node) const;
+
+ /**
+ * @brief Prepares specified JSON structure for TTS interface according to
+ * sections which should be updated
+ * @param sections_to_update reference to list of fields to update
+ * @param schema reference to schema which should be unapplied before field
+ * updating
+ * @param out_node reference to JSON structure to update
+ */
+ void PrepareTtsJsonValueForSaving(
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema,
+ Json::Value& out_node) const;
+
+ /**
+ * @brief Prepares specified JSON structure for Buttons interface according to
+ * sections which should be updated
+ * @param sections_to_update reference to list of fields to update
+ * @param schema reference to schema which should be unapplied before field
+ * updating
+ * @param out_node reference to JSON structure to update
+ */
+ void PrepareButtonsJsonValueForSaving(
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema,
+ Json::Value& out_node) const;
+
+ /**
+ * @brief Prepares specified JSON structure for VehicleInfo interface
+ * according to sections which should be updated
+ * @param sections_to_update reference to list of fields to update
+ * @param schema reference to schema which should be unapplied before field
+ * updating
+ * @param out_node reference to JSON structure to update
+ */
+ void PrepareVehicleInfoJsonValueForSaving(
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema,
+ Json::Value& out_node) const;
+
+ /**
+ * @brief Prepares specified JSON structure for RC interface according to
+ * sections which should be updated
+ * @param sections_to_update reference to list of fields to update
+ * @param schema reference to schema which should be unapplied before field
+ * updating
+ * @param out_node reference to JSON structure to update
+ */
+ void PrepareRCJsonValueForSaving(
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema,
+ Json::Value& out_node) const;
+
+ /**
+ * @brief Adds appropriate request IDs to the requested required collection
+ * according to an interface name
+ * @param interface_name An interface name which requests required to send to
+ * the HMI
+ */
+ void AddRequiredRequestsForCapabilities(const std::string& interface_name);
+
bool is_vr_cooperating_;
bool is_tts_cooperating_;
bool is_ui_cooperating_;
@@ -587,9 +451,9 @@ class HMICapabilitiesImpl : public HMICapabilities {
hmi_apis::Common_Language::eType vr_language_;
hmi_apis::Common_Language::eType tts_language_;
smart_objects::SmartObjectSPtr vehicle_type_;
- smart_objects::SmartObject* ui_supported_languages_;
- smart_objects::SmartObject* tts_supported_languages_;
- smart_objects::SmartObject* vr_supported_languages_;
+ smart_objects::SmartObjectSPtr ui_supported_languages_;
+ smart_objects::SmartObjectSPtr tts_supported_languages_;
+ smart_objects::SmartObjectSPtr vr_supported_languages_;
/*
* display_capabilities_ is deprecated and replaced by
* system_display_capabilities_. For backward compatibility
@@ -610,16 +474,21 @@ class HMICapabilitiesImpl : public HMICapabilities {
bool is_phone_call_supported_;
bool is_video_streaming_supported_;
bool is_rc_supported_;
+ bool is_driver_distraction_supported_;
std::string ccpu_version_;
- smart_objects::SmartObject* navigation_capability_;
- smart_objects::SmartObject* phone_capability_;
- smart_objects::SmartObject* video_streaming_capability_;
- smart_objects::SmartObject* rc_capability_;
- smart_objects::SmartObject* seat_location_capability_;
+ smart_objects::SmartObjectSPtr navigation_capability_;
+ smart_objects::SmartObjectSPtr phone_capability_;
+ smart_objects::SmartObjectSPtr video_streaming_capability_;
+ smart_objects::SmartObjectSPtr rc_capability_;
+ smart_objects::SmartObjectSPtr driver_distraction_capability_;
+ smart_objects::SmartObjectSPtr seat_location_capability_;
ApplicationManager& app_mngr_;
HMILanguageHandler hmi_language_handler_;
+ mutable sync_primitives::RWLock hmi_capabilities_lock_;
+ std::set<hmi_apis::FunctionID::eType> requests_required_for_capabilities_;
+
DISALLOW_COPY_AND_ASSIGN(HMICapabilitiesImpl);
};
diff --git a/src/components/application_manager/include/application_manager/hmi_state.h b/src/components/application_manager/include/application_manager/hmi_state.h
index 5b9e201391..e3a9784346 100644
--- a/src/components/application_manager/include/application_manager/hmi_state.h
+++ b/src/components/application_manager/include/application_manager/hmi_state.h
@@ -117,10 +117,27 @@ class HmiState {
*/
virtual mobile_apis::HMILevel::eType hmi_level() const {
if (parent_) {
- return parent_->hmi_level();
+ if (mobile_apis::HMILevel::INVALID_ENUM == hmi_level_) {
+ return parent_->hmi_level();
+ }
+ // Higher values correlate to lower states
+ // (FULL = 0, LIMITED = 1, etc.)
+ return std::max(parent_->max_hmi_level(), hmi_level_);
}
return hmi_level_;
}
+
+ /**
+ * @brief max_hmi_level
+ * @return return maximum hmi level for app
+ */
+ virtual mobile_apis::HMILevel::eType max_hmi_level() const {
+ if (parent_) {
+ return parent_->max_hmi_level();
+ }
+ return mobile_apis::HMILevel::HMI_FULL;
+ }
+
/**
* @brief set_hmi_level set hmi_level member
* @param hmi_level hmi level to setup
@@ -136,24 +153,62 @@ class HmiState {
virtual mobile_apis::AudioStreamingState::eType audio_streaming_state()
const {
if (parent_) {
- return parent_->audio_streaming_state();
+ if (mobile_apis::AudioStreamingState::INVALID_ENUM ==
+ audio_streaming_state_) {
+ return parent_->audio_streaming_state();
+ }
+ // Higher values correlate to lower states
+ // (AUDIBLE = 0, ATTENUATED = 1, etc.)
+ return std::max(parent_->max_audio_streaming_state(),
+ audio_streaming_state_);
}
return audio_streaming_state_;
}
/**
+ * @brief max_audio_streaming_state
+ * @return return maximum audio streaming state for app
+ */
+ virtual mobile_apis::AudioStreamingState::eType max_audio_streaming_state()
+ const {
+ if (parent_) {
+ return parent_->max_audio_streaming_state();
+ }
+ return mobile_apis::AudioStreamingState::AUDIBLE;
+ }
+
+ /**
* @brief video_streaming_state
* @return return video streaming state member
*/
virtual mobile_apis::VideoStreamingState::eType video_streaming_state()
const {
if (parent_) {
- return parent_->video_streaming_state();
+ if (mobile_apis::VideoStreamingState::INVALID_ENUM ==
+ video_streaming_state_) {
+ return parent_->video_streaming_state();
+ }
+ // Higher values correlate to lower states
+ // (STREAMABLE = 0, NOT_STREAMABLE = 1)
+ return std::max(parent_->max_video_streaming_state(),
+ video_streaming_state_);
}
return video_streaming_state_;
}
/**
+ * @brief max_video_streaming_state
+ * @return return maximum video streaming state for app
+ */
+ virtual mobile_apis::VideoStreamingState::eType max_video_streaming_state()
+ const {
+ if (parent_) {
+ return parent_->max_video_streaming_state();
+ }
+ return mobile_apis::VideoStreamingState::STREAMABLE;
+ }
+
+ /**
* @brief set_video_streaming_state set set_video_streaming_state member
* @param video_state video_state to setup
*/
@@ -176,7 +231,9 @@ class HmiState {
* @return return system context member
*/
virtual mobile_apis::SystemContext::eType system_context() const {
- if (parent_) {
+ // Parent's context should be used if not available for current state
+ if (parent_ &&
+ system_context_ == mobile_apis::SystemContext::INVALID_ENUM) {
return parent_->system_context();
}
return system_context_;
@@ -238,6 +295,12 @@ class HmiState {
bool is_navi_app() const;
/**
+ * @brief is_projection_app check if app is projection
+ * @return true if app is projection, otherwise return false
+ */
+ bool is_projection_app() const;
+
+ /**
* @brief is_media_app check if app is media
* @return true if media_app, otherwise return false
*/
@@ -256,6 +319,48 @@ class HmiState {
*/
bool is_mobile_projection_app() const;
+ /**
+ * @brief parent_hmi_level
+ * @return return hmi level for parent state if available, otherwise return
+ * HMI_NONE
+ */
+ mobile_apis::HMILevel::eType parent_hmi_level() const;
+
+ /**
+ * @brief parent_max_hmi_level
+ * @return return maximum hmi level for parent state if available, otherwise
+ * return HMI_FULL
+ */
+ mobile_apis::HMILevel::eType parent_max_hmi_level() const;
+
+ /**
+ * @brief parent_audio_state
+ * @return return audio streaming state for parent state if available,
+ * otherwise return NOT_AUDIBLE
+ */
+ mobile_apis::AudioStreamingState::eType parent_audio_state() const;
+
+ /**
+ * @brief parent_max_audio_state
+ * @return return maximum audio streaming state for parent state if available,
+ * otherwise return AUDIBLE
+ */
+ mobile_apis::AudioStreamingState::eType parent_max_audio_state() const;
+
+ /**
+ * @brief parent_video_state
+ * @return return video streaming state for parent state if available,
+ * otherwise return NOT_STREAMABLE
+ */
+ mobile_apis::VideoStreamingState::eType parent_video_state() const;
+
+ /**
+ * @brief parent_max_video_state
+ * @return return maximum video streaming statefor parent state if available,
+ * otherwise return STREAMABLE
+ */
+ mobile_apis::VideoStreamingState::eType parent_max_video_state() const;
+
private:
void operator=(const HmiState&);
};
@@ -267,6 +372,8 @@ class VRHmiState : public HmiState {
public:
virtual mobile_apis::AudioStreamingState::eType audio_streaming_state()
const OVERRIDE;
+ virtual mobile_apis::AudioStreamingState::eType max_audio_streaming_state()
+ const OVERRIDE;
VRHmiState(std::shared_ptr<Application> app,
const ApplicationManager& app_mngr);
};
@@ -281,6 +388,9 @@ class TTSHmiState : public HmiState {
virtual mobile_apis::AudioStreamingState::eType audio_streaming_state()
const OVERRIDE;
+
+ virtual mobile_apis::AudioStreamingState::eType max_audio_streaming_state()
+ const OVERRIDE;
};
/**
@@ -294,6 +404,9 @@ class VideoStreamingHmiState : public HmiState {
mobile_apis::VideoStreamingState::eType video_streaming_state()
const OVERRIDE;
+
+ mobile_apis::VideoStreamingState::eType max_video_streaming_state()
+ const OVERRIDE;
};
/**
@@ -307,6 +420,9 @@ class NaviStreamingHmiState : public VideoStreamingHmiState {
mobile_apis::AudioStreamingState::eType audio_streaming_state()
const OVERRIDE;
+
+ mobile_apis::AudioStreamingState::eType max_audio_streaming_state()
+ const OVERRIDE;
};
/**
@@ -323,6 +439,12 @@ class PhoneCallHmiState : public HmiState {
const OVERRIDE {
return mobile_apis::AudioStreamingState::NOT_AUDIBLE;
}
+
+ mobile_apis::HMILevel::eType max_hmi_level() const OVERRIDE;
+ mobile_apis::AudioStreamingState::eType max_audio_streaming_state()
+ const OVERRIDE {
+ return audio_streaming_state();
+ }
};
/**
@@ -342,6 +464,15 @@ class SafetyModeHmiState : public HmiState {
const OVERRIDE {
return mobile_apis::VideoStreamingState::NOT_STREAMABLE;
}
+
+ mobile_apis::AudioStreamingState::eType max_audio_streaming_state()
+ const OVERRIDE {
+ return audio_streaming_state();
+ }
+ mobile_apis::VideoStreamingState::eType max_video_streaming_state()
+ const OVERRIDE {
+ return video_streaming_state();
+ }
};
/**
@@ -362,6 +493,16 @@ class DeactivateHMI : public HmiState {
const OVERRIDE {
return mobile_apis::VideoStreamingState::NOT_STREAMABLE;
}
+
+ mobile_apis::HMILevel::eType max_hmi_level() const OVERRIDE;
+ mobile_apis::AudioStreamingState::eType max_audio_streaming_state()
+ const OVERRIDE {
+ return audio_streaming_state();
+ }
+ mobile_apis::VideoStreamingState::eType max_video_streaming_state()
+ const OVERRIDE {
+ return video_streaming_state();
+ }
};
/**
@@ -375,13 +516,15 @@ class AudioSource : public HmiState {
mobile_apis::HMILevel::eType hmi_level() const OVERRIDE;
mobile_apis::AudioStreamingState::eType audio_streaming_state()
- const OVERRIDE {
- return mobile_apis::AudioStreamingState::NOT_AUDIBLE;
- }
+ const OVERRIDE;
mobile_apis::VideoStreamingState::eType video_streaming_state()
- const OVERRIDE {
- return mobile_apis::VideoStreamingState::NOT_STREAMABLE;
- }
+ const OVERRIDE;
+
+ mobile_apis::HMILevel::eType max_hmi_level() const OVERRIDE;
+ mobile_apis::AudioStreamingState::eType max_audio_streaming_state()
+ const OVERRIDE;
+ mobile_apis::VideoStreamingState::eType max_video_streaming_state()
+ const OVERRIDE;
private:
bool keep_context_;
@@ -399,13 +542,15 @@ class EmbeddedNavi : public HmiState {
mobile_apis::HMILevel::eType hmi_level() const OVERRIDE;
mobile_apis::AudioStreamingState::eType audio_streaming_state()
- const OVERRIDE {
- return mobile_apis::AudioStreamingState::NOT_AUDIBLE;
- }
+ const OVERRIDE;
mobile_apis::VideoStreamingState::eType video_streaming_state()
- const OVERRIDE {
- return mobile_apis::VideoStreamingState::NOT_STREAMABLE;
- }
+ const OVERRIDE;
+
+ mobile_apis::HMILevel::eType max_hmi_level() const OVERRIDE;
+ mobile_apis::AudioStreamingState::eType max_audio_streaming_state()
+ const OVERRIDE;
+ mobile_apis::VideoStreamingState::eType max_video_streaming_state()
+ const OVERRIDE;
};
/**
diff --git a/src/components/application_manager/include/application_manager/message_helper.h b/src/components/application_manager/include/application_manager/message_helper.h
index 5d95a2468d..7af9bacf27 100644
--- a/src/components/application_manager/include/application_manager/message_helper.h
+++ b/src/components/application_manager/include/application_manager/message_helper.h
@@ -49,6 +49,7 @@
#include "interfaces/MOBILE_API.h"
#include "policy/policy_types.h"
#include "protocol_handler/session_observer.h"
+#include "smart_objects/enum_schema_item.h"
#include "smart_objects/smart_object.h"
#include "transport_manager/common.h"
#include "utils/macro.h"
@@ -60,7 +61,41 @@ class PolicyHandlerInterface;
namespace application_manager {
namespace mobile_api = mobile_apis;
-/*
+/**
+ * @brief ResetGlobalPropertiesResult
+ * contains flags indicating success of
+ * ResetGlobalProperties operation.
+ * Used in MessageHelper functions
+ * to construct relevant requests
+ **/
+struct ResetGlobalPropertiesResult {
+ bool help_prompt;
+ bool timeout_prompt;
+ bool vr_help_title_items;
+ bool menu_name;
+ bool menu_icon;
+ bool keyboard_properties;
+ bool vr_has_been_reset;
+
+ ResetGlobalPropertiesResult()
+ : help_prompt(false)
+ , timeout_prompt(false)
+ , vr_help_title_items(false)
+ , menu_name(false)
+ , menu_icon(false)
+ , keyboard_properties(false)
+ , vr_has_been_reset(false) {}
+
+ bool HasUIPropertiesReset() const {
+ return vr_help_title_items || menu_name || menu_icon || keyboard_properties;
+ }
+
+ bool HasTTSPropertiesReset() const {
+ return timeout_prompt || help_prompt;
+ }
+};
+
+/**
* @brief Typedef for VehicleData
*
* @param const char* Name of the parameter in mobile request
@@ -69,6 +104,35 @@ namespace mobile_api = mobile_apis;
typedef std::map<std::string, mobile_apis::VehicleDataType::eType> VehicleData;
/**
+ * @brief Converts stringified value to enum value
+ * @param str stringified value
+ * @return Enum value if succedeed, otherwise -
+ * INVALID_ENUM
+ */
+template <typename T>
+T StringToEnum(const std::string& str) {
+ using namespace ns_smart_device_link::ns_smart_objects;
+ T enum_value;
+ EnumConversionHelper<T>::StringToEnum(str, &enum_value);
+ return enum_value;
+}
+
+/**
+ * @brief Converts enum value to string
+ * @param enum_value enum value
+ * @return stringified value for enum if succedeed, otherwise - empty string
+ */
+template <typename T>
+std::string EnumToString(T enum_value) {
+ using namespace ns_smart_device_link::ns_smart_objects;
+ const char* str = 0;
+ if (EnumConversionHelper<T>::EnumToCString(enum_value, &str)) {
+ return str;
+ }
+ return std::string();
+}
+
+/**
* @brief MessageHelper class
**/
class MessageHelper {
@@ -142,7 +206,7 @@ class MessageHelper {
static void SendGetSystemTimeRequest(const uint32_t correlation_id,
ApplicationManager& app_mngr);
- /*
+ /**
* @brief Retrieve vehicle data map for param name in mobile request
* to VehicleDataType
*
@@ -150,42 +214,9 @@ class MessageHelper {
*/
static const VehicleData& vehicle_data();
- /**
- * @brief Converts HMI Result enum value to string
- * @param hmi_result HMI Result enum value
- * @return stringified value for enum if succedeed, otherwise - empty string
- */
- static std::string HMIResultToString(
- hmi_apis::Common_Result::eType hmi_result);
-
- /**
- * @brief Converts string to HMI Result enum value
- * @param hmi_result stringified value
- * @return HMI Result enum value if succedeed, otherwise - INVALID_ENUM
- * value
- */
- static hmi_apis::Common_Result::eType HMIResultFromString(
- const std::string& hmi_result);
-
- /**
- * @brief Converts mobile Result enum value to string
- * @param mobile_result mobile Result enum value
- * @return stringified value for enum if succedeed, otherwise - empty string
- */
- static std::string MobileResultToString(
- mobile_apis::Result::eType mobile_result);
-
static std::string GetDeviceMacAddressForHandle(
const transport_manager::DeviceHandle device_handle,
const ApplicationManager& app_mngr);
- /**
- * @brief Converts string to mobile Result enum value
- * @param mobile_result stringified value
- * @return mobile Result enum value if succedeed, otherwise - INVALID_ENUM
- * value
- */
- static mobile_api::Result::eType MobileResultFromString(
- const std::string& mobile_result);
/**
* @brief Converts HMI Result enum value to mobile Result enum value
@@ -205,23 +236,6 @@ class MessageHelper {
const mobile_api::Result::eType mobile_result);
/**
- * @brief Convert string to HMI level, if possible
- * @param hmi_level Stringified HMI level
- * @return Appropriate enum from HMI level, or INVALID_ENUM, if conversiion
- * is not possible
- */
- static mobile_api::HMILevel::eType StringToHMILevel(
- const std::string& hmi_level);
-
- /*
- * @brief Used to obtain string representation of app's
- * HMI Level.
- * @param hmi_level Desired HMI Level
- */
- static std::string StringifiedHMILevel(
- const mobile_apis::HMILevel::eType hmi_level);
-
- /*
* @brief Used to obtain function name by its id
* @param function_id Function ID
*/
@@ -234,7 +248,7 @@ class MessageHelper {
const uint32_t correlation_id,
uint32_t connection_key);
- /*
+ /**
* @brief Prepare GetDeviceListResponse
*
*
@@ -254,6 +268,10 @@ class MessageHelper {
/**
* @brief Sends button subscription notification
+ * @param app_id Application ID
+ * @param button Enum with button name
+ * @param is_subscribed true if subscribed, false otherwise
+ * @param app_mngr reference to application manager
*/
static void SendOnButtonSubscriptionNotification(
const uint32_t app_id,
@@ -262,18 +280,46 @@ class MessageHelper {
ApplicationManager& app_mngr);
/**
+ * @brief Creates button subscription notification
+ * @param app_id Application ID
+ * @param button Enum with button name
+ * @param is_subscribed true if subscribed, false otherwise
+ * @return notification message in SmartObject format
+ */
+ static smart_objects::SmartObjectSPtr CreateOnButtonSubscriptionNotification(
+ const uint32_t app_id,
+ const hmi_apis::Common_ButtonName::eType button,
+ const bool is_subscribed);
+
+ /**
* @brief Sends button subscription notifications for all buttons
* that application is subscribed on
+ * @param app shared pointer to application instance
+ * @param app_mngr reference to application manager
*/
static void SendAllOnButtonSubscriptionNotificationsForApp(
ApplicationConstSharedPtr app, ApplicationManager& app_mngr);
+ /**
+ * @brief Creates button subscription notifications for buttons
+ * that application is subscribed on
+ * @param app shared pointer to application instance
+ * @param app_mngr reference to application manager
+ * @param button_subscriptions collection of subscribed buttons
+ * @return list of notification messages in SmartObject format
+ */
+ static smart_objects::SmartObjectList
+ CreateOnButtonSubscriptionNotificationsForApp(
+ ApplicationConstSharedPtr app,
+ ApplicationManager& app_mngr,
+ const ButtonSubscriptions& button_subscriptions);
+
static void SendAppDataToHMI(ApplicationConstSharedPtr app,
ApplicationManager& app_man);
static void SendGlobalPropertiesToHMI(ApplicationConstSharedPtr app,
ApplicationManager& app_mngr);
static smart_objects::SmartObjectList CreateGlobalPropertiesRequestsToHMI(
- ApplicationConstSharedPtr app, const uint32_t correlation_id);
+ ApplicationConstSharedPtr app, ApplicationManager& app_mngr);
static smart_objects::SmartObjectSPtr CreateAppVrHelp(
ApplicationConstSharedPtr app);
@@ -284,8 +330,6 @@ class MessageHelper {
ApplicationManager& app_mngr);
static void SendShowConstantTBTRequestToHMI(ApplicationConstSharedPtr app,
ApplicationManager& app_man);
- static void SendAddCommandRequestToHMI(ApplicationConstSharedPtr app,
- ApplicationManager& app_man);
static smart_objects::SmartObjectList CreateAddCommandRequestToHMI(
ApplicationConstSharedPtr app, ApplicationManager& app_mngr);
@@ -299,11 +343,6 @@ class MessageHelper {
*/
static void SendUIChangeRegistrationRequestToHMI(
ApplicationConstSharedPtr app, ApplicationManager& app_mngr);
- static void SendAddVRCommandToHMI(
- uint32_t cmd_id,
- const smart_objects::SmartObject& vr_commands,
- const uint32_t app_id,
- ApplicationManager& app_mngr);
static smart_objects::SmartObjectSPtr CreateAddVRCommandToHMI(
uint32_t cmd_id,
@@ -335,7 +374,7 @@ class MessageHelper {
ApplicationManager& app_mngr,
const smart_objects::SmartObject& windows_info);
- /*
+ /**
* @brief Create Common.DeviceInfo struct from device handle
* @param device_handle device handle of the app
* @param session_observer instance of SessionObserver to retrieve device
@@ -353,7 +392,7 @@ class MessageHelper {
ApplicationManager& app_mngr,
smart_objects::SmartObject* output);
- /*
+ /**
* @brief Create Common.HMIApplication struct application instance
* @param app : applicaton instace
* @param output smart object to store Common.HMIApplication struct
@@ -368,10 +407,10 @@ class MessageHelper {
static void SendAddSubMenuRequestToHMI(ApplicationConstSharedPtr app,
ApplicationManager& app_mngr);
- static smart_objects::SmartObjectList CreateAddSubMenuRequestToHMI(
- ApplicationConstSharedPtr app, const uint32_t correlation_id);
+ static smart_objects::SmartObjectList CreateAddSubMenuRequestsToHMI(
+ ApplicationConstSharedPtr app, ApplicationManager& app_mngr);
- /*
+ /**
* @brief Creates BasicCommunication.OnAppUnregistered notification
* @param app Application instance
* @param is_unexpected_disconnect
@@ -459,7 +498,7 @@ class MessageHelper {
ApplicationManager& app_mngr);
#endif // EXTERNAL_PROPRIETARY_MODE
- /*
+ /**
* @brief Sends SetVideoConfig request to HMI to negotiate video parameters
*
* @param app_id the application which will start video streaming
@@ -471,7 +510,7 @@ class MessageHelper {
ApplicationManager& app_mngr,
const smart_objects::SmartObject& video_params);
- /*
+ /**
* @brief Sends notification to HMI to start video streaming
*
* @param connection_key Application connection key
@@ -479,7 +518,7 @@ class MessageHelper {
*/
static void SendNaviStartStream(int32_t app_id, ApplicationManager& app_mngr);
- /*
+ /**
* @brief Sends notification to HMI to stop video streaming
*
* @param connection_key Application connection key
@@ -487,13 +526,27 @@ class MessageHelper {
*/
static void SendNaviStopStream(int32_t app_id, ApplicationManager& app_mngr);
- /*
+ /**
+ * @brief Send notification for Update of Policy Table
+ * with PT Snapshot.
+ * @param connection_key Id of application to send message to
+ * @param snapshot_file_path path to PT Snapshot
+ * @param url If empty string, no URL is provided
+ * @param timeout If -1 no timeout is provided
+ */
+ static void SendPolicySnapshotNotification(
+ uint32_t connection_key,
+ const std::string& snapshot_file_path,
+ const std::string& url,
+ ApplicationManager& app_mngr);
+
+ /**
* @brief Send notification for Update of Policy Table
* with PT Snapshot.
* @param connection_key Id of application to send message to
* @param policy_data PT Snapshot
* @param url If empty string, no URL is provided
- * @param timeout If -1 no timeout is provdied
+ * @param timeout If -1 no timeout is provided
*/
static void SendPolicySnapshotNotification(
uint32_t connection_key,
@@ -527,7 +580,7 @@ class MessageHelper {
static void SendQueryApps(const uint32_t connection_key,
ApplicationManager& app_man);
- /*
+ /**
* @brief Send notification to mobile on application permissions update
* @param connection_key Id of application to send message to
* @param permissions updated permissions for application
@@ -540,7 +593,7 @@ class MessageHelper {
ApplicationManager& app_mngr,
const policy::EncryptionRequired encryprion_required);
- /*
+ /**
* @brief Send notification to HMI on application permissions update
* @param connection_key Id of application to send message to
* @param permissions updated permissions for application
@@ -581,7 +634,7 @@ class MessageHelper {
*/
static void SendGetSystemInfoRequest(ApplicationManager& app_mngr);
- /*
+ /**
* @brief Sends notification to HMI to start audio streaming
*
* @param connection_key Application connection key
@@ -590,7 +643,7 @@ class MessageHelper {
static void SendAudioStartStream(int32_t app_id,
ApplicationManager& app_mngr);
- /*
+ /**
* @brief Sends notification to HMI to stop audio streaming
*
* @param connection_key Application connection key
@@ -602,8 +655,7 @@ class MessageHelper {
static void SendOnDataStreaming(protocol_handler::ServiceType service,
bool available,
ApplicationManager& app_mngr);
-
- /*
+ /**
* @brief Sends notification to HMI to stop audioPathThru
*
* @param connection_key Application connection key
@@ -613,10 +665,12 @@ class MessageHelper {
static bool SendStopAudioPathThru(ApplicationManager& app_mngr);
/**
- * @brief Sends UnsubscribeWayPoints request
- * @return true if UnsubscribedWayPoints is send otherwise false
+ * @brief Creates UnsubscribeWayPoints request
+ * @param correlation_id Correlation ID
+ * @return request Request to HMI
*/
- static bool SendUnsubscribedWayPoints(ApplicationManager& app_mngr);
+ static smart_objects::SmartObjectSPtr CreateUnsubscribeWayPointsRequest(
+ const uint32_t correlation_id);
static smart_objects::SmartObjectSPtr CreateNegativeResponse(
uint32_t connection_key,
@@ -625,6 +679,32 @@ class MessageHelper {
int32_t result_code);
/**
+ * @brief Creates negative response message from HMI using provided params
+ * @param function_id id of function
+ * @param correlation_id correlation id
+ * @param result_code result code
+ * @param info info message
+ * @return pointer to created message
+ */
+ static smart_objects::SmartObjectSPtr CreateNegativeResponseFromHmi(
+ const int32_t function_id,
+ const uint32_t correlation_id,
+ const int32_t result_code,
+ const std::string& info);
+
+ /**
+ * @brief Creates negative response message from HMI using provided params
+ * @param function_id id of function
+ * @param correlation_id correlation id
+ * @param result_code result code
+ * @return pointer to created message
+ */
+ static smart_objects::SmartObjectSPtr CreateResponseMessageFromHmi(
+ const int32_t function_id,
+ const uint32_t correlation_id,
+ const int32_t result_code);
+
+ /**
* @brief Get the full file path of an app file
*
* @param file_name The relative path of an application file
@@ -666,7 +746,7 @@ class MessageHelper {
ApplicationConstSharedPtr app,
ApplicationManager& app_mngr);
- /*
+ /**
* @brief Verify image and add image file full path
*
* @param SmartObject with image
@@ -696,7 +776,7 @@ class MessageHelper {
static ChoiceSetVRCommandsStatus CheckChoiceSetVRCommands(
const smart_objects::SmartObject& choice_set);
- /*
+ /**
* @brief Finds "Image" structure in request and verify image file presence
* in Core.
*
@@ -732,7 +812,7 @@ class MessageHelper {
const policy::PolicyHandlerInterface& policy_handler,
ApplicationManager& app_mngr);
- /*
+ /**
* @brief subscribe application to softbutton
*
* @param message_params contains data of request
@@ -749,7 +829,7 @@ class MessageHelper {
int32_t function_id,
const WindowID window_id);
- /*
+ /**
* @brief subscribe application to softbutton
*
* @param message_params contains data of request
@@ -788,29 +868,6 @@ class MessageHelper {
}
static const uint32_t GetPriorityCode(const std::string& priority);
- /**
- * @brief Convert common language to string representation
- * @param language Common language
- * @return Common language string representation
- */
- static std::string CommonLanguageToString(
- hmi_apis::Common_Language::eType language);
-
- /**
- * @brief Converts mobile language to string representation
- * @param language Mobile UI language
- * @return Mobile language string representation
- */
- static std::string MobileLanguageToString(
- mobile_apis::Language::eType language);
-
- /**
- * @brief Converts string to mobile language enum value
- * @param language language as string
- * @return Mobile language enum value
- */
- static mobile_apis::Language::eType MobileLanguageFromString(
- const std::string& language);
/**
* @brief Converts mobile language enum to HMI language enum
@@ -863,36 +920,40 @@ class MessageHelper {
const std::string& icon_path,
ApplicationManager& application_manager);
- static hmi_apis::Common_Language::eType CommonLanguageFromString(
- const std::string& language);
-
- /**
- * @brief CommonLightNameFromString convert string to LightName enum value
- * @param lightName string to convert
- * @return value LightName enum value
- */
- static hmi_apis::Common_LightName::eType CommonLightNameFromString(
- const std::string& lightName);
-
static smart_objects::SmartObjectSPtr
GetOnAppInterfaceUnregisteredNotificationToMobile(
int32_t connection_key,
mobile_api::AppInterfaceUnregisteredReason::eType reason);
/**
- * @brief SendDeleteCommandRequest sends requests to HMI to remove UI/VR
+ * @brief CreateDeleteUICommandRequest creates request to HMI to remove UI
+ * command data depending on command parameters
+ * @param cmd Command data
+ * @param app_id ID of application owning the command data
+ * @param corr_id Correlation ID
+ * @return SmartObjectSPtr message to HMI
+ */
+ static smart_objects::SmartObjectSPtr CreateDeleteUICommandRequest(
+ smart_objects::SmartObject* cmd,
+ const uint32_t app_id,
+ const uint32_t corr_id);
+
+ /**
+ * @brief CreateDeleteVRCommandRequest creates request to HMI to remove VR
* command data depending on command parameters
* @param cmd Command data
* @param application Application owning the command data
- * @param app_mngr Application manager
+ * @param corr_id Correlation ID
+ * @return SmartObjectSPtr message to HMI
*/
- static void SendDeleteCommandRequest(smart_objects::SmartObject* cmd,
- ApplicationSharedPtr application,
- ApplicationManager& app_mngr);
+ static smart_objects::SmartObjectSPtr CreateDeleteVRCommandRequest(
+ smart_objects::SmartObject* cmd,
+ ApplicationSharedPtr application,
+ const uint32_t corr_id);
/**
* @brief SendDeleteSubmenuRequest sends UI/VR requests to HMI to remove
- * submenues-related data depending on command parameters
+ * submenus-related data depending on command parameters
* @param cmd Command data
* @param application Application owning the commmand data
* @param app_mngr Application manager
@@ -937,12 +998,10 @@ class MessageHelper {
* @brief Sends HMI status notification to mobile
* @param application application with changed HMI status
* @param window_id id of affected window
- * @param application_manager reference to application manager
+ * @return SmartObjectSPtr with notification about HMI status
**/
- static void SendHMIStatusNotification(
- ApplicationSharedPtr application,
- const WindowID window_id,
- ApplicationManager& application_manager);
+ static smart_objects::SmartObjectSPtr CreateHMIStatusNotification(
+ ApplicationSharedPtr application, const WindowID window_id);
/**
* @brief SendActivateAppToHMI Sends BasicCommunication.ActivateApp request to
@@ -967,7 +1026,41 @@ class MessageHelper {
* @return HMI message object with filled header
*/
static smart_objects::SmartObjectSPtr CreateMessageForHMI(
- hmi_apis::messageType::eType message_type, const uint32_t correlation_id);
+ const hmi_apis::messageType::eType message_type,
+ const uint32_t correlation_id);
+
+ /**
+ * @brief CreateMessageForHMI Creates HMI message with prepared header
+ * according to message type
+ * @param function_id function id
+ * @param correlation_id Correlation id
+ * @return HMI message object with filled header
+ */
+ static smart_objects::SmartObjectSPtr CreateMessageForHMI(
+ const hmi_apis::FunctionID::eType function_id,
+ const uint32_t correlation_id);
+
+ /**
+ * @brief CreateUIResetGlobalPropertiesRequest Creates request
+ * to reset global properties for UI
+ * @param struct containing result of global properties reset procedure
+ * @param application which properties are to be reset
+ * @return filled smart object with relevant request data
+ */
+ static smart_objects::SmartObjectSPtr CreateUIResetGlobalPropertiesRequest(
+ const ResetGlobalPropertiesResult& reset_result,
+ const ApplicationSharedPtr application);
+
+ /**
+ * @brief CreateTTSResetGlobalPropertiesRequest Creates request
+ * to reset global properties for TTS
+ * @param struct containing result of global properties reset procedure
+ * @param application which properties are to be reset
+ * @return filled smart object with relevant request data
+ */
+ static smart_objects::SmartObjectSPtr CreateTTSResetGlobalPropertiesRequest(
+ const ResetGlobalPropertiesResult& reset_result,
+ const ApplicationSharedPtr application);
static smart_objects::SmartObject CreateAppServiceCapabilities(
std::vector<smart_objects::SmartObject>& all_services);
@@ -985,6 +1078,19 @@ class MessageHelper {
static smart_objects::SmartObjectSPtr CreateDisplayCapabilityUpdateToMobile(
const smart_objects::SmartObject& system_capabilities, Application& app);
+ /**
+ * @brief CreateUIDeleteWindowRequestToHMI creates request to delete specified
+ * window
+ * @param application reference to related application
+ * @param app_mngr reference to application manager instance
+ * @param window_id id of window to delete
+ * @return shared ptr to request SO
+ */
+ static smart_objects::SmartObjectSPtr CreateUIDeleteWindowRequestToHMI(
+ ApplicationSharedPtr application,
+ ApplicationManager& app_mngr,
+ const WindowID window_id);
+
private:
/**
* @brief Allows to fill SO according to the current permissions.
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 2070554cd8..c123bcc764 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
@@ -122,7 +122,8 @@ class PolicyHandler : public PolicyHandlerInterface,
const RPCParams& rpc_params,
CheckPermissionResult& result) OVERRIDE;
- uint32_t GetNotificationsNumber(const std::string& priority) const OVERRIDE;
+ uint32_t GetNotificationsNumber(const std::string& priority,
+ const bool is_subtle = false) const OVERRIDE;
virtual DeviceConsent GetUserConsentForDevice(
const std::string& device_id) const OVERRIDE;
@@ -324,6 +325,8 @@ class PolicyHandler : public PolicyHandlerInterface,
void OnSystemRequestReceived() const OVERRIDE;
+ void TriggerPTUOnStartupIfRequired() OVERRIDE;
+
/**
* @brief Get appropriate message parameters and send them with response
* to HMI
@@ -383,6 +386,10 @@ class PolicyHandler : public PolicyHandlerInterface,
const std::string& wers_country_code,
const std::string& language) OVERRIDE;
+ void SetPreloadedPtFlag(const bool is_preloaded) OVERRIDE;
+
+ std::string GetCCPUVersionFromPT() const OVERRIDE;
+
/**
* @brief Sends GetVehicleData request in case when Vechicle info is ready.
*/
@@ -417,7 +424,9 @@ class PolicyHandler : public PolicyHandlerInterface,
uint32_t ChoosePTUApplication(
const PTUIterationType iteration_type =
PTUIterationType::DefaultIteration) OVERRIDE;
- void CacheRetryInfo(const uint32_t app_id, const std::string url) OVERRIDE;
+ void CacheRetryInfo(const uint32_t app_id = 0,
+ const std::string url = std::string(),
+ const std::string snapshot_path = std::string()) OVERRIDE;
#endif // EXTERNAL_PROPRIETARY_MODE
uint32_t GetAppIdForSending() const OVERRIDE;
@@ -694,7 +703,7 @@ class PolicyHandler : public PolicyHandlerInterface,
#ifdef BUILD_TESTS
void SetPolicyManager(std::shared_ptr<PolicyManager> pm) {
- policy_manager_ = pm;
+ ExchangePolicyManager(pm);
}
#endif // BUILD_TESTS
@@ -892,8 +901,28 @@ class PolicyHandler : public PolicyHandlerInterface,
*/
void GetRegisteredLinks(std::map<std::string, std::string>& out_links) const;
+ /**
+ * @brief Load policy manager
+ * This method is thread safe
+ * @return Pointer to the policy manager instance or null if not inited
+ */
+ std::shared_ptr<PolicyManager> LoadPolicyManager() const;
+
+ /**
+ * @brief Exchange a policy manager
+ * This method is thread safe
+ * @param policy_manager - new policy manager
+ */
+ void ExchangePolicyManager(std::shared_ptr<PolicyManager> policy_manager);
+
mutable sync_primitives::RWLock policy_manager_lock_;
- std::shared_ptr<PolicyManager> policy_manager_;
+
+ /**
+ * @brief Policy manager
+ * @note Use atomic_policy_manager_ only with
+ * LoadPolicyManager and ExchangePolicyManager methods!
+ */
+ std::shared_ptr<PolicyManager> atomic_policy_manager_;
std::shared_ptr<PolicyEventObserver> event_observer_;
uint32_t last_activated_app_id_;
@@ -901,6 +930,7 @@ class PolicyHandler : public PolicyHandlerInterface,
// PTU retry information
uint32_t last_ptu_app_id_;
std::string retry_update_url_;
+ std::string policy_snapshot_path_;
#endif // EXTERNAL_PROPRIETARY_MODE
/**
@@ -908,8 +938,6 @@ class PolicyHandler : public PolicyHandlerInterface,
*/
DeviceHandles pending_device_handles_;
- inline bool CreateManager();
-
typedef std::list<PolicyHandlerObserver*> HandlersCollection;
HandlersCollection listeners_;
mutable sync_primitives::Lock listeners_lock_;
diff --git a/src/components/application_manager/include/application_manager/postponed_activation_controller.h b/src/components/application_manager/include/application_manager/postponed_activation_controller.h
new file mode 100644
index 0000000000..e096800a25
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/postponed_activation_controller.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_POSTPONED_ACTIVATION_CONTROLLER_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_POSTPONED_ACTIVATION_CONTROLLER_H_
+
+#include "application.h"
+
+namespace application_manager {
+
+/**
+ * @brief AppToActivateSet is a map of application ids expected to be
+ * activated after the registration is completed (default hmi level is assigned)
+ * and correlation_ids of the SDLActivateApp requests
+ */
+typedef std::map<uint32_t, uint32_t> AppToActivate;
+
+class PostponedActivationController {
+ public:
+ PostponedActivationController();
+
+ /**
+ * @brief AddAppToActivate adds app_id to app_to_activate_ map
+ * @param app_id id of the app that should be activated
+ * @param corr_id correlation_id of the SDLActivateApp request
+ */
+ void AddAppToActivate(uint32_t app_id, uint32_t corr_id);
+
+ /**
+ * @brief GetPendingActivationCorrId gets the pending
+ * activation correlation id
+ * @param app_id application id
+ * @return correlation id of the SDLActivateApp requests
+ */
+ uint32_t GetPendingActivationCorrId(uint32_t app_id) const;
+
+ /**
+ * @brief RemoveAppToActivate removes app_id from app_to_activate_ map
+ * @param app_id application id
+ */
+ void RemoveAppToActivate(uint32_t app_id);
+
+ private:
+ AppToActivate app_to_activate_;
+ mutable std::shared_ptr<sync_primitives::Lock> activate_app_list_lock_ptr_;
+};
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_POSTPONED_ACTIVATION_CONTROLLER_H_
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 6900a50926..c6cf00caea 100644
--- a/src/components/application_manager/include/application_manager/request_info.h
+++ b/src/components/application_manager/include/application_manager/request_info.h
@@ -180,6 +180,11 @@ typedef std::set<RequestInfoPtr, RequestInfoHashComparator>
*/
class RequestInfoSet {
public:
+ /**
+ * @brief destructor
+ */
+ ~RequestInfoSet();
+
/*
* @brief Add requests into colletion by log(n) time
* @param request_info - request to add
diff --git a/src/components/application_manager/include/application_manager/resumption/pending_resumption_handler.h b/src/components/application_manager/include/application_manager/resumption/pending_resumption_handler.h
new file mode 100644
index 0000000000..8d21c1f34f
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/resumption/pending_resumption_handler.h
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_RESUMPTION_PENDING_RESUMPTION_HANDLER_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_RESUMPTION_PENDING_RESUMPTION_HANDLER_H
+#include "application_manager/app_extension.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/event_engine/event_observer.h"
+
+namespace resumption {
+
+namespace app_mngr = application_manager;
+
+/**
+ * @brief The PendingResumptionHandler class responsibility to avoid
+ * duplication of subscription requests to HMI if multiple applications
+ * are registering
+ */
+class PendingResumptionHandler
+ : public application_manager::event_engine::EventObserver {
+ public:
+ PendingResumptionHandler(app_mngr::ApplicationManager& application_manager);
+
+ virtual ~PendingResumptionHandler() {}
+
+ /**
+ * @brief HandleResumptionSubscriptionRequest handles all subscriptions
+ * requests, which might be send to HMI under certain conditions
+ * @param extension reference to corresponding application extension
+ * @param subscriber callback for subscribing
+ * @param app reference to application owner
+ */
+ virtual void HandleResumptionSubscriptionRequest(
+ app_mngr::AppExtension& extension,
+ application_manager::Application& app) = 0;
+
+ /**
+ * @brief OnResumptionRevert is a callback to be called in the case, when
+ * resumption is failed for current application.
+ */
+ virtual void OnResumptionRevert() = 0;
+
+ resumption::ResumptionDataProcessor& resumption_data_processor();
+
+ protected:
+ /**
+ * @brief MakeResumptionRequest creates resumption request
+ * @param corr_id correlation ID
+ * @param function_id function ID
+ * @param message Message to HMI
+ * @return instance of ResumptionRequest class
+ */
+ ResumptionRequest MakeResumptionRequest(
+ const uint32_t corr_id,
+ const hmi_apis::FunctionID::eType function_id,
+ const smart_objects::SmartObject& message);
+
+ app_mngr::ApplicationManager& application_manager_;
+};
+} // namespace resumption
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_RESUMPTION_PENDING_RESUMPTION_HANDLER_H
diff --git a/src/components/application_manager/include/application_manager/resumption/resume_ctrl.h b/src/components/application_manager/include/application_manager/resumption/resume_ctrl.h
index e572eaec39..456eccd29c 100644
--- a/src/components/application_manager/include/application_manager/resumption/resume_ctrl.h
+++ b/src/components/application_manager/include/application_manager/resumption/resume_ctrl.h
@@ -46,6 +46,7 @@ typedef std::shared_ptr<const Application> ApplicationConstSharedPtr;
namespace app_mngr = application_manager;
namespace resumption {
+class ResumptionDataProcessor;
/**
* @brief Contains logic for storage/restore data of applications.
@@ -59,6 +60,16 @@ class ResumeCtrl {
virtual ~ResumeCtrl() {}
/**
+ * @brief ResumptionCallBack Function signature to be called when
+ * data resumption will be finished
+ * @param result_code result code for sending to mobile
+ * @param info additional info for sending to mobile
+ */
+ typedef std::function<void(mobile_apis::Result::eType result_code,
+ const std::string& info)>
+ ResumptionCallBack;
+
+ /**
* @brief Save all applications info to the file system
*/
virtual void SaveAllApplications() = 0;
@@ -73,19 +84,11 @@ class ResumeCtrl {
/**
* @brief Set application HMI Level and ausio_state as saved
* @param application is application witch HMI Level is need to restore
- * @return true if success, otherwise return false
*/
- virtual bool RestoreAppHMIState(
+ virtual void RestoreAppHMIState(
application_manager::ApplicationSharedPtr application) = 0;
/**
- * @brief Restore widgets HMI level on the resumption response from HMI
- * @param response_message smart_object with HMI message
- */
- virtual void RestoreWidgetsHMIState(
- const smart_objects::SmartObject& response_message) = 0;
-
- /**
* @brief Set application HMI Level as stored in policy
* @param application is application witch HMI Level is need to setup
* @return true if success, otherwise return false
@@ -108,16 +111,6 @@ class ResumeCtrl {
bool check_policy = true) = 0;
/**
- * @brief RestoreAppWidgets add widgets for the application
- * @param application application which will be resumed
- * @param saved_app application specific section from backup file
- * @return the number of widget windows to be resumed
- */
- virtual size_t RestoreAppWidgets(
- application_manager::ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app) = 0;
-
- /**
* @brief Remove application from list of saved applications
* @param application is application which need to be removed
* @return return true, if success, otherwise return false
@@ -175,10 +168,13 @@ class ResumeCtrl {
* @brief Start timer for resumption applications
* Restore D1-D5 data
* @param application that is need to be restored
+ * @param hash stored hash value for this app
+ * @param callback Function to be called when data resumption will be finished
* @return true if it was saved, otherwise return false
*/
virtual bool StartResumption(app_mngr::ApplicationSharedPtr application,
- const std::string& hash) = 0;
+ const std::string& hash,
+ ResumptionCallBack callback) = 0;
/**
* @brief Start timer for resumption applications
* Does not restore D1-D5 data
@@ -196,6 +192,15 @@ class ResumeCtrl {
virtual void RetryResumption(const uint32_t app_id) = 0;
/**
+ * @brief Handle restored data when timeout appeared
+ * @param correlation_id - const int32_t
+ * @param function id hmi_apis::FunctionID::eType
+ */
+
+ virtual void HandleOnTimeOut(const uint32_t correlation_id,
+ const hmi_apis::FunctionID::eType) = 0;
+
+ /**
* @brief Check if there are all files need for resumption
* @param application that is need to be restored
* @return true if it all files exist, otherwise return false
@@ -206,6 +211,7 @@ class ResumeCtrl {
/**
* @brief Check application hash
* @param application that is need to be restored
+ * @param hash stored hash value to be checked for restoring application
* @return true if it was saved, otherwise return false
*/
virtual bool CheckApplicationHash(app_mngr::ApplicationSharedPtr application,
@@ -248,7 +254,7 @@ class ResumeCtrl {
* @param application - application to restore hmi level
* and audio streaming state
*/
- virtual bool StartAppHmiStateResumption(
+ virtual void StartAppHmiStateResumption(
application_manager::ApplicationSharedPtr application) = 0;
/**
@@ -300,11 +306,19 @@ class ResumeCtrl {
virtual int32_t GetSavedAppHmiLevel(const std::string& app_id,
const std::string& device_id) const = 0;
+ /**
+ * @brief StartWaitingForDisplayCapabilitiesUpdate add application to
+ * capabilities builder waitlist
+ * @param application application to add
+ * @param is_resume_app flag to check whether app data should be resumed or
+ * not
+ */
virtual void StartWaitingForDisplayCapabilitiesUpdate(
- app_mngr::ApplicationSharedPtr application) = 0;
+ app_mngr::ApplicationSharedPtr application, const bool is_resume_app) = 0;
virtual time_t LaunchTime() const = 0;
+ virtual ResumptionDataProcessor& resumption_data_processor() = 0;
#ifdef BUILD_TESTS
virtual void set_resumption_storage(
std::shared_ptr<ResumptionData> mock_storage) = 0;
diff --git a/src/components/application_manager/include/application_manager/resumption/resume_ctrl_impl.h b/src/components/application_manager/include/application_manager/resumption/resume_ctrl_impl.h
index 3ac59b9f88..9c529b5f9a 100644
--- a/src/components/application_manager/include/application_manager/resumption/resume_ctrl_impl.h
+++ b/src/components/application_manager/include/application_manager/resumption/resume_ctrl_impl.h
@@ -44,6 +44,7 @@
#include "application_manager/application.h"
#include "application_manager/event_engine/event_observer.h"
#include "application_manager/resumption/resumption_data.h"
+#include "application_manager/resumption/resumption_data_processor.h"
#include "interfaces/HMI_API.h"
#include "interfaces/HMI_API_schema.h"
#include "interfaces/MOBILE_API_schema.h"
@@ -56,8 +57,7 @@ namespace resumption {
* @brief Contains logic for storage/restore data of applications.
*/
-class ResumeCtrlImpl : public ResumeCtrl,
- public app_mngr::event_engine::EventObserver {
+class ResumeCtrlImpl : public ResumeCtrl {
public:
/**
* @brief allows to create ResumeCtrlImpl object
@@ -70,12 +70,6 @@ class ResumeCtrlImpl : public ResumeCtrl,
~ResumeCtrlImpl();
/**
- * @brief Event, that raised if application get resumption response from HMI
- * @param event : event object, that contains smart_object with HMI message
- */
- void on_event(const app_mngr::event_engine::Event& event) OVERRIDE;
-
- /**
* @brief Save all applications info to the file system
*/
void SaveAllApplications() OVERRIDE;
@@ -89,12 +83,8 @@ class ResumeCtrlImpl : public ResumeCtrl,
/**
* @brief Set application HMI Level and ausio_state as saved
* @param application is application witch HMI Level is need to restore
- * @return true if success, otherwise return false
*/
- bool RestoreAppHMIState(app_mngr::ApplicationSharedPtr application) OVERRIDE;
-
- void RestoreWidgetsHMIState(
- const smart_objects::SmartObject& response_message) OVERRIDE;
+ void RestoreAppHMIState(app_mngr::ApplicationSharedPtr application) OVERRIDE;
/**
* @brief Set application HMI Level as stored in policy
@@ -118,15 +108,6 @@ class ResumeCtrlImpl : public ResumeCtrl,
bool check_policy = true) OVERRIDE;
/**
- * @brief RestoreAppWidgets add widgets for the application
- * @param application application which will be resumed
- * @param saved_app application specific section from backup file
- */
- size_t RestoreAppWidgets(
- application_manager::ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app) OVERRIDE;
-
- /**
* @brief Remove application from list of saved applications
* @param application is application which need to be removed
* @return return true, if success, otherwise return false
@@ -181,21 +162,13 @@ class ResumeCtrlImpl : public ResumeCtrl,
*/
void StopRestoreHmiLevelTimer();
- /**
- * @brief Start timer for resumption applications
- * Restore D1-D5 data
- * @param application that is need to be restored
- * @return true if it was saved, otherwise return false
- */
bool StartResumption(app_mngr::ApplicationSharedPtr application,
- const std::string& hash) OVERRIDE;
+ const std::string& hash,
+ ResumptionCallBack callback) OVERRIDE;
+
+ void HandleOnTimeOut(const uint32_t correlation_id,
+ const hmi_apis::FunctionID::eType) OVERRIDE;
- /**
- * @brief Start timer for resumption applications
- * Does not restore D1-D5 data
- * @param application that is need to be restored
- * @return true if it was saved, otherwise return false
- */
bool StartResumptionOnlyHMILevel(
app_mngr::ApplicationSharedPtr application) OVERRIDE;
@@ -260,9 +233,8 @@ class ResumeCtrlImpl : public ResumeCtrl,
* @brief Resume HMI Level and audio streaming state if needed
* @param application - application to restore hmi level
* and audio streaming state
- * @return true if success otherwise false
*/
- bool StartAppHmiStateResumption(
+ void StartAppHmiStateResumption(
app_mngr::ApplicationSharedPtr application) OVERRIDE;
/**
@@ -310,7 +282,8 @@ class ResumeCtrlImpl : public ResumeCtrl,
const std::string& device_id) const OVERRIDE;
void StartWaitingForDisplayCapabilitiesUpdate(
- app_mngr::ApplicationSharedPtr application) OVERRIDE;
+ app_mngr::ApplicationSharedPtr application,
+ const bool is_resume_app) OVERRIDE;
/**
* @brief geter for launch_time_
@@ -330,6 +303,8 @@ class ResumeCtrlImpl : public ResumeCtrl,
*/
void StartSavePersistentDataTimer() OVERRIDE;
+ ResumptionDataProcessor& resumption_data_processor();
+
#ifdef BUILD_TESTS
void set_resumption_storage(
std::shared_ptr<ResumptionData> mock_storage) OVERRIDE;
@@ -354,9 +329,12 @@ class ResumeCtrlImpl : public ResumeCtrl,
/**
* @brief restores saved data of application
* @param application contains application for which restores data
+ * @param callback callback, which contains logic for sending response
+ * to mobile and updating hash
* @return true if success, otherwise return false
*/
- bool RestoreApplicationData(app_mngr::ApplicationSharedPtr application);
+ bool RestoreApplicationData(app_mngr::ApplicationSharedPtr application,
+ ResumptionCallBack callback);
/**
* @brief SaveDataOnTimer :
@@ -372,67 +350,6 @@ class ResumeCtrlImpl : public ResumeCtrl,
void FinalPersistData();
/**
- * @brief AddFiles allows to add files for the application
- * which should be resumed
- * @param application application which will be resumed
- * @param saved_app application specific section from backup file
- */
- void AddFiles(app_mngr::ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app);
-
- /**
- * @brief AddSubmenues allows to add sub menues for the application
- * which should be resumed
- * @param application application which will be resumed
- * @param saved_app application specific section from backup file
- */
- void AddSubmenues(app_mngr::ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app);
-
- /**
- * @brief AddCommands allows to add commands for the application
- * which should be resumed
- * @param application application which will be resumed
- * @param saved_app application specific section from backup file
- */
- void AddCommands(app_mngr::ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app);
-
- /**
- * @brief AddChoicesets allows to add choice sets for the application
- * which should be resumed
- * @param application application which will be resumed
- * @param saved_app application specific section from backup file
- */
- void AddChoicesets(app_mngr::ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app);
-
- /**
- * @brief SetGlobalProperties allows to restore global properties.
- * @param application application which will be resumed
- * @param saved_app application specific section from backup file
- */
- void SetGlobalProperties(app_mngr::ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app);
-
- /**
- * @brief AddSubscriptions allows to restore subscriptions
- * @param application application which will be resumed
- * @param saved_app application specific section from backup file
- */
- void AddSubscriptions(app_mngr::ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app);
-
- /**
- * @brief AddWayPointsSubscription allows to restore subscription
- * for WayPoints
- * @param application application which will be resumed
- * @param saved_app application specific section from backup file
- */
- void AddWayPointsSubscription(app_mngr::ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app);
-
- /**
* @brief Checks if saved HMI level is allowed for resumption
* by Ignition Cycle restrictions
* @param saved_app application specific section from backup file
@@ -541,21 +458,6 @@ class ResumeCtrlImpl : public ResumeCtrl,
*/
void SetLastIgnOffTime(time_t ign_off_time);
- /**
- * @brief Process specified HMI request
- * @param request Request to process
- * @param use_events Process request events or not flag
- * @return TRUE on success, otherwise FALSE
- */
- bool ProcessHMIRequest(smart_objects::SmartObjectSPtr request = NULL,
- bool use_events = false);
-
- /**
- * @brief Process list of HMI requests using ProcessHMIRequest method
- * @param requests List of requests to process
- */
- void ProcessHMIRequests(const smart_objects::SmartObjectList& requests);
-
void InsertToTimerQueue(uint32_t app_id, uint32_t time_stamp);
/**
@@ -635,6 +537,7 @@ class ResumeCtrlImpl : public ResumeCtrl,
time_t wake_up_time_;
std::shared_ptr<ResumptionData> resumption_storage_;
application_manager::ApplicationManager& application_manager_;
+ std::unique_ptr<ResumptionDataProcessor> resumption_data_processor_;
/**
*@brief Mapping correlation id to request
*wait for on event response from HMI to resume HMI Level
diff --git a/src/components/application_manager/include/application_manager/resumption/resumption_data_processor.h b/src/components/application_manager/include/application_manager/resumption/resumption_data_processor.h
new file mode 100644
index 0000000000..3f55b02ed3
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/resumption/resumption_data_processor.h
@@ -0,0 +1,112 @@
+/*
+ Copyright (c) 2020, Ford Motor Company
+ All rights reserved.
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_RESUMPTION_RESUMPTION_DATA_PROCESSOR_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_RESUMPTION_RESUMPTION_DATA_PROCESSOR_H_
+
+#include "application_manager/application.h"
+#include "application_manager/resumption/resume_ctrl.h"
+#include "application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_rpc_types.h"
+#include "smart_objects/smart_object.h"
+
+namespace resumption {
+
+/**
+ * @brief Determines whether response is successful
+ * judging from type of response received from HMI
+ * @param response from HMI
+ */
+bool IsResponseSuccessful(const smart_objects::SmartObject& response);
+
+/**
+ * @brief The ResumptionRequestID struct contains fields, needed during
+ * processing events, related to responses from HMI to each resumption request
+ */
+using ModuleUid = rc_rpc_plugin::rc_rpc_types::ModuleUid;
+
+struct ResumptionRequestID {
+ hmi_apis::FunctionID::eType function_id;
+ int32_t correlation_id;
+
+ /**
+ * @brief This operator is needed for correct iteration through map, which
+ * contains keys with type ResumptionRequestID
+ */
+ bool operator<(const ResumptionRequestID& other) const;
+};
+
+/**
+ * @brief The ResumptionRequest struct contains information, needed for
+ * processing event, and request message
+ */
+struct ResumptionRequest {
+ ResumptionRequestID request_id;
+ smart_objects::SmartObject message;
+};
+
+/**
+ * @brief Contains logic for the resumption and revert resumption data of
+ * applications.
+ */
+class ResumptionDataProcessor {
+ public:
+ /**
+ * @brief ResumptionDataProcessor class destructor
+ */
+ virtual ~ResumptionDataProcessor() {}
+
+ /**
+ * @brief Running resumption data process from saved_app to application.
+ * @param application application which will be resumed
+ * @param saved_app application specific section from backup file
+ * @param callback function signature to be called when
+ * data resumption will be finished
+ */
+ virtual void Restore(application_manager::ApplicationSharedPtr application,
+ smart_objects::SmartObject& saved_app,
+ ResumeCtrl::ResumptionCallBack callback) = 0;
+
+ /**
+ * @brief Handle restored data when timeout appeared
+ * @param correlation_id Correlation ID from event
+ * @param function_id Function ID from event
+ */
+ virtual void HandleOnTimeOut(
+ const uint32_t correlation_id,
+ const hmi_apis::FunctionID::eType function_id) = 0;
+
+ /**
+ * @brief subscribe to events for the application and save request
+ * @param app_id application id
+ * @param request for saving
+ */
+ virtual void SubscribeToResponse(const int32_t app_id,
+ const ResumptionRequest& request) = 0;
+};
+
+} // namespace resumption
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_RESUMPTION_RESUMPTION_DATA_PROCESSOR_H_
diff --git a/src/components/application_manager/include/application_manager/resumption/resumption_data_processor_impl.h b/src/components/application_manager/include/application_manager/resumption/resumption_data_processor_impl.h
new file mode 100644
index 0000000000..c2040852ca
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/resumption/resumption_data_processor_impl.h
@@ -0,0 +1,393 @@
+/*
+ Copyright (c) 2020, Ford Motor Company
+ All rights reserved.
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_RESUMPTION_RESUMPTION_DATA_PROCESSOR_IMPL_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_RESUMPTION_RESUMPTION_DATA_PROCESSOR_IMPL_H_
+
+#include <functional>
+#include <map>
+#include <vector>
+
+#include "application_manager/application.h"
+#include "application_manager/event_engine/event_observer.h"
+#include "application_manager/resumption/resume_ctrl.h"
+#include "application_manager/resumption/resumption_data_processor.h"
+#include "smart_objects/smart_object.h"
+#include "utils/rwlock.h"
+
+namespace resumption {
+
+namespace app_mngr = application_manager;
+
+/**
+ * @brief ApplicationResumptionStatus contains information about all requests,
+ * which was sent, and results of this operation
+ */
+struct ApplicationResumptionStatus {
+ std::vector<ResumptionRequest> list_of_sent_requests;
+ std::vector<ResumptionRequest> error_requests;
+ std::vector<ResumptionRequest> successful_requests;
+ std::vector<std::string> unsuccessful_vehicle_data_subscriptions_;
+ std::vector<std::string> successful_vehicle_data_subscriptions_;
+ std::vector<ModuleUid> successful_module_subscriptions_;
+ std::vector<ModuleUid> unsuccessful_module_subscriptions_;
+};
+
+/**
+ * @brief Contains logic for the resumption and revert resumption data of
+ * applications.
+ */
+class ResumptionDataProcessorImpl
+ : public ResumptionDataProcessor,
+ public app_mngr::event_engine::EventObserver {
+ public:
+ /**
+ * @brief allows to create ResumptionDataProcessor object
+ */
+ explicit ResumptionDataProcessorImpl(
+ application_manager::ApplicationManager& application_manager);
+
+ /**
+ * @brief allows to destroy ResumptionDataProcessor object
+ */
+ ~ResumptionDataProcessorImpl();
+
+ void Restore(app_mngr::ApplicationSharedPtr application,
+ smart_objects::SmartObject& saved_app,
+ ResumeCtrl::ResumptionCallBack callback) override;
+
+ void on_event(const app_mngr::event_engine::Event& event) override;
+
+ void HandleOnTimeOut(const uint32_t correlation_id,
+ const hmi_apis::FunctionID::eType function_id) override;
+
+ void SubscribeToResponse(const int32_t app_id,
+ const ResumptionRequest& request) override;
+
+ private:
+ /**
+ * @brief GetAppIdWaitingForResponse returns application ID, which corresponds
+ * to function ID and correlation ID from event
+ * @param function_id Function ID
+ * @param corr_id Correlation ID
+ * @return optional object, which contains application ID, or empty optional,
+ * if such ID wasn't found
+ */
+ utils::Optional<uint32_t> GetAppIdWaitingForResponse(
+ const hmi_apis::FunctionID::eType function_id, const int32_t corr_id);
+
+ /**
+ * @brief GetRequest returns ResumptionRequest, which corresponds to
+ * function ID and correlation ID from event
+ * @param app_id ID of application, related to event
+ * @param function_id Function ID
+ * @param corr_id Correlation ID
+ * @return optional object, which contains resumption request, or empty
+ * optional, if such request wasn't found
+ */
+ utils::Optional<ResumptionRequest> GetRequest(
+ const uint32_t app_id,
+ const hmi_apis::FunctionID::eType function_id,
+ const int32_t corr_id);
+
+ /**
+ * @brief ProcessResumptionStatus processes received response to determine
+ * whether it is successful or not
+ * @param app_id ID of application, related to event
+ * @param response reference to response message
+ * @param found_request reference to found request
+ */
+ void ProcessResumptionStatus(const uint32_t app_id,
+ const smart_objects::SmartObject& response,
+ const ResumptionRequest& found_request);
+
+ /**
+ * @brief EraseProcessedRequest erases processed request from list of pending
+ * requests
+ * @param app_id ID of application, related to event
+ * @param found_request reference to found request
+ */
+ void EraseProcessedRequest(const uint32_t app_id,
+ const ResumptionRequest& found_request);
+
+ /**
+ * @brief IsResumptionFinished checks whether some responses are still
+ * waiting
+ * @param app_id ID of application, related to event
+ * @return true, if resumption for this application is finished, or false, if
+ * some requests aren't processed yet
+ */
+ bool IsResumptionFinished(const uint32_t app_id) const;
+
+ /**
+ * @brief IsResumptionSuccessful checks whether overall resumption status
+ * is successful or not
+ * @param app_id ID of application, related to event
+ * @return true, if resumption is successful, false otherwise
+ */
+ bool IsResumptionSuccessful(const uint32_t app_id);
+
+ /**
+ * @brief GetResumptionCallback returns ResumptionCallBack, which was stored
+ * for application, related to event
+ * @param app_id ID of application, related to event
+ * @return optional object, which contains callback, or empty optional,
+ * if callback wasn't found for such application ID
+ */
+ utils::Optional<ResumeCtrl::ResumptionCallBack> GetResumptionCallback(
+ const uint32_t app_id);
+
+ /**
+ * @brief EraseAppResumptionData erases data, needed for resumption, for
+ * given application
+ * @param app_id ID of application, related to event
+ */
+ void EraseAppResumptionData(const uint32_t app_id);
+
+ /**
+ * @brief Processes response message from HMI
+ * @param response reference to response message
+ * @param function_id function id of response
+ * @param corr_id correlation id of response
+ */
+ void ProcessResponseFromHMI(const smart_objects::SmartObject& response,
+ const hmi_apis::FunctionID::eType function_id,
+ const int32_t corr_id);
+
+ /**
+ * @brief Checks whether resumption is successful and finalizes resumption
+ * corresponding to result of this check
+ * @param callback Function to be called when data resumption will be finished
+ * @param app_id ID of application, related to event
+ */
+ void FinalizeResumption(const ResumeCtrl::ResumptionCallBack& callback,
+ const uint32_t app_id);
+ /**
+ * @brief Revert the data to the state before Resumption
+ * @param shared ptr to application
+ */
+ void RevertRestoredData(app_mngr::ApplicationSharedPtr application);
+
+ /**
+ * @brief Process specified HMI message
+ * @param request Message to process
+ * @param subscribe_on_response flag to specify should message events be
+ * processed or not
+ * @return TRUE on success, otherwise FALSE
+ */
+ void ProcessMessageToHMI(smart_objects::SmartObjectSPtr request,
+ bool subscribe_on_response);
+
+ /**
+ * @brief Process list of HMI messages using ProcessHMIRequest method
+ * @param messages List of messages to process
+ */
+ void ProcessMessagesToHMI(const smart_objects::SmartObjectList& messages);
+
+ /**
+ * @brief AddFiles allows to add files for the application
+ * which should be resumed
+ * @param application application which will be resumed
+ * @param saved_app application specific section from backup file
+ */
+ void AddFiles(app_mngr::ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app);
+
+ /**
+ * @brief AddWindows allows to add widget windows for the application
+ * @param application application which will be resumed
+ * @param saved_app application specific section from backup file
+ */
+ void AddWindows(app_mngr::ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app);
+
+ /**
+ * @brief AddSubmenus allows to add sub-menus for the application
+ * which should be resumed
+ * @param application application which will be resumed
+ * @param saved_app application specific section from backup file
+ */
+ void AddSubmenus(app_mngr::ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app);
+
+ /**
+ * @brief Deleting sub-menus that have been resumed
+ * @param shared ptr to application
+ */
+ void DeleteSubmenus(app_mngr::ApplicationSharedPtr application);
+
+ /**
+ * @brief AddCommands allows to add commands for the application
+ * which should be resumed
+ * @param application application which will be resumed
+ * @param saved_app application specific section from backup file
+ */
+ void AddCommands(app_mngr::ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app);
+
+ /**
+ * @brief Deleting all commands that have been resumed
+ * @param shared ptr to application
+ */
+ void DeleteCommands(app_mngr::ApplicationSharedPtr application);
+
+ /**
+ * @brief AddChoicesets allows to add choice sets for the application
+ * which should be resumed
+ * @param application application which will be resumed
+ * @param saved_app application specific section from backup file
+ */
+ void AddChoicesets(app_mngr::ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app);
+
+ /**
+ * @brief Deleting choice sets that have been resumed
+ * @param shared ptr to application
+ */
+ void DeleteChoicesets(app_mngr::ApplicationSharedPtr application);
+
+ /**
+ * @brief SetGlobalProperties allows to restore global properties.
+ * @param application application which will be resumed
+ * @param saved_app application specific section from backup file
+ */
+ void SetGlobalProperties(app_mngr::ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app);
+
+ /**
+ * @brief Reset global properties that have been resumed
+ * @param shared ptr to application
+ */
+ void DeleteGlobalProperties(app_mngr::ApplicationSharedPtr application);
+
+ /**
+ * @brief AddSubscriptions allows to restore subscriptions
+ * @param application application which will be resumed
+ * @param saved_app application specific section from backup file
+ */
+ void AddSubscriptions(app_mngr::ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app);
+
+ /**
+ * @brief AddSubscriptions allows to restore subscriptions
+ * @param application application which will be resumed
+ * @param saved_app application specific section from backup file
+ */
+ void AddButtonsSubscriptions(app_mngr::ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app);
+
+ /**
+ * @brief AddSubscriptions allows to restore subscriptions
+ * @param application application which will be resumed
+ * @param saved_app application specific section from backup file
+ */
+ void AddPluginsSubscriptions(app_mngr::ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app);
+
+ /**
+ * @brief Deleting subscriptions have been resumed
+ * @param shared ptr to application
+ */
+ void DeleteSubscriptions(app_mngr::ApplicationSharedPtr application);
+
+ /**
+ * @brief Deleting buttons subscriptions have been resumed
+ * @param shared ptr to application
+ */
+ void DeleteButtonsSubscriptions(app_mngr::ApplicationSharedPtr application);
+
+ /**
+ * @brief Deleting plugins subscriptions have been resumed
+ * @param app_id application id
+ */
+ void DeletePluginsSubscriptions(app_mngr::ApplicationSharedPtr application);
+
+ /**
+ * @brief Deletting subscription for CreateWindow have been resumed
+ * @param shared ptr to application
+ */
+ void DeleteWindowsSubscriptions(app_mngr::ApplicationSharedPtr application);
+
+ /**
+ * @brief Get button subscriptions that need to be resumed.
+ * Since some subscriptions can be set by default during
+ * app registration, this function is needed to discard subscriptions
+ * that do not need to be resumed
+ * @param application which subscriptions to resume
+ */
+ app_mngr::ButtonSubscriptions GetButtonSubscriptionsToResume(
+ app_mngr::ApplicationSharedPtr application) const;
+
+ /**
+ * @brief Checks whether SubscribeVehicleData response successful or not and
+ * handles it
+ * @param request reference to request SO
+ * @param response reference to response SO
+ * @param status reference to struct, which stores informaion about
+ * successful and unsuccessful subscriptions to vehicle data
+ */
+ void CheckVehicleDataResponse(const smart_objects::SmartObject& request,
+ const smart_objects::SmartObject& response,
+ ApplicationResumptionStatus& status);
+
+ void CheckModuleDataSubscription(const smart_objects::SmartObject& request,
+ const smart_objects::SmartObject& response,
+ ApplicationResumptionStatus& status);
+
+ /**
+ * @brief Checks whether CreateWindow response successful or not and handles
+ * it
+ * @param request reference to request SO
+ * @param response reference to response SO
+ */
+ void CheckCreateWindowResponse(
+ const smart_objects::SmartObject& request,
+ const smart_objects::SmartObject& response) const;
+
+ app_mngr::ApplicationManager& application_manager_;
+
+ /**
+ * @brief A map of the IDs and Application Resumption Status for these ID
+ **/
+ std::map<std::int32_t, ApplicationResumptionStatus> resumption_status_;
+ mutable sync_primitives::RWLock resumption_status_lock_;
+
+ /**
+ * @brief A map of callbacks used when resumption is finished
+ */
+ std::map<std::int32_t, ResumeCtrl::ResumptionCallBack> register_callbacks_;
+ mutable sync_primitives::RWLock register_callbacks_lock_;
+
+ /**
+ * @brief A map of sent requests and corresponding app_id
+ */
+ std::map<ResumptionRequestID, std::uint32_t> request_app_ids_;
+ mutable sync_primitives::RWLock request_app_ids_lock_;
+};
+
+} // namespace resumption
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_RESUMPTION_RESUMPTION_DATA_PROCESSOR_IMPL_H_
diff --git a/src/components/application_manager/include/application_manager/rpc_handler_impl.h b/src/components/application_manager/include/application_manager/rpc_handler_impl.h
index 11ac1745ee..ab140dbd8a 100644
--- a/src/components/application_manager/include/application_manager/rpc_handler_impl.h
+++ b/src/components/application_manager/include/application_manager/rpc_handler_impl.h
@@ -176,6 +176,7 @@ class RPCHandlerImpl : public RPCHandler,
bool ConvertMessageToSO(const Message& message,
smart_objects::SmartObject& output,
+ std::string& out_warning_info,
const bool allow_unknown_parameters = false,
const bool validate_params = true);
std::shared_ptr<Message> ConvertRawMsgToMessage(
diff --git a/src/components/application_manager/include/application_manager/rpc_service_impl.h b/src/components/application_manager/include/application_manager/rpc_service_impl.h
index 3e3d83a519..a535198ca1 100644
--- a/src/components/application_manager/include/application_manager/rpc_service_impl.h
+++ b/src/components/application_manager/include/application_manager/rpc_service_impl.h
@@ -122,9 +122,15 @@ class RPCServiceImpl : public RPCService,
bool ManageMobileCommand(const commands::MessageSharedPtr message,
commands::Command::CommandSource source) OVERRIDE;
+ bool ManageMobileCommand(const commands::MessageSharedPtr message,
+ commands::Command::CommandSource source,
+ const std::string warning_info) OVERRIDE;
bool ManageHMICommand(const commands::MessageSharedPtr message,
commands::Command::CommandSource source =
commands::Command::SOURCE_HMI) OVERRIDE;
+ bool ManageHMICommand(const commands::MessageSharedPtr message,
+ commands::Command::CommandSource source,
+ const std::string warning_info) OVERRIDE;
// CALLED ON messages_to_hmi_ thread!
void Handle(const impl::MessageToHmi message) OVERRIDE;
diff --git a/src/components/application_manager/include/application_manager/smart_object_keys.h b/src/components/application_manager/include/application_manager/smart_object_keys.h
index 19dd6fbe3b..c96c9ebe69 100644
--- a/src/components/application_manager/include/application_manager/smart_object_keys.h
+++ b/src/components/application_manager/include/application_manager/smart_object_keys.h
@@ -119,6 +119,7 @@ extern const char* num_ticks;
extern const char* slider_footer;
extern const char* menu_id;
extern const char* menu_name;
+extern const char* parent_id;
extern const char* menu_layout;
extern const char* menu_layouts_available;
extern const char* interaction_choice_set_id;
@@ -197,6 +198,8 @@ extern const char* navigation_capability;
extern const char* phone_capability;
extern const char* video_streaming_capability;
extern const char* rc_capability;
+extern const char* driver_distraction_capability;
+extern const char* driver_distraction;
extern const char* seat_location_capability;
extern const char* app_services_capabilities;
extern const char* day_color_scheme;
@@ -296,6 +299,7 @@ extern const char* cloud_app_vehicle_id;
extern const char* external_temp;
extern const char* turn_signal;
extern const char* vin;
+extern const char* gearStatus;
extern const char* prndl;
extern const char* tire_pressure;
extern const char* odometer;
@@ -309,6 +313,7 @@ extern const char* head_lamp_status;
extern const char* engine_torque;
extern const char* acc_pedal_pos;
extern const char* steering_wheel_angle;
+extern const char* stability_controls_status;
extern const char* e_call_info;
extern const char* airbag_status;
extern const char* emergency_event;
@@ -334,6 +339,8 @@ extern const char* system_software_version;
extern const char* priority;
extern const char* engine_oil_life;
extern const char* oem_custom_data_type;
+extern const char* window_status;
+extern const char* hands_off_steering;
// app services
extern const char* app_service_manifest;
@@ -479,6 +486,19 @@ extern const char* const x;
extern const char* const y;
} // namespace strings
+namespace hmi_interface {
+extern const char* basic_communication;
+extern const char* buttons;
+extern const char* navigation;
+extern const char* sdl;
+extern const char* tts;
+extern const char* ui;
+extern const char* vr;
+extern const char* rc;
+extern const char* vehicle_info;
+extern const char* app_service;
+} // namespace hmi_interface
+
namespace json {
extern const char* appId;
extern const char* name;
@@ -590,6 +610,7 @@ extern const char* capabilities;
extern const char* speech_capabilities;
extern const char* prerecorded_speech_capabilities;
extern const char* preset_bank_capabilities;
+extern const char* on_screen_presets_available;
extern const char* allowed;
extern const char* vehicle_type;
extern const char* did_result;
diff --git a/src/components/application_manager/include/application_manager/state_controller_impl.h b/src/components/application_manager/include/application_manager/state_controller_impl.h
index c6121f5d1d..4dc4c1ad7d 100644
--- a/src/components/application_manager/include/application_manager/state_controller_impl.h
+++ b/src/components/application_manager/include/application_manager/state_controller_impl.h
@@ -35,6 +35,7 @@
#include <list>
#include <map>
+#include <unordered_set>
#include "application_manager/application.h"
#include "application_manager/application_manager.h"
#include "application_manager/hmi_state.h"
@@ -125,6 +126,14 @@ class StateControllerImpl : public event_engine::EventObserver,
void ActivateDefaultWindow(ApplicationSharedPtr app) OVERRIDE;
void ExitDefaultWindow(ApplicationSharedPtr app) OVERRIDE;
+ void DeactivateApp(ApplicationSharedPtr app,
+ const WindowID window_id) OVERRIDE;
+
+ void ResumePostponedWindows(const uint32_t app_id) OVERRIDE;
+
+ void DropPostponedWindows(const uint32_t app_id) OVERRIDE;
+
+ PostponedActivationController& GetPostponedActivationController() OVERRIDE;
private:
int64_t RequestHMIStateChange(ApplicationConstSharedPtr app,
@@ -274,13 +283,6 @@ class StateControllerImpl : public event_engine::EventObserver,
void TempStateStopped(HmiState::StateID ID);
/**
- * @brief Sets BACKGROUND or LIMITED hmi level to application
- * depends on application type
- * @param app Application to deactivate
- */
- void DeactivateApp(ApplicationSharedPtr app, const WindowID window_id);
-
- /**
* Function to remove temporary HmiState for application
*/
template <HmiState::StateID ID>
@@ -426,7 +428,15 @@ class StateControllerImpl : public event_engine::EventObserver,
StateIDList active_states_;
mutable sync_primitives::Lock active_states_lock_;
std::map<uint32_t, HmiStatePtr> waiting_for_response_;
+
+ typedef std::pair<WindowID, HmiStatePtr> WindowStatePair;
+ typedef std::list<WindowStatePair> WindowStatePairs;
+ std::map<uint32_t, WindowStatePairs> postponed_app_widgets_;
+
+ std::unordered_set<uint32_t> apps_with_pending_hmistatus_notification_;
+ mutable sync_primitives::Lock apps_with_pending_hmistatus_notification_lock_;
ApplicationManager& app_mngr_;
+ PostponedActivationController postponed_activation_controller_;
};
} // namespace application_manager
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/app_service_app_extension.h b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/app_service_app_extension.h
index b04edbe2f4..8d307325fc 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/app_service_app_extension.h
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/app_service_app_extension.h
@@ -97,19 +97,12 @@ class AppServiceAppExtension : public app_mngr::AppExtension {
*/
AppServiceSubscriptions Subscriptions();
- /**
- * @brief SaveResumptionData saves vehicle info data
- * @param resumption_data plase to store resumption data
- */
void SaveResumptionData(ns_smart_device_link::ns_smart_objects::SmartObject&
resumption_data) OVERRIDE;
- /**
- * @brief ProcessResumption load resumtion data back to plugin during
- * resumption
- * @param resumption_data resumption data
- */
- void ProcessResumption(
+ void ProcessResumption(const smart_objects::SmartObject& saved_app) OVERRIDE;
+
+ void RevertResumption(
const smart_objects::SmartObject& resumption_data) OVERRIDE;
/**
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/app_service_rpc_plugin.h b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/app_service_rpc_plugin.h
index 5d85237899..444636ed75 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/app_service_rpc_plugin.h
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/app_service_rpc_plugin.h
@@ -34,6 +34,7 @@
#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_PLUGIN_INCLUDE_APP_SERVICE_PLUGIN_APP_SERVICE_RPC_PLUGIN_H
#include "application_manager/command_factory.h"
+#include "utils/ilogger.h"
namespace app_service_rpc_plugin {
namespace app_mngr = application_manager;
@@ -75,7 +76,8 @@ class AppServiceRpcPlugin : public plugins::RPCPlugin {
};
} // namespace app_service_rpc_plugin
-extern "C" application_manager::plugin_manager::RPCPlugin* Create();
+extern "C" application_manager::plugin_manager::RPCPlugin* Create(
+ logger::Logger* logger_instance);
extern "C" void Delete(application_manager::plugin_manager::RPCPlugin* data);
#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_PLUGIN_INCLUDE_APP_SERVICE_PLUGIN_APP_SERVICE_PLUGIN_H
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_app_extension.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_app_extension.cc
index 87f947d250..5a1815d974 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_app_extension.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_app_extension.cc
@@ -32,8 +32,9 @@
#include "app_service_rpc_plugin/app_service_app_extension.h"
#include "app_service_rpc_plugin/app_service_rpc_plugin.h"
+#include "application_manager/include/application_manager/smart_object_keys.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "AppServiceRpcPlugin")
+SDL_CREATE_LOG_VARIABLE("AppServiceRpcPlugin")
namespace app_service_rpc_plugin {
@@ -44,22 +45,22 @@ AppServiceAppExtension::AppServiceAppExtension(
: app_mngr::AppExtension(AppServiceAppExtensionUID)
, plugin_(plugin)
, app_(app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
AppServiceAppExtension::~AppServiceAppExtension() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
bool AppServiceAppExtension::SubscribeToAppService(
const std::string app_service_type) {
- LOG4CXX_DEBUG(logger_, "Subscribe to app service: " << app_service_type);
+ SDL_LOG_DEBUG("Subscribe to app service: " << app_service_type);
return subscribed_data_.insert(app_service_type).second;
}
bool AppServiceAppExtension::UnsubscribeFromAppService(
const std::string app_service_type) {
- LOG4CXX_DEBUG(logger_, app_service_type);
+ SDL_LOG_DEBUG(app_service_type);
auto it = subscribed_data_.find(app_service_type);
if (it != subscribed_data_.end()) {
subscribed_data_.erase(it);
@@ -69,14 +70,13 @@ bool AppServiceAppExtension::UnsubscribeFromAppService(
}
void AppServiceAppExtension::UnsubscribeFromAppService() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
subscribed_data_.clear();
}
bool AppServiceAppExtension::IsSubscribedToAppService(
const std::string app_service_type) const {
- LOG4CXX_DEBUG(logger_,
- "isSubscribedToAppService for type: " << app_service_type);
+ SDL_LOG_DEBUG("isSubscribedToAppService for type: " << app_service_type);
return subscribed_data_.find(app_service_type) != subscribed_data_.end();
}
@@ -86,22 +86,25 @@ AppServiceSubscriptions AppServiceAppExtension::Subscriptions() {
void AppServiceAppExtension::SaveResumptionData(
smart_objects::SmartObject& resumption_data) {
- const char* app_service_info = "appService";
- resumption_data[app_service_info] =
+ resumption_data[app_mngr::hmi_interface::app_service] =
smart_objects::SmartObject(smart_objects::SmartType_Array);
int i = 0;
for (const auto& subscription : subscribed_data_) {
- resumption_data[app_service_info][i] = subscription;
+ resumption_data[app_mngr::hmi_interface::app_service][i] = subscription;
i++;
}
}
void AppServiceAppExtension::ProcessResumption(
- const smart_objects::SmartObject& resumption_data) {
- const char* app_service_info = "appService";
- if (resumption_data.keyExists(app_service_info)) {
+ const smart_objects::SmartObject& saved_app) {
+ SDL_LOG_AUTO_TRACE();
+
+ const auto& subscriptions =
+ saved_app[application_manager::strings::application_subscriptions];
+
+ if (subscriptions.keyExists(app_mngr::hmi_interface::app_service)) {
const smart_objects::SmartObject& subscriptions_app_services =
- resumption_data[app_service_info];
+ subscriptions[app_mngr::hmi_interface::app_service];
for (size_t i = 0; i < subscriptions_app_services.length(); ++i) {
std::string service_type = subscriptions_app_services[i].asString();
SubscribeToAppService(service_type);
@@ -109,6 +112,15 @@ void AppServiceAppExtension::ProcessResumption(
}
}
+void AppServiceAppExtension::RevertResumption(
+ const smart_objects::SmartObject& resumption_data) {
+ SDL_LOG_AUTO_TRACE();
+
+ UNUSED(resumption_data);
+ // ToDo: implementation is blocked by
+ // https://github.com/smartdevicelink/sdl_core/issues/3470
+}
+
AppServiceAppExtension& AppServiceAppExtension::ExtractASExtension(
application_manager::Application& app) {
auto ext_ptr = app.QueryInterface(AppServiceAppExtensionUID);
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_command_factory.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_command_factory.cc
index 8ce4d10b6e..ff40b587cb 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_command_factory.cc
@@ -32,7 +32,7 @@
#include "app_service_rpc_plugin/app_service_command_factory.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "AppServiceRpcPlugin")
+SDL_CREATE_LOG_VARIABLE("AppServiceRpcPlugin")
namespace app_service_rpc_plugin {
@@ -45,11 +45,11 @@ AppServiceCommandFactory::AppServiceCommandFactory(
application_manager, rpc_service, hmi_capabilities, policy_handler))
, mobile_command_factory_(new AppServiceMobileCommandFactory(
application_manager, rpc_service, hmi_capabilities, policy_handler)) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
AppServiceCommandFactory::~AppServiceCommandFactory() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
app_mngr::CommandSharedPtr AppServiceCommandFactory::CreateCommand(
@@ -66,8 +66,7 @@ app_mngr::CommandSharedPtr AppServiceCommandFactory::CreateCommand(
bool AppServiceCommandFactory::IsAbleToProcess(
const int32_t function_id,
const commands::Command::CommandSource source) const {
- LOG4CXX_DEBUG(logger_,
- "AppServiceCommandFactory::IsAbleToProcess" << function_id
+ SDL_LOG_DEBUG("AppServiceCommandFactory::IsAbleToProcess" << function_id
<< " " << source);
return (commands::Command::SOURCE_HMI == source ||
commands::Command::SOURCE_SDL_TO_HMI == source)
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc
index 3090ea8ced..1e468242af 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc
@@ -55,7 +55,7 @@
#include "app_service_rpc_plugin/commands/hmi/on_as_app_service_data_notification.h"
#include "app_service_rpc_plugin/commands/hmi/on_as_app_service_data_notification_from_hmi.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "AppServiceRpcPlugin")
+SDL_CREATE_LOG_VARIABLE("AppServiceRpcPlugin")
namespace app_service_rpc_plugin {
namespace strings = app_mngr::strings;
@@ -69,7 +69,7 @@ AppServiceHmiCommandFactory::AppServiceHmiCommandFactory(
, rpc_service_(rpc_service)
, hmi_capabilities_(hmi_capabilities)
, policy_handler_(policy_handler) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
app_mngr::CommandSharedPtr AppServiceHmiCommandFactory::CreateCommand(
@@ -95,9 +95,8 @@ app_mngr::CommandSharedPtr AppServiceHmiCommandFactory::CreateCommand(
}
UNUSED(message_type_str);
- LOG4CXX_DEBUG(logger_,
- "HMICommandFactory::CreateCommand function_id: "
- << function_id << ", message type: " << message_type_str);
+ SDL_LOG_DEBUG("HMICommandFactory::CreateCommand function_id: "
+ << function_id << ", message type: " << message_type_str);
return buildCommandCreator(function_id, message_type, source).create(message);
}
@@ -105,8 +104,7 @@ app_mngr::CommandSharedPtr AppServiceHmiCommandFactory::CreateCommand(
bool AppServiceHmiCommandFactory::IsAbleToProcess(
const int32_t function_id,
const app_mngr::commands::Command::CommandSource source) const {
- LOG4CXX_DEBUG(logger_,
- "HMI App Service Plugin IsAbleToProcess: " << function_id);
+ SDL_LOG_DEBUG("HMI App Service Plugin IsAbleToProcess: " << function_id);
UNUSED(source);
return buildCommandCreator(
function_id, hmi_apis::messageType::INVALID_ENUM, source)
@@ -120,8 +118,7 @@ app_mngr::CommandCreator& AppServiceHmiCommandFactory::buildCommandCreator(
auto factory = app_mngr::CommandCreatorFactory(
application_manager_, rpc_service_, hmi_capabilities_, policy_handler_);
- LOG4CXX_DEBUG(logger_,
- "buildCommandCreator: " << function_id << " " << source);
+ SDL_LOG_DEBUG("buildCommandCreator: " << function_id << " " << source);
switch (function_id) {
case hmi_apis::FunctionID::AppService_PublishAppService:
@@ -191,7 +188,7 @@ app_mngr::CommandCreator& AppServiceHmiCommandFactory::buildCommandCreator(
: factory.GetCreator<
commands::ASGetActiveServiceConsentResponse>();
default:
- LOG4CXX_WARN(logger_, "Unsupported HMI function_id: " << function_id);
+ SDL_LOG_WARN("Unsupported HMI function_id: " << function_id);
}
return factory.GetCreator<app_mngr::InvalidCommand>();
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc
index 5c44fb5fae..4a2fe5c2c9 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc
@@ -50,7 +50,7 @@
#include "app_service_rpc_plugin/commands/mobile/unpublish_app_service_request.h"
#include "app_service_rpc_plugin/commands/mobile/unpublish_app_service_response.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "AppServiceRpcPlugin")
+SDL_CREATE_LOG_VARIABLE("AppServiceRpcPlugin")
namespace app_service_rpc_plugin {
namespace strings = app_mngr::strings;
@@ -64,7 +64,7 @@ AppServiceMobileCommandFactory::AppServiceMobileCommandFactory(
, rpc_service_(rpc_service)
, hmi_capabilities_(hmi_capabilities)
, policy_handler_(policy_handler) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
app_mngr::CommandSharedPtr AppServiceMobileCommandFactory::CreateCommand(
@@ -88,9 +88,8 @@ app_mngr::CommandSharedPtr AppServiceMobileCommandFactory::CreateCommand(
}
UNUSED(message_type_str);
- LOG4CXX_DEBUG(logger_,
- "HMICommandFactory::CreateCommand function_id: "
- << function_id << ", message type: " << message_type_str);
+ SDL_LOG_DEBUG("HMICommandFactory::CreateCommand function_id: "
+ << function_id << ", message type: " << message_type_str);
return buildCommandCreator(function_id, message_type, source).create(message);
}
@@ -170,7 +169,7 @@ app_mngr::CommandCreator& AppServiceMobileCommandFactory::buildCommandCreator(
}
break;
default:
- LOG4CXX_WARN(logger_, "Unsupported function_id: " << function_id);
+ SDL_LOG_WARN("Unsupported function_id: " << function_id);
}
return factory.GetCreator<app_mngr::InvalidCommand>();
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_rpc_plugin.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_rpc_plugin.cc
index 1c3a9c77c5..e03973614d 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_rpc_plugin.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_rpc_plugin.cc
@@ -38,7 +38,7 @@
#include "application_manager/smart_object_keys.h"
namespace app_service_rpc_plugin {
-CREATE_LOGGERPTR_GLOBAL(logger_, "AppServiceRpcPlugin")
+SDL_CREATE_LOG_VARIABLE("AppServiceRpcPlugin")
namespace strings = application_manager::strings;
namespace plugins = application_manager::plugin_manager;
@@ -107,14 +107,15 @@ void AppServiceRpcPlugin::DeleteSubscriptions(
} // namespace app_service_rpc_plugin
-extern "C" __attribute__((visibility("default")))
-application_manager::plugin_manager::RPCPlugin*
-Create() {
+using RPCPlugin = application_manager::plugin_manager::RPCPlugin;
+// cppcheck-suppress unusedFunction
+extern "C" __attribute__((visibility("default"))) RPCPlugin* Create(
+ logger::Logger* logger_instance) {
+ logger::Logger::instance(logger_instance);
return new app_service_rpc_plugin::AppServiceRpcPlugin();
}
-extern "C" __attribute__((visibility("default"))) void Delete(
- application_manager::plugin_manager::RPCPlugin* data) {
+// cppcheck-suppress unusedFunction
+extern "C" __attribute__((visibility("default"))) void Delete(RPCPlugin* data) {
delete data;
- DELETE_THREAD_LOGGER(app_service_rpc_plugin::logger_);
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_request.cc
index fd7312ca98..d9cf7acf1b 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_request.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_request.cc
@@ -38,6 +38,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASAppServiceActivationRequest::ASAppServiceActivationRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ ASAppServiceActivationRequest::ASAppServiceActivationRequest(
ASAppServiceActivationRequest::~ASAppServiceActivationRequest() {}
void ASAppServiceActivationRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
AppServiceManager& service_manager =
application_manager_.GetAppServiceManager();
smart_objects::SmartObject params = (*message_)[strings::msg_params];
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_response.cc
index c77d3ed381..434fad51e9 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_response.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_app_service_activation_response.cc
@@ -36,6 +36,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASAppServiceActivationResponse::ASAppServiceActivationResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ ASAppServiceActivationResponse::ASAppServiceActivationResponse(
ASAppServiceActivationResponse::~ASAppServiceActivationResponse() {}
void ASAppServiceActivationResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToHMI(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_request.cc
index b1f3d6fdbf..e80c5f741c 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_request.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_request.cc
@@ -36,6 +36,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASGetActiveServiceConsentRequest::ASGetActiveServiceConsentRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ ASGetActiveServiceConsentRequest::ASGetActiveServiceConsentRequest(
ASGetActiveServiceConsentRequest::~ASGetActiveServiceConsentRequest() {}
void ASGetActiveServiceConsentRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_response.cc
index 038c2922ad..5e59c9f3ab 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_response.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_active_service_consent_response.cc
@@ -36,6 +36,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASGetActiveServiceConsentResponse::ASGetActiveServiceConsentResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ ASGetActiveServiceConsentResponse::ASGetActiveServiceConsentResponse(
ASGetActiveServiceConsentResponse::~ASGetActiveServiceConsentResponse() {}
void ASGetActiveServiceConsentResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(
hmi_apis::FunctionID::AppService_GetActiveServiceConsent);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc
index e03c0ad15a..32fccb0192 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc
@@ -43,6 +43,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASGetAppServiceDataRequestFromHMI::ASGetAppServiceDataRequestFromHMI(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -58,12 +60,12 @@ ASGetAppServiceDataRequestFromHMI::ASGetAppServiceDataRequestFromHMI(
ASGetAppServiceDataRequestFromHMI::~ASGetAppServiceDataRequestFromHMI() {}
void ASGetAppServiceDataRequestFromHMI::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::string service_type =
(*message_)[strings::msg_params][strings::service_type].asString();
- LOG4CXX_DEBUG(logger_, "Get Service Type: " << service_type);
+ SDL_LOG_DEBUG("Get Service Type: " << service_type);
SendProviderRequest(mobile_apis::FunctionID::GetAppServiceDataID,
hmi_apis::FunctionID::AppService_GetAppServiceData,
@@ -172,8 +174,7 @@ void ASGetAppServiceDataRequestFromHMI::GetMediaImagePaths(
bool ASGetAppServiceDataRequestFromHMI::ValidateResponse(
smart_objects::SmartObject& message_params) {
if (!message_params.keyExists(strings::service_data)) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"GASD response received without any service data, passing through");
return true;
}
@@ -185,8 +186,7 @@ bool ASGetAppServiceDataRequestFromHMI::ValidateResponse(
auto service =
application_manager_.GetAppServiceManager().FindServiceByID(service_id);
if (!service) {
- LOG4CXX_ERROR(logger_,
- "GASD response received with an unpublished service ID");
+ SDL_LOG_ERROR("GASD response received with an unpublished service ID");
SendErrorResponse(
correlation_id(),
hmi_apis::FunctionID::AppService_GetAppServiceData,
@@ -202,8 +202,7 @@ bool ASGetAppServiceDataRequestFromHMI::ValidateResponse(
service_type, &service_type_value)) {
auto app = application_manager_.application(service->connection_key);
if (!app) {
- LOG4CXX_ERROR(logger_,
- "Failed to find service provider for GASD response");
+ SDL_LOG_ERROR("Failed to find service provider for GASD response");
SendErrorResponse(
correlation_id(),
hmi_apis::FunctionID::AppService_GetAppServiceData,
@@ -277,7 +276,7 @@ void ASGetAppServiceDataRequestFromHMI::on_event(
}
void ASGetAppServiceDataRequestFromHMI::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendErrorResponse(correlation_id(),
hmi_apis::FunctionID::AppService_GetAppServiceData,
hmi_apis::Common_Result::GENERIC_ERROR,
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_to_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_to_hmi.cc
index 635cd7319a..e0b99105d7 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_to_hmi.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_to_hmi.cc
@@ -38,6 +38,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASGetAppServiceDataRequestToHMI::ASGetAppServiceDataRequestToHMI(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ ASGetAppServiceDataRequestToHMI::ASGetAppServiceDataRequestToHMI(
ASGetAppServiceDataRequestToHMI::~ASGetAppServiceDataRequestToHMI() {}
void ASGetAppServiceDataRequestToHMI::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_from_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_from_hmi.cc
index c0b1b274fb..853c382f46 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_from_hmi.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_from_hmi.cc
@@ -41,6 +41,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASGetAppServiceDataResponseFromHMI::ASGetAppServiceDataResponseFromHMI(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ ASGetAppServiceDataResponseFromHMI::ASGetAppServiceDataResponseFromHMI(
ASGetAppServiceDataResponseFromHMI::~ASGetAppServiceDataResponseFromHMI() {}
void ASGetAppServiceDataResponseFromHMI::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::AppService_GetAppServiceData);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_to_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_to_hmi.cc
index b489ec4765..6c53feb68f 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_to_hmi.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_response_to_hmi.cc
@@ -38,6 +38,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASGetAppServiceDataResponseToHMI::ASGetAppServiceDataResponseToHMI(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ ASGetAppServiceDataResponseToHMI::ASGetAppServiceDataResponseToHMI(
ASGetAppServiceDataResponseToHMI::~ASGetAppServiceDataResponseToHMI() {}
void ASGetAppServiceDataResponseToHMI::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToHMI(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_request.cc
index fa704c1995..ac3666bf2e 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_request.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_request.cc
@@ -38,6 +38,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASGetAppServiceRecordsRequest::ASGetAppServiceRecordsRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ ASGetAppServiceRecordsRequest::ASGetAppServiceRecordsRequest(
ASGetAppServiceRecordsRequest::~ASGetAppServiceRecordsRequest() {}
void ASGetAppServiceRecordsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::string type;
if ((*message_)[strings::msg_params].keyExists(strings::service_type)) {
type = (*message_)[strings::msg_params][strings::service_type].asString();
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_response.cc
index 0479aa8d31..f5f45d23f1 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_response.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_response.cc
@@ -36,6 +36,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASGetAppServiceRecordsResponse::ASGetAppServiceRecordsResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ ASGetAppServiceRecordsResponse::ASGetAppServiceRecordsResponse(
ASGetAppServiceRecordsResponse::~ASGetAppServiceRecordsResponse() {}
void ASGetAppServiceRecordsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToHMI(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_from_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_from_hmi.cc
index 6499b08c28..f5a1aac05c 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_from_hmi.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_from_hmi.cc
@@ -39,6 +39,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASPerformAppServiceInteractionRequestFromHMI::
ASPerformAppServiceInteractionRequestFromHMI(
const application_manager::commands::MessageSharedPtr& message,
@@ -56,7 +58,7 @@ ASPerformAppServiceInteractionRequestFromHMI::
~ASPerformAppServiceInteractionRequestFromHMI() {}
void ASPerformAppServiceInteractionRequestFromHMI::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
std::string hmi_origin_id =
@@ -148,7 +150,7 @@ void ASPerformAppServiceInteractionRequestFromHMI::on_event(
}
void ASPerformAppServiceInteractionRequestFromHMI::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject response_params;
response_params[strings::info] =
"The provider did not respond to the request";
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_to_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_to_hmi.cc
index 22876328de..a0f5d69ed8 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_to_hmi.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_to_hmi.cc
@@ -36,6 +36,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASPerformAppServiceInteractionRequestToHMI::
ASPerformAppServiceInteractionRequestToHMI(
const application_manager::commands::MessageSharedPtr& message,
@@ -53,7 +55,7 @@ ASPerformAppServiceInteractionRequestToHMI::
~ASPerformAppServiceInteractionRequestToHMI() {}
void ASPerformAppServiceInteractionRequestToHMI::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_from_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_from_hmi.cc
index a2ffa65a73..c8608588c0 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_from_hmi.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_from_hmi.cc
@@ -36,6 +36,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASPerformAppServiceInteractionResponseFromHMI::
ASPerformAppServiceInteractionResponseFromHMI(
const application_manager::commands::MessageSharedPtr& message,
@@ -53,7 +55,7 @@ ASPerformAppServiceInteractionResponseFromHMI::
~ASPerformAppServiceInteractionResponseFromHMI() {}
void ASPerformAppServiceInteractionResponseFromHMI::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(
hmi_apis::FunctionID::AppService_PerformAppServiceInteraction);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_to_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_to_hmi.cc
index 5ddef55c2a..45d6a15999 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_to_hmi.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_response_to_hmi.cc
@@ -36,6 +36,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASPerformAppServiceInteractionResponseToHMI::
ASPerformAppServiceInteractionResponseToHMI(
const application_manager::commands::MessageSharedPtr& message,
@@ -53,7 +55,7 @@ ASPerformAppServiceInteractionResponseToHMI::
~ASPerformAppServiceInteractionResponseToHMI() {}
void ASPerformAppServiceInteractionResponseToHMI::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToHMI(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc
index 35a3e8a6b3..156530f9e3 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc
@@ -39,6 +39,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASPublishAppServiceRequest::ASPublishAppServiceRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,8 +56,8 @@ ASPublishAppServiceRequest::ASPublishAppServiceRequest(
ASPublishAppServiceRequest::~ASPublishAppServiceRequest() {}
void ASPublishAppServiceRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Received a PublishAppService request from HMI");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Received a PublishAppService request from HMI");
smart_objects::SmartObject response_params =
smart_objects::SmartObject(smart_objects::SmartType_Map);
smart_objects::SmartObject manifest =
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_response.cc
index c143315b8c..49d3968cef 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_response.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_response.cc
@@ -37,6 +37,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASPublishAppServiceResponse::ASPublishAppServiceResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ ASPublishAppServiceResponse::ASPublishAppServiceResponse(
ASPublishAppServiceResponse::~ASPublishAppServiceResponse() {}
void ASPublishAppServiceResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToHMI(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_request.cc
index 30905b5fa2..f29b974862 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_request.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_request.cc
@@ -40,6 +40,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASUnpublishAppServiceRequest::ASUnpublishAppServiceRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ ASUnpublishAppServiceRequest::ASUnpublishAppServiceRequest(
ASUnpublishAppServiceRequest::~ASUnpublishAppServiceRequest() {}
void ASUnpublishAppServiceRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::string service_id =
(*message_)[strings::msg_params][strings::service_id].asString();
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_response.cc
index 0c8b479da8..6b665fafd0 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_response.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_response.cc
@@ -39,6 +39,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ASUnpublishAppServiceResponse::ASUnpublishAppServiceResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ ASUnpublishAppServiceResponse::ASUnpublishAppServiceResponse(
ASUnpublishAppServiceResponse::~ASUnpublishAppServiceResponse() {}
void ASUnpublishAppServiceResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToHMI(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc
index db1716ecb8..0f1fbcf1ce 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc
@@ -41,6 +41,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnASAppServiceDataNotification::OnASAppServiceDataNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -156,8 +158,7 @@ void OnASAppServiceDataNotification::GetNavigationImagePaths(
bool OnASAppServiceDataNotification::ValidateParams(
smart_objects::SmartObject& message_params) {
if (!message_params.keyExists(strings::service_data)) {
- LOG4CXX_DEBUG(logger_,
- "OASD notification received without any service data");
+ SDL_LOG_DEBUG("OASD notification received without any service data");
return false;
}
smart_objects::SmartObject& service_data =
@@ -168,8 +169,7 @@ bool OnASAppServiceDataNotification::ValidateParams(
auto service =
application_manager_.GetAppServiceManager().FindServiceByID(service_id);
if (!service) {
- LOG4CXX_ERROR(logger_,
- "OASD notification received with an unpublished service ID");
+ SDL_LOG_ERROR("OASD notification received with an unpublished service ID");
return false;
}
@@ -179,8 +179,7 @@ bool OnASAppServiceDataNotification::ValidateParams(
service_type, &service_type_value)) {
auto app = application_manager_.application(service->connection_key);
if (!app) {
- LOG4CXX_ERROR(logger_,
- "Failed to find service provider for OASD message");
+ SDL_LOG_ERROR("Failed to find service provider for OASD message");
return false;
}
@@ -204,8 +203,8 @@ bool OnASAppServiceDataNotification::ValidateParams(
}
void OnASAppServiceDataNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Sending AS data to HMI");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Sending AS data to HMI");
if (ValidateParams((*message_)[strings::msg_params])) {
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification_from_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification_from_hmi.cc
index 1c73fc73f4..5483873c3c 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification_from_hmi.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification_from_hmi.cc
@@ -38,6 +38,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnASAppServiceDataNotificationFromHMI::OnASAppServiceDataNotificationFromHMI(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,8 +56,8 @@ OnASAppServiceDataNotificationFromHMI::
~OnASAppServiceDataNotificationFromHMI() {}
void OnASAppServiceDataNotificationFromHMI::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Received an OnAppServiceData from HMI");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Received an OnAppServiceData from HMI");
std::string service_id =
(*message_)[strings::msg_params][strings::service_data]
@@ -64,14 +66,14 @@ void OnASAppServiceDataNotificationFromHMI::Run() {
AppService* service =
application_manager_.GetAppServiceManager().FindServiceByID(service_id);
if (!service) {
- LOG4CXX_ERROR(
- logger_, "No published services exist with service ID: " << service_id);
+ SDL_LOG_ERROR(
+ "No published services exist with service ID: " << service_id);
return;
} else if (service->mobile_service) {
- LOG4CXX_ERROR(logger_, "Service was not published by the HMI");
+ SDL_LOG_ERROR("Service was not published by the HMI");
return;
} else if (!service->record[strings::service_active].asBool()) {
- LOG4CXX_ERROR(logger_, "Service is not active");
+ SDL_LOG_ERROR("Service is not active");
return;
}
@@ -83,11 +85,9 @@ void OnASAppServiceDataNotificationFromHMI::Run() {
service->record[strings::service_manifest][strings::service_type]
.asString();
if (published_service_type != service_type) {
- LOG4CXX_ERROR(logger_,
- "Service type mismatch, expected "
- << service_type
- << ", but service was published with type "
- << published_service_type);
+ SDL_LOG_ERROR("Service type mismatch, expected "
+ << service_type << ", but service was published with type "
+ << published_service_type);
return;
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request.cc
index e3bf40308d..719856625d 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request.cc
@@ -42,6 +42,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetAppServiceDataRequest::GetAppServiceDataRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -57,7 +59,7 @@ GetAppServiceDataRequest::GetAppServiceDataRequest(
GetAppServiceDataRequest::~GetAppServiceDataRequest() {}
void GetAppServiceDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendProviderRequest(mobile_apis::FunctionID::GetAppServiceDataID,
hmi_apis::FunctionID::AppService_GetAppServiceData,
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request_to_mobile.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request_to_mobile.cc
index 0af1a5436b..1a8912518a 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request_to_mobile.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_request_to_mobile.cc
@@ -38,6 +38,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetAppServiceDataRequestToMobile::GetAppServiceDataRequestToMobile(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ GetAppServiceDataRequestToMobile::GetAppServiceDataRequestToMobile(
GetAppServiceDataRequestToMobile::~GetAppServiceDataRequestToMobile() {}
void GetAppServiceDataRequestToMobile::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response.cc
index 32ad8e014d..9c0b46c209 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response.cc
@@ -38,6 +38,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetAppServiceDataResponse::GetAppServiceDataResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ GetAppServiceDataResponse::GetAppServiceDataResponse(
GetAppServiceDataResponse::~GetAppServiceDataResponse() {}
void GetAppServiceDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response_from_mobile.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response_from_mobile.cc
index 90fca04eb2..04b969502b 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response_from_mobile.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/get_app_service_data_response_from_mobile.cc
@@ -40,6 +40,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetAppServiceDataResponseFromMobile::GetAppServiceDataResponseFromMobile(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ GetAppServiceDataResponseFromMobile::GetAppServiceDataResponseFromMobile(
GetAppServiceDataResponseFromMobile::~GetAppServiceDataResponseFromMobile() {}
void GetAppServiceDataResponseFromMobile::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::MobileEvent event(mobile_apis::FunctionID::GetAppServiceDataID);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification.cc
index 1ffe99462d..674578946a 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification.cc
@@ -46,6 +46,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnAppServiceDataNotification::OnAppServiceDataNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -61,8 +63,8 @@ OnAppServiceDataNotification::OnAppServiceDataNotification(
OnAppServiceDataNotification::~OnAppServiceDataNotification() {}
void OnAppServiceDataNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Sending OnAppServiceData to consumer");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Sending OnAppServiceData to consumer");
std::string service_id =
(*message_)[strings::msg_params][strings::service_data]
@@ -72,15 +74,15 @@ void OnAppServiceDataNotification::Run() {
application_manager_.GetAppServiceManager().FindServiceByID(service_id);
if (!service) {
- LOG4CXX_ERROR(logger_, "Service sending OnAppServiceData is not published");
+ SDL_LOG_ERROR("Service sending OnAppServiceData is not published");
return;
} else if (!service
->record[strings::service_manifest]
[strings::allow_app_consumers]
.asBool()) {
- LOG4CXX_ERROR(logger_,
- "Service does not allow for app consumers, skipping mobile "
- "OnAppServiceData notification");
+ SDL_LOG_ERROR(
+ "Service does not allow for app consumers, skipping mobile "
+ "OnAppServiceData notification");
return;
}
@@ -93,7 +95,7 @@ void OnAppServiceDataNotification::Run() {
[service_type](const ApplicationSharedPtr app) {
DCHECK_OR_RETURN(app, false);
auto& ext = AppServiceAppExtension::ExtractASExtension(*app);
- LOG4CXX_DEBUG(logger_, "Check subscription for type: " << service_type);
+ SDL_LOG_DEBUG("Check subscription for type: " << service_type);
return ext.IsSubscribedToAppService(service_type);
};
@@ -107,12 +109,11 @@ void OnAppServiceDataNotification::Run() {
for (; applications.end() != app_it; ++app_it) {
const ApplicationSharedPtr app = *app_it;
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
continue;
}
- LOG4CXX_DEBUG(logger_,
- "Sending OnAppServiceDataNotification to mobile connection: "
- << app->app_id());
+ SDL_LOG_DEBUG("Sending OnAppServiceDataNotification to mobile connection: "
+ << app->app_id());
(*message_)[app_mngr::strings::params][app_mngr::strings::connection_key] =
app->app_id();
SendNotification();
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc
index 5caacc9801..4c1caebd36 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc
@@ -41,6 +41,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnAppServiceDataNotificationFromMobile::OnAppServiceDataNotificationFromMobile(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -57,8 +59,8 @@ OnAppServiceDataNotificationFromMobile::
~OnAppServiceDataNotificationFromMobile() {}
void OnAppServiceDataNotificationFromMobile::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Received an OnAppServiceData");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Received an OnAppServiceData");
MessageHelper::PrintSmartObject(*message_);
uint32_t app_connection_key = connection_key();
@@ -74,9 +76,9 @@ void OnAppServiceDataNotificationFromMobile::Run() {
app->policy_app_id(), std::string(), service_type, NULL);
if (!result) {
- LOG4CXX_DEBUG(logger_,
- "Incorrect service type received in "
- "OnAppServiceDataNotificationFromMobile");
+ SDL_LOG_DEBUG(
+ "Incorrect service type received in "
+ "OnAppServiceDataNotificationFromMobile");
return;
}
@@ -87,15 +89,15 @@ void OnAppServiceDataNotificationFromMobile::Run() {
AppService* service =
application_manager_.GetAppServiceManager().FindServiceByID(service_id);
if (!service) {
- LOG4CXX_ERROR(
- logger_, "No published services exist with service ID: " << service_id);
+ SDL_LOG_ERROR(
+ "No published services exist with service ID: " << service_id);
return;
} else if (!service->mobile_service ||
service->connection_key != app_connection_key) {
- LOG4CXX_ERROR(logger_, "Service was not published by this application");
+ SDL_LOG_ERROR("Service was not published by this application");
return;
} else if (!service->record[strings::service_active].asBool()) {
- LOG4CXX_ERROR(logger_, "Service is not active");
+ SDL_LOG_ERROR("Service is not active");
return;
}
@@ -103,11 +105,9 @@ void OnAppServiceDataNotificationFromMobile::Run() {
service->record[strings::service_manifest][strings::service_type]
.asString();
if (published_service_type != service_type) {
- LOG4CXX_ERROR(logger_,
- "Service type mismatch, expected "
- << service_type
- << ", but service was published with type "
- << published_service_type);
+ SDL_LOG_ERROR("Service type mismatch, expected "
+ << service_type << ", but service was published with type "
+ << published_service_type);
return;
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request.cc
index 63b6e47d8e..c303e6d99f 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request.cc
@@ -41,6 +41,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
PerformAppServiceInteractionRequest::PerformAppServiceInteractionRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ PerformAppServiceInteractionRequest::PerformAppServiceInteractionRequest(
PerformAppServiceInteractionRequest::~PerformAppServiceInteractionRequest() {}
void PerformAppServiceInteractionRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto app = application_manager_.application(connection_key());
if (!app) {
@@ -122,7 +124,7 @@ void PerformAppServiceInteractionRequest::Run() {
void PerformAppServiceInteractionRequest::on_event(
const event_engine::Event& event) {
- LOG4CXX_DEBUG(logger_, "HMI PerformAppServiceInteraction on_event");
+ SDL_LOG_DEBUG("HMI PerformAppServiceInteraction on_event");
const smart_objects::SmartObject& event_message = event.smart_object();
auto msg_params = event_message[strings::msg_params];
@@ -169,7 +171,7 @@ void PerformAppServiceInteractionRequest::on_event(
void PerformAppServiceInteractionRequest::on_event(
const event_engine::MobileEvent& event) {
- LOG4CXX_DEBUG(logger_, "Mobile PerformAppServiceInteraction on_event");
+ SDL_LOG_DEBUG("Mobile PerformAppServiceInteraction on_event");
const smart_objects::SmartObject& event_message = event.smart_object();
auto msg_params = event_message[strings::msg_params];
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request_to_mobile.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request_to_mobile.cc
index 2a7b644cb3..4997f63232 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request_to_mobile.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request_to_mobile.cc
@@ -37,6 +37,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
PerformAppServiceInteractionRequestToMobile::
PerformAppServiceInteractionRequestToMobile(
const application_manager::commands::MessageSharedPtr& message,
@@ -54,7 +56,7 @@ PerformAppServiceInteractionRequestToMobile::
~PerformAppServiceInteractionRequestToMobile() {}
void PerformAppServiceInteractionRequestToMobile::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response.cc
index 5e84f42c34..a5a81eb325 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response.cc
@@ -37,6 +37,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
PerformAppServiceInteractionResponse::PerformAppServiceInteractionResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ PerformAppServiceInteractionResponse::PerformAppServiceInteractionResponse(
PerformAppServiceInteractionResponse::~PerformAppServiceInteractionResponse() {}
void PerformAppServiceInteractionResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response_from_mobile.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response_from_mobile.cc
index 9912df84ce..25ef530b8d 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response_from_mobile.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_response_from_mobile.cc
@@ -38,6 +38,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
PerformAppServiceInteractionResponseFromMobile::
PerformAppServiceInteractionResponseFromMobile(
const application_manager::commands::MessageSharedPtr& message,
@@ -55,7 +57,7 @@ PerformAppServiceInteractionResponseFromMobile::
~PerformAppServiceInteractionResponseFromMobile() {}
void PerformAppServiceInteractionResponseFromMobile::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::MobileEvent event(
mobile_apis::FunctionID::PerformAppServiceInteractionID);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc
index 53d1bf82fa..f2bc66520b 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc
@@ -43,6 +43,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
PublishAppServiceRequest::PublishAppServiceRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -58,8 +60,8 @@ PublishAppServiceRequest::PublishAppServiceRequest(
PublishAppServiceRequest::~PublishAppServiceRequest() {}
void PublishAppServiceRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Received a PublishAppService " << connection_key());
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Received a PublishAppService " << connection_key());
MessageHelper::PrintSmartObject(*message_);
smart_objects::SmartObject response_params =
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_response.cc
index d1bfc6e154..53dff48f43 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_response.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_response.cc
@@ -39,6 +39,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
PublishAppServiceResponse::PublishAppServiceResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ PublishAppServiceResponse::PublishAppServiceResponse(
PublishAppServiceResponse::~PublishAppServiceResponse() {}
void PublishAppServiceResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_request.cc
index 2cb43bce07..200bae01d9 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_request.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_request.cc
@@ -41,6 +41,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UnpublishAppServiceRequest::UnpublishAppServiceRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ UnpublishAppServiceRequest::UnpublishAppServiceRequest(
UnpublishAppServiceRequest::~UnpublishAppServiceRequest() {}
void UnpublishAppServiceRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::string service_id =
(*message_)[strings::msg_params][strings::service_id].asString();
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_response.cc
index 22450ecc4c..6b48c7f225 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_response.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_response.cc
@@ -39,6 +39,8 @@ namespace app_service_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UnpublishAppServiceResponse::UnpublishAppServiceResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ UnpublishAppServiceResponse::UnpublishAppServiceResponse(
UnpublishAppServiceResponse::~UnpublishAppServiceResponse() {}
void UnpublishAppServiceResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/app_service_plugin/app_service_app_extension_test.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/app_service_plugin/app_service_app_extension_test.cc
index 785cdd5200..f783b014c3 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/app_service_plugin/app_service_app_extension_test.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/app_service_plugin/app_service_app_extension_test.cc
@@ -40,7 +40,8 @@ namespace {
const std::string kAppServiceType1 = "AppServiceType1";
const std::string kAppServiceType2 = "AppServiceType2";
const std::string kResumptionDataKey = "kResumptionDataKey";
-const std::string kAppServiceInfoKey = "appService";
+const std::string kAppServiceInfoKey =
+ application_manager::hmi_interface::app_service;
} // namespace
namespace test {
@@ -195,7 +196,8 @@ TEST_F(AppServiceAppExtensionTest, ProcessResumption_SUCCESS) {
smart_objects::SmartObject(kAppServiceType2));
smart_objects::SmartObject resumption_data;
- resumption_data[kAppServiceInfoKey] = app_service_data;
+ resumption_data[application_manager::strings::application_subscriptions]
+ [kAppServiceInfoKey] = app_service_data;
app_service_app_extension_->ProcessResumption(resumption_data);
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_request.h
index a75020956c..f81919f4fa 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_request.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_request.h
@@ -51,6 +51,8 @@ class RCGetInteriorVehicleDataRequest
const RCCommandParams& params);
void Run() OVERRIDE;
+ void onTimeOut() OVERRIDE;
+
~RCGetInteriorVehicleDataRequest();
};
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_manager.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_manager.h
index c1fe30fa4d..e265fb7427 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_manager.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_manager.h
@@ -87,6 +87,13 @@ class InteriorDataManager {
* false.
*/
virtual bool CheckRequestsToHMIFrequency(const ModuleUid& module) = 0;
+
+ /**
+ * @brief Reverts resumption data and sends ubsubscribe vehicle data request
+ * to a HMI
+ * @param subscriptions Module data that SDL should unsubscribe off
+ */
+ virtual void OnResumptionRevert(const std::set<ModuleUid>& subscriptions) = 0;
};
} // namespace rc_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_manager_impl.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_manager_impl.h
index 791016cdcd..43927b25c8 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_manager_impl.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_manager_impl.h
@@ -65,6 +65,8 @@ class InteriorDataManagerImpl : public InteriorDataManager {
bool CheckRequestsToHMIFrequency(const ModuleUid& module) OVERRIDE;
+ void OnResumptionRevert(const std::set<ModuleUid>& subscriptions) OVERRIDE;
+
private:
/**
* @brief UpdateHMISubscriptionsOnPolicyUpdated process policy update event.
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_app_extension.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_app_extension.h
index 33271e64fd..8b2162c9ab 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_app_extension.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_app_extension.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Ford Motor Company
+ * Copyright (c) 2020, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,9 @@
#include <memory>
#include <set>
#include <string>
+
#include "application_manager/app_extension.h"
+#include "application_manager/application.h"
#include "utils/macro.h"
namespace rc_rpc_plugin {
@@ -137,9 +139,13 @@ struct Grid {
}
};
+class RCRPCPlugin;
+
class RCAppExtension : public application_manager::AppExtension {
public:
- explicit RCAppExtension(application_manager::AppExtensionUID uid);
+ explicit RCAppExtension(application_manager::AppExtensionUID uid,
+ RCRPCPlugin& plugin,
+ application_manager::Application& application);
~RCAppExtension();
/**
@@ -177,6 +183,36 @@ class RCAppExtension : public application_manager::AppExtension {
std::set<ModuleUid> InteriorVehicleDataSubscriptions() const;
/**
+ * @brief AddPendingSubscription adds pending subscription
+ * @param module interior data specification(zone, data type)
+ * @return true in case of pending subscription is successful added, otherwise
+ * false
+ */
+ bool AddPendingSubscription(const ModuleUid& module);
+
+ /**
+ * @brief RemovePendingSubscription removes some particular pending
+ * subscription
+ * @param module interior data specification(zone, data type)
+ */
+ void RemovePendingSubscription(const ModuleUid& module);
+
+ /**
+ * @brief RemovePendingSubscriptions removes all pending subscriptions
+ */
+ void RemovePendingSubscriptions();
+
+ /**
+ * @brief PendingSubscriptions list of preliminary subscriptoins
+ * That will be moved to subscriptions as soon as HMI will respond with
+ * success.
+ * Used for resumption to keep list of preliminary subscriptions and wait for
+ * HMI response
+ * @return list of preliminary subscriptions
+ */
+ std::set<ModuleUid> PendingSubscriptions();
+
+ /**
* @brief GetUserLocation
* @return grid of user location
*/
@@ -197,17 +233,33 @@ class RCAppExtension : public application_manager::AppExtension {
void SetUserLocation(const Grid& grid);
private:
+ /**
+ * @brief Checks if the application's pointer is valid and update the
+ * application's hash in this case
+ */
+ void UpdateHash();
+
std::set<ModuleUid> subscribed_interior_vehicle_data_;
+ std::set<ModuleUid> pending_subscriptions_;
+
Grid user_location_;
+ RCRPCPlugin& plugin_;
+
+ /**
+ * ApplicationSharedPtr needed for updating application's hash
+ */
+ application_manager::Application& application_;
+
// AppExtension interface
public:
- void SaveResumptionData(ns_smart_device_link::ns_smart_objects::SmartObject&
- resumption_data) OVERRIDE;
- void ProcessResumption(
- const ns_smart_device_link::ns_smart_objects::SmartObject&
- resumption_data) OVERRIDE;
+ void SaveResumptionData(smart_objects::SmartObject& resumption_data) OVERRIDE;
+
+ void ProcessResumption(const smart_objects::SmartObject& saved_app) OVERRIDE;
+
+ void RevertResumption(
+ const smart_objects::SmartObject& resumption_data) OVERRIDE;
};
typedef std::shared_ptr<RCAppExtension> RCAppExtensionPtr;
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_capabilities_manager.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_capabilities_manager.h
index 36fd8bbbf9..743cf69a28 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_capabilities_manager.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_capabilities_manager.h
@@ -37,7 +37,13 @@
namespace rc_rpc_plugin {
-enum capabilitiesStatus { success, missedLightName, missedParam, readOnly };
+enum capabilitiesStatus {
+ kInvalidStatus,
+ kSuccess,
+ kMissedLightName,
+ kMissedParam,
+ kReadOnly
+};
typedef std::pair<std::string, capabilitiesStatus> ModuleTypeCapability;
class RCCapabilitiesManager {
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_helpers.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_helpers.h
index eed860fc7f..1bf4a7a259 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_helpers.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_helpers.h
@@ -80,8 +80,12 @@ class RCHelpers {
static RCAppExtensionPtr GetRCExtension(
application_manager::Application& app);
- static smart_objects::SmartObjectSPtr CreateUnsubscribeRequestToHMI(
- const ModuleUid& module, const uint32_t correlation_id);
+ enum InteriorDataAction { SUBSCRIBE, UNSUBSCRIBE, NONE };
+
+ static smart_objects::SmartObjectSPtr CreateGetInteriorVDRequestToHMI(
+ const ModuleUid& module,
+ const uint32_t correlation_id,
+ const InteriorDataAction action);
static std::vector<application_manager::ApplicationSharedPtr>
AppsSubscribedToModule(application_manager::ApplicationManager& app_mngr,
@@ -169,6 +173,13 @@ class RCHelpers {
static smart_objects::SmartObject MergeArray(
const smart_objects::SmartObject& data1,
const smart_objects::SmartObject& data2);
+
+ /**
+ * @brief Determines the success of the response
+ * judging from message type received from HMI
+ * @param response from HMI
+ */
+ static bool IsResponseSuccessful(const smart_objects::SmartObject& response);
};
} // namespace rc_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h
index 5ee2e0725c..6625641f54 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h
@@ -65,8 +65,6 @@ const char kGrid[] = "grid";
const char kAllowMultipleAccess[] = "allowMultipleAccess";
-const char kSupportedLights[] = "supportedLights";
-
// ClimateControlCapabilities
const char kFanSpeedAvailable[] = "fanSpeedAvailable";
const char kCurrentTemperatureAvailable[] = "currentTemperatureAvailable";
@@ -88,6 +86,7 @@ const char kName[] = "name";
const char kStatusAvailable[] = "statusAvailable";
const char kDensityAvailable[] = "densityAvailable";
const char kRGBColorSpaceAvailable[] = "rgbColorSpaceAvailable";
+const char kSupportedLights[] = "supportedLights";
// RadioControlCapabilities
const char kRadioBandAvailable[] = "radioBandAvailable";
@@ -100,6 +99,7 @@ const char kSignalChangeThresholdAvailable[] = "signalChangeThresholdAvailable";
const char kRadioEnableAvailable[] = "radioEnableAvailable";
const char kStateAvailable[] = "stateAvailable";
const char kSisDataAvailable[] = "sisDataAvailable";
+const char kHdChannelAvailable[] = "hdChannelAvailable";
const char kSiriusxmRadioAvailable[] = "siriusxmRadioAvailable";
@@ -128,6 +128,7 @@ const char kSourceAvailable[] = "sourceAvailable";
const char kKeepContextAvailable[] = "keepContextAvailable";
const char kVolumeAvailable[] = "volumeAvailable";
const char kEqualizerAvailable[] = "equalizerAvailable";
+const char kEqualizerMaxChannelId[] = "equalizerMaxChannelId";
// HmiSettingsCapabilities
const char kDistanceUnitAvailable[] = "distanceUnitAvailable";
@@ -358,6 +359,7 @@ const char kNotFound[] = "NOT_FOUND";
const char kFront[] = "FRONT";
const char kRear[] = "REAR";
const char kAll[] = "ALL";
+const char kNone[] = "NONE";
// DefrostZone enum
// TemperatureUnit enum
@@ -387,8 +389,9 @@ const char kRepeat[] = "REPEAT";
// ButtonName enum
// ButtonPressMode enum
-const char kLong[] = "LONG";
-const char kShort[] = "SHORT";
+const char kShortPressAvailable[] = "shortPressAvailable";
+const char kLongPressAvailable[] = "longPressAvailable";
+const char kUpDownAvailable[] = "upDownAvailable";
// ButtonPressMode enum
// Access mode enum
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_pending_resumption_handler.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_pending_resumption_handler.h
new file mode 100644
index 0000000000..944d47b052
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_pending_resumption_handler.h
@@ -0,0 +1,165 @@
+#pragma once
+
+#include <map>
+#include <queue>
+#include "application_manager/event_engine/event_observer.h"
+#include "application_manager/resumption/pending_resumption_handler.h"
+#include "application_manager/resumption/resumption_data_processor.h"
+#include "application_manager/rpc_service.h"
+#include "rc_rpc_plugin/interior_data_cache.h"
+#include "rc_rpc_plugin/rc_app_extension.h"
+
+namespace rc_rpc_plugin {
+
+/**
+ * @brief The RCPendingResumptionHandler class
+ * responsibility to avoid duplication of subscription requests to HMI
+ * if multiple applications are registering
+ */
+class RCPendingResumptionHandler : public resumption::PendingResumptionHandler {
+ public:
+ RCPendingResumptionHandler(
+ application_manager::ApplicationManager& application_manager,
+ rc_rpc_plugin::InteriorDataCache& interior_data_cache);
+
+ void on_event(const application_manager::event_engine::Event& event) override;
+
+ void HandleResumptionSubscriptionRequest(
+ application_manager::AppExtension& extension,
+ application_manager::Application& app) override;
+
+ void OnResumptionRevert() override;
+
+ /**
+ * @brief Creates GetInteriorVehicleData subscription request
+ * @param module unique identifier of module (moduleType + moduleID) used to
+ * create the request
+ * @param correlation_id - unique ID
+ * @return subscription request in smart object representation
+ */
+ static smart_objects::SmartObjectSPtr CreateSubscriptionRequest(
+ const ModuleUid& module, const uint32_t correlation_id);
+
+ /**
+ * @brief Retrieves function id from subscription request
+ * @param subscription_request a subscription request that contains the
+ * function id
+ * @return function id
+ */
+ static hmi_apis::FunctionID::eType GetFunctionId(
+ const smart_objects::SmartObject& subscription_request);
+
+ /**
+ * @brief Retrieves module uid from subscription request
+ * @param subscription_request a subscription request that contains a unique
+ * module identifier
+ * @return unique module identifier
+ */
+ static ModuleUid GetModuleUid(
+ const smart_objects::SmartObject& subscription_request);
+
+ private:
+ /**
+ * @brief The PendingRequest struct contains fields, needed during
+ * processing events, related to responses from HMI to each resumption request
+ */
+ struct PendingRequest {
+ uint32_t app_id;
+ smart_objects::SmartObject message;
+ uint32_t correlation_id() const {
+ namespace am_strings = app_mngr::strings;
+ return message[am_strings::params][am_strings::correlation_id].asInt();
+ }
+ };
+
+ /**
+ * @brief Handles a successful response from HMI
+ * @param event contains response from HMI
+ * @param module_uid a unique identifier for module
+ */
+ void HandleSuccessfulResponse(
+ const application_manager::event_engine::Event& event,
+ const ModuleUid& module_uid);
+
+ /**
+ * @brief Creates next GetInteriorVehicleData subscription request if a
+ * previous resumption of subscriptions is not successful
+ * @param module a unique identifier for module
+ */
+ void ProcessNextPausedResumption(const ModuleUid& module);
+
+ /**
+ * @brief Notifies subscriber about resumption status
+ * @param subscription_response response from HMI
+ * @param correlation_id unique message ID
+ */
+ void RaiseEventForResponse(
+ const smart_objects::SmartObject& subscription_response,
+ const uint32_t correlation_id) const;
+
+ /**
+ * @brief Checks if SDL is still waiting on a subscription response for the
+ * specified module
+ * @param module the unique identifier for the module to be checked against
+ */
+ bool IsPendingForResponse(const ModuleUid& module) const;
+
+ /**
+ * @brief Checks if any app except passed is subscribed to a given module
+ * @param module module to check
+ * @param app_id app to ignore subscription
+ * @return true if any app except passed is subscribed to module, otherwise
+ * false
+ */
+ bool IsOtherAppsSubscribed(const uint32_t app_id,
+ const ModuleUid& module) const;
+
+ /**
+ * @brief Returns pending request, which corresponds to correlation ID
+ * @param corr_id unique message ID
+ * @return optional object, which contains subscription request, or empty
+ * optional, if such request wasn't found
+ */
+ utils::Optional<smart_objects::SmartObject> GetPendingRequest(
+ const uint32_t corr_id);
+
+ /**
+ * @brief Returns ID of application, related to pending request, which
+ * corresponds to correlation ID
+ * @param corr_id unique message ID
+ * @return optional object, which contains ID of application, or empty
+ * optional, if such request wasn't found
+ */
+ utils::Optional<uint32_t> GetPendingApp(const uint32_t corr_id);
+
+ /**
+ * @brief Removes pending request, which corresponds to
+ * correlation ID
+ * @param corr_id unique ID
+ */
+ void RemovePendingRequest(const uint32_t corr_id);
+
+ /**
+ * @brief Adds pending request, related to
+ * application ID
+ * @param request_so pending request message
+ */
+ void AddPendingRequest(const uint32_t app_id,
+ const smart_objects::SmartObject request_so);
+
+ /**
+ * @brief PendingRequestQueue contains subscription request,
+ * which will be sent to the HMI in the case that a previous resumption
+ * attempt for the same module was not successful
+ */
+ using PendingRequestQueue = std::queue<PendingRequest>;
+ std::map<ModuleUid, PendingRequestQueue> paused_resumptions_;
+
+ sync_primitives::Lock pending_resumption_lock_;
+ std::vector<PendingRequest> pending_requests_;
+
+ application_manager::rpc_service::RPCService& rpc_service_;
+ rc_rpc_plugin::InteriorDataCache& interior_data_cache_;
+};
+
+} // namespace rc_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_rpc_plugin.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_rpc_plugin.h
index e12bd88e58..528e116403 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_rpc_plugin.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_rpc_plugin.h
@@ -37,11 +37,13 @@
#include "application_manager/command_factory.h"
#include "application_manager/plugin_manager/rpc_plugin.h"
+#include "application_manager/resumption/pending_resumption_handler.h"
#include "rc_rpc_plugin/interior_data_cache.h"
#include "rc_rpc_plugin/interior_data_manager.h"
#include "rc_rpc_plugin/rc_capabilities_manager.h"
#include "rc_rpc_plugin/rc_consent_manager.h"
#include "rc_rpc_plugin/resource_allocation_manager.h"
+#include "utils/ilogger.h"
namespace rc_rpc_plugin {
namespace plugins = application_manager::plugin_manager;
@@ -102,6 +104,33 @@ class RCRPCPlugin : public plugins::RPCPlugin {
void OnApplicationEvent(plugins::ApplicationEvent event,
app_mngr::ApplicationSharedPtr application) OVERRIDE;
+ /**
+ * @brief ProcessResumptionSubscription send Subscribe vehicle data requests
+ * to HMI
+ * @param app application for subscription
+ * @param ext application extension
+ */
+ void ProcessResumptionSubscription(app_mngr::Application& app,
+ RCAppExtension& ext);
+
+ /**
+ * @brief Reverts resumption data, clears all pending resumption and sends
+ * unsubscribe interior vehicle data requests to HMI
+ * @param subscriptions Module data that SDL should unsubscribe off
+ */
+ void RevertResumption(const std::set<ModuleUid>& subscriptions);
+
+ /**
+ * @brief IsOtherAppsSubscribed check if any app except passed is subscribed
+ * to a given module
+ * @param module module to check
+ * @param app_id app to ignore subscription
+ * @return true if any app except passed is subscribed to module, otherwise
+ * false
+ */
+ bool IsOtherAppsSubscribed(const rc_rpc_types::ModuleUid& module,
+ const uint32_t app_id);
+
static const uint32_t kRCPluginID = 153;
typedef std::vector<application_manager::ApplicationSharedPtr> Apps;
@@ -117,10 +146,14 @@ class RCRPCPlugin : public plugins::RPCPlugin {
std::unique_ptr<InteriorDataCache> interior_data_cache_;
std::unique_ptr<InteriorDataManager> interior_data_manager_;
std::unique_ptr<RCCapabilitiesManager> rc_capabilities_manager_;
+ using PendingResumptionHandlerSPtr =
+ std::shared_ptr<resumption::PendingResumptionHandler>;
+ PendingResumptionHandlerSPtr pending_resumption_handler_;
};
} // namespace rc_rpc_plugin
-extern "C" application_manager::plugin_manager::RPCPlugin* Create();
+extern "C" application_manager::plugin_manager::RPCPlugin* Create(
+ logger::Logger* logger_instance);
extern "C" void Delete(application_manager::plugin_manager::RPCPlugin* data);
#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_RPC_PLUGIN_H_
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_button_press_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_button_press_request.cc
index 75faf5db8c..6fe3e31aa4 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_button_press_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_button_press_request.cc
@@ -38,6 +38,8 @@
namespace rc_rpc_plugin {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RCButtonPressRequest::RCButtonPressRequest(
const app_mngr::commands::MessageSharedPtr& message,
const RCCommandParams& params)
@@ -50,7 +52,7 @@ RCButtonPressRequest::RCButtonPressRequest(
RCButtonPressRequest::~RCButtonPressRequest() {}
void RCButtonPressRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_button_press_response.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_button_press_response.cc
index 5c1691ed7b..33610c5a4d 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_button_press_response.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_button_press_response.cc
@@ -36,6 +36,8 @@
namespace rc_rpc_plugin {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RCButtonPressResponse::RCButtonPressResponse(
const application_manager::commands::MessageSharedPtr& message,
const RCCommandParams& params)
@@ -47,7 +49,7 @@ RCButtonPressResponse::RCButtonPressResponse(
params.policy_handler_) {}
void RCButtonPressResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
app_mngr::event_engine::Event event(
hmi_apis::FunctionID::Buttons_ButtonPress);
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_consent_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_consent_request.cc
index 774ee04677..a4d2d96772 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_consent_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_consent_request.cc
@@ -36,6 +36,8 @@
namespace rc_rpc_plugin {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RCGetInteriorVehicleDataConsentRequest::RCGetInteriorVehicleDataConsentRequest(
const app_mngr::commands::MessageSharedPtr& message,
const RCCommandParams& params)
@@ -49,7 +51,7 @@ RCGetInteriorVehicleDataConsentRequest::
~RCGetInteriorVehicleDataConsentRequest() {}
void RCGetInteriorVehicleDataConsentRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_consent_response.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_consent_response.cc
index 3244857656..1ae8158602 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_consent_response.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_consent_response.cc
@@ -36,6 +36,8 @@
namespace rc_rpc_plugin {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RCGetInteriorVehicleDataConsentResponse::
RCGetInteriorVehicleDataConsentResponse(
const application_manager::commands::MessageSharedPtr& message,
@@ -48,7 +50,7 @@ RCGetInteriorVehicleDataConsentResponse::
params.policy_handler_) {}
void RCGetInteriorVehicleDataConsentResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
app_mngr::event_engine::Event event(
hmi_apis::FunctionID::RC_GetInteriorVehicleDataConsent);
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_request.cc
index c7baf75e27..fede1dbd11 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_request.cc
@@ -31,11 +31,16 @@
*/
#include "rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_request.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/resumption/resume_ctrl.h"
+
#include "utils/macro.h"
namespace rc_rpc_plugin {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RCGetInteriorVehicleDataRequest::RCGetInteriorVehicleDataRequest(
const app_mngr::commands::MessageSharedPtr& message,
const RCCommandParams& params)
@@ -48,9 +53,25 @@ RCGetInteriorVehicleDataRequest::RCGetInteriorVehicleDataRequest(
RCGetInteriorVehicleDataRequest::~RCGetInteriorVehicleDataRequest() {}
void RCGetInteriorVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void RCGetInteriorVehicleDataRequest::onTimeOut() {
+ SDL_LOG_TRACE("function_id: " << function_id()
+ << " correlation_id: " << correlation_id());
+ using namespace application_manager;
+ event_engine::Event timeout_event(
+ hmi_apis::FunctionID::RC_GetInteriorVehicleData);
+
+ auto error_response = MessageHelper::CreateNegativeResponseFromHmi(
+ function_id(),
+ correlation_id(),
+ hmi_apis::Common_Result::GENERIC_ERROR,
+ std::string("Timed out"));
+ timeout_event.set_smart_object(*error_response);
+ timeout_event.raise(application_manager_.event_dispatcher());
+}
+
} // namespace commands
} // namespace rc_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_response.cc
index a366aa65fa..7e935621d4 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_response.cc
@@ -37,6 +37,8 @@
namespace rc_rpc_plugin {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RCGetInteriorVehicleDataResponse::RCGetInteriorVehicleDataResponse(
const app_mngr::commands::MessageSharedPtr& message,
const RCCommandParams& params)
@@ -48,7 +50,7 @@ RCGetInteriorVehicleDataResponse::RCGetInteriorVehicleDataResponse(
params.policy_handler_) {}
void RCGetInteriorVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
app_mngr::event_engine::Event event(
hmi_apis::FunctionID::RC_GetInteriorVehicleData);
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_interior_vehicle_data_notification.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_interior_vehicle_data_notification.cc
index c6cf1b0d5a..68587e0861 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_interior_vehicle_data_notification.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_interior_vehicle_data_notification.cc
@@ -37,6 +37,8 @@
namespace rc_rpc_plugin {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RCOnInteriorVehicleDataNotification::RCOnInteriorVehicleDataNotification(
const app_mngr::commands::MessageSharedPtr& message,
const RCCommandParams& params)
@@ -50,7 +52,7 @@ RCOnInteriorVehicleDataNotification::RCOnInteriorVehicleDataNotification(
RCOnInteriorVehicleDataNotification::~RCOnInteriorVehicleDataNotification() {}
void RCOnInteriorVehicleDataNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
(*message_)[app_mngr::strings::params][app_mngr::strings::function_id] =
static_cast<int>(mobile_apis::FunctionID::eType::OnInteriorVehicleDataID);
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_remote_control_settings_notification.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_remote_control_settings_notification.cc
index 45b0d13582..217258b086 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_remote_control_settings_notification.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_remote_control_settings_notification.cc
@@ -47,7 +47,7 @@ std::map<std::string, hmi_apis::Common_RCAccessMode::eType> access_modes{
{enums_value::kAskDriver, hmi_apis::Common_RCAccessMode::ASK_DRIVER}};
}
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+SDL_CREATE_LOG_VARIABLE("Commands")
RCOnRemoteControlSettingsNotification::RCOnRemoteControlSettingsNotification(
const app_mngr::commands::MessageSharedPtr& message,
@@ -65,15 +65,6 @@ RCOnRemoteControlSettingsNotification::RCOnRemoteControlSettingsNotification(
RCOnRemoteControlSettingsNotification::
~RCOnRemoteControlSettingsNotification() {}
-hmi_apis::Common_RCAccessMode::eType AccessModeFromString(
- const std::string& access_mode) {
- std::map<std::string, hmi_apis::Common_RCAccessMode::eType>::const_iterator
- mode = access_modes.find(access_mode);
- return access_modes.end() != mode
- ? mode->second
- : hmi_apis::Common_RCAccessMode::INVALID_ENUM;
-}
-
std::string AccessModeToString(
const hmi_apis::Common_RCAccessMode::eType access_mode) {
std::map<std::string, hmi_apis::Common_RCAccessMode::eType>::const_iterator
@@ -89,18 +80,17 @@ std::string AccessModeToString(
}
void RCOnRemoteControlSettingsNotification::DisallowRCFunctionality() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
interior_data_manager_.OnDisablingRC();
}
void RCOnRemoteControlSettingsNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!(*message_)[app_mngr::strings::msg_params].keyExists(
message_params::kAllowed)) {
- LOG4CXX_DEBUG(logger_,
- "Notification is ignored due to \"allow\" parameter absense");
- LOG4CXX_DEBUG(logger_, "RC Functionality remains unchanged");
+ SDL_LOG_DEBUG("Notification is ignored due to \"allow\" parameter absense");
+ SDL_LOG_DEBUG("RC Functionality remains unchanged");
return;
}
@@ -110,7 +100,7 @@ void RCOnRemoteControlSettingsNotification::Run() {
if (is_allowed) {
hmi_apis::Common_RCAccessMode::eType access_mode =
hmi_apis::Common_RCAccessMode::INVALID_ENUM;
- LOG4CXX_DEBUG(logger_, "Allowing RC Functionality");
+ SDL_LOG_DEBUG("Allowing RC Functionality");
resource_allocation_manager_.set_rc_enabled(true);
if ((*message_)[app_mngr::strings::msg_params].keyExists(
message_params::kAccessMode)) {
@@ -118,18 +108,16 @@ void RCOnRemoteControlSettingsNotification::Run() {
(*message_)[app_mngr::strings::msg_params]
[message_params::kAccessMode]
.asUInt());
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Setting up access mode : " << AccessModeToString(access_mode));
} else {
access_mode = resource_allocation_manager_.GetAccessMode();
- LOG4CXX_DEBUG(logger_,
- "No access mode received. Using last known: "
- << AccessModeToString(access_mode));
+ SDL_LOG_DEBUG("No access mode received. Using last known: "
+ << AccessModeToString(access_mode));
}
resource_allocation_manager_.SetAccessMode(access_mode);
} else {
- LOG4CXX_DEBUG(logger_, "Disallowing RC Functionality");
+ SDL_LOG_DEBUG("Disallowing RC Functionality");
DisallowRCFunctionality();
resource_allocation_manager_.ResetAllAllocations();
resource_allocation_manager_.set_rc_enabled(false);
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_global_properties_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_global_properties_request.cc
index 2f203afc2d..f0ff1afbb3 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_global_properties_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_global_properties_request.cc
@@ -37,6 +37,8 @@ namespace app_mngr = application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RCSetGlobalPropertiesRequest::RCSetGlobalPropertiesRequest(
const app_mngr::commands::MessageSharedPtr& message,
const RCCommandParams& params)
@@ -47,7 +49,7 @@ RCSetGlobalPropertiesRequest::RCSetGlobalPropertiesRequest(
params.policy_handler_) {}
void RCSetGlobalPropertiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_global_properties_response.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_global_properties_response.cc
index c31314ec21..3779cfc198 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_global_properties_response.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_global_properties_response.cc
@@ -35,6 +35,8 @@
namespace rc_rpc_plugin {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RCSetGlobalPropertiesResponse::RCSetGlobalPropertiesResponse(
const app_mngr::commands::MessageSharedPtr& message,
const RCCommandParams& params)
@@ -46,7 +48,7 @@ RCSetGlobalPropertiesResponse::RCSetGlobalPropertiesResponse(
params.policy_handler_) {}
void RCSetGlobalPropertiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
app_mngr::event_engine::Event event(
hmi_apis::FunctionID::RC_SetGlobalProperties);
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_interior_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_interior_vehicle_data_request.cc
index f0d5ecc177..618f200d18 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_interior_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_interior_vehicle_data_request.cc
@@ -36,6 +36,8 @@
namespace rc_rpc_plugin {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RCSetInteriorVehicleDataRequest::RCSetInteriorVehicleDataRequest(
const app_mngr::commands::MessageSharedPtr& message,
const RCCommandParams& params)
@@ -47,7 +49,7 @@ RCSetInteriorVehicleDataRequest::RCSetInteriorVehicleDataRequest(
RCSetInteriorVehicleDataRequest::~RCSetInteriorVehicleDataRequest() {}
void RCSetInteriorVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_interior_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_interior_vehicle_data_response.cc
index 56d924debe..94cf2837d8 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_interior_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_set_interior_vehicle_data_response.cc
@@ -36,6 +36,8 @@
namespace rc_rpc_plugin {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RCSetInteriorVehicleDataResponse::RCSetInteriorVehicleDataResponse(
const app_mngr::commands::MessageSharedPtr& message,
const RCCommandParams& params)
@@ -47,7 +49,7 @@ RCSetInteriorVehicleDataResponse::RCSetInteriorVehicleDataResponse(
params.policy_handler_) {}
void RCSetInteriorVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
app_mngr::event_engine::Event event(
hmi_apis::FunctionID::RC_SetInteriorVehicleData);
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_request.cc
index 3adc48dfbf..9bf7977bdf 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_request.cc
@@ -45,7 +45,7 @@ namespace commands {
using namespace json_keys;
using namespace message_params;
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+SDL_CREATE_LOG_VARIABLE("Commands")
ButtonPressRequest::ButtonPressRequest(
const app_mngr::commands::MessageSharedPtr& message,
@@ -78,7 +78,7 @@ const mobile_apis::ButtonName::eType ButtonPressRequest::GetButtonId() const {
}
void ButtonPressRequest::Execute() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::string module_type = ModuleType();
const bool button_name_matches_module_type =
@@ -106,14 +106,13 @@ void ButtonPressRequest::Execute() {
&(*message_)[app_mngr::strings::msg_params],
true);
} else if (!button_name_matches_module_type) {
- LOG4CXX_WARN(logger_, "Request module type and button name mismatch!");
+ SDL_LOG_WARN("Request module type and button name mismatch!");
SetResourceState(module_type, ResourceState::FREE);
SendResponse(false,
mobile_apis::Result::INVALID_DATA,
"Request module type and button name mismatch!");
} else {
- LOG4CXX_WARN(logger_,
- "Requested button or module does not exist in capabilities!");
+ SDL_LOG_WARN("Requested button or module does not exist in capabilities!");
SetResourceState(module_type, ResourceState::FREE);
SendResponse(false,
mobile_apis::Result::UNSUPPORTED_RESOURCE,
@@ -123,7 +122,7 @@ void ButtonPressRequest::Execute() {
AcquireResult::eType ButtonPressRequest::AcquireResource(
const app_mngr::commands::MessageSharedPtr& message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::string module_type = ModuleType();
app_mngr::ApplicationSharedPtr app =
application_manager_.application(CommandRequestImpl::connection_key());
@@ -134,13 +133,13 @@ AcquireResult::eType ButtonPressRequest::AcquireResource(
bool ButtonPressRequest::IsResourceFree(const std::string& module_type,
const std::string& module_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return resource_allocation_manager_.IsResourceFree(module_type, module_id);
}
void ButtonPressRequest::SetResourceState(const std::string& module_type,
const ResourceState::eType state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
app_mngr::ApplicationSharedPtr app =
application_manager_.application(CommandRequestImpl::connection_key());
@@ -149,7 +148,7 @@ void ButtonPressRequest::SetResourceState(const std::string& module_type,
}
void ButtonPressRequest::on_event(const app_mngr::event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
RCCommandRequest::on_event(event);
if (hmi_apis::FunctionID::Buttons_ButtonPress != event.id()) {
@@ -180,7 +179,7 @@ void ButtonPressRequest::on_event(const app_mngr::event_engine::Event& event) {
auto app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer.");
+ SDL_LOG_ERROR("NULL pointer.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED, "");
return;
}
@@ -221,7 +220,7 @@ std::string ButtonPressRequest::ModuleType() const {
}
std::string ButtonPressRequest::ModuleId() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto msg_params = (*message_)[app_mngr::strings::msg_params];
if (msg_params.keyExists(message_params::kModuleId)) {
return msg_params[message_params::kModuleId].asString();
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_response.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_response.cc
index 491b0363c9..7f9ccf5839 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_response.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_response.cc
@@ -36,6 +36,8 @@
namespace rc_rpc_plugin {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ButtonPressResponse::ButtonPressResponse(
const app_mngr::commands::MessageSharedPtr& message,
const RCCommandParams& params)
@@ -48,7 +50,7 @@ ButtonPressResponse::ButtonPressResponse(
ButtonPressResponse::~ButtonPressResponse() {}
void ButtonPressResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
application_manager_.GetRPCService().SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_consent_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_consent_request.cc
index fd661afd5f..a13a7f2a9e 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_consent_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_consent_request.cc
@@ -45,13 +45,15 @@ namespace rc_rpc_plugin {
namespace app_mngr = application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetInteriorVehicleDataConsentRequest::GetInteriorVehicleDataConsentRequest(
const application_manager::commands::MessageSharedPtr& message,
const RCCommandParams& params)
: RCCommandRequest(message, params) {}
void GetInteriorVehicleDataConsentRequest::Execute() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto& msg_params = (*message_)[app_mngr::strings::msg_params];
@@ -65,9 +67,9 @@ void GetInteriorVehicleDataConsentRequest::Execute() {
}
if (msg_params[message_params::kModuleIds].empty()) {
- LOG4CXX_DEBUG(logger_,
- "ModuleIds collection is empty. Will be add default "
- "module_id from capabilities");
+ SDL_LOG_DEBUG(
+ "ModuleIds collection is empty. Will be add default "
+ "module_id from capabilities");
const auto module_id =
rc_capabilities_manager_.GetDefaultModuleIdFromCapabilities(
@@ -81,8 +83,7 @@ void GetInteriorVehicleDataConsentRequest::Execute() {
*(msg_params[message_params::kModuleIds].asArray())) {
const ModuleUid module(module_type, module_id.asString());
if (!rc_capabilities_manager_.CheckIfModuleExistsInCapabilities(module)) {
- LOG4CXX_WARN(logger_,
- "Accessing not supported module: " << module_type << " "
+ SDL_LOG_WARN("Accessing not supported module: " << module_type << " "
<< module_id.asString());
SetResourceState(module_type, ResourceState::FREE);
SendResponse(false,
@@ -94,8 +95,7 @@ void GetInteriorVehicleDataConsentRequest::Execute() {
smart_objects::SmartObject response_params;
if (GetCalculatedVehicleDataConsent(response_params)) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"No need to send request to HMI. Sending cached consents to mobile");
SendResponse(true, mobile_apis::Result::SUCCESS, nullptr, &response_params);
return;
@@ -107,8 +107,8 @@ void GetInteriorVehicleDataConsentRequest::Execute() {
hmi_request_consents_ =
smart_objects::SmartObject(response_params[message_params::kAllowed]);
- LOG4CXX_DEBUG(
- logger_, "Filtering out module ids with successfully calculated consent");
+ SDL_LOG_DEBUG(
+ "Filtering out module ids with successfully calculated consent");
smart_objects::SmartObject hmi_msg_params(msg_params);
auto module_ids_for_consent =
@@ -126,9 +126,9 @@ void GetInteriorVehicleDataConsentRequest::Execute() {
}
}
- LOG4CXX_DEBUG(logger_,
- "Forwarding request to HMI with moduleIds for modules with "
- "unknown consent");
+ SDL_LOG_DEBUG(
+ "Forwarding request to HMI with moduleIds for modules with "
+ "unknown consent");
SendHMIRequest(hmi_apis::FunctionID::RC_GetInteriorVehicleDataConsent,
(&hmi_msg_params),
true);
@@ -136,10 +136,10 @@ void GetInteriorVehicleDataConsentRequest::Execute() {
void GetInteriorVehicleDataConsentRequest::on_event(
const app_mngr::event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (event.id() != hmi_apis::FunctionID::RC_GetInteriorVehicleDataConsent) {
- LOG4CXX_ERROR(logger_, "Received wrong event. FunctionID: " << event.id());
+ SDL_LOG_ERROR("Received wrong event. FunctionID: " << event.id());
return;
}
@@ -169,7 +169,7 @@ void GetInteriorVehicleDataConsentRequest::on_event(
.empty()) {
std::string info_out =
"Collection of consents is absent in HMI response or empty";
- LOG4CXX_ERROR(logger_, info_out);
+ SDL_LOG_ERROR(info_out);
SendResponse(false, mobile_apis::Result::GENERIC_ERROR, info_out.c_str());
return;
}
@@ -194,13 +194,12 @@ void GetInteriorVehicleDataConsentRequest::on_event(
"HMI response has incorrect number of consents expected: " +
std::to_string(number_of_expected_response_consents) +
", actual: " + std::to_string(response_consents->size());
- LOG4CXX_ERROR(logger_, info_out);
+ SDL_LOG_ERROR(info_out);
SendResponse(false, mobile_apis::Result::GENERIC_ERROR, info_out.c_str());
return;
}
- LOG4CXX_DEBUG(logger_,
- "Adding back filtered out module ids for response to mobile");
+ SDL_LOG_DEBUG("Adding back filtered out module ids for response to mobile");
uint32_t response_consents_counter = 0;
for (auto& consent : *(hmi_request_consents_.asArray())) {
// Only modify consent for moduleIds allowed by location constraints
@@ -221,7 +220,7 @@ void GetInteriorVehicleDataConsentRequest::on_event(
response_info, hmi_response[app_mngr::strings::msg_params]);
if (!result_of_saving) {
- LOG4CXX_DEBUG(logger_, "Consent saving failed");
+ SDL_LOG_DEBUG("Consent saving failed");
SendResponse(
false, mobile_apis::Result::GENERIC_ERROR, response_info.c_str());
return;
@@ -255,7 +254,7 @@ GetInteriorVehicleDataConsentRequest::~GetInteriorVehicleDataConsentRequest() {}
bool GetInteriorVehicleDataConsentRequest::IsUserLocationValid(
const ModuleUid& module_uid) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!rc_capabilities_manager_.IsSeatLocationCapabilityProvided()) {
return true;
@@ -278,7 +277,7 @@ rc_rpc_types::ModuleConsent
GetInteriorVehicleDataConsentRequest::GetModuleConsentByAccessMode(
const ModuleUid& module_uid,
const hmi_apis::Common_RCAccessMode::eType access_mode) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto get_auto_allow_consent = [](const ModuleUid& module_uid) {
return rc_rpc_types::ModuleConsent::CONSENTED;
@@ -328,31 +327,26 @@ GetInteriorVehicleDataConsentRequest::GetModuleConsentByAccessMode(
switch (access_mode) {
case hmi_apis::Common_RCAccessMode::AUTO_ALLOW: {
- LOG4CXX_DEBUG(logger_,
- "Calculating consent for module("
- << module_uid.first << ", " << module_uid.second
- << ") in accessMode: AUTO_ALLOW");
+ SDL_LOG_DEBUG("Calculating consent for module("
+ << module_uid.first << ", " << module_uid.second
+ << ") in accessMode: AUTO_ALLOW");
return get_auto_allow_consent(module_uid);
}
case hmi_apis::Common_RCAccessMode::AUTO_DENY: {
- LOG4CXX_DEBUG(logger_,
- "Calculating consent for module("
- << module_uid.first << ", " << module_uid.second
- << ") in accessMode: AUTO_DENY");
+ SDL_LOG_DEBUG("Calculating consent for module("
+ << module_uid.first << ", " << module_uid.second
+ << ") in accessMode: AUTO_DENY");
return get_auto_deny_consent(module_uid);
}
case hmi_apis::Common_RCAccessMode::ASK_DRIVER: {
- LOG4CXX_DEBUG(logger_,
- "Calculating consent for module("
- << module_uid.first << ", " << module_uid.second
- << ") in accessMode: ASK_DRIVER");
+ SDL_LOG_DEBUG("Calculating consent for module("
+ << module_uid.first << ", " << module_uid.second
+ << ") in accessMode: ASK_DRIVER");
return get_ask_driver_consent(module_uid);
}
default: {
- LOG4CXX_DEBUG(logger_,
- "Unknown accessMode specified. Denying consent for module("
- << module_uid.first << ", " << module_uid.second
- << ")");
+ SDL_LOG_DEBUG("Unknown accessMode specified. Denying consent for module("
+ << module_uid.first << ", " << module_uid.second << ")");
return rc_rpc_types::ModuleConsent::NOT_CONSENTED;
}
}
@@ -360,7 +354,7 @@ GetInteriorVehicleDataConsentRequest::GetModuleConsentByAccessMode(
bool GetInteriorVehicleDataConsentRequest::GetCalculatedVehicleDataConsent(
smart_objects::SmartObject& out_response) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
out_response =
smart_objects::SmartObject(smart_objects::SmartType::SmartType_Map);
@@ -391,10 +385,9 @@ bool GetInteriorVehicleDataConsentRequest::GetCalculatedVehicleDataConsent(
const ModuleUid module_uid(module_type, module_id.asString());
// Check if the user_location is covered by the module's serviceArea
if (!IsUserLocationValid(module_uid)) {
- LOG4CXX_DEBUG(logger_,
- "User is outside the serviceArea for module("
- << module_uid.first << ", " << module_uid.second
- << "). Denying consent");
+ SDL_LOG_DEBUG("User is outside the serviceArea for module("
+ << module_uid.first << ", " << module_uid.second
+ << "). Denying consent");
modules_consent_array->push_back(smart_objects::SmartObject(false));
continue;
}
@@ -404,10 +397,8 @@ bool GetInteriorVehicleDataConsentRequest::GetCalculatedVehicleDataConsent(
const bool is_multiple_access_allowed =
rc_capabilities_manager_.IsMultipleAccessAllowed(module_uid);
if (!is_multiple_access_allowed) {
- LOG4CXX_DEBUG(logger_,
- "multipleAccess disallowed for module("
- << module_uid.first << ", " << module_uid.second
- << ")");
+ SDL_LOG_DEBUG("multipleAccess disallowed for module("
+ << module_uid.first << ", " << module_uid.second << ")");
module_consent = get_disallowed_multiple_access_consent(module_uid);
modules_consent_array->push_back(smart_objects::SmartObject(
module_consent == rc_rpc_types::ModuleConsent::CONSENTED));
@@ -418,10 +409,9 @@ bool GetInteriorVehicleDataConsentRequest::GetCalculatedVehicleDataConsent(
module_consent = GetModuleConsentByAccessMode(module_uid, access_mode);
if (module_consent == rc_rpc_types::ModuleConsent::NOT_EXISTS) {
- LOG4CXX_DEBUG(logger_,
- "Unable to calculate consent for module("
- << module_uid.first << ", " << module_uid.second
- << "), should send moduleId to HMI for consent");
+ SDL_LOG_DEBUG("Unable to calculate consent for module("
+ << module_uid.first << ", " << module_uid.second
+ << "), should send moduleId to HMI for consent");
modules_consent_array->push_back(smart_objects::SmartObject());
can_handle_internally = false;
continue;
@@ -434,7 +424,7 @@ bool GetInteriorVehicleDataConsentRequest::GetCalculatedVehicleDataConsent(
bool GetInteriorVehicleDataConsentRequest::SaveModuleIdConsents(
std::string& info_out, const smart_objects::SmartObject& msg_params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& allowed = msg_params[message_params::kAllowed];
const auto& moduleIds =
@@ -444,7 +434,7 @@ bool GetInteriorVehicleDataConsentRequest::SaveModuleIdConsents(
info_out =
"The received module_id collection from mobile and received consent "
"collection from HMI are not equal by size.";
- LOG4CXX_ERROR(logger_, info_out);
+ SDL_LOG_ERROR(info_out);
return false;
}
std::string module_type = ModuleType();
@@ -456,8 +446,7 @@ bool GetInteriorVehicleDataConsentRequest::SaveModuleIdConsents(
auto application = application_manager_.application(connection_key());
if (!application) {
- LOG4CXX_ERROR(logger_,
- "Application with connection key:" << connection_key()
+ SDL_LOG_ERROR("Application with connection key:" << connection_key()
<< " isn't registered");
return false;
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_consent_response.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_consent_response.cc
index 3e197fbdea..fe33e29e44 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_consent_response.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_consent_response.cc
@@ -35,6 +35,8 @@
namespace rc_rpc_plugin {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetInteriorVehicleDataConsentResponse::GetInteriorVehicleDataConsentResponse(
const application_manager::commands::MessageSharedPtr& message,
const RCCommandParams& params)
@@ -46,7 +48,7 @@ GetInteriorVehicleDataConsentResponse::GetInteriorVehicleDataConsentResponse(
params.policy_handler_) {}
void GetInteriorVehicleDataConsentResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
application_manager_.GetRPCService().SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc
index 10f6303ac9..8d3a3d796e 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc
@@ -44,7 +44,7 @@ namespace commands {
using namespace json_keys;
using namespace message_params;
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+SDL_CREATE_LOG_VARIABLE("Commands")
GetInteriorVehicleDataRequest::GetInteriorVehicleDataRequest(
const app_mngr::commands::MessageSharedPtr& message,
@@ -53,18 +53,16 @@ GetInteriorVehicleDataRequest::GetInteriorVehicleDataRequest(
, excessive_subscription_occured_(false) {}
bool GetInteriorVehicleDataRequest::ProcessCapabilities() {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject* rc_capabilities =
- hmi_capabilities_.rc_capability();
+ SDL_LOG_AUTO_TRACE();
+ const auto rc_capability = hmi_capabilities_.rc_capability();
const std::string module_type = ModuleType();
const std::string module_id = ModuleId();
const ModuleUid module(module_type, module_id);
- if (rc_capabilities &&
+ if (rc_capability &&
!rc_capabilities_manager_.CheckIfModuleExistsInCapabilities(module)) {
- LOG4CXX_WARN(
- logger_,
- "Accessing not supported module: " << module_type << " " << module_id);
+ SDL_LOG_WARN("Accessing not supported module: " << module_type << " "
+ << module_id);
SetResourceState(ModuleType(), ResourceState::FREE);
SendResponse(false,
mobile_apis::Result::UNSUPPORTED_RESOURCE,
@@ -101,7 +99,7 @@ void GetInteriorVehicleDataRequest::FilterDisabledModuleData(
void GetInteriorVehicleDataRequest::ProcessResponseToMobileFromCache(
app_mngr::ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& data_mapping = RCHelpers::GetModuleTypeToDataMapping();
const std::string module_type = ModuleType();
const std::string module_id = ModuleId();
@@ -119,29 +117,41 @@ void GetInteriorVehicleDataRequest::ProcessResponseToMobileFromCache(
module_id;
const auto& request_msg_params = (*message_)[app_mngr::strings::msg_params];
- LOG4CXX_DEBUG(logger_,
- "kSubscribe exist" << request_msg_params.keyExists(
- message_params::kSubscribe));
+ SDL_LOG_DEBUG("kSubscribe exist"
+ << request_msg_params.keyExists(message_params::kSubscribe));
+
+ mobile_apis::Result::eType result_code = mobile_apis::Result::SUCCESS;
if (request_msg_params.keyExists(message_params::kSubscribe)) {
response_msg_params[message_params::kIsSubscribed] =
request_msg_params[message_params::kSubscribe].asBool();
if (request_msg_params[message_params::kSubscribe].asBool()) {
auto extension = RCHelpers::GetRCExtension(*app);
DCHECK(extension);
- extension->SubscribeToInteriorVehicleData(module);
+ const bool is_app_already_subscribed =
+ extension->IsSubscribedToInteriorVehicleData(module);
+ if (is_app_already_subscribed) {
+ response_msg_params[app_mngr::strings::info] =
+ "App is already subscribed to the provided module";
+ result_code = mobile_apis::Result::WARNINGS;
+ } else {
+ extension->SubscribeToInteriorVehicleData(module);
+ app->UpdateHash();
+ }
}
}
- SendResponse(
- true, mobile_apis::Result::SUCCESS, nullptr, &response_msg_params);
+ SendResponse(true, result_code, nullptr, &response_msg_params);
if (AppShouldBeUnsubscribed()) {
auto extension = RCHelpers::GetRCExtension(*app);
DCHECK(extension);
- extension->UnsubscribeFromInteriorVehicleData(module);
+ if (extension->IsSubscribedToInteriorVehicleData(module)) {
+ extension->UnsubscribeFromInteriorVehicleData(module);
+ app->UpdateHash();
+ }
}
}
bool GetInteriorVehicleDataRequest::CheckRateLimits() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::string module_type = ModuleType();
const std::string module_id = ModuleId();
const ModuleUid module(module_type, module_id);
@@ -149,7 +159,7 @@ bool GetInteriorVehicleDataRequest::CheckRateLimits() {
}
bool GetInteriorVehicleDataRequest::AppShouldBeUnsubscribed() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& msg_params = (*message_)[app_mngr::strings::msg_params];
if (msg_params.keyExists(message_params::kSubscribe)) {
return !(msg_params[message_params::kSubscribe].asBool());
@@ -159,7 +169,7 @@ bool GetInteriorVehicleDataRequest::AppShouldBeUnsubscribed() {
bool GetInteriorVehicleDataRequest::TheLastAppShouldBeUnsubscribed(
app_mngr::ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (AppShouldBeUnsubscribed()) {
const std::string module_type = ModuleType();
const std::string module_id = ModuleId();
@@ -168,9 +178,8 @@ bool GetInteriorVehicleDataRequest::TheLastAppShouldBeUnsubscribed(
RCHelpers::AppsSubscribedToModule(application_manager_, module);
if (subscribed_to_module_type.size() == 1 &&
subscribed_to_module_type.front() == app) {
- LOG4CXX_DEBUG(logger_,
- "The last application unsubscribes from "
- << module_type << " " << module_id);
+ SDL_LOG_DEBUG("The last application unsubscribes from "
+ << module_type << " " << module_id);
return true;
}
}
@@ -178,7 +187,7 @@ bool GetInteriorVehicleDataRequest::TheLastAppShouldBeUnsubscribed(
}
void GetInteriorVehicleDataRequest::Execute() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!ProcessCapabilities()) {
return;
@@ -200,7 +209,7 @@ void GetInteriorVehicleDataRequest::Execute() {
RemoveExcessiveSubscription();
}
if (!CheckRateLimits()) {
- LOG4CXX_WARN(logger_, "GetInteriorVehicleData frequency is too high.");
+ SDL_LOG_WARN("GetInteriorVehicleData frequency is too high.");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
@@ -217,7 +226,7 @@ void GetInteriorVehicleDataRequest::Execute() {
void GetInteriorVehicleDataRequest::on_event(
const app_mngr::event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
RCCommandRequest::on_event(event);
if (hmi_apis::FunctionID::RC_GetInteriorVehicleData != event.id()) {
@@ -236,7 +245,10 @@ void GetInteriorVehicleDataRequest::on_event(
helpers::Compare<mobile_apis::Result::eType, helpers::EQ, helpers::ONE>(
result_code,
mobile_apis::Result::SUCCESS,
- mobile_apis::Result::WARNINGS);
+ mobile_apis::Result::WARNINGS,
+ mobile_apis::Result::WRONG_LANGUAGE,
+ mobile_apis::Result::RETRY,
+ mobile_apis::Result::SAVED);
if (mobile_apis::Result::READ_ONLY == result_code) {
result = false;
@@ -245,10 +257,8 @@ void GetInteriorVehicleDataRequest::on_event(
if (result) {
if (!IsModuleIdProvided(hmi_response)) {
- LOG4CXX_WARN(logger_,
- "conditional mandatory parameter "
- << message_params::kModuleId
- << " missed in hmi response");
+ SDL_LOG_WARN("conditional mandatory parameter "
+ << message_params::kModuleId << " missed in hmi response");
result = false;
result_code = mobile_apis::Result::GENERIC_ERROR;
}
@@ -261,6 +271,9 @@ void GetInteriorVehicleDataRequest::on_event(
const ModuleUid module(module_type, module_id);
if (TheLastAppShouldBeUnsubscribed(app)) {
+ SDL_LOG_DEBUG("Removing module: [" << module.first << ":" << module.second
+ << "] "
+ << "from cache");
interior_data_cache_.Remove(module);
}
ProccessSubscription(hmi_response);
@@ -289,7 +302,7 @@ GetInteriorVehicleDataRequest::~GetInteriorVehicleDataRequest() {}
void GetInteriorVehicleDataRequest::ProccessSubscription(
const ns_smart_device_link::ns_smart_objects::SmartObject& hmi_response) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const bool is_subscribe_present_in_request =
(*message_)[app_mngr::strings::msg_params].keyExists(
@@ -333,10 +346,8 @@ void GetInteriorVehicleDataRequest::ProccessSubscription(
}
if (is_subscribe_present_in_request && !isSubscribed_present_in_response) {
- LOG4CXX_WARN(logger_,
- "conditional mandatory parameter "
- << message_params::kIsSubscribed
- << " missed in hmi response");
+ SDL_LOG_WARN("conditional mandatory parameter "
+ << message_params::kIsSubscribed << " missed in hmi response");
is_subscribed = extension->IsSubscribedToInteriorVehicleData(module);
temp_hmi_response[app_mngr::strings::msg_params]
@@ -345,8 +356,7 @@ void GetInteriorVehicleDataRequest::ProccessSubscription(
}
if (!is_subscribe_present_in_request && isSubscribed_present_in_response) {
- LOG4CXX_WARN(logger_,
- "Parameter " << message_params::kIsSubscribed
+ SDL_LOG_WARN("Parameter " << message_params::kIsSubscribed
<< " is ignored due to absence '"
<< message_params::kSubscribe
<< "' parameter in request");
@@ -365,31 +375,31 @@ void GetInteriorVehicleDataRequest::ProccessSubscription(
.asBool();
is_subscribed = response_subscribe;
- LOG4CXX_TRACE(logger_, "request_subscribe = " << request_subscribe);
- LOG4CXX_TRACE(logger_, "response_subscribe = " << response_subscribe);
+ SDL_LOG_TRACE("request_subscribe = " << request_subscribe);
+ SDL_LOG_TRACE("response_subscribe = " << response_subscribe);
if (request_subscribe == response_subscribe) {
const std::string module_type = ModuleType();
const std::string module_id = ModuleId();
const ModuleUid module(module_type, module_id);
- if (response_subscribe) {
- LOG4CXX_DEBUG(logger_,
- "SubscribeToInteriorVehicleData " << app->app_id() << " "
- << module_type << " "
- << module_id);
+ if (response_subscribe &&
+ !extension->IsSubscribedToInteriorVehicleData(module)) {
+ SDL_LOG_DEBUG("SubscribeToInteriorVehicleData "
+ << app->app_id() << " " << module_type << " " << module_id);
extension->SubscribeToInteriorVehicleData(module);
- } else {
- LOG4CXX_DEBUG(logger_,
- "UnsubscribeFromInteriorVehicleData "
- << app->app_id() << " " << module_type << " "
- << module_id);
+ } else if (!response_subscribe &&
+ extension->IsSubscribedToInteriorVehicleData(module)) {
+ SDL_LOG_DEBUG("UnsubscribeFromInteriorVehicleData "
+ << app->app_id() << " " << module_type << " " << module_id);
extension->UnsubscribeFromInteriorVehicleData(module);
}
+
+ app->UpdateHash();
}
}
bool GetInteriorVehicleDataRequest::HasRequestExcessiveSubscription() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const bool is_subscribe_present_in_request =
(*message_)[app_mngr::strings::msg_params].keyExists(
message_params::kSubscribe);
@@ -417,12 +427,12 @@ bool GetInteriorVehicleDataRequest::HasRequestExcessiveSubscription() {
}
void GetInteriorVehicleDataRequest::RemoveExcessiveSubscription() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
(*message_)[app_mngr::strings::msg_params].erase(message_params::kSubscribe);
}
std::string GetInteriorVehicleDataRequest::ModuleType() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
mobile_apis::ModuleType::eType module_type =
static_cast<mobile_apis::ModuleType::eType>(
(*message_)[app_mngr::strings::msg_params]
@@ -435,7 +445,7 @@ std::string GetInteriorVehicleDataRequest::ModuleType() const {
}
std::string GetInteriorVehicleDataRequest::ModuleId() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto msg_params = (*message_)[app_mngr::strings::msg_params];
if (msg_params.keyExists(message_params::kModuleId)) {
return msg_params[message_params::kModuleId].asString();
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_response.cc
index b1fa8d6ea0..1c19cc641d 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_response.cc
@@ -37,6 +37,8 @@
namespace rc_rpc_plugin {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetInteriorVehicleDataResponse::GetInteriorVehicleDataResponse(
const app_mngr::commands::MessageSharedPtr& message,
const RCCommandParams& params)
@@ -49,7 +51,7 @@ GetInteriorVehicleDataResponse::GetInteriorVehicleDataResponse(
GetInteriorVehicleDataResponse::~GetInteriorVehicleDataResponse() {}
void GetInteriorVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
RCHelpers::RemoveRedundantGPSDataFromIVDataMsg(
(*message_)[app_mngr::strings::msg_params]);
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/on_interior_vehicle_data_notification.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/on_interior_vehicle_data_notification.cc
index 91ecbe77eb..f7a9ae50bd 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/on_interior_vehicle_data_notification.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/on_interior_vehicle_data_notification.cc
@@ -40,7 +40,7 @@
namespace rc_rpc_plugin {
namespace commands {
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+SDL_CREATE_LOG_VARIABLE("Commands")
OnInteriorVehicleDataNotification::OnInteriorVehicleDataNotification(
const app_mngr::commands::MessageSharedPtr& message,
@@ -65,7 +65,7 @@ void OnInteriorVehicleDataNotification::AddDataToCache(
}
void OnInteriorVehicleDataNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::string module_type = ModuleType();
const std::string module_id = ModuleId();
@@ -87,10 +87,9 @@ void OnInteriorVehicleDataNotification::Run() {
const auto extension = RCHelpers::GetRCExtension(app);
DCHECK(extension);
- LOG4CXX_TRACE(logger_,
- "Check subscription for " << app.app_id()
- << "and module type " << module_type
- << " " << module_id);
+ SDL_LOG_TRACE("Check subscription for "
+ << app.app_id() << "and module type " << module_type << " "
+ << module_id);
if (extension->IsSubscribedToInteriorVehicleData(module)) {
(*message_)[app_mngr::strings::params]
@@ -105,7 +104,7 @@ void OnInteriorVehicleDataNotification::Run() {
}
std::string OnInteriorVehicleDataNotification::ModuleId() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto msg_params = (*message_)[app_mngr::strings::msg_params];
if (msg_params[message_params::kModuleData].keyExists(
message_params::kModuleId)) {
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/release_interior_vehicle_data_module_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/release_interior_vehicle_data_module_request.cc
index e30d7869bd..47430c2487 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/release_interior_vehicle_data_module_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/release_interior_vehicle_data_module_request.cc
@@ -41,6 +41,8 @@ namespace rc_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
namespace {
struct ResponseParams {
std::string response_info;
@@ -53,9 +55,9 @@ struct ResponseParams {
void PrepareResponseResult(
ResponseParams& response_params_out,
- rc_rpc_plugin::ResourceReleasedState::eType& released_result) {
+ const rc_rpc_plugin::ResourceReleasedState::eType& released_result) {
std::stringstream ss;
- auto info_inserter = [&ss, response_params_out](std::string info) {
+ auto info_inserter = [&ss, response_params_out](const std::string& info) {
ss << "Module [" << response_params_out.module_type << ":"
<< response_params_out.module_id << "] " << info;
};
@@ -90,18 +92,16 @@ ReleaseInteriorVehicleDataModuleRequest::
: RCCommandRequest(message, params) {}
bool ReleaseInteriorVehicleDataModuleRequest::ProcessCapabilities() {
- LOG4CXX_AUTO_TRACE(logger_);
- const smart_objects::SmartObject* rc_capabilities =
- hmi_capabilities_.rc_capability();
+ SDL_LOG_AUTO_TRACE();
+ const auto rc_capability = hmi_capabilities_.rc_capability();
const std::string module_type = ModuleType();
const std::string module_id = ModuleId();
const ModuleUid module(module_type, module_id);
- if (rc_capabilities &&
+ if (rc_capability &&
!rc_capabilities_manager_.CheckIfModuleExistsInCapabilities(module)) {
- LOG4CXX_WARN(
- logger_,
- "Accessing not supported module: " << module_type << " " << module_id);
+ SDL_LOG_WARN("Accessing not supported module: " << module_type << " "
+ << module_id);
SendResponse(false,
mobile_apis::Result::UNSUPPORTED_RESOURCE,
"Accessing not supported module");
@@ -111,7 +111,7 @@ bool ReleaseInteriorVehicleDataModuleRequest::ProcessCapabilities() {
}
void ReleaseInteriorVehicleDataModuleRequest::Execute() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!ProcessCapabilities()) {
return;
@@ -123,7 +123,7 @@ void ReleaseInteriorVehicleDataModuleRequest::Execute() {
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -150,12 +150,11 @@ void ReleaseInteriorVehicleDataModuleRequest::Execute() {
NotificationTrigger::MODULE_ALLOCATION, app);
}
- LOG4CXX_DEBUG(logger_,
- "Resource for module: "
- << ModuleType() << " with id: " << module_id
- << " was released with result " << std::boolalpha
- << response_params.success_result
- << " and result_code: " << response_params.result_code);
+ SDL_LOG_DEBUG("Resource for module: "
+ << ModuleType() << " with id: " << module_id
+ << " was released with result " << std::boolalpha
+ << response_params.success_result
+ << " and result_code: " << response_params.result_code);
SendResponse(response_params.success_result,
response_params.result_code,
@@ -163,7 +162,7 @@ void ReleaseInteriorVehicleDataModuleRequest::Execute() {
}
std::string ReleaseInteriorVehicleDataModuleRequest::ModuleType() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
mobile_apis::ModuleType::eType module_type =
static_cast<mobile_apis::ModuleType::eType>(
(*message_)[app_mngr::strings::msg_params]
@@ -177,7 +176,7 @@ std::string ReleaseInteriorVehicleDataModuleRequest::ModuleType() const {
}
std::string ReleaseInteriorVehicleDataModuleRequest::ModuleId() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto msg_params = (*message_)[app_mngr::strings::msg_params];
if (msg_params.keyExists(message_params::kModuleId)) {
return msg_params[message_params::kModuleId].asString();
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/release_interior_vehicle_data_module_response.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/release_interior_vehicle_data_module_response.cc
index fae792f143..766c523b58 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/release_interior_vehicle_data_module_response.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/release_interior_vehicle_data_module_response.cc
@@ -35,6 +35,8 @@
namespace rc_rpc_plugin {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ReleaseInteriorVehicleDataModuleResponse::
ReleaseInteriorVehicleDataModuleResponse(
const application_manager::commands::MessageSharedPtr& message,
@@ -47,7 +49,7 @@ ReleaseInteriorVehicleDataModuleResponse::
params.policy_handler_) {}
void ReleaseInteriorVehicleDataModuleResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
application_manager_.GetRPCService().SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc
index c3e5e807d7..dea660b780 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc
@@ -45,7 +45,7 @@ namespace commands {
using namespace json_keys;
using namespace message_params;
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+SDL_CREATE_LOG_VARIABLE("Commands")
SetInteriorVehicleDataRequest::SetInteriorVehicleDataRequest(
const app_mngr::commands::MessageSharedPtr& message,
@@ -62,7 +62,7 @@ SetInteriorVehicleDataRequest::~SetInteriorVehicleDataRequest() {}
*/
bool ClearUnrelatedModuleData(const std::string& module_type,
smart_objects::SmartObject& module_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& all_module_types = RCHelpers::GetModuleTypesList();
const auto& data_mapping = RCHelpers::GetModuleTypeToDataMapping();
bool module_type_and_data_match = false;
@@ -84,31 +84,34 @@ mobile_apis::Result::eType PrepareResultCodeAndInfo(
mobile_apis::Result::UNSUPPORTED_RESOURCE;
if (message_params::kLightState == module_data_capabilities.first) {
switch (module_data_capabilities.second) {
- case capabilitiesStatus::missedLightName:
+ case capabilitiesStatus::kMissedLightName:
info = "The requested LightName is not supported by the vehicle.";
break;
- case capabilitiesStatus::missedParam:
+ case capabilitiesStatus::kMissedParam:
info =
"The requested parameter of the given LightName is not supported "
"by the vehicle.";
break;
- case capabilitiesStatus::readOnly:
+ case capabilitiesStatus::kReadOnly:
info = "The requested parameter is read-only.";
result_code = mobile_apis::Result::READ_ONLY;
break;
default:
break;
}
-
+ } else if (module_data_capabilities.second ==
+ capabilitiesStatus::kInvalidStatus) {
+ info = "The RC Capability is not available";
} else {
info = "Accessing not supported module data.";
}
+
+ SDL_LOG_WARN(info);
return result_code;
- LOG4CXX_WARN(logger_, info);
}
void SetInteriorVehicleDataRequest::Execute() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject& module_data =
(*message_)[app_mngr::strings::msg_params][message_params::kModuleData];
@@ -118,8 +121,7 @@ void SetInteriorVehicleDataRequest::Execute() {
const std::string module_id = ModuleId();
const ModuleUid module(module_type, module_id);
if (!rc_capabilities_manager_.CheckIfModuleExistsInCapabilities(module)) {
- LOG4CXX_WARN(logger_,
- "Accessing not supported module: " << module_type << " "
+ SDL_LOG_WARN("Accessing not supported module: " << module_type << " "
<< module_id);
SetResourceState(ModuleType(), ResourceState::FREE);
SendResponse(false,
@@ -133,7 +135,7 @@ void SetInteriorVehicleDataRequest::Execute() {
rc_capabilities_manager_.GetModuleDataCapabilities(module_data,
module_id);
- if (capabilitiesStatus::success != module_data_capabilities.second) {
+ if (capabilitiesStatus::kSuccess != module_data_capabilities.second) {
SetResourceState(ModuleType(), ResourceState::FREE);
std::string info;
mobile_apis::Result::eType result =
@@ -144,7 +146,7 @@ void SetInteriorVehicleDataRequest::Execute() {
if (rc_capabilities_manager_.AreAllParamsReadOnly(module_data,
module_type)) {
- LOG4CXX_WARN(logger_, "All request params in module type are READ ONLY!");
+ SDL_LOG_WARN("All request params in module type are READ ONLY!");
SetResourceState(ModuleType(), ResourceState::FREE);
SendResponse(false,
mobile_apis::Result::READ_ONLY,
@@ -152,14 +154,14 @@ void SetInteriorVehicleDataRequest::Execute() {
return;
}
- module_data_capabilities = std::make_pair("", capabilitiesStatus::success);
+ module_data_capabilities = std::make_pair("", capabilitiesStatus::kSuccess);
if (rc_capabilities_manager_.AreReadOnlyParamsPresent(
module_data, module_type, module_data_capabilities)) {
- LOG4CXX_DEBUG(logger_, "Request module type has READ ONLY parameters");
+ SDL_LOG_DEBUG("Request module type has READ ONLY parameters");
if (enums_value::kLight == module_data_capabilities.first &&
- capabilitiesStatus::success != module_data_capabilities.second) {
+ capabilitiesStatus::kSuccess != module_data_capabilities.second) {
SetResourceState(ModuleType(), ResourceState::FREE);
SendResponse(
false,
@@ -168,7 +170,7 @@ void SetInteriorVehicleDataRequest::Execute() {
return;
}
- LOG4CXX_DEBUG(logger_, "Cutting-off READ ONLY parameters... ");
+ SDL_LOG_DEBUG("Cutting-off READ ONLY parameters... ");
CutOffReadOnlyParams(module_data);
}
@@ -188,7 +190,7 @@ void SetInteriorVehicleDataRequest::Execute() {
if (app_wants_to_set_audio_src) {
if (!app->IsAllowedToChangeAudioSource()) {
- LOG4CXX_WARN(logger_, "App is not allowed to change audio source");
+ SDL_LOG_WARN("App is not allowed to change audio source");
SetResourceState(ModuleType(), ResourceState::FREE);
SendResponse(false,
mobile_apis::Result::REJECTED,
@@ -208,7 +210,7 @@ void SetInteriorVehicleDataRequest::Execute() {
&(*message_)[app_mngr::strings::msg_params],
true);
} else {
- LOG4CXX_WARN(logger_, "Request module type & data mismatch!");
+ SDL_LOG_WARN("Request module type & data mismatch!");
SetResourceState(ModuleType(), ResourceState::FREE);
SendResponse(false,
mobile_apis::Result::INVALID_DATA,
@@ -218,7 +220,7 @@ void SetInteriorVehicleDataRequest::Execute() {
void SetInteriorVehicleDataRequest::on_event(
const app_mngr::event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
RCCommandRequest::on_event(event);
if (hmi_apis::FunctionID::RC_SetInteriorVehicleData != event.id()) {
@@ -242,10 +244,8 @@ void SetInteriorVehicleDataRequest::on_event(
if (result) {
if (!IsModuleIdProvided(hmi_response)) {
- LOG4CXX_WARN(logger_,
- "conditional mandatory parameter "
- << message_params::kModuleId
- << " missed in hmi response");
+ SDL_LOG_WARN("conditional mandatory parameter "
+ << message_params::kModuleId << " missed in hmi response");
result = false;
result_code = mobile_apis::Result::GENERIC_ERROR;
}
@@ -263,7 +263,7 @@ void SetInteriorVehicleDataRequest::on_event(
auto app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer.");
+ SDL_LOG_ERROR("NULL pointer.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED, "");
return;
}
@@ -296,7 +296,7 @@ void SetInteriorVehicleDataRequest::on_event(
void SetInteriorVehicleDataRequest::CheckAudioSource(
const smart_objects::SmartObject& audio_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (audio_data.keyExists(message_params::kSource)) {
application_manager_.set_current_audio_source(
audio_data[message_params::kSource].asUInt());
@@ -305,7 +305,7 @@ void SetInteriorVehicleDataRequest::CheckAudioSource(
void SetInteriorVehicleDataRequest::CutOffReadOnlyParams(
smart_objects::SmartObject& module_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::string module_type = ModuleType();
const auto& module_type_params =
rc_capabilities_manager_.ControlDataForType(module_data, module_type);
@@ -317,9 +317,8 @@ void SetInteriorVehicleDataRequest::CutOffReadOnlyParams(
for (; it != equalizer_settings.asArray()->end(); ++it) {
if (it->keyExists(message_params::kChannelName)) {
it->erase(message_params::kChannelName);
- LOG4CXX_DEBUG(logger_,
- "Cutting-off READ ONLY parameter: "
- << message_params::kChannelName);
+ SDL_LOG_DEBUG("Cutting-off READ ONLY parameter: "
+ << message_params::kChannelName);
}
}
}
@@ -330,13 +329,13 @@ void SetInteriorVehicleDataRequest::CutOffReadOnlyParams(
for (const auto& param : ro_params) {
if (module_type_params.keyExists(param)) {
module_data[data_mapping(module_type)].erase(param);
- LOG4CXX_DEBUG(logger_, "Cutting-off READ ONLY parameter: " << param);
+ SDL_LOG_DEBUG("Cutting-off READ ONLY parameter: " << param);
}
}
}
std::string SetInteriorVehicleDataRequest::ModuleType() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
mobile_apis::ModuleType::eType module_type =
static_cast<mobile_apis::ModuleType::eType>(
(*message_)[app_mngr::strings::msg_params]
@@ -349,7 +348,7 @@ std::string SetInteriorVehicleDataRequest::ModuleType() const {
}
std::string SetInteriorVehicleDataRequest::ModuleId() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto msg_params = (*message_)[app_mngr::strings::msg_params];
if (msg_params[message_params::kModuleData].keyExists(
message_params::kModuleId)) {
@@ -370,7 +369,7 @@ std::string SetInteriorVehicleDataRequest::ModuleId() const {
AcquireResult::eType SetInteriorVehicleDataRequest::AcquireResource(
const app_mngr::commands::MessageSharedPtr& message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::string module_type = ModuleType();
app_mngr::ApplicationSharedPtr app =
application_manager_.application(CommandRequestImpl::connection_key());
@@ -386,7 +385,7 @@ bool SetInteriorVehicleDataRequest::IsResourceFree(
void SetInteriorVehicleDataRequest::SetResourceState(
const std::string& module_type, const ResourceState::eType state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
app_mngr::ApplicationSharedPtr app =
application_manager_.application(CommandRequestImpl::connection_key());
resource_allocation_manager_.SetResourceState(
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_response.cc
index 4dedd4b5a2..aeab82e12c 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_response.cc
@@ -5,6 +5,8 @@
namespace rc_rpc_plugin {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SetInteriorVehicleDataResponse::SetInteriorVehicleDataResponse(
const app_mngr::commands::MessageSharedPtr& message,
const RCCommandParams& params)
@@ -17,7 +19,7 @@ SetInteriorVehicleDataResponse::SetInteriorVehicleDataResponse(
SetInteriorVehicleDataResponse::~SetInteriorVehicleDataResponse() {}
void SetInteriorVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
application_manager_.GetRPCService().SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc
index 885c5ac0dd..12608d64c1 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc
@@ -41,7 +41,7 @@
#include "rc_rpc_plugin/rc_module_constants.h"
#include "smart_objects/enum_schema_item.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+SDL_CREATE_LOG_VARIABLE("Commands")
namespace rc_rpc_plugin {
namespace commands {
@@ -75,7 +75,7 @@ bool RCCommandRequest::IsInterfaceAvailable(
}
void RCCommandRequest::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::string module_type = ModuleType();
SetResourceState(module_type, ResourceState::FREE);
SendResponse(
@@ -83,7 +83,7 @@ void RCCommandRequest::onTimeOut() {
}
bool RCCommandRequest::CheckDriverConsent() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
app_mngr::ApplicationSharedPtr app =
application_manager_.application(CommandRequestImpl::connection_key());
@@ -108,14 +108,14 @@ rc_rpc_plugin::TypeAccess RCCommandRequest::CheckModule(
bool RCCommandRequest::IsModuleIdProvided(
const smart_objects::SmartObject& hmi_response) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return hmi_response[app_mngr::strings::msg_params]
[message_params::kModuleData]
.keyExists(message_params::kModuleId);
}
void RCCommandRequest::SendDisallowed(rc_rpc_plugin::TypeAccess access) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::string info;
if (rc_rpc_plugin::kDisallowed == access) {
info = disallowed_info_.empty()
@@ -124,42 +124,42 @@ void RCCommandRequest::SendDisallowed(rc_rpc_plugin::TypeAccess access) {
} else {
return;
}
- LOG4CXX_ERROR(logger_, info);
+ SDL_LOG_ERROR(info);
SendResponse(false, mobile_apis::Result::DISALLOWED, info.c_str());
}
void RCCommandRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
app_mngr::ApplicationSharedPtr app =
application_manager_.application(CommandRequestImpl::connection_key());
if (!IsInterfaceAvailable(app_mngr::HmiInterfaces::HMI_INTERFACE_RC)) {
- LOG4CXX_WARN(logger_, "HMI interface RC is not available");
+ SDL_LOG_WARN("HMI interface RC is not available");
SendResponse(false,
mobile_apis::Result::UNSUPPORTED_RESOURCE,
- "Remote control is not supported by system");
+ "RC is not supported by system");
return;
}
- LOG4CXX_TRACE(logger_, "RC interface is available!");
+ SDL_LOG_TRACE("RC interface is available!");
if (!policy_handler_.CheckHMIType(
app->policy_app_id(),
mobile_apis::AppHMIType::eType::REMOTE_CONTROL,
app->app_types())) {
- LOG4CXX_WARN(logger_, "Application has no remote control functions");
+ SDL_LOG_WARN("Application has no remote control functions");
SendResponse(false, mobile_apis::Result::DISALLOWED, "");
return;
}
if (!resource_allocation_manager_.is_rc_enabled()) {
- LOG4CXX_WARN(logger_, "Remote control is disabled by user");
+ SDL_LOG_WARN("Remote control is disabled by user");
SetResourceState(ModuleType(), ResourceState::FREE);
SendResponse(false,
mobile_apis::Result::USER_DISALLOWED,
"Remote control is disabled by user");
return;
}
- auto rc_capabilities = hmi_capabilities_.rc_capability();
- if (!rc_capabilities || rc_capabilities->empty()) {
- LOG4CXX_WARN(logger_, "Accessing not supported module: " << ModuleType());
+ auto rc_capability = hmi_capabilities_.rc_capability();
+ if (!rc_capability || rc_capability->empty()) {
+ SDL_LOG_WARN("Accessing not supported module: " << ModuleType());
SetResourceState(ModuleType(), ResourceState::FREE);
SendResponse(false,
mobile_apis::Result::UNSUPPORTED_RESOURCE,
@@ -178,12 +178,12 @@ void RCCommandRequest::Run() {
}
bool RCCommandRequest::AcquireResources() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::string module_type = ModuleType();
const std::string module_id = ModuleId();
if (!IsResourceFree(module_type, module_id)) {
- LOG4CXX_WARN(logger_, "Resource is busy.");
+ SDL_LOG_WARN("Resource is busy.");
SendResponse(false, mobile_apis::Result::IN_USE, "");
return false;
}
@@ -211,7 +211,7 @@ bool RCCommandRequest::AcquireResources() {
}
void RCCommandRequest::on_event(const app_mngr::event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (event.id() == hmi_apis::FunctionID::RC_GetInteriorVehicleDataConsent) {
ProcessAccessResponse(event);
@@ -223,13 +223,13 @@ void RCCommandRequest::on_event(const app_mngr::event_engine::Event& event) {
void RCCommandRequest::ProcessAccessResponse(
const app_mngr::event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
app_mngr::ApplicationSharedPtr app =
application_manager_.application(CommandRequestImpl::connection_key());
const std::string module_type = ModuleType();
const std::string module_id = ModuleId();
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer.");
+ SDL_LOG_ERROR("NULL pointer.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED, "");
return;
}
@@ -247,8 +247,8 @@ void RCCommandRequest::ProcessAccessResponse(
mobile_apis::Result::SUCCESS,
mobile_apis::Result::WARNINGS);
- bool is_allowed = false;
if (result) {
+ bool is_allowed = false;
if (message[app_mngr::strings::msg_params].keyExists(
message_params::kAllowed)) {
is_allowed =
@@ -275,7 +275,7 @@ void RCCommandRequest::ProcessConsentResult(const bool is_allowed,
const std::string& module_type,
const std::string& module_id,
const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (is_allowed) {
SetResourceState(module_type, ResourceState::BUSY);
Execute(); // run child's logic
@@ -293,7 +293,7 @@ void RCCommandRequest::ProcessConsentResult(const bool is_allowed,
void RCCommandRequest::ProcessAskDriverMode(const std::string& module_type,
const std::string& module_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto app =
application_manager_.application(CommandRequestImpl::connection_key());
const std::string policy_app_id = app->policy_app_id();
@@ -321,7 +321,7 @@ void RCCommandRequest::ProcessAskDriverMode(const std::string& module_type,
void RCCommandRequest::SendGetUserConsent(
const std::string& module_type,
const smart_objects::SmartObject& module_ids) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
app_mngr::ApplicationSharedPtr app =
application_manager_.application(CommandRequestImpl::connection_key());
DCHECK(app);
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/interior_data_cache_impl.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/interior_data_cache_impl.cc
index 3e50818210..ab33fde764 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/interior_data_cache_impl.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/interior_data_cache_impl.cc
@@ -41,7 +41,7 @@
namespace rc_rpc_plugin {
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule");
+SDL_CREATE_LOG_VARIABLE("RemoteControlModule");
InteriorDataCacheImpl::InteriorDataCacheImpl() {}
@@ -49,9 +49,8 @@ InteriorDataCacheImpl::~InteriorDataCacheImpl() {}
void InteriorDataCacheImpl::Add(const ModuleUid& module,
const smart_objects::SmartObject& module_data) {
- LOG4CXX_TRACE(
- logger_,
- "module_type : " << module.first << " module_id : " << module.second);
+ SDL_LOG_TRACE("module_type : " << module.first
+ << " module_id : " << module.second);
sync_primitives::AutoLock autolock(cached_data_lock_);
auto it = cached_data_.find(module);
if (cached_data_.end() == it) {
@@ -63,19 +62,17 @@ void InteriorDataCacheImpl::Add(const ModuleUid& module,
smart_objects::SmartObject InteriorDataCacheImpl::Retrieve(
const ModuleUid& module) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock autolock(cached_data_lock_);
auto it = cached_data_.find(module);
if (it == cached_data_.end()) {
- LOG4CXX_WARN(logger_,
- "Module with type: " << module.first
+ SDL_LOG_WARN("Module with type: " << module.first
<< " and id: " << module.second
<< " was not found in cache");
return smart_objects::SmartObject(smart_objects::SmartType_Null);
}
- LOG4CXX_TRACE(
- logger_,
- "module_type : " << module.first << " module_id : " << module.second);
+ SDL_LOG_TRACE("module_type : " << module.first
+ << " module_id : " << module.second);
return it->second;
}
@@ -92,34 +89,31 @@ std::vector<ModuleUid> InteriorDataCacheImpl::GetCachedModulesByType(
}
bool InteriorDataCacheImpl::Contains(const ModuleUid& module) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock autolock(cached_data_lock_);
auto it = cached_data_.find(module);
const bool contains = it != cached_data_.end();
- LOG4CXX_TRACE(logger_,
- "module_type : " << module.first
+ SDL_LOG_TRACE("module_type : " << module.first
<< " module_id : " << module.second << " "
<< (contains ? "true" : "false"));
return contains;
}
void InteriorDataCacheImpl::Remove(const ModuleUid& module) {
- LOG4CXX_TRACE(
- logger_,
- "module_type : " << module.first << " module_id : " << module.second);
+ SDL_LOG_TRACE("module_type : " << module.first
+ << " module_id : " << module.second);
sync_primitives::AutoLock autolock(cached_data_lock_);
auto it = cached_data_.find(module);
if (cached_data_.end() == it) {
- LOG4CXX_TRACE(
- logger_,
- "Not existing module : " << module.first << " " << module.second);
+ SDL_LOG_TRACE("Not existing module : " << module.first << " "
+ << module.second);
return;
}
cached_data_.erase(it);
}
void InteriorDataCacheImpl::Clear() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock autolock(cached_data_lock_);
cached_data_.clear();
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/interior_data_manager_impl.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/interior_data_manager_impl.cc
index 50568de63a..c295ad4f11 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/interior_data_manager_impl.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/interior_data_manager_impl.cc
@@ -5,7 +5,7 @@
#include "rc_rpc_plugin/rc_rpc_plugin.h"
namespace rc_rpc_plugin {
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule");
+SDL_CREATE_LOG_VARIABLE("RemoteControlModule");
InteriorDataManagerImpl::InteriorDataManagerImpl(
RCRPCPlugin& rc_plugin,
@@ -31,7 +31,7 @@ void InteriorDataManagerImpl::OnApplicationEvent(
}
void InteriorDataManagerImpl::OnDisablingRC() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto existing_subscription = AppsSubscribedModules();
std::set<ModuleUid> subscribed_modules;
for (auto& pair : existing_subscription) {
@@ -43,22 +43,28 @@ void InteriorDataManagerImpl::OnDisablingRC() {
}
}
for (auto& module : subscribed_modules) {
- LOG4CXX_TRACE(logger_,
- "unsubscribe from module type: " << module.first
+ SDL_LOG_TRACE("unsubscribe from module type: " << module.first
<< " id: " << module.second);
UnsubscribeFromInteriorVehicleData(module);
}
}
+void InteriorDataManagerImpl::OnResumptionRevert(
+ const std::set<ModuleUid>& subscriptions) {
+ for (const auto& module : subscriptions) {
+ UnsubscribeFromInteriorVehicleData(module);
+ }
+}
+
void InteriorDataManagerImpl::StoreRequestToHMITime(const ModuleUid& module) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock autolock(requests_to_hmi_history_lock_);
requests_to_hmi_history_[module].push_back(date_time::getCurrentTime());
}
bool InteriorDataManagerImpl::CheckRequestsToHMIFrequency(
const ModuleUid& module) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock autolock(requests_to_hmi_history_lock_);
ClearOldRequestsToHMIHistory();
const auto& history = requests_to_hmi_history_[module];
@@ -107,7 +113,7 @@ void InteriorDataManagerImpl::UpdateHMISubscriptionsOnPolicyUpdated() {
void InteriorDataManagerImpl::UpdateHMISubscriptionsOnAppUnregistered(
application_manager::Application& app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto rc_extension = RCHelpers::GetRCExtension(app);
auto subscribed_data = rc_extension->InteriorVehicleDataSubscriptions();
rc_extension->UnsubscribeFromInteriorVehicleData();
@@ -126,10 +132,11 @@ void InteriorDataManagerImpl::UpdateHMISubscriptionsOnAppUnregistered(
void InteriorDataManagerImpl::UnsubscribeFromInteriorVehicleData(
const ModuleUid& module) {
cache_.Remove(module);
- auto unsubscribe_request = RCHelpers::CreateUnsubscribeRequestToHMI(
- module, app_mngr_.GetNextHMICorrelationID());
- LOG4CXX_DEBUG(logger_,
- "Send Unsubscribe from module type: " << module.first << " id: "
+ auto unsubscribe_request = RCHelpers::CreateGetInteriorVDRequestToHMI(
+ module,
+ app_mngr_.GetNextHMICorrelationID(),
+ RCHelpers::InteriorDataAction::UNSUBSCRIBE);
+ SDL_LOG_DEBUG("Send Unsubscribe from module type: " << module.first << " id: "
<< module.second);
rpc_service_.ManageHMICommand(unsubscribe_request);
}
@@ -140,11 +147,12 @@ void InteriorDataManagerImpl::UnsubscribeFromInteriorVehicleDataOfType(
for (const auto& module : modules) {
cache_.Remove(module);
- auto unsubscribe_request = RCHelpers::CreateUnsubscribeRequestToHMI(
- module, app_mngr_.GetNextHMICorrelationID());
- LOG4CXX_DEBUG(logger_,
- "Send Unsubscribe from module type: "
- << module.first << " id: " << module.second);
+ auto unsubscribe_request = RCHelpers::CreateGetInteriorVDRequestToHMI(
+ module,
+ app_mngr_.GetNextHMICorrelationID(),
+ RCHelpers::InteriorDataAction::UNSUBSCRIBE);
+ SDL_LOG_DEBUG("Send Unsubscribe from module type: "
+ << module.first << " id: " << module.second);
rpc_service_.ManageHMICommand(unsubscribe_request);
}
}
@@ -189,9 +197,12 @@ InteriorDataManagerImpl::AppsSubscribedModuleTypes() {
auto app_subscriptions = rc_extension->InteriorVehicleDataSubscriptions();
std::vector<std::string> app_module_types;
- for (auto& app_subscription : app_subscriptions) {
- app_module_types.push_back(app_subscription.first);
- }
+ std::transform(app_subscriptions.begin(),
+ app_subscriptions.end(),
+ std::back_inserter(app_module_types),
+ [](const ModuleUid& app_subscription) {
+ return app_subscription.first;
+ });
std::sort(app_module_types.begin(), app_module_types.end());
result[app_ptr] = app_module_types;
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc
index ea9c13113c..3bfad3095b 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc
@@ -30,14 +30,51 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-#include "rc_rpc_plugin/rc_app_extension.h"
#include <algorithm>
+
+#include "rc_rpc_plugin/rc_app_extension.h"
+
#include "rc_rpc_plugin/rc_module_constants.h"
+#include "rc_rpc_plugin/rc_rpc_plugin.h"
#include "smart_objects/smart_object.h"
+#include "utils/logger.h"
+
+SDL_CREATE_LOG_VARIABLE("RemoteControlModule")
+
+namespace {
+std::set<rc_rpc_plugin::ModuleUid> ConvertSmartObjectToModuleCollection(
+ const smart_objects::SmartObject& resumption_data) {
+ using namespace rc_rpc_plugin;
+
+ if (!resumption_data.keyExists(application_manager::hmi_interface::rc)) {
+ SDL_LOG_DEBUG("No resumption module data subscription to revert");
+ return {};
+ }
+
+ const auto& module_data =
+ resumption_data[application_manager::hmi_interface::rc]
+ [message_params::kModuleData];
+
+ std::set<rc_rpc_plugin::ModuleUid> module_collection;
+
+ if (!module_data.empty()) {
+ for (const auto& module : *(module_data.asArray())) {
+ const auto module_type = module[message_params::kModuleType].asString();
+ const auto module_id = module[message_params::kModuleId].asString();
+
+ module_collection.insert({module_type, module_id});
+ }
+ }
+
+ return module_collection;
+}
+} // namespace
namespace rc_rpc_plugin {
-RCAppExtension::RCAppExtension(application_manager::AppExtensionUID uid)
- : AppExtension(uid) {}
+RCAppExtension::RCAppExtension(application_manager::AppExtensionUID uid,
+ RCRPCPlugin& plugin,
+ application_manager::Application& application)
+ : AppExtension(uid), plugin_(plugin), application_(application) {}
void RCAppExtension::SubscribeToInteriorVehicleData(const ModuleUid& module) {
subscribed_interior_vehicle_data_.insert(module);
@@ -50,11 +87,19 @@ void RCAppExtension::UnsubscribeFromInteriorVehicleData(
void RCAppExtension::UnsubscribeFromInteriorVehicleDataOfType(
const std::string& module_type) {
+ bool unsubscribed = false;
for (auto& item : subscribed_interior_vehicle_data_) {
if (module_type == item.first) {
subscribed_interior_vehicle_data_.erase(item);
+ unsubscribed = true;
}
}
+
+ if (unsubscribed) {
+ // If didin't unsubscribe from some module type, we don't need to update
+ // application hash
+ UpdateHash();
+ }
}
void RCAppExtension::UnsubscribeFromInteriorVehicleData() {
@@ -81,16 +126,124 @@ bool RCAppExtension::IsSubscribedToInteriorVehicleData(
}
void RCAppExtension::SaveResumptionData(
- ns_smart_device_link::ns_smart_objects::SmartObject& resumption_data) {}
+ smart_objects::SmartObject& resumption_data) {
+ SDL_LOG_AUTO_TRACE();
+
+ if (subscribed_interior_vehicle_data_.empty()) {
+ SDL_LOG_DEBUG("Subscribed modules data is absent");
+ return;
+ }
+
+ resumption_data[message_params::kModuleData] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ auto& module_data = resumption_data[message_params::kModuleData];
+
+ uint32_t index = 0;
+ for (const auto& module_uid : subscribed_interior_vehicle_data_) {
+ SDL_LOG_DEBUG("Save module: [" << module_uid.first << ":"
+ << module_uid.second << "]");
+ auto module_info_so =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ module_info_so[message_params::kModuleType] = module_uid.first;
+ module_info_so[message_params::kModuleId] = module_uid.second;
+ module_data[index++] = module_info_so;
+ }
+}
void RCAppExtension::ProcessResumption(
- const ns_smart_device_link::ns_smart_objects::SmartObject&
- resumption_data) {}
+ const smart_objects::SmartObject& saved_app) {
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_TRACE("app id : " << application_.app_id());
+
+ if (!saved_app.keyExists(
+ application_manager::strings::application_subscriptions)) {
+ SDL_LOG_DEBUG("application_subscriptions section does not exist");
+ return;
+ }
+
+ const auto& resumption_data =
+ saved_app[application_manager::strings::application_subscriptions];
+
+ if (!resumption_data.keyExists(message_params::kModuleData)) {
+ SDL_LOG_DEBUG("kModuleData section does not exist");
+ return;
+ }
+
+ auto& module_data = resumption_data[message_params::kModuleData];
+
+ if (0 == module_data.length()) {
+ SDL_LOG_WARN("Subscribed modules data is absent");
+ return;
+ }
+
+ for (const auto& module_so : *module_data.asArray()) {
+ const auto module_type = module_so[message_params::kModuleType].asString();
+ const auto module_id = module_so[message_params::kModuleId].asString();
+
+ ModuleUid module{module_type, module_id};
+ SDL_LOG_TRACE("app id " << application_.app_id() << " type : "
+ << module_type << " id <" << module_id);
+ AddPendingSubscription(module);
+ }
+
+ plugin_.ProcessResumptionSubscription(application_, *this);
+}
+
+void RCAppExtension::RevertResumption(
+ const smart_objects::SmartObject& resumption_data) {
+ SDL_LOG_AUTO_TRACE();
+
+ UnsubscribeFromInteriorVehicleData();
+
+ const auto module_subscriptions =
+ ConvertSmartObjectToModuleCollection(resumption_data);
+
+ for (auto& module : module_subscriptions) {
+ SDL_LOG_TRACE("Requested to unsubscribe module_type "
+ << module.first << "module_id: " << module.second);
+ }
+ std::set<rc_rpc_plugin::ModuleUid> to_be_unsubscribed;
+
+ const auto app_id = application_.app_id();
+ auto no_apps_subscribed = [app_id,
+ this](const rc_rpc_plugin::ModuleUid& module) {
+ if (plugin_.IsOtherAppsSubscribed(module, app_id)) {
+ SDL_LOG_DEBUG("Some other app except " << app_id
+ << " is already subscribed to "
+ << " module_type " << module.first
+ << "module_id: " << module.second);
+ return false;
+ }
+ return true;
+ };
+ std::copy_if(module_subscriptions.begin(),
+ module_subscriptions.end(),
+ std::inserter(to_be_unsubscribed, to_be_unsubscribed.end()),
+ no_apps_subscribed);
+
+ plugin_.RevertResumption(to_be_unsubscribed);
+}
std::set<ModuleUid> RCAppExtension::InteriorVehicleDataSubscriptions() const {
return subscribed_interior_vehicle_data_;
}
+bool RCAppExtension::AddPendingSubscription(const ModuleUid& module) {
+ return pending_subscriptions_.insert(module).second;
+}
+
+void RCAppExtension::RemovePendingSubscription(const ModuleUid& module) {
+ pending_subscriptions_.erase(module);
+}
+
+void RCAppExtension::RemovePendingSubscriptions() {
+ pending_subscriptions_.clear();
+}
+
+std::set<ModuleUid> RCAppExtension::PendingSubscriptions() {
+ return pending_subscriptions_;
+}
+
Grid RCAppExtension::GetUserLocation() const {
return user_location_;
}
@@ -111,5 +264,9 @@ void RCAppExtension::SetUserLocation(const Grid& grid) {
user_location_ = grid;
}
+void RCAppExtension::UpdateHash() {
+ application_.UpdateHash();
+}
+
RCAppExtension::~RCAppExtension() {}
} // namespace rc_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_capabilities_manager_impl.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_capabilities_manager_impl.cc
index dbedd0167f..75ccd46e4d 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_capabilities_manager_impl.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_capabilities_manager_impl.cc
@@ -35,7 +35,7 @@
#include "rc_rpc_plugin/rc_module_constants.h"
namespace rc_rpc_plugin {
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+SDL_CREATE_LOG_VARIABLE("RemoteControlModule")
RCCapabilitiesManagerImpl::RCCapabilitiesManagerImpl(
application_manager::HMICapabilities& hmi_capabilities)
@@ -45,22 +45,20 @@ const std::string
RCCapabilitiesManagerImpl::GetDefaultModuleIdFromCapabilitiesStructure(
const smart_objects::SmartObject& control_capabilities,
const std::string& module_type) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (control_capabilities.keyExists(message_params::kModuleInfo)) {
// moduleId - mandatory param for ModuleInfo structure
const auto module_id = control_capabilities[message_params::kModuleInfo]
[message_params::kModuleId]
.asString();
- LOG4CXX_WARN(logger_,
- "Use default moduleId from hmi capabilities: "
- << module_id
- << " for requested moduleType: " << module_type);
+ SDL_LOG_WARN("Use default moduleId from hmi capabilities: "
+ << module_id << " for requested moduleType: " << module_type);
return module_id;
}
- LOG4CXX_WARN(logger_,
- "There are no moduleInfo in hmi capabilities for requested "
- "moduleType "
- << module_type);
+ SDL_LOG_WARN(
+ "There are no moduleInfo in hmi capabilities for requested "
+ "moduleType "
+ << module_type);
return "";
}
@@ -68,36 +66,40 @@ const std::string
RCCapabilitiesManagerImpl::GetDefaultModuleIdFromCapabilitiesArray(
const smart_objects::SmartObject& control_capabilities,
const std::string& module_type) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
for (auto& cap_item : *(control_capabilities.asArray())) {
if (cap_item.keyExists(message_params::kModuleInfo)) {
// moduleId - mandatory param for ModuleInfo structure
const auto module_id =
cap_item[message_params::kModuleInfo][message_params::kModuleId]
.asString();
- LOG4CXX_WARN(logger_,
- "Use default moduleId from hmi capabilities: "
- << module_id
- << " for requested moduleType: " << module_type);
+ SDL_LOG_WARN("Use default moduleId from hmi capabilities: "
+ << module_id
+ << " for requested moduleType: " << module_type);
return module_id;
}
}
- LOG4CXX_WARN(logger_,
- "There are no moduleInfo in hmi capabilities for requested "
- "moduleType "
- << module_type);
+ SDL_LOG_WARN(
+ "There are no moduleInfo in hmi capabilities for requested "
+ "moduleType "
+ << module_type);
return "";
}
const std::string RCCapabilitiesManagerImpl::GetDefaultModuleIdFromCapabilities(
const std::string& module_type) const {
- LOG4CXX_AUTO_TRACE(logger_);
- auto rc_capabilities = *(hmi_capabilities_.rc_capability());
+ SDL_LOG_AUTO_TRACE();
+ auto rc_capabilities_ptr = hmi_capabilities_.rc_capability();
+ if (!rc_capabilities_ptr) {
+ SDL_LOG_WARN("RC capability is not initialized");
+ return std::string();
+ }
+
+ auto rc_capabilities = *rc_capabilities_ptr;
const auto& mapping = RCHelpers::GetModuleTypeToCapabilitiesMapping();
if (!rc_capabilities.keyExists(mapping(module_type))) {
- LOG4CXX_WARN(
- logger_,
- "There is no RC capability for requested module_type " << module_type);
+ SDL_LOG_WARN("There is no RC capability for requested module_type "
+ << module_type);
return "";
}
if (enums_value::kHmiSettings == module_type ||
@@ -112,24 +114,24 @@ const std::string RCCapabilitiesManagerImpl::GetDefaultModuleIdFromCapabilities(
const bool RCCapabilitiesManagerImpl::CheckModuleIdWithCapabilitiesStructure(
const smart_objects::SmartObject& control_capabilities,
const std::string& module_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (control_capabilities.keyExists(message_params::kModuleInfo) &&
(module_id == control_capabilities[message_params::kModuleInfo]
[message_params::kModuleId]
.asString())) {
return true;
}
- LOG4CXX_WARN(logger_,
- "There are no moduleInfo in hmi capabilities for requested "
- "moduleId "
- << module_id);
+ SDL_LOG_WARN(
+ "There are no moduleInfo in hmi capabilities for requested "
+ "moduleId "
+ << module_id);
return false;
}
const bool RCCapabilitiesManagerImpl::CheckModuleIdWithCapabilitiesArrays(
const smart_objects::SmartObject& control_capabilities,
const std::string& module_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
for (auto& cap_item : *(control_capabilities.asArray())) {
if (cap_item.keyExists(message_params::kModuleInfo) &&
(module_id ==
@@ -138,17 +140,17 @@ const bool RCCapabilitiesManagerImpl::CheckModuleIdWithCapabilitiesArrays(
return true;
}
}
- LOG4CXX_WARN(logger_,
- "There are no moduleInfo in hmi capabilities for requested "
- "moduleId "
- << module_id);
+ SDL_LOG_WARN(
+ "There are no moduleInfo in hmi capabilities for requested "
+ "moduleId "
+ << module_id);
return false;
}
const bool RCCapabilitiesManagerImpl::CheckModuleIdWithCapabilities(
const smart_objects::SmartObject& rc_capabilities,
const ModuleUid& module) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (module.second.empty()) {
return true;
}
@@ -164,8 +166,15 @@ const bool RCCapabilitiesManagerImpl::CheckModuleIdWithCapabilities(
bool RCCapabilitiesManagerImpl::CheckIfModuleExistsInCapabilities(
const ModuleUid& module) const {
- LOG4CXX_AUTO_TRACE(logger_);
- auto rc_capabilities = *(hmi_capabilities_.rc_capability());
+ SDL_LOG_AUTO_TRACE();
+
+ auto rc_capabilities_ptr = hmi_capabilities_.rc_capability();
+ if (!rc_capabilities_ptr) {
+ SDL_LOG_WARN("RC capability is not initialized");
+ return false;
+ }
+
+ auto rc_capabilities = *rc_capabilities_ptr;
const auto& mapping = RCHelpers::GetModuleTypeToCapabilitiesMapping();
const auto& resource_list = GetResources();
bool is_module_type_valid = false;
@@ -204,7 +213,7 @@ RCCapabilitiesManagerImpl::GetCapabilitiesToModuleTypeMapping() const {
{strings::khmiSettingsControlCapabilities, enums_value::kHmiSettings}};
auto it = mapping.find(control_cap);
if (mapping.end() == it) {
- LOG4CXX_ERROR(logger_, "Unknown control capability " << control_cap);
+ SDL_LOG_ERROR("Unknown control capability " << control_cap);
return std::string();
}
return it->second;
@@ -224,7 +233,7 @@ void RCCapabilitiesManagerImpl::GetResourcesFromCapabilitiesStructure(
.asString();
out_resources.push_back(std::make_pair(mapping(capability_key), module_id));
} else {
- LOG4CXX_WARN(logger_, "There are no moduleId in " << capability_key);
+ SDL_LOG_WARN("There are no moduleId in " << capability_key);
out_resources.push_back(std::make_pair(mapping(capability_key), ""));
}
}
@@ -242,17 +251,22 @@ void RCCapabilitiesManagerImpl::GetResourcesFromCapabilitiesArray(
out_resources.push_back(
std::make_pair(mapping(capability_key), module_id));
} else {
- LOG4CXX_WARN(logger_,
- "There are no moduleId for item from " << capability_key);
+ SDL_LOG_WARN("There are no moduleId for item from " << capability_key);
out_resources.push_back(std::make_pair(mapping(capability_key), ""));
}
}
}
const std::vector<ModuleUid> RCCapabilitiesManagerImpl::GetResources() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<ModuleUid> resources;
- auto rc_capabilities = *(hmi_capabilities_.rc_capability());
+ auto rc_capabilities_ptr = hmi_capabilities_.rc_capability();
+ if (!rc_capabilities_ptr) {
+ SDL_LOG_WARN("RC capability is not initialized");
+ return resources;
+ }
+
+ auto rc_capabilities = *rc_capabilities_ptr;
const auto& control_caps_list = GetCapabilitiesList();
for (const auto& capability_key : control_caps_list) {
if (rc_capabilities.keyExists(capability_key)) {
@@ -271,8 +285,15 @@ const std::vector<ModuleUid> RCCapabilitiesManagerImpl::GetResources() const {
const std::string RCCapabilitiesManagerImpl::GetModuleIdForSeatLocation(
const mobile_apis::SupportedSeat::eType id) const {
- LOG4CXX_AUTO_TRACE(logger_);
- auto rc_capabilities = *(hmi_capabilities_.rc_capability());
+ SDL_LOG_AUTO_TRACE();
+
+ auto rc_capabilities_ptr = hmi_capabilities_.rc_capability();
+ if (!rc_capabilities_ptr) {
+ SDL_LOG_WARN("RC capability is not initialized.");
+ return std::string();
+ }
+
+ auto rc_capabilities = *rc_capabilities_ptr;
const auto seat_capabilities =
rc_capabilities[strings::kseatControlCapabilities];
if (seat_capabilities.length() > 0) {
@@ -288,13 +309,19 @@ const std::string RCCapabilitiesManagerImpl::GetModuleIdForSeatLocation(
.asString();
}
}
- LOG4CXX_DEBUG(logger_, "There are no capabitities for requested id: " << id);
+ SDL_LOG_DEBUG("There are no capabitities for requested id: " << id);
return "";
}
bool RCCapabilitiesManagerImpl::CheckIfButtonExistInRCCaps(
const mobile_apis::ButtonName::eType button) const {
- auto rc_capabilities = *(hmi_capabilities_.rc_capability());
+ auto rc_capabilities_ptr = hmi_capabilities_.rc_capability();
+ if (!rc_capabilities_ptr) {
+ SDL_LOG_WARN("RC capability is not initialized");
+ return false;
+ }
+
+ auto rc_capabilities = *rc_capabilities_ptr;
if (rc_capabilities.keyExists(strings::kbuttonCapabilities)) {
const smart_objects::SmartObject& button_caps =
rc_capabilities[strings::kbuttonCapabilities];
@@ -312,15 +339,13 @@ bool RCCapabilitiesManagerImpl::CheckIfButtonExistInRCCaps(
const mobile_apis::ButtonName::eType current_button =
static_cast<mobile_apis::ButtonName::eType>(current_id);
if (current_button == button) {
- LOG4CXX_TRACE(
- logger_,
- "Button id " << current_button << " exist in capabilities");
+ SDL_LOG_TRACE("Button id " << current_button
+ << " exist in capabilities");
return true;
}
}
}
- LOG4CXX_TRACE(logger_,
- "Button id " << button << " do not exist in capabilities");
+ SDL_LOG_TRACE("Button id " << button << " do not exist in capabilities");
return false;
}
@@ -336,33 +361,30 @@ RCCapabilitiesManagerImpl::GetCapabilitiesByModuleIdFromArray(
return cap_item;
}
}
- LOG4CXX_WARN(logger_,
- "Capabilities for moduleId " << module_id
+ SDL_LOG_WARN("Capabilities for moduleId " << module_id
<< " do not exist in capabilities");
return smart_objects::SmartObject(smart_objects::SmartType_Null);
}
bool RCCapabilitiesManagerImpl::CheckButtonName(
const std::string& module_type, const std::string& button_name) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto rc_capabilities = hmi_capabilities_.rc_capability();
if (!rc_capabilities) {
- LOG4CXX_ERROR(logger_, "No remote controll capabilities available");
+ SDL_LOG_ERROR("No remote controll capabilities available");
return false;
}
if (enums_value::kRadio == module_type) {
if (!helpers::in_range(RCHelpers::buttons_radio(), button_name)) {
- LOG4CXX_WARN(logger_,
- "Trying to acceess climate button with module type radio");
+ SDL_LOG_WARN("Trying to acceess climate button with module type radio");
return false;
}
}
if (enums_value::kClimate == module_type) {
if (!helpers::in_range(RCHelpers::buttons_climate(), button_name)) {
- LOG4CXX_WARN(logger_,
- "Trying to acceess radio button with module type climate");
+ SDL_LOG_WARN("Trying to acceess radio button with module type climate");
return false;
}
}
@@ -452,22 +474,28 @@ RCCapabilitiesManagerImpl::GetModuleDataToCapabilitiesMapping() const {
ModuleTypeCapability RCCapabilitiesManagerImpl::GetModuleDataCapabilities(
const smart_objects::SmartObject& module_data,
const std::string& module_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
- auto rc_capabilities = *(hmi_capabilities_.rc_capability());
+ SDL_LOG_AUTO_TRACE();
+ auto rc_capabilities_ptr = hmi_capabilities_.rc_capability();
+ if (!rc_capabilities_ptr) {
+ SDL_LOG_WARN("RC capability is not initialized");
+ return {std::string(), capabilitiesStatus::kInvalidStatus};
+ }
+
+ auto rc_capabilities = *rc_capabilities_ptr;
const auto& all_module_types = RCHelpers::GetModuleTypesList();
const auto& get_module_data_key = RCHelpers::GetModuleTypeToDataMapping();
const auto& get_capabilities_key =
RCHelpers::GetModuleTypeToCapabilitiesMapping();
ModuleTypeCapability module_data_capabilities =
- std::make_pair("", capabilitiesStatus::missedParam);
+ std::make_pair("", capabilitiesStatus::kMissedParam);
for (const auto& module_type : all_module_types) {
const auto module_data_key = get_module_data_key(module_type);
const auto capabilities_key = get_capabilities_key(module_type);
if (module_data.keyExists(module_data_key)) {
if (!rc_capabilities.keyExists(capabilities_key)) {
- LOG4CXX_DEBUG(logger_, module_data_key << " capabilities not present");
+ SDL_LOG_DEBUG(module_data_key << " capabilities not present");
return module_data_capabilities;
}
const auto& caps = rc_capabilities[capabilities_key];
@@ -490,7 +518,7 @@ ModuleTypeCapability RCCapabilitiesManagerImpl::GetModuleDataCapabilities(
ModuleTypeCapability RCCapabilitiesManagerImpl::GetControlDataCapabilities(
const smart_objects::SmartObject& capabilities,
const smart_objects::SmartObject& control_data) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::map<std::string, std::string> mapping =
GetModuleDataToCapabilitiesMapping();
@@ -501,13 +529,13 @@ ModuleTypeCapability RCCapabilitiesManagerImpl::GetControlDataCapabilities(
}
if (message_params::kLightState == request_parameter) {
ModuleTypeCapability light_capability =
- std::make_pair("", capabilitiesStatus::success);
+ std::make_pair("", capabilitiesStatus::kSuccess);
for (auto& light_data : *(control_data[request_parameter].asArray())) {
light_capability = GetLightNameCapabilities(
capabilities[strings::kSupportedLights], light_data);
- if (capabilitiesStatus::success != light_capability.second) {
+ if (capabilitiesStatus::kSuccess != light_capability.second) {
return light_capability;
}
}
@@ -517,7 +545,7 @@ ModuleTypeCapability RCCapabilitiesManagerImpl::GetControlDataCapabilities(
if (message_params::kBand == request_parameter) {
ModuleTypeCapability radio_capability = GetRadioBandByCapabilities(
capabilities, control_data[request_parameter]);
- if (capabilitiesStatus::success != radio_capability.second) {
+ if (capabilitiesStatus::kSuccess != radio_capability.second) {
return radio_capability;
}
}
@@ -528,12 +556,12 @@ ModuleTypeCapability RCCapabilitiesManagerImpl::GetControlDataCapabilities(
request_parameter,
mobile_apis::Result::UNSUPPORTED_RESOURCE);
- if (capabilitiesStatus::success != status_item_capability) {
+ if (capabilitiesStatus::kSuccess != status_item_capability) {
return std::make_pair("", status_item_capability);
}
}
- return std::make_pair("", capabilitiesStatus::success);
+ return std::make_pair("", capabilitiesStatus::kSuccess);
}
capabilitiesStatus RCCapabilitiesManagerImpl::GetItemCapability(
@@ -544,45 +572,41 @@ capabilitiesStatus RCCapabilitiesManagerImpl::GetItemCapability(
const auto it = mapping.find(request_parameter);
if (it == mapping.end()) {
- LOG4CXX_DEBUG(
- logger_,
- "Parameter " << request_parameter << " doesn't exist in capabilities.");
- return capabilitiesStatus::missedParam;
+ SDL_LOG_DEBUG("Parameter " << request_parameter
+ << " doesn't exist in capabilities.");
+ return capabilitiesStatus::kMissedParam;
}
const std::string& caps_key = it->second;
- LOG4CXX_DEBUG(logger_,
- "Checking request parameter "
- << request_parameter
- << " with capabilities. Appropriate key is " << caps_key);
+ SDL_LOG_DEBUG("Checking request parameter "
+ << request_parameter
+ << " with capabilities. Appropriate key is " << caps_key);
if (!capabilities.keyExists(caps_key)) {
- LOG4CXX_DEBUG(logger_,
- "Capability " << caps_key
+ SDL_LOG_DEBUG("Capability " << caps_key
<< " is missed in RemoteControl capabilities");
- return capabilitiesStatus::missedParam;
+ return capabilitiesStatus::kMissedParam;
}
if (!capabilities[caps_key].asBool()) {
- LOG4CXX_DEBUG(logger_,
- "Capability "
- << caps_key
- << " is switched off in RemoteControl capabilities");
- capabilitiesStatus status = capabilitiesStatus::missedParam;
+ SDL_LOG_DEBUG("Capability "
+ << caps_key
+ << " is switched off in RemoteControl capabilities");
+ capabilitiesStatus status = capabilitiesStatus::kMissedParam;
if (mobile_apis::Result::READ_ONLY == switched_off_result) {
- status = capabilitiesStatus::readOnly;
+ status = capabilitiesStatus::kReadOnly;
}
return status;
}
- return capabilitiesStatus::success;
+ return capabilitiesStatus::kSuccess;
}
ModuleTypeCapability RCCapabilitiesManagerImpl::GetLightDataCapabilities(
const smart_objects::SmartObject& capabilities,
const smart_objects::SmartObject& control_data) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::map<std::string, std::string> mapping = GetLightCapabilitiesMapping();
for (auto it = control_data.map_begin(); it != control_data.map_end(); ++it) {
@@ -598,28 +622,28 @@ ModuleTypeCapability RCCapabilitiesManagerImpl::GetLightDataCapabilities(
request_parameter,
mobile_apis::Result::READ_ONLY);
- if (capabilitiesStatus::success != status_item_capability) {
+ if (capabilitiesStatus::kSuccess != status_item_capability) {
return std::make_pair(message_params::kLightState,
status_item_capability);
}
}
- return std::make_pair("", capabilitiesStatus::success);
+ return std::make_pair("", capabilitiesStatus::kSuccess);
}
ModuleTypeCapability RCCapabilitiesManagerImpl::GetLightNameCapabilities(
const smart_objects::SmartObject& capabilities_status,
const smart_objects::SmartObject& light_data) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
for (auto& so : *(capabilities_status.asArray())) {
const int64_t current_id = so[message_params::kName].asInt();
if (current_id == light_data[message_params::kId].asInt()) {
return GetLightDataCapabilities(so, light_data);
}
}
- LOG4CXX_DEBUG(logger_, "There is no such light name in capabilities");
+ SDL_LOG_DEBUG("There is no such light name in capabilities");
return std::make_pair(message_params::kLightState,
- capabilitiesStatus::missedLightName);
+ capabilitiesStatus::kMissedLightName);
}
ModuleTypeCapability RCCapabilitiesManagerImpl::GetRadioBandByCapabilities(
@@ -629,23 +653,21 @@ ModuleTypeCapability RCCapabilitiesManagerImpl::GetRadioBandByCapabilities(
static_cast<mobile_apis::RadioBand::eType>(request_parameter.asUInt());
if (mobile_apis::RadioBand::XM == radio_band) {
if (!capabilities_status.keyExists(strings::kSiriusxmRadioAvailable)) {
- LOG4CXX_DEBUG(logger_,
- "Capability "
- << strings::kSiriusxmRadioAvailable
- << " is missed in RemoteControl capabilities");
+ SDL_LOG_DEBUG("Capability "
+ << strings::kSiriusxmRadioAvailable
+ << " is missed in RemoteControl capabilities");
return std::make_pair(strings::kSiriusxmRadioAvailable,
- capabilitiesStatus::missedParam);
+ capabilitiesStatus::kMissedParam);
}
if (!capabilities_status[strings::kSiriusxmRadioAvailable].asBool()) {
- LOG4CXX_DEBUG(logger_,
- "Capability "
- << strings::kSiriusxmRadioAvailable
- << " is switched off in RemoteControl capabilities");
+ SDL_LOG_DEBUG("Capability "
+ << strings::kSiriusxmRadioAvailable
+ << " is switched off in RemoteControl capabilities");
return std::make_pair(strings::kSiriusxmRadioAvailable,
- capabilitiesStatus::missedParam);
+ capabilitiesStatus::kMissedParam);
}
}
- return std::make_pair("", capabilitiesStatus::success);
+ return std::make_pair("", capabilitiesStatus::kSuccess);
}
const smart_objects::SmartObject& RCCapabilitiesManagerImpl::ControlDataForType(
@@ -670,9 +692,8 @@ bool RCCapabilitiesManagerImpl::CheckReadOnlyParamsForAudio(
for (auto& so : *(equalizer_settings.asArray())) {
if (so.keyExists(message_params::kChannelName)) {
- LOG4CXX_DEBUG(logger_,
- "READ ONLY parameter. ChannelName = "
- << so[message_params::kChannelName].asString());
+ SDL_LOG_DEBUG("READ ONLY parameter. ChannelName = "
+ << so[message_params::kChannelName].asString());
return true;
}
}
@@ -699,10 +720,8 @@ bool RCCapabilitiesManagerImpl::CheckReadOnlyParamsForLight(
mobile_apis::LightStatus::RAMP_DOWN,
mobile_apis::LightStatus::UNKNOWN,
mobile_apis::LightStatus::INVALID)) {
- LOG4CXX_DEBUG(
- logger_,
- "READ ONLY parameter. Status = "
- << light_data[message_params::kLightStatus].asInt());
+ SDL_LOG_DEBUG("READ ONLY parameter. Status = "
+ << light_data[message_params::kLightStatus].asInt());
return true;
}
}
@@ -716,7 +735,7 @@ bool RCCapabilitiesManagerImpl::AreReadOnlyParamsPresent(
const smart_objects::SmartObject& module_data,
const std::string& module_type,
ModuleTypeCapability& module_data_capabilities) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& module_type_params =
ControlDataForType(module_data, module_type);
@@ -729,7 +748,7 @@ bool RCCapabilitiesManagerImpl::AreReadOnlyParamsPresent(
if (result) {
module_data_capabilities =
- std::make_pair(module_type, capabilitiesStatus::readOnly);
+ std::make_pair(module_type, capabilitiesStatus::kReadOnly);
}
return result;
}
@@ -749,7 +768,7 @@ bool RCCapabilitiesManagerImpl::AreReadOnlyParamsPresent(
bool RCCapabilitiesManagerImpl::AreAllParamsReadOnly(
const smart_objects::SmartObject& module_data,
const std::string& module_type) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& module_type_params =
ControlDataForType(module_data, module_type);
auto it = module_type_params.map_begin();
@@ -761,15 +780,15 @@ bool RCCapabilitiesManagerImpl::AreAllParamsReadOnly(
}
}
- LOG4CXX_DEBUG(logger_, "All params are ReadOnly");
+ SDL_LOG_DEBUG("All params are ReadOnly");
return true;
}
bool RCCapabilitiesManagerImpl::IsSeatLocationCapabilityProvided() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto seat_location_capability = hmi_capabilities_.seat_location_capability();
if (!seat_location_capability || seat_location_capability->empty()) {
- LOG4CXX_DEBUG(logger_, "Seat Location capability is not provided by HMI");
+ SDL_LOG_DEBUG("Seat Location capability is not provided by HMI");
return false;
}
@@ -783,15 +802,14 @@ bool RCCapabilitiesManagerImpl::IsSeatLocationCapabilityProvided() const {
}
}
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Seat Location capability doesn't contain all necessary parameters");
return false;
}
const Grid
RCCapabilitiesManagerImpl::GetDriverLocationFromSeatLocationCapability() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
Grid grid;
if (IsSeatLocationCapabilityProvided()) {
auto seat_location_capability =
@@ -807,7 +825,7 @@ RCCapabilitiesManagerImpl::GetDriverLocationFromSeatLocationCapability() const {
driver_location[strings::kRowspan].asInt(),
driver_location[strings::kLevelspan].asInt());
} else {
- LOG4CXX_DEBUG(logger_, "Driver's location doesn't provided");
+ SDL_LOG_DEBUG("Driver's location doesn't provided");
}
}
return grid;
@@ -869,12 +887,18 @@ Grid RCCapabilitiesManagerImpl::GetModuleServiceAreaFromControlCapability(
Grid RCCapabilitiesManagerImpl::GetModuleServiceArea(
const ModuleUid& module) const {
- auto rc_capabilities = *(hmi_capabilities_.rc_capability());
+ auto rc_capabilities_ptr = hmi_capabilities_.rc_capability();
+ if (!rc_capabilities_ptr) {
+ SDL_LOG_WARN("RC capability is not initialized");
+ return Grid();
+ }
+
+ auto rc_capabilities = *rc_capabilities_ptr;
const auto& mapping = RCHelpers::GetModuleTypeToCapabilitiesMapping();
const auto& module_type = module.first;
const auto& capabilities_key = mapping(module_type);
if (!rc_capabilities.keyExists(capabilities_key)) {
- LOG4CXX_DEBUG(logger_, module_type << "control capabilities not present");
+ SDL_LOG_DEBUG(module_type << "control capabilities not present");
return Grid();
}
const auto& caps = rc_capabilities[capabilities_key];
@@ -903,12 +927,18 @@ bool RCCapabilitiesManagerImpl::IsMultipleAccessAllowedInControlCaps(
bool RCCapabilitiesManagerImpl::IsMultipleAccessAllowed(
const ModuleUid& module) const {
- auto rc_capabilities = *(hmi_capabilities_.rc_capability());
+ auto rc_capabilities_ptr = hmi_capabilities_.rc_capability();
+ if (!rc_capabilities_ptr) {
+ SDL_LOG_ERROR("RC capability is not initialized");
+ return false;
+ }
+
+ auto rc_capabilities = *rc_capabilities_ptr;
const auto& mapping = RCHelpers::GetModuleTypeToCapabilitiesMapping();
const auto& module_type = module.first;
const auto& capabilities_key = mapping(module_type);
if (!rc_capabilities.keyExists(capabilities_key)) {
- LOG4CXX_DEBUG(logger_, module_type << "control capabilities not present");
+ SDL_LOG_DEBUG(module_type << "control capabilities not present");
return false;
}
const auto& caps = rc_capabilities[capabilities_key];
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_command_factory.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_command_factory.cc
index 4ca2cf5182..c1743c8540 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_command_factory.cc
@@ -62,7 +62,7 @@
#include "rc_rpc_plugin/interior_data_cache.h"
#include "rc_rpc_plugin/resource_allocation_manager.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+SDL_CREATE_LOG_VARIABLE("RemoteControlModule")
namespace application_manager {
using rc_rpc_plugin::InteriorDataCache;
using rc_rpc_plugin::RCCommandParams;
@@ -71,7 +71,7 @@ using rc_rpc_plugin::ResourceAllocationManager;
template <typename RCCommandType>
class RCCommandCreator : public CommandCreator {
public:
- RCCommandCreator(const RCCommandParams& params) : params_(params) {}
+ explicit RCCommandCreator(const RCCommandParams& params) : params_(params) {}
private:
bool CanBeCreated() const override {
@@ -92,7 +92,8 @@ struct RCInvalidCommand {};
template <>
class RCCommandCreator<RCInvalidCommand> : public CommandCreator {
public:
- RCCommandCreator(const RCCommandParams& params) {
+ // cppcheck-suppress unusedFunction //Used in RCCommandCreatorFactory
+ explicit RCCommandCreator(const RCCommandParams& params) {
UNUSED(params);
}
@@ -109,11 +110,12 @@ class RCCommandCreator<RCInvalidCommand> : public CommandCreator {
};
struct RCCommandCreatorFactory {
- RCCommandCreatorFactory(const RCCommandParams& params) : params_(params) {}
+ explicit RCCommandCreatorFactory(const RCCommandParams& params)
+ : params_(params) {}
template <typename RCCommandType>
CommandCreator& GetCreator() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
static RCCommandCreator<RCCommandType> res(params_);
return res;
}
@@ -178,9 +180,8 @@ bool RCCommandFactory::IsAbleToProcess(
CommandCreator& RCCommandFactory::get_mobile_command_creator(
const mobile_apis::FunctionID::eType id,
const mobile_apis::messageType::eType message_type) const {
- LOG4CXX_DEBUG(logger_,
- "get_mobile_command_creator function_id: "
- << id << " message_type: " << message_type);
+ SDL_LOG_DEBUG("get_mobile_command_creator function_id: "
+ << id << " message_type: " << message_type);
RCCommandCreatorFactory rc_factory(params_);
switch (id) {
case mobile_apis::FunctionID::ButtonPressID: {
@@ -266,8 +267,7 @@ CommandCreator& RCCommandFactory::get_mobile_creator_factory(
CommandCreator& RCCommandFactory::get_hmi_creator_factory(
const hmi_apis::FunctionID::eType id,
const hmi_apis::messageType::eType message_type) const {
- LOG4CXX_DEBUG(logger_,
- "CreateHMICommand function_id: " << id << " message_type: "
+ SDL_LOG_DEBUG("CreateHMICommand function_id: " << id << " message_type: "
<< message_type);
RCCommandCreatorFactory rc_factory(params_);
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_consent_manager_impl.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_consent_manager_impl.cc
index 1d7db181eb..e851e65adc 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_consent_manager_impl.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_consent_manager_impl.cc
@@ -45,7 +45,7 @@
namespace rc_rpc_plugin {
namespace app_mngr = application_manager;
-CREATE_LOGGERPTR_GLOBAL(logger_, "RCConsentManager")
+SDL_CREATE_LOG_VARIABLE("RCConsentManager")
RCConsentManagerImpl::RCConsentManagerImpl(
resumption::LastStateWrapperPtr last_state,
@@ -59,7 +59,7 @@ void RCConsentManagerImpl::SaveModuleConsents(
const std::string& policy_app_id,
const std::string& mac_address,
const rc_rpc_types::ModuleIdConsentVector& module_consents) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
for (const auto& consent : module_consents) {
std::string module_type = consent.module_id.first;
@@ -90,9 +90,8 @@ rc_rpc_types::ModuleConsent RCConsentManagerImpl::GetModuleConsent(
last_state_accessor.GetMutableData().set_dictionary(last_state_dictionary);
if (module_consents.empty()) {
- LOG4CXX_DEBUG(
- logger_,
- "For app: " << app_id << " module type doesn't have any consents");
+ SDL_LOG_DEBUG("For app: " << app_id
+ << " module type doesn't have any consents");
return rc_rpc_types::ModuleConsent::NOT_EXISTS;
}
@@ -103,8 +102,7 @@ rc_rpc_types::ModuleConsent RCConsentManagerImpl::GetModuleConsent(
}
}
- LOG4CXX_DEBUG(logger_,
- "For app: " << app_id << " and module resource ["
+ SDL_LOG_DEBUG("For app: " << app_id << " and module resource ["
<< module_id.first << ":" << module_id.second
<< "] consent is absent");
@@ -112,7 +110,7 @@ rc_rpc_types::ModuleConsent RCConsentManagerImpl::GetModuleConsent(
}
void RCConsentManagerImpl::RemoveExpiredConsents() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto last_state_accessor = last_state_->get_accessor();
auto last_state_dictionary = last_state_accessor.GetData().dictionary();
@@ -147,7 +145,7 @@ void RCConsentManagerImpl::RemoveAllConsents() {
rc_rpc_types::ModuleConsentState RCConsentManagerImpl::CheckModuleConsentState(
const Json::Value& module_consent) const {
if (!module_consent.isMember(message_params::kConsentDate)) {
- LOG4CXX_DEBUG(logger_, "Date of consent is absent");
+ SDL_LOG_DEBUG("Date of consent is absent");
return rc_rpc_types::ModuleConsentState::NOT_EXISTS;
}
@@ -160,10 +158,9 @@ rc_rpc_types::ModuleConsentState RCConsentManagerImpl::CheckModuleConsentState(
const auto past_period_in_days =
date_time::calculateAmountDaysFromDate(consent_date);
- LOG4CXX_DEBUG(
- logger_,
- "Keeping time of consent is: " << past_period_in_days << " days");
- LOG4CXX_DEBUG(logger_, "Period for expired: " << period_for_expiring);
+ SDL_LOG_DEBUG("Keeping time of consent is: " << past_period_in_days
+ << " days");
+ SDL_LOG_DEBUG("Period for expired: " << period_for_expiring);
return (past_period_in_days >= period_for_expiring)
? rc_rpc_types::ModuleConsentState::EXPIRED
@@ -205,17 +202,15 @@ void RCConsentManagerImpl::RemoveModuleExpiredConsents(
const bool is_expired = rc_rpc_types::ModuleConsentState::EXPIRED ==
CheckModuleConsentState(consent);
if (is_expired) {
- LOG4CXX_DEBUG(logger_,
- "Consent for module resource ["
- << consent[message_params::kModuleId].asString()
- << "] is expired and will be removed");
+ SDL_LOG_DEBUG("Consent for module resource ["
+ << consent[message_params::kModuleId].asString()
+ << "] is expired and will be removed");
}
if (is_module_id_exists && !is_expired) {
- LOG4CXX_DEBUG(logger_,
- "Consent for module resource ["
- << consent[message_params::kModuleId].asString()
- << "] is actual.");
+ SDL_LOG_DEBUG("Consent for module resource ["
+ << consent[message_params::kModuleId].asString()
+ << "] is actual.");
temp_consents.append(consent);
}
}
@@ -232,14 +227,14 @@ Json::Value& RCConsentManagerImpl::GetRemoteControlDataOrAppend(
if (!last_state_data.isMember(app_mngr::strings::remote_control)) {
last_state_data[app_mngr::strings::remote_control] =
Json::Value(Json::objectValue);
- LOG4CXX_DEBUG(logger_, "remote_control section is missed");
+ SDL_LOG_DEBUG("remote_control section is missed");
}
Json::Value& remote_control =
last_state_data[app_mngr::strings::remote_control];
if (!remote_control.isObject()) {
- LOG4CXX_ERROR(logger_, "remote_control type INVALID rewrite");
+ SDL_LOG_ERROR("remote_control type INVALID rewrite");
remote_control = Json::Value(Json::objectValue);
}
return remote_control;
@@ -252,7 +247,7 @@ Json::Value& RCConsentManagerImpl::GetDeviceApplicationsOrAppend(
auto& apps_consents = GetAppsConsentsOrAppend(last_state_data);
if (!apps_consents.isArray()) {
- LOG4CXX_DEBUG(logger_, "applications_consents type INVALID rewrite");
+ SDL_LOG_DEBUG("applications_consents type INVALID rewrite");
apps_consents = Json::Value(Json::arrayValue);
}
@@ -288,7 +283,7 @@ Json::Value& RCConsentManagerImpl::GetAppConsentsListOrAppend(
sync_primitives::AutoLock autolock(applications_lock_);
if (!device_applications.isArray()) {
- LOG4CXX_DEBUG(logger_, "applications_consents type INVALID rewrite");
+ SDL_LOG_DEBUG("applications_consents type INVALID rewrite");
device_applications = Json::Value(Json::arrayValue);
}
@@ -323,14 +318,14 @@ Json::Value& RCConsentManagerImpl::GetAppsConsentsOrAppend(
sync_primitives::AutoLock autolock(remote_control_lock_);
if (!remote_control.isMember(message_params::kAppConsents)) {
- LOG4CXX_DEBUG(logger_, "app_consents section is missed");
+ SDL_LOG_DEBUG("app_consents section is missed");
remote_control[message_params::kAppConsents] =
Json::Value(Json::arrayValue);
}
auto& app_consents = remote_control[message_params::kAppConsents];
if (!app_consents.isArray()) {
- LOG4CXX_DEBUG(logger_, "applications_consents type INVALID rewrite");
+ SDL_LOG_DEBUG("applications_consents type INVALID rewrite");
app_consents = Json::Value(Json::arrayValue);
}
return app_consents;
@@ -358,10 +353,8 @@ Json::Value& RCConsentManagerImpl::GetModuleTypeConsentsOrAppend(
// In case of absent specified module_type in section of specified
// application, will be added empty section with this module type.
- LOG4CXX_DEBUG(
- logger_,
- "Section module_type: " << module_type
- << " is missed for app_id:" << policy_app_id);
+ SDL_LOG_DEBUG("Section module_type: "
+ << module_type << " is missed for app_id:" << policy_app_id);
auto consent_item = Json::Value(Json::objectValue);
consent_item[message_params::kModuleType] = module_type;
consent_item[message_params::kModuleConsents] = Json::Value(Json::arrayValue);
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_helpers.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_helpers.cc
index f344dd15a7..b2d1f1513b 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_helpers.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_helpers.cc
@@ -6,7 +6,7 @@
#include "rc_rpc_plugin/rc_rpc_plugin.h"
namespace rc_rpc_plugin {
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule");
+SDL_CREATE_LOG_VARIABLE("RemoteControlModule");
const std::vector<std::string> RCHelpers::buttons_climate() {
std::vector<std::string> data;
@@ -111,18 +111,28 @@ rc_rpc_types::ModuleIdConsentVector RCHelpers::FillModuleConsents(
std::vector<std::string> RCHelpers::RetrieveModuleIds(
const ns_smart_device_link::ns_smart_objects::SmartObject& moduleIds) {
std::vector<std::string> module_ids;
- for (const auto& module_id : (*moduleIds.asArray())) {
- module_ids.push_back(module_id.asString());
- }
+
+ std::transform((*moduleIds.asArray()).begin(),
+ (*moduleIds.asArray()).end(),
+ std::back_inserter(module_ids),
+ [](const smart_objects::SmartObject& module_id) {
+ return module_id.asString();
+ });
+
return module_ids;
}
std::vector<bool> RCHelpers::RetrieveModuleConsents(
const ns_smart_device_link::ns_smart_objects::SmartObject& consents) {
std::vector<bool> module_consents;
- for (const auto& allowed_item : (*consents.asArray())) {
- module_consents.push_back(allowed_item.asBool());
- }
+
+ std::transform((*consents.asArray()).begin(),
+ (*consents.asArray()).end(),
+ std::back_inserter(module_consents),
+ [](const smart_objects::SmartObject& allowed_item) {
+ return allowed_item.asBool();
+ });
+
return module_consents;
}
@@ -138,7 +148,7 @@ RCHelpers::GetModuleTypeToDataMapping() {
{enums_value::kHmiSettings, message_params::kHmiSettingsControlData}};
auto it = mapping.find(module_type);
if (mapping.end() == it) {
- LOG4CXX_ERROR(logger_, "Unknown module type" << module_type);
+ SDL_LOG_ERROR("Unknown module type " << module_type);
return std::string();
}
return it->second;
@@ -159,7 +169,7 @@ RCHelpers::GetModuleTypeToCapabilitiesMapping() {
{enums_value::kHmiSettings, strings::khmiSettingsControlCapabilities}};
auto it = mapping.find(module_type);
if (mapping.end() == it) {
- LOG4CXX_ERROR(logger_, "Unknown module type" << module_type);
+ SDL_LOG_ERROR("Unknown module type " << module_type);
return std::string();
}
return it->second;
@@ -175,15 +185,17 @@ const std::vector<std::string> RCHelpers::GetModuleTypesList() {
RCAppExtensionPtr RCHelpers::GetRCExtension(
application_manager::Application& app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto extension_interface = app.QueryInterface(RCRPCPlugin::kRCPluginID);
auto extension =
std::static_pointer_cast<RCAppExtension>(extension_interface);
return extension;
}
-smart_objects::SmartObjectSPtr RCHelpers::CreateUnsubscribeRequestToHMI(
- const ModuleUid& module, const uint32_t correlation_id) {
+smart_objects::SmartObjectSPtr RCHelpers::CreateGetInteriorVDRequestToHMI(
+ const ModuleUid& module,
+ const uint32_t correlation_id,
+ const InteriorDataAction action) {
using namespace smart_objects;
namespace commands = application_manager::commands;
namespace am_strings = application_manager::strings;
@@ -200,7 +212,10 @@ smart_objects::SmartObjectSPtr RCHelpers::CreateUnsubscribeRequestToHMI(
params[am_strings::correlation_id] = correlation_id;
params[am_strings::function_id] =
hmi_apis::FunctionID::RC_GetInteriorVehicleData;
- msg_params[message_params::kSubscribe] = false;
+ if (NONE != action) {
+ msg_params[message_params::kSubscribe] =
+ (SUBSCRIBE == action) ? true : false;
+ }
msg_params[message_params::kModuleType] = module.first;
msg_params[message_params::kModuleId] = module.second;
return message;
@@ -257,7 +272,7 @@ void RCHelpers::RemoveRedundantGPSDataFromIVDataMsg(
using namespace message_params;
using namespace application_manager::strings;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!msg_params.keyExists(kModuleData)) {
return;
}
@@ -291,6 +306,11 @@ smart_objects::SmartObject RCHelpers::MergeModuleData(
smart_objects::SmartObject result = data1;
+ if (data2.empty()) {
+ SDL_LOG_ERROR("Data received from module is empty");
+ return result;
+ }
+
for (auto it = data2.map_begin(); it != data2.map_end(); ++it) {
const std::string& key = it->first;
smart_objects::SmartObject& value = it->second;
@@ -300,9 +320,9 @@ smart_objects::SmartObject RCHelpers::MergeModuleData(
}
// Merge maps and arrays with `id` param included, replace other types
- if (value.getType() == smart_objects::SmartType::SmartType_Map) {
+ if (smart_objects::SmartType::SmartType_Map == value.getType()) {
value = MergeModuleData(result[key], value);
- } else if (value.getType() == smart_objects::SmartType::SmartType_Array) {
+ } else if (smart_objects::SmartType::SmartType_Array == value.getType()) {
value = MergeArray(result[key], value);
}
result[key] = value;
@@ -323,11 +343,14 @@ smart_objects::SmartObject RCHelpers::MergeArray(
}
auto& data2_array = *data2.asArray();
- for (const auto& data_item : data2_array) {
- if (data_item.getType() != smart_objects::SmartType_Map ||
- !data_item.keyExists(application_manager::strings::id)) {
- return data2;
- }
+
+ auto compare = [](const smart_objects::SmartObject& data_item) {
+ return (data_item.getType() != smart_objects::SmartType_Map ||
+ !data_item.keyExists(application_manager::strings::id));
+ };
+
+ if (std::any_of(data2_array.begin(), data2_array.end(), compare)) {
+ return data2;
}
smart_objects::SmartObject result = data1;
@@ -362,4 +385,27 @@ smart_objects::SmartObject RCHelpers::MergeArray(
return result;
}
+bool RCHelpers::IsResponseSuccessful(
+ const smart_objects::SmartObject& response) {
+ hmi_apis::messageType::eType message_type =
+ static_cast<hmi_apis::messageType::eType>(
+ response[application_manager::strings::params]
+ [application_manager::strings::message_type]
+ .asInt());
+ const bool is_correct_message_type =
+ hmi_apis::messageType::response == message_type;
+
+ bool is_subscribe_successful = false;
+
+ if (response[application_manager::strings::msg_params].keyExists(
+ rc_rpc_plugin::message_params::kIsSubscribed)) {
+ is_subscribe_successful =
+ response[application_manager::strings::msg_params]
+ [rc_rpc_plugin::message_params::kIsSubscribed]
+ .asBool();
+ }
+
+ return is_correct_message_type && is_subscribe_successful;
+}
+
} // namespace rc_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_pending_resumption_handler.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_pending_resumption_handler.cc
new file mode 100644
index 0000000000..e66023f27a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_pending_resumption_handler.cc
@@ -0,0 +1,343 @@
+#include "rc_rpc_plugin/rc_pending_resumption_handler.h"
+#include <sstream>
+#include "rc_rpc_plugin/rc_helpers.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+
+namespace rc_rpc_plugin {
+
+SDL_CREATE_LOG_VARIABLE("RemoteControlModule")
+
+RCPendingResumptionHandler::RCPendingResumptionHandler(
+ application_manager::ApplicationManager& application_manager,
+ InteriorDataCache& interior_data_cache)
+ : PendingResumptionHandler(application_manager)
+ , rpc_service_(application_manager.GetRPCService())
+ , interior_data_cache_(interior_data_cache) {}
+
+void RCPendingResumptionHandler::on_event(
+ const application_manager::event_engine::Event& event) {
+ SDL_LOG_AUTO_TRACE();
+ namespace am_strings = application_manager::strings;
+ sync_primitives::AutoLock lock(pending_resumption_lock_);
+ const auto cid = event.smart_object_correlation_id();
+ SDL_LOG_TRACE("Received event with function id: "
+ << event.id() << " and correlation id: " << cid);
+
+ const auto request_optional = GetPendingRequest(cid);
+ const auto app_id_optional = GetPendingApp(cid);
+ if (!request_optional) {
+ SDL_LOG_ERROR("Not waiting for message with correlation id: " << cid);
+ return;
+ }
+
+ auto current_request = *request_optional;
+ const auto app_id = *app_id_optional;
+ RemovePendingRequest(cid);
+ auto module_uid = GetModuleUid(current_request);
+
+ auto& response = event.smart_object();
+ if (RCHelpers::IsResponseSuccessful(response)) {
+ SDL_LOG_DEBUG("Resumption of subscriptions is successful"
+ << " module type: " << module_uid.first
+ << " module id: " << module_uid.second);
+
+ auto app = application_manager_.application(app_id);
+ if (app) {
+ auto rc_app_extension = RCHelpers::GetRCExtension(*app);
+ rc_app_extension->SubscribeToInteriorVehicleData(module_uid);
+ }
+
+ if (response[am_strings::msg_params].keyExists(
+ message_params::kModuleData)) {
+ const auto module_data =
+ response[am_strings::msg_params][message_params::kModuleData];
+ const auto& data_mapping = RCHelpers::GetModuleTypeToDataMapping();
+ if (module_data.keyExists(data_mapping(module_uid.first))) {
+ const auto control_data = module_data[data_mapping(module_uid.first)];
+ interior_data_cache_.Add(module_uid, control_data);
+ }
+ }
+
+ HandleSuccessfulResponse(event, module_uid);
+ } else {
+ SDL_LOG_DEBUG("Resumption of subscriptions is NOT successful"
+ << " module type: " << module_uid.first
+ << " module id: " << module_uid.second);
+
+ ProcessNextPausedResumption(module_uid);
+ }
+}
+
+template <typename RCModulesCollection>
+std::string Stringify(RCModulesCollection& collection) {
+ std::stringstream ss;
+ for (const auto& module : collection) {
+ ss << "{type : " << module.first << " id " << module.second << "} ";
+ }
+ return ss.str();
+}
+
+void RCPendingResumptionHandler::HandleResumptionSubscriptionRequest(
+ application_manager::AppExtension& extension,
+ application_manager::Application& app) {
+ UNUSED(extension);
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(pending_resumption_lock_);
+
+ auto rc_extension = RCHelpers::GetRCExtension(app);
+ auto subscriptions = rc_extension->PendingSubscriptions();
+ rc_extension->RemovePendingSubscriptions();
+ SDL_LOG_TRACE("app id " << app.app_id() << " " << Stringify(subscriptions));
+
+ std::vector<ModuleUid> ignored;
+ std::vector<ModuleUid> already_pending;
+ std::vector<ModuleUid> need_to_subscribe;
+ for (const auto& subscription : subscriptions) {
+ bool is_another_app_subscribed =
+ IsOtherAppsSubscribed(app.app_id(), subscription);
+ bool is_pending_response = IsPendingForResponse(subscription);
+ if (is_another_app_subscribed && !is_pending_response) {
+ rc_extension->SubscribeToInteriorVehicleData(subscription);
+ ignored.push_back(subscription);
+ } else if (is_pending_response) {
+ already_pending.push_back(subscription);
+ } else {
+ need_to_subscribe.push_back(subscription);
+ }
+ }
+ SDL_LOG_TRACE("ignored: " << Stringify(ignored));
+ SDL_LOG_TRACE("already_pending: " << Stringify(already_pending));
+ SDL_LOG_TRACE("need_to_subscribe: " << Stringify(need_to_subscribe));
+
+ for (auto subscription : already_pending) {
+ const auto cid = application_manager_.GetNextHMICorrelationID();
+ const auto subscription_request =
+ CreateSubscriptionRequest(subscription, cid);
+ const auto fid = GetFunctionId(*subscription_request);
+ paused_resumptions_[subscription].push(
+ {app.app_id(), *subscription_request});
+ const auto resumption_request =
+ MakeResumptionRequest(cid, fid, *subscription_request);
+ resumption_data_processor().SubscribeToResponse(app.app_id(),
+ resumption_request);
+ SDL_LOG_DEBUG("Paused request with correlation_id: "
+ << cid << " module type: " << subscription.first
+ << " module id: " << subscription.second);
+ }
+
+ for (auto module : need_to_subscribe) {
+ const auto cid = application_manager_.GetNextHMICorrelationID();
+ const auto subscription_request = CreateSubscriptionRequest(module, cid);
+ const auto fid = GetFunctionId(*subscription_request);
+ const auto resumption_request =
+ MakeResumptionRequest(cid, fid, *subscription_request);
+ AddPendingRequest(app.app_id(), *subscription_request);
+ subscribe_on_event(fid, cid);
+ resumption_data_processor().SubscribeToResponse(app.app_id(),
+ resumption_request);
+ SDL_LOG_DEBUG("Sending request with correlation id: "
+ << cid << " module type: " << module.first
+ << " module id: " << module.second);
+ application_manager_.GetRPCService().ManageHMICommand(subscription_request);
+ }
+}
+
+void RCPendingResumptionHandler::OnResumptionRevert() {
+ SDL_LOG_AUTO_TRACE();
+}
+
+void RCPendingResumptionHandler::HandleSuccessfulResponse(
+ const application_manager::event_engine::Event& event,
+ const ModuleUid& module_uid) {
+ SDL_LOG_AUTO_TRACE();
+
+ auto& response = event.smart_object();
+ auto cid = event.smart_object_correlation_id();
+
+ const auto& it = paused_resumptions_.find(module_uid);
+ if (it != paused_resumptions_.end()) {
+ SDL_LOG_DEBUG("Paused resumptions found");
+ auto& queue_paused = it->second;
+ while (!queue_paused.empty()) {
+ const auto& resumption_request = queue_paused.front();
+ cid = resumption_request.correlation_id();
+ RaiseEventForResponse(response, cid);
+ auto app = application_manager_.application(resumption_request.app_id);
+ if (app) {
+ auto rc_app_extension = RCHelpers::GetRCExtension(*app);
+ rc_app_extension->SubscribeToInteriorVehicleData(module_uid);
+ }
+ queue_paused.pop();
+ }
+ paused_resumptions_.erase(it);
+ }
+}
+
+void RCPendingResumptionHandler::ProcessNextPausedResumption(
+ const ModuleUid& module_uid) {
+ SDL_LOG_AUTO_TRACE();
+
+ auto pop_front_paused_resumptions = [this](const ModuleUid& module_uid) {
+ const auto& it = paused_resumptions_.find(module_uid);
+ if (it == paused_resumptions_.end()) {
+ return std::shared_ptr<PendingRequestQueue::value_type>(nullptr);
+ }
+ auto& queue_paused = it->second;
+ if (queue_paused.empty()) {
+ paused_resumptions_.erase(it);
+ return std::shared_ptr<PendingRequestQueue::value_type>(nullptr);
+ }
+ auto paused_resumption =
+ std::make_shared<PendingRequestQueue::value_type>(queue_paused.front());
+ queue_paused.pop();
+ if (queue_paused.empty()) {
+ paused_resumptions_.erase(it);
+ }
+ return paused_resumption;
+ };
+
+ auto paused_resumption = pop_front_paused_resumptions(module_uid);
+ if (!paused_resumption) {
+ SDL_LOG_DEBUG("No paused resumptions found");
+ return;
+ }
+
+ auto& resumption_request = *paused_resumption;
+ auto subscription_request =
+ std::make_shared<smart_objects::SmartObject>(resumption_request.message);
+ const auto fid = GetFunctionId(*subscription_request);
+ const auto cid =
+ resumption_request
+ .message[app_mngr::strings::params][app_mngr::strings::correlation_id]
+ .asInt();
+ subscribe_on_event(fid, cid);
+ AddPendingRequest(resumption_request.app_id, *subscription_request);
+ SDL_LOG_DEBUG("Sending request with correlation id: "
+ << cid << " module type: " << module_uid.first
+ << " module id: " << module_uid.second);
+ application_manager_.GetRPCService().ManageHMICommand(subscription_request);
+}
+
+void RCPendingResumptionHandler::RaiseEventForResponse(
+ const smart_objects::SmartObject& subscription_response,
+ const uint32_t correlation_id) const {
+ smart_objects::SmartObject event_message = subscription_response;
+ event_message[app_mngr::strings::params][app_mngr::strings::correlation_id] =
+ correlation_id;
+
+ app_mngr::event_engine::Event event(
+ hmi_apis::FunctionID::RC_GetInteriorVehicleData);
+ event.set_smart_object(event_message);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+bool RCPendingResumptionHandler::IsPendingForResponse(
+ const ModuleUid& module_uid) const {
+ auto is_module_exists = [&module_uid](const PendingRequest& pending) {
+ return module_uid == GetModuleUid(pending.message);
+ };
+ auto it = std::find_if(
+ pending_requests_.begin(), pending_requests_.end(), is_module_exists);
+ return it != pending_requests_.end();
+}
+
+bool RCPendingResumptionHandler::IsOtherAppsSubscribed(
+ const uint32_t app_id, const ModuleUid& module_uid) const {
+ auto get_subscriptions = [](application_manager::ApplicationSharedPtr app) {
+ std::set<ModuleUid> result;
+ auto rc_app_extension = RCHelpers::GetRCExtension(*app);
+ if (rc_app_extension) {
+ result = rc_app_extension->InteriorVehicleDataSubscriptions();
+ }
+ return result;
+ };
+
+ auto app_subscribed = [module_uid, &get_subscriptions](
+ application_manager::ApplicationSharedPtr app) {
+ auto subscriptions = get_subscriptions(app);
+ auto it = subscriptions.find(module_uid);
+ return subscriptions.end() != it;
+ };
+
+ std::set<uint32_t> subscribed_apps;
+ for (auto& app : application_manager_.applications().GetData()) {
+ if (app_subscribed(app)) {
+ SDL_LOG_DEBUG("APP " << app->app_id() << " subscribed "
+ << module_uid.first << " " << module_uid.second);
+ subscribed_apps.insert(app->app_id());
+ }
+ }
+
+ subscribed_apps.erase(app_id);
+ return !subscribed_apps.empty();
+}
+
+utils::Optional<smart_objects::SmartObject>
+RCPendingResumptionHandler::GetPendingRequest(const uint32_t corr_id) {
+ auto corr_id_match = [corr_id](const PendingRequest& item) {
+ return corr_id == item.correlation_id();
+ };
+ auto it = std::find_if(
+ pending_requests_.begin(), pending_requests_.end(), corr_id_match);
+ if (it == pending_requests_.end()) {
+ return utils::Optional<smart_objects::SmartObject>::EMPTY;
+ }
+ return it->message;
+}
+
+utils::Optional<uint32_t> RCPendingResumptionHandler::GetPendingApp(
+ const uint32_t corr_id) {
+ auto corr_id_match = [corr_id](const PendingRequest& item) {
+ return corr_id == item.correlation_id();
+ };
+ auto it = std::find_if(
+ pending_requests_.begin(), pending_requests_.end(), corr_id_match);
+ if (it == pending_requests_.end()) {
+ return utils::Optional<uint32_t>::EMPTY;
+ }
+ return it->app_id;
+}
+
+void RCPendingResumptionHandler::RemovePendingRequest(const uint32_t corr_id) {
+ auto corr_id_match = [corr_id](const PendingRequest& item) {
+ return corr_id == item.correlation_id();
+ };
+ const auto it = std::find_if(
+ pending_requests_.begin(), pending_requests_.end(), corr_id_match);
+ if (it == pending_requests_.end()) {
+ SDL_LOG_WARN("Pending request with corr_id " << corr_id << " not found");
+ return;
+ }
+ pending_requests_.erase(it);
+}
+
+void RCPendingResumptionHandler::AddPendingRequest(
+ const uint32_t app_id, const smart_objects::SmartObject request_so) {
+ pending_requests_.push_back({app_id, request_so});
+}
+
+smart_objects::SmartObjectSPtr
+RCPendingResumptionHandler::CreateSubscriptionRequest(
+ const ModuleUid& module, const uint32_t correlation_id) {
+ return RCHelpers::CreateGetInteriorVDRequestToHMI(
+ module, correlation_id, RCHelpers::InteriorDataAction::SUBSCRIBE);
+}
+
+hmi_apis::FunctionID::eType RCPendingResumptionHandler::GetFunctionId(
+ const smart_objects::SmartObject& subscription_request) {
+ const auto function_id = static_cast<hmi_apis::FunctionID::eType>(
+ subscription_request[app_mngr::strings::params]
+ [app_mngr::strings::function_id]
+ .asInt());
+ return function_id;
+}
+
+ModuleUid RCPendingResumptionHandler::GetModuleUid(
+ const smart_objects::SmartObject& subscription_request) {
+ const smart_objects::SmartObject& msg_params =
+ subscription_request[app_mngr::strings::msg_params];
+ return ModuleUid(msg_params[message_params::kModuleType].asString(),
+ msg_params[message_params::kModuleId].asString());
+}
+
+} // namespace rc_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc
index c2aa639fda..87090405e7 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2018, Ford Motor Company
+ Copyright (c) 2020, Ford Motor Company
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -39,11 +39,12 @@
#include "rc_rpc_plugin/rc_command_factory.h"
#include "rc_rpc_plugin/rc_consent_manager_impl.h"
#include "rc_rpc_plugin/rc_helpers.h"
+#include "rc_rpc_plugin/rc_pending_resumption_handler.h"
#include "rc_rpc_plugin/resource_allocation_manager_impl.h"
#include "utils/helpers.h"
namespace rc_rpc_plugin {
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule");
+SDL_CREATE_LOG_VARIABLE("RemoteControlModule");
namespace plugins = application_manager::plugin_manager;
@@ -76,6 +77,8 @@ bool RCRPCPlugin::Init(
command_factory_.reset(new rc_rpc_plugin::RCCommandFactory(params));
rpc_service_ = &rpc_service;
app_mngr_ = &app_manager;
+ pending_resumption_handler_ = std::make_shared<RCPendingResumptionHandler>(
+ app_manager, *(interior_data_cache_.get()));
// Check all saved consents and remove expired
rc_consent_manager_->RemoveExpiredConsents();
@@ -115,19 +118,18 @@ void RCRPCPlugin::OnPolicyEvent(
void RCRPCPlugin::OnApplicationEvent(
application_manager::plugin_manager::ApplicationEvent event,
application_manager::ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!application->is_remote_control_supported()) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Remote control is not supported for application with app_id: "
- << application->app_id());
+ << application->app_id());
return;
}
switch (event) {
case plugins::kApplicationRegistered: {
- auto extension =
- std::shared_ptr<RCAppExtension>(new RCAppExtension(kRCPluginID));
- application->AddExtension(extension);
+ auto extension = std::shared_ptr<RCAppExtension>(
+ new RCAppExtension(kRCPluginID, *this, *application));
+ DCHECK_OR_RETURN_VOID(application->AddExtension(extension));
const auto driver_location =
rc_capabilities_manager_
->GetDriverLocationFromSeatLocationCapability();
@@ -160,6 +162,49 @@ void RCRPCPlugin::OnApplicationEvent(
}
}
+void RCRPCPlugin::ProcessResumptionSubscription(
+ application_manager::Application& app, RCAppExtension& ext) {
+ SDL_LOG_AUTO_TRACE();
+
+ pending_resumption_handler_->HandleResumptionSubscriptionRequest(ext, app);
+}
+
+void RCRPCPlugin::RevertResumption(const std::set<ModuleUid>& subscriptions) {
+ SDL_LOG_AUTO_TRACE();
+
+ interior_data_manager_->OnResumptionRevert(subscriptions);
+ pending_resumption_handler_->OnResumptionRevert();
+}
+
+bool RCRPCPlugin::IsOtherAppsSubscribed(const rc_rpc_types::ModuleUid& module,
+ const uint32_t app_id) {
+ auto get_subscriptions = [](application_manager::ApplicationSharedPtr app) {
+ std::set<ModuleUid> result;
+ auto rc_app_extension = RCHelpers::GetRCExtension(*app);
+ if (rc_app_extension) {
+ result = rc_app_extension->InteriorVehicleDataSubscriptions();
+ }
+ return result;
+ };
+
+ auto another_app_subscribed =
+ [app_id, module, &get_subscriptions](
+ application_manager::ApplicationSharedPtr app) {
+ if (app_id == app->app_id()) {
+ return false;
+ }
+ auto subscriptions = get_subscriptions(app);
+ auto it = subscriptions.find(module);
+ return subscriptions.end() != it;
+ };
+
+ auto accessor = app_mngr_->applications();
+ auto it = std::find_if(accessor.GetData().begin(),
+ accessor.GetData().end(),
+ another_app_subscribed);
+ return accessor.GetData().end() != it;
+}
+
RCRPCPlugin::Apps RCRPCPlugin::GetRCApplications(
application_manager::ApplicationManager& app_mngr) {
using application_manager::ApplicationSet;
@@ -167,11 +212,14 @@ RCRPCPlugin::Apps RCRPCPlugin::GetRCApplications(
ApplicationSet accessor = app_mngr.applications().GetData();
std::vector<ApplicationSharedPtr> result;
- for (const auto& it : accessor) {
- if (it->is_remote_control_supported()) {
- result.push_back(it);
- }
- }
+
+ std::copy_if(accessor.begin(),
+ accessor.end(),
+ std::back_inserter(result),
+ [](const ApplicationSharedPtr& app) {
+ return app->is_remote_control_supported();
+ });
+
return result;
}
@@ -179,12 +227,12 @@ RCRPCPlugin::Apps RCRPCPlugin::GetRCApplications(
extern "C" __attribute__((visibility("default")))
application_manager::plugin_manager::RPCPlugin*
-Create() {
+Create(logger::Logger* logger_instance) {
+ logger::Logger::instance(logger_instance);
return new rc_rpc_plugin::RCRPCPlugin();
} // namespace rc_rpc_plugin
extern "C" __attribute__((visibility("default"))) void Delete(
application_manager::plugin_manager::RPCPlugin* data) {
delete data;
- DELETE_THREAD_LOGGER(rc_rpc_plugin::logger_);
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
index 049f9a3cf3..fe9bb5eec3 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
@@ -45,7 +45,7 @@
namespace rc_rpc_plugin {
-CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule")
+SDL_CREATE_LOG_VARIABLE("RemoteControlModule")
ResourceAllocationManagerImpl::ResourceAllocationManagerImpl(
application_manager::ApplicationManager& app_mngr,
@@ -63,11 +63,11 @@ AcquireResult::eType ResourceAllocationManagerImpl::AcquireResource(
const std::string& module_type,
const std::string& module_id,
const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const application_manager::ApplicationSharedPtr acquiring_app =
app_mngr_.application(app_id);
if (!acquiring_app) {
- LOG4CXX_WARN(logger_, "App with app_id: " << app_id << "does not exist!");
+ SDL_LOG_WARN("App with app_id: " << app_id << " does not exist!");
return AcquireResult::IN_USE;
}
@@ -75,9 +75,9 @@ AcquireResult::eType ResourceAllocationManagerImpl::AcquireResource(
if (rc_capabilities_manager_.IsSeatLocationCapabilityProvided() &&
!IsUserLocationValid(module, acquiring_app)) {
- LOG4CXX_WARN(logger_,
- "Resource acquisition is not allowed "
- "according to location verification.");
+ SDL_LOG_WARN(
+ "Resource acquisition is not allowed "
+ "according to location verification.");
return AcquireResult::REJECTED;
}
@@ -85,23 +85,20 @@ AcquireResult::eType ResourceAllocationManagerImpl::AcquireResource(
const AllocatedResources::const_iterator allocated_it =
allocated_resources_.find(module);
if (allocated_resources_.end() == allocated_it) {
- LOG4CXX_DEBUG(logger_,
- "Resource is not acquired yet. "
- << "App: " << app_id << " is allowed to acquire "
- << module_type << " " << module_id);
+ SDL_LOG_DEBUG("Resource is not acquired yet. "
+ << "App: " << app_id << " is allowed to acquire "
+ << module_type << " " << module_id);
return AcquireResult::ALLOWED;
}
if (app_id == allocated_resources_[module]) {
- LOG4CXX_DEBUG(logger_,
- "App: " << app_id << " is already acquired resource "
+ SDL_LOG_DEBUG("App: " << app_id << " is already acquired resource "
<< module_type << " " << module_id);
return AcquireResult::ALLOWED;
}
if (IsModuleTypeRejected(module_type, module_id, app_id)) {
- LOG4CXX_DEBUG(logger_,
- "Driver disallowed app: " << app_id << " to acquire "
+ SDL_LOG_DEBUG("Driver disallowed app: " << app_id << " to acquire "
<< module_type << " " << module_id);
return AcquireResult::REJECTED;
}
@@ -110,42 +107,37 @@ AcquireResult::eType ResourceAllocationManagerImpl::AcquireResource(
acquiring_app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
if (mobile_apis::HMILevel::HMI_FULL != acquiring_app_hmi_level) {
- LOG4CXX_DEBUG(logger_,
- "Aquiring resources is not allowed in HMI level: "
- << acquiring_app_hmi_level << ". App: " << app_id
- << " is disallowed to acquire " << module_type << " "
- << module_id);
+ SDL_LOG_DEBUG("Acquiring resources is not allowed in HMI level: "
+ << acquiring_app_hmi_level << ". App: " << app_id
+ << " is disallowed to acquire " << module_type << " "
+ << module_id);
return AcquireResult::REJECTED;
}
if (!rc_capabilities_manager_.IsMultipleAccessAllowed(module)) {
- LOG4CXX_DEBUG(logger_,
- "Multiple access for the: " << module_type << " " << module_id
+ SDL_LOG_DEBUG("Multiple access for the: " << module_type << " " << module_id
<< " isn't allowed");
return AcquireResult::REJECTED;
}
switch (current_access_mode_) {
case hmi_apis::Common_RCAccessMode::AUTO_DENY: {
- LOG4CXX_DEBUG(logger_,
- "Current access_mode is AUTO_DENY. "
- << "App: " << app_id << " is disallowed to acquire "
- << module_type << " " << module_id);
+ SDL_LOG_DEBUG("Current access_mode is AUTO_DENY. "
+ << "App: " << app_id << " is disallowed to acquire "
+ << module_type << " " << module_id);
return AcquireResult::IN_USE;
}
case hmi_apis::Common_RCAccessMode::ASK_DRIVER: {
- LOG4CXX_DEBUG(logger_,
- "Current access_mode is ASK_DRIVER. "
- "Driver confirmation is required for app: "
- << app_id << " to acquire " << module_type << " "
- << module_id);
+ SDL_LOG_DEBUG(
+ "Current access_mode is ASK_DRIVER. "
+ "Driver confirmation is required for app: "
+ << app_id << " to acquire " << module_type << " " << module_id);
return AcquireResult::ASK_DRIVER;
}
case hmi_apis::Common_RCAccessMode::AUTO_ALLOW: {
- LOG4CXX_DEBUG(logger_,
- "Current access_mode is AUTO_ALLOW. "
- << "App: " << app_id << " is allowed to acquire "
- << module_type << " " << module_id);
+ SDL_LOG_DEBUG("Current access_mode is AUTO_ALLOW. "
+ << "App: " << app_id << " is allowed to acquire "
+ << module_type << " " << module_id);
return AcquireResult::ALLOWED;
}
default: { DCHECK_OR_RETURN(false, AcquireResult::IN_USE); }
@@ -154,7 +146,7 @@ AcquireResult::eType ResourceAllocationManagerImpl::AcquireResource(
bool ResourceAllocationManagerImpl::IsUserLocationValid(
ModuleUid& module, application_manager::ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto extension = RCHelpers::GetRCExtension(*app);
DCHECK_OR_RETURN(extension, false);
const auto user_location = extension->GetUserLocation();
@@ -166,15 +158,14 @@ bool ResourceAllocationManagerImpl::IsUserLocationValid(
if (is_driver || user_location.IntersectionExists(module_service_area)) {
return true;
}
- LOG4CXX_DEBUG(logger_, "User location is not valid");
+ SDL_LOG_DEBUG("User location is not valid");
return false;
}
void ResourceAllocationManagerImpl::ReleaseModuleType(
const std::string& module_type, const uint32_t application_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "Release " << module_type << " "
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Release " << module_type << " "
<< " by " << application_id);
Resources allocated_resources = GetAcquiredResources(application_id);
for (const auto& resource : allocated_resources) {
@@ -185,7 +176,7 @@ void ResourceAllocationManagerImpl::ReleaseModuleType(
}
void ResourceAllocationManagerImpl::ProcessApplicationPolicyUpdate() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
Apps app_list = RCRPCPlugin::GetRCApplications(app_mngr_);
Apps::const_iterator app = app_list.begin();
@@ -200,8 +191,7 @@ void ResourceAllocationManagerImpl::ProcessApplicationPolicyUpdate() {
&allowed_modules);
std::sort(allowed_modules.begin(), allowed_modules.end());
- LOG4CXX_DEBUG(logger_,
- "Acquired modules: " << acquired_modules.size()
+ SDL_LOG_DEBUG("Acquired modules: " << acquired_modules.size()
<< " , allowed modules: "
<< allowed_modules.size());
@@ -242,7 +232,7 @@ void ConstructOnRCStatusNotificationParams(
using smart_objects::SmartObject;
using smart_objects::SmartType_Array;
using smart_objects::SmartType_Map;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto modules_inserter = [](SmartObject& result_modules) {
return [&result_modules](const ModuleUid& module) {
@@ -275,7 +265,7 @@ void ConstructOnRCStatusNotificationParams(
smart_objects::SmartObjectSPtr
ResourceAllocationManagerImpl::CreateOnRCStatusNotificationToMobile(
const application_manager::ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using application_manager::MessageHelper;
auto msg_to_mobile = MessageHelper::CreateNotification(
mobile_apis::FunctionID::OnRCStatusID, app->app_id());
@@ -298,7 +288,7 @@ ResourceAllocationManagerImpl::CreateOnRCStatusNotificationToMobile(
smart_objects::SmartObjectSPtr
ResourceAllocationManagerImpl::CreateOnRCStatusNotificationToHmi(
const application_manager::ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using application_manager::MessageHelper;
auto msg_to_hmi =
MessageHelper::CreateHMINotification(hmi_apis::FunctionID::RC_OnRCStatus);
@@ -314,7 +304,7 @@ ResourceAllocationManagerImpl::CreateOnRCStatusNotificationToHmi(
void ResourceAllocationManagerImpl::SendOnRCStatusNotifications(
NotificationTrigger::eType event,
application_manager::ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr msg_to_mobile;
smart_objects::SmartObjectSPtr msg_to_hmi;
if (NotificationTrigger::APP_REGISTRATION == event) {
@@ -351,9 +341,8 @@ ResourceReleasedState::eType ResourceAllocationManagerImpl::ReleaseResource(
const std::string& module_type,
const std::string& module_id,
const uint32_t application_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "Release " << module_type << " " << module_id << " by "
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Release " << module_type << " " << module_id << " by "
<< application_id);
return SetResourceFree(module_type, module_id, application_id);
}
@@ -362,35 +351,32 @@ void ResourceAllocationManagerImpl::SetResourceAcquired(
const std::string& module_type,
const std::string& module_id,
const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ModuleUid module(module_type, module_id);
allocated_resources_[module] = app_id;
}
bool ResourceAllocationManagerImpl::IsResourceAlreadyAcquiredByApp(
const ModuleUid& moduleUid, const uint32_t app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto allocation = allocated_resources_.find(moduleUid);
if (allocated_resources_.end() == allocation) {
- LOG4CXX_DEBUG(logger_,
- "Resource " << moduleUid.first
+ SDL_LOG_DEBUG("Resource " << moduleUid.first
<< " is not allocated for any application.");
return false;
}
if (allocation->second != app_id) {
- LOG4CXX_DEBUG(logger_,
- "Resource "
- << moduleUid.first
- << " is already allocated by app:" << allocation->second
- << ". Asquire has been asked for app:" << app_id);
+ SDL_LOG_DEBUG("Resource "
+ << moduleUid.first
+ << " is already allocated by app:" << allocation->second
+ << ". Acquire has been asked for app:" << app_id);
return false;
}
- LOG4CXX_DEBUG(logger_,
- "Resource " << moduleUid.first
+ SDL_LOG_DEBUG("Resource " << moduleUid.first
<< " is allocated by app:" << allocation->second);
return true;
@@ -404,26 +390,24 @@ ResourceReleasedState::eType ResourceAllocationManagerImpl::SetResourceFree(
AllocatedResources::const_iterator allocation =
allocated_resources_.find(module);
if (allocated_resources_.end() == allocation) {
- LOG4CXX_DEBUG(logger_, "Resource " << module_type << " is not allocated.");
+ SDL_LOG_DEBUG("Resource " << module_type << " is not allocated.");
return ResourceReleasedState::NOT_ALLOCATED;
}
if (app_id != allocation->second) {
- LOG4CXX_ERROR(logger_,
- "Resource " << module_type
+ SDL_LOG_ERROR("Resource " << module_type
<< " is allocated by different application "
<< allocation->second);
return ResourceReleasedState::IS_ALLOCATED;
}
allocated_resources_.erase(allocation);
- LOG4CXX_DEBUG(
- logger_,
- "Resource " << module_type << ":" << module_id << " is released.");
+ SDL_LOG_DEBUG("Resource " << module_type << ":" << module_id
+ << " is released.");
return ResourceReleasedState::IS_RELEASED;
}
std::vector<ModuleUid> ResourceAllocationManagerImpl::GetAcquiredResources(
const uint32_t application_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
Resources allocated_resources;
AllocatedResources::const_iterator allocation = allocated_resources_.begin();
for (; allocated_resources_.end() != allocation; ++allocation) {
@@ -432,8 +416,7 @@ std::vector<ModuleUid> ResourceAllocationManagerImpl::GetAcquiredResources(
}
}
- LOG4CXX_DEBUG(logger_,
- "Application " << application_id << " acquired "
+ SDL_LOG_DEBUG("Application " << application_id << " acquired "
<< allocated_resources.size()
<< " resource(s).");
@@ -442,15 +425,14 @@ std::vector<ModuleUid> ResourceAllocationManagerImpl::GetAcquiredResources(
std::set<std::string> ResourceAllocationManagerImpl::GetAcquiredModuleTypes(
const uint32_t application_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
Resources allocated_resources = GetAcquiredResources(application_id);
std::set<std::string> acquired_module_types;
for (const auto& resource : allocated_resources) {
acquired_module_types.insert(resource.first);
}
- LOG4CXX_DEBUG(logger_,
- "Application " << application_id << " acquired "
+ SDL_LOG_DEBUG("Application " << application_id << " acquired "
<< acquired_module_types.size()
<< " module type(s).");
@@ -462,9 +444,8 @@ void ResourceAllocationManagerImpl::SetResourceState(
const std::string& module_id,
const uint32_t app_id,
const ResourceState::eType state) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "Setting state for " << module_type << " by app_id " << app_id
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Setting state for " << module_type << " by app_id " << app_id
<< " to state " << state);
ModuleUid module(module_type, module_id);
{
@@ -474,36 +455,33 @@ void ResourceAllocationManagerImpl::SetResourceState(
const bool acquired = allocated_resources_.end() != allocated_it;
if (acquired) {
- LOG4CXX_DEBUG(logger_,
- "Resource " << module_type << " is already acquired."
+ SDL_LOG_DEBUG("Resource " << module_type << " is already acquired."
<< " Owner application id is "
<< allocated_it->second
<< " Changing application id is " << app_id);
} else {
- LOG4CXX_DEBUG(logger_,
- "Resource " << module_type << " is not acquired yet");
+ SDL_LOG_DEBUG("Resource " << module_type << " is not acquired yet");
}
}
sync_primitives::AutoLock lock(resources_state_lock_);
resources_state_[module] = state;
- LOG4CXX_DEBUG(logger_, "Resource " << module_type << " got state " << state);
+ SDL_LOG_DEBUG("Resource " << module_type << " got state " << state);
}
bool ResourceAllocationManagerImpl::IsResourceFree(
const std::string& module_type, const std::string& module_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ModuleUid module(module_type, module_id);
sync_primitives::AutoLock lock(resources_state_lock_);
const ResourcesState::const_iterator resource = resources_state_.find(module);
if (resources_state_.end() == resource) {
- LOG4CXX_DEBUG(logger_, "Resource " << module_type << " is free.");
+ SDL_LOG_DEBUG("Resource " << module_type << " is free.");
return true;
}
- LOG4CXX_DEBUG(logger_,
- "Resource " << module_type << " state is " << resource->second);
+ SDL_LOG_DEBUG("Resource " << module_type << " state is " << resource->second);
return ResourceState::FREE == resource->second;
}
@@ -526,7 +504,7 @@ void ResourceAllocationManagerImpl::ForceAcquireResource(
const std::string& module_type,
const std::string& module_id,
const uint32_t app_id) {
- LOG4CXX_DEBUG(logger_, "Force " << app_id << " acquiring " << module_type);
+ SDL_LOG_DEBUG("Force " << app_id << " acquiring " << module_type);
sync_primitives::AutoLock lock(allocated_resources_lock_);
SetResourceAcquired(module_type, module_id, app_id);
}
@@ -535,7 +513,7 @@ bool ResourceAllocationManagerImpl::IsModuleTypeRejected(
const std::string& module_type,
const std::string& module_id,
const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ModuleUid module(module_type, module_id);
sync_primitives::AutoLock lock(rejected_resources_for_application_lock_);
RejectedResources::iterator it =
@@ -555,7 +533,7 @@ void ResourceAllocationManagerImpl::OnDriverDisallowed(
const std::string& module_type,
const std::string& module_id,
const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ModuleUid module(module_type, module_id);
sync_primitives::AutoLock lock(rejected_resources_for_application_lock_);
auto it = rejected_resources_for_application_.find(app_id);
@@ -572,9 +550,8 @@ void ResourceAllocationManagerImpl::OnApplicationEvent(
application_manager::plugin_manager::ApplicationEvent event,
application_manager::ApplicationSharedPtr application) {
using application_manager::plugin_manager::ApplicationEvent;
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "Event " << event << " came for " << application->app_id());
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Event " << event << " came for " << application->app_id());
if (ApplicationEvent::kApplicationExit == event ||
ApplicationEvent::kApplicationUnregistered == event) {
@@ -594,8 +571,8 @@ void ResourceAllocationManagerImpl::OnApplicationEvent(
void ResourceAllocationManagerImpl::OnPolicyEvent(
application_manager::plugin_manager::PolicyEvent event) {
using application_manager::plugin_manager::PolicyEvent;
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Event " << event);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Event " << event);
if (PolicyEvent::kApplicationPolicyUpdated == event) {
ProcessApplicationPolicyUpdate();
@@ -609,7 +586,7 @@ void ResourceAllocationManagerImpl::OnPolicyEvent(
}
void ResourceAllocationManagerImpl::ResetAllAllocations() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
{
sync_primitives::AutoLock lock(resources_state_lock_);
resources_state_.clear();
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/CMakeLists.txt b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/CMakeLists.txt
index bd46bdf11f..16e95bf599 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/CMakeLists.txt
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/CMakeLists.txt
@@ -45,6 +45,9 @@ ${CMAKE_CURRENT_SOURCE_DIR}/interior_data_cache_test.cc
${CMAKE_CURRENT_SOURCE_DIR}/rc_consent_manager_impl_test.cc
${CMAKE_CURRENT_SOURCE_DIR}/grid_test.cc
${CMAKE_CURRENT_SOURCE_DIR}/rc_helpers_test.cc
+${CMAKE_CURRENT_SOURCE_DIR}/rc_app_extension_test.cc
+${CMAKE_CURRENT_SOURCE_DIR}/rc_pending_resumption_handler_test.cc
+${COMPONENTS_DIR}/application_manager/test/mock_message_helper.cc
)
set(RC_COMMANDS_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/commands)
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc
index fb8de0bb9c..6c0962a557 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc
@@ -79,23 +79,24 @@ class ButtonPressRequestTest
: public CommandRequestTest<CommandsTestMocks::kIsNice> {
public:
ButtonPressRequestTest()
- : rc_capabilities_(smart_objects::SmartType_Map)
+ : rc_capabilities_(std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map))
, mock_app_(std::make_shared<NiceMock<MockApplication> >())
- , rc_app_extention_(
- std::make_shared<rc_rpc_plugin::RCAppExtension>(kModuleId)) {}
+ , rc_app_extension_(std::make_shared<rc_rpc_plugin::RCAppExtension>(
+ kModuleId, rc_plugin_, *mock_app_)) {}
void SetUp() OVERRIDE {
smart_objects::SmartObject control_caps((smart_objects::SmartType_Array));
- rc_capabilities_[strings::kradioControlCapabilities] = control_caps;
+ (*rc_capabilities_)[strings::kradioControlCapabilities] = control_caps;
ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_));
ON_CALL(*mock_app_, QueryInterface(RCRPCPlugin::kRCPluginID))
- .WillByDefault(Return(rc_app_extention_));
+ .WillByDefault(Return(rc_app_extension_));
ON_CALL(app_mngr_, GetPolicyHandler())
.WillByDefault(ReturnRef(mock_policy_handler_));
ON_CALL(app_mngr_, hmi_capabilities())
.WillByDefault(ReturnRef(mock_hmi_capabilities_));
ON_CALL(mock_hmi_capabilities_, rc_capability())
- .WillByDefault(Return(&rc_capabilities_));
+ .WillByDefault(Return(rc_capabilities_));
ON_CALL(*mock_app_, policy_app_id()).WillByDefault(Return(kPolicyAppId));
ON_CALL(mock_policy_handler_,
CheckHMIType(kPolicyAppId,
@@ -140,9 +141,10 @@ class ButtonPressRequestTest
}
protected:
- smart_objects::SmartObject rc_capabilities_;
+ smart_objects::SmartObjectSPtr rc_capabilities_;
std::shared_ptr<MockApplication> mock_app_;
- std::shared_ptr<rc_rpc_plugin::RCAppExtension> rc_app_extention_;
+ RCRPCPlugin rc_plugin_;
+ std::shared_ptr<rc_rpc_plugin::RCAppExtension> rc_app_extension_;
test::components::policy_test::MockPolicyHandlerInterface
mock_policy_handler_;
testing::NiceMock<rc_rpc_plugin_test::MockResourceAllocationManager>
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc
index 532a62df3b..20f9c27912 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc
@@ -31,11 +31,17 @@
*/
#include "rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h"
+
+#include "gtest/gtest.h"
+
+#include <stdint.h>
+#include <chrono>
+#include <thread>
+
#include "application_manager/commands/command_request_test.h"
#include "application_manager/event_engine/event_dispatcher.h"
#include "application_manager/message_helper.h"
#include "application_manager/mock_application.h"
-#include "gtest/gtest.h"
#include "rc_rpc_plugin/mock/mock_interior_data_cache.h"
#include "rc_rpc_plugin/mock/mock_interior_data_manager.h"
#include "rc_rpc_plugin/mock/mock_rc_capabilities_manager.h"
@@ -46,10 +52,6 @@
#include "rc_rpc_plugin/rc_module_constants.h"
#include "rc_rpc_plugin/rc_rpc_plugin.h"
-#include <stdint.h>
-#include <chrono>
-#include <thread>
-
using application_manager::ApplicationSet;
using ::application_manager::ApplicationSharedPtr;
using ::application_manager::Message;
@@ -92,11 +94,14 @@ class GetInteriorVehicleDataRequestTest
GetInteriorVehicleDataRequestTest()
: mock_app_(std::make_shared<NiceMock<MockApplication> >())
, mock_app2_(std::make_shared<NiceMock<MockApplication> >())
- , rc_app_extention_(std::make_shared<RCAppExtension>(kModuleId))
- , rc_app_extention2_(std::make_shared<RCAppExtension>(kModuleId))
+ , rc_app_extension_(
+ std::make_shared<RCAppExtension>(kModuleId, rc_plugin_, *mock_app_))
+ , rc_app_extension2_(std::make_shared<RCAppExtension>(
+ kModuleId, rc_plugin_, *mock_app2_))
, apps_lock_(std::make_shared<sync_primitives::Lock>())
, apps_da_(apps_, apps_lock_)
- , rc_capabilities_(smart_objects::SmartType::SmartType_Array) {
+ , rc_capabilities_(std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType::SmartType_Array)) {
ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kAppId));
ON_CALL(*mock_app2_, app_id()).WillByDefault(Return(kAppId2));
ON_CALL(*mock_app_, is_remote_control_supported())
@@ -104,9 +109,9 @@ class GetInteriorVehicleDataRequestTest
ON_CALL(*mock_app2_, is_remote_control_supported())
.WillByDefault(Return(true));
ON_CALL(*mock_app_, QueryInterface(_))
- .WillByDefault(Return(rc_app_extention_));
+ .WillByDefault(Return(rc_app_extension_));
ON_CALL(*mock_app2_, QueryInterface(_))
- .WillByDefault(Return(rc_app_extention2_));
+ .WillByDefault(Return(rc_app_extension2_));
}
/**
@@ -131,7 +136,7 @@ class GetInteriorVehicleDataRequestTest
frequency.first = max_request_in_time_frame;
frequency.second = time_frame_of_allowed_requests;
smart_objects::SmartObject control_caps((smart_objects::SmartType_Array));
- rc_capabilities_[strings::kradioControlCapabilities] = control_caps;
+ (*rc_capabilities_)[strings::kradioControlCapabilities] = control_caps;
ON_CALL(app_mngr_, get_settings())
.WillByDefault(ReturnRef(app_mngr_settings_));
ON_CALL(app_mngr_settings_, get_interior_vehicle_data_frequency())
@@ -151,7 +156,7 @@ class GetInteriorVehicleDataRequestTest
ON_CALL(app_mngr_, hmi_capabilities())
.WillByDefault(ReturnRef(mock_hmi_capabilities_));
ON_CALL(mock_hmi_capabilities_, rc_capability())
- .WillByDefault(Return(&rc_capabilities_));
+ .WillByDefault(Return(rc_capabilities_));
ON_CALL(mock_policy_handler_,
CheckHMIType(
_, mobile_apis::AppHMIType::eType::REMOTE_CONTROL, nullptr))
@@ -182,8 +187,9 @@ class GetInteriorVehicleDataRequestTest
protected:
std::shared_ptr<MockApplication> mock_app_;
std::shared_ptr<MockApplication> mock_app2_;
- std::shared_ptr<RCAppExtension> rc_app_extention_;
- std::shared_ptr<RCAppExtension> rc_app_extention2_;
+ RCRPCPlugin rc_plugin_;
+ std::shared_ptr<RCAppExtension> rc_app_extension_;
+ std::shared_ptr<RCAppExtension> rc_app_extension2_;
testing::NiceMock<rc_rpc_plugin_test::MockResourceAllocationManager>
mock_allocation_manager_;
testing::NiceMock<rc_rpc_plugin_test::MockInteriorDataCache>
@@ -195,7 +201,7 @@ class GetInteriorVehicleDataRequestTest
DataAccessor<application_manager::ApplicationSet> apps_da_;
testing::NiceMock<rc_rpc_plugin_test::MockRCCapabilitiesManager>
mock_rc_capabilities_manager_;
- smart_objects::SmartObject rc_capabilities_;
+ smart_objects::SmartObjectSPtr rc_capabilities_;
testing::NiceMock<MockRCConsentManager> mock_rc_consent_manger_;
};
@@ -263,7 +269,7 @@ TEST_F(
Execute_ExpectMessageNotSentToHMI_SuccessSentToMobile_AppSubscribed_DataFromCache) {
// Arrange
const ModuleUid module(module_type, module_id);
- rc_app_extention_->SubscribeToInteriorVehicleData(module);
+ rc_app_extension_->SubscribeToInteriorVehicleData(module);
MessageSharedPtr mobile_message = CreateBasicMessage();
(*mobile_message)[application_manager::strings::msg_params]
[message_params::kModuleType] = module_eType;
@@ -312,6 +318,51 @@ TEST_F(
TEST_F(
GetInteriorVehicleDataRequestTest,
+ Execute_ExpectMessageNotSentToHMI_DoubleSubscription_WarningsSentToMobile) {
+ // Arrange
+ const ModuleUid module(module_type, module_id);
+ rc_app_extension_->SubscribeToInteriorVehicleData(module);
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ (*mobile_message)[application_manager::strings::msg_params]
+ [message_params::kModuleType] = module_eType;
+ (*mobile_message)[application_manager::strings::msg_params]
+ [message_params::kModuleId] = module_id;
+ (*mobile_message)[application_manager::strings::msg_params]
+ [message_params::kSubscribe] = true;
+
+ auto command =
+ CreateRCCommand<rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>(
+ mobile_message);
+
+ // Expectations
+ EXPECT_CALL(mock_interior_data_cache_, Contains(module))
+ .WillOnce(Return(true));
+
+ smart_objects::SmartObject radio_data;
+ radio_data[message_params::kBand] = enums_value::kAM;
+ EXPECT_CALL(mock_interior_data_cache_, Retrieve(module))
+ .WillOnce(Return(radio_data));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(0);
+ MessageSharedPtr command_result;
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::WARNINGS), _))
+ .WillOnce(DoAll(SaveArg<0>(&command_result), Return(true)));
+
+ // Act
+ ASSERT_TRUE(command->Init());
+ command->Run();
+
+ // Assert
+ EXPECT_EQ((*command_result)[application_manager::strings::msg_params]
+ [message_params::kModuleData]
+ [message_params::kRadioControlData],
+ radio_data);
+}
+
+TEST_F(
+ GetInteriorVehicleDataRequestTest,
Execute_ExpectCorrectMessageSentToHMI_LastAppSubscribedUnsubscribe_ClearCache) {
// Arrange
MessageSharedPtr mobile_message = CreateBasicMessage();
@@ -334,7 +385,7 @@ TEST_F(
module_id;
apps_.insert(mock_app_);
- rc_app_extention_->SubscribeToInteriorVehicleData(module);
+ rc_app_extension_->SubscribeToInteriorVehicleData(module);
ON_CALL(app_mngr_, applications()).WillByDefault(Return(apps_da_));
ON_CALL(mock_interior_data_manager_, CheckRequestsToHMIFrequency(_))
.WillByDefault(Return(true));
@@ -378,8 +429,8 @@ TEST_F(GetInteriorVehicleDataRequestTest,
apps_.insert(mock_app_);
apps_.insert(mock_app2_);
- rc_app_extention_->SubscribeToInteriorVehicleData(module);
- rc_app_extention2_->SubscribeToInteriorVehicleData(module);
+ rc_app_extension_->SubscribeToInteriorVehicleData(module);
+ rc_app_extension2_->SubscribeToInteriorVehicleData(module);
smart_objects::SmartObject radio_data;
radio_data[message_params::kBand] = enums_value::kAM;
@@ -407,7 +458,7 @@ TEST_F(GetInteriorVehicleDataRequestTest,
command->Run();
// Assert
- EXPECT_FALSE(rc_app_extention_->IsSubscribedToInteriorVehicleDataOfType(
+ EXPECT_FALSE(rc_app_extension_->IsSubscribedToInteriorVehicleDataOfType(
enums_value::kRadio));
EXPECT_EQ((*command_result)[application_manager::strings::msg_params]
[message_params::kModuleData]
@@ -570,7 +621,7 @@ TEST_F(GetInteriorVehicleDataRequestTest,
hmi_msg_params[application_manager::strings::connection_key] = kConnectionKey;
apps_.insert(mock_app_);
- rc_app_extention_->SubscribeToInteriorVehicleData(module);
+ rc_app_extension_->SubscribeToInteriorVehicleData(module);
ON_CALL(app_mngr_, applications()).WillByDefault(Return(apps_da_));
ON_CALL(mock_interior_data_manager_, CheckRequestsToHMIFrequency(_))
.WillByDefault(Return(true));
@@ -600,13 +651,13 @@ TEST_F(GetInteriorVehicleDataRequestTest,
command->on_event(event);
// Assert
- EXPECT_TRUE(rc_app_extention_->IsSubscribedToInteriorVehicleData(module));
+ EXPECT_TRUE(rc_app_extension_->IsSubscribedToInteriorVehicleData(module));
}
TEST_F(GetInteriorVehicleDataRequestTest,
Execute_ExpectRejectDuToRequestLimitation_NoCahce) {
// Arrange
- rc_app_extention_->UnsubscribeFromInteriorVehicleDataOfType(
+ rc_app_extension_->UnsubscribeFromInteriorVehicleDataOfType(
enums_value::kRadio);
MessageSharedPtr mobile_message = CreateBasicMessage();
(*mobile_message)[application_manager::strings::msg_params]
@@ -775,4 +826,61 @@ TEST_F(GetInteriorVehicleDataRequestTest,
EXPECT_TRUE(climate_enable_available);
}
+TEST_F(GetInteriorVehicleDataRequestTest, ProcessingSuccessResultCodes) {
+ using rc_rpc_plugin::commands::GetInteriorVehicleDataRequest;
+ namespace hmi_response = application_manager::hmi_response;
+ namespace strings = application_manager::strings;
+
+ std::set<hmi_apis::Common_Result::eType> success_result_codes{
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::WARNINGS,
+ hmi_apis::Common_Result::WRONG_LANGUAGE,
+ hmi_apis::Common_Result::RETRY,
+ hmi_apis::Common_Result::SAVED};
+
+ ON_CALL(mock_interior_data_cache_, Contains(_)).WillByDefault(Return(false));
+ ON_CALL(mock_interior_data_manager_, CheckRequestsToHMIFrequency(_))
+ .WillByDefault(Return(true));
+
+ MessageSharedPtr hmi_response_message = CreateBasicMessage();
+ auto& hmi_response_params =
+ (*hmi_response_message)[application_manager::strings::msg_params];
+ hmi_response_params[strings::connection_key] = kAppId;
+ auto climate_control_data =
+ smart_objects::SmartObject(smart_objects::SmartType_Boolean);
+ climate_control_data = true;
+
+ auto& msg_params = (*hmi_response_message)[strings::msg_params];
+ msg_params[message_params::kModuleData][message_params::kClimateControlData]
+ [message_params::kClimateEnableAvailable] = climate_control_data;
+ msg_params[message_params::kModuleData][message_params::kModuleId] =
+ "00bd6d93-e093-4bf0-9784-281febe41bed";
+
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ auto message_to_mob = CreateBasicMessage();
+
+ for (const auto& result_code : success_result_codes) {
+ hmi_response_params[hmi_response::code] = result_code;
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _))
+ .WillOnce(DoAll(SaveArg<0>(&message_to_mob), Return(true)));
+
+ auto command =
+ CreateRCCommand<GetInteriorVehicleDataRequest>(mobile_message);
+ ASSERT_TRUE(command->Init());
+ command->Run();
+
+ application_manager::event_engine::Event event(
+ hmi_apis::FunctionID::RC_GetInteriorVehicleData);
+ event.set_smart_object(*hmi_response_message);
+ command->on_event(event);
+
+ const bool success =
+ (*message_to_mob)[strings::msg_params][strings::success].asBool();
+ EXPECT_TRUE(success);
+ }
+}
+
} // namespace rc_rpc_plugin_test
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_interior_vehicle_data_notification_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_interior_vehicle_data_notification_test.cc
index d6771c534d..6c7a7ba67e 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_interior_vehicle_data_notification_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_interior_vehicle_data_notification_test.cc
@@ -74,14 +74,15 @@ class OnInteriorVehicleDataNotificationTest
public:
OnInteriorVehicleDataNotificationTest()
: mock_app_(std::make_shared<NiceMock<MockApplication> >())
- , rc_app_extention_(std::make_shared<RCAppExtension>(kModuleId))
+ , rc_app_extension_(
+ std::make_shared<RCAppExtension>(kModuleId, rc_plugin_, *mock_app_))
, apps_lock_(std::make_shared<sync_primitives::Lock>())
, apps_da_(apps_, apps_lock_) {
ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kAppId));
ON_CALL(*mock_app_, is_remote_control_supported())
.WillByDefault(Return(true));
ON_CALL(*mock_app_, QueryInterface(_))
- .WillByDefault(Return(rc_app_extention_));
+ .WillByDefault(Return(rc_app_extension_));
}
MessageSharedPtr CreateBasicMessage() {
@@ -120,7 +121,8 @@ class OnInteriorVehicleDataNotificationTest
protected:
std::shared_ptr<MockApplication> mock_app_;
- std::shared_ptr<RCAppExtension> rc_app_extention_;
+ RCRPCPlugin rc_plugin_;
+ std::shared_ptr<RCAppExtension> rc_app_extension_;
testing::NiceMock<rc_rpc_plugin_test::MockResourceAllocationManager>
mock_allocation_manager_;
testing::NiceMock<rc_rpc_plugin_test::MockInteriorDataCache>
@@ -141,7 +143,7 @@ TEST_F(OnInteriorVehicleDataNotificationTest,
MessageSharedPtr mobile_message = CreateBasicMessage();
apps_.insert(mock_app_);
const ModuleUid module(module_type, module_id);
- rc_app_extention_->SubscribeToInteriorVehicleData(module);
+ rc_app_extension_->SubscribeToInteriorVehicleData(module);
ON_CALL(app_mngr_, applications()).WillByDefault(Return(apps_da_));
// Expectations
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc
index 55be43f37b..8fbaeda2f2 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc
@@ -106,7 +106,8 @@ class RCGetInteriorVehicleDataConsentTest
RCGetInteriorVehicleDataConsentTest()
: mock_app_(std::make_shared<NiceMock<MockApplication> >())
, command_holder(app_mngr_)
- , rc_capabilities_(smart_objects::SmartType::SmartType_Array)
+ , rc_capabilities_(std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType::SmartType_Array))
, request_controller(mock_request_controler)
, rpc_protection_manager_(
std::make_shared<application_manager::MockRPCProtectionManager>())
@@ -118,13 +119,14 @@ class RCGetInteriorVehicleDataConsentTest
rpc_protection_manager_,
hmi_so_factory_,
mobile_so_factoy_)
- , rc_app_extention_(std::make_shared<RCAppExtension>(kPluginID))
+ , rc_app_extension_(
+ std::make_shared<RCAppExtension>(kPluginID, rc_plugin_, *mock_app_))
, mock_rpc_plugin_manager(
std::make_shared<NiceMock<MockRPCPluginManager> >())
, rpc_plugin(mock_rpc_plugin)
, optional_mock_rpc_plugin(mock_rpc_plugin) {
smart_objects::SmartObject control_caps((smart_objects::SmartType_Array));
- rc_capabilities_[strings::kradioControlCapabilities] = control_caps;
+ (*rc_capabilities_)[strings::kradioControlCapabilities] = control_caps;
ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kAppId));
ON_CALL(app_mngr_, hmi_interfaces())
.WillByDefault(ReturnRef(mock_hmi_interfaces_));
@@ -135,7 +137,7 @@ class RCGetInteriorVehicleDataConsentTest
InterfaceState::STATE_AVAILABLE));
ON_CALL(app_mngr_, application(kAppId)).WillByDefault(Return(mock_app_));
ON_CALL(*mock_app_, QueryInterface(RCRPCPlugin::kRCPluginID))
- .WillByDefault(Return(rc_app_extention_));
+ .WillByDefault(Return(rc_app_extension_));
testing::NiceMock<rc_rpc_plugin_test::MockInteriorDataCache>
mock_interior_data_cache_;
ON_CALL(app_mngr_, GetPolicyHandler())
@@ -143,7 +145,7 @@ class RCGetInteriorVehicleDataConsentTest
ON_CALL(app_mngr_, hmi_capabilities())
.WillByDefault(ReturnRef(mock_hmi_capabilities_));
ON_CALL(mock_hmi_capabilities_, rc_capability())
- .WillByDefault(Return(&rc_capabilities_));
+ .WillByDefault(Return(rc_capabilities_));
ON_CALL(mock_policy_handler_,
CheckHMIType(
_, mobile_apis::AppHMIType::eType::REMOTE_CONTROL, nullptr))
@@ -209,14 +211,15 @@ class RCGetInteriorVehicleDataConsentTest
mock_interior_data_cache_;
testing::NiceMock<rc_rpc_plugin_test::MockInteriorDataManager>
mock_interior_data_manager_;
- smart_objects::SmartObject rc_capabilities_;
+ smart_objects::SmartObjectSPtr rc_capabilities_;
MockRPCPlugin mock_rpc_plugin;
MockCommandFactory mock_command_factory;
am::request_controller::RequestController request_controller;
std::shared_ptr<application_manager::MockRPCProtectionManager>
rpc_protection_manager_;
am::rpc_service::RPCServiceImpl rpc_service_;
- std::shared_ptr<RCAppExtension> rc_app_extention_;
+ RCRPCPlugin rc_plugin_;
+ std::shared_ptr<RCAppExtension> rc_app_extension_;
std::shared_ptr<am::plugin_manager::MockRPCPluginManager>
mock_rpc_plugin_manager;
utils::Optional<RPCPlugin> rpc_plugin;
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/release_interior_vehicle_data_module_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/release_interior_vehicle_data_module_request_test.cc
index 200e458c17..e521d81ef6 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/release_interior_vehicle_data_module_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/release_interior_vehicle_data_module_request_test.cc
@@ -84,16 +84,10 @@ using namespace rc_rpc_plugin;
class ReleaseInteriorVehicleDataModuleRequestTest
: public CommandRequestTest<CommandsTestMocks::kIsNice> {
public:
- ReleaseInteriorVehicleDataModuleRequestTest() : mock_app_(CreateMockApp()) {}
-
- void SetUp() OVERRIDE {
- TestPreCondition();
- ON_CALL(app_mngr_, application(kAppID)).WillByDefault(Return(mock_app_));
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kAppID));
- ON_CALL(mock_rc_capabilities_manager_,
- GetDefaultModuleIdFromCapabilities(kModuleType))
- .WillByDefault(Return(kDefaultModuleID));
- }
+ ReleaseInteriorVehicleDataModuleRequestTest()
+ : mock_app_(CreateMockApp())
+ , rc_capabilities_(std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType::SmartType_Array)) {}
MessageSharedPtr CreateBasicMessage() {
MessageSharedPtr message = CreateMessage();
@@ -111,13 +105,6 @@ class ReleaseInteriorVehicleDataModuleRequestTest
return message;
}
- void TestPreCondition() {
- message_ = CreateBasicMessage();
- command_ =
- CreateRCCommand<commands::ReleaseInteriorVehicleDataModuleRequest>(
- message_);
- }
-
template <class Command>
std::shared_ptr<Command> CreateRCCommand(MessageSharedPtr& msg) {
InitCommand(kDefaultTimeout_);
@@ -134,6 +121,26 @@ class ReleaseInteriorVehicleDataModuleRequestTest
}
protected:
+ void SetUp() OVERRIDE {
+ TestPreCondition();
+ ON_CALL(app_mngr_, application(kAppID)).WillByDefault(Return(mock_app_));
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kAppID));
+ ON_CALL(mock_hmi_capabilities_, rc_capability())
+ .WillByDefault(Return(rc_capabilities_));
+ ON_CALL(mock_rc_capabilities_manager_, CheckIfModuleExistsInCapabilities(_))
+ .WillByDefault(Return(true));
+ ON_CALL(mock_rc_capabilities_manager_,
+ GetDefaultModuleIdFromCapabilities(kModuleType))
+ .WillByDefault(Return(kDefaultModuleID));
+ }
+
+ void TestPreCondition() {
+ message_ = CreateBasicMessage();
+ command_ =
+ CreateRCCommand<commands::ReleaseInteriorVehicleDataModuleRequest>(
+ message_);
+ }
+
MessageSharedPtr message_;
ReleaseCommandPtr command_;
@@ -143,6 +150,7 @@ class ReleaseInteriorVehicleDataModuleRequestTest
MockInteriorDataManager mock_interior_data_manager_;
NiceMock<MockRCCapabilitiesManager> mock_rc_capabilities_manager_;
MockRCConsentManager mock_rc_consent_manger_;
+ smart_objects::SmartObjectSPtr rc_capabilities_;
};
TEST_F(ReleaseInteriorVehicleDataModuleRequestTest,
@@ -159,6 +167,8 @@ TEST_F(ReleaseInteriorVehicleDataModuleRequestTest,
ON_CALL(mock_allocation_manager_,
ReleaseResource(kModuleType, kModuleID, kAppID))
.WillByDefault(Return(ResourceReleasedState::eType::NOT_ALLOCATED));
+ ON_CALL(mock_hmi_capabilities_, rc_capability())
+ .WillByDefault(Return(smart_objects::SmartObjectSPtr()));
MessageSharedPtr message_to_mobile = CreateMessage();
@@ -189,7 +199,8 @@ TEST_F(ReleaseInteriorVehicleDataModuleRequestTest,
ReleaseResource(kModuleType, kModuleID, kAppID))
.WillByDefault(Return(ResourceReleasedState::eType::IS_ALLOCATED));
MessageSharedPtr message_to_mobile = CreateMessage();
-
+ ON_CALL(mock_hmi_capabilities_, rc_capability())
+ .WillByDefault(Return(smart_objects::SmartObjectSPtr()));
EXPECT_CALL(
mock_rpc_service_,
ManageMobileCommand(
@@ -216,6 +227,8 @@ TEST_F(ReleaseInteriorVehicleDataModuleRequestTest,
ON_CALL(mock_allocation_manager_,
ReleaseResource(kModuleType, kModuleID, kAppID))
.WillByDefault(Return(ResourceReleasedState::eType::IS_RELEASED));
+ ON_CALL(mock_hmi_capabilities_, rc_capability())
+ .WillByDefault(Return(smart_objects::SmartObjectSPtr()));
MessageSharedPtr message_to_mobile = CreateMessage();
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc
index 5a822a2fe4..9b06ddb137 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc
@@ -73,12 +73,14 @@ class SetInteriorVehicleDataRequestTest
public:
SetInteriorVehicleDataRequestTest()
: mock_app_(std::make_shared<NiceMock<MockApplication> >())
- , rc_app_extention_(std::make_shared<RCAppExtension>(kModuleId))
- , rc_capabilities_(smart_objects::SmartType::SmartType_Array) {}
+ , rc_app_extension_(
+ std::make_shared<RCAppExtension>(kModuleId, rc_plugin_, *mock_app_))
+ , rc_capabilities_(std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType::SmartType_Array)) {}
void SetUp() OVERRIDE {
smart_objects::SmartObject control_caps((smart_objects::SmartType_Array));
- rc_capabilities_[strings::kradioControlCapabilities] = control_caps;
+ (*rc_capabilities_)[strings::kradioControlCapabilities] = control_caps;
ON_CALL(app_mngr_, hmi_interfaces())
.WillByDefault(ReturnRef(mock_hmi_interfaces_));
ON_CALL(
@@ -88,7 +90,7 @@ class SetInteriorVehicleDataRequestTest
InterfaceState::STATE_AVAILABLE));
ON_CALL(app_mngr_, application(kAppId)).WillByDefault(Return(mock_app_));
ON_CALL(*mock_app_, QueryInterface(RCRPCPlugin::kRCPluginID))
- .WillByDefault(Return(rc_app_extention_));
+ .WillByDefault(Return(rc_app_extension_));
ON_CALL(*mock_app_, policy_app_id()).WillByDefault(Return(kPolicyAppId));
ON_CALL(mock_allocation_manager_, IsResourceFree(_, _))
@@ -102,13 +104,14 @@ class SetInteriorVehicleDataRequestTest
nullptr))
.WillByDefault(Return(true));
ON_CALL(mock_hmi_capabilities_, rc_capability())
- .WillByDefault(Return(&rc_capabilities_));
+ .WillByDefault(Return(rc_capabilities_));
ON_CALL(mock_allocation_manager_, is_rc_enabled())
.WillByDefault(Return(true));
ON_CALL(mock_rc_capabilities_manager_, CheckIfModuleExistsInCapabilities(_))
.WillByDefault(Return(true));
ON_CALL(mock_rc_capabilities_manager_, GetModuleDataCapabilities(_, _))
- .WillByDefault(Return(std::make_pair("", capabilitiesStatus::success)));
+ .WillByDefault(
+ Return(std::make_pair("", capabilitiesStatus::kSuccess)));
}
MessageSharedPtr CreateBasicMessage() {
@@ -146,10 +149,11 @@ class SetInteriorVehicleDataRequestTest
testing::NiceMock<rc_rpc_plugin_test::MockInteriorDataManager>
mock_interior_data_manager_;
std::shared_ptr<MockApplication> mock_app_;
- std::shared_ptr<RCAppExtension> rc_app_extention_;
+ RCRPCPlugin rc_plugin_;
+ std::shared_ptr<RCAppExtension> rc_app_extension_;
testing::NiceMock<rc_rpc_plugin_test::MockRCCapabilitiesManager>
mock_rc_capabilities_manager_;
- smart_objects::SmartObject rc_capabilities_;
+ smart_objects::SmartObjectSPtr rc_capabilities_;
testing::NiceMock<MockRCConsentManager> mock_rc_consent_manger_;
};
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_interior_data_manager.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_interior_data_manager.h
index 231ac2ae36..3e64bb541f 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_interior_data_manager.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_interior_data_manager.h
@@ -49,6 +49,8 @@ class MockInteriorDataManager : public rc_rpc_plugin::InteriorDataManager {
MOCK_METHOD1(StoreRequestToHMITime, void(const rc_rpc_plugin::ModuleUid&));
MOCK_METHOD1(CheckRequestsToHMIFrequency,
bool(const rc_rpc_plugin::ModuleUid&));
+ MOCK_METHOD1(OnResumptionRevert,
+ void(const std::set<rc_rpc_plugin::ModuleUid>& subscriptions));
};
} // namespace rc_rpc_plugin_test
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 c73472d2a8..751291c8e2 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
@@ -54,9 +54,11 @@ class MockRCHelpers {
MOCK_METHOD1(
GetRCExtension,
rc_rpc_plugin::RCAppExtensionPtr(application_manager::Application&));
- MOCK_METHOD2(CreateUnsubscribeRequestToHMI,
- smart_objects::SmartObjectSPtr(const rc_rpc_plugin::ModuleUid&,
- const uint32_t));
+ MOCK_METHOD3(CreateGetInteriorVDRequestToHMI,
+ smart_objects::SmartObjectSPtr(
+ const rc_rpc_plugin::ModuleUid&,
+ const uint32_t,
+ const RCHelpers::InteriorDataAction action));
MOCK_METHOD2(AppsSubscribedToModule,
std::vector<application_manager::ApplicationSharedPtr>(
application_manager::ApplicationManager&,
@@ -89,6 +91,9 @@ class MockRCHelpers {
smart_objects::SmartObject(const smart_objects::SmartObject& data1,
const smart_objects::SmartObject& data2));
+ MOCK_METHOD1(IsResponseSuccessful,
+ bool(const smart_objects::SmartObject& response));
+
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 3e60591c6b..2f5fed9971 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
@@ -60,10 +60,12 @@ rc_rpc_plugin::RCAppExtensionPtr rc_rpc_plugin::RCHelpers::GetRCExtension(
}
smart_objects::SmartObjectSPtr
-rc_rpc_plugin::RCHelpers::CreateUnsubscribeRequestToHMI(
- const ModuleUid& module, const uint32_t correlation_id) {
- return MockRCHelpers::rc_helpers_mock()->CreateUnsubscribeRequestToHMI(
- module, correlation_id);
+rc_rpc_plugin::RCHelpers::CreateGetInteriorVDRequestToHMI(
+ const ModuleUid& module,
+ const uint32_t correlation_id,
+ const RCHelpers::InteriorDataAction action) {
+ return MockRCHelpers::rc_helpers_mock()->CreateGetInteriorVDRequestToHMI(
+ module, correlation_id, action);
}
std::vector<application_manager::ApplicationSharedPtr>
@@ -130,6 +132,11 @@ void RCHelpers::RemoveRedundantGPSDataFromIVDataMsg(
msg_params);
}
+bool RCHelpers::IsResponseSuccessful(
+ const smart_objects::SmartObject& response) {
+ return MockRCHelpers::rc_helpers_mock()->IsResponseSuccessful(response);
+}
+
MockRCHelpers* MockRCHelpers::rc_helpers_mock() {
static ::testing::NiceMock<MockRCHelpers> mock_rc_helpers;
return &mock_rc_helpers;
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/rc_app_extension_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/rc_app_extension_test.cc
new file mode 100644
index 0000000000..60c3fb9135
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/rc_app_extension_test.cc
@@ -0,0 +1,198 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "rc_rpc_plugin/rc_app_extension.h"
+
+#include <memory>
+#include <string>
+
+#include "application_manager/mock_application.h"
+#include "gtest/gtest.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+#include "rc_rpc_plugin/rc_rpc_plugin.h"
+
+namespace {
+const uint32_t kRCAppExtensionId = 1ull;
+} // namespace
+
+namespace test {
+namespace components {
+namespace rc_rpc_plugin_test {
+namespace rc_app_extension_test {
+
+using test::components::application_manager_test::MockApplication;
+using ::testing::NiceMock;
+
+class RcAppExtensionTest : public testing::Test {
+ public:
+ RcAppExtensionTest()
+ : mock_app_(new NiceMock<MockApplication>())
+ , rc_app_extension_(std::make_shared<rc_rpc_plugin::RCAppExtension>(
+ kRCAppExtensionId, rc_plugin_, *mock_app_)) {}
+
+ protected:
+ std::unique_ptr<MockApplication> mock_app_;
+ rc_rpc_plugin::RCRPCPlugin rc_plugin_;
+ rc_rpc_plugin::RCAppExtensionPtr rc_app_extension_;
+};
+
+TEST_F(RcAppExtensionTest, SubscribeToInteriorVehicleData_AppDoesntUpdateHash) {
+ const std::string module_type = "CLIMATE";
+ const std::string module_id = "9cb963f3-c5e8-41cb-b001-19421cc16552";
+ rc_rpc_plugin::ModuleUid module{module_type, module_id};
+
+ EXPECT_CALL(*mock_app_, UpdateHash()).Times(0);
+
+ rc_app_extension_->SubscribeToInteriorVehicleData(module);
+ EXPECT_TRUE(rc_app_extension_->IsSubscribedToInteriorVehicleData(module));
+
+ auto subscription = rc_app_extension_->InteriorVehicleDataSubscriptions();
+ EXPECT_EQ(1ull, subscription.size());
+}
+
+TEST_F(RcAppExtensionTest,
+ UnsubscribeFromInteriorVehicleData_AppDoesntUpdateHash) {
+ const std::string module_type = "CLIMATE";
+ const std::string module_id = "9cb963f3-c5e8-41cb-b001-19421cc16552";
+ rc_rpc_plugin::ModuleUid module{module_type, module_id};
+
+ EXPECT_CALL(*mock_app_, UpdateHash()).Times(0);
+ rc_app_extension_->SubscribeToInteriorVehicleData(module);
+
+ EXPECT_CALL(*mock_app_, UpdateHash()).Times(0);
+ rc_app_extension_->UnsubscribeFromInteriorVehicleData(module);
+
+ EXPECT_FALSE(rc_app_extension_->IsSubscribedToInteriorVehicleData(module));
+
+ auto subscription = rc_app_extension_->InteriorVehicleDataSubscriptions();
+ EXPECT_TRUE(subscription.empty());
+}
+
+TEST_F(RcAppExtensionTest,
+ UnsubscribeFromInteriorVehicleDataOfType_AppDoesntUpdateHash) {
+ const std::string module1_type = "CLIMATE";
+ const std::string module1_id = "9cb963f3-c5e8-41cb-b001-19421cc16552";
+ rc_rpc_plugin::ModuleUid module1{module1_type, module1_id};
+
+ const std::string module2_type = "RADIO";
+ const std::string module2_id = "357a3918-9f35-4d86-a8b6-60cd4308d76f";
+ rc_rpc_plugin::ModuleUid module2{module2_type, module2_id};
+
+ EXPECT_CALL(*mock_app_, UpdateHash()).Times(0);
+ rc_app_extension_->SubscribeToInteriorVehicleData(module1);
+ rc_app_extension_->SubscribeToInteriorVehicleData(module2);
+
+ EXPECT_CALL(*mock_app_, UpdateHash());
+ rc_app_extension_->UnsubscribeFromInteriorVehicleDataOfType(module1_type);
+
+ EXPECT_FALSE(
+ rc_app_extension_->IsSubscribedToInteriorVehicleDataOfType(module1_type));
+ EXPECT_TRUE(
+ rc_app_extension_->IsSubscribedToInteriorVehicleDataOfType(module2_type));
+
+ auto subscription = rc_app_extension_->InteriorVehicleDataSubscriptions();
+ EXPECT_EQ(1ull, subscription.size());
+}
+
+TEST_F(RcAppExtensionTest,
+ UnsubscribeFromInteriorVehicleDataOfType_UNSUCCESS_AppDoesntUpdateHash) {
+ const std::string module1_type = "CLIMATE";
+ const std::string module_id = "9cb963f3-c5e8-41cb-b001-19421cc16552";
+ rc_rpc_plugin::ModuleUid module{module1_type, module_id};
+
+ const std::string module2_type = "RADIO";
+
+ EXPECT_CALL(*mock_app_, UpdateHash()).Times(0);
+ rc_app_extension_->SubscribeToInteriorVehicleData(module);
+
+ EXPECT_CALL(*mock_app_, UpdateHash()).Times(0);
+ rc_app_extension_->UnsubscribeFromInteriorVehicleDataOfType(module2_type);
+
+ EXPECT_TRUE(rc_app_extension_->IsSubscribedToInteriorVehicleData(module));
+
+ auto subscription = rc_app_extension_->InteriorVehicleDataSubscriptions();
+ EXPECT_EQ(1ull, subscription.size());
+}
+
+TEST_F(RcAppExtensionTest, SaveResumptionData_SUCCESS) {
+ using namespace rc_rpc_plugin;
+
+ const std::string module1_type = "CLIMATE";
+ const std::string module1_id = "9cb963f3-c5e8-41cb-b001-19421cc16552";
+ ModuleUid module1{module1_type, module1_id};
+
+ const std::string module2_type = "RADIO";
+ const std::string module2_id = "357a3918-9f35-4d86-a8b6-60cd4308d76f";
+ ModuleUid module2{module2_type, module2_id};
+
+ EXPECT_CALL(*mock_app_, UpdateHash()).Times(0);
+ rc_app_extension_->SubscribeToInteriorVehicleData(module1);
+ rc_app_extension_->SubscribeToInteriorVehicleData(module2);
+
+ const auto subscriptions =
+ rc_app_extension_->InteriorVehicleDataSubscriptions();
+
+ auto subscription_so =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ rc_app_extension_->SaveResumptionData(subscription_so);
+
+ const auto module_data =
+ subscription_so[message_params::kModuleData].asArray();
+
+ EXPECT_NE(nullptr, module_data);
+
+ EXPECT_EQ(module_data->size(), subscriptions.size());
+
+ auto module_info_so =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ module_info_so[message_params::kModuleType] = module1.first;
+ module_info_so[message_params::kModuleId] = module1.second;
+
+ auto found_module =
+ std::find(module_data->begin(), module_data->end(), module_info_so);
+
+ EXPECT_NE(found_module, module_data->end());
+
+ module_info_so[message_params::kModuleType] = module2.first;
+ module_info_so[message_params::kModuleId] = module2.second;
+
+ found_module =
+ std::find(module_data->begin(), module_data->end(), module_info_so);
+
+ EXPECT_NE(found_module, module_data->end());
+}
+
+} // namespace rc_app_extension_test
+} // namespace rc_rpc_plugin_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/rc_pending_resumption_handler_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/rc_pending_resumption_handler_test.cc
new file mode 100644
index 0000000000..fe8ade1e05
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/rc_pending_resumption_handler_test.cc
@@ -0,0 +1,421 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE. */
+
+#include "rc_rpc_plugin/rc_pending_resumption_handler.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_resume_ctrl.h"
+#include "application_manager/mock_resumption_data_processor.h"
+#include "application_manager/mock_rpc_service.h"
+#include "application_manager/smart_object_keys.h"
+#include "gtest/gtest.h"
+#include "mock_application_manager.h"
+#include "rc_rpc_plugin/interior_data_cache_impl.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
+#include "rc_rpc_plugin/rc_rpc_plugin.h"
+
+namespace rc_rpc_plugin_test {
+
+using ::testing::_;
+using ::testing::DoAll;
+using ::testing::InSequence;
+using ::testing::NiceMock;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::SaveArg;
+
+using rc_rpc_plugin::ModuleUid;
+
+using application_manager::MockMessageHelper;
+using test::components::resumption_test::MockResumeCtrl;
+using test::components::resumption_test::MockResumptionDataProcessor;
+typedef NiceMock< ::test::components::event_engine_test::MockEventDispatcher>
+ MockEventDispatcher;
+
+typedef NiceMock<
+ ::test::components::application_manager_test::MockApplicationManager>
+ MockApplicationManager;
+typedef NiceMock< ::test::components::application_manager_test::MockApplication>
+ MockApplication;
+typedef NiceMock< ::test::components::application_manager_test::MockRPCService>
+ MockRPCService;
+typedef std::shared_ptr<MockApplication> MockAppPtr;
+
+namespace {
+const uint32_t kAppId_1 = 1u;
+const uint32_t kAppId_2 = 2u;
+const uint32_t kCorrelationId = 10u;
+const std::string kModuleType_1 = "CLIMATE";
+const std::string kModuleId_1 = "9cb963f3-c5e8-41cb-b001-19421cc16552";
+const std::string kModuleType_2 = "RADIO";
+const std::string kModuleId_2 = "357a3918-9f35-4d86-a8b6-60cd4308d76f";
+const uint32_t kRCPluginID = rc_rpc_plugin::RCRPCPlugin::kRCPluginID;
+const auto kSourceHMI = application_manager::commands::Command::SOURCE_HMI;
+} // namespace
+
+/**
+ * @brief EventCheck check that event contains apropriate data,
+ * check that is matched correlation id,
+ * check that function id is correct
+ */
+MATCHER_P(EventCheck, expected_corr_id, "") {
+ namespace strings = application_manager::strings;
+ const auto& response_message = arg.smart_object();
+ const auto cid =
+ response_message[strings::params][strings::correlation_id].asInt();
+ const bool cid_ok = (cid == expected_corr_id);
+ const auto fid =
+ response_message[strings::params][strings::function_id].asInt();
+ const bool fid_ok = (fid == hmi_apis::FunctionID::RC_GetInteriorVehicleData);
+ return fid_ok && cid_ok;
+}
+
+/**
+ * @brief MessageCheck check that message contains apropriate data,
+ * check that is matched correlation id
+ */
+MATCHER_P(MessageCheck, correlation_id, "") {
+ const auto& request = *arg;
+ const auto cid =
+ request[app_mngr::strings::params][app_mngr::strings::correlation_id]
+ .asInt();
+ return cid == correlation_id;
+}
+
+class RCPendingResumptionHandlerTest : public ::testing::Test {
+ public:
+ RCPendingResumptionHandlerTest()
+ : applications_lock_(std::make_shared<sync_primitives::Lock>())
+ , applications_(application_set_, applications_lock_)
+ , mock_message_helper_(*MockMessageHelper::message_helper_mock()) {}
+
+ void SetUp() OVERRIDE {
+ ON_CALL(app_manager_mock_, event_dispatcher())
+ .WillByDefault(ReturnRef(event_dispatcher_mock_));
+ ON_CALL(app_manager_mock_, GetRPCService())
+ .WillByDefault(ReturnRef(mock_rpc_service_));
+ ON_CALL(app_manager_mock_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId));
+ ON_CALL(app_manager_mock_, applications())
+ .WillByDefault(Return(applications_));
+ ON_CALL(app_manager_mock_, resume_controller())
+ .WillByDefault(ReturnRef(resume_ctrl_mock_));
+ ON_CALL(resume_ctrl_mock_, resumption_data_processor())
+ .WillByDefault(ReturnRef(resumption_data_processor_mock_));
+ resumption_handler_.reset(new rc_rpc_plugin::RCPendingResumptionHandler(
+ app_manager_mock_, cache_));
+ }
+
+ smart_objects::SmartObjectSPtr CreateHMIResponseMessage(
+ const application_manager::MessageType& message_type,
+ const hmi_apis::Common_Result::eType& response_code,
+ uint32_t correlation_id) {
+ namespace strings = application_manager::strings;
+ namespace hmi_response = application_manager::hmi_response;
+ smart_objects::SmartObject params(smart_objects::SmartType_Map);
+ params[strings::function_id] =
+ hmi_apis::FunctionID::RC_GetInteriorVehicleData;
+ params[strings::message_type] = message_type;
+ params[strings::correlation_id] = correlation_id;
+ const auto hmi_protocol_type = 1;
+ params[strings::protocol_type] = hmi_protocol_type;
+ params[hmi_response::code] = response_code;
+
+ smart_objects::SmartObjectSPtr response =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+ auto& message = *response;
+ message[strings::params] = params;
+ message[strings::msg_params] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ message[strings::msg_params][rc_rpc_plugin::message_params::kIsSubscribed] =
+ true;
+ return response;
+ }
+
+ MockAppPtr CreateApp(uint32_t app_id) {
+ auto mock_app = std::make_shared<MockApplication>();
+ ON_CALL(app_manager_mock_, application(app_id))
+ .WillByDefault(Return(mock_app));
+ ON_CALL(*mock_app, app_id()).WillByDefault(Return(app_id));
+ return mock_app;
+ }
+
+ rc_rpc_plugin::RCAppExtensionPtr CreateExtension(MockApplication& app) {
+ auto rc_app_ext = std::make_shared<rc_rpc_plugin::RCAppExtension>(
+ kRCPluginID, rc_plugin_, app);
+ ON_CALL(app, QueryInterface(kRCPluginID)).WillByDefault(Return(rc_app_ext));
+ return rc_app_ext;
+ }
+
+ protected:
+ application_manager::ApplicationSet application_set_;
+ std::shared_ptr<sync_primitives::Lock> applications_lock_;
+ DataAccessor<application_manager::ApplicationSet> applications_;
+ MockMessageHelper& mock_message_helper_;
+ MockResumeCtrl resume_ctrl_mock_;
+ MockResumptionDataProcessor resumption_data_processor_mock_;
+ MockApplicationManager app_manager_mock_;
+ MockEventDispatcher event_dispatcher_mock_;
+ MockRPCService mock_rpc_service_;
+ rc_rpc_plugin::RCRPCPlugin rc_plugin_;
+ rc_rpc_plugin::InteriorDataCacheImpl cache_;
+ std::unique_ptr<rc_rpc_plugin::RCPendingResumptionHandler>
+ resumption_handler_;
+};
+
+TEST_F(RCPendingResumptionHandlerTest, HandleResumptionNoSubscriptionNoAction) {
+ auto mock_app = CreateApp(kAppId_1);
+ auto rc_app_ext = CreateExtension(*mock_app);
+
+ EXPECT_CALL(resumption_data_processor_mock_, SubscribeToResponse(_, _))
+ .Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(0);
+
+ resumption_handler_->HandleResumptionSubscriptionRequest(*rc_app_ext,
+ *mock_app);
+}
+
+TEST_F(RCPendingResumptionHandlerTest,
+ HandleResumptionOneSubscriptionOnAction) {
+ auto mock_app = CreateApp(kAppId_1);
+ auto rc_app_ext = CreateExtension(*mock_app);
+
+ ModuleUid module_uid{kModuleType_1, kModuleId_1};
+ rc_app_ext->AddPendingSubscription(module_uid);
+
+ EXPECT_CALL(app_manager_mock_, GetNextHMICorrelationID())
+ .WillOnce(Return(kAppId_1));
+ EXPECT_CALL(resumption_data_processor_mock_,
+ SubscribeToResponse(kAppId_1, _));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(MessageCheck(kAppId_1), kSourceHMI));
+
+ resumption_handler_->HandleResumptionSubscriptionRequest(*rc_app_ext,
+ *mock_app);
+}
+
+TEST_F(RCPendingResumptionHandlerTest,
+ HandleResumptionMultipleSubscriptionsMultipleActions) {
+ auto mock_app = CreateApp(kAppId_1);
+ auto rc_app_ext = CreateExtension(*mock_app);
+
+ ModuleUid module_uid_1 = {kModuleType_1, kModuleId_1};
+ rc_app_ext->AddPendingSubscription(module_uid_1);
+
+ ModuleUid module_uid_2 = {kModuleType_2, kModuleId_2};
+ rc_app_ext->AddPendingSubscription(module_uid_2);
+
+ {
+ InSequence in_sequence;
+ EXPECT_CALL(app_manager_mock_, GetNextHMICorrelationID())
+ .WillOnce(Return(kAppId_1));
+ EXPECT_CALL(resumption_data_processor_mock_,
+ SubscribeToResponse(kAppId_1, _));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(MessageCheck(kAppId_1), kSourceHMI));
+ EXPECT_CALL(app_manager_mock_, GetNextHMICorrelationID())
+ .WillOnce(Return(kAppId_2));
+ EXPECT_CALL(resumption_data_processor_mock_,
+ SubscribeToResponse(kAppId_1, _));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(MessageCheck(kAppId_2), kSourceHMI));
+ }
+
+ resumption_handler_->HandleResumptionSubscriptionRequest(*rc_app_ext,
+ *mock_app);
+}
+
+TEST_F(RCPendingResumptionHandlerTest,
+ HandleResumptionWithPendingSubscription) {
+ auto mock_app = CreateApp(kAppId_1);
+ auto rc_app_ext = CreateExtension(*mock_app);
+
+ ModuleUid module_uid = {kModuleType_1, kModuleId_1};
+ rc_app_ext->AddPendingSubscription(module_uid);
+
+ EXPECT_CALL(app_manager_mock_, GetNextHMICorrelationID())
+ .WillOnce(Return(kAppId_1));
+ EXPECT_CALL(resumption_data_processor_mock_,
+ SubscribeToResponse(kAppId_1, _));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(MessageCheck(kAppId_1), kSourceHMI));
+
+ resumption_handler_->HandleResumptionSubscriptionRequest(*rc_app_ext,
+ *mock_app);
+
+ auto rc_app_ext_2 = CreateExtension(*mock_app);
+ rc_app_ext_2->AddPendingSubscription(module_uid);
+
+ EXPECT_CALL(app_manager_mock_, GetNextHMICorrelationID());
+ EXPECT_CALL(resumption_data_processor_mock_,
+ SubscribeToResponse(kAppId_1, _));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(0);
+
+ resumption_handler_->HandleResumptionSubscriptionRequest(*rc_app_ext_2,
+ *mock_app);
+}
+
+TEST_F(RCPendingResumptionHandlerTest,
+ HandleResumptionWithPendingSubscriptionAndNotPendingOne) {
+ auto mock_app = CreateApp(kAppId_1);
+ auto rc_app_ext = CreateExtension(*mock_app);
+
+ ModuleUid module_uid_1 = {kModuleType_1, kModuleId_1};
+ rc_app_ext->AddPendingSubscription(module_uid_1);
+
+ EXPECT_CALL(app_manager_mock_, GetNextHMICorrelationID())
+ .WillOnce(Return(kAppId_1));
+ EXPECT_CALL(resumption_data_processor_mock_,
+ SubscribeToResponse(kAppId_1, _));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(MessageCheck(kAppId_1), kSourceHMI));
+
+ resumption_handler_->HandleResumptionSubscriptionRequest(*rc_app_ext,
+ *mock_app);
+
+ auto rc_app_ext_2 = CreateExtension(*mock_app);
+ ModuleUid module_uid_2 = {kModuleType_2, kModuleId_2};
+ rc_app_ext_2->AddPendingSubscription(module_uid_1);
+ rc_app_ext_2->AddPendingSubscription(module_uid_2);
+
+ {
+ InSequence in_sequence;
+ EXPECT_CALL(app_manager_mock_, GetNextHMICorrelationID())
+ .WillOnce(Return(kAppId_1));
+ EXPECT_CALL(resumption_data_processor_mock_,
+ SubscribeToResponse(kAppId_1, _));
+ EXPECT_CALL(app_manager_mock_, GetNextHMICorrelationID())
+ .WillOnce(Return(kAppId_2));
+ EXPECT_CALL(resumption_data_processor_mock_,
+ SubscribeToResponse(kAppId_1, _));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(MessageCheck(kAppId_2), kSourceHMI));
+ }
+
+ resumption_handler_->HandleResumptionSubscriptionRequest(*rc_app_ext_2,
+ *mock_app);
+}
+
+TEST_F(RCPendingResumptionHandlerTest,
+ Resumption2ApplicationsWithCommonDataSuccess) {
+ auto mock_app_1 = CreateApp(kAppId_1);
+ auto rc_app_ext = CreateExtension(*mock_app_1);
+
+ ModuleUid module_uid = {kModuleType_1, kModuleId_1};
+ rc_app_ext->AddPendingSubscription(module_uid);
+
+ EXPECT_CALL(app_manager_mock_, GetNextHMICorrelationID())
+ .WillOnce(Return(kAppId_1));
+ EXPECT_CALL(resumption_data_processor_mock_,
+ SubscribeToResponse(kAppId_1, _));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(MessageCheck(kAppId_1), kSourceHMI));
+
+ resumption_handler_->HandleResumptionSubscriptionRequest(*rc_app_ext,
+ *mock_app_1);
+
+ auto mock_app_2 = CreateApp(kAppId_2);
+ auto rc_app_ext_2 = CreateExtension(*mock_app_2);
+
+ rc_app_ext_2->AddPendingSubscription(module_uid);
+
+ EXPECT_CALL(app_manager_mock_, GetNextHMICorrelationID())
+ .WillOnce(Return(kAppId_2));
+ EXPECT_CALL(resumption_data_processor_mock_,
+ SubscribeToResponse(kAppId_2, _));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(0);
+
+ resumption_handler_->HandleResumptionSubscriptionRequest(*rc_app_ext_2,
+ *mock_app_2);
+
+ auto response =
+ CreateHMIResponseMessage(application_manager::MessageType::kResponse,
+ hmi_apis::Common_Result::SUCCESS,
+ kAppId_1);
+
+ application_manager::event_engine::Event event(
+ hmi_apis::FunctionID::RC_GetInteriorVehicleData);
+ event.set_smart_object(*response);
+
+ EXPECT_CALL(event_dispatcher_mock_, raise_event(EventCheck(kAppId_2)));
+
+ resumption_handler_->on_event(event);
+}
+
+TEST_F(RCPendingResumptionHandlerTest,
+ Resumption2ApplicationsWithCommonDataFailedRetry) {
+ auto mock_app_1 = CreateApp(kAppId_1);
+ auto rc_app_ext = CreateExtension(*mock_app_1);
+
+ ModuleUid module_uid = {kModuleType_1, kModuleId_1};
+ rc_app_ext->AddPendingSubscription(module_uid);
+
+ EXPECT_CALL(app_manager_mock_, GetNextHMICorrelationID())
+ .WillOnce(Return(kAppId_1));
+ EXPECT_CALL(resumption_data_processor_mock_,
+ SubscribeToResponse(kAppId_1, _));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _));
+
+ resumption_handler_->HandleResumptionSubscriptionRequest(*rc_app_ext,
+ *mock_app_1);
+
+ auto mock_app_2 = CreateApp(kAppId_2);
+ auto rc_app_ext_2 = CreateExtension(*mock_app_2);
+
+ rc_app_ext_2->AddPendingSubscription(module_uid);
+
+ EXPECT_CALL(app_manager_mock_, GetNextHMICorrelationID())
+ .WillOnce(Return(kAppId_2));
+ EXPECT_CALL(resumption_data_processor_mock_,
+ SubscribeToResponse(kAppId_2, _));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(0);
+
+ resumption_handler_->HandleResumptionSubscriptionRequest(*rc_app_ext_2,
+ *mock_app_2);
+
+ auto response =
+ CreateHMIResponseMessage(application_manager::MessageType::kErrorResponse,
+ hmi_apis::Common_Result::SUCCESS,
+ kAppId_1);
+
+ application_manager::event_engine::Event event(
+ hmi_apis::FunctionID::RC_GetInteriorVehicleData);
+ event.set_smart_object(*response);
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(MessageCheck(kAppId_2), kSourceHMI));
+
+ resumption_handler_->on_event(event);
+}
+
+} // namespace rc_rpc_plugin_test
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 4b10d34643..a22543ba09 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
@@ -45,6 +45,7 @@ ${COMPONENTS_DIR}/application_manager/rpc_plugins/rc_rpc_plugin/src/interior_dat
${COMPONENTS_DIR}/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
${COMPONENTS_DIR}/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc
${COMPONENTS_DIR}/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc
+${COMPONENTS_DIR}/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_pending_resumption_handler.cc
${COMPONENTS_DIR}/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_consent_manager_impl.cc
${COMPONENTS_DIR}/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_capabilities_manager_impl.cc
${COMPONENTS_DIR}/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_command_factory.cc
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager/resource_allocation_manager_impl_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager/resource_allocation_manager_impl_test.cc
index 70ed832cb1..501fbc323d 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager/resource_allocation_manager_impl_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager/resource_allocation_manager_impl_test.cc
@@ -113,7 +113,8 @@ class RAManagerTest : public ::testing::Test {
ON_CALL(mock_app_mngr_, GetPolicyHandler())
.WillByDefault(ReturnRef(mock_policy_handler_));
auto plugin_id = rc_rpc_plugin::RCRPCPlugin::kRCPluginID;
- app_ext_ptr_ = std::make_shared<rc_rpc_plugin::RCAppExtension>(plugin_id);
+ app_ext_ptr_ = std::make_shared<rc_rpc_plugin::RCAppExtension>(
+ plugin_id, rc_plugin_, *mock_app_1_);
ON_CALL(*mock_app_1_, app_id()).WillByDefault(Return(kAppId1));
PrepareResources();
@@ -144,7 +145,9 @@ class RAManagerTest : public ::testing::Test {
void SetUp() OVERRIDE {
rc_app_extension_ = std::make_shared<rc_rpc_plugin::RCAppExtension>(
static_cast<application_manager::AppExtensionUID>(
- rc_rpc_plugin::RCRPCPlugin::kRCPluginID));
+ rc_rpc_plugin::RCRPCPlugin::kRCPluginID),
+ rc_plugin_,
+ *mock_app_1_);
ON_CALL(mock_rc_capabilities_manager_,
GetDriverLocationFromSeatLocationCapability())
.WillByDefault(Return(kDriverLocation));
@@ -178,6 +181,7 @@ class RAManagerTest : public ::testing::Test {
mock_rc_capabilities_manager_;
std::vector<ModuleUid> resources_;
Grid module_service_area_;
+ RCRPCPlugin rc_plugin_;
RCAppExtensionPtr rc_app_extension_;
MockRCHelpers* mock_rc_helpers_;
};
@@ -403,9 +407,11 @@ TEST_F(RAManagerTest, AppUnregistered_ReleaseResource) {
mock_app_mngr_, mock_rpc_service_, mock_rc_capabilities_manager_);
ra_manager.SetAccessMode(hmi_apis::Common_RCAccessMode::eType::AUTO_DENY);
- RCAppExtensionPtr rc_extention_ptr =
- std::make_shared<RCAppExtension>(application_manager::AppExtensionUID(
- rc_rpc_plugin::RCRPCPlugin::kRCPluginID));
+ RCAppExtensionPtr rc_extension_ptr = std::make_shared<RCAppExtension>(
+ application_manager::AppExtensionUID(
+ rc_rpc_plugin::RCRPCPlugin::kRCPluginID),
+ rc_plugin_,
+ *mock_app_1_);
EXPECT_EQ(rc_rpc_plugin::AcquireResult::ALLOWED,
ra_manager.AcquireResource(kModuleType1, kModuleId, kAppId1));
@@ -477,12 +483,14 @@ TEST_F(RAManagerTest, AppsDisallowed_ReleaseAllResources) {
EXPECT_CALL(mock_app_mngr_, applications()).WillRepeatedly(Return(apps_da));
- RCAppExtensionPtr rc_extention_ptr =
- std::make_shared<RCAppExtension>(application_manager::AppExtensionUID(
- rc_rpc_plugin::RCRPCPlugin::kRCPluginID));
+ RCAppExtensionPtr rc_extension_ptr = std::make_shared<RCAppExtension>(
+ application_manager::AppExtensionUID(
+ rc_rpc_plugin::RCRPCPlugin::kRCPluginID),
+ rc_plugin_,
+ *mock_app_1_);
EXPECT_CALL(*mock_app_1_, QueryInterface(RCRPCPlugin::kRCPluginID))
- .WillRepeatedly(Return(rc_extention_ptr));
+ .WillRepeatedly(Return(rc_extension_ptr));
// Act
ra_manager.OnPolicyEvent(
@@ -508,13 +516,15 @@ TEST_F(RAManagerTest, AppGotRevokedModulesWithPTU_ReleaseRevokedResource) {
EXPECT_CALL(mock_app_mngr_, application(kAppId1))
.WillRepeatedly(Return(mock_app_1_));
- RCAppExtensionPtr rc_extention_ptr =
+ RCAppExtensionPtr rc_extension_ptr =
std::make_shared<rc_rpc_plugin::RCAppExtension>(
application_manager::AppExtensionUID(
- rc_rpc_plugin::RCRPCPlugin::kRCPluginID));
+ rc_rpc_plugin::RCRPCPlugin::kRCPluginID),
+ rc_plugin_,
+ *mock_app_1_);
EXPECT_CALL(*mock_app_1_, QueryInterface(RCRPCPlugin::kRCPluginID))
- .WillRepeatedly(Return(rc_extention_ptr));
+ .WillRepeatedly(Return(rc_extension_ptr));
ON_CALL(*mock_app_1_, is_remote_control_supported())
.WillByDefault(Return(true));
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/CMakeLists.txt b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/CMakeLists.txt
index fe8857b6b1..a03b34d742 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/CMakeLists.txt
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/CMakeLists.txt
@@ -54,7 +54,6 @@ set(LIBRARIES
ApplicationManager
HMI_API
MOBILE_API
- MessageHelper
connectionHandler
v4_protocol_v1_2_no_extra
SmartObjects
@@ -72,6 +71,7 @@ target_link_libraries("sdl_rpc_plugin_static" ${LIBRARIES})
add_library("sdl_rpc_plugin" SHARED "src/sdl_rpc_plugin.cc")
target_link_libraries("sdl_rpc_plugin" sdl_rpc_plugin_static)
+target_link_libraries("sdl_rpc_plugin" MessageHelper)
set(INSTALL_DESTINATION bin)
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/button_get_capabilities_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/button_get_capabilities_request.h
index 9bb3d9a6fb..62be7e8836 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/button_get_capabilities_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/button_get_capabilities_request.h
@@ -62,10 +62,9 @@ class ButtonGetCapabilitiesRequest : public app_mngr::commands::RequestToHMI {
**/
virtual ~ButtonGetCapabilitiesRequest();
- /**
- * @brief Execute command
- **/
- virtual void Run();
+ void Run() OVERRIDE;
+
+ void onTimeOut() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(ButtonGetCapabilitiesRequest);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_system_info_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_system_info_request.h
index 8d3be68539..0b82feb1c5 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_system_info_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_system_info_request.h
@@ -64,7 +64,12 @@ class GetSystemInfoRequest : public app_mngr::commands::RequestToHMI {
/**
* @brief Execute command
**/
- virtual void Run();
+ void Run() OVERRIDE;
+
+ /**
+ * @brief onTimeOut from request controller
+ */
+ void onTimeOut() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(GetSystemInfoRequest);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_system_info_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_system_info_response.h
index d4f35a4e2a..2d3c40c3f3 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_system_info_response.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/get_system_info_response.h
@@ -74,8 +74,7 @@ class GetSystemInfoResponse : public app_mngr::commands::ResponseFromHMI {
virtual void Run();
private:
- const SystemInfo GetSystemInfo(
- const hmi_apis::Common_Result::eType code) const;
+ const SystemInfo GetSystemInfo() const;
DISALLOW_COPY_AND_ASSIGN(GetSystemInfoResponse);
};
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_start_stream_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_start_stream_request.h
index fa9eee485e..ac6f1474e6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_start_stream_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_audio_start_stream_request.h
@@ -77,13 +77,13 @@ class AudioStartStreamRequest : public app_mngr::commands::RequestToHMI,
**/
virtual void on_event(const app_mngr::event_engine::Event& event);
+ private:
/**
* @brief RetryStartSession resend HMI startSession request if needed.
* If limit expired, set audio_stream_retry_number counter to 0
*/
void RetryStartSession();
- private:
uint32_t retry_number_;
DISALLOW_COPY_AND_ASSIGN(AudioStartStreamRequest);
};
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_start_stream_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_start_stream_request.h
index afad744eb3..76413cd55d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_start_stream_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_start_stream_request.h
@@ -77,13 +77,13 @@ class NaviStartStreamRequest : public app_mngr::commands::RequestToHMI,
*/
virtual void onTimeOut();
+ private:
/**
* @brief RetryStartSession resend HMI startSession request if needed.
* If limit expired, set video_stream_retry_number counter to 0
*/
void RetryStartSession();
- private:
uint32_t retry_number_;
DISALLOW_COPY_AND_ASSIGN(NaviStartStreamRequest);
};
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_request.h
index 3def06ba9a..898a2a8f67 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_request.h
@@ -65,6 +65,8 @@ class NaviSubscribeWayPointsRequest : public app_mngr::commands::RequestToHMI {
**/
virtual void Run() OVERRIDE;
+ void onTimeOut() OVERRIDE;
+
private:
DISALLOW_COPY_AND_ASSIGN(NaviSubscribeWayPointsRequest);
};
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_subtle_alert_pressed_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_subtle_alert_pressed_notification.h
new file mode 100644
index 0000000000..c08746ba3d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_subtle_alert_pressed_notification.h
@@ -0,0 +1,80 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_SUBTLE_ALERT_PRESSED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_SUBTLE_ALERT_PRESSED_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+#include "sdl_rpc_plugin/sdl_rpc_plugin.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnUISubtleAlertPressedNotification command class
+ **/
+class OnUISubtleAlertPressedNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnUISubtleAlertPressedNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnUISubtleAlertPressedNotification(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief OnUISubtleAlertPressedNotification class destructor
+ **/
+ ~OnUISubtleAlertPressedNotification() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnUISubtleAlertPressedNotification);
+};
+
+} // namespace commands
+
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_SUBTLE_ALERT_PRESSED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_update_file_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_update_file_notification.h
new file mode 100644
index 0000000000..6f97469916
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_update_file_notification.h
@@ -0,0 +1,79 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_UPDATE_FILE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_UPDATE_FILE_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnUIUpdateFileNotification command class
+ **/
+class OnUIUpdateFileNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnUIUpdateFileNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnUIUpdateFileNotification(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief OnUIUpdateFileNotification class destructor
+ **/
+ virtual ~OnUIUpdateFileNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnUIUpdateFileNotification);
+};
+
+} // namespace commands
+
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_UPDATE_FILE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_update_sub_menu_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_update_sub_menu_notification.h
new file mode 100644
index 0000000000..4aae254be5
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/on_ui_update_sub_menu_notification.h
@@ -0,0 +1,79 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_UPDATE_SUB_MENU_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_UPDATE_SUB_MENU_NOTIFICATION_H_
+
+#include "application_manager/commands/notification_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnUiUpdateSubMenuNotification command class
+ **/
+class OnUIUpdateSubMenuNotification
+ : public app_mngr::commands::NotificationFromHMI {
+ public:
+ /**
+ * @brief OnUIUpdateSubMenuNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnUIUpdateSubMenuNotification(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief OnUIUpdateSubMenuNotification class destructor
+ **/
+ virtual ~OnUIUpdateSubMenuNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnUIUpdateSubMenuNotification);
+};
+
+} // namespace commands
+
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_ON_UI_UPDATE_SUB_MENU_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_get_capabilities_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_get_capabilities_request.h
index 57a90955f4..6dd06f283d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_get_capabilities_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_get_capabilities_request.h
@@ -61,10 +61,9 @@ class RCGetCapabilitiesRequest : public app_mngr::commands::RequestToHMI {
**/
virtual ~RCGetCapabilitiesRequest();
- /**
- * @brief Execute command
- **/
- virtual void Run();
+ void Run() OVERRIDE;
+
+ void onTimeOut() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(RCGetCapabilitiesRequest);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_is_ready_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_is_ready_request.h
index 305a866659..15b2e13867 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_is_ready_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/rc_is_ready_request.h
@@ -34,7 +34,6 @@
#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RC_IS_READY_REQUEST_H_
#include "application_manager/commands/request_to_hmi.h"
-#include "application_manager/message_helper.h"
namespace sdl_rpc_plugin {
namespace app_mngr = application_manager;
@@ -78,11 +77,6 @@ class RCIsReadyRequest : public app_mngr::commands::RequestToHMI,
*/
void onTimeOut() OVERRIDE;
- /**
- * @brief Send request to HMI for fetching of cappabilities
- */
- void SendMessageToHMI();
-
private:
DISALLOW_COPY_AND_ASSIGN(RCIsReadyRequest);
};
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_capabilities_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_capabilities_request.h
index d636485915..4ddd6f25fc 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_capabilities_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_capabilities_request.h
@@ -61,10 +61,9 @@ class TTSGetCapabilitiesRequest : public app_mngr::commands::RequestToHMI {
**/
virtual ~TTSGetCapabilitiesRequest();
- /**
- * @brief Execute command
- **/
- virtual void Run();
+ void Run() OVERRIDE;
+
+ void onTimeOut() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(TTSGetCapabilitiesRequest);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_language_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_language_request.h
index 73ef8c5234..b00fc9cffa 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_language_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_language_request.h
@@ -61,10 +61,9 @@ class TTSGetLanguageRequest : public app_mngr::commands::RequestToHMI {
**/
virtual ~TTSGetLanguageRequest();
- /**
- * @brief Execute command
- **/
- virtual void Run();
+ void Run() OVERRIDE;
+
+ void onTimeOut() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(TTSGetLanguageRequest);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_supported_languages_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_supported_languages_request.h
index a24a6446b3..802a196c46 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_supported_languages_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_get_supported_languages_request.h
@@ -63,10 +63,9 @@ class TTSGetSupportedLanguagesRequest
**/
virtual ~TTSGetSupportedLanguagesRequest();
- /**
- * @brief Execute command
- **/
- virtual void Run();
+ void Run() OVERRIDE;
+
+ void onTimeOut() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(TTSGetSupportedLanguagesRequest);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_is_ready_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_is_ready_request.h
index dd360eeb4a..039df31972 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_is_ready_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_is_ready_request.h
@@ -35,6 +35,8 @@
#include "application_manager/commands/request_to_hmi.h"
+#include <set>
+
namespace sdl_rpc_plugin {
namespace app_mngr = application_manager;
@@ -77,11 +79,6 @@ class TTSIsReadyRequest : public app_mngr::commands::RequestToHMI,
*/
void onTimeOut() OVERRIDE;
- /**
- * @brief Send request to HMI for fetching of cappabilities
- */
- void SendMessageToHMI();
-
private:
DISALLOW_COPY_AND_ASSIGN(TTSIsReadyRequest);
};
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_set_global_properties_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_set_global_properties_request.h
index 009ee8f0be..2ac47ab013 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_set_global_properties_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/tts_set_global_properties_request.h
@@ -67,6 +67,8 @@ class TTSSetGlobalPropertiesRequest : public app_mngr::commands::RequestToHMI {
**/
virtual void Run();
+ void onTimeOut() OVERRIDE;
+
private:
DISALLOW_COPY_AND_ASSIGN(TTSSetGlobalPropertiesRequest);
};
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_command_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_command_request.h
index 2d1e84fbec..20e9004503 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_command_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_command_request.h
@@ -66,6 +66,8 @@ class UIAddCommandRequest : public app_mngr::commands::RequestToHMI {
**/
virtual void Run();
+ void onTimeOut() OVERRIDE;
+
private:
DISALLOW_COPY_AND_ASSIGN(UIAddCommandRequest);
};
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_submenu_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_submenu_request.h
index 0cd120b3cd..660c81c4f8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_submenu_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_add_submenu_request.h
@@ -66,6 +66,8 @@ class UIAddSubmenuRequest : public app_mngr::commands::RequestToHMI {
**/
virtual void Run();
+ void onTimeOut() OVERRIDE;
+
private:
DISALLOW_COPY_AND_ASSIGN(UIAddSubmenuRequest);
};
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_create_window_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_create_window_request.h
index 6fe8e182c4..baa181fb53 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_create_window_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_create_window_request.h
@@ -55,6 +55,8 @@ class UICreateWindowRequest : public app_mngr::commands::RequestToHMI {
void Run() FINAL;
+ void onTimeOut() FINAL;
+
private:
DISALLOW_COPY_AND_ASSIGN(UICreateWindowRequest);
};
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_capabilities_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_capabilities_request.h
index 58d8d0f732..32e878e733 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_capabilities_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_capabilities_request.h
@@ -61,10 +61,9 @@ class UIGetCapabilitiesRequest : public app_mngr::commands::RequestToHMI {
**/
virtual ~UIGetCapabilitiesRequest();
- /**
- * @brief Execute command
- **/
- virtual void Run();
+ void Run() OVERRIDE;
+
+ void onTimeOut() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(UIGetCapabilitiesRequest);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_language_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_language_request.h
index 842a97a717..d642beb341 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_language_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_language_request.h
@@ -61,10 +61,9 @@ class UIGetLanguageRequest : public app_mngr::commands::RequestToHMI {
**/
virtual ~UIGetLanguageRequest();
- /**
- * @brief Execute command
- **/
- virtual void Run();
+ void Run() OVERRIDE;
+
+ void onTimeOut() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(UIGetLanguageRequest);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_supported_languages_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_supported_languages_request.h
index 42ea555358..9c2492b9fe 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_supported_languages_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_get_supported_languages_request.h
@@ -62,10 +62,9 @@ class UIGetSupportedLanguagesRequest : public app_mngr::commands::RequestToHMI {
**/
virtual ~UIGetSupportedLanguagesRequest();
- /**
- * @brief Execute command
- **/
- virtual void Run();
+ void Run() OVERRIDE;
+
+ void onTimeOut() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(UIGetSupportedLanguagesRequest);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_is_ready_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_is_ready_request.h
index 18536032b7..5c7f6d4cc8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_is_ready_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_is_ready_request.h
@@ -35,6 +35,8 @@
#include "application_manager/commands/request_to_hmi.h"
+#include <set>
+
namespace sdl_rpc_plugin {
namespace app_mngr = application_manager;
@@ -75,12 +77,7 @@ class UIIsReadyRequest : public app_mngr::commands::RequestToHMI,
/**
* @brief onTimeOut from requrst Controller
*/
- virtual void onTimeOut() OVERRIDE;
-
- /**
- * @brief Send request to HMI for fetching of cappabilities
- */
- void SendMessageToHMI();
+ void onTimeOut() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(UIIsReadyRequest);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_global_properties_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_global_properties_request.h
index 8df60a318a..145f1d7c07 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_global_properties_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_set_global_properties_request.h
@@ -67,6 +67,8 @@ class UISetGlobalPropertiesRequest : public app_mngr::commands::RequestToHMI {
**/
virtual void Run();
+ void onTimeOut() OVERRIDE;
+
private:
DISALLOW_COPY_AND_ASSIGN(UISetGlobalPropertiesRequest);
};
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_subtle_alert_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_subtle_alert_request.h
new file mode 100644
index 0000000000..b6b232516d
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_subtle_alert_request.h
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SUBTLE_ALERT_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SUBTLE_ALERT_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+#include "sdl_rpc_plugin/sdl_rpc_plugin.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UISubtleAlertRequest command class
+ **/
+class UISubtleAlertRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UISubtleAlertRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UISubtleAlertRequest(const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief UISubtleAlertRequest class destructor
+ **/
+ ~UISubtleAlertRequest() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UISubtleAlertRequest);
+};
+
+} // namespace commands
+
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SUBTLE_ALERT_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_subtle_alert_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_subtle_alert_response.h
new file mode 100644
index 0000000000..c363677ab0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_subtle_alert_response.h
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SUBTLE_ALERT_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SUBTLE_ALERT_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+#include "sdl_rpc_plugin/sdl_rpc_plugin.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UISubtleAlertResponse command class
+ **/
+class UISubtleAlertResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UISubtleAlertResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UISubtleAlertResponse(const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief UISubtleAlertResponse class destructor
+ **/
+ ~UISubtleAlertResponse() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UISubtleAlertResponse);
+};
+
+} // namespace commands
+
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SUBTLE_ALERT_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_add_command_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_add_command_request.h
index b40245256e..ba4c49ab01 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_add_command_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_add_command_request.h
@@ -66,6 +66,8 @@ class VRAddCommandRequest : public app_mngr::commands::RequestToHMI {
**/
virtual void Run();
+ void onTimeOut() OVERRIDE;
+
private:
DISALLOW_COPY_AND_ASSIGN(VRAddCommandRequest);
};
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_capabilities_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_capabilities_request.h
index 254d00452f..7f8485ffa0 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_capabilities_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_capabilities_request.h
@@ -61,10 +61,9 @@ class VRGetCapabilitiesRequest : public app_mngr::commands::RequestToHMI {
**/
virtual ~VRGetCapabilitiesRequest();
- /**
- * @brief Execute command
- **/
- virtual void Run();
+ void Run() OVERRIDE;
+
+ void onTimeOut() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(VRGetCapabilitiesRequest);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_language_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_language_request.h
index 441795cfb5..abcaa35726 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_language_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_language_request.h
@@ -61,10 +61,9 @@ class VRGetLanguageRequest : public app_mngr::commands::RequestToHMI {
**/
virtual ~VRGetLanguageRequest();
- /**
- * @brief Execute command
- **/
- virtual void Run();
+ void Run() OVERRIDE;
+
+ void onTimeOut() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(VRGetLanguageRequest);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_supported_languages_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_supported_languages_request.h
index ad87415a87..fb6d05b0aa 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_supported_languages_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_get_supported_languages_request.h
@@ -62,10 +62,9 @@ class VRGetSupportedLanguagesRequest : public app_mngr::commands::RequestToHMI {
**/
virtual ~VRGetSupportedLanguagesRequest();
- /**
- * @brief Execute command
- **/
- virtual void Run();
+ void Run() OVERRIDE;
+
+ void onTimeOut() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(VRGetSupportedLanguagesRequest);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_is_ready_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_is_ready_request.h
index 2dba80065a..cbd77087b2 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_is_ready_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/vr_is_ready_request.h
@@ -34,7 +34,8 @@
#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_VR_IS_READY_REQUEST_H_
#include "application_manager/commands/request_to_hmi.h"
-#include "application_manager/message_helper.h"
+
+#include <set>
namespace sdl_rpc_plugin {
namespace app_mngr = application_manager;
@@ -78,11 +79,6 @@ class VRIsReadyRequest : public app_mngr::commands::RequestToHMI,
*/
void onTimeOut() OVERRIDE;
- /**
- * @brief Send request to HMI for fetching of cappabilities
- */
- void SendMessageToHMI();
-
private:
DISALLOW_COPY_AND_ASSIGN(VRIsReadyRequest);
};
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_request.h
index dfc7b73487..2250d7a8de 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/alert_request.h
@@ -123,7 +123,7 @@ class AlertRequest : public app_mngr::commands::CommandRequestImpl {
*
* @return TRUE on success, otherwise FALSE
*/
- bool CheckStringsOfAlertRequest();
+ bool CheckStrings();
/*
* @brief Prepare result code and result for sending to mobile application
@@ -137,7 +137,6 @@ class AlertRequest : public app_mngr::commands::CommandRequestImpl {
bool awaiting_ui_alert_response_;
bool awaiting_tts_speak_response_;
bool awaiting_tts_stop_speaking_response_;
- bool is_alert_succeeded_;
bool is_ui_alert_sent_;
hmi_apis::Common_Result::eType alert_result_;
smart_objects::SmartObject alert_response_params_;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_sub_menu_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_sub_menu_request.h
index 2f85065ee7..af2ba4a1ea 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_sub_menu_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/delete_sub_menu_request.h
@@ -83,22 +83,33 @@ class DeleteSubMenuRequest : public app_mngr::commands::CommandRequestImpl {
private:
/*
- * @brief Deletes VR commands from SDL for corresponding submenu ID
+ * @brief Deletes submenus that have a parentID that matches the parentID
+ * parameter
*
* @param app_id Application ID
+ * @param parentID Parent ID of a nested submenu
+ */
+ void DeleteNestedSubMenus(app_mngr::ApplicationSharedPtr const app,
+ uint32_t parentID,
+ const app_mngr::SubMenuMap& subMenus);
+
+ /*
+ * @brief Deletes VR commands from SDL for corresponding submenu ID
*
- * @return TRUE on success, otherwise FALSE
+ * @param app_id Application ID
+ * @param parentID Parent ID of a nested submenu
*/
- void DeleteSubMenuVRCommands(app_mngr::ApplicationConstSharedPtr app);
+ void DeleteSubMenuVRCommands(app_mngr::ApplicationConstSharedPtr app,
+ uint32_t parentID);
/*
* @brief Deletes UI commands from SDL for corresponding submenu ID
*
* @param app_id Application ID
- *
- * @return TRUE on success, otherwise FALSE
+ * @param parentID Parent ID of a nested submenu
*/
- void DeleteSubMenuUICommands(app_mngr::ApplicationSharedPtr const app);
+ void DeleteSubMenuUICommands(app_mngr::ApplicationSharedPtr const app,
+ uint32_t parentID);
DISALLOW_COPY_AND_ASSIGN(DeleteSubMenuRequest);
};
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_app_interface_unregistered_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_app_interface_unregistered_notification.h
index 28508d386c..3f61631948 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_app_interface_unregistered_notification.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_app_interface_unregistered_notification.h
@@ -71,6 +71,12 @@ class OnAppInterfaceUnregisteredNotification
virtual void Run();
private:
+ /**
+ * @brief Check whether a connection to mobile must be closed after sending
+ * this message
+ **/
+ bool IsFinalMessage() const;
+
DISALLOW_COPY_AND_ASSIGN(OnAppInterfaceUnregisteredNotification);
};
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_subtle_alert_pressed_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_subtle_alert_pressed_notification.h
new file mode 100644
index 0000000000..68789438b8
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_subtle_alert_pressed_notification.h
@@ -0,0 +1,80 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_SUBTLE_ALERT_PRESSED_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_SUBTLE_ALERT_PRESSED_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "sdl_rpc_plugin/sdl_rpc_plugin.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnSubtleAlertPressedNotification command class
+ **/
+class OnSubtleAlertPressedNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnSubtleAlertPressedNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnSubtleAlertPressedNotification(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief OnSubtleAlertPressedNotification class destructor
+ **/
+ ~OnSubtleAlertPressedNotification() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnSubtleAlertPressedNotification);
+};
+
+} // namespace commands
+
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_SUBTLE_ALERT_PRESSED_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_update_file_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_update_file_notification.h
new file mode 100644
index 0000000000..8fc4d79b05
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_update_file_notification.h
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_UPDATE_FILE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_UPDATE_FILE_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnUpdateFileNotification command class
+ **/
+class OnUpdateFileNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnUpdateFileNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnUpdateFileNotification(const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief OnUpdateFileNotification class destructor
+ **/
+ virtual ~OnUpdateFileNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnUpdateFileNotification);
+};
+
+} // namespace commands
+
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_RPC_PLUGIN_INCLUDE_APP_SERVICE_RPC_PLUGIN_COMMANDS_MOBILE_ON_UPDATE_FILE_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_update_sub_menu_notification.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_update_sub_menu_notification.h
new file mode 100644
index 0000000000..ae6e5632fc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_update_sub_menu_notification.h
@@ -0,0 +1,79 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_UPDATE_SUB_MENU_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_ON_UPDATE_SUB_MENU_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief OnUpdateSubMenuNotification command class
+ **/
+class OnUpdateSubMenuNotification
+ : public app_mngr::commands::CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnUpdateSubMenuNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ OnUpdateSubMenuNotification(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief OnUpdateSubMenuNotification class destructor
+ **/
+ virtual ~OnUpdateSubMenuNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnUpdateSubMenuNotification);
+};
+
+} // namespace commands
+
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_RPC_PLUGIN_INCLUDE_APP_SERVICE_RPC_PLUGIN_COMMANDS_MOBILE_ON_UPDATE_SUB_MENU_NOTIFICATION_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_request.h
index d59964bbc7..fae8f5eeb7 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_request.h
@@ -71,17 +71,19 @@ class RegisterAppInterfaceRequest
/**
* @brief RegisterAppInterfaceRequest class destructor
**/
- virtual ~RegisterAppInterfaceRequest();
+ ~RegisterAppInterfaceRequest();
/**
* @brief Init required by command resources
**/
- virtual bool Init();
+ bool Init() FINAL;
/**
* @brief Execute command
**/
- virtual void Run();
+ void Run() FINAL;
+
+ uint32_t default_timeout() const FINAL;
private:
/**
@@ -98,11 +100,13 @@ class RegisterAppInterfaceRequest
* @brief Prepares and sends RegisterAppInterface response to mobile
* considering application type
* @param app_type Type of application
+ * @param status_notifier pointer to status notifier callback function
+ * @param add_info - additional information to be sent to mobile app
**/
- void SendRegisterAppInterfaceResponseToMobile(ApplicationType app_type);
-
- smart_objects::SmartObjectSPtr GetLockScreenIconUrlNotification(
- const uint32_t connection_key, app_mngr::ApplicationSharedPtr app);
+ void SendRegisterAppInterfaceResponseToMobile(
+ ApplicationType app_type,
+ policy::StatusNotifier status_notifier,
+ const std::string& add_info);
/**
* @brief SendChangeRegistration send ChangeRegistration on HMI
@@ -127,13 +131,9 @@ class RegisterAppInterfaceRequest
* @param app application with changed HMI status
* @param resumption If true, resumption-related parameters will be sent to
* the HMI
- * @param need_restore_vr If resumption is true, whether or not VR commands
- *should be resumed
**/
void SendOnAppRegisteredNotificationToHMI(
- app_mngr::ApplicationConstSharedPtr app,
- bool resumption = false,
- bool need_restore_vr = false);
+ app_mngr::ApplicationConstSharedPtr app, bool resumption);
/**
* @brief Check new ID along with known mobile application ID
@@ -236,9 +236,86 @@ class RegisterAppInterfaceRequest
connection_handler::DeviceHandle* device_id = nullptr,
std::string* mac_address = nullptr) const;
- private:
+ /**
+ * @brief Processes AppHMITypes in the received message from mobile and in the
+ * policy table
+ * @param message A message from mobile that could contain AppHMIType
+ * collection
+ * @param app_hmi_types_in_policy AppHMITypes that describes in the policy
+ * table for the app that sent the message
+ * @return Result of processing
+ */
+ mobile_apis::Result::eType ProcessingAppHMITypesPolicies(
+ smart_objects::SmartObject& message,
+ policy::StringArray& app_hmi_types_in_policy);
+
+ /**
+ * @brief Processes AppHMITypes in the received message
+ * @param message A message received from the mobile
+ * @param info Info in a string representation that should be added to the
+ * response info
+ * @param log A log in a string represenation that could contain the
+ * AppHMITypes that are absent in the policy table.
+ */
+ mobile_apis::Result::eType ProcessingAppHMITypesInMessage(
+ const smart_objects::SmartObject& message);
+
+ /**
+ * @brief WaitForHMIIsReady blocking function. Waits for HMI be ready for
+ * requests processing
+ */
+ void WaitForHMIIsReady();
+
+ /**
+ * @brief FillApplicationParams set app application attributes from the RAI
+ * request
+ * @param application applicaiton to fill params
+ */
+ void FillApplicationParams(
+ application_manager::ApplicationSharedPtr application);
+
+ /**
+ * @brief SetupAppDeviceInfo add applicaiton device information to policies
+ * @param application applicaiton to process
+ */
+ void SetupAppDeviceInfo(
+ application_manager::ApplicationSharedPtr application);
+
+ /**
+ * @brief ApplicationDataShouldBeResumed check if application data should be
+ * resumed
+ * @return true if app data should be resumed, otherwise returns false
+ */
+ bool ApplicationDataShouldBeResumed(std::string& add_info);
+
+ /**
+ * @brief CalculateFinalResultCode calculates the final result code
+ * considering all previous conditions
+ * @return calculated result code
+ */
+ mobile_apis::Result::eType CalculateFinalResultCode() const;
+
+ /**
+ * @brief AddApplicationDataToPolicy adds specified application to policy
+ * database and returns a callback with extra actions to be done if required
+ * @param application pointer to application to add
+ * @return callback with extra actions after adding specified application
+ */
+ policy::StatusNotifier AddApplicationDataToPolicy(
+ application_manager::ApplicationSharedPtr application);
+
+ /**
+ * @brief CheckLanguage check if language in RAI matches hmi_capabilities
+ * Setup result_code variable in case of does not match
+ */
+ void CheckLanguage();
+
std::string response_info_;
- mobile_apis::Result::eType result_code_;
+ bool are_tts_chunks_invalid_;
+ bool are_hmi_types_invalid_;
+ bool is_resumption_failed_;
+ bool is_wrong_language_;
+
connection_handler::DeviceHandle device_handle_;
std::string device_id_;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/reset_global_properties_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/reset_global_properties_request.h
index 880fced6ba..7475520889 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/reset_global_properties_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/reset_global_properties_request.h
@@ -85,40 +85,6 @@ class ResetGlobalPropertiesRequest
private:
/*
- * @brief Sets default value of the HELPPROMT global property
- * to the first vrCommand of each Command Menu registered in application
- *
- * @param app Registered application
- * @param is_timeout_promp Flag indicating that timeout prompt
- * should be reset
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool ResetHelpPromt(app_mngr::ApplicationSharedPtr app);
-
- /*
- * @brief Sets default value of the TIMEOUTPROMT global property
- * to the first vrCommand of each Command Menu registered in application
- *
- * @param app Registered application
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool ResetTimeoutPromt(application_manager::ApplicationSharedPtr const app);
-
- /*
- * @brief Sets default value of the VRHELPTITLE global property
- * to the application name and value of the VRHELPITEMS global property
- * to value equal to registered command -1(default command “Help / Cancel”.)
- *
- * @param app Registered application
- *
- * @return TRUE on success, otherwise FALSE
- */
- bool ResetVrHelpTitleItems(
- application_manager::ApplicationSharedPtr const app);
-
- /*
* @brief Prepare result for sending to mobile application
* @param out_result_code contains result code for sending to mobile
* application
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_global_properties_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_global_properties_request.h
index 3a32d1b671..190cb07459 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_global_properties_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/set_global_properties_request.h
@@ -82,6 +82,8 @@ class SetGlobalPropertiesRequest
*/
bool Init() FINAL;
+ void onTimeOut() OVERRIDE;
+
/**
* @brief Prepares total result for mobile according to three results:
* ui_properties_result, tts_properties_result, rc_properties_result.
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subtle_alert_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subtle_alert_request.h
new file mode 100644
index 0000000000..4789d35e60
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subtle_alert_request.h
@@ -0,0 +1,152 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBTLE_ALERT_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBTLE_ALERT_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+#include "sdl_rpc_plugin/sdl_rpc_plugin.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SubtleAlertRequest command class
+ **/
+class SubtleAlertRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief SubtleAlertRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SubtleAlertRequest(const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief SubtleAlertRequest class destructor
+ **/
+ virtual ~SubtleAlertRequest();
+
+ /**
+ * @brief Initialize request params
+ **/
+ virtual bool Init();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ /**
+ * @brief Interface method that is called whenever new event received
+ *
+ * @param event The received event
+ */
+ void on_event(const app_mngr::event_engine::Event& event);
+
+ protected:
+ private:
+ /*
+ * @brief Checks if request parameters are valid
+ * @param app_id Id of application requested this RPC
+ * @returns true if request is valid and should be processed
+ */
+ bool Validate(uint32_t app_id);
+
+ /*
+ * @brief Sends UI SubtleAlert request
+ *
+ * @param app_id Id of application requested this RPC
+ */
+ void SendSubtleAlertRequest(int32_t app_id);
+
+ /*
+ * @brief Sends TTS Speak request
+ *
+ * @param app_id Id of application requested this RPC
+ *
+ * @param tts_chunks_exists if tts chunks exists in
+ * message contains true, otherwise contains false
+ *
+ * @param length_tts_chunks contains length of array
+ * tts chunks.
+ */
+ void SendSpeakRequest(int32_t app_id,
+ bool tts_chunks_exists,
+ size_t length_tts_chunks);
+
+ /*
+ * @brief Tells if there are sent requests without responses
+ */
+ bool HasHmiResponsesToWait();
+
+ /*
+ * @brief Check if all strings have valid syntax in request
+ *
+ * @return TRUE on success, otherwise FALSE
+ */
+ bool CheckStrings();
+
+ /*
+ * @brief Prepare result code and result for sending to mobile application
+ * @param result_code contains result code for sending to mobile application
+ * @param info contains info for mobile app.
+ * @return result for sending to mobile application.
+ */
+ bool PrepareResponseParameters(mobile_apis::Result::eType& result_code,
+ std::string& info);
+
+ bool awaiting_ui_subtle_alert_response_;
+ bool awaiting_tts_speak_response_;
+ bool awaiting_tts_stop_speaking_response_;
+ bool is_ui_subtle_alert_sent_;
+ bool is_tts_stop_speaking_sent_;
+ hmi_apis::Common_Result::eType subtle_alert_result_;
+ smart_objects::SmartObject subtle_alert_response_params_;
+ hmi_apis::Common_Result::eType tts_speak_result_;
+ std::string ui_response_info_;
+ std::string tts_response_info_;
+
+ DISALLOW_COPY_AND_ASSIGN(SubtleAlertRequest);
+};
+
+} // namespace commands
+
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBTLE_ALERT_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subtle_alert_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subtle_alert_response.h
new file mode 100644
index 0000000000..c9be00dd37
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subtle_alert_response.h
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBTLE_ALERT_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBTLE_ALERT_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "sdl_rpc_plugin/sdl_rpc_plugin.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief SubtleAlertResponse command class
+ **/
+class SubtleAlertResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief SubtleAlertResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SubtleAlertResponse(const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief SubtleAlertResponse class destructor
+ **/
+ ~SubtleAlertResponse() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SubtleAlertResponse);
+};
+
+} // namespace commands
+
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SUBTLE_ALERT_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/extensions/system_capability_app_extension.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/extensions/system_capability_app_extension.h
index 935716aa30..09fbc565c5 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/extensions/system_capability_app_extension.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/extensions/system_capability_app_extension.h
@@ -62,11 +62,12 @@ class SystemCapabilityAppExtension : public app_mngr_::AppExtension {
SystemCapabilitySubscriptions Subscriptions();
- void SaveResumptionData(ns_smart_device_link::ns_smart_objects::SmartObject&
- resumption_data) OVERRIDE;
+ void SaveResumptionData(smart_objects::SmartObject& resumption_data) OVERRIDE;
- void ProcessResumption(
- const smart_objects::SmartObject& resumption_data) OVERRIDE;
+ void ProcessResumption(const smart_objects::SmartObject& saved_app) OVERRIDE;
+
+ void RevertResumption(
+ const smart_objects::SmartObject& subscriptions) OVERRIDE;
static const app_mngr_::AppExtensionUID SystemCapabilityAppExtensionUID;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/sdl_rpc_plugin.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/sdl_rpc_plugin.h
index 9c770279ab..b4ef7e6aed 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/sdl_rpc_plugin.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/sdl_rpc_plugin.h
@@ -34,16 +34,20 @@
#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_SDL_RPC_PLUGIN_H
#include "application_manager/command_factory.h"
#include "application_manager/plugin_manager/rpc_plugin.h"
+#include "application_manager/resumption/pending_resumption_handler.h"
+#include "utils/ilogger.h"
namespace sdl_rpc_plugin {
namespace app_mngr = application_manager;
namespace plugins = application_manager::plugin_manager;
class SystemCapabilityAppExtension;
+class WayPointsAppExtension;
class SDLRPCPlugin : public plugins::RPCPlugin {
// RPCPlugin interface
public:
+ SDLRPCPlugin();
bool Init(app_mngr::ApplicationManager& app_manager,
app_mngr::rpc_service::RPCService& rpc_service,
app_mngr::HMICapabilities& hmi_capabilities,
@@ -57,6 +61,28 @@ class SDLRPCPlugin : public plugins::RPCPlugin {
policy::PolicyHandlerInterface& policy_handler,
resumption::LastState& last_state) OVERRIDE;
+ /**
+ * @brief ProcessResumptionSubscription send appropriate subscribe requests
+ * to HMI
+ * @param app application for subscription
+ * @param ext application extension
+ */
+ void ProcessResumptionSubscription(application_manager::Application& app,
+ WayPointsAppExtension& ext);
+
+ /**
+ * @brief Revert the data to the state before Resumption.
+ * @param app Application owning resumption data
+ **/
+ void RevertResumption(application_manager::Application& app);
+
+ /**
+ * @brief SaveResumptionData saves subscription data
+ * @param resumption_data plase to store resumption data
+ */
+ void SaveResumptionData(application_manager::Application& app,
+ smart_objects::SmartObject& resumption_data);
+
bool IsAbleToProcess(
const int32_t function_id,
const app_mngr::commands::Command::CommandSource message_source) OVERRIDE;
@@ -71,9 +97,14 @@ class SDLRPCPlugin : public plugins::RPCPlugin {
void ClearSubscriptions(app_mngr::ApplicationSharedPtr app);
std::unique_ptr<application_manager::CommandFactory> command_factory_;
+ application_manager::ApplicationManager* application_manager_;
+ using PendingResumptionHandlerSPtr =
+ std::shared_ptr<resumption::PendingResumptionHandler>;
+ PendingResumptionHandlerSPtr pending_resumption_handler_;
};
} // namespace sdl_rpc_plugin
-extern "C" application_manager::plugin_manager::RPCPlugin* Create();
+extern "C" application_manager::plugin_manager::RPCPlugin* Create(
+ logger::Logger* logger_instances);
extern "C" void Delete(application_manager::plugin_manager::RPCPlugin* data);
#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_SDL_RPC_PLUGIN_H
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/waypoints_app_extension.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/waypoints_app_extension.h
new file mode 100644
index 0000000000..9243baedee
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/waypoints_app_extension.h
@@ -0,0 +1,69 @@
+/*
+ Copyright (c) 2020, Ford Motor Company
+ All rights reserved.
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_WAYPOINTS_APP_EXTENSION_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_WAYPOINTS_APP_EXTENSION_H
+
+#include <application_manager/application_manager.h>
+
+namespace sdl_rpc_plugin {
+class SDLRPCPlugin;
+
+namespace app_mngr = application_manager;
+
+/**
+ * @brief Intended to handle subscriptions on way points
+ */
+class WayPointsAppExtension : public app_mngr::AppExtension {
+ public:
+ /**
+ * @brief WayPointsAppExtension constructor
+ * @param plugin sdl info plugin
+ * @param app application that contains this plugin
+ */
+ WayPointsAppExtension(SDLRPCPlugin& plugin, app_mngr::Application& app);
+ virtual ~WayPointsAppExtension();
+
+ void SaveResumptionData(smart_objects::SmartObject& resumption_data) OVERRIDE;
+
+ void ProcessResumption(const smart_objects::SmartObject& saved_app) OVERRIDE;
+
+ void RevertResumption(
+ const smart_objects::SmartObject& resumption_data) OVERRIDE;
+
+ /**
+ * @brief WayPointsAppExtensionUID unique identifier of waypoints
+ * aplication extension
+ */
+ static unsigned WayPointsAppExtensionUID;
+
+ private:
+ SDLRPCPlugin& plugin_;
+ app_mngr::Application& app_;
+};
+} // namespace sdl_rpc_plugin
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_WAYPOINTS_APP_EXTENSION_H
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/waypoints_pending_resumption_handler.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/waypoints_pending_resumption_handler.h
new file mode 100644
index 0000000000..871359bc9a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/waypoints_pending_resumption_handler.h
@@ -0,0 +1,108 @@
+/*
+ Copyright (c) 2020, Ford Motor Company
+ All rights reserved.
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_SDL_PENDING_RESUMPTION_HANDLER_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_SDL_PENDING_RESUMPTION_HANDLER_H_
+
+#include <map>
+#include <queue>
+#include <vector>
+#include "application_manager/event_engine/event_observer.h"
+#include "application_manager/resumption/pending_resumption_handler.h"
+#include "application_manager/resumption/resumption_data_processor.h"
+#include "sdl_rpc_plugin/waypoints_app_extension.h"
+
+namespace sdl_rpc_plugin {
+
+namespace app_mngr = application_manager;
+
+class WayPointsPendingResumptionHandler
+ : public resumption::PendingResumptionHandler {
+ public:
+ WayPointsPendingResumptionHandler(
+ app_mngr::ApplicationManager& application_manager);
+
+ // EventObserver interface
+ void on_event(const app_mngr::event_engine::Event& event) OVERRIDE;
+
+ void HandleResumptionSubscriptionRequest(
+ app_mngr::AppExtension& extension,
+ application_manager::Application& app) OVERRIDE;
+
+ void OnResumptionRevert() OVERRIDE;
+
+ private:
+ /**
+ * @brief RaiseFakeSuccessfulResponse raise event for the subscriber that
+ * contains emulated successful response from HMI. To avoid double
+ * subscription WayPointsPendingResumptionHandler freezes sending requests to
+ * HMI. But resumption_data_processor().SubscribeOnResponse() need to be
+ * called to provide information that some data need to be resumed. So if
+ * pending request exists, SDL creates preliminary requests to HMI, subscribe
+ * the subscriber to this request but do not send it to HMI. It freezes this
+ * requests to process the one by one when a response to the current request
+ * will be received. When SDL receives a response from HMI it may satisfy some
+ * frozen requests. If it does SDL will create fake successful HMI
+ * response and raise event. So that subscriber::on_event will be called with
+ * an appropriate response to the request that SDL was not sent to HMI.
+ * @param corr_id correlation id of next pending request
+ */
+ void RaiseFakeSuccessfulResponse(const int32_t corr_id);
+ smart_objects::SmartObjectSPtr CreateSubscriptionRequest();
+
+ /**
+ * @brief ProcessNextPendingResumption is responsible for processing of next
+ * pending request. If any application is already subscribed to waypoints,
+ * this method ensures that current application will be subscribed to
+ * waypoints too or send request to HMI otherwise
+ */
+ void ProcessNextPendingResumption();
+
+ struct PendingRequest {
+ explicit PendingRequest(const uint32_t app_id, const uint32_t corr_id)
+ : app_id_(app_id)
+ , corr_id_(corr_id)
+ , waiting_for_hmi_response_(false) {}
+ uint32_t app_id_;
+ uint32_t corr_id_;
+ bool waiting_for_hmi_response_;
+ };
+
+ /**
+ * @brief SendPendingHMIRequest is responsible for creating and sending of
+ * next pending request to HMI. Also here this request is marked as waiting
+ * for response.
+ * @param pending_request Next pending request
+ */
+ void SendPendingHMIRequest(PendingRequest& pending_request);
+
+ std::deque<PendingRequest> pending_requests_;
+ sync_primitives::RecursiveLock pending_resumption_lock_;
+};
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_SDL_PENDING_RESUMPTION_HANDLER_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_request.cc
index c6d181bf57..35fb2204ac 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_request.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ActivateAppRequest::ActivateAppRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +54,11 @@ ActivateAppRequest::ActivateAppRequest(
policy_handle) {}
ActivateAppRequest::~ActivateAppRequest() {
- LOG4CXX_TRACE(logger_, "~ActivateAppRequest");
+ SDL_LOG_TRACE("~ActivateAppRequest");
}
void ActivateAppRequest::Run() {
- LOG4CXX_TRACE(logger_, "enter " << correlation_id());
+ SDL_LOG_TRACE("enter " << correlation_id());
uint32_t app_id = RequestToHMI::application_id();
application_manager_.set_application_id(correlation_id(), app_id);
#ifdef ENABLE_LOG
@@ -66,11 +68,11 @@ void ActivateAppRequest::Run() {
static_cast<mobile_apis::HMILevel::eType>(
(*message_)[strings::msg_params][strings::activate_app_hmi_level]
.asInt());
- LOG4CXX_TRACE(logger_, "requested_hmi_level = " << requested_hmi_level);
+ SDL_LOG_TRACE("requested_hmi_level = " << requested_hmi_level);
}
#endif
SendRequest();
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_response.cc
index b829ef711e..9615f83170 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/activate_app_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ActivateAppResponse::ActivateAppResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,12 +55,12 @@ ActivateAppResponse::ActivateAppResponse(
ActivateAppResponse::~ActivateAppResponse() {}
void ActivateAppResponse::Run() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
event_engine::Event event(
hmi_apis::FunctionID::BasicCommunication_ActivateApp);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/add_statistics_info_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/add_statistics_info_notification.cc
index 93999f704d..8ddad0945c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/add_statistics_info_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/add_statistics_info_notification.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
AddStatisticsInfoNotification::AddStatisticsInfoNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ AddStatisticsInfoNotification::AddStatisticsInfoNotification(
AddStatisticsInfoNotification::~AddStatisticsInfoNotification() {}
void AddStatisticsInfoNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
int type = (*message_)[strings::msg_params][hmi_notification::statistic_type]
.asInt();
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_request.cc
index 68c7896a7f..fdb2f454d5 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
AllowAllAppsRequest::AllowAllAppsRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ AllowAllAppsRequest::AllowAllAppsRequest(
AllowAllAppsRequest::~AllowAllAppsRequest() {}
void AllowAllAppsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_response.cc
index c2182f4853..be049aaea2 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_all_apps_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
AllowAllAppsResponse::AllowAllAppsResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ AllowAllAppsResponse::AllowAllAppsResponse(
AllowAllAppsResponse::~AllowAllAppsResponse() {}
void AllowAllAppsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
application_manager_.SetAllAppsAllowed(
(*message_)[strings::msg_params][hmi_response::allowed].asBool());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_request.cc
index 6b5af76fb1..32fb35b344 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
AllowAppRequest::AllowAppRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ AllowAppRequest::AllowAppRequest(
AllowAppRequest::~AllowAppRequest() {}
void AllowAppRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_response.cc
index c62645c6c0..458b7097e3 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/allow_app_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
AllowAppResponse::AllowAppResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ AllowAppResponse::AllowAppResponse(
AllowAppResponse::~AllowAppResponse() {}
void AllowAppResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t connection_key =
(*message_)[strings::params][strings::connection_key].asInt();
@@ -61,7 +63,7 @@ void AllowAppResponse::Run() {
ApplicationSharedPtr app = application_manager_.application(connection_key);
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return;
}
app->set_app_allowed(
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_request.cc
index b021faefd8..f87f103b0f 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_request.cc
@@ -36,6 +36,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
BasicCommunicationCloseApplicationRequest::
BasicCommunicationCloseApplicationRequest(
const application_manager::commands::MessageSharedPtr& message,
@@ -53,7 +55,7 @@ BasicCommunicationCloseApplicationRequest::
~BasicCommunicationCloseApplicationRequest() {}
void BasicCommunicationCloseApplicationRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_response.cc
index 2e56271cf2..74df410213 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_close_application_response.cc
@@ -36,6 +36,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
BasicCommunicationCloseApplicationResponse::
BasicCommunicationCloseApplicationResponse(
const application_manager::commands::MessageSharedPtr& message,
@@ -53,7 +55,7 @@ BasicCommunicationCloseApplicationResponse::
~BasicCommunicationCloseApplicationResponse() {}
void BasicCommunicationCloseApplicationResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(
hmi_apis::FunctionID::BasicCommunication_CloseApplication);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_request.cc
index 19c9fa91d8..a6e95f9f72 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
BasicCommunicationGetSystemTimeRequest::BasicCommunicationGetSystemTimeRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -50,7 +52,7 @@ BasicCommunicationGetSystemTimeRequest::BasicCommunicationGetSystemTimeRequest(
policy_handler) {}
void BasicCommunicationGetSystemTimeRequest::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
application_manager_.protocol_handler().NotifyOnGetSystemTimeFailed();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_response.cc
index e26753b3f2..1376376bb8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_get_system_time_response.cc
@@ -33,7 +33,7 @@
#include "sdl_rpc_plugin/commands/hmi/basic_communication_get_system_time_response.h"
#include "utils/logger.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "Commands")
+SDL_CREATE_LOG_VARIABLE("Commands")
namespace sdl_rpc_plugin {
using namespace application_manager;
@@ -53,7 +53,7 @@ BasicCommunicationGetSystemTimeResponse::
policy_handler) {}
void BasicCommunicationGetSystemTimeResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(
hmi_apis::FunctionID::BasicCommunication_GetSystemTime);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_on_awake_sdl.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_on_awake_sdl.cc
index 361dc5fea6..52f8c4329f 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_on_awake_sdl.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_on_awake_sdl.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnAwakeSDLNotification::OnAwakeSDLNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ OnAwakeSDLNotification::OnAwakeSDLNotification(
OnAwakeSDLNotification::~OnAwakeSDLNotification() {}
void OnAwakeSDLNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!application_manager_.resume_controller().is_suspended()) {
return;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_request.cc
index 052a40a888..62c4a0ff3d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
BasicCommunicationSystemRequest::BasicCommunicationSystemRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ BasicCommunicationSystemRequest::BasicCommunicationSystemRequest(
BasicCommunicationSystemRequest::~BasicCommunicationSystemRequest() {}
void BasicCommunicationSystemRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_response.cc
index 0b052de88d..06b31cb73d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/basic_communication_system_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
BasicCommunicationSystemResponse::BasicCommunicationSystemResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ BasicCommunicationSystemResponse::BasicCommunicationSystemResponse(
BasicCommunicationSystemResponse::~BasicCommunicationSystemResponse() {}
void BasicCommunicationSystemResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(
hmi_apis::FunctionID::BasicCommunication_SystemRequest);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_request.cc
index 0dafa21e33..fddcc50a16 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_request.cc
@@ -39,6 +39,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
BCGetAppPropertiesRequest::BCGetAppPropertiesRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,15 +56,14 @@ BCGetAppPropertiesRequest::BCGetAppPropertiesRequest(
void BCGetAppPropertiesRequest::FillAppProperties(
const std::string& policy_app_id,
smart_objects::SmartObject& out_properties) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
policy::AppProperties app_properties;
const bool result =
policy_handler_.GetAppProperties(policy_app_id, app_properties);
if (!result) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Failed to get app parameters for policy_app_id: " << policy_app_id);
return;
}
@@ -98,7 +99,7 @@ void BCGetAppPropertiesRequest::FillAppProperties(
}
void BCGetAppPropertiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& msg_params = (*message_)[strings::msg_params];
smart_objects::SmartObject response_params(smart_objects::SmartType_Map);
@@ -111,9 +112,9 @@ void BCGetAppPropertiesRequest::Run() {
response_params[strings::properties][0] = properties;
}
} else {
- LOG4CXX_DEBUG(logger_,
- "policyAppID was absent in request, all apps properties "
- "will be returned.");
+ SDL_LOG_DEBUG(
+ "policyAppID was absent in request, all apps properties "
+ "will be returned.");
const auto app_ids = policy_handler_.GetApplicationPolicyIDs();
int i = 0;
for (auto& app_id : app_ids) {
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_response.cc
index 57949a949b..006cc536bf 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_app_properties_response.cc
@@ -40,6 +40,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
BCGetAppPropertiesResponse::BCGetAppPropertiesResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ BCGetAppPropertiesResponse::BCGetAppPropertiesResponse(
policy_handler) {}
void BCGetAppPropertiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToHMI(message_);
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_request.cc
index b735cd9bdf..a8a47d1fef 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_request.cc
@@ -39,6 +39,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
BCGetFilePathRequest::BCGetFilePathRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ BCGetFilePathRequest::BCGetFilePathRequest(
BCGetFilePathRequest::~BCGetFilePathRequest() {}
void BCGetFilePathRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_response.cc
index 58cda68a2b..f9d3fbe953 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_get_file_path_response.cc
@@ -40,6 +40,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
BCGetFilePathResponse::BCGetFilePathResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ BCGetFilePathResponse::BCGetFilePathResponse(
BCGetFilePathResponse::~BCGetFilePathResponse() {}
void BCGetFilePathResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
application_manager::event_engine::Event event(
hmi_apis::FunctionID::BasicCommunication_GetFilePath);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_request.cc
index a4c5d6b1b4..dd5ea3bb85 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_request.cc
@@ -40,6 +40,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
BCSetAppPropertiesRequest::BCSetAppPropertiesRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ BCSetAppPropertiesRequest::BCSetAppPropertiesRequest(
policy_handler) {}
void BCSetAppPropertiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& properties =
(*message_)[strings::msg_params][strings::properties];
@@ -81,9 +83,8 @@ void BCSetAppPropertiesRequest::Run() {
application_manager_.GetRPCService().ManageHMICommand(notification);
}
if (is_new_app) {
- LOG4CXX_ERROR(logger_,
- "Message contains unknow policyAppId: "
- << policy_app_id << ", PTU will be triggered");
+ SDL_LOG_ERROR("Message contains unknow policyAppId: "
+ << policy_app_id << ", PTU will be triggered");
policy_handler_.OnLocalAppAdded();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_response.cc
index 928a17d0f8..a99e3d6a3e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/bc_set_app_properties_response.cc
@@ -41,6 +41,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
BCSetAppPropertiesResponse::BCSetAppPropertiesResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ BCSetAppPropertiesResponse::BCSetAppPropertiesResponse(
policy_handler) {}
void BCSetAppPropertiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToHMI(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_request.cc
index 6696689174..d9c7901c67 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_request.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ButtonGetCapabilitiesRequest::ButtonGetCapabilitiesRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,11 +55,17 @@ ButtonGetCapabilitiesRequest::ButtonGetCapabilitiesRequest(
ButtonGetCapabilitiesRequest::~ButtonGetCapabilitiesRequest() {}
void ButtonGetCapabilitiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void ButtonGetCapabilitiesRequest::onTimeOut() {
+ SDL_LOG_AUTO_TRACE();
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::Buttons_GetCapabilities);
+}
+
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_response.cc
index b6ab822c47..20250af222 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/button_get_capabilities_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ButtonGetCapabilitiesResponse::ButtonGetCapabilitiesResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,27 +55,36 @@ ButtonGetCapabilitiesResponse::ButtonGetCapabilitiesResponse(
ButtonGetCapabilitiesResponse::~ButtonGetCapabilitiesResponse() {}
void ButtonGetCapabilitiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const hmi_apis::Common_Result::eType code =
static_cast<hmi_apis::Common_Result::eType>(
(*message_)[strings::params][hmi_response::code].asInt());
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::Buttons_GetCapabilities);
+
if (hmi_apis::Common_Result::SUCCESS != code) {
- LOG4CXX_ERROR(logger_, "Error is returned. Capabilities won't be updated.");
+ SDL_LOG_ERROR("Error is returned. Capabilities won't be updated.");
return;
}
- HMICapabilities& hmi_capabilities = hmi_capabilities_;
-
- hmi_capabilities.set_button_capabilities(
+ std::vector<std::string> sections_to_update{
+ hmi_response::button_capabilities};
+ hmi_capabilities_.set_button_capabilities(
(*message_)[strings::msg_params][hmi_response::capabilities]);
if ((*message_)[strings::msg_params].keyExists(
hmi_response::preset_bank_capabilities)) {
- hmi_capabilities.set_preset_bank_capabilities(
+ sections_to_update.push_back(hmi_response::preset_bank_capabilities);
+ hmi_capabilities_.set_preset_bank_capabilities(
(*message_)[strings::msg_params]
[hmi_response::preset_bank_capabilities]);
}
+
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::buttons, sections_to_update, message_->getSchema())) {
+ SDL_LOG_ERROR("Failed to save Buttons.GetCapabilities response to cache");
+ }
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_request.cc
index 988794f668..b4b838b8dd 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ClosePopupRequest::ClosePopupRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ ClosePopupRequest::ClosePopupRequest(
ClosePopupRequest::~ClosePopupRequest() {}
void ClosePopupRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_response.cc
index 072e1960e9..76ed7a749a 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/close_popup_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ClosePopupResponse::ClosePopupResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ ClosePopupResponse::ClosePopupResponse(
ClosePopupResponse::~ClosePopupResponse() {}
void ClosePopupResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// TODO(VS): Process response from HMI
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_request.cc
index 71782ef575..0bc9090bbe 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DecryptCertificateRequest::DecryptCertificateRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -50,7 +52,7 @@ DecryptCertificateRequest::DecryptCertificateRequest(
policy_handle) {}
void DecryptCertificateRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const uint32_t correlation_id = RequestToHMI::correlation_id();
const uint32_t app_id = RequestToHMI::application_id();
application_manager_.set_application_id(correlation_id, app_id);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_response.cc
index cf2a4d092c..5c3bf9d0e2 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/decrypt_certificate_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DecryptCertificateResponse::DecryptCertificateResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ DecryptCertificateResponse::DecryptCertificateResponse(
DecryptCertificateResponse::~DecryptCertificateResponse() {}
void DecryptCertificateResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const hmi_apis::Common_Result::eType code =
static_cast<hmi_apis::Common_Result::eType>(
(*message_)[strings::params][hmi_response::code].asInt());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_request.cc
index 8546252119..1b42abd055 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetSystemInfoRequest::GetSystemInfoRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,13 +54,18 @@ GetSystemInfoRequest::GetSystemInfoRequest(
GetSystemInfoRequest::~GetSystemInfoRequest() {}
void GetSystemInfoRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t correlation_id = RequestToHMI::correlation_id();
uint32_t app_id = RequestToHMI::application_id();
application_manager_.set_application_id(correlation_id, app_id);
SendRequest();
}
+void GetSystemInfoRequest::onTimeOut() {
+ SDL_LOG_AUTO_TRACE();
+ hmi_capabilities_.UpdateCachedCapabilities();
+}
+
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_response.cc
index baff925a4e..8229e1978c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/get_system_info_response.cc
@@ -37,6 +37,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetSystemInfoResponse::GetSystemInfoResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,27 +54,30 @@ GetSystemInfoResponse::GetSystemInfoResponse(
GetSystemInfoResponse::~GetSystemInfoResponse() {}
void GetSystemInfoResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- const hmi_apis::Common_Result::eType code =
- static_cast<hmi_apis::Common_Result::eType>(
- (*message_)[strings::params][hmi_response::code].asInt());
+ SDL_LOG_AUTO_TRACE();
+ const auto code = static_cast<hmi_apis::Common_Result::eType>(
+ (*message_)[strings::params][hmi_response::code].asInt());
+
+ hmi_capabilities_.set_ccpu_version(policy_handler_.GetCCPUVersionFromPT());
+
+ if (hmi_apis::Common_Result::SUCCESS != code) {
+ SDL_LOG_WARN("GetSystemError returns an error code " << code);
+ hmi_capabilities_.UpdateCachedCapabilities();
+ policy_handler_.SetPreloadedPtFlag(false);
+ return;
+ }
- const SystemInfo& info = GetSystemInfo(code);
+ const SystemInfo& info = GetSystemInfo();
- // We have to set preloaded flag as false in policy table on any response
- // of GetSystemInfo (SDLAQ-CRS-2365)
policy_handler_.OnGetSystemInfo(
info.ccpu_version, info.wers_country_code, info.language);
+
+ hmi_capabilities_.OnSoftwareVersionReceived(info.ccpu_version);
}
-const SystemInfo GetSystemInfoResponse::GetSystemInfo(
- const hmi_apis::Common_Result::eType code) const {
+const SystemInfo GetSystemInfoResponse::GetSystemInfo() const {
SystemInfo info;
- if (hmi_apis::Common_Result::SUCCESS != code) {
- LOG4CXX_WARN(logger_, "GetSystemError returns an error code " << code);
- return info;
- }
info.ccpu_version =
(*message_)[strings::msg_params]["ccpu_version"].asString();
@@ -81,11 +86,9 @@ const SystemInfo GetSystemInfoResponse::GetSystemInfo(
const uint32_t lang_code =
(*message_)[strings::msg_params]["language"].asUInt();
- info.language = application_manager::MessageHelper::CommonLanguageToString(
+ info.language = application_manager::EnumToString(
static_cast<hmi_apis::Common_Language::eType>(lang_code));
- hmi_capabilities_.set_ccpu_version(info.ccpu_version);
-
return info;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_request.cc
index b8c61ca902..288d7c0927 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
MixingAudioSupportedRequest::MixingAudioSupportedRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ MixingAudioSupportedRequest::MixingAudioSupportedRequest(
MixingAudioSupportedRequest::~MixingAudioSupportedRequest() {}
void MixingAudioSupportedRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_response.cc
index 089e56e598..e9dc69db2b 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/mixing_audio_supported_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
MixingAudioSupportedResponse::MixingAudioSupportedResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ MixingAudioSupportedResponse::MixingAudioSupportedResponse(
MixingAudioSupportedResponse::~MixingAudioSupportedResponse() {}
void MixingAudioSupportedResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
hmi_capabilities_.set_attenuated_supported(
(*message_)[strings::msg_params][hmi_response::attenuated_supported]
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_request.cc
index 8390fea5bc..9010e32125 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviAlertManeuverRequest::NaviAlertManeuverRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ NaviAlertManeuverRequest::NaviAlertManeuverRequest(
NaviAlertManeuverRequest::~NaviAlertManeuverRequest() {}
void NaviAlertManeuverRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_response.cc
index a1603f069d..40f4471586 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_alert_maneuver_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviAlertManeuverResponse::NaviAlertManeuverResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ NaviAlertManeuverResponse::NaviAlertManeuverResponse(
NaviAlertManeuverResponse::~NaviAlertManeuverResponse() {}
void NaviAlertManeuverResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::Navigation_AlertManeuver);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_request.cc
index 060a2bda34..21d6282436 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_request.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
AudioStartStreamRequest::AudioStartStreamRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,13 +55,12 @@ AudioStartStreamRequest::AudioStartStreamRequest(
policy_handle)
, EventObserver(application_manager.event_dispatcher())
, retry_number_(0) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::pair<uint32_t, int32_t> stream_retry =
application_manager_.get_settings().start_stream_retry_amount();
default_timeout_ = stream_retry.second;
retry_number_ = stream_retry.first;
- LOG4CXX_DEBUG(logger_,
- "default_timeout_ = " << default_timeout_
+ SDL_LOG_DEBUG("default_timeout_ = " << default_timeout_
<< "; retry_number_ = " << retry_number_);
}
@@ -69,17 +70,16 @@ AudioStartStreamRequest::~AudioStartStreamRequest() {
}
void AudioStartStreamRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) {
- LOG4CXX_INFO(logger_, "Interface Navi is not supported by system");
+ SDL_LOG_INFO("Interface Navi is not supported by system");
return;
}
ApplicationSharedPtr app =
application_manager_.application_by_hmi_app(application_id());
if (!app) {
- LOG4CXX_ERROR(logger_,
- "Application with hmi_app_id " << application_id()
+ SDL_LOG_ERROR("Application with hmi_app_id " << application_id()
<< " does not exist");
return;
}
@@ -92,33 +92,31 @@ void AudioStartStreamRequest::Run() {
void AudioStartStreamRequest::on_event(const event_engine::Event& event) {
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app =
application_manager_.application_by_hmi_app(application_id());
if (!app) {
- LOG4CXX_ERROR(logger_,
- "StartAudioStreamRequest aborted. Application not found");
+ SDL_LOG_ERROR("StartAudioStreamRequest aborted. Application not found");
return;
}
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::Navigation_StartAudioStream: {
- LOG4CXX_DEBUG(logger_, "Received StartStream event");
+ SDL_LOG_DEBUG("Received StartStream event");
const hmi_apis::Common_Result::eType code =
static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asInt());
if (hmi_apis::Common_Result::SUCCESS == code) {
- LOG4CXX_INFO(logger_, "StartAudioStream response SUCCESS");
+ SDL_LOG_INFO("StartAudioStream response SUCCESS");
if (application_manager_.HMIStateAllowsStreaming(app->app_id(),
ServiceType::kAudio)) {
app->set_audio_streaming_approved(true);
} else {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"StartAudioStreamRequest aborted. Application can not stream");
}
application_manager_.TerminateRequest(
@@ -126,65 +124,66 @@ void AudioStartStreamRequest::on_event(const event_engine::Event& event) {
break;
}
if (hmi_apis::Common_Result::REJECTED == code) {
- LOG4CXX_INFO(logger_, "StartAudioStream response REJECTED");
+ SDL_LOG_INFO("StartAudioStream response REJECTED");
RetryStartSession();
break;
}
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
}
void AudioStartStreamRequest::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
RetryStartSession();
}
void AudioStartStreamRequest::RetryStartSession() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- application_manager_.TerminateRequest(
- connection_key(), correlation_id(), function_id());
+ auto retry_start_session = [this](const uint32_t hmi_app_id) {
+ ApplicationSharedPtr app =
+ application_manager_.application_by_hmi_app(hmi_app_id);
- ApplicationSharedPtr app =
- application_manager_.application_by_hmi_app(application_id());
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "StartAudioStreamRequest aborted. Application not found");
- return;
- }
+ if (!app) {
+ SDL_LOG_ERROR("StartAudioStreamRequest aborted. Application not found");
+ return;
+ }
- if (!app->audio_streaming_allowed()) {
- LOG4CXX_WARN(logger_, "Audio streaming not allowed");
- return;
- }
+ if (!app->audio_streaming_allowed()) {
+ SDL_LOG_WARN("Audio streaming not allowed");
+ return;
+ }
- if (app->audio_streaming_approved()) {
- LOG4CXX_INFO(logger_,
- "AudioStartStream retry sequence stopped. "
- << "SUCCESS received");
- app->set_audio_stream_retry_number(0);
- return;
- }
+ if (app->audio_streaming_approved()) {
+ SDL_LOG_INFO("AudioStartStream retry sequence stopped. "
+ << "SUCCESS received");
+ app->set_audio_stream_retry_number(0);
+ return;
+ }
- uint32_t curr_retry_number = app->audio_stream_retry_number();
- LOG4CXX_DEBUG(
- logger_, "Retry number " << curr_retry_number << " of " << retry_number_);
+ uint32_t curr_retry_number = app->audio_stream_retry_number() + 1;
- if (curr_retry_number < retry_number_) {
- LOG4CXX_DEBUG(logger_, "Send AudioStartStream retry");
- MessageHelper::SendAudioStartStream(app->app_id(), application_manager_);
- app->set_audio_stream_retry_number(++curr_retry_number);
- } else {
- LOG4CXX_DEBUG(logger_,
- "Audio start stream retry sequence stopped. "
- << "Attempts expired.");
+ if (curr_retry_number <= retry_number_) {
+ SDL_LOG_DEBUG("Retry number " << curr_retry_number << " of "
+ << retry_number_);
+ MessageHelper::SendAudioStartStream(app->app_id(), application_manager_);
+ app->set_audio_stream_retry_number(curr_retry_number);
+ } else {
+ SDL_LOG_DEBUG("Audio start stream retry sequence stopped. "
+ << "Attempts expired.");
- application_manager_.EndNaviServices(app->app_id());
- }
+ application_manager_.EndNaviServices(app->app_id());
+ }
+ };
+
+ retry_start_session(application_id());
+
+ application_manager_.TerminateRequest(
+ connection_key(), correlation_id(), function_id());
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_response.cc
index 61d49577f6..99ddceaa55 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_start_stream_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
AudioStartStreamResponse::AudioStartStreamResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ AudioStartStreamResponse::AudioStartStreamResponse(
AudioStartStreamResponse::~AudioStartStreamResponse() {}
void AudioStartStreamResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::Navigation_StartAudioStream);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_request.cc
index a5d436f015..e20d0e1cb6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_request.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
AudioStopStreamRequest::AudioStopStreamRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,10 +53,10 @@ AudioStopStreamRequest::AudioStopStreamRequest(
AudioStopStreamRequest::~AudioStopStreamRequest() {}
void AudioStopStreamRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) {
- LOG4CXX_INFO(logger_, "Interface Navi is not supported by system");
+ SDL_LOG_INFO("Interface Navi is not supported by system");
return;
}
SendRequest();
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_response.cc
index 98023ab571..1b2f2c476c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_audio_stop_stream_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
AudioStopStreamResponse::AudioStopStreamResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ AudioStopStreamResponse::AudioStopStreamResponse(
AudioStopStreamResponse::~AudioStopStreamResponse() {}
void AudioStopStreamResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_request.cc
index edc4afe1e4..d0ef35c8fa 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviGetWayPointsRequest::NaviGetWayPointsRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ NaviGetWayPointsRequest::NaviGetWayPointsRequest(
NaviGetWayPointsRequest::~NaviGetWayPointsRequest() {}
void NaviGetWayPointsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_response.cc
index 0f0b652d01..97ef0cae2b 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_get_way_points_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviGetWayPointsResponse::NaviGetWayPointsResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ NaviGetWayPointsResponse::NaviGetWayPointsResponse(
NaviGetWayPointsResponse::~NaviGetWayPointsResponse() {}
void NaviGetWayPointsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::Navigation_GetWayPoints);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_request.cc
index 15e5b46b36..4caa307be3 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviIsReadyRequest::NaviIsReadyRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,18 +55,18 @@ NaviIsReadyRequest::NaviIsReadyRequest(
NaviIsReadyRequest::~NaviIsReadyRequest() {}
void NaviIsReadyRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
subscribe_on_event(hmi_apis::FunctionID::Navigation_IsReady,
correlation_id());
SendRequest();
}
void NaviIsReadyRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::Navigation_IsReady: {
- LOG4CXX_DEBUG(logger_, "Received Navigation_IsReady event");
+ SDL_LOG_DEBUG("Received Navigation_IsReady event");
unsubscribe_from_event(hmi_apis::FunctionID::Navigation_IsReady);
const bool is_available = app_mngr::commands::ChangeInterfaceState(
application_manager_,
@@ -76,7 +78,7 @@ void NaviIsReadyRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_response.cc
index 073513eda9..2d7f2ec025 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_is_ready_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviIsReadyResponse::NaviIsReadyResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ NaviIsReadyResponse::NaviIsReadyResponse(
NaviIsReadyResponse::~NaviIsReadyResponse() {}
void NaviIsReadyResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::Navigation_IsReady);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_request.cc
index 360870e21c..db7e73144d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviSendLocationRequest::NaviSendLocationRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ NaviSendLocationRequest::NaviSendLocationRequest(
NaviSendLocationRequest::~NaviSendLocationRequest() {}
void NaviSendLocationRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_response.cc
index dc60f2fbf0..d4d3ea0c2c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_send_location_response.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviSendLocationResponse::NaviSendLocationResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ NaviSendLocationResponse::NaviSendLocationResponse(
NaviSendLocationResponse::~NaviSendLocationResponse() {}
void NaviSendLocationResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::Navigation_SendLocation);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_request.cc
index 764315f37f..ff9d861def 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_request.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviSetVideoConfigRequest::NaviSetVideoConfigRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,19 +57,18 @@ NaviSetVideoConfigRequest::NaviSetVideoConfigRequest(
NaviSetVideoConfigRequest::~NaviSetVideoConfigRequest() {}
void NaviSetVideoConfigRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) {
- LOG4CXX_WARN(logger_, "HMI interface Navigation is not supported");
+ SDL_LOG_WARN("HMI interface Navigation is not supported");
return;
}
ApplicationSharedPtr app =
application_manager_.application_by_hmi_app(application_id());
if (!app) {
- LOG4CXX_ERROR(
- logger_,
- "Application with hmi_app_id " << application_id() << "does not exist");
+ SDL_LOG_ERROR("Application with hmi_app_id " << application_id()
+ << " does not exist");
return;
}
@@ -77,13 +78,12 @@ void NaviSetVideoConfigRequest::Run() {
}
void NaviSetVideoConfigRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app =
application_manager_.application_by_hmi_app(application_id());
if (!app) {
- LOG4CXX_ERROR(logger_,
- "Application is not found, abort NaviSetVideoConfigRequest");
+ SDL_LOG_ERROR("Application is not found, abort NaviSetVideoConfigRequest");
return;
}
@@ -93,17 +93,15 @@ void NaviSetVideoConfigRequest::on_event(const event_engine::Event& event) {
const hmi_apis::Common_Result::eType code =
static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asInt());
- bool result = false;
- std::vector<std::string> rejected_params;
if (code == hmi_apis::Common_Result::SUCCESS) {
- LOG4CXX_DEBUG(logger_, "Received SetVideoConfig success response");
- result = true;
+ SDL_LOG_DEBUG("Received SetVideoConfig success response");
+ application_manager_.OnStreamingConfigurationSuccessful(
+ app->app_id(), protocol_handler::ServiceType::kMobileNav);
} else {
- LOG4CXX_DEBUG(
- logger_,
- "Received SetVideoConfig failure response (" << event.id() << ")");
- result = false;
+ SDL_LOG_DEBUG("Received SetVideoConfig failure response (" << event.id()
+ << ")");
+ std::vector<std::string> rejected_params;
if (message[strings::msg_params].keyExists(strings::rejected_params)) {
const smart_objects::SmartArray* list =
message[strings::msg_params][strings::rejected_params].asArray();
@@ -119,33 +117,36 @@ void NaviSetVideoConfigRequest::on_event(const event_engine::Event& event) {
}
}
}
+
+ application_manager_.OnStreamingConfigurationFailed(
+ app->app_id(),
+ rejected_params,
+ "Received SetVideoConfig failure response");
+
+ break;
}
- application_manager_.OnStreamingConfigured(
- app->app_id(),
- protocol_handler::ServiceType::kMobileNav,
- result,
- rejected_params);
- break;
}
default:
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
break;
}
}
void NaviSetVideoConfigRequest::onTimeOut() {
- LOG4CXX_WARN(logger_, "Timed out while waiting for SetVideoConfig response");
+ SDL_LOG_WARN("Timed out while waiting for SetVideoConfig response");
ApplicationSharedPtr app =
application_manager_.application_by_hmi_app(application_id());
if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not found");
+ SDL_LOG_ERROR("Application is not found");
return;
}
std::vector<std::string> empty;
- application_manager_.OnStreamingConfigured(
- app->app_id(), protocol_handler::ServiceType::kMobileNav, false, empty);
+ application_manager_.OnStreamingConfigurationFailed(
+ app->app_id(),
+ empty,
+ "Timed out while waiting for SetVideoConfig response");
application_manager_.TerminateRequest(
connection_key(), correlation_id(), function_id());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_response.cc
index e4a30c9da5..5291ef8adf 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_response.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviSetVideoConfigResponse::NaviSetVideoConfigResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ NaviSetVideoConfigResponse::NaviSetVideoConfigResponse(
NaviSetVideoConfigResponse::~NaviSetVideoConfigResponse() {}
void NaviSetVideoConfigResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::Navigation_SetVideoConfig);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_request.cc
index 95dd4561fc..ddfc7cc187 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviShowConstantTBTRequest::NaviShowConstantTBTRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ NaviShowConstantTBTRequest::NaviShowConstantTBTRequest(
NaviShowConstantTBTRequest::~NaviShowConstantTBTRequest() {}
void NaviShowConstantTBTRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_response.cc
index f73099d29a..869b76863d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_show_constant_tbt_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviShowConstantTBTResponse::NaviShowConstantTBTResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ NaviShowConstantTBTResponse::NaviShowConstantTBTResponse(
NaviShowConstantTBTResponse::~NaviShowConstantTBTResponse() {}
void NaviShowConstantTBTResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::Navigation_ShowConstantTBT);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_request.cc
index 4228eb8859..973c323ebe 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_request.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviStartStreamRequest::NaviStartStreamRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,13 +55,12 @@ NaviStartStreamRequest::NaviStartStreamRequest(
policy_handle)
, EventObserver(application_manager.event_dispatcher())
, retry_number_(0) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::pair<uint32_t, int32_t> stream_retry =
application_manager_.get_settings().start_stream_retry_amount();
default_timeout_ = stream_retry.second;
retry_number_ = stream_retry.first;
- LOG4CXX_DEBUG(logger_,
- "default_timeout_ = " << default_timeout_
+ SDL_LOG_DEBUG("default_timeout_ = " << default_timeout_
<< "; retry_number_ = " << retry_number_);
}
@@ -71,18 +72,17 @@ NaviStartStreamRequest::~NaviStartStreamRequest() {
}
void NaviStartStreamRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) {
- LOG4CXX_INFO(logger_, "Interface Navi is not supported by system");
+ SDL_LOG_INFO("Interface Navi is not supported by system");
return;
}
ApplicationSharedPtr app =
application_manager_.application_by_hmi_app(application_id());
if (!app) {
- LOG4CXX_ERROR(
- logger_,
- "Application with hmi_app_id " << application_id() << "does not exist");
+ SDL_LOG_ERROR("Application with hmi_app_id " << application_id()
+ << " does not exist");
return;
}
SetAllowedToTerminate(false);
@@ -94,33 +94,31 @@ void NaviStartStreamRequest::Run() {
void NaviStartStreamRequest::on_event(const event_engine::Event& event) {
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app =
application_manager_.application_by_hmi_app(application_id());
if (!app) {
- LOG4CXX_ERROR(logger_,
- "NaviStartStreamRequest aborted. Application not found");
+ SDL_LOG_ERROR("NaviStartStreamRequest aborted. Application not found");
return;
}
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::Navigation_StartStream: {
- LOG4CXX_DEBUG(logger_, "Received StartStream event");
+ SDL_LOG_DEBUG("Received StartStream event");
const hmi_apis::Common_Result::eType code =
static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asInt());
if (hmi_apis::Common_Result::SUCCESS == code) {
- LOG4CXX_INFO(logger_, "NaviStartStreamResponse SUCCESS");
+ SDL_LOG_INFO("NaviStartStreamResponse SUCCESS");
if (application_manager_.HMIStateAllowsStreaming(
app->app_id(), ServiceType::kMobileNav)) {
app->set_video_streaming_approved(true);
} else {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"NaviStartStreamRequest aborted. Application can not stream");
}
application_manager_.TerminateRequest(
@@ -128,65 +126,66 @@ void NaviStartStreamRequest::on_event(const event_engine::Event& event) {
break;
}
if (hmi_apis::Common_Result::REJECTED == code) {
- LOG4CXX_INFO(logger_, "StartStream response REJECTED ");
+ SDL_LOG_INFO("StartStream response REJECTED");
RetryStartSession();
break;
}
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
}
void NaviStartStreamRequest::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
RetryStartSession();
}
void NaviStartStreamRequest::RetryStartSession() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- application_manager_.TerminateRequest(
- connection_key(), correlation_id(), function_id());
+ auto retry_start_session = [this](const uint32_t hmi_app_id) {
+ ApplicationSharedPtr app =
+ application_manager_.application_by_hmi_app(hmi_app_id);
- ApplicationSharedPtr app =
- application_manager_.application_by_hmi_app(application_id());
- if (!app) {
- LOG4CXX_ERROR(logger_,
- "NaviStartStreamRequest aborted. Application not found");
- return;
- }
+ if (!app) {
+ SDL_LOG_ERROR("NaviStartStreamRequest aborted. Application not found");
+ return;
+ }
- if (!app->video_streaming_allowed()) {
- LOG4CXX_WARN(logger_, "Video streaming not allowed");
- return;
- }
+ if (!app->video_streaming_allowed()) {
+ SDL_LOG_WARN("Video streaming not allowed");
+ return;
+ }
- if (app->video_streaming_approved()) {
- LOG4CXX_INFO(logger_,
- "NaviStartStream retry sequence stopped. "
- << "SUCCESS received");
- app->set_video_stream_retry_number(0);
- return;
- }
+ if (app->video_streaming_approved()) {
+ SDL_LOG_INFO("NaviStartStream retry sequence stopped. "
+ << "SUCCESS received");
+ app->set_video_stream_retry_number(0);
+ return;
+ }
- uint32_t curr_retry_number = app->video_stream_retry_number();
- LOG4CXX_DEBUG(
- logger_, "Retry number " << curr_retry_number << " of " << retry_number_);
+ uint32_t curr_retry_number = app->video_stream_retry_number() + 1;
- if (curr_retry_number < retry_number_) {
- LOG4CXX_DEBUG(logger_, "Send NaviStartStream retry");
- MessageHelper::SendNaviStartStream(app->app_id(), application_manager_);
- app->set_video_stream_retry_number(++curr_retry_number);
- } else {
- LOG4CXX_DEBUG(logger_,
- "NaviStartStream retry sequence stopped. "
- << "Attempts expired");
+ if (curr_retry_number <= retry_number_) {
+ SDL_LOG_DEBUG("Retry number " << curr_retry_number << " of "
+ << retry_number_);
+ MessageHelper::SendNaviStartStream(app->app_id(), application_manager_);
+ app->set_video_stream_retry_number(curr_retry_number);
+ } else {
+ SDL_LOG_DEBUG("NaviStartStream retry sequence stopped. "
+ << "Attempts expired");
- application_manager_.EndNaviServices(app->app_id());
- }
+ application_manager_.EndNaviServices(app->app_id());
+ }
+ };
+
+ retry_start_session(application_id());
+
+ application_manager_.TerminateRequest(
+ connection_key(), correlation_id(), function_id());
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_response.cc
index eafd81148a..a6595f1b8a 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_start_stream_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviStartStreamResponse::NaviStartStreamResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ NaviStartStreamResponse::NaviStartStreamResponse(
NaviStartStreamResponse::~NaviStartStreamResponse() {}
void NaviStartStreamResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::Navigation_StartStream);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_request.cc
index ad09b0aee1..c86803413b 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_request.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviStopStreamRequest::NaviStopStreamRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,10 +53,10 @@ NaviStopStreamRequest::NaviStopStreamRequest(
NaviStopStreamRequest::~NaviStopStreamRequest() {}
void NaviStopStreamRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
application_manager_, HmiInterfaces::HMI_INTERFACE_Navigation)) {
- LOG4CXX_INFO(logger_, "Interface Navi is not supported by system");
+ SDL_LOG_INFO("Interface Navi is not supported by system");
return;
}
SendRequest();
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_response.cc
index ff8c0bddff..3c12c527d8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_stop_stream_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviStopStreamResponse::NaviStopStreamResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ NaviStopStreamResponse::NaviStopStreamResponse(
NaviStopStreamResponse::~NaviStopStreamResponse() {}
void NaviStopStreamResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_request.cc
index ba29f552b7..7305ae37b1 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_request.cc
@@ -31,12 +31,15 @@
*/
#include "sdl_rpc_plugin/commands/hmi/navi_subscribe_way_points_request.h"
+#include "application_manager/resumption/resume_ctrl.h"
namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviSubscribeWayPointsRequest::NaviSubscribeWayPointsRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +55,19 @@ NaviSubscribeWayPointsRequest::NaviSubscribeWayPointsRequest(
NaviSubscribeWayPointsRequest::~NaviSubscribeWayPointsRequest() {}
void NaviSubscribeWayPointsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void NaviSubscribeWayPointsRequest::onTimeOut() {
+ auto& resume_ctrl = application_manager_.resume_controller();
+
+ resume_ctrl.HandleOnTimeOut(
+ correlation_id(),
+ static_cast<hmi_apis::FunctionID::eType>(function_id()));
+}
+
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_response.cc
index ddf8f75e58..37b4e8bbd3 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_subscribe_way_points_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviSubscribeWayPointsResponse::NaviSubscribeWayPointsResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ NaviSubscribeWayPointsResponse::NaviSubscribeWayPointsResponse(
NaviSubscribeWayPointsResponse::~NaviSubscribeWayPointsResponse() {}
void NaviSubscribeWayPointsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(
hmi_apis::FunctionID::Navigation_SubscribeWayPoints);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_request.cc
index d3c998cfdf..e3a690a971 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviUnsubscribeWayPointsRequest::NaviUnsubscribeWayPointsRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ NaviUnsubscribeWayPointsRequest::NaviUnsubscribeWayPointsRequest(
NaviUnsubscribeWayPointsRequest::~NaviUnsubscribeWayPointsRequest() {}
void NaviUnsubscribeWayPointsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_response.cc
index beed29e1e2..b84d89e658 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_unsubscribe_way_points_response.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviUnsubscribeWayPointsResponse::NaviUnsubscribeWayPointsResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ NaviUnsubscribeWayPointsResponse::NaviUnsubscribeWayPointsResponse(
NaviUnsubscribeWayPointsResponse::~NaviUnsubscribeWayPointsResponse() {}
void NaviUnsubscribeWayPointsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(
hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_request.cc
index a8a258b1c0..91c764b5b4 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviUpdateTurnListRequest::NaviUpdateTurnListRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ NaviUpdateTurnListRequest::NaviUpdateTurnListRequest(
NaviUpdateTurnListRequest::~NaviUpdateTurnListRequest() {}
void NaviUpdateTurnListRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_response.cc
index a2f737df38..033c7f1383 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_update_turn_list_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NaviUpdateTurnListResponse::NaviUpdateTurnListResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ NaviUpdateTurnListResponse::NaviUpdateTurnListResponse(
NaviUpdateTurnListResponse::~NaviUpdateTurnListResponse() {}
void NaviUpdateTurnListResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::Navigation_UpdateTurnList);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_allow_sdl_functionality_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_allow_sdl_functionality_notification.cc
index 204cc7d347..985056e788 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_allow_sdl_functionality_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_allow_sdl_functionality_notification.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnAllowSDLFunctionalityNotification::OnAllowSDLFunctionalityNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ OnAllowSDLFunctionalityNotification::OnAllowSDLFunctionalityNotification(
OnAllowSDLFunctionalityNotification::~OnAllowSDLFunctionalityNotification() {}
void OnAllowSDLFunctionalityNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::string device_id;
if ((*message_)[strings::msg_params].keyExists("device")) {
device_id = (*message_)[strings::msg_params]["device"]["id"].asString();
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_activated_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_activated_notification.cc
index e882020f8b..144c184e82 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_activated_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_activated_notification.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnAppActivatedNotification::OnAppActivatedNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ OnAppActivatedNotification::OnAppActivatedNotification(
OnAppActivatedNotification::~OnAppActivatedNotification() {}
void OnAppActivatedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(
hmi_apis::FunctionID::BasicCommunication_OnAppActivated);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_deactivated_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_deactivated_notification.cc
index 18b796eaa8..81b07ed6f2 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_deactivated_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_deactivated_notification.cc
@@ -42,6 +42,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnAppDeactivatedNotification::OnAppDeactivatedNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -57,7 +59,7 @@ OnAppDeactivatedNotification::OnAppDeactivatedNotification(
OnAppDeactivatedNotification::~OnAppDeactivatedNotification() {}
void OnAppDeactivatedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(
hmi_apis::FunctionID::BasicCommunication_OnAppDeactivated);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_changed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_changed_notification.cc
index a1eb412c66..801e74eedd 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_changed_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_changed_notification.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnAppPermissionChangedNotification::OnAppPermissionChangedNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ OnAppPermissionChangedNotification::OnAppPermissionChangedNotification(
OnAppPermissionChangedNotification::~OnAppPermissionChangedNotification() {}
void OnAppPermissionChangedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_consent_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_consent_notification.cc
index 0033b392d2..e9e0c65424 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_consent_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_permission_consent_notification.cc
@@ -50,7 +50,7 @@ namespace {
struct PermissionsAppender
: public std::unary_function<void,
const smart_objects::SmartArray::value_type&> {
- PermissionsAppender(policy::PermissionConsent& consents)
+ explicit PermissionsAppender(policy::PermissionConsent& consents)
: allowed_key_(application_manager::hmi_response::allowed)
, consents_(consents) {}
void operator()(const smart_objects::SmartArray::value_type& item) const {
@@ -82,7 +82,7 @@ struct PermissionsAppender
*/
struct ExternalConsentStatusAppender
: std::unary_function<void, const smart_objects::SmartArray::value_type&> {
- ExternalConsentStatusAppender(
+ explicit ExternalConsentStatusAppender(
policy::ExternalConsentStatus& external_consent_status)
: external_consent_status_(external_consent_status) {}
void operator()(const smart_objects::SmartArray::value_type& item) const {
@@ -112,6 +112,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnAppPermissionConsentNotification::OnAppPermissionConsentNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -127,7 +129,7 @@ OnAppPermissionConsentNotification::OnAppPermissionConsentNotification(
OnAppPermissionConsentNotification::~OnAppPermissionConsentNotification() {}
void OnAppPermissionConsentNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
uint32_t connection_key = 0;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_properties_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_properties_change_notification.cc
index f1fa703bbb..d31d8436f7 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_properties_change_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_properties_change_notification.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnAppPropertiesChangeNotification::OnAppPropertiesChangeNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -50,7 +52,7 @@ OnAppPropertiesChangeNotification::OnAppPropertiesChangeNotification(
policy_handle) {}
void OnAppPropertiesChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_registered_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_registered_notification.cc
index 51c3125921..382b402383 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_registered_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_registered_notification.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnAppRegisteredNotification::OnAppRegisteredNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ OnAppRegisteredNotification::OnAppRegisteredNotification(
OnAppRegisteredNotification::~OnAppRegisteredNotification() {}
void OnAppRegisteredNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// SDL must notify system about app registration before any dependent actions
// will be started
SendNotification();
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_unregistered_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_unregistered_notification.cc
index 07aadada81..4ff985cdf0 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_unregistered_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_app_unregistered_notification.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnAppUnregisteredNotification::OnAppUnregisteredNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,13 +56,13 @@ OnAppUnregisteredNotification::OnAppUnregisteredNotification(
OnAppUnregisteredNotification::~OnAppUnregisteredNotification() {}
bool OnAppUnregisteredNotification::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Replacement of hmi id is skipped.");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Replacement of hmi id is skipped.");
return true;
}
void OnAppUnregisteredNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// sending event for delete VRCommand on PerformInteraction
event_engine::Event event(
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_audio_data_streaming_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_audio_data_streaming_notification.cc
index d9c1120409..d72fb1244e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_audio_data_streaming_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_audio_data_streaming_notification.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnAudioDataStreamingNotification::OnAudioDataStreamingNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ OnAudioDataStreamingNotification::OnAudioDataStreamingNotification(
OnAudioDataStreamingNotification::~OnAudioDataStreamingNotification() {}
void OnAudioDataStreamingNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc
index 1a104c0fa1..9caec22bd2 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc
@@ -42,6 +42,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnBCSystemCapabilityUpdatedNotification::
OnBCSystemCapabilityUpdatedNotification(
const application_manager::commands::MessageSharedPtr& message,
@@ -59,10 +61,10 @@ OnBCSystemCapabilityUpdatedNotification::
~OnBCSystemCapabilityUpdatedNotification() {}
void OnBCSystemCapabilityUpdatedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "Sending BasicCommunication.OnSystemCapabilityUpdated "
- "Notification to HMI");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG(
+ "Sending BasicCommunication.OnSystemCapabilityUpdated "
+ "Notification to HMI");
smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
@@ -150,9 +152,8 @@ void OnBCSystemCapabilityUpdatedNotification::Run() {
app_services->end(),
matching_service_predicate);
if (it != app_services->end()) {
- LOG4CXX_DEBUG(
- logger_,
- "Replacing updated record with service_id " << service_id);
+ SDL_LOG_DEBUG("Replacing updated record with service_id "
+ << service_id);
app_services->erase(it);
}
app_services->push_back(updated_capabilities[i]);
@@ -163,7 +164,7 @@ void OnBCSystemCapabilityUpdatedNotification::Run() {
}
case mobile_apis::SystemCapabilityType::DISPLAYS: {
if (!hmi_capabilities_.system_display_capabilities()) {
- LOG4CXX_INFO(logger_, "system_display_capabilities are not available");
+ SDL_LOG_INFO("system_display_capabilities are not available");
return;
}
msg_params[strings::system_capability][strings::display_capabilities] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification_from_hmi.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification_from_hmi.cc
index f32aef1102..7ba330caa8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification_from_hmi.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification_from_hmi.cc
@@ -42,6 +42,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnBCSystemCapabilityUpdatedNotificationFromHMI::
OnBCSystemCapabilityUpdatedNotificationFromHMI(
const application_manager::commands::MessageSharedPtr& message,
@@ -63,10 +65,10 @@ OnBCSystemCapabilityUpdatedNotificationFromHMI::
OnBCSystemCapabilityUpdatedNotificationFromHMI::
ProcessSystemDisplayCapabilities(
const smart_objects::SmartObject& display_capabilities) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!(*message_)[strings::msg_params].keyExists(strings::app_id)) {
- LOG4CXX_DEBUG(logger_, "Updating general display capabilities");
+ SDL_LOG_DEBUG("Updating general display capabilities");
hmi_capabilities_.set_system_display_capabilities(display_capabilities);
return ProcessSystemDisplayCapabilitiesResult::SUCCESS;
}
@@ -75,22 +77,22 @@ OnBCSystemCapabilityUpdatedNotificationFromHMI::
(*message_)[strings::msg_params][strings::app_id].asUInt();
auto app = application_manager_.application(app_id);
if (!app) {
- LOG4CXX_ERROR(logger_,
- "Application with app_id " << app_id << " is not registered");
+ SDL_LOG_ERROR("Application with app_id " << app_id << " is not registered");
return ProcessSystemDisplayCapabilitiesResult::FAIL;
}
- LOG4CXX_DEBUG(logger_, "Updating display capabilities for app " << app_id);
+ SDL_LOG_DEBUG("Updating display capabilities for app " << app_id);
app->set_display_capabilities(display_capabilities);
// Remove app_id from notification to mobile
(*message_)[strings::params][strings::connection_key] =
(*message_)[strings::msg_params][strings::app_id];
(*message_)[strings::msg_params].erase(strings::app_id);
- if (app->is_resuming() && app->is_app_data_resumption_allowed()) {
- LOG4CXX_DEBUG(logger_, "Application is resuming");
- app->display_capabilities_builder().UpdateDisplayCapabilities(
- display_capabilities);
+
+ auto& builder = app->display_capabilities_builder();
+ if (builder.IsWaitingForWindowCapabilities(display_capabilities)) {
+ SDL_LOG_DEBUG("Application is waiting for capabilities");
+ builder.UpdateDisplayCapabilities(display_capabilities);
return ProcessSystemDisplayCapabilitiesResult::CAPABILITIES_CACHED;
}
@@ -98,7 +100,7 @@ OnBCSystemCapabilityUpdatedNotificationFromHMI::
}
void OnBCSystemCapabilityUpdatedNotificationFromHMI::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] = static_cast<int32_t>(
@@ -113,15 +115,13 @@ void OnBCSystemCapabilityUpdatedNotificationFromHMI::Run() {
const auto result = ProcessSystemDisplayCapabilities(
system_capability[strings::display_capabilities]);
if (ProcessSystemDisplayCapabilitiesResult::FAIL == result) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed to process display capabilities. Notification will "
"be ignored");
return;
} else if (ProcessSystemDisplayCapabilitiesResult::
CAPABILITIES_CACHED == result) {
- LOG4CXX_TRACE(logger_,
- "Capabilities are being cached for resuming app");
+ SDL_LOG_TRACE("Capabilities are being cached for resuming app");
return;
}
}
@@ -129,7 +129,7 @@ void OnBCSystemCapabilityUpdatedNotificationFromHMI::Run() {
}
case mobile_apis::SystemCapabilityType::REMOTE_CONTROL: {
if (system_capability.keyExists(strings::rc_capability)) {
- LOG4CXX_DEBUG(logger_, "Updating RC Capabilities");
+ SDL_LOG_DEBUG("Updating RC Capabilities");
hmi_capabilities_.set_rc_capability(
system_capability[strings::rc_capability]);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_event_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_event_notification.cc
index f25e6202cd..f6911637f9 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_event_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_event_notification.cc
@@ -42,6 +42,8 @@ namespace commands {
namespace hmi {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnButtonEventNotification::OnButtonEventNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ OnButtonEventNotification::OnButtonEventNotification(
policy_handle) {}
void OnButtonEventNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
(*message_)[strings::params][strings::function_id] =
static_cast<int32_t>(mobile_apis::FunctionID::OnButtonEventID);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_press_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_press_notification.cc
index fee6b1b485..db2d81ccd1 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_press_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_press_notification.cc
@@ -43,6 +43,8 @@ namespace commands {
namespace hmi {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnButtonPressNotification::OnButtonPressNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ OnButtonPressNotification::OnButtonPressNotification(
policy_handle) {}
void OnButtonPressNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::Buttons_OnButtonPress);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_subscription_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_subscription_notification.cc
index 4ac752d6c5..c8d36407b8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_subscription_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_button_subscription_notification.cc
@@ -39,6 +39,8 @@ namespace commands {
namespace hmi {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnButtonSubscriptionNotification::OnButtonSubscriptionNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ OnButtonSubscriptionNotification::OnButtonSubscriptionNotification(
OnButtonSubscriptionNotification::~OnButtonSubscriptionNotification() {}
void OnButtonSubscriptionNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_chosen_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_chosen_notification.cc
index f27c1fe5e5..9938c26192 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_chosen_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_chosen_notification.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnDeviceChosenNotification::OnDeviceChosenNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ OnDeviceChosenNotification::OnDeviceChosenNotification(
OnDeviceChosenNotification::~OnDeviceChosenNotification() {}
void OnDeviceChosenNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if ((*message_)[strings::msg_params].keyExists(strings::device_info)) {
application_manager_.ConnectToDevice(
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_state_changed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_state_changed_notification.cc
index 129ba8c9ba..a6619c579c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_state_changed_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_device_state_changed_notification.cc
@@ -80,6 +80,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnDeviceStateChangedNotification::OnDeviceStateChangedNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -95,7 +97,7 @@ OnDeviceStateChangedNotification::OnDeviceStateChangedNotification(
OnDeviceStateChangedNotification::~OnDeviceStateChangedNotification() {}
void OnDeviceStateChangedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if ((*message_)[strings::msg_params]["deviceState"] ==
hmi_apis::Common_DeviceState::UNPAIRED) {
@@ -110,11 +112,11 @@ void OnDeviceStateChangedNotification::Run() {
}
} else {
// Policy uses hashed MAC address as device_id
- LOG4CXX_DEBUG(logger_, "Device_id from HMI: " << device_id);
+ SDL_LOG_DEBUG("Device_id from HMI: " << device_id);
std::string bt_mac = convert_to_bt_mac(device_id);
- LOG4CXX_DEBUG(logger_, "Device_id as BT MAC: " << bt_mac);
+ SDL_LOG_DEBUG("Device_id as BT MAC: " << bt_mac);
device_id = encryption::MakeHash(bt_mac);
- LOG4CXX_DEBUG(logger_, "Device_id hashed as BT MAC : " << device_id);
+ SDL_LOG_DEBUG("Device_id hashed as BT MAC : " << device_id);
}
policy_handler_.RemoveDevice(device_id);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_driver_distraction_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_driver_distraction_notification.cc
index a743c58672..167176aa0f 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_driver_distraction_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_driver_distraction_notification.cc
@@ -78,8 +78,7 @@ struct OnDriverDistractionProcessor {
if (is_lock_screen_dismissal_exists &&
msg_params[mobile_notification::lock_screen_dismissal_enabled]
.asBool()) {
- const auto language =
- MessageHelper::MobileLanguageToString(application->ui_language());
+ const auto language = EnumToString(application->ui_language());
const auto warning_message =
application_manager_.GetPolicyHandler()
@@ -124,6 +123,8 @@ struct OnDriverDistractionProcessor {
};
} // namespace
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnDriverDistractionNotification::OnDriverDistractionNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -139,7 +140,7 @@ OnDriverDistractionNotification::OnDriverDistractionNotification(
OnDriverDistractionNotification::~OnDriverDistractionNotification() {}
void OnDriverDistractionNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto state =
static_cast<hmi_apis::Common_DriverDistractionState::eType>(
(*message_)[strings::msg_params][hmi_notification::state].asInt());
@@ -147,7 +148,7 @@ void OnDriverDistractionNotification::Run() {
auto on_driver_distraction = std::make_shared<smart_objects::SmartObject>();
if (!on_driver_distraction) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return;
}
(*on_driver_distraction)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_event_changed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_event_changed_notification.cc
index f6ea22ae34..13e76979a4 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_event_changed_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_event_changed_notification.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnEventChangedNotification::OnEventChangedNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ OnEventChangedNotification::OnEventChangedNotification(
OnEventChangedNotification::~OnEventChangedNotification() {}
void OnEventChangedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(
hmi_apis::FunctionID::BasicCommunication_OnEventChanged);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_all_applications_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_all_applications_notification.cc
index 4c168f9eff..079e4f3d10 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_all_applications_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_all_applications_notification.cc
@@ -46,6 +46,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnExitAllApplicationsNotification::OnExitAllApplicationsNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -61,12 +63,12 @@ OnExitAllApplicationsNotification::OnExitAllApplicationsNotification(
OnExitAllApplicationsNotification::~OnExitAllApplicationsNotification() {}
void OnExitAllApplicationsNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const hmi_apis::Common_ApplicationsCloseReason::eType reason =
static_cast<hmi_apis::Common_ApplicationsCloseReason::eType>(
(*message_)[strings::msg_params][hmi_request::reason].asInt());
- LOG4CXX_DEBUG(logger_, "Reason " << reason);
+ SDL_LOG_DEBUG("Reason " << reason);
mobile_api::AppInterfaceUnregisteredReason::eType mob_reason =
mobile_api::AppInterfaceUnregisteredReason::INVALID_ENUM;
@@ -90,7 +92,7 @@ void OnExitAllApplicationsNotification::Run() {
return;
}
default: {
- LOG4CXX_ERROR(logger_, "Unknown Application close reason" << reason);
+ SDL_LOG_ERROR("Unknown Application close reason" << reason);
return;
}
}
@@ -106,7 +108,7 @@ void OnExitAllApplicationsNotification::Run() {
}
void OnExitAllApplicationsNotification::SendOnSDLPersistenceComplete() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr message =
std::make_shared<smart_objects::SmartObject>(
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_application_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_application_notification.cc
index 3eec6c5d1a..4a6a3df3b4 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_application_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_exit_application_notification.cc
@@ -44,6 +44,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnExitApplicationNotification::OnExitApplicationNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -59,7 +61,7 @@ OnExitApplicationNotification::OnExitApplicationNotification(
OnExitApplicationNotification::~OnExitApplicationNotification() {}
void OnExitApplicationNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace mobile_apis;
using namespace hmi_apis;
@@ -68,7 +70,7 @@ void OnExitApplicationNotification::Run() {
ApplicationSharedPtr app_impl = application_manager_.application(app_id);
if (app_impl.use_count() == 0) {
- LOG4CXX_ERROR(logger_, "Application does not exist");
+ SDL_LOG_ERROR("Application does not exist");
return;
}
@@ -112,9 +114,16 @@ void OnExitApplicationNotification::Run() {
break;
}
#endif // CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT
+ case Common_ApplicationExitReason::RESOURCE_CONSTRAINT: {
+ const auto message =
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ app_id, AppInterfaceUnregisteredReason::RESOURCE_CONSTRAINT);
+ SendNotificationToMobile(message);
+ return;
+ }
default: {
- LOG4CXX_WARN(logger_, "Unhandled reason");
+ SDL_LOG_WARN("Unhandled reason");
return;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_file_removed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_file_removed_notification.cc
index e1f0e2b104..d96f0498a5 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_file_removed_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_file_removed_notification.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnFileRemovedNotification::OnFileRemovedNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ OnFileRemovedNotification::OnFileRemovedNotification(
OnFileRemovedNotification::~OnFileRemovedNotification() {}
void OnFileRemovedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_find_applications.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_find_applications.cc
index 2e8f15387f..5f03d5ffa0 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_find_applications.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_find_applications.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnFindApplications::OnFindApplications(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ OnFindApplications::OnFindApplications(
OnFindApplications::~OnFindApplications() {}
void OnFindApplications::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// TODO(PV): add UpdateAppsOnDevice to ApplicationManager
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ignition_cycle_over_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ignition_cycle_over_notification.cc
index 1e8da19c0a..2af2d1c2d6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ignition_cycle_over_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ignition_cycle_over_notification.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnIgnitionCycleOverNotification::OnIgnitionCycleOverNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ OnIgnitionCycleOverNotification::OnIgnitionCycleOverNotification(
OnIgnitionCycleOverNotification::~OnIgnitionCycleOverNotification() {}
void OnIgnitionCycleOverNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
policy_handler_.OnIgnitionCycleOver();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_tbt_client_state_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_tbt_client_state_notification.cc
index f611b81764..01de5ccb06 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_tbt_client_state_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_tbt_client_state_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnNaviTBTClientStateNotification::OnNaviTBTClientStateNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnNaviTBTClientStateNotification::OnNaviTBTClientStateNotification(
OnNaviTBTClientStateNotification::~OnNaviTBTClientStateNotification() {}
void OnNaviTBTClientStateNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_way_point_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_way_point_change_notification.cc
index 2a1a9c29fb..2440e918b7 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_way_point_change_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_navi_way_point_change_notification.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnNaviWayPointChangeNotification::OnNaviWayPointChangeNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& app_man,
@@ -49,7 +51,7 @@ OnNaviWayPointChangeNotification::OnNaviWayPointChangeNotification(
OnNaviWayPointChangeNotification::~OnNaviWayPointChangeNotification() {}
void OnNaviWayPointChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_policy_update.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_policy_update.cc
index a0e75371b5..b883ac5c16 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_policy_update.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_policy_update.cc
@@ -38,6 +38,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnPolicyUpdate::OnPolicyUpdate(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnPolicyUpdate::OnPolicyUpdate(
OnPolicyUpdate::~OnPolicyUpdate() {}
void OnPolicyUpdate::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
policy_handler_.OnPTExchangeNeeded();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_put_file_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_put_file_notification.cc
index 441e36a385..9349bc326d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_put_file_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_put_file_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnPutFileNotification::OnPutFileNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnPutFileNotification::OnPutFileNotification(
OnPutFileNotification::~OnPutFileNotification() {}
void OnPutFileNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ready_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ready_notification.cc
index da3612b043..ef92c28ba4 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ready_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ready_notification.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnReadyNotification::OnReadyNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,9 +54,9 @@ OnReadyNotification::OnReadyNotification(
OnReadyNotification::~OnReadyNotification() {}
void OnReadyNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- application_manager_.OnHMIStartedCooperation();
+ application_manager_.OnHMIReady();
event_engine::Event event(hmi_apis::FunctionID::BasicCommunication_OnReady);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_received_policy_update.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_received_policy_update.cc
index b2c9151b40..2f5901c9e2 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_received_policy_update.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_received_policy_update.cc
@@ -41,6 +41,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnReceivedPolicyUpdate::OnReceivedPolicyUpdate(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,20 +58,20 @@ OnReceivedPolicyUpdate::OnReceivedPolicyUpdate(
OnReceivedPolicyUpdate::~OnReceivedPolicyUpdate() {}
void OnReceivedPolicyUpdate::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
#if defined(PROPRIETARY_MODE) || defined(EXTERNAL_PROPRIETARY_MODE)
const std::string& file_path =
(*message_)[strings::msg_params][hmi_notification::policyfile].asString();
policy::BinaryMessage file_content;
if (!file_system::ReadBinaryFile(file_path, file_content)) {
- LOG4CXX_ERROR(logger_, "Failed to read Update file.");
+ SDL_LOG_ERROR("Failed to read Update file.");
return;
}
policy_handler_.ReceiveMessageFromSDK(file_path, file_content);
#else
- LOG4CXX_WARN(logger_,
- "This RPC is part of extended policy flow."
- "Please re-build with extended policy mode enabled.");
+ SDL_LOG_WARN(
+ "This RPC is part of extended policy flow. "
+ "Please re-build with extended policy mode enabled.");
#endif
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_record_start_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_record_start_notification.cc
index dbef717539..e05c5860db 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_record_start_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_record_start_notification.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnRecordStartdNotification::OnRecordStartdNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ OnRecordStartdNotification::OnRecordStartdNotification(
OnRecordStartdNotification::~OnRecordStartdNotification() {}
void OnRecordStartdNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_resume_audio_source_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_resume_audio_source_notification.cc
index 11d549655e..a56a6a26e1 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_resume_audio_source_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_resume_audio_source_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnResumeAudioSourceNotification::OnResumeAudioSourceNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnResumeAudioSourceNotification::OnResumeAudioSourceNotification(
OnResumeAudioSourceNotification::~OnResumeAudioSourceNotification() {}
void OnResumeAudioSourceNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_close_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_close_notification.cc
index d0c584c66c..90a6cdf1ce 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_close_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_close_notification.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnSDLCloseNotification::OnSDLCloseNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ OnSDLCloseNotification::OnSDLCloseNotification(
OnSDLCloseNotification::~OnSDLCloseNotification() {}
void OnSDLCloseNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_consent_needed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_consent_needed_notification.cc
index 314a9e8f71..0774414222 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_consent_needed_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_consent_needed_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnSDLConsentNeededNotification::OnSDLConsentNeededNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnSDLConsentNeededNotification::OnSDLConsentNeededNotification(
OnSDLConsentNeededNotification::~OnSDLConsentNeededNotification() {}
void OnSDLConsentNeededNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_persistence_complete_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_persistence_complete_notification.cc
index 5db38d070b..efa880f484 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_persistence_complete_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_sdl_persistence_complete_notification.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnSDLPersistenceCompleteNotification::OnSDLPersistenceCompleteNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ OnSDLPersistenceCompleteNotification::OnSDLPersistenceCompleteNotification(
OnSDLPersistenceCompleteNotification::~OnSDLPersistenceCompleteNotification() {}
void OnSDLPersistenceCompleteNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_service_update_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_service_update_notification.cc
index de03b75214..c1f8c337bb 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_service_update_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_service_update_notification.cc
@@ -39,6 +39,8 @@ namespace commands {
namespace hmi {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnServiceUpdateNotification::OnServiceUpdateNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ OnServiceUpdateNotification::OnServiceUpdateNotification(
OnServiceUpdateNotification::~OnServiceUpdateNotification() {}
void OnServiceUpdateNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_start_device_discovery.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_start_device_discovery.cc
index 035def10e0..5e86618b31 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_start_device_discovery.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_start_device_discovery.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnStartDeviceDiscovery::OnStartDeviceDiscovery(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ OnStartDeviceDiscovery::OnStartDeviceDiscovery(
OnStartDeviceDiscovery::~OnStartDeviceDiscovery() {}
void OnStartDeviceDiscovery::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
application_manager_.StartDevicesDiscovery();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_status_update_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_status_update_notification.cc
index 5ee2ede198..4a2e310151 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_status_update_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_status_update_notification.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnStatusUpdateNotification::OnStatusUpdateNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ OnStatusUpdateNotification::OnStatusUpdateNotification(
OnStatusUpdateNotification::~OnStatusUpdateNotification() {}
void OnStatusUpdateNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_context_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_context_notification.cc
index bf52492ae1..c86ef48225 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_context_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_context_notification.cc
@@ -40,6 +40,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnSystemContextNotification::OnSystemContextNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ OnSystemContextNotification::OnSystemContextNotification(
OnSystemContextNotification::~OnSystemContextNotification() {}
void OnSystemContextNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
mobile_api::SystemContext::eType system_context =
static_cast<mobile_api::SystemContext::eType>(
@@ -93,7 +95,7 @@ void OnSystemContextNotification::Run() {
application_manager_.state_controller().SetRegularState(
app, window_id, system_context);
} else {
- LOG4CXX_ERROR(logger_, "Application does not exist");
+ SDL_LOG_ERROR("Application does not exist");
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_error_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_error_notification.cc
index 9b8523e882..1f0d02ac83 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_error_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_error_notification.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnSystemErrorNotification::OnSystemErrorNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ OnSystemErrorNotification::OnSystemErrorNotification(
OnSystemErrorNotification::~OnSystemErrorNotification() {}
void OnSystemErrorNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const int code =
(*message_)[strings::msg_params][hmi_notification::error].asInt();
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_info_changed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_info_changed_notification.cc
index 171c144055..48071cc1b2 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_info_changed_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_info_changed_notification.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnSystemInfoChangedNotification::OnSystemInfoChangedNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,12 +57,11 @@ OnSystemInfoChangedNotification::OnSystemInfoChangedNotification(
OnSystemInfoChangedNotification::~OnSystemInfoChangedNotification() {}
void OnSystemInfoChangedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t lang_code =
(*message_)[strings::msg_params][strings::language].asUInt();
- const std::string language =
- application_manager::MessageHelper::CommonLanguageToString(
- static_cast<hmi_apis::Common_Language::eType>(lang_code));
+ const std::string language = application_manager::EnumToString(
+ static_cast<hmi_apis::Common_Language::eType>(lang_code));
policy_handler_.OnSystemInfoChanged(language);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_request_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_request_notification.cc
index d96d2bb90e..b75081e30f 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_request_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_request_notification.cc
@@ -48,6 +48,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnSystemRequestNotification::OnSystemRequestNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -63,7 +65,7 @@ OnSystemRequestNotification::OnSystemRequestNotification(
OnSystemRequestNotification::~OnSystemRequestNotification() {}
void OnSystemRequestNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject& params = (*message_)[strings::params];
smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
@@ -84,18 +86,19 @@ void OnSystemRequestNotification::Run() {
policy_handler_.CacheRetryInfo(msg_params.keyExists(strings::app_id)
? msg_params[strings::app_id].asUInt()
: 0,
- msg_params[strings::url].asString());
+ msg_params[strings::url].asString(),
+ msg_params[strings::file_name].asString());
} else {
// Clear cached retry info
- policy_handler_.CacheRetryInfo(0, std::string());
+ policy_handler_.CacheRetryInfo(
+ 0, std::string(), msg_params[strings::file_name].asString());
// URL and app are chosen by Core for PROPRIETARY mode normally
uint32_t app_id = 0;
msg_params[strings::url] = policy_handler_.GetNextUpdateUrl(
policy::PTUIterationType::DefaultIteration, app_id);
if (0 == app_id) {
- LOG4CXX_WARN(logger_,
- "Can't select application to forward OnSystemRequest.");
+ SDL_LOG_WARN("Can't select application to forward OnSystemRequest.");
return;
}
msg_params[strings::app_id] = app_id;
@@ -108,26 +111,24 @@ void OnSystemRequestNotification::Run() {
ApplicationSharedPtr app;
if (msg_params.keyExists(strings::app_id)) {
const uint32_t app_id = msg_params[strings::app_id].asUInt();
- LOG4CXX_DEBUG(logger_, "Received OnSystemRequest for appID " << app_id);
- LOG4CXX_DEBUG(logger_, "Searching app to send OnSystemRequest by appID.");
+ SDL_LOG_DEBUG("Received OnSystemRequest for appID " << app_id);
+ SDL_LOG_DEBUG("Searching app to send OnSystemRequest by appID.");
app = application_manager_.application(app_id);
} else {
- LOG4CXX_DEBUG(logger_,
- "Received OnSystemRequest without appID."
- " One of registered apps will be used.");
- LOG4CXX_DEBUG(logger_, "Searching registered app to send OnSystemRequest.");
+ SDL_LOG_DEBUG(
+ "Received OnSystemRequest without appID."
+ " One of registered apps will be used.");
+ SDL_LOG_DEBUG("Searching registered app to send OnSystemRequest.");
const uint32_t selected_app_id = policy_handler_.GetAppIdForSending();
if (0 == selected_app_id) {
- LOG4CXX_WARN(logger_,
- "Can't select application to forward OnSystemRequest.");
+ SDL_LOG_WARN("Can't select application to forward OnSystemRequest.");
return;
}
app = application_manager_.application(selected_app_id);
}
if (app.use_count() == 0) {
- LOG4CXX_WARN(logger_,
- "No valid application found to forward OnSystemRequest.");
+ SDL_LOG_WARN("No valid application found to forward OnSystemRequest.");
return;
}
@@ -138,16 +139,14 @@ void OnSystemRequestNotification::Run() {
if (policy::kDeviceAllowed !=
policy_handler_.GetUserConsentForDevice(device_mac)) {
- LOG4CXX_WARN(logger_,
- "Application "
- << app->policy_app_id()
- << " is registered from non-consented device."
- "Can't forward notification to application.");
+ SDL_LOG_WARN("Application "
+ << app->policy_app_id()
+ << " is registered from non-consented device. "
+ "Can't forward notification to application.");
return;
}
- LOG4CXX_DEBUG(logger_,
- "Sending request with application id " << app->policy_app_id());
+ SDL_LOG_DEBUG("Sending request with application id " << app->policy_app_id());
params[strings::connection_key] = app->app_id();
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_time_ready_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_time_ready_notification.cc
index b068835545..980c2ded17 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_time_ready_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_time_ready_notification.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnSystemTimeReadyNotification::OnSystemTimeReadyNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& app_man,
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc
index f89baad737..f652761178 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc
@@ -42,6 +42,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnTTSLanguageChangeNotification::OnTTSLanguageChangeNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -57,22 +59,31 @@ OnTTSLanguageChangeNotification::OnTTSLanguageChangeNotification(
OnTTSLanguageChangeNotification::~OnTTSLanguageChangeNotification() {}
void OnTTSLanguageChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ SDL_LOG_AUTO_TRACE();
- hmi_capabilities.set_active_tts_language(
+ hmi_capabilities_.set_active_tts_language(
static_cast<hmi_apis::Common_Language::eType>(
(*message_)[strings::msg_params][strings::language].asInt()));
/* need to clarify, because unchanged VR
cause WRONG_LANGUAGE on Register */
- hmi_capabilities.set_active_vr_language(
+ hmi_capabilities_.set_active_vr_language(
static_cast<hmi_apis::Common_Language::eType>(
(*message_)[strings::msg_params][strings::language].asInt()));
+ std::vector<std::string> sections_to_update{hmi_response::language};
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::tts, sections_to_update, message_->getSchema())) {
+ SDL_LOG_ERROR("Failed to save TTS.OnLanguageChange response to cache");
+ }
+
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::vr, sections_to_update, message_->getSchema())) {
+ SDL_LOG_ERROR("Failed to save VR.OnLanguageChange response to cache");
+ }
+
(*message_)[strings::msg_params][strings::hmi_display_language] =
- hmi_capabilities.active_ui_language();
+ hmi_capabilities_.active_ui_language();
(*message_)[strings::params][strings::function_id] =
static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_reset_timeout_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_reset_timeout_notification.cc
index 8b60762b31..96f6c5cd5b 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_reset_timeout_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_reset_timeout_notification.cc
@@ -40,6 +40,8 @@ namespace commands {
namespace hmi {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnTTSResetTimeoutNotification::OnTTSResetTimeoutNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ OnTTSResetTimeoutNotification::OnTTSResetTimeoutNotification(
OnTTSResetTimeoutNotification::~OnTTSResetTimeoutNotification() {}
void OnTTSResetTimeoutNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::TTS_OnResetTimeout);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_started_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_started_notification.cc
index 2d215b2ec9..4126a1bd21 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_started_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_started_notification.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnTTSStartedNotification::OnTTSStartedNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ OnTTSStartedNotification::OnTTSStartedNotification(
OnTTSStartedNotification::~OnTTSStartedNotification() {}
void OnTTSStartedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::TTS_Started);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_stopped_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_stopped_notification.cc
index 6910b188f2..da69c4670e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_stopped_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_stopped_notification.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnTTSStoppedNotification::OnTTSStoppedNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ OnTTSStoppedNotification::OnTTSStoppedNotification(
OnTTSStoppedNotification::~OnTTSStoppedNotification() {}
void OnTTSStoppedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::TTS_Stopped);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_command_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_command_notification.cc
index 6cc9f85d6f..939e3ad649 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_command_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_command_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnUICommandNotification::OnUICommandNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnUICommandNotification::OnUICommandNotification(
OnUICommandNotification::~OnUICommandNotification() {}
void OnUICommandNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
(*message_)[strings::params][strings::function_id] =
static_cast<int32_t>(mobile_apis::FunctionID::eType::OnCommandID);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_keyboard_input_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_keyboard_input_notification.cc
index f069e4ed65..d1aa146e4f 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_keyboard_input_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_keyboard_input_notification.cc
@@ -40,6 +40,8 @@ namespace commands {
namespace hmi {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnUIKeyBoardInputNotification::OnUIKeyBoardInputNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ OnUIKeyBoardInputNotification::OnUIKeyBoardInputNotification(
OnUIKeyBoardInputNotification::~OnUIKeyBoardInputNotification() {}
void OnUIKeyBoardInputNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc
index 697b2036c4..2f2cb2ddc6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc
@@ -42,6 +42,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnUILanguageChangeNotification::OnUILanguageChangeNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -57,19 +59,23 @@ OnUILanguageChangeNotification::OnUILanguageChangeNotification(
OnUILanguageChangeNotification::~OnUILanguageChangeNotification() {}
void OnUILanguageChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ SDL_LOG_AUTO_TRACE();
- hmi_capabilities.set_active_ui_language(
+ hmi_capabilities_.set_active_ui_language(
static_cast<hmi_apis::Common_Language::eType>(
(*message_)[strings::msg_params][strings::language].asInt()));
+ std::vector<std::string> sections_to_update{hmi_response::language};
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::ui, sections_to_update, message_->getSchema())) {
+ SDL_LOG_ERROR("Failed to save UI.OnLanguageChange response to cache");
+ }
+
(*message_)[strings::msg_params][strings::hmi_display_language] =
(*message_)[strings::msg_params][strings::language];
(*message_)[strings::msg_params][strings::language] =
- hmi_capabilities.active_vr_language();
+ hmi_capabilities_.active_vr_language();
(*message_)[strings::params][strings::function_id] =
static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_reset_timeout_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_reset_timeout_notification.cc
index bd1e1b8ea7..d8de31cfbc 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_reset_timeout_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_reset_timeout_notification.cc
@@ -41,6 +41,8 @@ namespace commands {
namespace hmi {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnUIResetTimeoutNotification::OnUIResetTimeoutNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ OnUIResetTimeoutNotification::OnUIResetTimeoutNotification(
OnUIResetTimeoutNotification::~OnUIResetTimeoutNotification() {}
void OnUIResetTimeoutNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_OnResetTimeout);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_subtle_alert_pressed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_subtle_alert_pressed_notification.cc
new file mode 100644
index 0000000000..dedeb38a34
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_subtle_alert_pressed_notification.cc
@@ -0,0 +1,65 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "sdl_rpc_plugin/commands/hmi/on_ui_subtle_alert_pressed_notification.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SDL_CREATE_LOG_VARIABLE("Commands")
+
+OnUISubtleAlertPressedNotification::OnUISubtleAlertPressedNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+OnUISubtleAlertPressedNotification::~OnUISubtleAlertPressedNotification() {}
+
+void OnUISubtleAlertPressedNotification::Run() {
+ SDL_LOG_AUTO_TRACE();
+
+ (*message_)[strings::params][strings::function_id] = static_cast<int32_t>(
+ mobile_apis::FunctionID::eType::OnSubtleAlertPressedID);
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_touch_event_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_touch_event_notification.cc
index 193c3666d2..ae980070ea 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_touch_event_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_touch_event_notification.cc
@@ -40,6 +40,8 @@ namespace commands {
namespace hmi {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnUITouchEventNotification::OnUITouchEventNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ OnUITouchEventNotification::OnUITouchEventNotification(
OnUITouchEventNotification::~OnUITouchEventNotification() {}
void OnUITouchEventNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_update_file_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_update_file_notification.cc
new file mode 100644
index 0000000000..b0821a0890
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_update_file_notification.cc
@@ -0,0 +1,90 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "sdl_rpc_plugin/commands/hmi/on_ui_update_file_notification.h"
+#include "application_manager/application_impl.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/MOBILE_API.h"
+#include "utils/file_system.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+SDL_CREATE_LOG_VARIABLE("Commands")
+
+OnUIUpdateFileNotification::OnUIUpdateFileNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+OnUIUpdateFileNotification::~OnUIUpdateFileNotification() {}
+
+void OnUIUpdateFileNotification::Run() {
+ SDL_LOG_AUTO_TRACE();
+
+ // Prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::OnUpdateFileID);
+
+ const auto app_id =
+ (*message_)[strings::msg_params][strings::app_id].asUInt();
+ auto app = application_manager_.application(app_id);
+
+ if (!app) {
+ SDL_LOG_ERROR("Application with app_id " << app_id << " is not registered");
+ return;
+ }
+
+ // Remove app_id from notification to mobile
+ (*message_)[strings::params][strings::connection_key] =
+ (*message_)[strings::msg_params][strings::app_id];
+ (*message_)[strings::msg_params].erase(strings::app_id);
+
+ // Parse fileName in case the full path was sent by the HMI
+ auto fileName =
+ (*message_)[strings::msg_params][strings::file_name].asString();
+ (*message_)[strings::msg_params][strings::file_name] =
+ file_system::GetFileName(fileName);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_update_sub_menu_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_update_sub_menu_notification.cc
new file mode 100644
index 0000000000..2e8c37f7cd
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_update_sub_menu_notification.cc
@@ -0,0 +1,82 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "sdl_rpc_plugin/commands/hmi/on_ui_update_sub_menu_notification.h"
+#include "application_manager/application_impl.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+SDL_CREATE_LOG_VARIABLE("Commands")
+
+OnUIUpdateSubMenuNotification::OnUIUpdateSubMenuNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : NotificationFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+OnUIUpdateSubMenuNotification::~OnUIUpdateSubMenuNotification() {}
+
+void OnUIUpdateSubMenuNotification::Run() {
+ SDL_LOG_AUTO_TRACE();
+ // Prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::OnUpdateSubMenuID);
+
+ const auto app_id =
+ (*message_)[strings::msg_params][strings::app_id].asUInt();
+ auto app = application_manager_.application(app_id);
+
+ if (!app) {
+ SDL_LOG_ERROR("Application with app_id " << app_id << " is not registered");
+ return;
+ }
+
+ // Remove app_id from notification to mobile
+ (*message_)[strings::params][strings::connection_key] =
+ (*message_)[strings::msg_params][strings::app_id];
+ (*message_)[strings::msg_params].erase(strings::app_id);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_update_device_list.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_update_device_list.cc
index e6275adab2..0ff97a664c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_update_device_list.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_update_device_list.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnUpdateDeviceList::OnUpdateDeviceList(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ OnUpdateDeviceList::OnUpdateDeviceList(
OnUpdateDeviceList::~OnUpdateDeviceList() {}
void OnUpdateDeviceList::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_acc_pedal_position_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_acc_pedal_position_notification.cc
index 99c6520fee..9f4e707b83 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_acc_pedal_position_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_acc_pedal_position_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIAccPedalPositionNotification::OnVIAccPedalPositionNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIAccPedalPositionNotification::OnVIAccPedalPositionNotification(
OnVIAccPedalPositionNotification::~OnVIAccPedalPositionNotification() {}
void OnVIAccPedalPositionNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_belt_status_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_belt_status_notification.cc
index dbfd9487e3..4227847153 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_belt_status_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_belt_status_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIBeltStatusNotification::OnVIBeltStatusNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIBeltStatusNotification::OnVIBeltStatusNotification(
OnVIBeltStatusNotification::~OnVIBeltStatusNotification() {}
void OnVIBeltStatusNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_body_information_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_body_information_notification.cc
index b8e66b9c0f..663f9342f4 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_body_information_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_body_information_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIBodyInformationNotification::OnVIBodyInformationNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIBodyInformationNotification::OnVIBodyInformationNotification(
OnVIBodyInformationNotification::~OnVIBodyInformationNotification() {}
void OnVIBodyInformationNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_device_status_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_device_status_notification.cc
index 418c751d1c..62bec16546 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_device_status_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_device_status_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIDeviceStatusNotification::OnVIDeviceStatusNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIDeviceStatusNotification::OnVIDeviceStatusNotification(
OnVIDeviceStatusNotification::~OnVIDeviceStatusNotification() {}
void OnVIDeviceStatusNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_driver_braking_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_driver_braking_notification.cc
index 29545fcd87..722fddc5f1 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_driver_braking_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_driver_braking_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIDriverBrakingNotification::OnVIDriverBrakingNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIDriverBrakingNotification::OnVIDriverBrakingNotification(
OnVIDriverBrakingNotification::~OnVIDriverBrakingNotification() {}
void OnVIDriverBrakingNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_engine_torque_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_engine_torque_notification.cc
index 4c2fb94400..8c524a3f1d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_engine_torque_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_engine_torque_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIEngineTorqueNotification::OnVIEngineTorqueNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIEngineTorqueNotification::OnVIEngineTorqueNotification(
OnVIEngineTorqueNotification::~OnVIEngineTorqueNotification() {}
void OnVIEngineTorqueNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_external_temperature_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_external_temperature_notification.cc
index 6ac26a74fc..3cbd22eb97 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_external_temperature_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_external_temperature_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIExternalTemperatureNotification::OnVIExternalTemperatureNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIExternalTemperatureNotification::OnVIExternalTemperatureNotification(
OnVIExternalTemperatureNotification::~OnVIExternalTemperatureNotification() {}
void OnVIExternalTemperatureNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_notification.cc
index 1f1cad5b8b..8065434063 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIFuelLevelNotification::OnVIFuelLevelNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIFuelLevelNotification::OnVIFuelLevelNotification(
OnVIFuelLevelNotification::~OnVIFuelLevelNotification() {}
void OnVIFuelLevelNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_state_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_state_notification.cc
index 31c80860fd..c0c60108f3 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_state_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_fuel_level_state_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIFuelLevelStateNotification::OnVIFuelLevelStateNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIFuelLevelStateNotification::OnVIFuelLevelStateNotification(
OnVIFuelLevelStateNotification::~OnVIFuelLevelStateNotification() {}
void OnVIFuelLevelStateNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_gps_data_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_gps_data_notification.cc
index 43ae3524ad..1e18d18eba 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_gps_data_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_gps_data_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIGpsDataNotification::OnVIGpsDataNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIGpsDataNotification::OnVIGpsDataNotification(
OnVIGpsDataNotification::~OnVIGpsDataNotification() {}
void OnVIGpsDataNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_head_lamp_status_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_head_lamp_status_notification.cc
index 282a173b69..29906df43f 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_head_lamp_status_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_head_lamp_status_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIHeadLampStatusNotification::OnVIHeadLampStatusNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIHeadLampStatusNotification::OnVIHeadLampStatusNotification(
OnVIHeadLampStatusNotification::~OnVIHeadLampStatusNotification() {}
void OnVIHeadLampStatusNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc
index f9bb3eca3f..c4bc32e825 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_instant_fuel_consumption_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIInstantFuelConsumptionNotification::OnVIInstantFuelConsumptionNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ OnVIInstantFuelConsumptionNotification::
~OnVIInstantFuelConsumptionNotification() {}
void OnVIInstantFuelConsumptionNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_my_key_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_my_key_notification.cc
index 8f5e845c02..6139d143f6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_my_key_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_my_key_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIMyKeyNotification::OnVIMyKeyNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIMyKeyNotification::OnVIMyKeyNotification(
OnVIMyKeyNotification::~OnVIMyKeyNotification() {}
void OnVIMyKeyNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_odometer_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_odometer_notification.cc
index ea5d8be9ca..92f4b47fcf 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_odometer_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_odometer_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIOdometerNotification::OnVIOdometerNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIOdometerNotification::OnVIOdometerNotification(
OnVIOdometerNotification::~OnVIOdometerNotification() {}
void OnVIOdometerNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_prndl_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_prndl_notification.cc
index 73231ff4de..c2afd7d697 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_prndl_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_prndl_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIPrndlNotification::OnVIPrndlNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIPrndlNotification::OnVIPrndlNotification(
OnVIPrndlNotification::~OnVIPrndlNotification() {}
void OnVIPrndlNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_rpm_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_rpm_notification.cc
index 4587939b8f..f41f5d3f56 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_rpm_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_rpm_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIRpmNotification::OnVIRpmNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIRpmNotification::OnVIRpmNotification(
OnVIRpmNotification::~OnVIRpmNotification() {}
void OnVIRpmNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_speed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_speed_notification.cc
index df0bfd5cd7..73313b6ea4 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_speed_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_speed_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVISpeedNotification::OnVISpeedNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVISpeedNotification::OnVISpeedNotification(
OnVISpeedNotification::~OnVISpeedNotification() {}
void OnVISpeedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc
index b7eaad7edf..e04eaab3b4 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_steering_wheel_angle_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVISteeringWheelAngleNotification::OnVISteeringWheelAngleNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVISteeringWheelAngleNotification::OnVISteeringWheelAngleNotification(
OnVISteeringWheelAngleNotification::~OnVISteeringWheelAngleNotification() {}
void OnVISteeringWheelAngleNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_tire_pressure_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_tire_pressure_notification.cc
index 5f438ef8d1..bc013c2e2c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_tire_pressure_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_tire_pressure_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVITirePressureNotification::OnVITirePressureNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVITirePressureNotification::OnVITirePressureNotification(
OnVITirePressureNotification::~OnVITirePressureNotification() {}
void OnVITirePressureNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_vin_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_vin_notification.cc
index 1b40da4c40..4b33c2d589 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_vin_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_vin_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIVinNotification::OnVIVinNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIVinNotification::OnVIVinNotification(
OnVIVinNotification::~OnVIVinNotification() {}
void OnVIVinNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_wiper_status_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_wiper_status_notification.cc
index 7221e88ef1..dde1e642c3 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_wiper_status_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vi_wiper_status_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIWiperStatusNotification::OnVIWiperStatusNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVIWiperStatusNotification::OnVIWiperStatusNotification(
OnVIWiperStatusNotification::~OnVIWiperStatusNotification() {}
void OnVIWiperStatusNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_video_data_streaming_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_video_data_streaming_notification.cc
index 7d5c0165aa..a2e56300f0 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_video_data_streaming_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_video_data_streaming_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVideoDataStreamingNotification::OnVideoDataStreamingNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnVideoDataStreamingNotification::OnVideoDataStreamingNotification(
OnVideoDataStreamingNotification::~OnVideoDataStreamingNotification() {}
void OnVideoDataStreamingNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_command_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_command_notification.cc
index c4678f69e0..366a17ec64 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_command_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_command_notification.cc
@@ -45,6 +45,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVRCommandNotification::OnVRCommandNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -60,14 +62,14 @@ OnVRCommandNotification::OnVRCommandNotification(
OnVRCommandNotification::~OnVRCommandNotification() {}
void OnVRCommandNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const uint32_t cmd_id =
(*message_)[strings::msg_params][strings::cmd_id].asUInt();
uint32_t max_cmd_id = application_manager_.get_settings().max_cmd_id();
// Check if this is one of standard VR commands (i.e. "Help")
if (cmd_id > max_cmd_id + 1) {
- LOG4CXX_INFO(logger_, "Switched App");
+ SDL_LOG_INFO("Switched App");
const uint32_t app_id = cmd_id - max_cmd_id;
ApplicationSharedPtr app = application_manager_.application(app_id);
if (app) {
@@ -77,7 +79,7 @@ void OnVRCommandNotification::Run() {
mobile_apis::HMILevel::HMI_FULL,
true);
} else {
- LOG4CXX_ERROR(logger_, "Unable to find appication " << app_id);
+ SDL_LOG_ERROR("Unable to find appication " << app_id);
}
return;
}
@@ -90,7 +92,7 @@ void OnVRCommandNotification::Run() {
(*message_)[strings::msg_params][strings::app_id].asUInt();
ApplicationSharedPtr app = application_manager_.application(app_id);
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return;
}
/* check if perform interaction is active
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc
index c308af9b92..bf00291c88 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc
@@ -43,6 +43,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVRLanguageChangeNotification::OnVRLanguageChangeNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -58,26 +60,27 @@ OnVRLanguageChangeNotification::OnVRLanguageChangeNotification(
OnVRLanguageChangeNotification::~OnVRLanguageChangeNotification() {}
void OnVRLanguageChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
-
- HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ SDL_LOG_AUTO_TRACE();
- hmi_capabilities.set_active_vr_language(
+ hmi_capabilities_.set_active_vr_language(
static_cast<hmi_apis::Common_Language::eType>(
(*message_)[strings::msg_params][strings::language].asInt()));
+ std::vector<std::string> sections_to_update{hmi_response::language};
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::vr, sections_to_update, message_->getSchema())) {
+ SDL_LOG_ERROR("Failed to save VR.OnLanguageChange response to cache");
+ }
+
(*message_)[strings::msg_params][strings::hmi_display_language] =
- hmi_capabilities.active_ui_language();
+ hmi_capabilities_.active_ui_language();
(*message_)[strings::params][strings::function_id] =
static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
- const ApplicationSet& accessor =
- application_manager_.applications().GetData();
+ const auto applications = application_manager_.applications().GetData();
- ApplicationSetConstIt it = accessor.begin();
- for (; accessor.end() != it;) {
- ApplicationSharedPtr app = *it++;
+ for (auto app : applications) {
(*message_)[strings::params][strings::connection_key] = app->app_id();
SendNotificationToMobile(message_);
if (static_cast<int32_t>(app->language()) !=
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_started_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_started_notification.cc
index bfc033a865..ab0ef67535 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_started_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_started_notification.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVRStartedNotification::OnVRStartedNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ OnVRStartedNotification::OnVRStartedNotification(
OnVRStartedNotification::~OnVRStartedNotification() {}
void OnVRStartedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::VR_Started);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_stopped_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_stopped_notification.cc
index ede1efab85..e784eac244 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_stopped_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_stopped_notification.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVRStoppedNotification::OnVRStoppedNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ OnVRStoppedNotification::OnVRStoppedNotification(
OnVRStoppedNotification::~OnVRStoppedNotification() {}
void OnVRStoppedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::VR_Stopped);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_request.cc
index d8ad6087a6..774acf54f1 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RCGetCapabilitiesRequest::RCGetCapabilitiesRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +54,17 @@ RCGetCapabilitiesRequest::RCGetCapabilitiesRequest(
RCGetCapabilitiesRequest::~RCGetCapabilitiesRequest() {}
void RCGetCapabilitiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void RCGetCapabilitiesRequest::onTimeOut() {
+ SDL_LOG_AUTO_TRACE();
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::RC_GetCapabilities);
+}
+
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_response.cc
index 128b111c5e..10507a516f 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_get_capabilities_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RCGetCapabilitiesResponse::RCGetCapabilitiesResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,15 +53,27 @@ RCGetCapabilitiesResponse::RCGetCapabilitiesResponse(
RCGetCapabilitiesResponse::~RCGetCapabilitiesResponse() {}
void RCGetCapabilitiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
+
+ const auto result_code = static_cast<hmi_apis::Common_Result::eType>(
+ (*message_)[strings::params][hmi_response::code].asInt());
- HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::RC_GetCapabilities);
+
+ if (hmi_apis::Common_Result::SUCCESS != result_code) {
+ SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities");
+ return;
+ }
+
+ std::vector<std::string> sections_to_update;
bool rc_capability_exists =
(*message_)[strings::msg_params].keyExists(strings::rc_capability);
if (rc_capability_exists) {
- hmi_capabilities.set_rc_capability(
+ hmi_capabilities_.set_rc_capability(
(*message_)[strings::msg_params][strings::rc_capability]);
+ sections_to_update.push_back(strings::rc_capability);
}
bool seat_location_capability_exists =
@@ -67,11 +81,17 @@ void RCGetCapabilitiesResponse::Run() {
strings::seat_location_capability);
if (seat_location_capability_exists) {
- hmi_capabilities.set_seat_location_capability(
+ hmi_capabilities_.set_seat_location_capability(
(*message_)[strings::msg_params][strings::seat_location_capability]);
+ sections_to_update.push_back(strings::seat_location_capability);
}
- hmi_capabilities.set_rc_supported(rc_capability_exists);
+ hmi_capabilities_.set_rc_supported(rc_capability_exists);
+
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::rc, sections_to_update, message_->getSchema())) {
+ SDL_LOG_ERROR("Failed to save RC.GetCapabilities response to cache");
+ }
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_request.cc
index 5e4af1503a..c9a9af87fb 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_request.cc
@@ -31,6 +31,9 @@
*/
#include "sdl_rpc_plugin/commands/hmi/rc_is_ready_request.h"
+
+#include <set>
+
#include "application_manager/rpc_service.h"
namespace sdl_rpc_plugin {
@@ -38,6 +41,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RCIsReadyRequest::RCIsReadyRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,17 +59,17 @@ RCIsReadyRequest::RCIsReadyRequest(
RCIsReadyRequest::~RCIsReadyRequest() {}
void RCIsReadyRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
subscribe_on_event(hmi_apis::FunctionID::RC_IsReady, correlation_id());
SendRequest();
}
void RCIsReadyRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::RC_IsReady: {
- LOG4CXX_DEBUG(logger_, "Received RC_IsReady event");
+ SDL_LOG_DEBUG("Received RC_IsReady event");
unsubscribe_from_event(hmi_apis::FunctionID::RC_IsReady);
const bool is_available = app_mngr::commands::ChangeInterfaceState(
application_manager_, message, HmiInterfaces::HMI_INTERFACE_RC);
@@ -77,15 +82,16 @@ void RCIsReadyRequest::on_event(const event_engine::Event& event) {
if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
application_manager_, HmiInterfaces::HMI_INTERFACE_RC)) {
- LOG4CXX_INFO(logger_,
- "HmiInterfaces::HMI_INTERFACE_RC isn't available");
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::RC_GetCapabilities);
+ SDL_LOG_INFO("HmiInterfaces::HMI_INTERFACE_RC isn't available");
return;
}
- SendMessageToHMI();
+ RequestInterfaceCapabilities(hmi_interface::rc);
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
@@ -93,14 +99,7 @@ void RCIsReadyRequest::on_event(const event_engine::Event& event) {
void RCIsReadyRequest::onTimeOut() {
// Note(dtrunov): According to new requirment APPLINK-27956
- SendMessageToHMI();
-}
-
-void RCIsReadyRequest::SendMessageToHMI() {
- std::shared_ptr<smart_objects::SmartObject> get_capabilities(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::RC_GetCapabilities, application_manager_));
- rpc_service_.ManageHMICommand(get_capabilities);
+ RequestInterfaceCapabilities(hmi_interface::rc);
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_response.cc
index 71e16a831c..1ad9a30a23 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/rc_is_ready_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RCIsReadyResponse::RCIsReadyResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ RCIsReadyResponse::RCIsReadyResponse(
RCIsReadyResponse::~RCIsReadyResponse() {}
void RCIsReadyResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::RC_IsReady);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_request.cc
index 0a6632fca8..66ac9c458b 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_request.cc
@@ -43,7 +43,7 @@ namespace commands {
namespace {
struct ProtoV4AppsOnDevice : std::unary_function<ApplicationSharedPtr, bool> {
connection_handler::DeviceHandle handle_;
- ProtoV4AppsOnDevice(const connection_handler::DeviceHandle handle)
+ explicit ProtoV4AppsOnDevice(const connection_handler::DeviceHandle handle)
: handle_(handle) {}
bool operator()(const ApplicationSharedPtr app) const {
return app ? handle_ == app->device() &&
@@ -82,6 +82,8 @@ struct SendLaunchApp
};
} // namespace
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SDLActivateAppRequest::SDLActivateAppRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -99,12 +101,11 @@ SDLActivateAppRequest::~SDLActivateAppRequest() {}
uint32_t SDLActivateAppRequest::app_id() const {
using namespace strings;
if (!(*message_).keyExists(msg_params)) {
- LOG4CXX_DEBUG(logger_, msg_params << " section is absent in the message.");
+ SDL_LOG_DEBUG(msg_params << " section is absent in the message.");
return 0;
}
if (!(*message_)[msg_params].keyExists(strings::app_id)) {
- LOG4CXX_DEBUG(logger_,
- strings::app_id << " section is absent in the message.");
+ SDL_LOG_DEBUG(strings::app_id << " section is absent in the message.");
return 0;
}
return (*message_)[msg_params][strings::app_id].asUInt();
@@ -112,22 +113,31 @@ uint32_t SDLActivateAppRequest::app_id() const {
#ifdef EXTERNAL_PROPRIETARY_MODE
void SDLActivateAppRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace hmi_apis::FunctionID;
ApplicationConstSharedPtr app =
application_manager_.WaitingApplicationByID(app_id());
+
+ if (!app) {
+ app = application_manager_.application(app_id());
+ if (!app) {
+ SDL_LOG_WARN("Can't find application within waiting apps: " << app_id());
+ return;
+ }
+ }
+
if (application_manager_.state_controller().IsStateActive(
HmiState::STATE_ID_DEACTIVATE_HMI)) {
- LOG4CXX_DEBUG(logger_,
- "DeactivateHmi state is active. "
- "Sends response with result code REJECTED");
+ SDL_LOG_DEBUG(
+ "DeactivateHmi state is active. "
+ "Sends response with result code REJECTED");
SendErrorResponse(correlation_id(),
static_cast<eType>(function_id()),
hmi_apis::Common_Result::REJECTED,
"HMIDeactivate is active");
} else if (app && !app->IsRegistered() && app->is_cloud_app()) {
- LOG4CXX_DEBUG(logger_, "Starting cloud application.");
+ SDL_LOG_DEBUG("Starting cloud application.");
const ApplicationManagerSettings& settings =
application_manager_.get_settings();
uint32_t total_retry_timeout = (settings.cloud_app_retry_timeout() *
@@ -138,13 +148,25 @@ void SDLActivateAppRequest::Run() {
application_manager_.connection_handler().ConnectToDevice(app->device());
} else {
const uint32_t application_id = app_id();
+ auto main_state =
+ app->CurrentHmiState(mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
+ if (mobile_apis::HMILevel::INVALID_ENUM == main_state->hmi_level()) {
+ SDL_LOG_DEBUG(
+ "Application registration is not completed, HMI level hasn't set "
+ "yet, postpone activation");
+ auto& postponed_activation_ctrl = application_manager_.state_controller()
+ .GetPostponedActivationController();
+ postponed_activation_ctrl.AddAppToActivate(application_id,
+ correlation_id());
+ return;
+ }
policy_handler_.OnActivateApp(application_id, correlation_id());
}
}
#else // EXTERNAL_PROPRIETARY_MODE
void SDLActivateAppRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace hmi_apis::FunctionID;
using namespace hmi_apis::Common_Result;
@@ -162,22 +184,20 @@ void SDLActivateAppRequest::Run() {
application_manager_.WaitingApplicationByID(application_id);
if (!app_to_activate) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Can't find application within waiting apps: " << application_id);
return;
}
}
- LOG4CXX_DEBUG(logger_,
- "Found application to activate. Application id is "
- << app_to_activate->app_id());
+ SDL_LOG_DEBUG("Found application to activate. Application id is "
+ << app_to_activate->app_id());
if (application_manager_.state_controller().IsStateActive(
HmiState::StateID::STATE_ID_DEACTIVATE_HMI)) {
- LOG4CXX_WARN(logger_,
- "DeactivateHmi state is active. "
- "Sends response with result code REJECTED");
+ SDL_LOG_WARN(
+ "DeactivateHmi state is active. "
+ "Sends response with result code REJECTED");
SendErrorResponse(correlation_id(),
static_cast<hmi_apis::FunctionID::eType>(function_id()),
hmi_apis::Common_Result::REJECTED,
@@ -186,11 +206,23 @@ void SDLActivateAppRequest::Run() {
}
if (app_to_activate->IsRegistered()) {
- LOG4CXX_DEBUG(logger_, "Application is registered. Activating.");
+ SDL_LOG_DEBUG("Application is registered. Activating.");
+ auto main_state = app_to_activate->CurrentHmiState(
+ mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
+ if (mobile_apis::HMILevel::INVALID_ENUM == main_state->hmi_level()) {
+ SDL_LOG_DEBUG(
+ "Application registration is not completed, HMI level hasn't set "
+ "yet, postpone activation");
+ auto& postponed_activation_ctrl = application_manager_.state_controller()
+ .GetPostponedActivationController();
+ postponed_activation_ctrl.AddAppToActivate(application_id,
+ correlation_id());
+ return;
+ }
policy_handler_.OnActivateApp(application_id, correlation_id());
return;
} else if (app_to_activate->is_cloud_app()) {
- LOG4CXX_DEBUG(logger_, "Starting cloud application.");
+ SDL_LOG_DEBUG("Starting cloud application.");
const ApplicationManagerSettings& settings =
application_manager_.get_settings();
uint32_t total_retry_timeout = (settings.cloud_app_retry_timeout() *
@@ -208,29 +240,29 @@ void SDLActivateAppRequest::Run() {
V4ProtoApps v4_proto_apps = get_v4_proto_apps(device_handle);
if (!foreground_v4_app && v4_proto_apps.empty()) {
- LOG4CXX_ERROR(logger_,
- "Can't find regular foreground app with the same "
- "connection id:"
- << device_handle);
+ SDL_LOG_ERROR(
+ "Can't find regular foreground app with the same "
+ "connection id: "
+ << device_handle);
SendErrorResponse(
correlation_id(), SDL_ActivateApp, NO_APPS_REGISTERED, "");
return;
}
- LOG4CXX_DEBUG(logger_,
- "Application is not registered yet. "
- "Sending launch request.");
+ SDL_LOG_DEBUG(
+ "Application is not registered yet. "
+ "Sending launch request.");
if (foreground_v4_app) {
- LOG4CXX_DEBUG(logger_, "Sending request to foreground application.");
+ SDL_LOG_DEBUG("Sending request to foreground application.");
MessageHelper::SendLaunchApp(foreground_v4_app->app_id(),
app_to_activate->SchemaUrl(),
app_to_activate->PackageName(),
application_manager_);
} else {
- LOG4CXX_DEBUG(logger_,
- "No preffered (foreground) application is found. "
- "Sending request to all v4 applications.");
+ SDL_LOG_DEBUG(
+ "No preffered (foreground) application is found. "
+ "Sending request to all v4 applications.");
std::for_each(v4_proto_apps.begin(),
v4_proto_apps.end(),
SendLaunchApp(app_to_activate, application_manager_));
@@ -266,10 +298,23 @@ void SDLActivateAppRequest::on_event(const event_engine::Event& event) {
ApplicationSharedPtr app =
application_manager_.application_by_hmi_app(hmi_application_id);
if (!app) {
- LOG4CXX_ERROR(
- logger_, "Application not found by HMI app id: " << hmi_application_id);
+ SDL_LOG_ERROR(
+ "Application not found by HMI app id: " << hmi_application_id);
return;
}
+
+ auto main_state =
+ app->CurrentHmiState(mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
+ if (mobile_apis::HMILevel::INVALID_ENUM == main_state->hmi_level()) {
+ SDL_LOG_DEBUG(
+ "Application registration is not completed, HMI level hasn't set "
+ "yet, postpone activation");
+ auto& postponed_activation_ctrl = application_manager_.state_controller()
+ .GetPostponedActivationController();
+ postponed_activation_ctrl.AddAppToActivate(app->app_id(), correlation_id());
+ return;
+ }
+
policy_handler_.OnActivateApp(app->app_id(), correlation_id());
}
@@ -277,16 +322,15 @@ uint32_t SDLActivateAppRequest::hmi_app_id(
const smart_objects::SmartObject& so) const {
using namespace strings;
if (!so.keyExists(params)) {
- LOG4CXX_DEBUG(logger_, params << " section is absent in the message.");
+ SDL_LOG_DEBUG(params << " section is absent in the message.");
return 0;
}
if (!so[msg_params].keyExists(application)) {
- LOG4CXX_DEBUG(logger_, application << " section is absent in the message.");
+ SDL_LOG_DEBUG(application << " section is absent in the message.");
return 0;
}
if (!so[msg_params][application].keyExists(strings::app_id)) {
- LOG4CXX_DEBUG(logger_,
- strings::app_id << " section is absent in the message.");
+ SDL_LOG_DEBUG(strings::app_id << " section is absent in the message.");
return 0;
}
return so[msg_params][application][strings::app_id].asUInt();
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_response.cc
index 560b75213c..2748c23a65 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_activate_app_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SDLActivateAppResponse::SDLActivateAppResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ SDLActivateAppResponse::SDLActivateAppResponse(
SDLActivateAppResponse::~SDLActivateAppResponse() {}
void SDLActivateAppResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
(*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
(*message_)[strings::params][strings::protocol_version] = protocol_version_;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_request.cc
index c8266e0f39..6cf855904c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_request.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SDLGetListOfPermissionsRequest::SDLGetListOfPermissionsRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ SDLGetListOfPermissionsRequest::SDLGetListOfPermissionsRequest(
SDLGetListOfPermissionsRequest::~SDLGetListOfPermissionsRequest() {}
void SDLGetListOfPermissionsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t connection_key = 0;
if ((*message_)[strings::msg_params].keyExists(strings::app_id)) {
connection_key = (*message_)[strings::msg_params][strings::app_id].asUInt();
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_response.cc
index 280d2cb071..b27fe08b47 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_list_of_permissions_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SDLGetListOfPermissionsResponse::SDLGetListOfPermissionsResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ SDLGetListOfPermissionsResponse::SDLGetListOfPermissionsResponse(
SDLGetListOfPermissionsResponse::~SDLGetListOfPermissionsResponse() {}
void SDLGetListOfPermissionsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
(*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
(*message_)[strings::params][strings::protocol_version] = protocol_version_;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_request.cc
index 52b7f83e9b..7478a40eeb 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_request.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SDLGetPolicyConfigurationDataRequest::SDLGetPolicyConfigurationDataRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ SDLGetPolicyConfigurationDataRequest::SDLGetPolicyConfigurationDataRequest(
SDLGetPolicyConfigurationDataRequest::~SDLGetPolicyConfigurationDataRequest() {}
void SDLGetPolicyConfigurationDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject response_value(
smart_objects::SmartType::SmartType_Array);
@@ -63,7 +65,7 @@ void SDLGetPolicyConfigurationDataRequest::Run() {
PrepareResponseParams(response_value);
if (hmi_apis::Common_Result::SUCCESS != result_code) {
- LOG4CXX_ERROR(logger_, "Unable to PrepareResponseParams");
+ SDL_LOG_ERROR("Unable to PrepareResponseParams");
SendErrorResponse(
correlation_id(),
hmi_apis::FunctionID::SDL_GetPolicyConfigurationData,
@@ -87,7 +89,7 @@ void SDLGetPolicyConfigurationDataRequest::Run() {
hmi_apis::Common_Result::eType
SDLGetPolicyConfigurationDataRequest::PrepareResponseParams(
smart_objects::SmartObject& response_out) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto policy_type =
(*message_)[strings::msg_params][strings::policy_type].asString();
@@ -96,17 +98,15 @@ SDLGetPolicyConfigurationDataRequest::PrepareResponseParams(
auto policy_table_data = policy_handler_.GetPolicyTableData();
if (!policy_table_data.isMember(policy_type)) {
- LOG4CXX_ERROR(
- logger_,
- "policy_type " << policy_type << " doesn't exist in policy table.");
+ SDL_LOG_ERROR("policy_type " << policy_type
+ << " doesn't exist in policy table.");
return hmi_apis::Common_Result::DATA_NOT_AVAILABLE;
}
auto& policy_section_table_data = policy_table_data[policy_type];
if (!policy_section_table_data.isMember(property)) {
- LOG4CXX_ERROR(
- logger_,
- "property " << property << " doesn't exist in " << policy_type);
+ SDL_LOG_ERROR("property " << property << " doesn't exist in "
+ << policy_type);
return hmi_apis::Common_Result::DATA_NOT_AVAILABLE;
}
@@ -126,7 +126,7 @@ void clear_new_line_symbol(std::string& str_to_clear) {
smart_objects::SmartObject SDLGetPolicyConfigurationDataRequest::GetValueParam(
const Json::Value& policy_property) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject value(smart_objects::SmartType_Array);
auto put_element_in_value_array = [&value](const Json::Value& element,
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_response.cc
index 21b7dea41c..c934ef7bab 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SDLGetPolicyConfigurationDataResponse::SDLGetPolicyConfigurationDataResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ SDLGetPolicyConfigurationDataResponse::
~SDLGetPolicyConfigurationDataResponse() {}
void SDLGetPolicyConfigurationDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
(*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
(*message_)[strings::params][strings::protocol_version] = protocol_version_;
rpc_service_.SendMessageToHMI(message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_request.cc
index b494be56e8..ce1cb6b098 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_request.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SDLGetStatusUpdateRequest::SDLGetStatusUpdateRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ SDLGetStatusUpdateRequest::SDLGetStatusUpdateRequest(
SDLGetStatusUpdateRequest::~SDLGetStatusUpdateRequest() {}
void SDLGetStatusUpdateRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
policy_handler_.OnGetStatusUpdate(
(*message_)[strings::params][strings::correlation_id].asUInt());
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_response.cc
index 4b0f3d0ca8..122c209906 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_status_update_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SDLGetStatusUpdateResponse::SDLGetStatusUpdateResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ SDLGetStatusUpdateResponse::SDLGetStatusUpdateResponse(
SDLGetStatusUpdateResponse::~SDLGetStatusUpdateResponse() {}
void SDLGetStatusUpdateResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
(*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
(*message_)[strings::params][strings::protocol_version] = protocol_version_;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_request.cc
index 38a63611fa..57831bbc4a 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_request.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SDLGetUserFriendlyMessageRequest::SDLGetUserFriendlyMessageRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,11 +56,10 @@ SDLGetUserFriendlyMessageRequest::SDLGetUserFriendlyMessageRequest(
SDLGetUserFriendlyMessageRequest::~SDLGetUserFriendlyMessageRequest() {}
void SDLGetUserFriendlyMessageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::string messageCodes = "messageCodes";
if (!(*message_)[strings::msg_params].keyExists(messageCodes)) {
- LOG4CXX_WARN(logger_,
- "Mandatory parameter '" + messageCodes + "'' is missing");
+ SDL_LOG_WARN("Mandatory parameter '" + messageCodes + "'' is missing");
return;
}
smart_objects::SmartArray* msg =
@@ -69,22 +70,29 @@ void SDLGetUserFriendlyMessageRequest::Run() {
smart_objects::SmartArray::const_iterator it = msg->begin();
smart_objects::SmartArray::const_iterator it_end = msg->end();
for (; it != it_end; ++it) {
- msg_codes.push_back((*it).asString());
+ std::string str = (*it).asString();
+ if (!CheckSyntax(str)) {
+ SDL_LOG_WARN("Invalid data");
+ SendErrorResponse(correlation_id(),
+ static_cast<hmi_apis::FunctionID::eType>(function_id()),
+ hmi_apis::Common_Result::INVALID_DATA,
+ "invalid messageCode syntax");
+ return;
+ }
+ msg_codes.push_back(str);
}
std::string required_language;
if ((*message_)[strings::msg_params].keyExists(strings::language)) {
uint32_t lang_code =
(*message_)[strings::msg_params][strings::language].asUInt();
- required_language =
- application_manager::MessageHelper::CommonLanguageToString(
- static_cast<hmi_apis::Common_Language::eType>(lang_code));
+ required_language = application_manager::EnumToString(
+ static_cast<hmi_apis::Common_Language::eType>(lang_code));
} else {
hmi_apis::Common_Language::eType ui_language =
hmi_capabilities_.active_ui_language();
- required_language =
- application_manager::MessageHelper::CommonLanguageToString(ui_language);
+ required_language = application_manager::EnumToString(ui_language);
}
policy_handler_.OnGetUserFriendlyMessage(
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_response.cc
index b95591c4fa..b56a664e4a 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_user_friendly_message_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SDLGetUserFriendlyMessageResponse::SDLGetUserFriendlyMessageResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ SDLGetUserFriendlyMessageResponse::SDLGetUserFriendlyMessageResponse(
SDLGetUserFriendlyMessageResponse::~SDLGetUserFriendlyMessageResponse() {}
void SDLGetUserFriendlyMessageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
(*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
(*message_)[strings::params][strings::protocol_version] = protocol_version_;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update.cc
index 5f69903548..fa5e1beeb9 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SDLPolicyUpdate::SDLPolicyUpdate(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,13 +54,13 @@ SDLPolicyUpdate::SDLPolicyUpdate(
SDLPolicyUpdate::~SDLPolicyUpdate() {}
void SDLPolicyUpdate::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
#if defined(PROPRIETARY_MODE) || defined(EXTERNAL_PROPRIETARY_MODE)
SendRequest();
#else
- LOG4CXX_WARN(logger_,
- "This RPC is part of extended policy flow."
- "Please re-build with extended policy mode enabled.");
+ SDL_LOG_WARN(
+ "This RPC is part of extended policy flow. "
+ "Please re-build with extended policy mode enabled.");
#endif
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update_response.cc
index bfbf73270e..5b76a405d6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_policy_update_response.cc
@@ -37,6 +37,9 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SDLPolicyUpdateResponse::SDLPolicyUpdateResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +55,7 @@ SDLPolicyUpdateResponse::SDLPolicyUpdateResponse(
SDLPolicyUpdateResponse::~SDLPolicyUpdateResponse() {}
void SDLPolicyUpdateResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const hmi_apis::Common_Result::eType code =
static_cast<hmi_apis::Common_Result::eType>(
(*message_)[strings::params][hmi_response::code].asInt());
@@ -62,7 +65,7 @@ void SDLPolicyUpdateResponse::Run() {
helpers::ALL>(code,
hmi_apis::Common_Result::SUCCESS,
hmi_apis::Common_Result::WARNINGS)) {
- LOG4CXX_ERROR(logger_, "Error is returned. PTU won't be started.");
+ SDL_LOG_ERROR("Error is returned. PTU won't be started.");
return;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_request.cc
index 988be68a80..84ea5590d3 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
TTSChangeRegistrationRequest::TTSChangeRegistrationRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ TTSChangeRegistrationRequest::TTSChangeRegistrationRequest(
TTSChangeRegistrationRequest::~TTSChangeRegistrationRequest() {}
void TTSChangeRegistrationRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_response.cc
index e5e38ef34a..521df2ed6d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_change_registration_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
TTSChangeRegistratioResponse::TTSChangeRegistratioResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ TTSChangeRegistratioResponse::TTSChangeRegistratioResponse(
TTSChangeRegistratioResponse::~TTSChangeRegistratioResponse() {}
void TTSChangeRegistratioResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::TTS_ChangeRegistration);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_request.cc
index 9baaabf401..3bca6c05c1 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
TTSGetCapabilitiesRequest::TTSGetCapabilitiesRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +54,16 @@ TTSGetCapabilitiesRequest::TTSGetCapabilitiesRequest(
TTSGetCapabilitiesRequest::~TTSGetCapabilitiesRequest() {}
void TTSGetCapabilitiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void TTSGetCapabilitiesRequest::onTimeOut() {
+ SDL_LOG_AUTO_TRACE();
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetCapabilities);
+}
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_response.cc
index c0581a6380..167966e55b 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_capabilities_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
TTSGetCapabilitiesResponse::TTSGetCapabilitiesResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,20 +53,37 @@ TTSGetCapabilitiesResponse::TTSGetCapabilitiesResponse(
TTSGetCapabilitiesResponse::~TTSGetCapabilitiesResponse() {}
void TTSGetCapabilitiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
+ const auto result_code = static_cast<hmi_apis::Common_Result::eType>(
+ (*message_)[strings::params][hmi_response::code].asInt());
+
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetCapabilities);
+
+ if (hmi_apis::Common_Result::SUCCESS != result_code) {
+ SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities");
+ return;
+ }
- HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ std::vector<std::string> sections_to_update;
if ((*message_)[strings::msg_params].keyExists(
hmi_response::speech_capabilities)) {
- hmi_capabilities.set_speech_capabilities(
+ sections_to_update.push_back(hmi_response::speech_capabilities);
+ hmi_capabilities_.set_speech_capabilities(
(*message_)[strings::msg_params][hmi_response::speech_capabilities]);
}
if ((*message_)[strings::msg_params].keyExists(
hmi_response::prerecorded_speech_capabilities)) {
- hmi_capabilities.set_prerecorded_speech(
+ sections_to_update.push_back(hmi_response::prerecorded_speech_capabilities);
+ hmi_capabilities_.set_prerecorded_speech(
(*message_)[strings::msg_params]
[hmi_response::prerecorded_speech_capabilities]);
}
+
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::tts, sections_to_update, message_->getSchema())) {
+ SDL_LOG_ERROR("Failed to save TTS.GetCapabilities response to cache");
+ }
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_request.cc
index 7d2c15a9bf..2b409c68de 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
TTSGetLanguageRequest::TTSGetLanguageRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +54,16 @@ TTSGetLanguageRequest::TTSGetLanguageRequest(
TTSGetLanguageRequest::~TTSGetLanguageRequest() {}
void TTSGetLanguageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void TTSGetLanguageRequest::onTimeOut() {
+ SDL_LOG_AUTO_TRACE();
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetLanguage);
+}
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_response.cc
index 627056dce1..2b14bea681 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_language_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
TTSGetLanguageResponse::TTSGetLanguageResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,9 +55,20 @@ TTSGetLanguageResponse::TTSGetLanguageResponse(
TTSGetLanguageResponse::~TTSGetLanguageResponse() {}
void TTSGetLanguageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace hmi_apis;
+ const Common_Result::eType result_code = static_cast<Common_Result::eType>(
+ (*message_)[strings::params][hmi_response::code].asInt());
+
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetLanguage);
+
+ if (Common_Result::SUCCESS != result_code) {
+ SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities");
+ return;
+ }
+
Common_Language::eType language = Common_Language::INVALID_ENUM;
if ((*message_).keyExists(strings::msg_params) &&
@@ -66,10 +79,14 @@ void TTSGetLanguageResponse::Run() {
hmi_capabilities_.set_active_tts_language(language);
- LOG4CXX_DEBUG(logger_,
- "Raising event for function_id " << function_id()
- << " and correlation_id "
- << correlation_id());
+ std::vector<std::string> sections_to_update{hmi_response::language};
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::tts, sections_to_update, message_->getSchema())) {
+ SDL_LOG_DEBUG("Failed to save TTS.GetLanguage response to cache");
+ }
+
+ SDL_LOG_DEBUG("Raising event for function_id "
+ << function_id() << " and correlation_id " << correlation_id());
event_engine::Event event(FunctionID::TTS_GetLanguage);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_request.cc
index 2cb47380d5..87df2402bb 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
TTSGetSupportedLanguagesRequest::TTSGetSupportedLanguagesRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +54,16 @@ TTSGetSupportedLanguagesRequest::TTSGetSupportedLanguagesRequest(
TTSGetSupportedLanguagesRequest::~TTSGetSupportedLanguagesRequest() {}
void TTSGetSupportedLanguagesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void TTSGetSupportedLanguagesRequest::onTimeOut() {
+ SDL_LOG_AUTO_TRACE();
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages);
+}
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_response.cc
index a70d1c89a3..6b074005b2 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_get_supported_languages_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
TTSGetSupportedLanguagesResponse::TTSGetSupportedLanguagesResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,17 +55,27 @@ TTSGetSupportedLanguagesResponse::TTSGetSupportedLanguagesResponse(
TTSGetSupportedLanguagesResponse::~TTSGetSupportedLanguagesResponse() {}
void TTSGetSupportedLanguagesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const hmi_apis::Common_Result::eType code =
static_cast<hmi_apis::Common_Result::eType>(
(*message_)[strings::params][hmi_response::code].asInt());
- if (hmi_apis::Common_Result::SUCCESS == code) {
- HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages);
+
+ if (hmi_apis::Common_Result::SUCCESS != code) {
+ SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities");
+ return;
+ }
+
+ hmi_capabilities_.set_tts_supported_languages(
+ (*message_)[strings::msg_params][hmi_response::languages]);
- hmi_capabilities.set_tts_supported_languages(
- (*message_)[strings::msg_params][hmi_response::languages]);
+ std::vector<std::string> sections_to_update{hmi_response::languages};
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::tts, sections_to_update, message_->getSchema())) {
+ SDL_LOG_ERROR("Failed to save TTS.GetSupportedLanguages response to cache");
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_request.cc
index 89b5961895..1f1f3e7eab 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_request.cc
@@ -31,7 +31,6 @@
*/
#include "sdl_rpc_plugin/commands/hmi/tts_is_ready_request.h"
-#include "application_manager/message_helper.h"
#include "application_manager/rpc_service.h"
namespace sdl_rpc_plugin {
@@ -39,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
TTSIsReadyRequest::TTSIsReadyRequest(
const app_mngr::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,18 +56,18 @@ TTSIsReadyRequest::TTSIsReadyRequest(
TTSIsReadyRequest::~TTSIsReadyRequest() {}
void TTSIsReadyRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
subscribe_on_event(hmi_apis::FunctionID::TTS_IsReady, correlation_id());
SendRequest();
}
void TTSIsReadyRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::TTS_IsReady: {
- LOG4CXX_DEBUG(logger_, "Received TTS_IsReady event");
+ SDL_LOG_DEBUG("Received TTS_IsReady event");
unsubscribe_from_event(hmi_apis::FunctionID::TTS_IsReady);
const bool is_available = app_mngr::commands::ChangeInterfaceState(
application_manager_, message, HmiInterfaces::HMI_INTERFACE_TTS);
@@ -74,15 +75,16 @@ void TTSIsReadyRequest::on_event(const event_engine::Event& event) {
hmi_capabilities.set_is_tts_cooperating(is_available);
if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
application_manager_, HmiInterfaces::HMI_INTERFACE_TTS)) {
- LOG4CXX_INFO(logger_,
- "HmiInterfaces::HMI_INTERFACE_TTS isn't available");
+ UpdateRequiredInterfaceCapabilitiesRequests(hmi_interface::tts);
+ SDL_LOG_INFO("HmiInterfaces::HMI_INTERFACE_TTS isn't available");
return;
}
- SendMessageToHMI();
+
+ RequestInterfaceCapabilities(hmi_interface::tts);
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
@@ -90,25 +92,7 @@ void TTSIsReadyRequest::on_event(const event_engine::Event& event) {
void TTSIsReadyRequest::onTimeOut() {
// Note(dtrunov): According to new requirment APPLINK-27956
- SendMessageToHMI();
-}
-
-void TTSIsReadyRequest::SendMessageToHMI() {
- std::shared_ptr<smart_objects::SmartObject> get_language(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::TTS_GetLanguage,
- application_manager_));
- HMICapabilities& hmi_capabilities = hmi_capabilities_;
- hmi_capabilities.set_handle_response_for(*get_language);
- rpc_service_.ManageHMICommand(get_language);
- std::shared_ptr<smart_objects::SmartObject> get_all_languages(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::TTS_GetSupportedLanguages,
- application_manager_));
- rpc_service_.ManageHMICommand(get_all_languages);
- std::shared_ptr<smart_objects::SmartObject> get_capabilities(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::TTS_GetCapabilities, application_manager_));
- rpc_service_.ManageHMICommand(get_capabilities);
+ RequestInterfaceCapabilities(hmi_interface::tts);
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_response.cc
index 67e0fb6396..c94210e330 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_is_ready_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
TTSIsReadyResponse::TTSIsReadyResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ TTSIsReadyResponse::TTSIsReadyResponse(
TTSIsReadyResponse::~TTSIsReadyResponse() {}
void TTSIsReadyResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::TTS_IsReady);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_request.cc
index 0b3d9a77bf..35059bf48d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_request.cc
@@ -31,12 +31,15 @@
*/
#include "sdl_rpc_plugin/commands/hmi/tts_set_global_properties_request.h"
+#include "application_manager/resumption/resume_ctrl.h"
namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
TTSSetGlobalPropertiesRequest::TTSSetGlobalPropertiesRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +55,18 @@ TTSSetGlobalPropertiesRequest::TTSSetGlobalPropertiesRequest(
TTSSetGlobalPropertiesRequest::~TTSSetGlobalPropertiesRequest() {}
void TTSSetGlobalPropertiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void TTSSetGlobalPropertiesRequest::onTimeOut() {
+ auto& resume_ctrl = application_manager_.resume_controller();
+ resume_ctrl.HandleOnTimeOut(
+ correlation_id(),
+ static_cast<hmi_apis::FunctionID::eType>(function_id()));
+}
+
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_response.cc
index 0901378c4a..35b3ce87d3 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_set_global_properties_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
TTSSetGlobalPropertiesResponse::TTSSetGlobalPropertiesResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ TTSSetGlobalPropertiesResponse::TTSSetGlobalPropertiesResponse(
TTSSetGlobalPropertiesResponse::~TTSSetGlobalPropertiesResponse() {}
void TTSSetGlobalPropertiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_request.cc
index 6dce94f931..0dd48f90a9 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
TTSSpeakRequest::TTSSpeakRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ TTSSpeakRequest::TTSSpeakRequest(
TTSSpeakRequest::~TTSSpeakRequest() {}
void TTSSpeakRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_response.cc
index 69be5ab160..c461996358 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_speak_response.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
TTSSpeakResponse::TTSSpeakResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ TTSSpeakResponse::TTSSpeakResponse(
TTSSpeakResponse::~TTSSpeakResponse() {}
void TTSSpeakResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::TTS_Speak);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_request.cc
index 43c595040c..8e6270e643 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
TTSStopSpeakingRequest::TTSStopSpeakingRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ TTSStopSpeakingRequest::TTSStopSpeakingRequest(
TTSStopSpeakingRequest::~TTSStopSpeakingRequest() {}
void TTSStopSpeakingRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_response.cc
index 892b3e6295..64d76dcec2 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/tts_stop_speaking_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
TTSStopSpeakingResponse::TTSStopSpeakingResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ TTSStopSpeakingResponse::TTSStopSpeakingResponse(
TTSStopSpeakingResponse::~TTSStopSpeakingResponse() {}
void TTSStopSpeakingResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::TTS_StopSpeaking);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_request.cc
index 7c95e8a919..067ada3153 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_request.cc
@@ -31,12 +31,15 @@
*/
#include "sdl_rpc_plugin/commands/hmi/ui_add_command_request.h"
+#include "application_manager/resumption/resume_ctrl.h"
namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIAddCommandRequest::UIAddCommandRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +55,19 @@ UIAddCommandRequest::UIAddCommandRequest(
UIAddCommandRequest::~UIAddCommandRequest() {}
void UIAddCommandRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void UIAddCommandRequest::onTimeOut() {
+ auto& resume_ctrl = application_manager_.resume_controller();
+
+ resume_ctrl.HandleOnTimeOut(
+ correlation_id(),
+ static_cast<hmi_apis::FunctionID::eType>(function_id()));
+}
+
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_response.cc
index 72d841a878..9a582807a9 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_command_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIAddCommandResponse::UIAddCommandResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ UIAddCommandResponse::UIAddCommandResponse(
UIAddCommandResponse::~UIAddCommandResponse() {}
void UIAddCommandResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_AddCommand);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_request.cc
index 15342c6ecb..275c411eae 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_request.cc
@@ -31,12 +31,15 @@
*/
#include "sdl_rpc_plugin/commands/hmi/ui_add_submenu_request.h"
+#include "application_manager/resumption/resume_ctrl.h"
namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIAddSubmenuRequest::UIAddSubmenuRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +55,18 @@ UIAddSubmenuRequest::UIAddSubmenuRequest(
UIAddSubmenuRequest::~UIAddSubmenuRequest() {}
void UIAddSubmenuRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void UIAddSubmenuRequest::onTimeOut() {
+ auto& resume_ctrl = application_manager_.resume_controller();
+ resume_ctrl.HandleOnTimeOut(
+ correlation_id(),
+ static_cast<hmi_apis::FunctionID::eType>(function_id()));
+}
+
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_response.cc
index ae699dc2bd..89aa425cfb 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_add_submenu_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIAddSubmenuResponse::UIAddSubmenuResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ UIAddSubmenuResponse::UIAddSubmenuResponse(
UIAddSubmenuResponse::~UIAddSubmenuResponse() {}
void UIAddSubmenuResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_AddSubMenu);
event.set_smart_object(*message_);
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 793e70d9e1..def1636fbd 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
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIAlertRequest::UIAlertRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ UIAlertRequest::UIAlertRequest(
UIAlertRequest::~UIAlertRequest() {}
void UIAlertRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_response.cc
index f53f14e050..e1a5afa5e5 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIAlertResponse::UIAlertResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ UIAlertResponse::UIAlertResponse(
UIAlertResponse::~UIAlertResponse() {}
void UIAlertResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_Alert);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_request.cc
index c186077b1e..db35e550bc 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UICancelInteractionRequest::UICancelInteractionRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UICancelInteractionRequest::UICancelInteractionRequest(
UICancelInteractionRequest::~UICancelInteractionRequest() {}
void UICancelInteractionRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_response.cc
index 2d5db4eecb..29d18ba384 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_cancel_interaction_response.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UICancelInteractionResponse::UICancelInteractionResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UICancelInteractionResponse::UICancelInteractionResponse(
UICancelInteractionResponse::~UICancelInteractionResponse() {}
void UICancelInteractionResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_CancelInteraction);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_request.cc
index bb001b37c7..3ba9d149c4 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIChangeRegistrationRequest::UIChangeRegistrationRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UIChangeRegistrationRequest::UIChangeRegistrationRequest(
UIChangeRegistrationRequest::~UIChangeRegistrationRequest() {}
void UIChangeRegistrationRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_response.cc
index 8acd654488..1790f44bce 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_change_registration_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIChangeRegistratioResponse::UIChangeRegistratioResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ UIChangeRegistratioResponse::UIChangeRegistratioResponse(
UIChangeRegistratioResponse::~UIChangeRegistratioResponse() {}
void UIChangeRegistratioResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_ChangeRegistration);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_request.cc
index b354009e3f..e98ad5c45e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_request.cc
@@ -31,12 +31,15 @@
*/
#include "sdl_rpc_plugin/commands/hmi/ui_create_window_request.h"
+#include "application_manager/resumption/resume_ctrl.h"
namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UICreateWindowRequest::UICreateWindowRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +55,19 @@ UICreateWindowRequest::UICreateWindowRequest(
UICreateWindowRequest::~UICreateWindowRequest() {}
void UICreateWindowRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void UICreateWindowRequest::onTimeOut() {
+ auto& resume_ctrl = application_manager_.resume_controller();
+
+ resume_ctrl.HandleOnTimeOut(
+ correlation_id(),
+ static_cast<hmi_apis::FunctionID::eType>(function_id()));
+}
+
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_response.cc
index c3a323818d..1021e47595 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_create_window_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UICreateWindowResponse::UICreateWindowResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ UICreateWindowResponse::UICreateWindowResponse(
UICreateWindowResponse::~UICreateWindowResponse() {}
void UICreateWindowResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_CreateWindow);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_request.cc
index 1d741bba74..2b46723216 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIDeleteCommandRequest::UIDeleteCommandRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UIDeleteCommandRequest::UIDeleteCommandRequest(
UIDeleteCommandRequest::~UIDeleteCommandRequest() {}
void UIDeleteCommandRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_response.cc
index 40a5ec8a73..0cd3e1943d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_command_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIDeleteCommandResponse::UIDeleteCommandResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ UIDeleteCommandResponse::UIDeleteCommandResponse(
UIDeleteCommandResponse::~UIDeleteCommandResponse() {}
void UIDeleteCommandResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_DeleteCommand);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_request.cc
index fdca37cee6..ea5745486a 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIDeleteSubmenuRequest::UIDeleteSubmenuRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UIDeleteSubmenuRequest::UIDeleteSubmenuRequest(
UIDeleteSubmenuRequest::~UIDeleteSubmenuRequest() {}
void UIDeleteSubmenuRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_response.cc
index 9d522431dc..0d2d5360cc 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_submenu_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIDeleteSubmenuResponse::UIDeleteSubmenuResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ UIDeleteSubmenuResponse::UIDeleteSubmenuResponse(
UIDeleteSubmenuResponse::~UIDeleteSubmenuResponse() {}
void UIDeleteSubmenuResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_DeleteSubMenu);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_request.cc
index 7933574d92..066b5969a6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIDeleteWindowRequest::UIDeleteWindowRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UIDeleteWindowRequest::UIDeleteWindowRequest(
UIDeleteWindowRequest::~UIDeleteWindowRequest() {}
void UIDeleteWindowRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_response.cc
index ba703e18ae..507369c4f7 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_delete_window_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIDeleteWindowResponse::UIDeleteWindowResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ UIDeleteWindowResponse::UIDeleteWindowResponse(
UIDeleteWindowResponse::~UIDeleteWindowResponse() {}
void UIDeleteWindowResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_DeleteWindow);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_request.cc
index 92f51bc9cf..3e99b5298e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIEndAudioPassThruRequest::UIEndAudioPassThruRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UIEndAudioPassThruRequest::UIEndAudioPassThruRequest(
UIEndAudioPassThruRequest::~UIEndAudioPassThruRequest() {}
void UIEndAudioPassThruRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_response.cc
index b6639dcbb9..3b9f56f7e6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_end_audio_pass_thru_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIEndAudioPassThruResponse::UIEndAudioPassThruResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ UIEndAudioPassThruResponse::UIEndAudioPassThruResponse(
UIEndAudioPassThruResponse::~UIEndAudioPassThruResponse() {}
void UIEndAudioPassThruResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_EndAudioPassThru);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_request.cc
index 5f8704b3e5..00a8ad761e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIGetCapabilitiesRequest::UIGetCapabilitiesRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +54,16 @@ UIGetCapabilitiesRequest::UIGetCapabilitiesRequest(
UIGetCapabilitiesRequest::~UIGetCapabilitiesRequest() {}
void UIGetCapabilitiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void UIGetCapabilitiesRequest::onTimeOut() {
+ SDL_LOG_AUTO_TRACE();
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetCapabilities);
+}
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_response.cc
index a3eb9244bd..31dda22709 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_capabilities_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIGetCapabilitiesResponse::UIGetCapabilitiesResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,82 +53,121 @@ UIGetCapabilitiesResponse::UIGetCapabilitiesResponse(
UIGetCapabilitiesResponse::~UIGetCapabilitiesResponse() {}
void UIGetCapabilitiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
+
+ const auto result_code = static_cast<hmi_apis::Common_Result::eType>(
+ (*message_)[strings::params][hmi_response::code].asInt());
+
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetCapabilities);
- HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ if (hmi_apis::Common_Result::SUCCESS != result_code) {
+ SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities");
+ return;
+ }
+
+ std::vector<std::string> sections_to_update;
const smart_objects::SmartObject& msg_params =
(*message_)[strings::msg_params];
if (msg_params.keyExists(hmi_response::display_capabilities)) {
- hmi_capabilities.set_display_capabilities(
+ sections_to_update.push_back(hmi_response::display_capabilities);
+ hmi_capabilities_.set_display_capabilities(
msg_params[hmi_response::display_capabilities]);
}
if (msg_params.keyExists(hmi_response::hmi_zone_capabilities)) {
- hmi_capabilities.set_hmi_zone_capabilities(
+ sections_to_update.push_back(hmi_response::hmi_zone_capabilities);
+ hmi_capabilities_.set_hmi_zone_capabilities(
msg_params[hmi_response::hmi_zone_capabilities]);
}
if (msg_params.keyExists(hmi_response::soft_button_capabilities)) {
- hmi_capabilities.set_soft_button_capabilities(
+ sections_to_update.push_back(hmi_response::soft_button_capabilities);
+ hmi_capabilities_.set_soft_button_capabilities(
msg_params[hmi_response::soft_button_capabilities]);
}
// use newer parameter "audioPassThruCapabilitiesList" when available
if (msg_params.keyExists(strings::audio_pass_thru_capabilities_list)) {
- hmi_capabilities.set_audio_pass_thru_capabilities(
+ sections_to_update.push_back(strings::audio_pass_thru_capabilities);
+ hmi_capabilities_.set_audio_pass_thru_capabilities(
msg_params[strings::audio_pass_thru_capabilities_list]);
} else if (msg_params.keyExists(strings::audio_pass_thru_capabilities)) {
smart_objects::SmartObject audio_pass_thru_capabilities_list(
smart_objects::SmartType_Array);
audio_pass_thru_capabilities_list[0] =
msg_params[strings::audio_pass_thru_capabilities];
- hmi_capabilities.set_audio_pass_thru_capabilities(
+ sections_to_update.push_back(strings::audio_pass_thru_capabilities);
+ hmi_capabilities_.set_audio_pass_thru_capabilities(
audio_pass_thru_capabilities_list);
}
if (msg_params.keyExists(strings::hmi_capabilities)) {
if (msg_params[strings::hmi_capabilities].keyExists(strings::navigation)) {
- hmi_capabilities.set_navigation_supported(
+ sections_to_update.push_back(strings::navigation);
+ hmi_capabilities_.set_navigation_supported(
msg_params[strings::hmi_capabilities][strings::navigation].asBool());
}
if (msg_params[strings::hmi_capabilities].keyExists(strings::phone_call)) {
- hmi_capabilities.set_phone_call_supported(
+ sections_to_update.push_back(strings::phone_call);
+ hmi_capabilities_.set_phone_call_supported(
msg_params[strings::hmi_capabilities][strings::phone_call].asBool());
}
if (msg_params[strings::hmi_capabilities].keyExists(
strings::video_streaming)) {
- hmi_capabilities.set_video_streaming_supported(
+ sections_to_update.push_back(strings::video_streaming);
+ hmi_capabilities_.set_video_streaming_supported(
msg_params[strings::hmi_capabilities][strings::video_streaming]
.asBool());
}
}
if (msg_params.keyExists(strings::system_capabilities)) {
- if (msg_params[strings::system_capabilities].keyExists(
- strings::navigation_capability)) {
- hmi_capabilities.set_navigation_capability(
- msg_params[strings::system_capabilities]
- [strings::navigation_capability]);
+ auto& system_capabilities_so = msg_params[strings::system_capabilities];
+
+ if (system_capabilities_so.keyExists(strings::navigation_capability)) {
+ sections_to_update.push_back(strings::navigation_capability);
+ hmi_capabilities_.set_navigation_capability(
+ system_capabilities_so[strings::navigation_capability]);
}
- if (msg_params[strings::system_capabilities].keyExists(
- strings::phone_capability)) {
- hmi_capabilities.set_phone_capability(
- msg_params[strings::system_capabilities][strings::phone_capability]);
+ if (system_capabilities_so.keyExists(strings::phone_capability)) {
+ sections_to_update.push_back(strings::phone_capability);
+ hmi_capabilities_.set_phone_capability(
+ system_capabilities_so[strings::phone_capability]);
}
- if (msg_params[strings::system_capabilities].keyExists(
- strings::video_streaming_capability)) {
- hmi_capabilities.set_video_streaming_capability(
- msg_params[strings::system_capabilities]
- [strings::video_streaming_capability]);
+ if (system_capabilities_so.keyExists(strings::video_streaming_capability)) {
+ sections_to_update.push_back(strings::video_streaming_capability);
+ hmi_capabilities_.set_video_streaming_capability(
+ system_capabilities_so[strings::video_streaming_capability]);
}
- if (msg_params[strings::system_capabilities].keyExists(
- strings::display_capabilities)) {
- hmi_capabilities.set_system_display_capabilities(
- msg_params[strings::system_capabilities]
- [strings::display_capabilities]);
+ if (system_capabilities_so.keyExists(
+ strings::driver_distraction_capability)) {
+ if (!system_capabilities_so[strings::driver_distraction_capability]
+ .empty()) {
+ sections_to_update.push_back(strings::driver_distraction_capability);
+ hmi_capabilities_.set_driver_distraction_capability(
+ system_capabilities_so[strings::driver_distraction_capability]);
+ hmi_capabilities_.set_driver_distraction_supported(true);
+ }
}
+ if (system_capabilities_so.keyExists(strings::display_capabilities)) {
+ sections_to_update.push_back(strings::display_capabilities);
+ hmi_capabilities_.set_system_display_capabilities(
+ system_capabilities_so[strings::display_capabilities]);
+ }
+ }
+
+ if (msg_params.keyExists(strings::pcm_stream_capabilities)) {
+ sections_to_update.push_back(strings::pcm_stream_capabilities);
+ hmi_capabilities_.set_pcm_stream_capabilities(
+ msg_params[strings::pcm_stream_capabilities]);
+ }
+
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::ui, sections_to_update, message_->getSchema())) {
+ SDL_LOG_ERROR("Failed to save UI.GetCapabilities response to cache");
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_request.cc
index d3b44d1168..bf91b7e294 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIGetLanguageRequest::UIGetLanguageRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +54,16 @@ UIGetLanguageRequest::UIGetLanguageRequest(
UIGetLanguageRequest::~UIGetLanguageRequest() {}
void UIGetLanguageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void UIGetLanguageRequest::onTimeOut() {
+ SDL_LOG_AUTO_TRACE();
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetLanguage);
+}
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_response.cc
index 2a5c0ab016..ffeec025be 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_language_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIGetLanguageResponse::UIGetLanguageResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,8 +56,18 @@ UIGetLanguageResponse::UIGetLanguageResponse(
UIGetLanguageResponse::~UIGetLanguageResponse() {}
void UIGetLanguageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace hmi_apis;
+ const Common_Result::eType result_code = static_cast<Common_Result::eType>(
+ (*message_)[strings::params][hmi_response::code].asInt());
+
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetLanguage);
+
+ if (Common_Result::SUCCESS != result_code) {
+ SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities");
+ return;
+ }
Common_Language::eType language = Common_Language::INVALID_ENUM;
@@ -67,10 +79,14 @@ void UIGetLanguageResponse::Run() {
hmi_capabilities_.set_active_ui_language(language);
- LOG4CXX_DEBUG(logger_,
- "Raising event for function_id " << function_id()
- << " and correlation_id "
- << correlation_id());
+ std::vector<std::string> sections_to_update{hmi_response::language};
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::ui, sections_to_update, message_->getSchema())) {
+ SDL_LOG_ERROR("Failed to save UI.GetLanguage response to cache");
+ }
+
+ SDL_LOG_DEBUG("Raising event for function_id "
+ << function_id() << " and correlation_id " << correlation_id());
event_engine::Event event(FunctionID::UI_GetLanguage);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_request.cc
index 0665612525..480fa2499f 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIGetSupportedLanguagesRequest::UIGetSupportedLanguagesRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +54,16 @@ UIGetSupportedLanguagesRequest::UIGetSupportedLanguagesRequest(
UIGetSupportedLanguagesRequest::~UIGetSupportedLanguagesRequest() {}
void UIGetSupportedLanguagesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void UIGetSupportedLanguagesRequest::onTimeOut() {
+ SDL_LOG_AUTO_TRACE();
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetSupportedLanguages);
+}
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_response.cc
index 19ee62e51d..20606294ae 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_get_supported_languages_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIGetSupportedLanguagesResponse::UIGetSupportedLanguagesResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,17 +55,27 @@ UIGetSupportedLanguagesResponse::UIGetSupportedLanguagesResponse(
UIGetSupportedLanguagesResponse::~UIGetSupportedLanguagesResponse() {}
void UIGetSupportedLanguagesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const hmi_apis::Common_Result::eType code =
static_cast<hmi_apis::Common_Result::eType>(
(*message_)[strings::params][hmi_response::code].asInt());
- if (hmi_apis::Common_Result::SUCCESS == code) {
- HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetSupportedLanguages);
+
+ if (hmi_apis::Common_Result::SUCCESS != code) {
+ SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities");
+ return;
+ }
+
+ hmi_capabilities_.set_ui_supported_languages(
+ (*message_)[strings::msg_params][hmi_response::languages]);
- hmi_capabilities.set_ui_supported_languages(
- (*message_)[strings::msg_params][hmi_response::languages]);
+ std::vector<std::string> sections_to_update{hmi_response::languages};
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::ui, sections_to_update, message_->getSchema())) {
+ SDL_LOG_ERROR("Failed to save UI.GetSupportedLanguages response to cache");
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc
index 2546b704b2..d020972ce6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_request.cc
@@ -31,7 +31,6 @@
*/
#include "sdl_rpc_plugin/commands/hmi/ui_is_ready_request.h"
-#include "application_manager/message_helper.h"
#include "application_manager/rpc_service.h"
namespace sdl_rpc_plugin {
@@ -39,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIIsReadyRequest::UIIsReadyRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,17 +56,17 @@ UIIsReadyRequest::UIIsReadyRequest(
UIIsReadyRequest::~UIIsReadyRequest() {}
void UIIsReadyRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
subscribe_on_event(hmi_apis::FunctionID::UI_IsReady, correlation_id());
SendRequest();
}
void UIIsReadyRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::UI_IsReady: {
- LOG4CXX_DEBUG(logger_, "Received UI_IsReady event");
+ SDL_LOG_DEBUG("Received UI_IsReady event");
unsubscribe_from_event(hmi_apis::FunctionID::UI_IsReady);
const bool is_available = app_mngr::commands::ChangeInterfaceState(
application_manager_, message, HmiInterfaces::HMI_INTERFACE_UI);
@@ -73,15 +74,16 @@ void UIIsReadyRequest::on_event(const event_engine::Event& event) {
hmi_capabilities.set_is_ui_cooperating(is_available);
if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
application_manager_, HmiInterfaces::HMI_INTERFACE_UI)) {
- LOG4CXX_INFO(logger_,
- "HmiInterfaces::HMI_INTERFACE_UI isn't available");
+ UpdateRequiredInterfaceCapabilitiesRequests(hmi_interface::ui);
+ SDL_LOG_INFO("HmiInterfaces::HMI_INTERFACE_UI isn't available");
return;
}
- SendMessageToHMI();
+
+ RequestInterfaceCapabilities(hmi_interface::ui);
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
@@ -89,25 +91,7 @@ void UIIsReadyRequest::on_event(const event_engine::Event& event) {
void UIIsReadyRequest::onTimeOut() {
// Note(dtrunov): According to new requirment APPLINK-27956
- SendMessageToHMI();
-}
-
-void UIIsReadyRequest::SendMessageToHMI() {
- std::shared_ptr<smart_objects::SmartObject> get_language(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::UI_GetLanguage,
- application_manager_));
- HMICapabilities& hmi_capabilities = hmi_capabilities_;
- hmi_capabilities.set_handle_response_for(*get_language);
- rpc_service_.ManageHMICommand(get_language);
- std::shared_ptr<smart_objects::SmartObject> get_all_languages(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::UI_GetSupportedLanguages,
- application_manager_));
- rpc_service_.ManageHMICommand(get_all_languages);
- std::shared_ptr<smart_objects::SmartObject> get_capabilities(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::UI_GetCapabilities, application_manager_));
- rpc_service_.ManageHMICommand(get_capabilities);
+ RequestInterfaceCapabilities(hmi_interface::ui);
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_response.cc
index 96a2d1212c..99730691de 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_is_ready_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIIsReadyResponse::UIIsReadyResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ UIIsReadyResponse::UIIsReadyResponse(
UIIsReadyResponse::~UIIsReadyResponse() {}
void UIIsReadyResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_IsReady);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_request.cc
index 18d5376b25..c8a3dc3704 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIPerformAudioPassThruRequest::UIPerformAudioPassThruRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UIPerformAudioPassThruRequest::UIPerformAudioPassThruRequest(
UIPerformAudioPassThruRequest::~UIPerformAudioPassThruRequest() {}
void UIPerformAudioPassThruRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_response.cc
index afbd1bbed7..b953dc73e6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_audio_pass_thru_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIPerformAudioPassThruResponse::UIPerformAudioPassThruResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ UIPerformAudioPassThruResponse::UIPerformAudioPassThruResponse(
UIPerformAudioPassThruResponse::~UIPerformAudioPassThruResponse() {}
void UIPerformAudioPassThruResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_PerformAudioPassThru);
event.set_smart_object(*message_);
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 a07c72cbf4..83e63c006d 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
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIPerformInteractionRequest::UIPerformInteractionRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ UIPerformInteractionRequest::UIPerformInteractionRequest(
UIPerformInteractionRequest::~UIPerformInteractionRequest() {}
void UIPerformInteractionRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_response.cc
index 4cbc58d278..00f6f702cd 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIPerformInteractionResponse::UIPerformInteractionResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ UIPerformInteractionResponse::UIPerformInteractionResponse(
UIPerformInteractionResponse::~UIPerformInteractionResponse() {}
void UIPerformInteractionResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_PerformInteraction);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
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 cad68e23aa..366235bb6d 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
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIScrollableMessageRequest::UIScrollableMessageRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ UIScrollableMessageRequest::UIScrollableMessageRequest(
UIScrollableMessageRequest::~UIScrollableMessageRequest() {}
void UIScrollableMessageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_response.cc
index 4e844095b4..b9a184528e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIScrollableMessageResponse::UIScrollableMessageResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ UIScrollableMessageResponse::UIScrollableMessageResponse(
UIScrollableMessageResponse::~UIScrollableMessageResponse() {}
void UIScrollableMessageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_ScrollableMessage);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_request.cc
index 4a538ac992..9e8f4837f8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UISendHapticDataRequest::UISendHapticDataRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UISendHapticDataRequest::UISendHapticDataRequest(
UISendHapticDataRequest::~UISendHapticDataRequest() {}
void UISendHapticDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_response.cc
index 92afdaaa4a..9b55d6d63d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_send_haptic_data_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UISendHapticDataResponse::UISendHapticDataResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ UISendHapticDataResponse::UISendHapticDataResponse(
UISendHapticDataResponse::~UISendHapticDataResponse() {}
void UISendHapticDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_SendHapticData);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_request.cc
index 821f78a046..4d158bfc20 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UISetAppIconRequest::UISetAppIconRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UISetAppIconRequest::UISetAppIconRequest(
UISetAppIconRequest::~UISetAppIconRequest() {}
void UISetAppIconRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_response.cc
index 68e96725d4..91e341375b 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_app_icon_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UISetAppIconResponse::UISetAppIconResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ UISetAppIconResponse::UISetAppIconResponse(
UISetAppIconResponse::~UISetAppIconResponse() {}
void UISetAppIconResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_SetAppIcon);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_request.cc
index 63166157c8..df0f2a9f98 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UiSetDisplayLayoutRequest::UiSetDisplayLayoutRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UiSetDisplayLayoutRequest::UiSetDisplayLayoutRequest(
UiSetDisplayLayoutRequest::~UiSetDisplayLayoutRequest() {}
void UiSetDisplayLayoutRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_response.cc
index f35427895e..35fe55ec4d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_display_layout_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UiSetDisplayLayoutResponse::UiSetDisplayLayoutResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ UiSetDisplayLayoutResponse::UiSetDisplayLayoutResponse(
UiSetDisplayLayoutResponse::~UiSetDisplayLayoutResponse() {}
void UiSetDisplayLayoutResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_SetDisplayLayout);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_request.cc
index 0aaaae7cc7..c82a4d2131 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_request.cc
@@ -31,12 +31,15 @@
*/
#include "sdl_rpc_plugin/commands/hmi/ui_set_global_properties_request.h"
+#include "application_manager/resumption/resume_ctrl.h"
namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UISetGlobalPropertiesRequest::UISetGlobalPropertiesRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +55,18 @@ UISetGlobalPropertiesRequest::UISetGlobalPropertiesRequest(
UISetGlobalPropertiesRequest::~UISetGlobalPropertiesRequest() {}
void UISetGlobalPropertiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void UISetGlobalPropertiesRequest::onTimeOut() {
+ auto& resume_ctrl = application_manager_.resume_controller();
+ resume_ctrl.HandleOnTimeOut(
+ correlation_id(),
+ static_cast<hmi_apis::FunctionID::eType>(function_id()));
+}
+
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_response.cc
index 48d73d146c..e0d7f8136e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_global_properties_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UISetGlobalPropertiesResponse::UISetGlobalPropertiesResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ UISetGlobalPropertiesResponse::UISetGlobalPropertiesResponse(
UISetGlobalPropertiesResponse::~UISetGlobalPropertiesResponse() {}
void UISetGlobalPropertiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_SetGlobalProperties);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_request.cc
index 4c8fcefcdf..fdb477e41e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UISetMediaClockTimerRequest::UISetMediaClockTimerRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UISetMediaClockTimerRequest::UISetMediaClockTimerRequest(
UISetMediaClockTimerRequest::~UISetMediaClockTimerRequest() {}
void UISetMediaClockTimerRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_response.cc
index fb5b25fc2b..3df2a14863 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_set_media_clock_timer_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UISetMediaClockTimerResponse::UISetMediaClockTimerResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ UISetMediaClockTimerResponse::UISetMediaClockTimerResponse(
UISetMediaClockTimerResponse::~UISetMediaClockTimerResponse() {}
void UISetMediaClockTimerResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_SetMediaClockTimer);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_request.cc
index c2c8566e82..beba7ebba9 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_request.cc
@@ -37,6 +37,8 @@ namespace app_mngr = application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIShowAppMenuRequest::UIShowAppMenuRequest(
const app_mngr::commands::MessageSharedPtr& message,
app_mngr::ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UIShowAppMenuRequest::UIShowAppMenuRequest(
UIShowAppMenuRequest::~UIShowAppMenuRequest() {}
void UIShowAppMenuRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_response.cc
index 14bbc79e03..c0e13d377a 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_response.cc
@@ -37,6 +37,9 @@ namespace sdl_rpc_plugin {
namespace app_mngr = application_manager;
namespace commands {
+
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIShowAppMenuResponse::UIShowAppMenuResponse(
const app_mngr::commands::MessageSharedPtr& message,
app_mngr::ApplicationManager& application_manager,
@@ -52,7 +55,7 @@ UIShowAppMenuResponse::UIShowAppMenuResponse(
UIShowAppMenuResponse::~UIShowAppMenuResponse() {}
void UIShowAppMenuResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
app_mngr::event_engine::Event event(hmi_apis::FunctionID::UI_ShowAppMenu);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_request.cc
index d7160dc70b..4312a4d252 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIShowRequest::UIShowRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UIShowRequest::UIShowRequest(
UIShowRequest::~UIShowRequest() {}
void UIShowRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_response.cc
index 768069bf3a..7e57aec971 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_response.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UIShowResponse::UIShowResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UIShowResponse::UIShowResponse(
UIShowResponse::~UIShowResponse() {}
void UIShowResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_Show);
event.set_smart_object(*message_);
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 eae8cc523c..63bc1e0c0e 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
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UISliderRequest::UISliderRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ UISliderRequest::UISliderRequest(
UISliderRequest::~UISliderRequest() {}
void UISliderRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_response.cc
index 9cf7224ddb..3c78e73fdd 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UISliderResponse::UISliderResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ UISliderResponse::UISliderResponse(
UISliderResponse::~UISliderResponse() {}
void UISliderResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::UI_Slider);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_subtle_alert_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_subtle_alert_request.cc
new file mode 100644
index 0000000000..7136a533e6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_subtle_alert_request.cc
@@ -0,0 +1,71 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "sdl_rpc_plugin/commands/hmi/ui_subtle_alert_request.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SDL_CREATE_LOG_VARIABLE("Commands")
+
+UISubtleAlertRequest::UISubtleAlertRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {
+ const auto& msg_params = (*message_)[strings::msg_params];
+ if (msg_params.keyExists(strings::duration)) {
+ uint32_t request_timeout = msg_params[strings::duration].asUInt();
+ default_timeout_ += request_timeout;
+ } else {
+ default_timeout_ = 0;
+ }
+}
+
+UISubtleAlertRequest::~UISubtleAlertRequest() {}
+
+void UISubtleAlertRequest::Run() {
+ SDL_LOG_AUTO_TRACE();
+
+ SendRequest();
+}
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_subtle_alert_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_subtle_alert_response.cc
new file mode 100644
index 0000000000..a551988c07
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_subtle_alert_response.cc
@@ -0,0 +1,65 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "sdl_rpc_plugin/commands/hmi/ui_subtle_alert_response.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SDL_CREATE_LOG_VARIABLE("Commands")
+
+UISubtleAlertResponse::UISubtleAlertResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+UISubtleAlertResponse::~UISubtleAlertResponse() {}
+
+void UISubtleAlertResponse::Run() {
+ SDL_LOG_AUTO_TRACE();
+
+ event_engine::Event event(hmi_apis::FunctionID::UI_SubtleAlert);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_request.cc
index c5966fcb36..ca23f36d5c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UpdateAppListRequest::UpdateAppListRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UpdateAppListRequest::UpdateAppListRequest(
UpdateAppListRequest::~UpdateAppListRequest() {}
void UpdateAppListRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_response.cc
index 7fc830b4e6..3468a7a253 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_app_list_response.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UpdateAppListResponse::UpdateAppListResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UpdateAppListResponse::UpdateAppListResponse(
UpdateAppListResponse::~UpdateAppListResponse() {}
void UpdateAppListResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// TODO(PV): add check
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_request.cc
index 3a014480c1..c8aa295645 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_request.cc
@@ -41,6 +41,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UpdateDeviceListRequest::UpdateDeviceListRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -57,7 +59,7 @@ UpdateDeviceListRequest::UpdateDeviceListRequest(
UpdateDeviceListRequest::~UpdateDeviceListRequest() {}
void UpdateDeviceListRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(wait_hmi_lock);
// Fix problem with SDL and HMI HTML. This problem is not actual for HMI PASA.
// Flag conditional compilation for specific customer is used in order to
@@ -65,10 +67,10 @@ void UpdateDeviceListRequest::Run() {
// hit code to RTC
if (true == application_manager_.get_settings().launch_hmi()) {
if (!application_manager_.IsHMICooperating()) {
- LOG4CXX_INFO(logger_, "Wait for HMI Cooperation");
+ SDL_LOG_INFO("Wait for HMI Cooperation");
subscribe_on_event(hmi_apis::FunctionID::BasicCommunication_OnReady);
termination_condition_.Wait(auto_lock);
- LOG4CXX_DEBUG(logger_, "HMI Cooperation OK");
+ SDL_LOG_DEBUG("HMI Cooperation OK");
}
}
@@ -76,17 +78,17 @@ void UpdateDeviceListRequest::Run() {
}
void UpdateDeviceListRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(wait_hmi_lock);
switch (event.id()) {
case hmi_apis::FunctionID::BasicCommunication_OnReady: {
- LOG4CXX_INFO(logger_, "received OnReady");
+ SDL_LOG_INFO("received OnReady");
unsubscribe_from_event(hmi_apis::FunctionID::BasicCommunication_OnReady);
termination_condition_.Broadcast();
break;
};
default: {
- LOG4CXX_ERROR(logger_, "Unknown event ");
+ SDL_LOG_ERROR("Unknown event " << event.id());
break;
};
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_response.cc
index d69e683f2b..9458c22aa2 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_device_list_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UpdateDeviceListResponse::UpdateDeviceListResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ UpdateDeviceListResponse::UpdateDeviceListResponse(
UpdateDeviceListResponse::~UpdateDeviceListResponse() {}
void UpdateDeviceListResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// TODO(PV): add check for correctness.
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_request.cc
index a52f03b998..b9c06945b6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_request.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UpdateSDLRequest::UpdateSDLRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ UpdateSDLRequest::UpdateSDLRequest(
UpdateSDLRequest::~UpdateSDLRequest() {}
void UpdateSDLRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
policy_handler_.PTExchangeAtUserRequest(
(*message_)[strings::params][strings::correlation_id].asInt());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_response.cc
index c02cde4111..a6981b6d82 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/update_sdl_response.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UpdateSDLResponse::UpdateSDLResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ UpdateSDLResponse::UpdateSDLResponse(
UpdateSDLResponse::~UpdateSDLResponse() {}
void UpdateSDLResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
(*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_;
(*message_)[strings::params][strings::protocol_version] = protocol_version_;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_request.cc
index 788eda5a87..c8979ca62b 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_request.cc
@@ -31,12 +31,15 @@
*/
#include "sdl_rpc_plugin/commands/hmi/vr_add_command_request.h"
+#include "application_manager/resumption/resume_ctrl.h"
namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VRAddCommandRequest::VRAddCommandRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +55,19 @@ VRAddCommandRequest::VRAddCommandRequest(
VRAddCommandRequest::~VRAddCommandRequest() {}
void VRAddCommandRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void VRAddCommandRequest::onTimeOut() {
+ auto& resume_ctrl = application_manager_.resume_controller();
+
+ resume_ctrl.HandleOnTimeOut(
+ correlation_id(),
+ static_cast<hmi_apis::FunctionID::eType>(function_id()));
+}
+
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_response.cc
index 37b3e4696d..111fd1ffe5 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_add_command_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VRAddCommandResponse::VRAddCommandResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ VRAddCommandResponse::VRAddCommandResponse(
VRAddCommandResponse::~VRAddCommandResponse() {}
void VRAddCommandResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::VR_AddCommand);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_request.cc
index d1be04ad44..32d326687a 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VRChangeRegistrationRequest::VRChangeRegistrationRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ VRChangeRegistrationRequest::VRChangeRegistrationRequest(
VRChangeRegistrationRequest::~VRChangeRegistrationRequest() {}
void VRChangeRegistrationRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_response.cc
index 27bde2bafa..85c346421d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_change_registration_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VRChangeRegistrationResponse::VRChangeRegistrationResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ VRChangeRegistrationResponse::VRChangeRegistrationResponse(
VRChangeRegistrationResponse::~VRChangeRegistrationResponse() {}
void VRChangeRegistrationResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::VR_ChangeRegistration);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_request.cc
index ebcfe78fa9..cc6650a7ae 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VRDeleteCommandRequest::VRDeleteCommandRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ VRDeleteCommandRequest::VRDeleteCommandRequest(
VRDeleteCommandRequest::~VRDeleteCommandRequest() {}
void VRDeleteCommandRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_response.cc
index d1d725b356..ae40f3c1f8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_delete_command_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VRDeleteCommandResponse::VRDeleteCommandResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ VRDeleteCommandResponse::VRDeleteCommandResponse(
VRDeleteCommandResponse::~VRDeleteCommandResponse() {}
void VRDeleteCommandResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::VR_DeleteCommand);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_request.cc
index b06bfa0e77..3f528f2f58 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VRGetCapabilitiesRequest::VRGetCapabilitiesRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +54,16 @@ VRGetCapabilitiesRequest::VRGetCapabilitiesRequest(
VRGetCapabilitiesRequest::~VRGetCapabilitiesRequest() {}
void VRGetCapabilitiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void VRGetCapabilitiesRequest::onTimeOut() {
+ SDL_LOG_AUTO_TRACE();
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetCapabilities);
+}
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_response.cc
index 80c308ea40..315107d94a 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_capabilities_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VRGetCapabilitiesResponse::VRGetCapabilitiesResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,12 +53,31 @@ VRGetCapabilitiesResponse::VRGetCapabilitiesResponse(
VRGetCapabilitiesResponse::~VRGetCapabilitiesResponse() {}
void VRGetCapabilitiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
+ const auto result_code = static_cast<hmi_apis::Common_Result::eType>(
+ (*message_)[strings::params][hmi_response::code].asInt());
+
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetCapabilities);
+
+ if (hmi_apis::Common_Result::SUCCESS != result_code) {
+ SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities");
+ return;
+ }
+
+ const smart_objects::SmartObject& msg_params =
+ (*message_)[strings::msg_params];
- HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ std::vector<std::string> sections_to_update;
+ if (msg_params.keyExists(strings::vr_capabilities)) {
+ sections_to_update.push_back(strings::vr_capabilities);
+ hmi_capabilities_.set_vr_capabilities(msg_params[strings::vr_capabilities]);
+ }
- hmi_capabilities.set_vr_capabilities(
- (*message_)[strings::msg_params][strings::vr_capabilities]);
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::vr, sections_to_update, message_->getSchema())) {
+ SDL_LOG_ERROR("Failed to save VR.GetCapabilities response to cache");
+ }
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_request.cc
index 84179f6357..f5e9b0e848 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VRGetLanguageRequest::VRGetLanguageRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +54,16 @@ VRGetLanguageRequest::VRGetLanguageRequest(
VRGetLanguageRequest::~VRGetLanguageRequest() {}
void VRGetLanguageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void VRGetLanguageRequest::onTimeOut() {
+ SDL_LOG_AUTO_TRACE();
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetLanguage);
+}
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_response.cc
index 6b7fec736d..e8c881f6f8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_language_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VRGetLanguageResponse::VRGetLanguageResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,8 +56,18 @@ VRGetLanguageResponse::VRGetLanguageResponse(
VRGetLanguageResponse::~VRGetLanguageResponse() {}
void VRGetLanguageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace hmi_apis;
+ const Common_Result::eType result_code = static_cast<Common_Result::eType>(
+ (*message_)[strings::params][hmi_response::code].asInt());
+
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetLanguage);
+
+ if (Common_Result::SUCCESS != result_code) {
+ SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities");
+ return;
+ }
Common_Language::eType language = Common_Language::INVALID_ENUM;
@@ -67,10 +79,14 @@ void VRGetLanguageResponse::Run() {
hmi_capabilities_.set_active_vr_language(language);
- LOG4CXX_DEBUG(logger_,
- "Raising event for function_id " << function_id()
- << " and correlation_id "
- << correlation_id());
+ std::vector<std::string> sections_to_update{hmi_response::language};
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::vr, sections_to_update, message_->getSchema())) {
+ SDL_LOG_ERROR("Failed to save VR.GetLanguage response to cache");
+ }
+
+ SDL_LOG_DEBUG("Raising event for function_id "
+ << function_id() << " and correlation_id " << correlation_id());
event_engine::Event event(FunctionID::VR_GetLanguage);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_request.cc
index 351940bf68..73e68e8503 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VRGetSupportedLanguagesRequest::VRGetSupportedLanguagesRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,11 +54,16 @@ VRGetSupportedLanguagesRequest::VRGetSupportedLanguagesRequest(
VRGetSupportedLanguagesRequest::~VRGetSupportedLanguagesRequest() {}
void VRGetSupportedLanguagesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void VRGetSupportedLanguagesRequest::onTimeOut() {
+ SDL_LOG_AUTO_TRACE();
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetSupportedLanguages);
+}
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc
index 4c725267fa..72278fcddd 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VRGetSupportedLanguagesResponse::VRGetSupportedLanguagesResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,16 +56,26 @@ VRGetSupportedLanguagesResponse::VRGetSupportedLanguagesResponse(
VRGetSupportedLanguagesResponse::~VRGetSupportedLanguagesResponse() {}
void VRGetSupportedLanguagesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const hmi_apis::Common_Result::eType code =
static_cast<hmi_apis::Common_Result::eType>(
(*message_)[strings::params][hmi_response::code].asInt());
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetSupportedLanguages);
+
if (hmi_apis::Common_Result::SUCCESS == code) {
HMICapabilities& hmi_capabilities = hmi_capabilities_;
hmi_capabilities.set_vr_supported_languages(
(*message_)[strings::msg_params][hmi_response::languages]);
+
+ std::vector<std::string> sections_to_update{hmi_response::languages};
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::vr, sections_to_update, message_->getSchema())) {
+ SDL_LOG_ERROR(
+ "Failed to save VR.GetSupportedLanguages response to cache");
+ }
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_request.cc
index 12414eab10..303e7a6843 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_request.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VRIsReadyRequest::VRIsReadyRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,17 +56,17 @@ VRIsReadyRequest::VRIsReadyRequest(
VRIsReadyRequest::~VRIsReadyRequest() {}
void VRIsReadyRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
subscribe_on_event(hmi_apis::FunctionID::VR_IsReady, correlation_id());
SendRequest();
}
void VRIsReadyRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::VR_IsReady: {
- LOG4CXX_DEBUG(logger_, "Received VR_IsReady event");
+ SDL_LOG_DEBUG("Received VR_IsReady event");
unsubscribe_from_event(hmi_apis::FunctionID::VR_IsReady);
const bool is_available = app_mngr::commands::ChangeInterfaceState(
application_manager_, message, HmiInterfaces::HMI_INTERFACE_VR);
@@ -73,15 +75,16 @@ void VRIsReadyRequest::on_event(const event_engine::Event& event) {
hmi_capabilities.set_is_vr_cooperating(is_available);
if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
application_manager_, HmiInterfaces::HMI_INTERFACE_VR)) {
- LOG4CXX_INFO(logger_,
- "HmiInterfaces::HMI_INTERFACE_VR isn't available");
+ UpdateRequiredInterfaceCapabilitiesRequests(hmi_interface::vr);
+ SDL_LOG_INFO("HmiInterfaces::HMI_INTERFACE_VR isn't available");
return;
}
- SendMessageToHMI();
+
+ RequestInterfaceCapabilities(hmi_interface::vr);
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
@@ -89,25 +92,7 @@ void VRIsReadyRequest::on_event(const event_engine::Event& event) {
void VRIsReadyRequest::onTimeOut() {
// Note(dtrunov): According to new requirment APPLINK-27956
- SendMessageToHMI();
-}
-
-void VRIsReadyRequest::SendMessageToHMI() {
- std::shared_ptr<smart_objects::SmartObject> get_language(
- MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::VR_GetLanguage,
- application_manager_));
- HMICapabilities& hmi_capabilities = hmi_capabilities_;
- hmi_capabilities.set_handle_response_for(*get_language);
- rpc_service_.ManageHMICommand(get_language);
- std::shared_ptr<smart_objects::SmartObject> get_all_languages(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::VR_GetSupportedLanguages,
- application_manager_));
- rpc_service_.ManageHMICommand(get_all_languages);
- std::shared_ptr<smart_objects::SmartObject> get_capabilities(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::VR_GetCapabilities, application_manager_));
- rpc_service_.ManageHMICommand(get_capabilities);
+ RequestInterfaceCapabilities(hmi_interface::vr);
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_response.cc
index 373f97bf80..486cf32890 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_is_ready_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VRIsReadyResponse::VRIsReadyResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -51,7 +53,7 @@ VRIsReadyResponse::VRIsReadyResponse(
VRIsReadyResponse::~VRIsReadyResponse() {}
void VRIsReadyResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::VR_IsReady);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
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 4257158f6a..db834f05a8 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
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VRPerformInteractionRequest::VRPerformInteractionRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ VRPerformInteractionRequest::VRPerformInteractionRequest(
VRPerformInteractionRequest::~VRPerformInteractionRequest() {}
void VRPerformInteractionRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_response.cc
index 16378ab55a..2622b4f493 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_response.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VRPerformInteractionResponse::VRPerformInteractionResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ VRPerformInteractionResponse::VRPerformInteractionResponse(
VRPerformInteractionResponse::~VRPerformInteractionResponse() {}
void VRPerformInteractionResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::VR_PerformInteraction);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc
index 1dbfc97458..6717f332f8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc
@@ -36,6 +36,7 @@
#include "application_manager/application.h"
#include "application_manager/message_helper.h"
+#include "application_manager/resumption/resume_ctrl.h"
#include "utils/custom_string.h"
#include "utils/file_system.h"
#include "utils/helpers.h"
@@ -45,6 +46,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
namespace custom_str = utils::custom_string;
AddCommandRequest::AddCommandRequest(
@@ -68,7 +71,7 @@ AddCommandRequest::AddCommandRequest(
AddCommandRequest::~AddCommandRequest() {}
void AddCommandRequest::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
RemoveCommand();
CommandRequestImpl::onTimeOut();
}
@@ -79,13 +82,13 @@ bool AddCommandRequest::Init() {
}
void AddCommandRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(
(*message_)[strings::params][strings::connection_key].asUInt());
if (!app) {
- LOG4CXX_ERROR(logger_, "No application associated with session key");
+ SDL_LOG_ERROR("No application associated with session key");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -97,22 +100,26 @@ void AddCommandRequest::Run() {
application_manager_);
if (mobile_apis::Result::INVALID_DATA == verification_result) {
- LOG4CXX_ERROR(
- logger_, "MessageHelper::VerifyImage return " << verification_result);
+ SDL_LOG_ERROR("MessageHelper::VerifyImage return "
+ << verification_result);
SendResponse(false, verification_result);
return;
}
}
if (!((*message_)[strings::msg_params].keyExists(strings::cmd_id))) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA");
+ SDL_LOG_ERROR("INVALID_DATA");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
- if (app->FindCommand(
- (*message_)[strings::msg_params][strings::cmd_id].asUInt())) {
- LOG4CXX_ERROR(logger_, "INVALID_ID");
+ const auto command_id = static_cast<uint32_t>(
+ (*message_)[strings::msg_params][strings::cmd_id].asUInt());
+
+ const auto command = app->FindCommand(command_id);
+
+ if (smart_objects::SmartType_Null != command.getType()) {
+ SDL_LOG_ERROR("INVALID_ID");
SendResponse(false, mobile_apis::Result::INVALID_ID);
return;
}
@@ -149,13 +156,13 @@ void AddCommandRequest::Run() {
}
if (!data_exist) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA");
+ SDL_LOG_ERROR("INVALID_DATA");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_, "Incoming add command has contains \t\n \\t \\n");
+ SDL_LOG_ERROR("Incoming add command has contains \t\n \\t \\n");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -245,9 +252,9 @@ bool AddCommandRequest::CheckCommandName(ApplicationConstSharedPtr app) {
[strings::menu_name]
.asString()) &&
(saved_parent_id == parent_id)) {
- LOG4CXX_INFO(logger_,
- "AddCommandRequest::CheckCommandName received"
- " command name already exist in same level menu");
+ SDL_LOG_INFO(
+ "AddCommandRequest::CheckCommandName received"
+ " command name already exist in same level menu");
return false;
}
}
@@ -279,9 +286,9 @@ bool AddCommandRequest::CheckCommandVRSynonym(ApplicationConstSharedPtr app) {
.asCustomString();
if (vr_cmd_i.CompareIgnoreCase(vr_cmd_j)) {
- LOG4CXX_INFO(logger_,
- "AddCommandRequest::CheckCommandVRSynonym"
- " received command vr synonym already exist");
+ SDL_LOG_INFO(
+ "AddCommandRequest::CheckCommandVRSynonym"
+ " received command vr synonym already exist");
return false;
}
}
@@ -299,12 +306,12 @@ bool AddCommandRequest::CheckCommandParentId(ApplicationConstSharedPtr app) {
(*message_)[strings::msg_params][strings::menu_params]
[hmi_request::parent_id]
.asInt();
- smart_objects::SmartObject* parent = app->FindSubMenu(parent_id);
+ smart_objects::SmartObject parent = app->FindSubMenu(parent_id);
- if (!parent) {
- LOG4CXX_INFO(logger_,
- "AddCommandRequest::CheckCommandParentId received"
- " submenu doesn't exist");
+ if (smart_objects::SmartType_Null == parent.getType()) {
+ SDL_LOG_INFO(
+ "AddCommandRequest::CheckCommandParentId received"
+ " submenu doesn't exist");
return false;
}
return true;
@@ -312,7 +319,7 @@ bool AddCommandRequest::CheckCommandParentId(ApplicationConstSharedPtr app) {
// TODO(AKUTSAN) APPLINK-26973: Refactor AddCommandRequest
void AddCommandRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
const smart_objects::SmartObject& message = event.smart_object();
@@ -321,7 +328,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
application_manager_.application(connection_key());
if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return;
}
@@ -333,7 +340,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
switch (event.id()) {
case hmi_apis::FunctionID::UI_AddCommand: {
- LOG4CXX_INFO(logger_, "Received UI_AddCommand event");
+ SDL_LOG_INFO("Received UI_AddCommand event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
is_ui_received_ = true;
ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
@@ -345,7 +352,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
break;
}
case hmi_apis::FunctionID::VR_AddCommand: {
- LOG4CXX_INFO(logger_, "Received VR_AddCommand event");
+ SDL_LOG_INFO("Received VR_AddCommand event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
is_vr_received_ = true;
vr_result_ = static_cast<hmi_apis::Common_Result::eType>(
@@ -357,7 +364,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event" << event.id());
return;
}
}
@@ -411,8 +418,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
(is_no_ui_error && is_vr_invalid_unsupported) ||
(is_no_vr_error && is_ui_invalid_unsupported);
- LOG4CXX_DEBUG(logger_,
- "calculated result " << ui_result_ << " " << is_no_ui_error
+ SDL_LOG_DEBUG("calculated result " << ui_result_ << " " << is_no_ui_error
<< " " << is_no_vr_error);
const bool is_vr_or_ui_warning =
Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
@@ -445,7 +451,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
if (hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == vr_result_) {
result_code = MessageHelper::HMIToMobileResult(ui_result_);
}
- LOG4CXX_DEBUG(logger_, "HMIToMobileResult " << result_code);
+ SDL_LOG_DEBUG("HMIToMobileResult " << result_code);
}
if (BothSend() && hmi_apis::Common_Result::SUCCESS == vr_result_) {
@@ -466,7 +472,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params);
application->RemoveCommand(cmd_id);
result = false;
- LOG4CXX_DEBUG(logger_, "Result " << result);
+ SDL_LOG_DEBUG("Result " << result);
}
}
@@ -481,7 +487,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
application->RemoveCommand(cmd_id);
result = false;
- LOG4CXX_DEBUG(logger_, "Result " << result);
+ SDL_LOG_DEBUG("Result " << result);
}
HmiInterfaces::InterfaceState ui_interface_state =
@@ -496,12 +502,12 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
HmiInterfaces::STATE_NOT_AVAILABLE == vr_interface_state) ||
(is_ui_unsupported &&
HmiInterfaces::STATE_NOT_AVAILABLE == ui_interface_state))) {
- LOG4CXX_DEBUG(logger_, "!BothSend() && is_vr_or_ui_unsupported");
+ SDL_LOG_DEBUG("!BothSend() && is_vr_or_ui_unsupported");
result = false;
}
if (is_vr_and_ui_unsupported) {
- LOG4CXX_DEBUG(logger_, "UI and VR interface both unsupported");
+ SDL_LOG_DEBUG("UI and VR interface both unsupported");
result = false;
}
@@ -524,7 +530,7 @@ bool AddCommandRequest::IsPendingResponseExist() {
}
bool AddCommandRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const char* str = NULL;
if ((*message_)[strings::msg_params].keyExists(strings::menu_params)) {
@@ -532,7 +538,7 @@ bool AddCommandRequest::IsWhiteSpaceExist() {
[strings::menu_name]
.asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid menu name syntax check failed.");
+ SDL_LOG_ERROR("Invalid menu name syntax check failed.");
return true;
}
}
@@ -545,7 +551,7 @@ bool AddCommandRequest::IsWhiteSpaceExist() {
str = (*message_)[strings::msg_params][strings::vr_commands][i]
.asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid vr_commands syntax check failed");
+ SDL_LOG_ERROR("Invalid vr_commands syntax check failed");
return true;
}
}
@@ -555,7 +561,7 @@ bool AddCommandRequest::IsWhiteSpaceExist() {
str = (*message_)[strings::msg_params][strings::cmd_icon][strings::value]
.asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid cmd_icon value syntax check failed");
+ SDL_LOG_ERROR("Invalid cmd_icon value syntax check failed");
return true;
}
}
@@ -596,10 +602,10 @@ const std::string AddCommandRequest::GenerateMobileResponseInfo() {
}
void AddCommandRequest::RemoveCommand() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (app.use_count() == 0) {
- LOG4CXX_ERROR(logger_, "No application associated with session key");
+ SDL_LOG_ERROR("No application associated with session key");
return;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_response.cc
index 24ff3b5a28..6e8c589cb6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
AddCommandResponse::AddCommandResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ AddCommandResponse::AddCommandResponse(
AddCommandResponse::~AddCommandResponse() {}
void AddCommandResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc
index 89ccfb8bd7..e2a37f17bd 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc
@@ -42,6 +42,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
AddSubMenuRequest::AddSubMenuRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -57,12 +59,12 @@ AddSubMenuRequest::AddSubMenuRequest(
AddSubMenuRequest::~AddSubMenuRequest() {}
void AddSubMenuRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -77,31 +79,49 @@ void AddSubMenuRequest::Run() {
received_msg_params[strings::menu_icon], app, application_manager_);
if (mobile_apis::Result::INVALID_DATA == verification_result) {
- LOG4CXX_ERROR(
- logger_, "MessageHelper::VerifyImage return " << verification_result);
+ SDL_LOG_ERROR("MessageHelper::VerifyImage return "
+ << verification_result);
SendResponse(false, verification_result);
return;
}
}
const int32_t menu_id = received_msg_params[strings::menu_id].asInt();
- if (app->FindSubMenu(menu_id)) {
- LOG4CXX_ERROR(logger_, "Menu with id " << menu_id << " is not found.");
+
+ const auto sub_menu = app->FindSubMenu(menu_id);
+
+ if (smart_objects::SmartType_Null != sub_menu.getType()) {
+ SDL_LOG_ERROR("Menu with id " << menu_id << " already exists.");
SendResponse(false, mobile_apis::Result::INVALID_ID);
return;
}
+ const uint32_t parent_id =
+ received_msg_params.keyExists(strings::parent_id)
+ ? received_msg_params[strings::parent_id].asUInt()
+ : 0;
+
+ if (0 != parent_id) {
+ smart_objects::SmartObject parent = app->FindSubMenu(parent_id);
+ if (smart_objects::SmartType_Null == parent.getType()) {
+ SDL_LOG_ERROR("Parent ID " << parent_id << " doesn't exist");
+ SendResponse(
+ false, mobile_apis::Result::INVALID_ID, "Parent ID doesn't exist");
+ return;
+ }
+ }
+
const std::string& menu_name =
received_msg_params[strings::menu_name].asString();
- if (app->IsSubMenuNameAlreadyExist(menu_name)) {
- LOG4CXX_ERROR(logger_, "Menu name " << menu_name << " is duplicated.");
+ if (app->IsSubMenuNameAlreadyExist(menu_name, parent_id)) {
+ SDL_LOG_ERROR("Menu name " << menu_name << " is duplicated.");
SendResponse(false, mobile_apis::Result::DUPLICATE_NAME);
return;
}
if (!CheckSubMenuName()) {
- LOG4CXX_ERROR(logger_, "Sub-menu name is not valid.");
+ SDL_LOG_ERROR("Sub-menu name is not valid.");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -130,6 +150,10 @@ void AddSubMenuRequest::Run() {
}
msg_params[strings::menu_params][strings::menu_name] =
received_msg_params[strings::menu_name];
+ if (received_msg_params.keyExists(strings::parent_id)) {
+ msg_params[strings::menu_params][strings::parent_id] = parent_id;
+ }
+
msg_params[strings::app_id] = app->app_id();
StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
@@ -137,7 +161,7 @@ void AddSubMenuRequest::Run() {
}
void AddSubMenuRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -155,7 +179,7 @@ void AddSubMenuRequest::on_event(const event_engine::Event& event) {
application_manager_.application(connection_key());
if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return;
}
@@ -182,7 +206,7 @@ void AddSubMenuRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event" << event.id());
return;
}
}
@@ -194,12 +218,12 @@ bool AddSubMenuRequest::Init() {
}
bool AddSubMenuRequest::CheckSubMenuName() {
- LOG4CXX_AUTO_TRACE(logger_);
- const char* str = NULL;
+ SDL_LOG_AUTO_TRACE();
- str = (*message_)[strings::msg_params][strings::menu_name].asCharArray();
+ const char* str =
+ (*message_)[strings::msg_params][strings::menu_name].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_INFO(logger_, "Invalid subMenu name.");
+ SDL_LOG_INFO("Invalid subMenu name.");
return false;
}
return true;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_response.cc
index d91f13f1df..c9e8d1809f 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_response.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
AddSubMenuResponse::AddSubMenuResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ AddSubMenuResponse::AddSubMenuResponse(
AddSubMenuResponse::~AddSubMenuResponse() {}
void AddSubMenuResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_request.cc
index 9f36f260ae..47b3a87d52 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
AlertManeuverRequest::AlertManeuverRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,11 +58,11 @@ AlertManeuverRequest::AlertManeuverRequest(
AlertManeuverRequest::~AlertManeuverRequest() {}
void AlertManeuverRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if ((!(*message_)[strings::msg_params].keyExists(strings::soft_buttons)) &&
(!(*message_)[strings::msg_params].keyExists(strings::tts_chunks))) {
- LOG4CXX_ERROR(logger_, "AlertManeuverRequest::Request without parameters!");
+ SDL_LOG_ERROR("AlertManeuverRequest::Request without parameters!");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -69,15 +71,15 @@ void AlertManeuverRequest::Run() {
(*message_)[strings::params][strings::connection_key].asUInt());
if (NULL == app.get()) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_,
- "Incoming alert maneuver has contains \\t\\n \\\\t \\\\n"
- "text contains only whitespace in ttsChunks");
+ SDL_LOG_ERROR(
+ "Incoming alert maneuver has contains \\t\\n \\\\t \\\\n"
+ "text contains only whitespace in ttsChunks");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -91,7 +93,7 @@ void AlertManeuverRequest::Run() {
application_manager_);
if (mobile_apis::Result::SUCCESS != processing_result) {
- LOG4CXX_ERROR(logger_, "Wrong soft buttons parameters!");
+ SDL_LOG_ERROR("Wrong soft buttons parameters!");
SendResponse(false, processing_result);
return;
}
@@ -107,9 +109,8 @@ void AlertManeuverRequest::Run() {
MessageHelper::VerifyTtsFiles(tts_chunks, app, application_manager_);
if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
- LOG4CXX_ERROR(
- logger_,
- "MessageHelper::VerifyTtsFiles return " << verification_result);
+ SDL_LOG_ERROR("MessageHelper::VerifyTtsFiles return "
+ << verification_result);
SendResponse(false,
mobile_apis::Result::FILE_NOT_FOUND,
"One or more files needed for tts_chunks are not present");
@@ -154,12 +155,12 @@ void AlertManeuverRequest::Run() {
}
void AlertManeuverRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
hmi_apis::FunctionID::eType event_id = event.id();
switch (event_id) {
case hmi_apis::FunctionID::Navigation_AlertManeuver: {
- LOG4CXX_INFO(logger_, "Received Navigation_AlertManeuver event");
+ SDL_LOG_INFO("Received Navigation_AlertManeuver event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
pending_requests_.Remove(event_id);
navi_alert_maneuver_result_code_ =
@@ -169,7 +170,7 @@ void AlertManeuverRequest::on_event(const event_engine::Event& event) {
break;
}
case hmi_apis::FunctionID::TTS_Speak: {
- LOG4CXX_INFO(logger_, "Received TTS_Speak event");
+ SDL_LOG_INFO("Received TTS_Speak event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
pending_requests_.Remove(event_id);
tts_speak_result_code_ = static_cast<hmi_apis::Common_Result::eType>(
@@ -178,24 +179,24 @@ void AlertManeuverRequest::on_event(const event_engine::Event& event) {
break;
}
case hmi_apis::FunctionID::TTS_OnResetTimeout: {
- LOG4CXX_INFO(logger_, "Received TTS_OnResetTimeout event");
+ SDL_LOG_INFO("Received TTS_OnResetTimeout event");
application_manager_.updateRequestTimeout(
connection_key(), correlation_id(), default_timeout());
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
SendResponse(
- false, mobile_apis::Result::INVALID_ENUM, "Received unknown event");
+ false, mobile_apis::Result::INVALID_ENUM, "Received unknown event ");
return;
}
}
if (!pending_requests_.IsFinal(event_id)) {
- LOG4CXX_DEBUG(logger_,
- "There are some pending responses from HMI."
- "AlertManeuverRequest still waiting.");
+ SDL_LOG_DEBUG(
+ "There are some pending responses from HMI. "
+ "AlertManeuverRequest still waiting.");
return;
}
std::string return_info;
@@ -214,7 +215,7 @@ void AlertManeuverRequest::on_event(const event_engine::Event& event) {
bool AlertManeuverRequest::PrepareResponseParameters(
mobile_apis::Result::eType& result_code, std::string& return_info) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
app_mngr::commands::ResponseInfo navigation_alert_info(
@@ -246,7 +247,7 @@ bool AlertManeuverRequest::PrepareResponseParameters(
}
bool AlertManeuverRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using smart_objects::SmartArray;
if ((*message_)[strings::msg_params].keyExists(strings::tts_chunks)) {
@@ -258,7 +259,7 @@ bool AlertManeuverRequest::IsWhiteSpaceExist() {
for (; it_tts_chunk != tts_chunks_arr->end(); ++it_tts_chunk) {
const char* tts_chunk_text = (*it_tts_chunk)[strings::text].asCharArray();
if (strlen(tts_chunk_text) && !CheckSyntax(tts_chunk_text)) {
- LOG4CXX_ERROR(logger_, "Invalid tts_chunks syntax check failed");
+ SDL_LOG_ERROR("Invalid tts_chunks syntax check failed");
return true;
}
}
@@ -277,7 +278,7 @@ bool AlertManeuverRequest::IsWhiteSpaceExist() {
const char* soft_button_text =
(*it_soft_button)[strings::text].asCharArray();
if (!CheckSyntax(soft_button_text)) {
- LOG4CXX_ERROR(logger_, "Invalid soft_buttons syntax check failed");
+ SDL_LOG_ERROR("Invalid soft_buttons syntax check failed");
return true;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_response.cc
index 97c93d7455..993dc75548 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_maneuver_response.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
AlertManeuverResponse::AlertManeuverResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ AlertManeuverResponse::AlertManeuverResponse(
AlertManeuverResponse::~AlertManeuverResponse() {}
void AlertManeuverResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
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 57912e7087..cfd3106f4d 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
@@ -47,6 +47,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
AlertRequest::AlertRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -61,7 +63,6 @@ AlertRequest::AlertRequest(
, awaiting_ui_alert_response_(false)
, awaiting_tts_speak_response_(false)
, awaiting_tts_stop_speaking_response_(false)
- , is_alert_succeeded_(false)
, is_ui_alert_sent_(false)
, alert_result_(hmi_apis::Common_Result::INVALID_ENUM)
, tts_speak_result_(hmi_apis::Common_Result::INVALID_ENUM) {
@@ -82,9 +83,9 @@ bool AlertRequest::Init() {
// If soft buttons are present, SDL will not use initiate timeout tracking for
// response.
if (msg_params.keyExists(strings::soft_buttons)) {
- LOG4CXX_INFO(logger_,
- "Request contains soft buttons - request timeout "
- "will be set to 0.");
+ SDL_LOG_INFO(
+ "Request contains soft buttons - request timeout "
+ "will be set to 0.");
default_timeout_ = 0;
}
@@ -92,7 +93,7 @@ bool AlertRequest::Init() {
}
void AlertRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t app_id =
(*message_)[strings::params][strings::connection_key].asInt();
@@ -110,10 +111,11 @@ void AlertRequest::Run() {
(*message_)[strings::msg_params][strings::tts_chunks].length();
}
- if ((tts_chunks_exists && length_tts_chunks) ||
- ((*message_)[strings::msg_params].keyExists(strings::play_tone) &&
- (*message_)[strings::msg_params][strings::play_tone].asBool())) {
+ if (tts_chunks_exists && length_tts_chunks) {
awaiting_tts_speak_response_ = true;
+ } else if ((*message_)[strings::msg_params].keyExists(strings::play_tone) &&
+ (*message_)[strings::msg_params][strings::play_tone].asBool()) {
+ set_warning_info("playTone ignored since TTS Chunks were not provided");
}
SendAlertRequest(app_id);
@@ -123,24 +125,24 @@ void AlertRequest::Run() {
}
void AlertRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::TTS_OnResetTimeout:
case hmi_apis::FunctionID::UI_OnResetTimeout: {
- LOG4CXX_INFO(logger_,
- "Received UI_OnResetTimeout event "
- " or TTS_OnResetTimeout event"
- << awaiting_tts_speak_response_ << " "
- << awaiting_tts_stop_speaking_response_ << " "
- << awaiting_ui_alert_response_);
+ SDL_LOG_INFO(
+ "Received UI_OnResetTimeout event "
+ " or TTS_OnResetTimeout event "
+ << awaiting_tts_speak_response_ << " "
+ << awaiting_tts_stop_speaking_response_ << " "
+ << awaiting_ui_alert_response_);
application_manager_.updateRequestTimeout(
connection_key(), correlation_id(), default_timeout());
break;
}
case hmi_apis::FunctionID::UI_Alert: {
- LOG4CXX_INFO(logger_, "Received UI_Alert event");
+ SDL_LOG_INFO("Received UI_Alert event");
// Unsubscribe from event to avoid unwanted messages
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
unsubscribe_from_event(hmi_apis::FunctionID::UI_Alert);
@@ -164,7 +166,7 @@ void AlertRequest::on_event(const event_engine::Event& event) {
break;
}
case hmi_apis::FunctionID::TTS_Speak: {
- LOG4CXX_INFO(logger_, "Received TTS_Speak event");
+ SDL_LOG_INFO("Received TTS_Speak event");
// Unsubscribe from event to avoid unwanted messages
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
unsubscribe_from_event(hmi_apis::FunctionID::TTS_Speak);
@@ -175,7 +177,7 @@ void AlertRequest::on_event(const event_engine::Event& event) {
break;
}
case hmi_apis::FunctionID::TTS_StopSpeaking: {
- LOG4CXX_INFO(logger_, "Received TTS_StopSpeaking event");
+ SDL_LOG_INFO("Received TTS_StopSpeaking event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
// Unsubscribe from event to avoid unwanted messages
unsubscribe_from_event(hmi_apis::FunctionID::TTS_StopSpeaking);
@@ -183,7 +185,7 @@ void AlertRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
@@ -239,11 +241,11 @@ bool AlertRequest::PrepareResponseParameters(
}
bool AlertRequest::Validate(uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(app_id);
if (!app) {
- LOG4CXX_ERROR(logger_, "No application associated with session key");
+ SDL_LOG_ERROR("No application associated with session key");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return false;
}
@@ -253,12 +255,12 @@ bool AlertRequest::Validate(uint32_t app_id) {
app->AreCommandLimitsExceeded(
static_cast<mobile_apis::FunctionID::eType>(function_id()),
application_manager::TLimitSource::POLICY_TABLE)) {
- LOG4CXX_ERROR(logger_, "Alert frequency is too high.");
+ SDL_LOG_ERROR("Alert frequency is too high.");
SendResponse(false, mobile_apis::Result::REJECTED);
return false;
}
- if (!CheckStringsOfAlertRequest()) {
+ if (!CheckStrings()) {
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return false;
}
@@ -272,7 +274,7 @@ bool AlertRequest::Validate(uint32_t app_id) {
application_manager_);
if (mobile_apis::Result::SUCCESS != processing_result) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA!");
+ SDL_LOG_ERROR("INVALID_DATA!");
SendResponse(false, processing_result);
return false;
}
@@ -282,7 +284,7 @@ bool AlertRequest::Validate(uint32_t app_id) {
(!(*message_)[strings::msg_params].keyExists(strings::alert_text2)) &&
(!(*message_)[strings::msg_params].keyExists(strings::tts_chunks) &&
(1 > (*message_)[strings::msg_params][strings::tts_chunks].length()))) {
- LOG4CXX_ERROR(logger_, "Mandatory parameters are missing");
+ SDL_LOG_ERROR("Mandatory parameters are missing");
SendResponse(false,
mobile_apis::Result::INVALID_DATA,
"Mandatory parameters are missing");
@@ -296,9 +298,8 @@ bool AlertRequest::Validate(uint32_t app_id) {
MessageHelper::VerifyTtsFiles(tts_chunks, app, application_manager_);
if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
- LOG4CXX_ERROR(
- logger_,
- "MessageHelper::VerifyTtsFiles return " << verification_result);
+ SDL_LOG_ERROR("MessageHelper::VerifyTtsFiles return "
+ << verification_result);
SendResponse(false,
mobile_apis::Result::FILE_NOT_FOUND,
"One or more files needed for tts_chunks are not present");
@@ -310,7 +311,7 @@ bool AlertRequest::Validate(uint32_t app_id) {
}
void AlertRequest::SendAlertRequest(int32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(app_id);
smart_objects::SmartObject msg_params =
@@ -365,7 +366,7 @@ void AlertRequest::SendAlertRequest(int32_t app_id) {
application_manager_);
if (mobile_apis::Result::INVALID_DATA == verification_result) {
- LOG4CXX_ERROR(logger_, "Image verification failed.");
+ SDL_LOG_ERROR("Image verification failed.");
SendResponse(false, verification_result);
return;
}
@@ -402,15 +403,13 @@ void AlertRequest::SendAlertRequest(int32_t app_id) {
void AlertRequest::SendSpeakRequest(int32_t app_id,
bool tts_chunks_exists,
size_t length_tts_chunks) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace hmi_apis;
using namespace smart_objects;
// crate HMI speak request
SmartObject msg_params = smart_objects::SmartObject(SmartType_Map);
if (tts_chunks_exists && length_tts_chunks) {
msg_params[hmi_request::tts_chunks] =
- smart_objects::SmartObject(SmartType_Array);
- msg_params[hmi_request::tts_chunks] =
(*message_)[strings::msg_params][strings::tts_chunks];
}
if ((*message_)[strings::msg_params].keyExists(strings::play_tone) &&
@@ -423,14 +422,14 @@ void AlertRequest::SendSpeakRequest(int32_t app_id,
SendHMIRequest(FunctionID::TTS_Speak, &msg_params, true);
}
-bool AlertRequest::CheckStringsOfAlertRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
+bool AlertRequest::CheckStrings() {
+ SDL_LOG_AUTO_TRACE();
const char* str = NULL;
if ((*message_)[strings::msg_params].keyExists(strings::alert_text1)) {
str = (*message_)[strings::msg_params][strings::alert_text1].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid alert_text_1 syntax check failed");
+ SDL_LOG_ERROR("Invalid alert_text_1 syntax check failed");
return false;
}
}
@@ -438,7 +437,7 @@ bool AlertRequest::CheckStringsOfAlertRequest() {
if ((*message_)[strings::msg_params].keyExists(strings::alert_text2)) {
str = (*message_)[strings::msg_params][strings::alert_text2].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid alert_text_2 syntax check failed");
+ SDL_LOG_ERROR("Invalid alert_text_2 syntax check failed");
return false;
}
}
@@ -446,7 +445,7 @@ bool AlertRequest::CheckStringsOfAlertRequest() {
if ((*message_)[strings::msg_params].keyExists(strings::alert_text3)) {
str = (*message_)[strings::msg_params][strings::alert_text3].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid alert_text_3 syntax check failed");
+ SDL_LOG_ERROR("Invalid alert_text_3 syntax check failed");
return false;
}
}
@@ -457,7 +456,7 @@ bool AlertRequest::CheckStringsOfAlertRequest() {
for (size_t i = 0; i < tts_chunks_array.length(); ++i) {
str = tts_chunks_array[i][strings::text].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid tts_chunks text syntax check failed");
+ SDL_LOG_ERROR("Invalid tts_chunks text syntax check failed");
return false;
}
}
@@ -466,7 +465,7 @@ bool AlertRequest::CheckStringsOfAlertRequest() {
}
bool AlertRequest::HasHmiResponsesToWait() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return awaiting_ui_alert_response_ || awaiting_tts_speak_response_ ||
awaiting_tts_stop_speaking_response_;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_response.cc
index b709d13958..1b8eebe7d7 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_response.cc
@@ -42,6 +42,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
AlertResponse::AlertResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -57,7 +59,7 @@ AlertResponse::AlertResponse(
AlertResponse::~AlertResponse() {}
void AlertResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_request.cc
index 82e0703da1..27020f2719 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_request.cc
@@ -41,6 +41,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
CancelInteractionRequest::CancelInteractionRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ CancelInteractionRequest::CancelInteractionRequest(
CancelInteractionRequest::~CancelInteractionRequest() {}
void CancelInteractionRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto function_id = static_cast<mobile_apis::FunctionID::eType>(
(*message_)[strings::msg_params][strings::func_id].asInt());
@@ -66,9 +68,10 @@ void CancelInteractionRequest::Run() {
function_id,
mobile_apis::FunctionID::PerformInteractionID,
mobile_apis::FunctionID::AlertID,
+ mobile_apis::FunctionID::SubtleAlertID,
mobile_apis::FunctionID::ScrollableMessageID,
mobile_apis::FunctionID::SliderID)) {
- LOG4CXX_ERROR(logger_, "Bad function ID" << function_id);
+ SDL_LOG_ERROR("Bad function ID " << function_id);
SendResponse(false, mobile_apis::Result::INVALID_ID);
return;
}
@@ -86,10 +89,10 @@ void CancelInteractionRequest::Run() {
}
void CancelInteractionRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (event.id() != hmi_apis::FunctionID::UI_CancelInteraction) {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_response.cc
index af73e72a6f..9adec06c9f 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_response.cc
@@ -37,6 +37,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
CancelInteractionResponse::CancelInteractionResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,9 +54,9 @@ CancelInteractionResponse::CancelInteractionResponse(
CancelInteractionResponse::~CancelInteractionResponse() {}
void CancelInteractionResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
} // namespace commands
-} // namespace sdl_rpc_plugin \ No newline at end of file
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_request.cc
index 50217a9c8a..13a57cf9a8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_request.cc
@@ -44,7 +44,8 @@
namespace {
namespace custom_str = utils::custom_string;
struct IsSameNickname {
- IsSameNickname(const custom_str::CustomString& app_id) : app_id_(app_id) {}
+ explicit IsSameNickname(const custom_str::CustomString& app_id)
+ : app_id_(app_id) {}
bool operator()(const policy::StringArray::value_type& nickname) const {
return app_id_.CompareIgnoreCase(nickname.c_str());
}
@@ -59,6 +60,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ChangeRegistrationRequest::ChangeRegistrationRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -144,19 +147,18 @@ void ChangeRegistrationRequest::SendUIRequest(
}
void ChangeRegistrationRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace smart_objects;
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
if (IsWhiteSpaceExist()) {
- LOG4CXX_INFO(logger_,
- "Incoming request contains \t\n \\t \\n or whitespace");
+ SDL_LOG_INFO("Incoming request contains \t\n \\t \\n or whitespace");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -176,14 +178,14 @@ void ChangeRegistrationRequest::Run() {
if (false == (IsLanguageSupportedByUI(hmi_language) &&
IsLanguageSupportedByVR(language) &&
IsLanguageSupportedByTTS(language))) {
- LOG4CXX_ERROR(logger_, "Language is not supported");
- SendResponse(false, mobile_apis::Result::REJECTED);
+ SDL_LOG_ERROR("Language is not supported");
+ SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
return;
}
if (msg_params.keyExists(strings::app_name) &&
!IsNicknameAllowed(msg_params[strings::app_name].asCustomString())) {
- LOG4CXX_ERROR(logger_, "Nickname is not allowed.");
+ SDL_LOG_ERROR("Nickname is not allowed.");
SendResponse(false, mobile_apis::Result::DISALLOWED);
return;
}
@@ -195,9 +197,8 @@ void ChangeRegistrationRequest::Run() {
MessageHelper::VerifyTtsFiles(tts_name, app, application_manager_);
if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
- LOG4CXX_ERROR(
- logger_,
- "MessageHelper::VerifyTtsFiles return " << verification_result);
+ SDL_LOG_ERROR("MessageHelper::VerifyTtsFiles return "
+ << verification_result);
SendResponse(false,
mobile_apis::Result::FILE_NOT_FOUND,
"One or more files needed for tts_name are not present");
@@ -244,14 +245,14 @@ void ChangeRegistrationRequest::Run() {
}
void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
hmi_apis::FunctionID::eType event_id = event.id();
switch (event_id) {
case hmi_apis::FunctionID::UI_ChangeRegistration: {
- LOG4CXX_INFO(logger_, "Received UI_ChangeRegistration event");
+ SDL_LOG_INFO("Received UI_ChangeRegistration event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
pending_requests_.Remove(event_id);
ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
@@ -260,7 +261,7 @@ void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
break;
}
case hmi_apis::FunctionID::VR_ChangeRegistration: {
- LOG4CXX_INFO(logger_, "Received VR_ChangeRegistration event");
+ SDL_LOG_INFO("Received VR_ChangeRegistration event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
pending_requests_.Remove(event_id);
vr_result_ = static_cast<hmi_apis::Common_Result::eType>(
@@ -269,7 +270,7 @@ void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
break;
}
case hmi_apis::FunctionID::TTS_ChangeRegistration: {
- LOG4CXX_INFO(logger_, "Received TTS_ChangeRegistration event");
+ SDL_LOG_INFO("Received TTS_ChangeRegistration event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
pending_requests_.Remove(event_id);
tts_result_ = static_cast<hmi_apis::Common_Result::eType>(
@@ -278,7 +279,7 @@ void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event_id);
+ SDL_LOG_ERROR("Received unknown event " << event_id);
return;
}
}
@@ -288,7 +289,7 @@ void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
application_manager_.application(connection_key());
if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return;
}
@@ -315,9 +316,9 @@ void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
response_info.empty() ? NULL : response_info.c_str(),
&(message[strings::msg_params]));
} else {
- LOG4CXX_INFO(logger_,
- "There are some pending responses from HMI."
- "ChangeRegistrationRequest still waiting.");
+ SDL_LOG_INFO(
+ "There are some pending responses from HMI."
+ "ChangeRegistrationRequest still waiting.");
}
}
@@ -331,7 +332,7 @@ void CheckInfo(std::string& str) {
bool ChangeRegistrationRequest::PrepareResponseParameters(
mobile_apis::Result::eType& result_code, std::string& response_info) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
const bool is_tts_succeeded_unsupported =
Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
@@ -460,11 +461,10 @@ bool ChangeRegistrationRequest::PrepareResponseParameters(
bool ChangeRegistrationRequest::IsLanguageSupportedByUI(
const int32_t& hmi_display_lang) {
const HMICapabilities& hmi_capabilities = hmi_capabilities_;
- const smart_objects::SmartObject* ui_languages =
- hmi_capabilities.ui_supported_languages();
+ const auto ui_languages = hmi_capabilities.ui_supported_languages();
if (!ui_languages) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return false;
}
@@ -474,7 +474,7 @@ bool ChangeRegistrationRequest::IsLanguageSupportedByUI(
}
}
- LOG4CXX_ERROR(logger_, "Language isn't supported by UI");
+ SDL_LOG_ERROR("Language isn't supported by UI");
return false;
}
@@ -482,11 +482,10 @@ bool ChangeRegistrationRequest::IsLanguageSupportedByUI(
bool ChangeRegistrationRequest::IsLanguageSupportedByVR(
const int32_t& hmi_display_lang) {
const HMICapabilities& hmi_capabilities = hmi_capabilities_;
- const smart_objects::SmartObject* vr_languages =
- hmi_capabilities.vr_supported_languages();
+ const auto vr_languages = hmi_capabilities.vr_supported_languages();
if (!vr_languages) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return false;
}
@@ -496,7 +495,7 @@ bool ChangeRegistrationRequest::IsLanguageSupportedByVR(
}
}
- LOG4CXX_ERROR(logger_, "Language isn't supported by VR");
+ SDL_LOG_ERROR("Language isn't supported by VR");
return false;
}
@@ -504,22 +503,20 @@ bool ChangeRegistrationRequest::IsLanguageSupportedByVR(
bool ChangeRegistrationRequest::IsLanguageSupportedByTTS(
const int32_t& hmi_display_lang) {
const HMICapabilities& hmi_capabilities = hmi_capabilities_;
- const smart_objects::SmartObject* tts_languages =
- hmi_capabilities.tts_supported_languages();
+ const auto tts_languages = hmi_capabilities.tts_supported_languages();
if (!tts_languages) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return false;
}
for (size_t i = 0; i < tts_languages->length(); ++i) {
if (hmi_display_lang == tts_languages->getElement(i).asInt()) {
return true;
- break;
}
}
- LOG4CXX_ERROR(logger_, "Language isn't supported by TTS");
+ SDL_LOG_ERROR("Language isn't supported by TTS");
return false;
}
@@ -529,7 +526,7 @@ bool ChangeRegistrationRequest::IsWhiteSpaceExist() {
if ((*message_)[strings::msg_params].keyExists(strings::app_name)) {
str = (*message_)[strings::msg_params][strings::app_name].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid app_name syntax check failed");
+ SDL_LOG_ERROR("Invalid app_name syntax check failed");
return true;
}
}
@@ -544,7 +541,7 @@ bool ChangeRegistrationRequest::IsWhiteSpaceExist() {
for (; it_tn != it_tn_end; ++it_tn) {
str = (*it_tn)[strings::text].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid tts_name syntax check failed");
+ SDL_LOG_ERROR("Invalid tts_name syntax check failed");
return true;
}
}
@@ -555,8 +552,7 @@ bool ChangeRegistrationRequest::IsWhiteSpaceExist() {
str = (*message_)[strings::msg_params][strings::ngn_media_screen_app_name]
.asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid ngn_media_screen_app_name syntax check failed");
+ SDL_LOG_ERROR("Invalid ngn_media_screen_app_name syntax check failed");
return true;
}
}
@@ -571,7 +567,7 @@ bool ChangeRegistrationRequest::IsWhiteSpaceExist() {
for (; it_vs != it_vs_end; ++it_vs) {
str = (*it_vs).asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid vr_synonyms syntax check failed");
+ SDL_LOG_ERROR("Invalid vr_synonyms syntax check failed");
return true;
}
}
@@ -581,7 +577,7 @@ bool ChangeRegistrationRequest::IsWhiteSpaceExist() {
mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence(
const connection_handler::DeviceHandle& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& msg_params =
(*message_)[strings::msg_params];
@@ -613,7 +609,7 @@ mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence(
const auto& cur_name = app->name();
if (msg_params.keyExists(strings::app_name)) {
if (app_name.CompareIgnoreCase(cur_name)) {
- LOG4CXX_ERROR(logger_, "Application name is known already.");
+ SDL_LOG_ERROR("Application name is known already.");
return mobile_apis::Result::DUPLICATE_NAME;
}
const auto vr = app->vr_synonyms();
@@ -622,7 +618,7 @@ mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence(
CoincidencePredicateVR v(app_name);
if (0 != std::count_if(curr_vr->begin(), curr_vr->end(), v)) {
- LOG4CXX_ERROR(logger_, "Application name is known already.");
+ SDL_LOG_ERROR("Application name is known already.");
return mobile_apis::Result::DUPLICATE_NAME;
}
}
@@ -634,7 +630,7 @@ mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence(
CoincidencePredicateVR v(cur_name);
if (0 != std::count_if(new_vr->begin(), new_vr->end(), v)) {
- LOG4CXX_ERROR(logger_, "vr_synonyms duplicated with app_name .");
+ SDL_LOG_ERROR("vr_synonyms duplicated with app_name .");
return mobile_apis::Result::DUPLICATE_NAME;
}
} // End vr check
@@ -649,11 +645,9 @@ mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence(
tts_curr->end(),
compare_tts_name);
if (it_tts != tts_array->end()) {
- LOG4CXX_ERROR(
- logger_,
- "TTS name: "
- << (*it_tts)[strings::text].asCustomString().AsMBString()
- << " is known already");
+ SDL_LOG_ERROR("TTS name: "
+ << (*it_tts)[strings::text].asCustomString().AsMBString()
+ << " is known already");
return mobile_apis::Result::DUPLICATE_NAME;
}
} // End tts check
@@ -664,13 +658,12 @@ mobile_apis::Result::eType ChangeRegistrationRequest::CheckCoincidence(
bool ChangeRegistrationRequest::IsNicknameAllowed(
const custom_str::CustomString& app_name) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(
- logger_,
- "Can't find appication with connection key " << connection_key());
+ SDL_LOG_ERROR("Can't find appication with connection key "
+ << connection_key());
return false;
}
@@ -683,9 +676,8 @@ bool ChangeRegistrationRequest::IsNicknameAllowed(
policy_app_id, &app_nicknames, &app_hmi_types);
if (!init_result) {
- LOG4CXX_ERROR(logger_,
- "Error during getting of nickname list for application "
- << policy_app_id);
+ SDL_LOG_ERROR("Error during getting of nickname list for application "
+ << policy_app_id);
return false;
}
@@ -694,8 +686,7 @@ bool ChangeRegistrationRequest::IsNicknameAllowed(
policy::StringArray::const_iterator it =
std::find_if(app_nicknames.begin(), app_nicknames.end(), compare);
if (app_nicknames.end() == it) {
- LOG4CXX_WARN(logger_,
- "Application name was not found in nicknames list.");
+ SDL_LOG_WARN("Application name was not found in nicknames list.");
usage_statistics::AppCounter count_of_rejections_nickname_mismatch(
policy_handler_.GetStatisticManager(),
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_response.cc
index 78c60bc746..58bf5f4caa 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/change_registration_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ChangeRegistrationResponse::ChangeRegistrationResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ ChangeRegistrationResponse::ChangeRegistrationResponse(
ChangeRegistrationResponse::~ChangeRegistrationResponse() {}
void ChangeRegistrationResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_request.cc
index 275f1d82a6..b4a09844f2 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_request.cc
@@ -39,6 +39,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
CloseApplicationRequest::CloseApplicationRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,11 +56,11 @@ CloseApplicationRequest::CloseApplicationRequest(
CloseApplicationRequest::~CloseApplicationRequest() {}
void CloseApplicationRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (app.use_count() == 0) {
- LOG4CXX_ERROR(logger_, "Application does not exist");
+ SDL_LOG_ERROR("Application does not exist");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -71,7 +73,7 @@ void CloseApplicationRequest::Run() {
}
void CloseApplicationRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
auto msg_params = message[strings::msg_params];
@@ -89,7 +91,7 @@ void CloseApplicationRequest::on_event(const event_engine::Event& event) {
application_manager_.application(connection_key());
if (app.use_count() == 0) {
- LOG4CXX_ERROR(logger_, "Application does not exist");
+ SDL_LOG_ERROR("Application does not exist");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_response.cc
index 934804e1b1..a03c7a64f4 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_response.cc
@@ -38,6 +38,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
CloseApplicationResponse::CloseApplicationResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ CloseApplicationResponse::CloseApplicationResponse(
CloseApplicationResponse::~CloseApplicationResponse() {}
void CloseApplicationResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
index 258aefd63f..0d1d876497 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
@@ -39,6 +39,7 @@
#include "application_manager/application_impl.h"
#include "application_manager/message_helper.h"
+#include "application_manager/resumption/resume_ctrl.h"
#include "utils/gen_hash.h"
#include "utils/helpers.h"
@@ -47,6 +48,8 @@ const char* kInvalidImageWarningInfo = "Requested image(s) not found.";
namespace sdl_rpc_plugin {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
using namespace application_manager;
CreateInteractionChoiceSetRequest::CreateInteractionChoiceSetRequest(
@@ -68,16 +71,16 @@ CreateInteractionChoiceSetRequest::CreateInteractionChoiceSetRequest(
, is_timed_out_(false) {}
CreateInteractionChoiceSetRequest::~CreateInteractionChoiceSetRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
void CreateInteractionChoiceSetRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace mobile_apis;
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -105,7 +108,7 @@ void CreateInteractionChoiceSetRequest::Run() {
}
if (verification_result_image == Result::INVALID_DATA ||
verification_result_secondary_image == Result::INVALID_DATA) {
- LOG4CXX_ERROR(logger_, "Image verification failed.");
+ SDL_LOG_ERROR("Image verification failed.");
SendResponse(false, Result::INVALID_DATA);
return;
} else if (verification_result_image == Result::WARNINGS ||
@@ -119,9 +122,10 @@ void CreateInteractionChoiceSetRequest::Run() {
(*message_)[strings::msg_params][strings::interaction_choice_set_id]
.asInt();
- if (app->FindChoiceSet(choice_set_id_)) {
- LOG4CXX_ERROR(logger_,
- "Choice set with id " << choice_set_id_ << " is not found.");
+ const auto choice_set = app->FindChoiceSet(choice_set_id_);
+
+ if (smart_objects::SmartType_Null != choice_set.getType()) {
+ SDL_LOG_ERROR("Choice set with id " << choice_set_id_ << " is not found.");
SendResponse(false, Result::INVALID_ID);
return;
}
@@ -160,7 +164,7 @@ void CreateInteractionChoiceSetRequest::Run() {
mobile_apis::Result::eType CreateInteractionChoiceSetRequest::CheckChoiceSet(
ApplicationConstSharedPtr app) {
using namespace smart_objects;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::set<uint32_t> choice_id_set;
@@ -175,15 +179,14 @@ mobile_apis::Result::eType CreateInteractionChoiceSetRequest::CheckChoiceSet(
choice_id_set.insert(
(*current_choice_set_it)[strings::choice_id].asInt());
if (!ins_res.second) {
- LOG4CXX_ERROR(logger_,
- "Choice with ID "
- << (*current_choice_set_it)[strings::choice_id].asInt()
- << " already exists");
+ SDL_LOG_ERROR("Choice with ID "
+ << (*current_choice_set_it)[strings::choice_id].asInt()
+ << " already exists");
return mobile_apis::Result::INVALID_ID;
}
if (IsWhiteSpaceExist(*current_choice_set_it)) {
- LOG4CXX_ERROR(logger_, "Incoming choice set has contains \t\n \\t \\n");
+ SDL_LOG_ERROR("Incoming choice set has contains \t\n \\t \\n");
return mobile_apis::Result::INVALID_DATA;
}
for (next_choice_set_it = current_choice_set_it + 1;
@@ -218,9 +221,8 @@ bool CreateInteractionChoiceSetRequest::compareSynonyms(
CreateInteractionChoiceSetRequest::compareStr);
if (it != vr_cmds_1->end()) {
- LOG4CXX_INFO(
- logger_,
- "Incoming choice set has duplicated VR synonyms " << it->asString());
+ SDL_LOG_INFO("Incoming choice set has duplicated VR synonyms "
+ << it->asString());
return true;
}
@@ -235,19 +237,18 @@ bool CreateInteractionChoiceSetRequest::compareStr(
bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist(
const smart_objects::SmartObject& choice_set) {
- LOG4CXX_AUTO_TRACE(logger_);
- const char* str = NULL;
+ SDL_LOG_AUTO_TRACE();
- str = choice_set[strings::menu_name].asCharArray();
+ const char* str = choice_set[strings::menu_name].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid menu_name syntax check failed");
+ SDL_LOG_ERROR("Invalid menu_name syntax check failed");
return true;
}
if (choice_set.keyExists(strings::secondary_text)) {
str = choice_set[strings::secondary_text].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid secondary_text syntax check failed");
+ SDL_LOG_ERROR("Invalid secondary_text syntax check failed");
return true;
}
}
@@ -255,7 +256,7 @@ bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist(
if (choice_set.keyExists(strings::tertiary_text)) {
str = choice_set[strings::tertiary_text].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid tertiary_text syntax check failed");
+ SDL_LOG_ERROR("Invalid tertiary_text syntax check failed");
return true;
}
}
@@ -266,7 +267,7 @@ bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist(
for (size_t i = 0; i < len; ++i) {
str = choice_set[strings::vr_commands][i].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid vr_commands syntax check failed");
+ SDL_LOG_ERROR("Invalid vr_commands syntax check failed");
return true;
}
}
@@ -275,7 +276,7 @@ bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist(
if (choice_set.keyExists(strings::image)) {
str = choice_set[strings::image][strings::value].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid image value syntax check failed");
+ SDL_LOG_ERROR("Invalid image value syntax check failed");
return true;
}
}
@@ -283,9 +284,9 @@ bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist(
if (choice_set.keyExists(strings::secondary_image)) {
str = choice_set[strings::secondary_image][strings::value].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid secondary_image value. "
- "Syntax check failed");
+ SDL_LOG_ERROR(
+ "Invalid secondary_image value. "
+ "Syntax check failed");
return true;
}
}
@@ -294,7 +295,7 @@ bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist(
void CreateInteractionChoiceSetRequest::SendVRAddCommandRequests(
application_manager::ApplicationSharedPtr const app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject& choice_set = (*message_)[strings::msg_params];
smart_objects::SmartObject msg_params =
@@ -311,8 +312,7 @@ void CreateInteractionChoiceSetRequest::SendVRAddCommandRequests(
{
sync_primitives::AutoLock error_lock(error_from_hmi_lock_);
if (error_from_hmi_) {
- LOG4CXX_WARN(logger_,
- "Error from HMI received. Stop sending VRCommands");
+ SDL_LOG_WARN("Error from HMI received. Stop sending VRCommands");
break;
}
}
@@ -320,8 +320,6 @@ void CreateInteractionChoiceSetRequest::SendVRAddCommandRequests(
msg_params[strings::cmd_id] =
choice_set[strings::choice_set][chs_num][strings::choice_id];
msg_params[strings::vr_commands] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- msg_params[strings::vr_commands] =
choice_set[strings::choice_set][chs_num][strings::vr_commands];
sync_primitives::AutoLock commands_lock(vr_commands_lock_);
@@ -332,19 +330,17 @@ void CreateInteractionChoiceSetRequest::SendVRAddCommandRequests(
VRCommandInfo vr_command(vr_cmd_id);
sent_commands_map_[vr_corr_id] = vr_command;
- LOG4CXX_DEBUG(
- logger_,
- "VR_command sent corr_id " << vr_corr_id << " cmd_id " << vr_corr_id);
+ SDL_LOG_DEBUG("VR_command sent corr_id " << vr_corr_id << " cmd_id "
+ << vr_corr_id);
}
expected_chs_count_ = chs_num;
- LOG4CXX_DEBUG(logger_, "expected_chs_count_ = " << expected_chs_count_);
+ SDL_LOG_DEBUG("expected_chs_count_ = " << expected_chs_count_);
}
void CreateInteractionChoiceSetRequest::ProcessHmiError(
const hmi_apis::Common_Result::eType vr_result) {
- LOG4CXX_DEBUG(logger_,
- "Hmi response is not Success: "
- << vr_result << ". Stop sending VRAddCommand requests");
+ SDL_LOG_DEBUG("Hmi response is not Success: "
+ << vr_result << ". Stop sending VRAddCommand requests");
if (!error_from_hmi_) {
error_from_hmi_ = true;
std::string info =
@@ -359,7 +355,7 @@ bool CreateInteractionChoiceSetRequest::ProcessSuccesfulHMIResponse(
const uint32_t corr_id) {
SentCommandsMap::iterator it = sent_commands_map_.find(corr_id);
if (sent_commands_map_.end() == it) {
- LOG4CXX_WARN(logger_, "HMI response for unknown VR command received");
+ SDL_LOG_WARN("HMI response for unknown VR command received");
return false;
}
VRCommandInfo& vr_command = it->second;
@@ -369,14 +365,13 @@ bool CreateInteractionChoiceSetRequest::ProcessSuccesfulHMIResponse(
void CreateInteractionChoiceSetRequest::CountReceivedVRResponses() {
received_chs_count_++;
- LOG4CXX_DEBUG(logger_,
- "Got VR.AddCommand response, there are "
- << expected_chs_count_ - received_chs_count_
- << " more to wait.");
+ SDL_LOG_DEBUG("Got VR.AddCommand response, there are "
+ << expected_chs_count_ - received_chs_count_
+ << " more to wait.");
if (received_chs_count_ < expected_chs_count_) {
application_manager_.updateRequestTimeout(
connection_key(), correlation_id(), default_timeout());
- LOG4CXX_DEBUG(logger_, "Timeout for request was updated");
+ SDL_LOG_DEBUG("Timeout for request was updated");
} else {
OnAllHMIResponsesReceived();
}
@@ -386,7 +381,7 @@ void CreateInteractionChoiceSetRequest::on_event(
const event_engine::Event& event) {
using namespace hmi_apis;
using namespace helpers;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
const Common_Result::eType result = static_cast<Common_Result::eType>(
@@ -412,7 +407,7 @@ void CreateInteractionChoiceSetRequest::on_event(
}
void CreateInteractionChoiceSetRequest::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!error_from_hmi_) {
SendResponse(false, mobile_apis::Result::GENERIC_ERROR);
@@ -420,6 +415,12 @@ void CreateInteractionChoiceSetRequest::onTimeOut() {
CommandRequestImpl::onTimeOut();
DeleteChoices();
+ auto& resume_ctrl = application_manager_.resume_controller();
+
+ resume_ctrl.HandleOnTimeOut(
+ correlation_id(),
+ static_cast<hmi_apis::FunctionID::eType>(function_id()));
+
// We have to keep request alive until receive all responses from HMI
// according to SDLAQ-CRS-2976
sync_primitives::AutoLock timeout_lock_(is_timed_out_lock_);
@@ -434,12 +435,12 @@ bool CreateInteractionChoiceSetRequest::Init() {
}
void CreateInteractionChoiceSetRequest::DeleteChoices() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr application =
application_manager_.application(connection_key());
if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return;
}
application->RemoveChoiceSet(choice_set_id_);
@@ -455,16 +456,15 @@ void CreateInteractionChoiceSetRequest::DeleteChoices() {
msg_param[strings::cmd_id] = vr_command_info.cmd_id_;
SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_param);
} else {
- LOG4CXX_WARN(logger_,
- "succesful response has not been received for cmd_id = "
- << vr_command_info.cmd_id_);
+ SDL_LOG_WARN("succesful response has not been received for cmd_id = "
+ << vr_command_info.cmd_id_);
}
}
sent_commands_map_.clear();
}
void CreateInteractionChoiceSetRequest::OnAllHMIResponsesReceived() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!error_from_hmi_ && should_send_warnings_) {
SendResponse(true, mobile_apis::Result::WARNINGS, kInvalidImageWarningInfo);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_response.cc
index 43dba2f238..5b274adeb3 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_response.cc
@@ -41,6 +41,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
CreateInteractionChoiceSetResponse::CreateInteractionChoiceSetResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,12 +58,12 @@ CreateInteractionChoiceSetResponse::CreateInteractionChoiceSetResponse(
CreateInteractionChoiceSetResponse::~CreateInteractionChoiceSetResponse() {}
void CreateInteractionChoiceSetResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// check if response false
if (true == (*message_)[strings::msg_params].keyExists(strings::success)) {
if ((*message_)[strings::msg_params][strings::success].asBool() == false) {
- LOG4CXX_ERROR(logger_, "Success = false");
+ SDL_LOG_ERROR("Success = false");
SendResponse(false);
return;
}
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 b69b0ee801..2a0ca4ddb3 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
@@ -45,6 +45,8 @@ using app_mngr::ApplicationSharedPtr;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
CreateWindowRequest::CreateWindowRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -64,17 +66,15 @@ bool CreateWindowRequest::CheckWindowName(
const app_mngr::WindowID window_id,
const std::string& window_name) const {
if (mobile_apis::PredefinedWindows::PRIMARY_WIDGET == window_id) {
- LOG4CXX_DEBUG(logger_,
- "Window name check is ignored for the primary widgets");
+ SDL_LOG_DEBUG("Window name check is ignored for the primary widgets");
return true;
}
const bool names_are_equal = window_name == app->name().c_str();
if (names_are_equal &&
mobile_apis::PredefinedWindows::DEFAULT_WINDOW != window_id) {
- LOG4CXX_ERROR(logger_,
- "Regular widget can't have the same name as application: "
- << window_name);
+ SDL_LOG_ERROR("Regular widget can't have the same name as application: "
+ << window_name);
return false;
}
@@ -132,12 +132,12 @@ app_mngr::WindowID CreateWindowRequest::window_id() const {
}
void CreateWindowRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto application = application_manager_.application(connection_key());
if (!application) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -145,8 +145,7 @@ void CreateWindowRequest::Run() {
const auto window_id =
(*message_)[strings::msg_params][strings::window_id].asInt();
if (application->WindowIdExists(window_id)) {
- LOG4CXX_ERROR(logger_,
- "Window with id #" << window_id << " does already exist");
+ SDL_LOG_ERROR("Window with id #" << window_id << " does already exist");
SendResponse(false, mobile_apis::Result::INVALID_ID);
return;
}
@@ -155,7 +154,7 @@ void CreateWindowRequest::Run() {
(*message_)[strings::msg_params][strings::window_type].asInt();
if (mobile_apis::WindowType::eType::MAIN == window_type) {
- LOG4CXX_ERROR(logger_, "MAIN application window already exists");
+ SDL_LOG_ERROR("MAIN application window already exists");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -167,8 +166,7 @@ void CreateWindowRequest::Run() {
[strings::duplicate_updates_from_window_id]
.asInt();
if (!application->WindowIdExists(duplicate_updates_from_window_id)) {
- LOG4CXX_ERROR(logger_,
- "Window with id #" << duplicate_updates_from_window_id
+ SDL_LOG_ERROR("Window with id #" << duplicate_updates_from_window_id
<< " does not exist");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
@@ -178,8 +176,7 @@ void CreateWindowRequest::Run() {
const std::string window_name =
(*message_)[strings::msg_params][strings::window_name].asString();
if (!CheckWindowName(application, window_id, window_name)) {
- LOG4CXX_ERROR(logger_,
- "Window name \"" << window_name
+ SDL_LOG_ERROR("Window name \"" << window_name
<< "\" is disallowed for window #"
<< window_id);
SendResponse(false, mobile_apis::Result::DUPLICATE_NAME);
@@ -198,22 +195,22 @@ void CreateWindowRequest::Run() {
}
void CreateWindowRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (hmi_apis::FunctionID::UI_CreateWindow != event.id()) {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
auto application = application_manager_.application(connection_key());
if (!application) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
- LOG4CXX_INFO(logger_, "Received CreateWindow event");
+ SDL_LOG_INFO("Received CreateWindow event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
const smart_objects::SmartObject& response_message = event.smart_object();
@@ -226,7 +223,7 @@ void CreateWindowRequest::on_event(const event_engine::Event& event) {
GetInfo(response_message, response_info);
if (!is_success) {
- LOG4CXX_ERROR(logger_, "CreateWindow request has failed on HMI side");
+ SDL_LOG_ERROR("CreateWindow request has failed on HMI side");
SendResponse(is_success,
result_code,
response_info.empty() ? nullptr : response_info.c_str());
@@ -247,7 +244,7 @@ bool CreateWindowRequest::Init() {
bool CreateWindowRequest::IsWindowForAssociatedServiceCreated(
app_mngr::ApplicationSharedPtr app) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto window_optional_params_map =
app->window_optional_params_map().GetData();
@@ -266,8 +263,7 @@ bool CreateWindowRequest::IsWindowForAssociatedServiceCreated(
window_optional_params_map.end(),
[&associated_service_type](
const std::pair<WindowID, smart_objects::SmartObjectSPtr>& element) {
- LOG4CXX_DEBUG(logger_,
- "Searching for " << associated_service_type
+ SDL_LOG_DEBUG("Searching for " << associated_service_type
<< " in window info for id "
<< element.first);
if (element.second->keyExists(strings::associated_service_type) &&
@@ -285,7 +281,7 @@ bool CreateWindowRequest::IsWindowForAssociatedServiceCreated(
bool CreateWindowRequest::DoesExceedMaxAllowedWindows(
app_mngr::ApplicationSharedPtr app) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto get_current_number_of_windows =
[&app](const mobile_apis::WindowType::eType window_type) -> size_t {
@@ -298,7 +294,7 @@ bool CreateWindowRequest::DoesExceedMaxAllowedWindows(
}
default: {
- LOG4CXX_WARN(logger_, "Unknown window type");
+ SDL_LOG_WARN("Unknown window type");
return 0u;
}
}
@@ -313,7 +309,7 @@ bool CreateWindowRequest::DoesExceedMaxAllowedWindows(
}
if (!display_capabilities) {
- LOG4CXX_WARN(logger_, "Application has no capabilities");
+ SDL_LOG_WARN("Application has no capabilities");
return false;
}
@@ -337,7 +333,7 @@ bool CreateWindowRequest::DoesExceedMaxAllowedWindows(
});
if (find_res == windowTypeSupported->end()) {
- LOG4CXX_WARN(logger_, "Requested Window Type is not supported by the HMI");
+ SDL_LOG_WARN("Requested Window Type is not supported by the HMI");
return true;
}
@@ -351,11 +347,11 @@ bool CreateWindowRequest::DoesExceedMaxAllowedWindows(
bool CreateWindowRequest::ValidateWindowCreation(
app_mngr::ApplicationSharedPtr app, const WindowID window_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (DoesExceedMaxAllowedWindows(app)) {
std::string info("Maximum allowed amount of windows is exceeded");
- LOG4CXX_WARN(logger_, info);
+ SDL_LOG_WARN(info);
SendResponse(false, mobile_apis::Result::REJECTED, info.c_str());
return false;
}
@@ -363,7 +359,7 @@ bool CreateWindowRequest::ValidateWindowCreation(
if (IsWindowForAssociatedServiceCreated(app)) {
std::string info(
"Window for this associated service type is already created");
- LOG4CXX_WARN(logger_, info);
+ SDL_LOG_WARN(info);
SendResponse(false, mobile_apis::Result::REJECTED, info.c_str());
return false;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_response.cc
index 0d9bbc2815..830539b355 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
CreateWindowResponse::CreateWindowResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ CreateWindowResponse::CreateWindowResponse(
CreateWindowResponse::~CreateWindowResponse() {}
void CreateWindowResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_request.cc
index 363b14f92f..358a002606 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_request.cc
@@ -44,6 +44,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DeleteCommandRequest::DeleteCommandRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -65,13 +67,13 @@ DeleteCommandRequest::DeleteCommandRequest(
DeleteCommandRequest::~DeleteCommandRequest() {}
void DeleteCommandRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr application =
application_manager_.application(connection_key());
if (!application) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -79,10 +81,10 @@ void DeleteCommandRequest::Run() {
const int32_t cmd_id =
(*message_)[strings::msg_params][strings::cmd_id].asInt();
- smart_objects::SmartObject* command = application->FindCommand(cmd_id);
+ smart_objects::SmartObject command = application->FindCommand(cmd_id);
- if (!command) {
- LOG4CXX_ERROR(logger_, "Command with id " << cmd_id << " is not found.");
+ if (smart_objects::SmartType::SmartType_Null == command.getType()) {
+ SDL_LOG_ERROR("Command with id " << cmd_id << " is not found.");
SendResponse(false, mobile_apis::Result::INVALID_ID);
return;
}
@@ -94,22 +96,13 @@ void DeleteCommandRequest::Run() {
(*message_)[strings::msg_params][strings::cmd_id];
msg_params[strings::app_id] = application->app_id();
- // we should specify amount of required responses in the 1st request
- uint32_t chaining_counter = 0;
- if ((*command).keyExists(strings::menu_params)) {
- ++chaining_counter;
- }
-
- if ((*command).keyExists(strings::vr_commands)) {
- ++chaining_counter;
- }
/* Need to set all flags before sending request to HMI
* for correct processing this flags in method on_event */
- if ((*command).keyExists(strings::menu_params)) {
+ if (command.keyExists(strings::menu_params)) {
is_ui_send_ = true;
}
// check vr params
- if ((*command).keyExists(strings::vr_commands)) {
+ if (command.keyExists(strings::vr_commands)) {
is_vr_send_ = true;
}
if (is_ui_send_) {
@@ -142,17 +135,17 @@ bool DeleteCommandRequest::PrepareResponseParameters(
ui_delete_info, ui_info_, vr_delete_info, vr_info_);
if (is_vr_or_ui_warning && !ui_delete_info.is_unsupported_resource &&
!vr_delete_info.is_unsupported_resource) {
- LOG4CXX_DEBUG(logger_, "VR or UI result is warning");
+ SDL_LOG_DEBUG("VR or UI result is warning");
result_code = mobile_apis::Result::WARNINGS;
return result;
}
result_code = PrepareResultCodeForResponse(ui_delete_info, vr_delete_info);
- LOG4CXX_DEBUG(logger_, "Result is " << (result ? "true" : "false"));
+ SDL_LOG_DEBUG("Result is " << (result ? "true" : "false"));
return result;
}
void DeleteCommandRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -161,9 +154,8 @@ void DeleteCommandRequest::on_event(const event_engine::Event& event) {
is_ui_received_ = true;
ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asInt());
- LOG4CXX_DEBUG(logger_,
- "Received UI_DeleteCommand event with result "
- << MessageHelper::HMIResultToString(ui_result_));
+ SDL_LOG_DEBUG("Received UI_DeleteCommand event with result "
+ << EnumToString(ui_result_));
GetInfo(message, ui_info_);
break;
}
@@ -172,20 +164,19 @@ void DeleteCommandRequest::on_event(const event_engine::Event& event) {
is_vr_received_ = true;
vr_result_ = static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asInt());
- LOG4CXX_DEBUG(logger_,
- "Received VR_DeleteCommand event with result "
- << MessageHelper::HMIResultToString(vr_result_));
+ SDL_LOG_DEBUG("Received VR_DeleteCommand event with result "
+ << EnumToString(vr_result_));
GetInfo(message, vr_info_);
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event" << event.id());
return;
}
}
if (IsPendingResponseExist()) {
- LOG4CXX_DEBUG(logger_, "Still awaiting for other responses.");
+ SDL_LOG_DEBUG("Still awaiting for other responses.");
return;
}
@@ -193,18 +184,17 @@ void DeleteCommandRequest::on_event(const event_engine::Event& event) {
application_manager_.application(connection_key());
if (!application) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
return;
}
smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
const uint32_t cmd_id = msg_params[strings::cmd_id].asUInt();
- smart_objects::SmartObject* command = application->FindCommand(cmd_id);
+ const auto command = application->FindCommand(cmd_id);
- if (!command) {
- LOG4CXX_ERROR(logger_,
- "Command id " << cmd_id
+ if (smart_objects::SmartType_Null == command.getType()) {
+ SDL_LOG_ERROR("Command id " << cmd_id
<< " not found for "
"application with connection key "
<< connection_key());
@@ -227,7 +217,7 @@ bool DeleteCommandRequest::Init() {
}
bool DeleteCommandRequest::IsPendingResponseExist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return is_ui_send_ != is_ui_received_ || is_vr_send_ != is_vr_received_;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_response.cc
index 919385ee50..80497241e3 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_command_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DeleteCommandResponse::DeleteCommandResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ DeleteCommandResponse::DeleteCommandResponse(
DeleteCommandResponse::~DeleteCommandResponse() {}
void DeleteCommandResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_request.cc
index 46af8353b7..127843813c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_request.cc
@@ -42,6 +42,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DeleteFileRequest::DeleteFileRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -57,14 +59,14 @@ DeleteFileRequest::DeleteFileRequest(
DeleteFileRequest::~DeleteFileRequest() {}
void DeleteFileRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr application =
application_manager_.application(connection_key());
if (!application) {
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
return;
}
@@ -75,8 +77,7 @@ void DeleteFileRequest::Run() {
application->delete_file_in_none_count())) {
// If application is in the HMI_NONE level the quantity of allowed
// DeleteFile request is limited by the configuration profile
- LOG4CXX_ERROR(logger_,
- "Too many requests from the app with HMILevel HMI_NONE ");
+ SDL_LOG_ERROR("Too many requests from the app with HMILevel HMI_NONE");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
@@ -86,7 +87,7 @@ void DeleteFileRequest::Run() {
if (!file_system::IsFileNameValid(sync_file_name)) {
const std::string err_msg = "Sync file name contains forbidden symbols.";
- LOG4CXX_ERROR(logger_, err_msg);
+ SDL_LOG_ERROR(err_msg);
SendResponse(false, mobile_apis::Result::INVALID_DATA, err_msg.c_str());
return;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_response.cc
index 732a1e56b5..7f9181e29a 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_file_response.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DeleteFileResponse::DeleteFileResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,12 +57,12 @@ DeleteFileResponse::DeleteFileResponse(
DeleteFileResponse::~DeleteFileResponse() {}
void DeleteFileResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t app_id =
(*message_)[strings::params][strings::connection_key].asUInt();
ApplicationSharedPtr app = application_manager_.application(app_id);
if (!app) {
- LOG4CXX_ERROR(logger_, "Application not registered");
+ SDL_LOG_ERROR("Application not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_request.cc
index 7950595b1c..3ff95a6f41 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_request.cc
@@ -43,6 +43,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DeleteInteractionChoiceSetRequest::DeleteInteractionChoiceSetRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -58,14 +60,13 @@ DeleteInteractionChoiceSetRequest::DeleteInteractionChoiceSetRequest(
DeleteInteractionChoiceSetRequest::~DeleteInteractionChoiceSetRequest() {}
void DeleteInteractionChoiceSetRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(
- logger_,
- "No application associated with connection key " << connection_key());
+ SDL_LOG_ERROR("No application associated with connection key "
+ << connection_key());
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -74,15 +75,16 @@ void DeleteInteractionChoiceSetRequest::Run() {
(*message_)[strings::msg_params][strings::interaction_choice_set_id]
.asInt();
- if (!app->FindChoiceSet(choice_set_id)) {
- LOG4CXX_ERROR(logger_,
- "Choice set with id " << choice_set_id << " is not found.");
+ const auto choice_set = app->FindChoiceSet(choice_set_id);
+
+ if (smart_objects::SmartType_Null == choice_set.getType()) {
+ SDL_LOG_ERROR("Choice set with id " << choice_set_id << " is not found.");
SendResponse(false, mobile_apis::Result::INVALID_ID);
return;
}
if (ChoiceSetInUse(app)) {
- LOG4CXX_ERROR(logger_, "Choice set currently in use.");
+ SDL_LOG_ERROR("Choice set currently in use.");
SendResponse(false, mobile_apis::Result::IN_USE);
return;
}
@@ -108,7 +110,7 @@ bool DeleteInteractionChoiceSetRequest::Init() {
bool DeleteInteractionChoiceSetRequest::ChoiceSetInUse(
ApplicationConstSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!app->is_perform_interaction_active()) {
return false;
}
@@ -126,8 +128,7 @@ bool DeleteInteractionChoiceSetRequest::ChoiceSetInUse(
PerformChoice::const_iterator choice_it = choice.begin();
for (; choice.end() != choice_it; ++choice_it) {
if (choice_it->first == choice_set_id) {
- LOG4CXX_ERROR(logger_,
- "Choice set with id " << choice_set_id << " is in use.");
+ SDL_LOG_ERROR("Choice set with id " << choice_set_id << " is in use.");
return true;
}
}
@@ -137,17 +138,16 @@ bool DeleteInteractionChoiceSetRequest::ChoiceSetInUse(
void DeleteInteractionChoiceSetRequest::SendVrDeleteCommand(
application_manager::ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const uint32_t choice_set_id =
(*message_)[strings::msg_params][strings::interaction_choice_set_id]
.asUInt();
- smart_objects::SmartObject* choice_set = app->FindChoiceSet(choice_set_id);
+ smart_objects::SmartObject choice_set = app->FindChoiceSet(choice_set_id);
- if (!choice_set) {
- LOG4CXX_ERROR(logger_,
- "Choice set with id " << choice_set_id << " is not found.");
+ if (smart_objects::SmartType_Null == choice_set.getType()) {
+ SDL_LOG_ERROR("Choice set with id " << choice_set_id << " is not found.");
return;
}
@@ -155,10 +155,10 @@ void DeleteInteractionChoiceSetRequest::SendVrDeleteCommand(
smart_objects::SmartObject(smart_objects::SmartType_Map);
msg_params[strings::app_id] = app->app_id();
msg_params[strings::type] = hmi_apis::Common_VRCommandType::Choice;
- msg_params[strings::grammar_id] = (*choice_set)[strings::grammar_id];
- choice_set = &((*choice_set)[strings::choice_set]);
- for (uint32_t i = 0; i < (*choice_set).length(); ++i) {
- msg_params[strings::cmd_id] = (*choice_set)[i][strings::choice_id];
+ msg_params[strings::grammar_id] = choice_set[strings::grammar_id];
+ choice_set = choice_set[strings::choice_set];
+ for (uint32_t i = 0; i < choice_set.length(); ++i) {
+ msg_params[strings::cmd_id] = choice_set[i][strings::choice_id];
SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_params);
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_response.cc
index cf5ad3a2c2..5aaa896b02 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_interaction_choice_set_response.cc
@@ -42,6 +42,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DeleteInteractionChoiceSetResponse::DeleteInteractionChoiceSetResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -57,12 +59,12 @@ DeleteInteractionChoiceSetResponse::DeleteInteractionChoiceSetResponse(
DeleteInteractionChoiceSetResponse::~DeleteInteractionChoiceSetResponse() {}
void DeleteInteractionChoiceSetResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// check if response false
if (true == (*message_)[strings::msg_params].keyExists(strings::success)) {
if ((*message_)[strings::msg_params][strings::success].asBool() == false) {
- LOG4CXX_ERROR(logger_, "Success = false");
+ SDL_LOG_ERROR("Success = false");
SendResponse(false);
return;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_request.cc
index 6aaa2406e8..19ec2dfb27 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_request.cc
@@ -33,6 +33,7 @@
#include "sdl_rpc_plugin/commands/mobile/delete_sub_menu_request.h"
+#include "application_manager/application.h"
#include "application_manager/application_impl.h"
#include "application_manager/message_helper.h"
#include "interfaces/HMI_API.h"
@@ -43,6 +44,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DeleteSubMenuRequest::DeleteSubMenuRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -58,21 +61,23 @@ DeleteSubMenuRequest::DeleteSubMenuRequest(
DeleteSubMenuRequest::~DeleteSubMenuRequest() {}
void DeleteSubMenuRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
return;
}
const int32_t menu_id =
(*message_)[strings::msg_params][strings::menu_id].asInt();
- if (!app->FindSubMenu(menu_id)) {
- LOG4CXX_ERROR(logger_, "Menu with id " << menu_id << " is not found.");
+ const auto sub_menu = app->FindSubMenu(menu_id);
+
+ if (smart_objects::SmartType_Null == sub_menu.getType()) {
+ SDL_LOG_ERROR("Menu with id " << menu_id << " is not found.");
SendResponse(false, mobile_apis::Result::INVALID_ID);
return;
}
@@ -88,9 +93,42 @@ void DeleteSubMenuRequest::Run() {
SendHMIRequest(hmi_apis::FunctionID::UI_DeleteSubMenu, &msg_params, true);
}
+void DeleteSubMenuRequest::DeleteNestedSubMenus(ApplicationSharedPtr const app,
+ uint32_t parentID,
+ const SubMenuMap& subMenus) {
+ SDL_LOG_AUTO_TRACE();
+
+ SubMenuMap::const_iterator it = subMenus.begin();
+ SDL_LOG_DEBUG("Delete Submenus with Parent ID: " << parentID);
+ while (subMenus.end() != it) {
+ if (!(*it->second).keyExists(strings::parent_id)) {
+ SDL_LOG_ERROR("parent ID does not exist");
+ ++it;
+ continue;
+ }
+
+ if (parentID == (*it->second)[strings::parent_id].asUInt()) {
+ uint32_t menuID = (*it->second)[strings::menu_id].asUInt();
+ DeleteNestedSubMenus(app, menuID, subMenus);
+ DeleteSubMenuVRCommands(app, menuID);
+ DeleteSubMenuUICommands(app, menuID);
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[strings::menu_id] = menuID;
+ msg_params[strings::app_id] = app->app_id();
+ SendHMIRequest(hmi_apis::FunctionID::UI_DeleteSubMenu, &msg_params);
+ ++it;
+ SDL_LOG_DEBUG("Removing submenuID: " << menuID);
+ app->RemoveSubMenu(menuID);
+ } else {
+ ++it;
+ }
+ }
+}
+
void DeleteSubMenuRequest::DeleteSubMenuVRCommands(
- ApplicationConstSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ ApplicationConstSharedPtr app, uint32_t parentID) {
+ SDL_LOG_AUTO_TRACE();
const DataAccessor<CommandsMap> accessor = app->commands_map();
const CommandsMap& commands = accessor.GetData();
@@ -101,7 +139,7 @@ void DeleteSubMenuRequest::DeleteSubMenuVRCommands(
continue;
}
- if ((*message_)[strings::msg_params][strings::menu_id].asInt() ==
+ if (parentID ==
(*it->second)[strings::menu_params][hmi_request::parent_id].asInt()) {
smart_objects::SmartObject msg_params =
smart_objects::SmartObject(smart_objects::SmartType_Map);
@@ -116,27 +154,28 @@ void DeleteSubMenuRequest::DeleteSubMenuVRCommands(
}
void DeleteSubMenuRequest::DeleteSubMenuUICommands(
- ApplicationSharedPtr const app) {
- LOG4CXX_AUTO_TRACE(logger_);
-
+ ApplicationSharedPtr const app, uint32_t parentID) {
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Delete UI Commands with Parent ID: " << parentID);
const DataAccessor<CommandsMap> accessor(app->commands_map());
const CommandsMap& commands = accessor.GetData();
CommandsMap::const_iterator it = commands.begin();
while (commands.end() != it) {
if (!(*it->second).keyExists(strings::menu_params)) {
- LOG4CXX_ERROR(logger_, "menu_params not exist");
+ SDL_LOG_ERROR("menu_params not exist");
++it;
continue;
}
- if ((*message_)[strings::msg_params][strings::menu_id].asInt() ==
- (*it->second)[strings::menu_params][hmi_request::parent_id].asInt()) {
+ if (parentID ==
+ (*it->second)[strings::menu_params][hmi_request::parent_id].asUInt()) {
smart_objects::SmartObject msg_params =
smart_objects::SmartObject(smart_objects::SmartType_Map);
const uint32_t cmd_id = (*it->second)[strings::cmd_id].asUInt();
msg_params[strings::app_id] = app->app_id();
msg_params[strings::cmd_id] = cmd_id;
+ SDL_LOG_DEBUG("Removing UI Command: " << cmd_id);
app->RemoveCommand(cmd_id);
app->help_prompt_manager().OnVrCommandDeleted(cmd_id, false);
it = commands.begin(); // Can not relay on
@@ -150,7 +189,7 @@ void DeleteSubMenuRequest::DeleteSubMenuUICommands(
}
void DeleteSubMenuRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -168,14 +207,19 @@ void DeleteSubMenuRequest::on_event(const event_engine::Event& event) {
application_manager_.application(connection_key());
if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return;
}
if (result) {
// delete sub menu items from SDL and HMI
- DeleteSubMenuVRCommands(application);
- DeleteSubMenuUICommands(application);
+ uint32_t parentID =
+ (*message_)[strings::msg_params][strings::menu_id].asUInt();
+ const DataAccessor<SubMenuMap> accessor = application->sub_menu_map();
+ const SubMenuMap& subMenus = accessor.GetData();
+ DeleteNestedSubMenus(application, parentID, subMenus);
+ DeleteSubMenuVRCommands(application, parentID);
+ DeleteSubMenuUICommands(application, parentID);
application->RemoveSubMenu(
(*message_)[strings::msg_params][strings::menu_id].asInt());
}
@@ -187,7 +231,7 @@ void DeleteSubMenuRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event" << event.id());
return;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_response.cc
index 3cefef5c38..25c4dc7cb9 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_sub_menu_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DeleteSubMenuResponse::DeleteSubMenuResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ DeleteSubMenuResponse::DeleteSubMenuResponse(
DeleteSubMenuResponse::~DeleteSubMenuResponse() {}
void DeleteSubMenuResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_request.cc
index 7f253e25fd..214a9c2bab 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_request.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DeleteWindowRequest::DeleteWindowRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -58,13 +60,12 @@ bool DeleteWindowRequest::CheckWindowId(
const WindowID window_id =
(*message_)[strings::msg_params][strings::window_id].asInt();
if (mobile_apis::PredefinedWindows::DEFAULT_WINDOW == window_id) {
- LOG4CXX_ERROR(logger_, "Main application window can't be deleted");
+ SDL_LOG_ERROR("Main application window can't be deleted");
return false;
}
if (!app->WindowIdExists(window_id)) {
- LOG4CXX_ERROR(logger_,
- "Window with id #" << window_id << " does not exist");
+ SDL_LOG_ERROR("Window with id #" << window_id << " does not exist");
return false;
}
@@ -85,13 +86,13 @@ void DeleteWindowRequest::DeleteWindow(
}
void DeleteWindowRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr application =
application_manager_.application(connection_key());
if (!application) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -109,10 +110,10 @@ void DeleteWindowRequest::Run() {
}
void DeleteWindowRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (hmi_apis::FunctionID::UI_DeleteWindow != event.id()) {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
@@ -120,12 +121,12 @@ void DeleteWindowRequest::on_event(const event_engine::Event& event) {
application_manager_.application(connection_key());
if (!application) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
- LOG4CXX_INFO(logger_, "Received DeleteWindow event");
+ SDL_LOG_INFO("Received DeleteWindow event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
const smart_objects::SmartObject& response_message = event.smart_object();
@@ -138,7 +139,7 @@ void DeleteWindowRequest::on_event(const event_engine::Event& event) {
GetInfo(response_message, response_info);
if (!is_success) {
- LOG4CXX_ERROR(logger_, "DeleteWindow request has failed on HMI side");
+ SDL_LOG_ERROR("DeleteWindow request has failed on HMI side");
SendResponse(is_success,
result_code,
response_info.empty() ? nullptr : response_info.c_str());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_response.cc
index f9ac9a46d6..1703623a38 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DeleteWindowResponse::DeleteWindowResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ DeleteWindowResponse::DeleteWindowResponse(
DeleteWindowResponse::~DeleteWindowResponse() {}
void DeleteWindowResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_request.cc
index 1de7a3ea03..f0ef2e0028 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_request.cc
@@ -41,6 +41,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DialNumberRequest::DialNumberRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ DialNumberRequest::DialNumberRequest(
DialNumberRequest::~DialNumberRequest() {}
bool DialNumberRequest::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
default_timeout_ = 0;
@@ -64,13 +66,13 @@ bool DialNumberRequest::Init() {
}
void DialNumberRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr application =
application_manager_.application(connection_key());
if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -78,15 +80,14 @@ void DialNumberRequest::Run() {
std::string number =
(*message_)[strings::msg_params][strings::number].asString();
if (!CheckSyntax(number)) {
- LOG4CXX_ERROR(logger_, "Invalid incoming data");
+ SDL_LOG_ERROR("Invalid incoming data");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
StripNumberParam(number);
if (number.empty()) {
- LOG4CXX_ERROR(logger_,
- "After strip number param is empty. Invalid incoming data");
+ SDL_LOG_ERROR("After strip number param is empty. Invalid incoming data");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -102,12 +103,12 @@ void DialNumberRequest::Run() {
}
void DialNumberRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr application =
application_manager_.application(connection_key());
if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return;
}
@@ -115,7 +116,7 @@ void DialNumberRequest::on_event(const event_engine::Event& event) {
mobile_apis::Result::eType result_code = mobile_apis::Result::SUCCESS;
switch (event.id()) {
case hmi_apis::FunctionID::BasicCommunication_DialNumber: {
- LOG4CXX_INFO(logger_, "Received DialNumber event");
+ SDL_LOG_INFO("Received DialNumber event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_BasicCommunication);
result_code = CommandRequestImpl::GetMobileResultCode(
static_cast<hmi_apis::Common_Result::eType>(
@@ -123,7 +124,7 @@ void DialNumberRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_response.cc
index 4385b3fe90..4bbe5e2eb7 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/dial_number_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DialNumberResponse::DialNumberResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ DialNumberResponse::DialNumberResponse(
DialNumberResponse::~DialNumberResponse() {}
void DialNumberResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_request.cc
index 66ff7b48d5..f5506503e9 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_request.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
EndAudioPassThruRequest::EndAudioPassThruRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,14 +56,14 @@ EndAudioPassThruRequest::EndAudioPassThruRequest(
EndAudioPassThruRequest::~EndAudioPassThruRequest() {}
void EndAudioPassThruRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
SendHMIRequest(hmi_apis::FunctionID::UI_EndAudioPassThru, NULL, true);
}
void EndAudioPassThruRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -89,7 +91,7 @@ void EndAudioPassThruRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_response.cc
index 6c9bd05e09..8e5672bfd9 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/end_audio_pass_thru_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
EndAudioPassThruResponse::EndAudioPassThruResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ EndAudioPassThruResponse::EndAudioPassThruResponse(
EndAudioPassThruResponse::~EndAudioPassThruResponse() {}
void EndAudioPassThruResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_request.cc
index c5e94da378..585636bfa8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_request.cc
@@ -6,6 +6,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetCloudAppPropertiesRequest::GetCloudAppPropertiesRequest(
const app_mngr::commands::MessageSharedPtr& message,
app_mngr::ApplicationManager& application_manager,
@@ -21,11 +23,11 @@ GetCloudAppPropertiesRequest::GetCloudAppPropertiesRequest(
GetCloudAppPropertiesRequest::~GetCloudAppPropertiesRequest() {}
void GetCloudAppPropertiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -83,7 +85,7 @@ void GetCloudAppPropertiesRequest::Run() {
void GetCloudAppPropertiesRequest::on_event(
const app_mngr::event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "GetCloudAppPropertiesRequest on_event");
+ SDL_LOG_INFO("GetCloudAppPropertiesRequest on_event");
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_response.cc
index f50897303a..35bdaaeb44 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_cloud_app_properties_response.cc
@@ -7,6 +7,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetCloudAppPropertiesResponse::GetCloudAppPropertiesResponse(
const app_mngr::commands::MessageSharedPtr& message,
app_mngr::ApplicationManager& application_manager,
@@ -22,7 +24,7 @@ GetCloudAppPropertiesResponse::GetCloudAppPropertiesResponse(
GetCloudAppPropertiesResponse::~GetCloudAppPropertiesResponse() {}
void GetCloudAppPropertiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_request.cc
index 75263494c2..620d901f3c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_request.cc
@@ -59,6 +59,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetFileRequest::GetFileRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -85,8 +87,7 @@ bool GetFileRequest::GetFilePath(std::string& file_path, bool& forward_to_hmi) {
if ((*message_)[strings::msg_params].keyExists(strings::app_service_id)) {
std::string service_id =
(*message_)[strings::msg_params][strings::app_service_id].asString();
- LOG4CXX_DEBUG(logger_,
- "Finding storage directory for service id: " << service_id);
+ SDL_LOG_DEBUG("Finding storage directory for service id: " << service_id);
AppService* app_service_info =
application_manager_.GetAppServiceManager().FindServiceByID(service_id);
@@ -101,7 +102,7 @@ bool GetFileRequest::GetFilePath(std::string& file_path, bool& forward_to_hmi) {
return false;
}
} else {
- LOG4CXX_DEBUG(logger_, "Using current storage directory");
+ SDL_LOG_DEBUG("Using current storage directory");
}
ApplicationSharedPtr app = application_manager_.application(connect_key);
@@ -110,15 +111,15 @@ bool GetFileRequest::GetFilePath(std::string& file_path, bool& forward_to_hmi) {
}
void GetFileRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_INFO(logger_, "Received GetFile request");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_INFO("Received GetFile request");
ApplicationSharedPtr app = application_manager_.application(connection_key());
smart_objects::SmartObject response_params =
smart_objects::SmartObject(smart_objects::SmartType_Map);
if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -126,8 +127,7 @@ void GetFileRequest::Run() {
file_name_ = (*message_)[strings::msg_params][strings::file_name].asString();
if (!file_system::IsFileNameValid(file_name_)) {
- LOG4CXX_ERROR(logger_,
- "File name " << file_name_ << " contains forbidden symbols.");
+ SDL_LOG_ERROR("File name " << file_name_ << " contains forbidden symbols.");
SendResponse(false,
mobile_apis::Result::INVALID_DATA,
"File name contains forbidden symbols",
@@ -136,7 +136,7 @@ void GetFileRequest::Run() {
}
// Initialize other params with default values. If exists overwrite the values
- LOG4CXX_DEBUG(logger_, "Intialize non manadatory params with default values");
+ SDL_LOG_DEBUG("Intialize non manadatory params with default values");
if ((*message_)[strings::msg_params].keyExists(strings::file_type)) {
file_type_ = static_cast<mobile_apis::FileType::eType>(
@@ -145,13 +145,13 @@ void GetFileRequest::Run() {
// Check if file exists on system (may have to use app service id to get the
// correct app folder)
- LOG4CXX_DEBUG(logger_, "Check if file exists on system");
+ SDL_LOG_DEBUG("Check if file exists on system");
std::string file_path;
bool forward_to_hmi;
if (GetFilePath(file_path, forward_to_hmi)) {
if (forward_to_hmi) {
- LOG4CXX_DEBUG(logger_, "Forwarding GetFile request to HMI");
+ SDL_LOG_DEBUG("Forwarding GetFile request to HMI");
application_manager_.IncreaseForwardedRequestTimeout(connection_key(),
correlation_id());
SendHMIRequest(hmi_apis::FunctionID::BasicCommunication_GetFilePath,
@@ -160,7 +160,7 @@ void GetFileRequest::Run() {
return;
}
} else {
- LOG4CXX_ERROR(logger_, "Could not get file path");
+ SDL_LOG_ERROR("Could not get file path");
SendResponse(false,
mobile_apis::Result::INVALID_DATA,
"Could not get file path",
@@ -170,7 +170,7 @@ void GetFileRequest::Run() {
const std::string full_path = file_path + "/" + file_name_;
if (!file_system::FileExists(full_path)) {
- LOG4CXX_ERROR(logger_, "File " << full_path << " does not exist");
+ SDL_LOG_ERROR("File " << full_path << " does not exist");
SendResponse(false,
mobile_apis::Result::FILE_NOT_FOUND,
"File does not exist",
@@ -179,7 +179,7 @@ void GetFileRequest::Run() {
}
// Handle offset
- LOG4CXX_DEBUG(logger_, "Handle offset and length parameters");
+ SDL_LOG_DEBUG("Handle offset and length parameters");
const uint64_t file_size = file_system::FileSize(full_path);
if ((*message_)[strings::msg_params].keyExists(strings::offset)) {
@@ -195,9 +195,8 @@ void GetFileRequest::Run() {
}
if (offset_ > file_size) {
- LOG4CXX_ERROR(
- logger_,
- "Offset " << offset_ << " greater than file size " << file_size);
+ SDL_LOG_ERROR("Offset " << offset_ << " greater than file size "
+ << file_size);
SendResponse(false,
mobile_apis::Result::INVALID_DATA,
"Offset greater than file size",
@@ -205,8 +204,7 @@ void GetFileRequest::Run() {
return;
}
if (length_ > file_size - offset_) {
- LOG4CXX_ERROR(logger_,
- "Length " << length_ << " greater than file size - offset"
+ SDL_LOG_ERROR("Length " << length_ << " greater than file size - offset"
<< file_size);
SendResponse(false,
mobile_apis::Result::INVALID_DATA,
@@ -216,10 +214,10 @@ void GetFileRequest::Run() {
}
// Load data from file as binary data
- LOG4CXX_DEBUG(logger_, "Load binary data from file");
+ SDL_LOG_DEBUG("Load binary data from file");
std::vector<uint8_t> bin_data;
if (!file_system::ReadBinaryFile(full_path, bin_data, offset_, length_)) {
- LOG4CXX_ERROR(logger_, "Failed to read from file: " << full_path);
+ SDL_LOG_ERROR("Failed to read from file: " << full_path);
SendResponse(false,
mobile_apis::Result::GENERIC_ERROR,
"Unable to read from file",
@@ -248,7 +246,7 @@ void GetFileRequest::Run() {
}
void GetFileRequest::on_event(const app_mngr::event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (hmi_apis::FunctionID::BasicCommunication_GetFilePath != event.id()) {
return;
@@ -287,7 +285,7 @@ void GetFileRequest::on_event(const app_mngr::event_engine::Event& event) {
event_message[strings::msg_params][strings::file_path].asString();
if (!file_system::FileExists(full_path)) {
- LOG4CXX_ERROR(logger_, "File " << full_path << " does not exist");
+ SDL_LOG_ERROR("File " << full_path << " does not exist");
SendResponse(false,
mobile_apis::Result::FILE_NOT_FOUND,
"File does not exist",
@@ -309,9 +307,8 @@ void GetFileRequest::on_event(const app_mngr::event_engine::Event& event) {
}
if (offset_ > file_size) {
- LOG4CXX_ERROR(
- logger_,
- "Offset " << offset_ << " greater than file size " << file_size);
+ SDL_LOG_ERROR("Offset " << offset_ << " greater than file size "
+ << file_size);
SendResponse(false,
mobile_apis::Result::INVALID_DATA,
"Offset greater than file size",
@@ -319,8 +316,7 @@ void GetFileRequest::on_event(const app_mngr::event_engine::Event& event) {
return;
}
if (length_ > file_size - offset_) {
- LOG4CXX_ERROR(logger_,
- "Length " << length_ << " greater than file size - offset"
+ SDL_LOG_ERROR("Length " << length_ << " greater than file size - offset"
<< file_size);
SendResponse(false,
mobile_apis::Result::INVALID_DATA,
@@ -329,7 +325,7 @@ void GetFileRequest::on_event(const app_mngr::event_engine::Event& event) {
return;
}
if (!file_system::ReadBinaryFile(full_path, bin_data, offset_, length_)) {
- LOG4CXX_ERROR(logger_, "Failed to read from file: " << full_path);
+ SDL_LOG_ERROR("Failed to read from file: " << full_path);
SendResponse(false,
mobile_apis::Result::GENERIC_ERROR,
"Failed to read from file",
@@ -341,7 +337,7 @@ void GetFileRequest::on_event(const app_mngr::event_engine::Event& event) {
response_params[strings::crc32_check_sum] = crc_calculated;
} else {
- LOG4CXX_ERROR(logger_, "HMI did not return a file path: ");
+ SDL_LOG_ERROR("HMI did not return a file path: ");
SendResponse(false,
mobile_apis::Result::INVALID_DATA,
"HMI did not return a file path",
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_response.cc
index 2ea8dde02a..55f6e0b8a0 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_file_response.cc
@@ -39,6 +39,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetFileResponse::GetFileResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,8 +56,8 @@ GetFileResponse::GetFileResponse(
GetFileResponse::~GetFileResponse() {}
void GetFileResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_INFO(logger_, "Sending GetFile response");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_INFO("Sending GetFile response");
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc
index 6121747ccc..1cd4806f7e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc
@@ -42,6 +42,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetSystemCapabilityRequest::GetSystemCapabilityRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -57,18 +59,18 @@ GetSystemCapabilityRequest::GetSystemCapabilityRequest(
GetSystemCapabilityRequest::~GetSystemCapabilityRequest() {}
void GetSystemCapabilityRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
if ((*message_)[strings::msg_params].empty()) {
- LOG4CXX_ERROR(logger_, strings::msg_params << " is empty.");
+ SDL_LOG_ERROR(strings::msg_params << " is empty.");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -163,6 +165,16 @@ void GetSystemCapabilityRequest::Run() {
all_services);
break;
}
+ case mobile_apis::SystemCapabilityType::DRIVER_DISTRACTION:
+ if (hmi_capabilities.driver_distraction_capability()) {
+ response_params[strings::system_capability]
+ [strings::driver_distraction_capability] =
+ *hmi_capabilities.driver_distraction_capability();
+ } else {
+ SendResponse(false, mobile_apis::Result::DATA_NOT_AVAILABLE);
+ return;
+ }
+ break;
case mobile_apis::SystemCapabilityType::DISPLAYS: {
auto capabilities = hmi_capabilities.system_display_capabilities();
if (app->display_capabilities()) {
@@ -171,7 +183,7 @@ void GetSystemCapabilityRequest::Run() {
if (!capabilities) {
SendResponse(false, mobile_apis::Result::DATA_NOT_AVAILABLE);
- LOG4CXX_INFO(logger_, "system_display_capabilities are not available");
+ SDL_LOG_INFO("system_display_capabilities are not available");
return;
}
@@ -192,12 +204,10 @@ void GetSystemCapabilityRequest::Run() {
auto& ext = SystemCapabilityAppExtension::ExtractExtension(*app);
if ((*message_)[app_mngr::strings::msg_params][strings::subscribe]
.asBool() == true) {
- LOG4CXX_DEBUG(logger_,
- "Subscribe to system capability: " << response_type);
+ SDL_LOG_DEBUG("Subscribe to system capability: " << response_type);
ext.SubscribeTo(response_type);
} else {
- LOG4CXX_DEBUG(logger_,
- "Unsubscribe from system capability: " << response_type);
+ SDL_LOG_DEBUG("Unsubscribe from system capability: " << response_type);
ext.UnsubscribeFrom(response_type);
}
}
@@ -214,7 +224,7 @@ void GetSystemCapabilityRequest::Run() {
}
void GetSystemCapabilityRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "GetSystemCapabilityRequest on_event");
+ SDL_LOG_INFO("GetSystemCapabilityRequest on_event");
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_response.cc
index 5df0c72607..e20ea00a7b 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetSystemCapabilityResponse::GetSystemCapabilityResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ GetSystemCapabilityResponse::GetSystemCapabilityResponse(
GetSystemCapabilityResponse::~GetSystemCapabilityResponse() {}
void GetSystemCapabilityResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_request.cc
index cd7d7a37b7..54b542d245 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_request.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetWayPointsRequest::GetWayPointsRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,21 +58,18 @@ GetWayPointsRequest::GetWayPointsRequest(
GetWayPointsRequest::~GetWayPointsRequest() {}
void GetWayPointsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_,
- "An application with connection key "
- << connection_key() << " is not registered.");
+ SDL_LOG_ERROR("An application with connection key "
+ << connection_key() << " is not registered.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params = (*message_)[strings::msg_params];
+ smart_objects::SmartObject msg_params = (*message_)[strings::msg_params];
msg_params[strings::app_id] = app->app_id();
StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
SendHMIRequest(hmi_apis::FunctionID::Navigation_GetWayPoints,
@@ -79,17 +78,17 @@ void GetWayPointsRequest::Run() {
}
void GetWayPointsRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::UI_OnResetTimeout: {
- LOG4CXX_INFO(logger_, "Received UI_OnResetTimeout event");
+ SDL_LOG_INFO("Received UI_OnResetTimeout event");
application_manager_.updateRequestTimeout(
connection_key(), correlation_id(), default_timeout());
break;
}
case hmi_apis::FunctionID::Navigation_GetWayPoints: {
- LOG4CXX_INFO(logger_, "Received Navigation_GetWayPoints event");
+ SDL_LOG_INFO("Received Navigation_GetWayPoints event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
const hmi_apis::Common_Result::eType result_code =
static_cast<hmi_apis::Common_Result::eType>(
@@ -105,7 +104,7 @@ void GetWayPointsRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
break;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_response.cc
index e481c926b8..cbb9607d0d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_way_points_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetWayPointsResponse::GetWayPointsResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ GetWayPointsResponse::GetWayPointsResponse(
GetWayPointsResponse::~GetWayPointsResponse() {}
void GetWayPointsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_request.cc
index b8714b4784..9262466e34 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_request.cc
@@ -44,6 +44,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ListFilesRequest::ListFilesRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -59,14 +61,14 @@ ListFilesRequest::ListFilesRequest(
ListFilesRequest::~ListFilesRequest() {}
void ListFilesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr application =
application_manager_.application(connection_key());
if (!application) {
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
return;
}
@@ -77,8 +79,7 @@ void ListFilesRequest::Run() {
application->list_files_in_none_count())) {
// If application is in the HMI_NONE level the quantity of allowed
// DeleteFile request is limited by the configuration profile
- LOG4CXX_ERROR(logger_,
- "Too many requests from the app with HMILevel HMI_NONE ");
+ SDL_LOG_ERROR("Too many requests from the app with HMILevel HMI_NONE ");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
@@ -97,11 +98,10 @@ void ListFilesRequest::Run() {
std::vector<std::string>::const_iterator it = persistent_files.begin();
for (; it != persistent_files.end(); ++it) {
if (i < application_manager_.get_settings().list_files_response_size()) {
- LOG4CXX_DEBUG(logger_, "File " + *it + " added to ListFiles response");
+ SDL_LOG_DEBUG("File " + *it + " added to ListFiles response");
(*message_)[strings::msg_params][strings::filenames][i++] = *it;
} else {
- LOG4CXX_DEBUG(logger_,
- "File " + *it + " not added to ListFiles response");
+ SDL_LOG_DEBUG("File " + *it + " not added to ListFiles response");
}
}
(*message_)[strings::params][strings::message_type] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_response.cc
index ffa8a443d5..e71c2de316 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/list_files_response.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ListFilesResponse::ListFilesResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ ListFilesResponse::ListFilesResponse(
ListFilesResponse::~ListFilesResponse() {}
void ListFilesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc
index 5714043a51..96045552a0 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc
@@ -39,6 +39,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnAppInterfaceUnregisteredNotification::OnAppInterfaceUnregisteredNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,9 +57,17 @@ OnAppInterfaceUnregisteredNotification::
~OnAppInterfaceUnregisteredNotification() {}
void OnAppInterfaceUnregisteredNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
+
+ const bool final_message = IsFinalMessage();
+ SendNotification(final_message);
+}
- SendNotification();
+bool OnAppInterfaceUnregisteredNotification::IsFinalMessage() const {
+ using Reason = mobile_apis::AppInterfaceUnregisteredReason::eType;
+ const auto reason = static_cast<Reason>(
+ (*message_)[strings::msg_params][strings::reason].asInt());
+ return Reason::RESOURCE_CONSTRAINT == reason;
}
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_audio_pass_thru_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_audio_pass_thru_notification.cc
index 3088c7df33..21a20c38c1 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_audio_pass_thru_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_audio_pass_thru_notification.cc
@@ -37,6 +37,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnAudioPassThruNotification::OnAudioPassThruNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -52,7 +54,7 @@ OnAudioPassThruNotification::OnAudioPassThruNotification(
OnAudioPassThruNotification::~OnAudioPassThruNotification() {}
void OnAudioPassThruNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc
index bca3b20fe0..14787d0a08 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc
@@ -43,6 +43,8 @@ namespace commands {
namespace mobile {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnButtonEventNotification::OnButtonEventNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -58,7 +60,7 @@ OnButtonEventNotification::OnButtonEventNotification(
OnButtonEventNotification::~OnButtonEventNotification() {}
void OnButtonEventNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const uint32_t btn_id = static_cast<uint32_t>(
(*message_)[strings::msg_params][hmi_response::button_name].asInt());
@@ -71,7 +73,7 @@ void OnButtonEventNotification::Run() {
if (static_cast<uint32_t>(mobile_apis::ButtonName::CUSTOM_BUTTON) == btn_id) {
// app_id is mandatory for CUSTOM_BUTTON notification
if (!is_app_id_exists) {
- LOG4CXX_ERROR(logger_, "CUSTOM_BUTTON OnButtonEvent without app_id.");
+ SDL_LOG_ERROR("CUSTOM_BUTTON OnButtonEvent without app_id.");
return;
}
@@ -81,13 +83,12 @@ void OnButtonEventNotification::Run() {
// custom_button_id is mandatory for CUSTOM_BUTTON notification
if (false == (*message_)[strings::msg_params].keyExists(
hmi_response::custom_button_id)) {
- LOG4CXX_ERROR(logger_,
- "CUSTOM_BUTTON OnButtonEvent without custom_button_id.");
+ SDL_LOG_ERROR("CUSTOM_BUTTON OnButtonEvent without custom_button_id.");
return;
}
if (!app) {
- LOG4CXX_ERROR(logger_, "Application doesn't exist.");
+ SDL_LOG_ERROR("Application doesn't exist.");
return;
}
@@ -97,8 +98,7 @@ void OnButtonEventNotification::Run() {
.asUInt();
if (false == app->IsSubscribedToSoftButton(custom_btn_id)) {
- LOG4CXX_ERROR(logger_,
- "Application doesn't subscribed to this custom_button_id.");
+ SDL_LOG_ERROR("Application doesn't subscribed to this custom_button_id.");
return;
}
@@ -106,9 +106,9 @@ void OnButtonEventNotification::Run() {
(*message_)[strings::msg_params][strings::window_id] = window_id;
const auto window_hmi_level = app->hmi_level(window_id);
if ((mobile_api::HMILevel::HMI_NONE == window_hmi_level)) {
- LOG4CXX_WARN(logger_,
- "CUSTOM_BUTTON OnButtonEvent notification is not allowed in "
- "NONE hmi level");
+ SDL_LOG_WARN(
+ "CUSTOM_BUTTON OnButtonEvent notification is not allowed in "
+ "NONE hmi level");
return;
}
@@ -124,7 +124,7 @@ void OnButtonEventNotification::Run() {
for (; subscribed_apps.end() != it; ++it) {
ApplicationSharedPtr subscribed_app = *it;
if (!subscribed_app) {
- LOG4CXX_WARN(logger_, "Null pointer to subscribed app.");
+ SDL_LOG_WARN("Null pointer to subscribed app.");
continue;
}
@@ -134,13 +134,14 @@ void OnButtonEventNotification::Run() {
mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
if ((mobile_api::HMILevel::HMI_FULL != app_hmi_level) &&
(mobile_api::HMILevel::HMI_LIMITED != app_hmi_level)) {
- LOG4CXX_WARN(logger_,
- "OnButtonEvent notification is allowed only"
- << "in FULL or LIMITED hmi level");
+ SDL_LOG_WARN("OnButtonEvent notification is allowed only"
+ << "in FULL or LIMITED hmi level");
continue;
}
- // if "app_id" absent send notification only in HMI_FULL mode
- if (is_app_id_exists || subscribed_app->IsFullscreen()) {
+ // if OK button and "app_id" absent send notification only in HMI_FULL mode
+ // otherwise send to subscribed apps in limited
+ if (is_app_id_exists || hmi_apis::Common_ButtonName::OK != btn_id ||
+ subscribed_app->IsFullscreen()) {
SendButtonEvent(subscribed_app);
}
}
@@ -148,7 +149,7 @@ void OnButtonEventNotification::Run() {
void OnButtonEventNotification::SendButtonEvent(ApplicationConstSharedPtr app) {
if (!app) {
- LOG4CXX_ERROR(logger_, "OnButtonEvent NULL pointer");
+ SDL_LOG_ERROR("OnButtonEvent NULL pointer");
return;
}
@@ -156,7 +157,7 @@ void OnButtonEventNotification::SendButtonEvent(ApplicationConstSharedPtr app) {
std::make_shared<smart_objects::SmartObject>();
if (!on_btn_event) {
- LOG4CXX_ERROR(logger_, "OnButtonEvent NULL pointer");
+ SDL_LOG_ERROR("OnButtonEvent NULL pointer");
return;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc
index c51991742d..4444f0d156 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc
@@ -44,6 +44,8 @@ namespace commands {
namespace mobile {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnButtonPressNotification::OnButtonPressNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -59,7 +61,7 @@ OnButtonPressNotification::OnButtonPressNotification(
OnButtonPressNotification::~OnButtonPressNotification() {}
void OnButtonPressNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const uint32_t btn_id = static_cast<uint32_t>(
(*message_)[strings::msg_params][hmi_response::button_name].asInt());
@@ -67,28 +69,28 @@ void OnButtonPressNotification::Run() {
const bool is_app_id_exists =
(*message_)[strings::msg_params].keyExists(strings::app_id);
ApplicationSharedPtr app;
+ if (is_app_id_exists) {
+ app = application_manager_.application(
+ (*message_)[strings::msg_params][strings::app_id].asUInt());
+ }
// CUSTOM_BUTTON notification
if (static_cast<uint32_t>(mobile_apis::ButtonName::CUSTOM_BUTTON) == btn_id) {
// app_id is mandatory for CUSTOM_BUTTON notification
if (!is_app_id_exists) {
- LOG4CXX_ERROR(logger_, "CUSTOM_BUTTON OnButtonPress without app_id.");
+ SDL_LOG_ERROR("CUSTOM_BUTTON OnButtonPress without app_id.");
return;
}
- app = application_manager_.application(
- (*message_)[strings::msg_params][strings::app_id].asUInt());
-
// custom_button_id is mandatory for CUSTOM_BUTTON notification
if (false == (*message_)[strings::msg_params].keyExists(
hmi_response::custom_button_id)) {
- LOG4CXX_ERROR(logger_,
- "CUSTOM_BUTTON OnButtonPress without custom_button_id.");
+ SDL_LOG_ERROR("CUSTOM_BUTTON OnButtonPress without custom_button_id.");
return;
}
if (!app) {
- LOG4CXX_ERROR(logger_, "Application doesn't exist.");
+ SDL_LOG_ERROR("Application doesn't exist.");
return;
}
@@ -98,8 +100,7 @@ void OnButtonPressNotification::Run() {
.asUInt();
if (false == app->IsSubscribedToSoftButton(custom_btn_id)) {
- LOG4CXX_ERROR(logger_,
- "Application doesn't subscribed to this custom_button_id.");
+ SDL_LOG_ERROR("Application doesn't subscribed to this custom_button_id.");
return;
}
@@ -109,9 +110,9 @@ void OnButtonPressNotification::Run() {
(*message_)[strings::msg_params][strings::window_id] = window_id;
const auto window_hmi_level = app->hmi_level(window_id);
if ((mobile_api::HMILevel::HMI_NONE == window_hmi_level)) {
- LOG4CXX_WARN(logger_,
- "CUSTOM_BUTTON OnButtonPress notification is not allowed in "
- "NONE hmi level");
+ SDL_LOG_WARN(
+ "CUSTOM_BUTTON OnButtonPress notification is not allowed in "
+ "NONE hmi level");
return;
}
@@ -127,7 +128,7 @@ void OnButtonPressNotification::Run() {
for (; subscribed_apps.end() != it; ++it) {
ApplicationSharedPtr subscribed_app = *it;
if (!subscribed_app) {
- LOG4CXX_WARN(logger_, "Null pointer to subscribed app.");
+ SDL_LOG_WARN("Null pointer to subscribed app.");
continue;
}
@@ -137,9 +138,8 @@ void OnButtonPressNotification::Run() {
mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
if ((mobile_api::HMILevel::HMI_FULL != app_hmi_level) &&
(mobile_api::HMILevel::HMI_LIMITED != app_hmi_level)) {
- LOG4CXX_WARN(logger_,
- "OnButtonPress notification is allowed only"
- << "in FULL or LIMITED hmi level");
+ SDL_LOG_WARN("OnButtonPress notification is allowed only "
+ << "in FULL or LIMITED hmi level");
continue;
}
// if "appID" is present, send it to named app only if its FULL or
@@ -148,8 +148,10 @@ void OnButtonPressNotification::Run() {
if (app->app_id() == subscribed_app->app_id()) {
SendButtonPress(subscribed_app);
}
- } else if (subscribed_app->IsFullscreen()) {
- // if No "appID" - send it FULL apps only.
+ } else if (hmi_apis::Common_ButtonName::OK != btn_id ||
+ subscribed_app->IsFullscreen()) {
+ // if No "appID" and OK button - send it FULL apps only.
+ // if not OK button, send to LIMITED subscribed apps
SendButtonPress(subscribed_app);
}
}
@@ -157,7 +159,7 @@ void OnButtonPressNotification::Run() {
void OnButtonPressNotification::SendButtonPress(ApplicationConstSharedPtr app) {
if (!app) {
- LOG4CXX_ERROR(logger_, "OnButtonPress NULL pointer");
+ SDL_LOG_ERROR("OnButtonPress NULL pointer");
return;
}
@@ -165,7 +167,7 @@ void OnButtonPressNotification::SendButtonPress(ApplicationConstSharedPtr app) {
std::make_shared<smart_objects::SmartObject>();
if (!on_btn_press) {
- LOG4CXX_ERROR(logger_, "OnButtonPress NULL pointer");
+ SDL_LOG_ERROR("OnButtonPress NULL pointer");
return;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_command_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_command_notification.cc
index 9c7edf74e6..e973a546af 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_command_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_command_notification.cc
@@ -39,6 +39,7 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
OnCommandNotification::OnCommandNotification(
const application_manager::commands::MessageSharedPtr& message,
@@ -55,21 +56,23 @@ OnCommandNotification::OnCommandNotification(
OnCommandNotification::~OnCommandNotification() {}
void OnCommandNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(
(*message_)[strings::msg_params][strings::app_id].asInt());
if (!app) {
- LOG4CXX_ERROR(logger_, "No application associated with session key");
+ SDL_LOG_ERROR("No application associated with session key");
return;
}
const uint32_t cmd_id =
(*message_)[strings::msg_params][strings::cmd_id].asUInt();
- if (!app->FindCommand(cmd_id)) {
- LOG4CXX_ERROR(logger_, " No applications found for the command " << cmd_id);
+ const auto command = app->FindCommand(cmd_id);
+
+ if (smart_objects::SmartType_Null == command.getType()) {
+ SDL_LOG_ERROR(" No applications found for the command " << cmd_id);
return;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_driver_distraction_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_driver_distraction_notification.cc
index 42a1928f2e..960f9d9630 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_driver_distraction_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_driver_distraction_notification.cc
@@ -43,6 +43,8 @@ namespace commands {
namespace mobile {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnDriverDistractionNotification::OnDriverDistractionNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -58,7 +60,7 @@ OnDriverDistractionNotification::OnDriverDistractionNotification(
OnDriverDistractionNotification::~OnDriverDistractionNotification() {}
void OnDriverDistractionNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hash_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hash_change_notification.cc
index c2ce2550b9..873e9f1788 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hash_change_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hash_change_notification.cc
@@ -45,6 +45,8 @@ namespace commands {
namespace mobile {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnHashChangeNotification::OnHashChangeNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -60,7 +62,7 @@ OnHashChangeNotification::OnHashChangeNotification(
OnHashChangeNotification::~OnHashChangeNotification() {}
void OnHashChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
(*message_)[strings::params][strings::message_type] =
static_cast<int32_t>(application_manager::MessageType::kNotification);
@@ -72,8 +74,7 @@ void OnHashChangeNotification::Run() {
(*message_)[strings::msg_params][strings::hash_id] = app->curHash();
SendNotification();
} else {
- LOG4CXX_WARN(logger_,
- "Application with app_id " << app_id << " does not exist");
+ SDL_LOG_WARN("Application with app_id " << app_id << " does not exist");
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc
index df3bce0154..66a0fbb3f6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification.cc
@@ -41,6 +41,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnHMIStatusNotification::OnHMIStatusNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,20 +58,20 @@ OnHMIStatusNotification::OnHMIStatusNotification(
OnHMIStatusNotification::~OnHMIStatusNotification() {}
void OnHMIStatusNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
(*message_)[strings::params][strings::message_type] =
static_cast<int32_t>(application_manager::MessageType::kNotification);
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (app.use_count() == 0) {
- LOG4CXX_ERROR(logger_, "OnHMIStatusNotification application doesn't exist");
+ SDL_LOG_ERROR("OnHMIStatusNotification application doesn't exist");
return;
}
// If the response has no hmi level, return and don't send the notification
if (!(*message_)[strings::msg_params].keyExists(strings::hmi_level)) {
// our notification clearly isn't well-formed
- LOG4CXX_ERROR(logger_, "OnHMIStatusNotification has no hmiLevel field");
+ SDL_LOG_ERROR("OnHMIStatusNotification has no hmiLevel field");
return;
}
@@ -82,8 +84,7 @@ void OnHMIStatusNotification::Run() {
(mobile_apis::HMILevel::HMI_LIMITED == hmi_level)) {
if (!(app->tts_properties_in_full())) {
app->set_tts_properties_in_full(true);
- LOG4CXX_INFO(logger_,
- "OnHMIStatusNotification AddAppToTTSGlobalPropertiesList");
+ SDL_LOG_INFO("OnHMIStatusNotification AddAppToTTSGlobalPropertiesList");
application_manager_.AddAppToTTSGlobalPropertiesList(app->app_id());
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification_from_mobile.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification_from_mobile.cc
index 28325a40f5..2263e4b989 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification_from_mobile.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_hmi_status_notification_from_mobile.cc
@@ -39,6 +39,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnHMIStatusNotificationFromMobile::OnHMIStatusNotificationFromMobile(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,15 +56,15 @@ OnHMIStatusNotificationFromMobile::OnHMIStatusNotificationFromMobile(
OnHMIStatusNotificationFromMobile::~OnHMIStatusNotificationFromMobile() {}
void OnHMIStatusNotificationFromMobile::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
(*message_)[strings::params][strings::message_type] =
static_cast<int32_t>(application_manager::MessageType::kNotification);
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (app.use_count() == 0) {
- LOG4CXX_ERROR(
- logger_, "OnHMIStatusNotificationFromMobile application doesn't exist");
+ SDL_LOG_ERROR(
+ "OnHMIStatusNotificationFromMobile application doesn't exist");
return;
}
@@ -79,9 +81,8 @@ void OnHMIStatusNotificationFromMobile::Run() {
bool is_apps_requested_before =
application_manager_.IsAppsQueriedFrom(handle);
- LOG4CXX_DEBUG(logger_,
- "Mobile HMI state notication came for connection key:"
- << connection_key() << " and handle: " << handle);
+ SDL_LOG_DEBUG("Mobile HMI state notification came for connection key: "
+ << connection_key() << " and handle: " << handle);
if (!is_apps_requested_before &&
Message::is_sufficient_version(
@@ -96,10 +97,10 @@ void OnHMIStatusNotificationFromMobile::Run() {
}
if (is_apps_requested_before) {
- LOG4CXX_DEBUG(logger_,
- "Remote apps list had been requested already "
- " for handle: "
- << handle);
+ SDL_LOG_DEBUG(
+ "Remote apps list had been requested already "
+ "for handle: "
+ << handle);
if (Message::is_sufficient_version(
protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_4,
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_keyboard_input_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_keyboard_input_notification.cc
index 1c0609e17d..38f346ac5c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_keyboard_input_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_keyboard_input_notification.cc
@@ -43,6 +43,8 @@ namespace commands {
namespace mobile {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnKeyBoardInputNotification::OnKeyBoardInputNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -58,7 +60,7 @@ OnKeyBoardInputNotification::OnKeyBoardInputNotification(
OnKeyBoardInputNotification::~OnKeyBoardInputNotification() {}
void OnKeyBoardInputNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app_to_notify;
@@ -70,15 +72,14 @@ void OnKeyBoardInputNotification::Run() {
if (app->is_perform_interaction_active() &&
(*it)->perform_interaction_layout() ==
mobile_apis::LayoutMode::KEYBOARD) {
- LOG4CXX_INFO(logger_,
- "There is application with active PerformInteraction");
+ SDL_LOG_INFO("There is application with active PerformInteraction");
app_to_notify = app;
break;
}
if (mobile_apis::HMILevel::eType::HMI_FULL ==
app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW)) {
- LOG4CXX_INFO(logger_, "There is application in HMI_FULL level");
+ SDL_LOG_INFO("There is application in HMI_FULL level");
app_to_notify = app;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_language_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_language_change_notification.cc
index 9605fd6074..363ea9bbc3 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_language_change_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_language_change_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnLanguageChangeNotification::OnLanguageChangeNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnLanguageChangeNotification::OnLanguageChangeNotification(
OnLanguageChangeNotification::~OnLanguageChangeNotification() {}
void OnLanguageChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_permissions_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_permissions_change_notification.cc
index f64ca34bf2..7c0c27040d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_permissions_change_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_permissions_change_notification.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnPermissionsChangeNotification::OnPermissionsChangeNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ OnPermissionsChangeNotification::OnPermissionsChangeNotification(
OnPermissionsChangeNotification::~OnPermissionsChangeNotification() {}
void OnPermissionsChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendNotification();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_subtle_alert_pressed_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_subtle_alert_pressed_notification.cc
new file mode 100644
index 0000000000..6cbd391070
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_subtle_alert_pressed_notification.cc
@@ -0,0 +1,76 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "sdl_rpc_plugin/commands/mobile/on_subtle_alert_pressed_notification.h"
+#include "application_manager/application_impl.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SDL_CREATE_LOG_VARIABLE("Commands")
+
+OnSubtleAlertPressedNotification::OnSubtleAlertPressedNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandNotificationImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+OnSubtleAlertPressedNotification::~OnSubtleAlertPressedNotification() {}
+
+void OnSubtleAlertPressedNotification::Run() {
+ SDL_LOG_AUTO_TRACE();
+
+ ApplicationSharedPtr app = application_manager_.application(
+ (*message_)[strings::msg_params][strings::app_id].asInt());
+
+ if (!app) {
+ SDL_LOG_ERROR("No application associated with session key");
+ return;
+ }
+
+ (*message_)[strings::params][strings::connection_key] = app->app_id();
+ // remove app_id from notification
+ (*message_)[strings::msg_params].erase(strings::app_id);
+
+ SendNotification();
+}
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc
index cc6ab7b65b..850aa64b5f 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc
@@ -13,6 +13,8 @@ using namespace application_manager;
namespace commands {
namespace mobile {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnSystemCapabilityUpdatedNotification::OnSystemCapabilityUpdatedNotification(
const app_mngr::commands::MessageSharedPtr& message,
app_mngr::ApplicationManager& application_manager,
@@ -29,7 +31,7 @@ OnSystemCapabilityUpdatedNotification::
~OnSystemCapabilityUpdatedNotification() {}
void OnSystemCapabilityUpdatedNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
const auto system_capability_type =
@@ -117,9 +119,8 @@ void OnSystemCapabilityUpdatedNotification::Run() {
app_services->end(),
matching_service_predicate);
if (it != app_services->end()) {
- LOG4CXX_DEBUG(
- logger_,
- "Replacing updated record with service_id " << service_id);
+ SDL_LOG_DEBUG("Replacing updated record with service_id "
+ << service_id);
app_services->erase(it);
}
app_services->push_back(updated_capabilities[i]);
@@ -136,11 +137,10 @@ void OnSystemCapabilityUpdatedNotification::Run() {
}
default: {
- LOG4CXX_ERROR(logger_,
- "Unknown system capability type: "
- << msg_params[strings::system_capability]
- [strings::system_capability_type]
- .asInt());
+ SDL_LOG_ERROR("Unknown system capability type: "
+ << msg_params[strings::system_capability]
+ [strings::system_capability_type]
+ .asInt());
return;
}
}
@@ -157,25 +157,35 @@ void OnSystemCapabilityUpdatedNotification::Run() {
[&system_capability_type,
&initial_connection_key](const ApplicationSharedPtr app) {
DCHECK_OR_RETURN(app, false);
- auto& ext = SystemCapabilityAppExtension::ExtractExtension(*app);
- if (!ext.IsSubscribedTo(system_capability_type)) {
- LOG4CXX_DEBUG(logger_,
- "App " << app->app_id()
- << " is not subscribed to this capability type");
- return false;
- }
if (mobile_apis::SystemCapabilityType::DISPLAYS ==
system_capability_type &&
initial_connection_key > 0) {
- LOG4CXX_DEBUG(logger_,
- "Display capabilities notification for app "
- << initial_connection_key << " only");
+ SDL_LOG_DEBUG("Display capabilities notification for app "
+ << initial_connection_key << " only");
return app->app_id() == initial_connection_key;
}
- LOG4CXX_DEBUG(logger_,
- "App " << app->app_id()
+ auto ext_ptr = app->QueryInterface(
+ SystemCapabilityAppExtension::SystemCapabilityAppExtensionUID);
+
+ if (!ext_ptr) {
+ SDL_LOG_DEBUG("App "
+ << app->app_id()
+ << " does not have SystemCapabilityAppExtension");
+ return false;
+ }
+
+ auto ext =
+ std::static_pointer_cast<SystemCapabilityAppExtension>(ext_ptr);
+
+ if (!ext->IsSubscribedTo(system_capability_type)) {
+ SDL_LOG_DEBUG("App " << app->app_id()
+ << " is not subscribed to this capability type");
+ return false;
+ }
+
+ SDL_LOG_DEBUG("App " << app->app_id()
<< " is subscribed to specified capability type");
return true;
};
@@ -183,8 +193,7 @@ void OnSystemCapabilityUpdatedNotification::Run() {
const std::vector<ApplicationSharedPtr>& applications = FindAllApps(
application_manager_.applications(), subscribed_to_capability_predicate);
- LOG4CXX_DEBUG(logger_,
- "Number of Notifications to be sent: " << applications.size());
+ SDL_LOG_DEBUG("Number of Notifications to be sent: " << applications.size());
std::vector<ApplicationSharedPtr>::const_iterator app_it =
applications.begin();
@@ -194,31 +203,29 @@ void OnSystemCapabilityUpdatedNotification::Run() {
if (system_capability_type ==
mobile_apis::SystemCapabilityType::REMOTE_CONTROL &&
!app->is_remote_control_supported()) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"App with connection key: "
- << app->app_id()
- << " was subcribed to REMOTE_CONTROL system capabilities, but "
- "does not have RC permissions. Unsubscribing");
+ << app->app_id()
+ << " was subcribed to REMOTE_CONTROL system capabilities, but "
+ "does not have RC permissions. Unsubscribing");
auto& ext = SystemCapabilityAppExtension::ExtractExtension(*app);
ext.UnsubscribeFrom(system_capability_type);
continue;
}
if (mobile_apis::SystemCapabilityType::DISPLAYS == system_capability_type) {
- LOG4CXX_DEBUG(logger_, "Using common display capabilities");
+ SDL_LOG_DEBUG("Using common display capabilities");
auto capabilities = hmi_capabilities_.system_display_capabilities();
- if (app->is_resuming() && app->is_app_data_resumption_allowed()) {
- LOG4CXX_DEBUG(logger_,
- "Application "
- << app->app_id()
- << " is resuming. Providing cached capabilities");
- auto display_caps =
- app->display_capabilities_builder().display_capabilities();
+
+ auto& builder = app->display_capabilities_builder();
+ if (app->is_resuming() && builder.IsWindowResumptionNeeded()) {
+ SDL_LOG_DEBUG("Application "
+ << app->app_id()
+ << " is resuming. Providing cached capabilities");
+ auto display_caps = builder.display_capabilities();
capabilities = display_caps;
} else if (app->display_capabilities()) {
- LOG4CXX_DEBUG(logger_,
- "Application " << app->app_id()
+ SDL_LOG_DEBUG("Application " << app->app_id()
<< " has specific display capabilities");
const WindowID window_id =
msg_params[strings::system_capability]
@@ -229,8 +236,7 @@ void OnSystemCapabilityUpdatedNotification::Run() {
}
if (!capabilities) {
- LOG4CXX_WARN(logger_,
- "No available display capabilities for sending. Skipping");
+ SDL_LOG_WARN("No available display capabilities for sending. Skipping");
continue;
}
@@ -238,8 +244,7 @@ void OnSystemCapabilityUpdatedNotification::Run() {
*capabilities;
}
- LOG4CXX_INFO(logger_,
- "Sending OnSystemCapabilityUpdated " << capability_type_string
+ SDL_LOG_INFO("Sending OnSystemCapabilityUpdated " << capability_type_string
<< " application id "
<< app->app_id());
(*message_)[strings::params][strings::connection_key] = app->app_id();
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc
index 991144d7cf..4a97d5b970 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc
@@ -48,6 +48,8 @@ namespace commands {
namespace mobile {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnSystemRequestNotification::OnSystemRequestNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -63,7 +65,7 @@ OnSystemRequestNotification::OnSystemRequestNotification(
OnSystemRequestNotification::~OnSystemRequestNotification() {}
void OnSystemRequestNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace application_manager;
using namespace mobile_apis;
using namespace helpers;
@@ -71,8 +73,7 @@ void OnSystemRequestNotification::Run() {
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (app.use_count() == 0) {
- LOG4CXX_ERROR(logger_,
- "Application with connection key " << connection_key()
+ SDL_LOG_ERROR("Application with connection key " << connection_key()
<< " is not registered.");
return;
}
@@ -88,8 +89,7 @@ void OnSystemRequestNotification::Run() {
if (!policy_handler.IsRequestTypeAllowed(
app->device(), app->policy_app_id(), request_type)) {
- LOG4CXX_WARN(logger_,
- "Request type " << stringified_request_type
+ SDL_LOG_WARN("Request type " << stringified_request_type
<< " is not allowed by policies");
return;
}
@@ -101,15 +101,13 @@ void OnSystemRequestNotification::Run() {
(*message_)[strings::msg_params][strings::request_subtype].asString();
if (!policy_handler.IsRequestSubTypeAllowed(app->policy_app_id(),
request_subtype)) {
- LOG4CXX_ERROR(logger_,
- "Request subtype: " << request_subtype
+ SDL_LOG_ERROR("Request subtype: " << request_subtype
<< " is DISALLOWED by policies");
return;
}
}
- LOG4CXX_DEBUG(logger_,
- "Processing Request type : " << stringified_request_type);
+ SDL_LOG_DEBUG("Processing Request type : " << stringified_request_type);
const bool binary_data_is_required =
Compare<mobile_apis::RequestType::eType, EQ, ONE>(
@@ -118,10 +116,14 @@ void OnSystemRequestNotification::Run() {
mobile_apis::RequestType::OEM_SPECIFIC);
BinaryMessage binary_data;
- if (binary_data_is_required) {
+ if (binary_data_is_required &&
+ (*message_)[strings::msg_params].keyExists(strings::file_name)) {
const std::string filename =
(*message_)[strings::msg_params][strings::file_name].asString();
file_system::ReadBinaryFile(filename, binary_data);
+ } else if ((*message_)[strings::params].keyExists(strings::binary_data)) {
+ // Binary data may already be attached to the message
+ binary_data = (*message_)[strings::params][strings::binary_data].asBinary();
}
if (mobile_apis::RequestType::OEM_SPECIFIC == request_type) {
@@ -150,8 +152,7 @@ void OnSystemRequestNotification::Run() {
} else if (mobile_apis::RequestType::LOCK_SCREEN_ICON_URL == request_type) {
if (!(*message_)[strings::msg_params].keyExists(strings::url) ||
(*message_)[strings::msg_params][strings::url].empty()) {
- LOG4CXX_ERROR(logger_,
- "discarding LOCK_SCREEN_ICON_URL request without URL");
+ SDL_LOG_ERROR("discarding LOCK_SCREEN_ICON_URL request without URL");
return;
}
}
@@ -161,7 +162,7 @@ void OnSystemRequestNotification::Run() {
#ifdef PROPRIETARY_MODE
void OnSystemRequestNotification::AddHeader(BinaryMessage& message) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const uint32_t timeout = policy_handler_.TimeoutExchangeSec();
size_t content_length;
@@ -172,7 +173,7 @@ void OnSystemRequestNotification::AddHeader(BinaryMessage& message) const {
}
char timeout_str[24];
- if (0 > sprintf(timeout_str, "%d", timeout)) {
+ if (0 > sprintf(timeout_str, "%u", timeout)) {
memset(timeout_str, 0, sizeof(timeout_str));
}
@@ -219,8 +220,8 @@ void OnSystemRequestNotification::AddHeader(BinaryMessage& message) const {
message.clear();
message.assign(header.begin(), header.end());
- LOG4CXX_DEBUG(
- logger_, "Header added: " << std::string(message.begin(), message.end()));
+ SDL_LOG_DEBUG(
+ "Header added: " << std::string(message.begin(), message.end()));
}
size_t OnSystemRequestNotification::ParsePTString(
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_tbt_client_state_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_tbt_client_state_notification.cc
index 0a8420b6a3..944fb0c148 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_tbt_client_state_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_tbt_client_state_notification.cc
@@ -41,6 +41,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnTBTClientStateNotification::OnTBTClientStateNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ OnTBTClientStateNotification::OnTBTClientStateNotification(
OnTBTClientStateNotification::~OnTBTClientStateNotification() {}
void OnTBTClientStateNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
(*message_)[strings::params][strings::message_type] =
static_cast<int32_t>(application_manager::MessageType::kNotification);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_touch_event_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_touch_event_notification.cc
index 6ceb381d2e..02ec1be53f 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_touch_event_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_touch_event_notification.cc
@@ -42,6 +42,8 @@ namespace commands {
namespace mobile {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnTouchEventNotification::OnTouchEventNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -57,7 +59,7 @@ OnTouchEventNotification::OnTouchEventNotification(
OnTouchEventNotification::~OnTouchEventNotification() {}
void OnTouchEventNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::vector<ApplicationSharedPtr>& applications_with_navi =
application_manager_.applications_with_navi();
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_update_file_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_update_file_notification.cc
new file mode 100644
index 0000000000..d3257844ec
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_update_file_notification.cc
@@ -0,0 +1,64 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "sdl_rpc_plugin/commands/mobile/on_update_file_notification.h"
+#include "application_manager/application_impl.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+SDL_CREATE_LOG_VARIABLE("Commands")
+
+OnUpdateFileNotification::OnUpdateFileNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandNotificationImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+OnUpdateFileNotification::~OnUpdateFileNotification() {}
+
+void OnUpdateFileNotification::Run() {
+ SDL_LOG_AUTO_TRACE();
+ SendNotification();
+}
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_update_sub_menu_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_update_sub_menu_notification.cc
new file mode 100644
index 0000000000..05ff9fc8e5
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_update_sub_menu_notification.cc
@@ -0,0 +1,64 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "sdl_rpc_plugin/commands/mobile/on_update_sub_menu_notification.h"
+#include "application_manager/application_impl.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+SDL_CREATE_LOG_VARIABLE("Commands")
+
+OnUpdateSubMenuNotification::OnUpdateSubMenuNotification(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandNotificationImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+OnUpdateSubMenuNotification::~OnUpdateSubMenuNotification() {}
+
+void OnUpdateSubMenuNotification::Run() {
+ SDL_LOG_AUTO_TRACE();
+ SendNotification();
+}
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_way_point_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_way_point_change_notification.cc
index e89ede53b9..33413f805d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_way_point_change_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_way_point_change_notification.cc
@@ -38,6 +38,8 @@ namespace sdl_rpc_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnWayPointChangeNotification::OnWayPointChangeNotification(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ OnWayPointChangeNotification::OnWayPointChangeNotification(
OnWayPointChangeNotification::~OnWayPointChangeNotification() {}
void OnWayPointChangeNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::set<uint32_t> subscribed_for_way_points =
application_manager_.GetAppsSubscribedForWayPoints();
@@ -65,6 +67,7 @@ void OnWayPointChangeNotification::Run() {
(*message_)[strings::params][strings::connection_key] = *app_id;
SendNotification();
}
+ application_manager_.SaveWayPointsMessage(message_);
}
} // namespace commands
} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc
index 2f3d38f0b0..5918c05f2d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc
@@ -43,6 +43,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
namespace str = strings;
PerformAudioPassThruRequest::PerformAudioPassThruRequest(
@@ -64,7 +66,7 @@ PerformAudioPassThruRequest::PerformAudioPassThruRequest(
PerformAudioPassThruRequest::~PerformAudioPassThruRequest() {}
void PerformAudioPassThruRequest::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
FinishTTSSpeak();
CommandRequestImpl::onTimeOut();
@@ -77,28 +79,28 @@ bool PerformAudioPassThruRequest::Init() {
}
void PerformAudioPassThruRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "APPLICATION_NOT_REGISTERED");
+ SDL_LOG_ERROR("APPLICATION_NOT_REGISTERED");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
if (mobile_api::HMILevel::HMI_NONE ==
app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW)) {
- LOG4CXX_ERROR(logger_, "application isn't activated");
+ SDL_LOG_ERROR("application isn't activated");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_,
- "Incoming perform audio pass thru has contains "
- "\\t\\n \\\\t \\\\n"
- " text contains only whitespace in initialPrompt");
+ SDL_LOG_ERROR(
+ "Incoming perform audio pass thru has contains "
+ "\\t\\n \\\\t \\\\n"
+ " text contains only whitespace in initialPrompt");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -114,9 +116,8 @@ void PerformAudioPassThruRequest::Run() {
initial_prompt, app, application_manager_);
if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
- LOG4CXX_ERROR(
- logger_,
- "MessageHelper::VerifyTtsFiles return " << verification_result);
+ SDL_LOG_ERROR("MessageHelper::VerifyTtsFiles return "
+ << verification_result);
SendResponse(
false,
mobile_apis::Result::FILE_NOT_FOUND,
@@ -135,14 +136,14 @@ void PerformAudioPassThruRequest::Run() {
}
void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::UI_PerformAudioPassThru: {
- LOG4CXX_TRACE(logger_, "Received UI_PerformAudioPassThru");
+ SDL_LOG_TRACE("Received UI_PerformAudioPassThru");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
result_ui_ = static_cast<hmi_apis::Common_Result::eType>(
@@ -151,7 +152,7 @@ void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) {
// in case perform audio is started by other request skip stopping
if (hmi_apis::Common_Result::REJECTED == result_ui_) {
- LOG4CXX_ERROR(logger_, "Request was rejected");
+ SDL_LOG_ERROR("Request was rejected");
SendResponse(false,
MessageHelper::HMIToMobileResult(result_ui_),
NULL,
@@ -162,7 +163,7 @@ void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) {
break;
}
case hmi_apis::FunctionID::TTS_Speak: {
- LOG4CXX_INFO(logger_, "Received TTS_Speak event");
+ SDL_LOG_INFO("Received TTS_Speak event");
result_tts_speak_ = static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asUInt());
GetInfo(message, tts_info_);
@@ -188,14 +189,14 @@ void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) {
break;
}
case hmi_apis::FunctionID::TTS_OnResetTimeout: {
- LOG4CXX_INFO(logger_, "Received TTS_OnResetTimeout event");
+ SDL_LOG_INFO("Received TTS_OnResetTimeout event");
application_manager_.updateRequestTimeout(
connection_key(), correlation_id(), default_timeout());
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
@@ -214,7 +215,7 @@ void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) {
const PerformAudioPassThruRequest::ResponseParams&
PerformAudioPassThruRequest::PrepareResponseParameters() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
app_mngr::commands::ResponseInfo ui_perform_info(
result_ui_, HmiInterfaces::HMI_INTERFACE_UI, application_manager_);
@@ -252,7 +253,7 @@ PerformAudioPassThruRequest::PrepareResponseParameters() {
}
void PerformAudioPassThruRequest::SendSpeakRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace hmi_apis;
using namespace smart_objects;
@@ -274,7 +275,7 @@ void PerformAudioPassThruRequest::SendSpeakRequest() {
}
void PerformAudioPassThruRequest::SendPerformAudioPassThruRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject msg_params =
smart_objects::SmartObject(smart_objects::SmartType_Map);
@@ -321,7 +322,7 @@ void PerformAudioPassThruRequest::SendPerformAudioPassThruRequest() {
}
void PerformAudioPassThruRequest::SendRecordStartNotification() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject msg_params =
smart_objects::SmartObject(smart_objects::SmartType_Map);
@@ -331,7 +332,7 @@ void PerformAudioPassThruRequest::SendRecordStartNotification() {
}
void PerformAudioPassThruRequest::StartMicrophoneRecording() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t app_id = connection_key();
application_manager_.BeginAudioPassThru(app_id);
@@ -346,7 +347,7 @@ void PerformAudioPassThruRequest::StartMicrophoneRecording() {
}
bool PerformAudioPassThruRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const char* str = NULL;
if ((*message_)[strings::msg_params].keyExists(strings::initial_prompt)) {
@@ -359,7 +360,7 @@ bool PerformAudioPassThruRequest::IsWhiteSpaceExist() {
for (; it_ip != it_ip_end; ++it_ip) {
str = (*it_ip)[strings::text].asCharArray();
if (std::strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid initial_prompt syntax check failed");
+ SDL_LOG_ERROR("Invalid initial_prompt syntax check failed");
return true;
}
}
@@ -370,8 +371,7 @@ bool PerformAudioPassThruRequest::IsWhiteSpaceExist() {
str = (*message_)[strings::msg_params][strings::audio_pass_display_text1]
.asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Invalid audio_pass_display_text1 value syntax check failed");
return true;
}
@@ -382,8 +382,7 @@ bool PerformAudioPassThruRequest::IsWhiteSpaceExist() {
str = (*message_)[strings::msg_params][strings::audio_pass_display_text2]
.asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Invalid audio_pass_display_text2 value syntax check failed");
return true;
}
@@ -392,14 +391,14 @@ bool PerformAudioPassThruRequest::IsWhiteSpaceExist() {
}
void PerformAudioPassThruRequest::FinishTTSSpeak() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t app_id = connection_key();
if (application_manager_.EndAudioPassThru(app_id)) {
- LOG4CXX_DEBUG(logger_, "Stop AudioPassThru.");
+ SDL_LOG_DEBUG("Stop AudioPassThru.");
application_manager_.StopAudioPassThru(app_id);
}
if (!IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_TTS)) {
- LOG4CXX_WARN(logger_, "TTS Speak is inactive.");
+ SDL_LOG_WARN("TTS Speak is inactive.");
return;
}
SendHMIRequest(hmi_apis::FunctionID::TTS_StopSpeaking, NULL);
@@ -446,7 +445,7 @@ PerformAudioPassThruRequest::PrepareAudioPassThruResultCodeForResponse(
}
bool PerformAudioPassThruRequest::IsWaitingHMIResponse() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_TTS) ||
IsInterfaceAwaited(HmiInterfaces::HMI_INTERFACE_UI);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_response.cc
index 5dae6327eb..8712eae150 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
PerformAudioPassThruResponse::PerformAudioPassThruResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ PerformAudioPassThruResponse::PerformAudioPassThruResponse(
PerformAudioPassThruResponse::~PerformAudioPassThruResponse() {}
void PerformAudioPassThruResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
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 881c838c1a..a3269847a1 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
@@ -34,12 +34,12 @@
#include "sdl_rpc_plugin/commands/mobile/perform_interaction_request.h"
#include <string.h>
+
#include <numeric>
#include <string>
#include "application_manager/application_impl.h"
#include "application_manager/message_helper.h"
-
#include "interfaces/HMI_API.h"
#include "interfaces/MOBILE_API.h"
#include "utils/custom_string.h"
@@ -56,6 +56,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
namespace custom_str = utils::custom_string;
uint32_t PerformInteractionRequest::pi_requests_count_ = 0;
@@ -108,18 +110,18 @@ bool PerformInteractionRequest::Init() {
}
void PerformInteractionRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
if (app->is_perform_interaction_active()) {
- LOG4CXX_DEBUG(logger_, "Application has active PerformInteraction");
+ SDL_LOG_DEBUG("Application has active PerformInteraction");
app_pi_was_active_before_ = true;
}
@@ -134,9 +136,9 @@ void PerformInteractionRequest::Run() {
if ((mobile_apis::InteractionMode::VR_ONLY == interaction_mode_) &&
(mobile_apis::LayoutMode::KEYBOARD == interaction_layout)) {
- LOG4CXX_ERROR(logger_,
- "PerformInteraction contains InteractionMode"
- "=VR_ONLY and interactionLayout=KEYBOARD");
+ SDL_LOG_ERROR(
+ "PerformInteraction contains InteractionMode"
+ "=VR_ONLY and interactionLayout=KEYBOARD");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -147,17 +149,17 @@ void PerformInteractionRequest::Run() {
if (0 == choice_set_id_list_length) {
if (mobile_apis::LayoutMode::KEYBOARD == interaction_layout) {
if (mobile_apis::InteractionMode::BOTH == interaction_mode_) {
- LOG4CXX_ERROR(logger_,
- "interactionChoiceSetIDList is empty,"
- " InteractionMode=BOTH and"
- " interactionLayout=KEYBOARD");
+ SDL_LOG_ERROR(
+ "interactionChoiceSetIDList is empty,"
+ " InteractionMode=BOTH and"
+ " interactionLayout=KEYBOARD");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
} else {
- LOG4CXX_ERROR(logger_,
- "interactionChoiceSetIDList is empty"
- " and interactionLayout!=KEYBOARD");
+ SDL_LOG_ERROR(
+ "interactionChoiceSetIDList is empty"
+ " and interactionLayout!=KEYBOARD");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -167,9 +169,9 @@ void PerformInteractionRequest::Run() {
app,
choice_set_id_list_length,
msg_params[strings::interaction_choice_set_id_list])) {
- LOG4CXX_ERROR(logger_,
- "PerformInteraction has choice sets with "
- "duplicated IDs or application does not have choice sets");
+ SDL_LOG_ERROR(
+ "PerformInteraction has choice sets with "
+ "duplicated IDs or application does not have choice sets");
SendResponse(false, mobile_apis::Result::INVALID_ID);
return;
}
@@ -178,23 +180,21 @@ void PerformInteractionRequest::Run() {
if (mobile_apis::Result::INVALID_DATA ==
MessageHelper::VerifyImageVrHelpItems(
msg_params[strings::vr_help], app, application_manager_)) {
- LOG4CXX_ERROR(logger_,
- "Verification of " << strings::vr_help << " failed.");
+ SDL_LOG_ERROR("Verification of " << strings::vr_help << " failed.");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
}
if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_,
- "Incoming perform interaction has contains \t\n \\t \\n");
+ SDL_LOG_ERROR("Incoming perform interaction has contains \t\n \\t \\n");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
switch (interaction_mode_) {
case mobile_apis::InteractionMode::BOTH: {
- LOG4CXX_DEBUG(logger_, "Interaction Mode: BOTH");
+ SDL_LOG_DEBUG("Interaction Mode: BOTH");
if (!CheckChoiceSetVRSynonyms(app) || !CheckChoiceSetMenuNames(app) ||
!CheckVrHelpItemPositions(app) ||
!CheckChoiceSetListVRCommands(app)) {
@@ -203,7 +203,7 @@ void PerformInteractionRequest::Run() {
break;
}
case mobile_apis::InteractionMode::MANUAL_ONLY: {
- LOG4CXX_DEBUG(logger_, "Interaction Mode: MANUAL_ONLY");
+ SDL_LOG_DEBUG("Interaction Mode: MANUAL_ONLY");
if (!CheckChoiceSetVRSynonyms(app) || !CheckChoiceSetMenuNames(app) ||
!CheckVrHelpItemPositions(app)) {
return;
@@ -211,7 +211,7 @@ void PerformInteractionRequest::Run() {
break;
}
case mobile_apis::InteractionMode::VR_ONLY: {
- LOG4CXX_DEBUG(logger_, "Interaction Mode: VR_ONLY");
+ SDL_LOG_DEBUG("Interaction Mode: VR_ONLY");
if (!CheckChoiceSetVRSynonyms(app) || !CheckVrHelpItemPositions(app) ||
!CheckChoiceSetListVRCommands(app)) {
return;
@@ -219,7 +219,7 @@ void PerformInteractionRequest::Run() {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Unknown interaction mode");
+ SDL_LOG_ERROR("Unknown interaction mode");
return;
}
}
@@ -234,18 +234,18 @@ void PerformInteractionRequest::Run() {
}
void PerformInteractionRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::UI_OnResetTimeout: {
- LOG4CXX_DEBUG(logger_, "Received UI_OnResetTimeout event");
+ SDL_LOG_DEBUG("Received UI_OnResetTimeout event");
application_manager_.updateRequestTimeout(
connection_key(), correlation_id(), default_timeout());
break;
}
case hmi_apis::FunctionID::UI_PerformInteraction: {
- LOG4CXX_DEBUG(logger_, "Received UI_PerformInteraction event");
+ SDL_LOG_DEBUG("Received UI_PerformInteraction event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
ui_response_received_ = true;
@@ -257,7 +257,7 @@ void PerformInteractionRequest::on_event(const event_engine::Event& event) {
break;
}
case hmi_apis::FunctionID::VR_PerformInteraction: {
- LOG4CXX_DEBUG(logger_, "Received VR_PerformInteraction");
+ SDL_LOG_DEBUG("Received VR_PerformInteraction");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
vr_response_received_ = true;
@@ -271,15 +271,14 @@ void PerformInteractionRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event" << event.id());
break;
}
}
if (!HasHMIResponsesToWait()) {
- LOG4CXX_DEBUG(logger_,
- "Send response in interaction mode "
- << static_cast<int32_t>(interaction_mode_));
+ SDL_LOG_DEBUG("Send response in interaction mode "
+ << static_cast<int32_t>(interaction_mode_));
if (SetChoiceIdToResponseMsgParams(response_msg_params)) {
SendBothModeResponse(response_msg_params);
} else {
@@ -292,11 +291,11 @@ void PerformInteractionRequest::on_event(const event_engine::Event& event) {
}
void PerformInteractionRequest::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
switch (interaction_mode_) {
case mobile_apis::InteractionMode::BOTH: {
- LOG4CXX_DEBUG(logger_, "Interaction Mode: BOTH");
+ SDL_LOG_DEBUG("Interaction Mode: BOTH");
if (true == vr_response_received_) {
unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction);
DisablePerformInteraction();
@@ -308,21 +307,21 @@ void PerformInteractionRequest::onTimeOut() {
break;
}
case mobile_apis::InteractionMode::VR_ONLY: {
- LOG4CXX_DEBUG(logger_, "Interaction Mode: VR_ONLY");
+ SDL_LOG_DEBUG("Interaction Mode: VR_ONLY");
unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction);
DisablePerformInteraction();
CommandRequestImpl::onTimeOut();
break;
}
case mobile_apis::InteractionMode::MANUAL_ONLY: {
- LOG4CXX_DEBUG(logger_, "InteractionMode: MANUAL_ONLY");
+ SDL_LOG_DEBUG("InteractionMode: MANUAL_ONLY");
unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction);
DisablePerformInteraction();
CommandRequestImpl::onTimeOut();
break;
}
default: {
- LOG4CXX_ERROR(logger_, "INVALID ENUM");
+ SDL_LOG_ERROR("INVALID ENUM");
return;
}
};
@@ -331,7 +330,7 @@ void PerformInteractionRequest::onTimeOut() {
bool PerformInteractionRequest::ProcessVRResponse(
const smart_objects::SmartObject& message,
smart_objects::SmartObject& msg_params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace hmi_apis;
using namespace mobile_apis;
using namespace smart_objects;
@@ -340,7 +339,7 @@ bool PerformInteractionRequest::ProcessVRResponse(
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return false;
}
@@ -351,14 +350,14 @@ bool PerformInteractionRequest::ProcessVRResponse(
vr_result_code_, Common_Result::ABORTED, Common_Result::TIMED_OUT);
if (is_vr_aborted_timeout) {
- LOG4CXX_DEBUG(logger_, "VR response aborted");
+ SDL_LOG_DEBUG("VR response aborted");
if (InteractionMode::VR_ONLY == interaction_mode_) {
- LOG4CXX_DEBUG(logger_, "Aborted or Timeout Send Close Popup");
+ SDL_LOG_DEBUG("Aborted or Timeout Send Close Popup");
TerminatePerformInteraction();
SendResponse(false, MessageHelper::HMIToMobileResult(vr_result_code_));
return true;
}
- LOG4CXX_DEBUG(logger_, "Update timeout for UI");
+ SDL_LOG_DEBUG("Update timeout for UI");
application_manager_.updateRequestTimeout(
connection_key(), correlation_id(), default_timeout_);
return false;
@@ -373,7 +372,7 @@ bool PerformInteractionRequest::ProcessVRResponse(
if (hmi_msg_params.keyExists(strings::choice_id)) {
const int choice_id = hmi_msg_params[strings::choice_id].asInt();
if (!CheckChoiceIDFromResponse(app, choice_id)) {
- LOG4CXX_ERROR(logger_, "Wrong choiceID was received from HMI");
+ SDL_LOG_ERROR("Wrong choiceID was received from HMI");
TerminatePerformInteraction();
SendResponse(
false, Result::GENERIC_ERROR, "Wrong choiceID was received from HMI");
@@ -384,7 +383,7 @@ bool PerformInteractionRequest::ProcessVRResponse(
if (mobile_apis::InteractionMode::BOTH == interaction_mode_ ||
mobile_apis::InteractionMode::MANUAL_ONLY == interaction_mode_) {
- LOG4CXX_DEBUG(logger_, "Update timeout for UI");
+ SDL_LOG_DEBUG("Update timeout for UI");
application_manager_.updateRequestTimeout(
connection_key(), correlation_id(), default_timeout_);
}
@@ -394,9 +393,8 @@ bool PerformInteractionRequest::ProcessVRResponse(
if (is_vr_result_success &&
InteractionMode::MANUAL_ONLY == interaction_mode_) {
- LOG4CXX_DEBUG(logger_,
- "VR response is successfull in MANUAL_ONLY mode "
- << "Wait for UI response");
+ SDL_LOG_DEBUG("VR response is successfull in MANUAL_ONLY mode "
+ << "Wait for UI response");
// in case MANUAL_ONLY mode VR.PI SUCCESS just return
return false;
}
@@ -407,13 +405,13 @@ bool PerformInteractionRequest::ProcessVRResponse(
void PerformInteractionRequest::ProcessUIResponse(
const smart_objects::SmartObject& message,
smart_objects::SmartObject& msg_params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
using namespace smart_objects;
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return;
}
@@ -476,7 +474,7 @@ void PerformInteractionRequest::ProcessUIResponse(
void PerformInteractionRequest::SendUIPerformInteractionRequest(
application_manager::ApplicationSharedPtr const app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject& choice_set_id_list =
(*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
@@ -519,24 +517,24 @@ void PerformInteractionRequest::SendUIPerformInteractionRequest(
}
int32_t index_array_of_vr_help = 0;
for (size_t i = 0; i < choice_set_id_list.length(); ++i) {
- smart_objects::SmartObject* choice_set =
+ smart_objects::SmartObject choice_set =
app->FindChoiceSet(choice_set_id_list[i].asInt());
- if (choice_set) {
+ if (smart_objects::SmartType_Null != choice_set.getType()) {
// save perform interaction choice set
app->AddPerformInteractionChoiceSet(
- correlation_id(), choice_set_id_list[i].asInt(), *choice_set);
- for (size_t j = 0; j < (*choice_set)[strings::choice_set].length(); ++j) {
+ correlation_id(), choice_set_id_list[i].asInt(), choice_set);
+ for (size_t j = 0; j < choice_set[strings::choice_set].length(); ++j) {
if (mobile_apis::InteractionMode::VR_ONLY != mode) {
size_t index = msg_params[strings::choice_set].length();
msg_params[strings::choice_set][index] =
- (*choice_set)[strings::choice_set][j];
+ choice_set[strings::choice_set][j];
// vrCommands should be added via VR.AddCommand only
msg_params[strings::choice_set][index].erase(strings::vr_commands);
}
if (mobile_apis::InteractionMode::MANUAL_ONLY != mode &&
!is_vr_help_item) {
smart_objects::SmartObject& vr_commands =
- (*choice_set)[strings::choice_set][j][strings::vr_commands];
+ choice_set[strings::choice_set][j][strings::vr_commands];
if (0 < vr_commands.length()) {
// copy only first synonym
smart_objects::SmartObject item(smart_objects::SmartType_Map);
@@ -562,7 +560,7 @@ void PerformInteractionRequest::SendUIPerformInteractionRequest(
void PerformInteractionRequest::SendVRPerformInteractionRequest(
application_manager::ApplicationSharedPtr const app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject msg_params =
smart_objects::SmartObject(smart_objects::SmartType_Map);
@@ -581,14 +579,14 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest(
int32_t grammar_id_index = 0;
for (uint32_t i = 0; i < choice_list.length(); ++i) {
- smart_objects::SmartObject* choice_set =
- app->FindChoiceSet(choice_list[i].asInt());
- if (!choice_set) {
- LOG4CXX_WARN(logger_, "Couldn't found choiceset");
+ const auto choice_id = choice_list[i].asInt();
+ smart_objects::SmartObject choice_set = app->FindChoiceSet(choice_id);
+ if (smart_objects::SmartType_Null == choice_set.getType()) {
+ SDL_LOG_WARN("Couldn't found choiceset : " << choice_id);
continue;
}
msg_params[strings::grammar_id][grammar_id_index++] =
- (*choice_set)[strings::grammar_id].asUInt();
+ choice_set[strings::grammar_id].asUInt();
}
}
@@ -600,9 +598,8 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest(
MessageHelper::VerifyTtsFiles(help_prompt, app, application_manager_);
if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
- LOG4CXX_WARN(
- logger_,
- "MessageHelper::VerifyTtsFiles return " << verification_result);
+ SDL_LOG_WARN("MessageHelper::VerifyTtsFiles return "
+ << verification_result);
invalid_params.push_back("help_prompt");
} else {
msg_params[strings::help_prompt] = help_prompt;
@@ -614,14 +611,14 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest(
}
int32_t index = 0;
for (uint32_t i = 0; i < choice_list.length(); ++i) {
- smart_objects::SmartObject* choice_set =
+ smart_objects::SmartObject choice_set =
app->FindChoiceSet(choice_list[i].asInt());
- if (choice_set) {
- for (uint32_t j = 0; j < (*choice_set)[strings::choice_set].length();
+ if (smart_objects::SmartType_Null != choice_set.getType()) {
+ for (uint32_t j = 0; j < choice_set[strings::choice_set].length();
++j) {
smart_objects::SmartObject& vr_commands =
- (*choice_set)[strings::choice_set][j][strings::vr_commands];
+ choice_set[strings::choice_set][j][strings::vr_commands];
if (0 < vr_commands.length()) {
// copy only first synonym
smart_objects::SmartObject item(smart_objects::SmartType_Map);
@@ -635,7 +632,7 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest(
}
}
} else {
- LOG4CXX_ERROR(logger_, "Can't found choiceSet!");
+ SDL_LOG_ERROR("Can't found choiceSet!");
}
}
}
@@ -648,9 +645,8 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest(
timeout_prompt, app, application_manager_);
if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
- LOG4CXX_WARN(
- logger_,
- "MessageHelper::VerifyTtsFiles return " << verification_result);
+ SDL_LOG_WARN("MessageHelper::VerifyTtsFiles return "
+ << verification_result);
invalid_params.push_back("timeout_prompt");
} else {
msg_params[strings::timeout_prompt] = timeout_prompt;
@@ -669,9 +665,8 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest(
initial_prompt, app, application_manager_);
if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
- LOG4CXX_WARN(
- logger_,
- "MessageHelper::VerifyTtsFiles return " << verification_result);
+ SDL_LOG_WARN("MessageHelper::VerifyTtsFiles return "
+ << verification_result);
invalid_params.push_back("initial_prompt");
} else {
msg_params[strings::initial_prompt] = initial_prompt;
@@ -703,18 +698,18 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest(
bool PerformInteractionRequest::CheckChoiceSetMenuNames(
application_manager::ApplicationSharedPtr const app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject& choice_list =
(*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
for (size_t i = 0; i < choice_list.length(); ++i) {
// choice_set contains SmartObject msg_params
- smart_objects::SmartObject* i_choice_set =
+ smart_objects::SmartObject i_choice_set =
app->FindChoiceSet(choice_list[i].asInt());
for (size_t j = 0; j < choice_list.length(); ++j) {
- smart_objects::SmartObject* j_choice_set =
+ smart_objects::SmartObject j_choice_set =
app->FindChoiceSet(choice_list[j].asInt());
if (i == j) {
@@ -722,25 +717,26 @@ bool PerformInteractionRequest::CheckChoiceSetMenuNames(
continue;
}
- if (!i_choice_set || !j_choice_set) {
- LOG4CXX_ERROR(logger_, "Invalid ID");
+ if ((smart_objects::SmartType_Null == i_choice_set.getType()) ||
+ (smart_objects::SmartType_Null == j_choice_set.getType())) {
+ SDL_LOG_ERROR("Invalid ID");
SendResponse(false, mobile_apis::Result::INVALID_ID);
return false;
}
size_t ii = 0;
size_t jj = 0;
- for (; ii < (*i_choice_set)[strings::choice_set].length(); ++ii) {
- for (; jj < (*j_choice_set)[strings::choice_set].length(); ++jj) {
+ for (; ii < i_choice_set[strings::choice_set].length(); ++ii) {
+ for (; jj < j_choice_set[strings::choice_set].length(); ++jj) {
const std::string& ii_menu_name =
- (*i_choice_set)[strings::choice_set][ii][strings::menu_name]
+ i_choice_set[strings::choice_set][ii][strings::menu_name]
.asString();
const std::string& jj_menu_name =
- (*j_choice_set)[strings::choice_set][jj][strings::menu_name]
+ j_choice_set[strings::choice_set][jj][strings::menu_name]
.asString();
if (ii_menu_name == jj_menu_name) {
- LOG4CXX_ERROR(logger_, "Choice set has duplicated menu name");
+ SDL_LOG_ERROR("Choice set has duplicated menu name");
SendResponse(false,
mobile_apis::Result::DUPLICATE_NAME,
"Choice set has duplicated menu name");
@@ -756,18 +752,18 @@ bool PerformInteractionRequest::CheckChoiceSetMenuNames(
bool PerformInteractionRequest::CheckChoiceSetVRSynonyms(
application_manager::ApplicationSharedPtr const app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject& choice_list =
(*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
for (size_t i = 0; i < choice_list.length(); ++i) {
// choice_set contains SmartObject msg_params
- smart_objects::SmartObject* i_choice_set =
+ smart_objects::SmartObject i_choice_set =
app->FindChoiceSet(choice_list[i].asInt());
for (size_t j = 0; j < choice_list.length(); ++j) {
- smart_objects::SmartObject* j_choice_set =
+ smart_objects::SmartObject j_choice_set =
app->FindChoiceSet(choice_list[j].asInt());
if (i == j) {
@@ -775,31 +771,32 @@ bool PerformInteractionRequest::CheckChoiceSetVRSynonyms(
continue;
}
- if ((!i_choice_set) || (!j_choice_set)) {
- LOG4CXX_ERROR(logger_, "Invalid ID");
+ if ((smart_objects::SmartType_Null == i_choice_set.getType()) ||
+ (smart_objects::SmartType_Null == j_choice_set.getType())) {
+ SDL_LOG_ERROR("Invalid ID");
SendResponse(false, mobile_apis::Result::INVALID_ID);
return false;
}
size_t ii = 0;
size_t jj = 0;
- for (; ii < (*i_choice_set)[strings::choice_set].length(); ++ii) {
- for (; jj < (*j_choice_set)[strings::choice_set].length(); ++jj) {
- if (!((*i_choice_set)[strings::choice_set][ii].keyExists(
+ for (; ii < i_choice_set[strings::choice_set].length(); ++ii) {
+ for (; jj < j_choice_set[strings::choice_set].length(); ++jj) {
+ if (!(i_choice_set[strings::choice_set][ii].keyExists(
strings::vr_commands) &&
- (*j_choice_set)[strings::choice_set][jj].keyExists(
+ j_choice_set[strings::choice_set][jj].keyExists(
strings::vr_commands))) {
- LOG4CXX_DEBUG(logger_,
- "One or both sets has missing vr commands, skipping "
- "synonym check");
+ SDL_LOG_DEBUG(
+ "One or both sets has missing vr commands, skipping "
+ "synonym check");
return true;
}
// choice_set pointer contains SmartObject msg_params
smart_objects::SmartObject& ii_vr_commands =
- (*i_choice_set)[strings::choice_set][ii][strings::vr_commands];
+ i_choice_set[strings::choice_set][ii][strings::vr_commands];
smart_objects::SmartObject& jj_vr_commands =
- (*j_choice_set)[strings::choice_set][jj][strings::vr_commands];
+ j_choice_set[strings::choice_set][jj][strings::vr_commands];
for (size_t iii = 0; iii < ii_vr_commands.length(); ++iii) {
for (size_t jjj = 0; jjj < jj_vr_commands.length(); ++jjj) {
@@ -808,7 +805,7 @@ bool PerformInteractionRequest::CheckChoiceSetVRSynonyms(
const custom_str::CustomString& vr_cmd_j =
jj_vr_commands[jjj].asCustomString();
if (vr_cmd_i.CompareIgnoreCase(vr_cmd_j)) {
- LOG4CXX_ERROR(logger_, "Choice set has duplicated VR synonym");
+ SDL_LOG_ERROR("Choice set has duplicated VR synonym");
SendResponse(false,
mobile_apis::Result::DUPLICATE_NAME,
"Choice set has duplicated VR synonym");
@@ -825,10 +822,10 @@ bool PerformInteractionRequest::CheckChoiceSetVRSynonyms(
bool PerformInteractionRequest::CheckVrHelpItemPositions(
application_manager::ApplicationSharedPtr const app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!(*message_)[strings::msg_params].keyExists(strings::vr_help)) {
- LOG4CXX_DEBUG(logger_, strings::vr_help << " is omitted.");
+ SDL_LOG_DEBUG(strings::vr_help << " is omitted.");
return true;
}
@@ -838,7 +835,7 @@ bool PerformInteractionRequest::CheckVrHelpItemPositions(
int32_t position = 1;
for (size_t i = 0; i < vr_help.length(); ++i) {
if (position != vr_help[i][strings::position].asInt()) {
- LOG4CXX_ERROR(logger_, "Non-sequential vrHelp item position");
+ SDL_LOG_ERROR("Non-sequential vrHelp item position");
SendResponse(false,
mobile_apis::Result::REJECTED,
"Non-sequential vrHelp item position");
@@ -850,11 +847,11 @@ bool PerformInteractionRequest::CheckVrHelpItemPositions(
}
void PerformInteractionRequest::DisablePerformInteraction() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return;
}
@@ -870,12 +867,12 @@ void PerformInteractionRequest::DisablePerformInteraction() {
}
bool PerformInteractionRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
- const char* str = NULL;
+ SDL_LOG_AUTO_TRACE();
- str = (*message_)[strings::msg_params][strings::initial_text].asCharArray();
+ const char* str =
+ (*message_)[strings::msg_params][strings::initial_text].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid initial_text syntax check failed");
+ SDL_LOG_ERROR("Invalid initial_text syntax check failed");
return true;
}
@@ -889,7 +886,7 @@ bool PerformInteractionRequest::IsWhiteSpaceExist() {
for (; it_ip != it_ip_end; ++it_ip) {
str = (*it_ip)[strings::text].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid initial_prompt syntax check failed");
+ SDL_LOG_ERROR("Invalid initial_prompt syntax check failed");
return true;
}
}
@@ -905,7 +902,7 @@ bool PerformInteractionRequest::IsWhiteSpaceExist() {
for (; it_hp != it_hp_end; ++it_hp) {
str = (*it_hp)[strings::text].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid help_prompt syntax check failed");
+ SDL_LOG_ERROR("Invalid help_prompt syntax check failed");
return true;
}
}
@@ -921,7 +918,7 @@ bool PerformInteractionRequest::IsWhiteSpaceExist() {
for (; it_tp != it_tp_end; ++it_tp) {
str = (*it_tp)[strings::text].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid timeout_prompt syntax check failed");
+ SDL_LOG_ERROR("Invalid timeout_prompt syntax check failed");
return true;
}
}
@@ -937,15 +934,14 @@ bool PerformInteractionRequest::IsWhiteSpaceExist() {
for (; it_vh != it_vh_end; ++it_vh) {
str = (*it_vh)[strings::text].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid vr_help syntax check failed");
+ SDL_LOG_ERROR("Invalid vr_help syntax check failed");
return true;
}
if ((*it_vh).keyExists(strings::image)) {
str = (*it_vh)[strings::image][strings::value].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid vr_help image value syntax check failed");
+ SDL_LOG_ERROR("Invalid vr_help image value syntax check failed");
return true;
}
}
@@ -955,7 +951,7 @@ bool PerformInteractionRequest::IsWhiteSpaceExist() {
}
void PerformInteractionRequest::TerminatePerformInteraction() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendClosePopupRequestToHMI();
DisablePerformInteraction();
@@ -970,7 +966,7 @@ void PerformInteractionRequest::SendClosePopupRequestToHMI() {
bool PerformInteractionRequest::CheckChoiceIDFromResponse(
ApplicationSharedPtr app, const int32_t choice_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const DataAccessor<PerformChoiceSetMap> accessor =
app->performinteraction_choice_set_map();
const PerformChoiceSetMap& choice_set_map = accessor.GetData();
@@ -998,34 +994,31 @@ bool PerformInteractionRequest::CheckChoiceIDFromResponse(
bool PerformInteractionRequest::CheckChoiceSetListVRCommands(
ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& choice_set_id_list =
(*message_)[strings::msg_params][strings::interaction_choice_set_id_list];
- smart_objects::SmartObject* choice_set = nullptr;
-
for (size_t i = 0; i < choice_set_id_list.length(); ++i) {
- choice_set = app->FindChoiceSet(choice_set_id_list[i].asInt());
+ auto choice_set = app->FindChoiceSet(choice_set_id_list[i].asInt());
// this should never ever happen since this was already checked
- if (choice_set == nullptr) {
- LOG4CXX_ERROR(
- logger_,
+ if (smart_objects::SmartType_Null == choice_set.getType()) {
+ SDL_LOG_ERROR(
"Couldn't find choiceset_id = " << choice_set_id_list[i].asInt());
SendResponse(false, mobile_apis::Result::INVALID_ID);
return false;
}
const smart_objects::SmartObject& choices_list =
- (*choice_set)[strings::choice_set];
+ choice_set[strings::choice_set];
auto vr_status = MessageHelper::CheckChoiceSetVRCommands(choices_list);
// if not all choices have vr commands
if (vr_status != MessageHelper::ChoiceSetVRCommandsStatus::ALL) {
- LOG4CXX_ERROR(logger_,
- "PerformInteraction has choice sets with "
- "missing vrCommands, not in MANUAL_ONLY mode");
+ SDL_LOG_ERROR(
+ "PerformInteraction has choice sets with "
+ "missing vrCommands, not in MANUAL_ONLY mode");
SendResponse(false,
mobile_apis::Result::INVALID_DATA,
"Some choices don't contain VR commands.");
@@ -1039,33 +1032,29 @@ bool PerformInteractionRequest::CheckChoiceIDFromRequest(
ApplicationSharedPtr app,
const size_t choice_set_id_list_length,
const smart_objects::SmartObject& choice_set_id_list) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- size_t choice_list_length = 0;
std::set<uint32_t> choice_id_set;
- smart_objects::SmartObject* choice_set = 0;
std::pair<std::set<uint32_t>::iterator, bool> ins_res;
for (size_t i = 0; i < choice_set_id_list_length; ++i) {
- choice_set = app->FindChoiceSet(choice_set_id_list[i].asInt());
- if (!choice_set) {
- LOG4CXX_ERROR(
- logger_,
+ auto choice_set = app->FindChoiceSet(choice_set_id_list[i].asInt());
+ if (smart_objects::SmartType_Null == choice_set.getType()) {
+ SDL_LOG_ERROR(
"Couldn't find choiceset_id = " << choice_set_id_list[i].asInt());
return false;
}
- choice_list_length = (*choice_set)[strings::choice_set].length();
+ size_t choice_list_length = choice_set[strings::choice_set].length();
const smart_objects::SmartObject& choices_list =
- (*choice_set)[strings::choice_set];
+ choice_set[strings::choice_set];
for (size_t k = 0; k < choice_list_length; ++k) {
ins_res =
choice_id_set.insert(choices_list[k][strings::choice_id].asInt());
if (!ins_res.second) {
- LOG4CXX_ERROR(logger_,
- "choice with ID "
- << choices_list[k][strings::choice_id].asInt()
- << " already exists");
+ SDL_LOG_ERROR("choice with ID "
+ << choices_list[k][strings::choice_id].asInt()
+ << " already exists");
return false;
}
}
@@ -1074,22 +1063,21 @@ bool PerformInteractionRequest::CheckChoiceIDFromRequest(
}
const bool PerformInteractionRequest::HasHMIResponsesToWait() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return !ui_response_received_ || !vr_response_received_;
}
void PerformInteractionRequest::SendBothModeResponse(
const smart_objects::SmartObject& msg_param) {
- LOG4CXX_AUTO_TRACE(logger_);
- mobile_apis::Result::eType perform_interaction_result_code =
- mobile_apis::Result::INVALID_ENUM;
+ SDL_LOG_AUTO_TRACE();
+
app_mngr::commands::ResponseInfo ui_perform_info(
ui_result_code_, HmiInterfaces::HMI_INTERFACE_UI, application_manager_);
app_mngr::commands::ResponseInfo vr_perform_info(
vr_result_code_, HmiInterfaces::HMI_INTERFACE_VR, application_manager_);
const bool result =
PrepareResultForMobileResponse(ui_perform_info, vr_perform_info);
- perform_interaction_result_code =
+ mobile_apis::Result::eType perform_interaction_result_code =
PrepareResultCodeForResponse(ui_perform_info, vr_perform_info);
const smart_objects::SmartObject* response_params =
msg_param.empty() ? NULL : &msg_param;
@@ -1108,8 +1096,8 @@ mobile_apis::Result::eType
PerformInteractionRequest::PrepareResultCodeForResponse(
const app_mngr::commands::ResponseInfo& ui_response,
const app_mngr::commands::ResponseInfo& vr_response) {
- LOG4CXX_DEBUG(
- logger_, "InteractionMode = " << static_cast<int32_t>(interaction_mode_));
+ SDL_LOG_DEBUG(
+ "InteractionMode = " << static_cast<int32_t>(interaction_mode_));
auto mobile_vr_result_code =
MessageHelper::HMIToMobileResult(vr_result_code_);
@@ -1159,7 +1147,7 @@ bool PerformInteractionRequest::PrepareResultForMobileResponse(
bool PerformInteractionRequest::SetChoiceIdToResponseMsgParams(
ns_smart_device_link::ns_smart_objects::SmartObject& msg_param) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const bool ui_choice_id_valid = INVALID_CHOICE_ID != ui_choice_id_received_;
const bool vr_choice_id_valid = INVALID_CHOICE_ID != vr_choice_id_received_;
@@ -1169,18 +1157,23 @@ bool PerformInteractionRequest::SetChoiceIdToResponseMsgParams(
return false;
}
- if (mobile_apis::InteractionMode::eType::MANUAL_ONLY == interaction_mode_) {
- msg_param[strings::choice_id] = ui_choice_id_received_;
- return true;
- }
-
- if (mobile_apis::InteractionMode::eType::VR_ONLY == interaction_mode_) {
- msg_param[strings::choice_id] = vr_choice_id_received_;
- return true;
+ switch (interaction_mode_) {
+ case mobile_apis::InteractionMode::eType::MANUAL_ONLY:
+ if (ui_choice_id_valid) {
+ msg_param[strings::choice_id] = ui_choice_id_received_;
+ }
+ case mobile_apis::InteractionMode::eType::VR_ONLY:
+ if (vr_choice_id_valid) {
+ msg_param[strings::choice_id] = vr_choice_id_received_;
+ }
+ default:
+ if (ui_choice_id_valid) {
+ msg_param[strings::choice_id] = ui_choice_id_received_;
+ } else if (vr_choice_id_valid) {
+ msg_param[strings::choice_id] = vr_choice_id_received_;
+ }
}
- msg_param[strings::choice_id] =
- ui_choice_id_valid ? ui_choice_id_received_ : vr_choice_id_received_;
return true;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_response.cc
index fa02641c2b..c72d851b0e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
PerformInteractionResponse::PerformInteractionResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ PerformInteractionResponse::PerformInteractionResponse(
PerformInteractionResponse::~PerformInteractionResponse() {}
void PerformInteractionResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc
index e25215fb48..5263991716 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc
@@ -61,6 +61,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
PutFileRequest::PutFileRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -81,7 +83,7 @@ PutFileRequest::PutFileRequest(
PutFileRequest::~PutFileRequest() {}
void PutFileRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr application =
application_manager_.application(connection_key());
@@ -89,7 +91,7 @@ void PutFileRequest::Run() {
smart_objects::SmartObject(smart_objects::SmartType_Map);
if (!application) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -101,8 +103,7 @@ void PutFileRequest::Run() {
application->put_file_in_none_count()) {
// If application is in the HMI_NONE level the quantity of allowed
// PutFile request is limited by the configuration profile
- LOG4CXX_ERROR(logger_,
- "Too many requests from the app with HMILevel HMI_NONE ");
+ SDL_LOG_ERROR("Too many requests from the app with HMILevel HMI_NONE ");
SendResponse(false,
mobile_apis::Result::REJECTED,
"Too many requests from the app with HMILevel HMI_NONE",
@@ -111,7 +112,7 @@ void PutFileRequest::Run() {
}
if (!(*message_)[strings::params].keyExists(strings::binary_data)) {
- LOG4CXX_ERROR(logger_, "Binary data empty");
+ SDL_LOG_ERROR("Binary data empty");
SendResponse(false,
mobile_apis::Result::INVALID_DATA,
"Binary data empty",
@@ -120,7 +121,7 @@ void PutFileRequest::Run() {
}
if (!(*message_)[strings::msg_params].keyExists(strings::sync_file_name)) {
- LOG4CXX_ERROR(logger_, "No file name");
+ SDL_LOG_ERROR("No file name");
SendResponse(false,
mobile_apis::Result::INVALID_DATA,
"No file name",
@@ -129,7 +130,7 @@ void PutFileRequest::Run() {
}
if (!(*message_)[strings::msg_params].keyExists(strings::file_type)) {
- LOG4CXX_ERROR(logger_, "No file type");
+ SDL_LOG_ERROR("No file type");
SendResponse(false,
mobile_apis::Result::INVALID_DATA,
"No file type",
@@ -141,7 +142,7 @@ void PutFileRequest::Run() {
if (!file_system::IsFileNameValid(sync_file_name_)) {
const std::string err_msg = "Sync file name contains forbidden symbols.";
- LOG4CXX_ERROR(logger_, err_msg);
+ SDL_LOG_ERROR(err_msg);
SendResponse(false,
mobile_apis::Result::INVALID_DATA,
err_msg.c_str(),
@@ -164,7 +165,6 @@ void PutFileRequest::Run() {
is_persistent_file_ = false;
bool is_system_file = false;
length_ = binary_data.size();
- bool is_download_complete = true;
bool offset_exist =
(*message_)[strings::msg_params].keyExists(strings::offset);
@@ -196,7 +196,7 @@ void PutFileRequest::Run() {
response_params[strings::space_available] =
static_cast<uint32_t>(space_available);
- LOG4CXX_ERROR(logger_, "Out of memory");
+ SDL_LOG_ERROR("Out of memory");
SendResponse(false,
mobile_apis::Result::OUT_OF_MEMORY,
"Out of memory",
@@ -206,7 +206,7 @@ void PutFileRequest::Run() {
}
if (!file_system::CreateDirectoryRecursively(file_path)) {
- LOG4CXX_ERROR(logger_, "Can't create folder");
+ SDL_LOG_ERROR("Can't create folder");
SendResponse(false,
mobile_apis::Result::GENERIC_ERROR,
"Can't create folder.",
@@ -216,12 +216,12 @@ void PutFileRequest::Run() {
const std::string full_path = file_path + "/" + sync_file_name_;
if ((*message_)[strings::msg_params].keyExists(strings::crc32_check_sum)) {
- LOG4CXX_TRACE(logger_, "Binary Data Size: " << binary_data.size());
+ SDL_LOG_TRACE("Binary Data Size: " << binary_data.size());
const uint32_t crc_received =
(*message_)[strings::msg_params][strings::crc32_check_sum].asUInt();
- LOG4CXX_TRACE(logger_, "CRC32 SUM Received: " << crc_received);
+ SDL_LOG_TRACE("CRC32 SUM Received: " << crc_received);
const uint32_t crc_calculated = GetCrc32CheckSum(binary_data);
- LOG4CXX_TRACE(logger_, "CRC32 SUM Calculated: " << crc_calculated);
+ SDL_LOG_TRACE("CRC32 SUM Calculated: " << crc_calculated);
if (crc_calculated != crc_received) {
SendResponse(false,
mobile_apis::Result::CORRUPTED_DATA,
@@ -232,16 +232,14 @@ void PutFileRequest::Run() {
}
}
- LOG4CXX_DEBUG(logger_,
- "Writing " << binary_data.size() << " bytes to " << full_path
+ SDL_LOG_DEBUG("Writing " << binary_data.size() << " bytes to " << full_path
<< " (current size is"
<< file_system::FileSize(full_path) << ")");
mobile_apis::Result::eType save_result = application_manager_.SaveBinary(
binary_data, file_path, sync_file_name_, offset_);
- LOG4CXX_DEBUG(logger_,
- "New size of " << full_path << " is "
+ SDL_LOG_DEBUG("New size of " << full_path << " is "
<< file_system::FileSize(full_path) << " bytes");
if (!is_system_file) {
response_params[strings::space_available] =
@@ -251,23 +249,23 @@ void PutFileRequest::Run() {
sync_file_name_ = file_path + "/" + sync_file_name_;
switch (save_result) {
case mobile_apis::Result::SUCCESS: {
- LOG4CXX_INFO(logger_, "PutFile is successful");
+ SDL_LOG_INFO("PutFile is successful");
if (!is_system_file) {
+ bool is_download_complete = true;
AppFile file(sync_file_name_,
is_persistent_file_,
is_download_complete,
file_type_);
if (0 == offset_) {
- LOG4CXX_INFO(logger_, "New file downloading");
+ SDL_LOG_INFO("New file downloading");
if (!application->AddFile(file)) {
- LOG4CXX_INFO(logger_,
- "Couldn't add file to application (File already Exist"
- << " in application and was rewritten on FS)");
+ SDL_LOG_INFO("Couldn't add file to application (File already Exist"
+ << " in application and was rewritten on FS)");
/* It can be first part of new big file, so we need to update
information about it's downloading status and persistence */
if (!application->UpdateFile(file)) {
- LOG4CXX_ERROR(logger_, "Couldn't update file");
+ SDL_LOG_ERROR("Couldn't update file");
/* If it is impossible to update file, application doesn't
know about existing this file */
SendResponse(false,
@@ -290,15 +288,14 @@ void PutFileRequest::Run() {
break;
}
default:
- LOG4CXX_WARN(logger_,
- "PutFile is unsuccessful. Result = " << save_result);
+ SDL_LOG_WARN("PutFile is unsuccessful. Result = " << save_result);
SendResponse(false, save_result, "Can't save file", &response_params);
break;
}
}
void PutFileRequest::SendOnPutFileNotification(bool is_system_file) {
- LOG4CXX_INFO(logger_, "SendOnPutFileNotification");
+ SDL_LOG_INFO("SendOnPutFileNotification");
smart_objects::SmartObjectSPtr notification =
std::make_shared<smart_objects::SmartObject>(
smart_objects::SmartType_Map);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_response.cc
index f9ddbf7717..493efbd11c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_response.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
PutFileResponse::PutFileResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,12 +57,12 @@ PutFileResponse::PutFileResponse(
PutFileResponse::~PutFileResponse() {}
void PutFileResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t app_id =
(*message_)[strings::params][strings::connection_key].asUInt();
ApplicationSharedPtr app = application_manager_.application(app_id);
if (!app) {
- LOG4CXX_ERROR(logger_, "Application not registered");
+ SDL_LOG_ERROR("Application not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc
index 54649980c6..6ac830c378 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc
@@ -56,63 +56,14 @@
namespace {
namespace custom_str = utils::custom_string;
-mobile_apis::AppHMIType::eType StringToAppHMIType(const std::string& str) {
- if ("DEFAULT" == str) {
- return mobile_apis::AppHMIType::DEFAULT;
- } else if ("COMMUNICATION" == str) {
- return mobile_apis::AppHMIType::COMMUNICATION;
- } else if ("MEDIA" == str) {
- return mobile_apis::AppHMIType::MEDIA;
- } else if ("MESSAGING" == str) {
- return mobile_apis::AppHMIType::MESSAGING;
- } else if ("NAVIGATION" == str) {
- return mobile_apis::AppHMIType::NAVIGATION;
- } else if ("INFORMATION" == str) {
- return mobile_apis::AppHMIType::INFORMATION;
- } else if ("SOCIAL" == str) {
- return mobile_apis::AppHMIType::SOCIAL;
- } else if ("BACKGROUND_PROCESS" == str) {
- return mobile_apis::AppHMIType::BACKGROUND_PROCESS;
- } else if ("TESTING" == str) {
- return mobile_apis::AppHMIType::TESTING;
- } else if ("SYSTEM" == str) {
- return mobile_apis::AppHMIType::SYSTEM;
- } else if ("PROJECTION" == str) {
- return mobile_apis::AppHMIType::PROJECTION;
- } else if ("REMOTE_CONTROL" == str) {
- return mobile_apis::AppHMIType::REMOTE_CONTROL;
- } else {
- return mobile_apis::AppHMIType::INVALID_ENUM;
- }
-}
-
-std::string AppHMITypeToString(mobile_apis::AppHMIType::eType type) {
- const std::map<mobile_apis::AppHMIType::eType, std::string> app_hmi_type_map =
- {{mobile_apis::AppHMIType::DEFAULT, "DEFAULT"},
- {mobile_apis::AppHMIType::REMOTE_CONTROL, "REMOTE_CONTROL"},
- {mobile_apis::AppHMIType::COMMUNICATION, "COMMUNICATION"},
- {mobile_apis::AppHMIType::MEDIA, "MEDIA"},
- {mobile_apis::AppHMIType::MESSAGING, "MESSAGING"},
- {mobile_apis::AppHMIType::NAVIGATION, "NAVIGATION"},
- {mobile_apis::AppHMIType::INFORMATION, "INFORMATION"},
- {mobile_apis::AppHMIType::SOCIAL, "SOCIAL"},
- {mobile_apis::AppHMIType::BACKGROUND_PROCESS, "BACKGROUND_PROCESS"},
- {mobile_apis::AppHMIType::TESTING, "TESTING"},
- {mobile_apis::AppHMIType::SYSTEM, "SYSTEM"},
- {mobile_apis::AppHMIType::PROJECTION, "PROJECTION"}};
-
- std::map<mobile_apis::AppHMIType::eType, std::string>::const_iterator iter =
- app_hmi_type_map.find(type);
-
- return app_hmi_type_map.end() != iter ? iter->second : std::string("");
-}
-
struct AppHMITypeInserter {
- AppHMITypeInserter(smart_objects::SmartObject& so_array)
+ explicit AppHMITypeInserter(smart_objects::SmartObject& so_array)
: index_(0), so_array_(so_array) {}
bool operator()(const std::string& app_hmi_type) {
- so_array_[index_] = StringToAppHMIType(app_hmi_type);
+ so_array_[index_] =
+ application_manager::StringToEnum<mobile_apis::AppHMIType::eType>(
+ app_hmi_type);
++index_;
return true;
}
@@ -128,7 +79,7 @@ struct CheckMissedTypes {
: policy_app_types_(policy_app_types), log_(log) {}
bool operator()(const smart_objects::SmartArray::value_type& value) {
- std::string app_type_str = AppHMITypeToString(
+ std::string app_type_str = application_manager::EnumToString(
static_cast<mobile_apis::AppHMIType::eType>(value.asInt()));
if (!app_type_str.empty()) {
policy::StringArray::const_iterator it = policy_app_types_.begin();
@@ -159,7 +110,7 @@ class SmartArrayValueExtractor {
};
struct IsSameNickname {
- IsSameNickname(const custom_str::CustomString app_name)
+ explicit IsSameNickname(const custom_str::CustomString app_name)
: app_name_(app_name) {}
bool operator()(const policy::StringArray::value_type& nickname) const {
return app_name_.CompareIgnoreCase(nickname.c_str());
@@ -175,6 +126,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RegisterAppInterfaceRequest::RegisterAppInterfaceRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -186,44 +139,359 @@ RegisterAppInterfaceRequest::RegisterAppInterfaceRequest(
rpc_service,
hmi_capabilities,
policy_handler)
- , result_code_(mobile_apis::Result::INVALID_ENUM)
+ , are_tts_chunks_invalid_(false)
+ , are_hmi_types_invalid_(false)
+ , is_resumption_failed_(false)
+ , is_wrong_language_(false)
, device_handle_(0) {}
RegisterAppInterfaceRequest::~RegisterAppInterfaceRequest() {}
bool RegisterAppInterfaceRequest::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return true;
}
-void RegisterAppInterfaceRequest::Run() {
- using namespace helpers;
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Connection key is " << connection_key());
-
- // Fix problem with SDL and HMI HTML. This problem is not actual for HMI PASA.
- // Flag conditional compilation specific to customer is used in order to
- // exclude hit code
- // to RTC
- // FIXME(EZamakhov): on shutdown - get freez
+uint32_t RegisterAppInterfaceRequest::default_timeout() const {
+ // As RAI request does not depend on any HMI response there is no need to
+ // track any timeout for it. RAI request will be removed from
+ // RequestController queue upon RAI response which will be sent anyway
+ return 0;
+}
- // wait till HMI started
+void RegisterAppInterfaceRequest::WaitForHMIIsReady() {
while (!application_manager_.IsStopping() &&
!application_manager_.IsHMICooperating()) {
- LOG4CXX_DEBUG(logger_,
- "Waiting for the HMI... conn_key="
- << connection_key()
- << ", correlation_id=" << correlation_id()
- << ", default_timeout=" << default_timeout()
- << ", thread=" << pthread_self());
- application_manager_.updateRequestTimeout(
- connection_key(), correlation_id(), default_timeout());
+ SDL_LOG_DEBUG("Waiting for the HMI... conn_key="
+ << connection_key() << ", correlation_id=" << correlation_id()
+ << ", default_timeout=" << default_timeout()
+ << ", thread=" << pthread_self());
sleep(1);
// TODO(DK): timer_->StartWait(1);
}
+}
+
+void RegisterAppInterfaceRequest::FillApplicationParams(
+ ApplicationSharedPtr application) {
+ SDL_LOG_AUTO_TRACE();
+ const auto& msg_params = (*message_)[strings::msg_params];
+ application->set_is_media_application(
+ msg_params[strings::is_media_application].asBool());
+
+ if (msg_params.keyExists(strings::vr_synonyms)) {
+ application->set_vr_synonyms(msg_params[strings::vr_synonyms]);
+ }
+
+ if (msg_params.keyExists(strings::ngn_media_screen_app_name)) {
+ application->set_ngn_media_screen_name(
+ msg_params[strings::ngn_media_screen_app_name]);
+ }
+
+ if (msg_params.keyExists(strings::tts_name)) {
+ smart_objects::SmartObject& tts_name =
+ (*message_)[strings::msg_params][strings::tts_name];
+ mobile_apis::Result::eType verification_result =
+ MessageHelper::VerifyTtsFiles(
+ tts_name, application, application_manager_);
+
+ if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
+ SDL_LOG_WARN("MessageHelper::VerifyTtsFiles return "
+ << verification_result);
+ response_info_ = "One or more files needed for tts_name are not present";
+ are_tts_chunks_invalid_ = true;
+ }
+ application->set_tts_name(tts_name);
+ }
+
+ if (msg_params.keyExists(strings::app_hmi_type)) {
+ application->set_app_types(msg_params[strings::app_hmi_type]);
+
+ // check app type
+ const smart_objects::SmartObject& app_type =
+ msg_params.getElement(strings::app_hmi_type);
+
+ for (size_t i = 0; i < app_type.length(); ++i) {
+ mobile_apis::AppHMIType::eType current_app_type =
+ static_cast<mobile_apis::AppHMIType::eType>(
+ app_type.getElement(i).asUInt());
+
+ switch (current_app_type) {
+ case mobile_apis::AppHMIType::NAVIGATION: {
+ application->set_is_navi(true);
+ break;
+ }
+ case mobile_apis::AppHMIType::COMMUNICATION: {
+ application->set_voice_communication_supported(true);
+ break;
+ }
+ case mobile_apis::AppHMIType::PROJECTION: {
+ application->set_mobile_projection_enabled(true);
+ break;
+ }
+ case mobile_apis::AppHMIType::REMOTE_CONTROL: {
+ application->set_remote_control_supported(true);
+ break;
+ }
+ case mobile_apis::AppHMIType::WEB_VIEW: {
+ application->set_webengine_projection_enabled(true);
+ break;
+ }
+ default: {}
+ }
+ }
+ }
+
+ if (msg_params.keyExists(strings::day_color_scheme)) {
+ application->set_day_color_scheme(msg_params[strings::day_color_scheme]);
+ }
+
+ if (msg_params.keyExists(strings::night_color_scheme)) {
+ application->set_night_color_scheme(
+ msg_params[strings::night_color_scheme]);
+ }
+}
+
+void RegisterAppInterfaceRequest::SetupAppDeviceInfo(
+ ApplicationSharedPtr application) {
+ SDL_LOG_AUTO_TRACE();
+ const auto& msg_params = (*message_)[strings::msg_params];
+
+ policy::DeviceParams dev_params;
+ if (-1 == application_manager_.connection_handler()
+ .get_session_observer()
+ .GetDataOnDeviceID(application->device(),
+ &dev_params.device_name,
+ NULL,
+ &dev_params.device_mac_address,
+ &dev_params.device_connection_type)) {
+ SDL_LOG_ERROR("Failed to extract information for device "
+ << application->device());
+ }
+ policy::DeviceInfo device_info;
+ device_info.AdoptDeviceType(dev_params.device_connection_type);
+ if (msg_params.keyExists(strings::device_info)) {
+ FillDeviceInfo(&device_info);
+ }
+ const std::string& device_mac = application->mac_address();
+ GetPolicyHandler().SetDeviceInfo(device_mac, device_info);
+}
+
+bool RegisterAppInterfaceRequest::ApplicationDataShouldBeResumed(
+ std::string& add_info) {
+ SDL_LOG_AUTO_TRACE();
+ const auto& msg_params = (*message_)[strings::msg_params];
+ resumption::ResumeCtrl& resumer = application_manager_.resume_controller();
+
+ const uint32_t key = connection_key();
+ ApplicationSharedPtr application = application_manager_.application(key);
+
+ const bool hash_id_present = msg_params.keyExists(strings::hash_id);
+ const std::string hash_id = msg_params[strings::hash_id].asString();
+ const bool resumption = hash_id_present && !hash_id.empty();
+
+ if (!resumption) {
+ SDL_LOG_DEBUG("Hash id is missing, no resumption required");
+ return false;
+ }
+
+ if (!resumer.CheckApplicationHash(application, hash_id)) {
+ add_info = "Hash from RAI does not match to saved resume data.";
+ SDL_LOG_WARN(add_info);
+ is_resumption_failed_ = true;
+ return false;
+ }
+
+ if (!resumer.CheckPersistenceFilesForResumption(application)) {
+ add_info = "Persistent data is missing.";
+ SDL_LOG_WARN(add_info);
+ is_resumption_failed_ = true;
+ return false;
+ }
+
+ add_info = "Resume succeeded.";
+ SDL_LOG_DEBUG(add_info);
+ application->set_app_data_resumption_allowance(true);
+ application->set_is_resuming(true);
+
+ return true;
+}
+
+mobile_apis::Result::eType
+RegisterAppInterfaceRequest::CalculateFinalResultCode() const {
+ if (is_wrong_language_) {
+ SDL_LOG_DEBUG("Language was wrong");
+ return mobile_apis::Result::WRONG_LANGUAGE;
+ }
+
+ if (are_hmi_types_invalid_ || are_tts_chunks_invalid_) {
+ SDL_LOG_DEBUG("HMI types or TTS chunks are invalid");
+ return mobile_apis::Result::WARNINGS;
+ }
+
+ if (is_resumption_failed_) {
+ SDL_LOG_DEBUG("Resumption has been failed");
+ return mobile_apis::Result::RESUME_FAILED;
+ }
+
+ return mobile_apis::Result::SUCCESS;
+}
+
+policy::StatusNotifier RegisterAppInterfaceRequest::AddApplicationDataToPolicy(
+ application_manager::ApplicationSharedPtr application) {
+ SDL_LOG_AUTO_TRACE();
+
+ AppHmiTypes hmi_types;
+ if ((*message_)[strings::msg_params].keyExists(strings::app_hmi_type)) {
+ smart_objects::SmartArray* hmi_types_ptr =
+ (*message_)[strings::msg_params][strings::app_hmi_type].asArray();
+ if (hmi_types_ptr) {
+ SmartArrayValueExtractor extractor;
+ if (hmi_types_ptr && 0 < hmi_types_ptr->size()) {
+ std::transform(hmi_types_ptr->begin(),
+ hmi_types_ptr->end(),
+ std::back_inserter(hmi_types),
+ extractor);
+ }
+ }
+ }
+
+ return policy_handler_.AddApplication(
+ application->mac_address(), application->policy_app_id(), hmi_types);
+}
+
+void RegisterAppInterfaceRequest::CheckLanguage() {
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+ DCHECK_OR_RETURN_VOID(application);
+ const auto& msg_params = (*message_)[strings::msg_params];
+ if (msg_params[strings::language_desired].asInt() !=
+ hmi_capabilities_.active_vr_language() ||
+ msg_params[strings::hmi_display_language_desired].asInt() !=
+ hmi_capabilities_.active_ui_language()) {
+ SDL_LOG_WARN("Wrong language on registering application "
+ << application->name().c_str());
+
+ SDL_LOG_ERROR("VR language desired code is "
+ << msg_params[strings::language_desired].asInt()
+ << " , active VR language code is "
+ << hmi_capabilities_.active_vr_language()
+ << ", UI language desired code is "
+ << msg_params[strings::hmi_display_language_desired].asInt()
+ << " , active UI language code is "
+ << hmi_capabilities_.active_ui_language());
+
+ is_wrong_language_ = true;
+ }
+}
+
+smart_objects::SmartObjectSPtr GetLockScreenIconUrlNotification(
+ policy::PolicyHandlerInterface& policy_handler,
+ const uint32_t connection_key,
+ ApplicationSharedPtr app) {
+ DCHECK_OR_RETURN(app.get(), smart_objects::SmartObjectSPtr());
+ smart_objects::SmartObjectSPtr message =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+ (*message)[strings::params][strings::function_id] =
+ mobile_apis::FunctionID::OnSystemRequestID;
+ (*message)[strings::params][strings::connection_key] = connection_key;
+ (*message)[strings::params][strings::message_type] =
+ mobile_apis::messageType::notification;
+ (*message)[strings::params][strings::protocol_type] =
+ application_manager::commands::CommandImpl::mobile_protocol_type_;
+ (*message)[strings::params][strings::protocol_version] =
+ app->protocol_version();
+ (*message)[strings::msg_params][strings::request_type] =
+ mobile_apis::RequestType::LOCK_SCREEN_ICON_URL;
+ (*message)[strings::msg_params][strings::url] =
+ policy_handler.GetLockScreenIconUrl(app->policy_app_id());
+ return message;
+}
+
+void SendDriverDistractionAndIconUrlNotifications(
+ ApplicationManager& app_manager,
+ const uint32_t connection_key,
+ ApplicationSharedPtr app) {
+ policy::PolicyHandlerInterface& policy_handler =
+ app_manager.GetPolicyHandler();
+ smart_objects::SmartObjectSPtr so =
+ GetLockScreenIconUrlNotification(policy_handler, connection_key, app);
+ app_manager.GetRPCService().ManageMobileCommand(
+ so, app_mngr::commands::Command::SOURCE_SDL);
+ app_manager.SendDriverDistractionState(app);
+ // Create onSystemRequest to mobile to obtain cloud app icons
+ app_manager.SendGetIconUrlNotifications(connection_key, app);
+}
+
+/**
+ * @brief FinishSendingResponseToMobile is needed because by the time
+ SendRegisterAppInterfaceResponseToMobile() is called from callback
+ in Run(), request object is deleted, which results in SDL crash. This function
+ is intended to prevent that, safely conclude sending response to mobile and
+ perform other related operations (sending notifications, setting HMI level
+ etc.)
+ * @param msg_params copy of request object
+ * @param app_manager reference to application manager
+ * @param connection_key connection key
+ * @param notify_upd_manager pointer to status notifier callback function
+ */
+void FinishSendingResponseToMobile(const smart_objects::SmartObject& msg_params,
+ ApplicationManager& app_manager,
+ const uint32_t connection_key,
+ policy::StatusNotifier notify_upd_manager) {
+ resumption::ResumeCtrl& resume_ctrl = app_manager.resume_controller();
+ auto application = app_manager.application(connection_key);
+
+ policy::PolicyHandlerInterface& policy_handler =
+ app_manager.GetPolicyHandler();
+
+ if (msg_params.keyExists(strings::app_hmi_type)) {
+ policy_handler.SetDefaultHmiTypes(application->device(),
+ application->policy_app_id(),
+ &(msg_params[strings::app_hmi_type]));
+ }
+
+ // Default HMI level should be set before any permissions validation, since
+ // it relies on HMI level.
+ app_manager.OnApplicationRegistered(application);
+
+ // Once HMI level is set we can safely forward system capabilities for the
+ // main window and it won't be blocked by policies
+ application->display_capabilities_builder().StopWaitingForWindow(
+ mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
+
+ if (notify_upd_manager) {
+ (*notify_upd_manager)();
+ }
+
+ auto send_rc_status = [application](plugin_manager::RPCPlugin& plugin) {
+ plugin.OnApplicationEvent(plugin_manager::kRCStatusChanged, application);
+ };
+ app_manager.ApplyFunctorForEachPlugin(send_rc_status);
+
+ // Start PTU after successful registration
+ // Sends OnPermissionChange notification to mobile right after RAI response
+ // and HMI level set-up
+ policy_handler.OnAppRegisteredOnMobile(application->mac_address(),
+ application->policy_app_id());
+ SendDriverDistractionAndIconUrlNotifications(
+ app_manager, connection_key, application);
+ const bool is_app_saved_in_resumption = resume_ctrl.IsApplicationSaved(
+ application->policy_app_id(), application->mac_address());
+ if (is_app_saved_in_resumption) {
+ resume_ctrl.StartResumptionOnlyHMILevel(application);
+ }
+}
+
+void RegisterAppInterfaceRequest::Run() {
+ using namespace helpers;
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Connection key is " << connection_key());
+
+ WaitForHMIIsReady();
if (application_manager_.IsStopping()) {
- LOG4CXX_WARN(logger_, "The ApplicationManager is stopping!");
+ SDL_LOG_WARN("The ApplicationManager is stopping!");
return;
}
@@ -244,9 +512,8 @@ void RegisterAppInterfaceRequest::Run() {
return;
}
- LOG4CXX_DEBUG(
- logger_,
- "device_handle: " << device_handle_ << " device_id: " << device_id_);
+ SDL_LOG_DEBUG("device_handle: " << device_handle_
+ << " device_id: " << device_id_);
if (IsApplicationSwitched()) {
return;
@@ -293,7 +560,7 @@ void RegisterAppInterfaceRequest::Run() {
policy_result,
mobile_apis::Result::SUCCESS,
mobile_apis::Result::WARNINGS)) {
- SendResponse(false, policy_result);
+ SendResponse(false, policy_result, response_info_.c_str());
return;
}
@@ -301,8 +568,7 @@ void RegisterAppInterfaceRequest::Run() {
std::vector<ApplicationSharedPtr> duplicate_apps;
if (GetDuplicateNames(duplicate_apps)) {
- LOG4CXX_ERROR(logger_,
- "Found duplicate app names, checking for hybrid apps.");
+ SDL_LOG_ERROR("Found duplicate app names, checking for hybrid apps.");
// Default preference to BOTH
mobile_apis::HybridAppPreference::eType preference =
mobile_apis::HybridAppPreference::BOTH;
@@ -341,8 +607,7 @@ void RegisterAppInterfaceRequest::Run() {
preference == mobile_apis::HybridAppPreference::CLOUD) {
// Unregister mobile application and allow cloud application to
// register in it's place
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Unregistering app because a preferred version is registered.");
application_manager_.UnregisterApplication(
duplicate_app->app_id(),
@@ -368,14 +633,13 @@ void RegisterAppInterfaceRequest::Run() {
}
if (mobile_apis::Result::SUCCESS != coincidence_result) {
- LOG4CXX_ERROR(logger_, "Coincidence check failed.");
+ SDL_LOG_ERROR("Coincidence check failed.");
SendResponse(false, coincidence_result);
return;
}
if (IsWhiteSpaceExist()) {
- LOG4CXX_INFO(logger_,
- "Incoming register app interface has contains \t\n \\t \\n");
+ SDL_LOG_INFO("Incoming register app interface has contains \t\n \\t \\n");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -396,15 +660,14 @@ void RegisterAppInterfaceRequest::Run() {
minimum_major_version, minimum_minor_version, minimum_patch_version);
if (mobile_version < min_module_version) {
- LOG4CXX_WARN(logger_,
- "Application RPC Version does not meet minimum requirement");
+ SDL_LOG_WARN("Application RPC Version does not meet minimum requirement");
SendResponse(false, mobile_apis::Result::REJECTED);
}
application = application_manager_.RegisterApplication(message_);
if (!application) {
- LOG4CXX_ERROR(logger_, "Application hasn't been registered!");
+ SDL_LOG_ERROR("Application hasn't been registered!");
return;
}
@@ -423,141 +686,73 @@ void RegisterAppInterfaceRequest::Run() {
application->set_msg_version(module_version);
}
- application->set_is_media_application(
- msg_params[strings::is_media_application].asBool());
-
- if (msg_params.keyExists(strings::vr_synonyms)) {
- application->set_vr_synonyms(msg_params[strings::vr_synonyms]);
- }
-
- if (msg_params.keyExists(strings::ngn_media_screen_app_name)) {
- application->set_ngn_media_screen_name(
- msg_params[strings::ngn_media_screen_app_name]);
- }
-
- if (msg_params.keyExists(strings::tts_name)) {
- smart_objects::SmartObject& tts_name =
- (*message_)[strings::msg_params][strings::tts_name];
- mobile_apis::Result::eType verification_result =
- MessageHelper::VerifyTtsFiles(
- tts_name, application, application_manager_);
-
- if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
- LOG4CXX_WARN(
- logger_,
- "MessageHelper::VerifyTtsFiles return " << verification_result);
- response_info_ = "One or more files needed for tts_name are not present";
- result_code_ = mobile_apis::Result::WARNINGS;
- }
- application->set_tts_name(tts_name);
- }
-
- if (msg_params.keyExists(strings::app_hmi_type)) {
- application->set_app_types(msg_params[strings::app_hmi_type]);
-
- // check app type
- const smart_objects::SmartObject& app_type =
- msg_params.getElement(strings::app_hmi_type);
-
- for (size_t i = 0; i < app_type.length(); ++i) {
- mobile_apis::AppHMIType::eType current_app_type =
- static_cast<mobile_apis::AppHMIType::eType>(
- app_type.getElement(i).asUInt());
-
- switch (current_app_type) {
- case mobile_apis::AppHMIType::NAVIGATION: {
- application->set_is_navi(true);
- break;
- }
- case mobile_apis::AppHMIType::COMMUNICATION: {
- application->set_voice_communication_supported(true);
- break;
- }
- case mobile_apis::AppHMIType::PROJECTION: {
- application->set_mobile_projection_enabled(true);
- break;
- }
- case mobile_apis::AppHMIType::REMOTE_CONTROL: {
- application->set_remote_control_supported(true);
- break;
- }
- default: {}
- }
- }
- }
+ FillApplicationParams(application);
+ SetupAppDeviceInfo(application);
+ auto status_notifier = AddApplicationDataToPolicy(application);
auto on_app_registered = [application](plugin_manager::RPCPlugin& plugin) {
plugin.OnApplicationEvent(plugin_manager::kApplicationRegistered,
application);
};
+ // To prevent timing issues, this event is called before an app is accessible
+ // by the applications accessor. This prevents incoming hmi rpcs from
+ // attempting to access an app before it has been fully initialized.
application_manager_.ApplyFunctorForEachPlugin(on_app_registered);
+ application_manager_.FinalizeAppRegistration(application, connection_key());
- if (msg_params.keyExists(strings::day_color_scheme)) {
- application->set_day_color_scheme(msg_params[strings::day_color_scheme]);
- }
+ std::string add_info;
+ const auto is_resumption_required = ApplicationDataShouldBeResumed(add_info);
- if (msg_params.keyExists(strings::night_color_scheme)) {
- application->set_night_color_scheme(
- msg_params[strings::night_color_scheme]);
- }
+ auto& resume_ctrl = application_manager_.resume_controller();
- // Add device to policy table and set device info, if any
- policy::DeviceParams dev_params;
- if (-1 == application_manager_.connection_handler()
- .get_session_observer()
- .GetDataOnDeviceID(application->device(),
- &dev_params.device_name,
- NULL,
- &dev_params.device_mac_address,
- &dev_params.device_connection_type)) {
- LOG4CXX_ERROR(
- logger_,
- "Failed to extract information for device " << application->device());
- }
- policy::DeviceInfo device_info;
- device_info.AdoptDeviceType(dev_params.device_connection_type);
- if (msg_params.keyExists(strings::device_info)) {
- FillDeviceInfo(&device_info);
- }
+ // DisplayCapabilitiesBuilder has to collect all the information
+ // from incoming HMI notifications and send only one notification
+ // to mobile app, even if hash does not match, which means that app data
+ // will not be resumed, notification should be sent for default window as
+ // it will be resumed in any case
+ resume_ctrl.StartWaitingForDisplayCapabilitiesUpdate(application,
+ is_resumption_required);
- const std::string& device_mac = application->mac_address();
+ SendOnAppRegisteredNotificationToHMI(
+ application, is_resumption_required && !is_resumption_failed_);
- GetPolicyHandler().SetDeviceInfo(device_mac, device_info);
+ // By default app subscribed to CUSTOM_BUTTON
+ SendSubscribeCustomButtonNotification();
+ SendChangeRegistrationOnHMI(application);
- SendRegisterAppInterfaceResponseToMobile(ApplicationType::kNewApplication);
- smart_objects::SmartObjectSPtr so =
- GetLockScreenIconUrlNotification(connection_key(), application);
- rpc_service_.ManageMobileCommand(so, SOURCE_SDL);
- application_manager_.SendDriverDistractionState(application);
- // Create onSystemRequest to mobile to obtain cloud app icons
- application_manager_.SendGetIconUrlNotifications(connection_key(),
- application);
-}
+ if (is_resumption_required) {
+ const auto& msg_params = (*message_)[strings::msg_params];
+ const auto& hash_id = msg_params[strings::hash_id].asString();
+ SDL_LOG_WARN("Start Data Resumption");
+ auto send_response = [this, application, status_notifier](
+ mobile_apis::Result::eType result_code,
+ const std::string info) {
+ SDL_LOG_DEBUG("Invoking lambda callback for: " << this);
+ if (result_code != mobile_apis::Result::SUCCESS) {
+ is_resumption_failed_ = true;
+ }
-smart_objects::SmartObjectSPtr
-RegisterAppInterfaceRequest::GetLockScreenIconUrlNotification(
- const uint32_t connection_key, ApplicationSharedPtr app) {
- DCHECK_OR_RETURN(app.get(), smart_objects::SmartObjectSPtr());
- smart_objects::SmartObjectSPtr message =
- std::make_shared<smart_objects::SmartObject>(
- smart_objects::SmartType_Map);
- (*message)[strings::params][strings::function_id] =
- mobile_apis::FunctionID::OnSystemRequestID;
- (*message)[strings::params][strings::connection_key] = connection_key;
- (*message)[strings::params][strings::message_type] =
- mobile_apis::messageType::notification;
- (*message)[strings::params][strings::protocol_type] = mobile_protocol_type_;
- (*message)[strings::params][strings::protocol_version] = protocol_version_;
- (*message)[strings::msg_params][strings::request_type] =
- mobile_apis::RequestType::LOCK_SCREEN_ICON_URL;
- (*message)[strings::msg_params][strings::url] =
- GetPolicyHandler().GetLockScreenIconUrl(app->policy_app_id());
- return message;
+ SendRegisterAppInterfaceResponseToMobile(
+ ApplicationType::kNewApplication, status_notifier, info);
+ application->UpdateHash();
+ };
+ resume_ctrl.StartResumption(application, hash_id, send_response);
+
+ return;
+ }
+
+ CheckLanguage();
+
+ SendRegisterAppInterfaceResponseToMobile(
+ ApplicationType::kNewApplication, status_notifier, add_info);
}
void FillVRRelatedFields(smart_objects::SmartObject& response_params,
const HMICapabilities& hmi_capabilities) {
- response_params[strings::language] = hmi_capabilities.active_vr_language();
+ auto active_vr_lang = hmi_capabilities.active_vr_language();
+ if (hmi_apis::Common_Language::INVALID_ENUM != active_vr_lang) {
+ response_params[strings::language] = active_vr_lang;
+ }
auto vr_capabilities = hmi_capabilities.vr_capabilities();
if (vr_capabilities) {
response_params[strings::vr_capabilities] = *vr_capabilities;
@@ -574,7 +769,10 @@ void FillVIRelatedFields(smart_objects::SmartObject& response_params,
void FillTTSRelatedFields(smart_objects::SmartObject& response_params,
const HMICapabilities& hmi_capabilities) {
- response_params[strings::language] = hmi_capabilities.active_tts_language();
+ auto active_tts_lang = hmi_capabilities.active_tts_language();
+ if (hmi_apis::Common_Language::INVALID_ENUM != active_tts_lang) {
+ response_params[strings::language] = active_tts_lang;
+ }
auto speech_capabilities = hmi_capabilities.speech_capabilities();
if (speech_capabilities) {
response_params[strings::speech_capabilities] = *speech_capabilities;
@@ -587,8 +785,10 @@ void FillTTSRelatedFields(smart_objects::SmartObject& response_params,
void FillUIRelatedFields(smart_objects::SmartObject& response_params,
const HMICapabilities& hmi_capabilities) {
- response_params[strings::hmi_display_language] =
- hmi_capabilities.active_ui_language();
+ auto active_ui_lang = hmi_capabilities.active_ui_language();
+ if (hmi_apis::Common_Language::INVALID_ENUM != active_ui_lang) {
+ response_params[strings::hmi_display_language] = active_ui_lang;
+ }
auto display_capabilities = hmi_capabilities.display_capabilities();
if (display_capabilities) {
@@ -669,30 +869,21 @@ void FillUIRelatedFields(smart_objects::SmartObject& response_params,
response_params[strings::hmi_capabilities][strings::displays] = true;
response_params[strings::hmi_capabilities][strings::seat_location] =
hmi_capabilities.seat_location_capability() ? true : false;
+ response_params[strings::hmi_capabilities][strings::driver_distraction] =
+ hmi_capabilities.driver_distraction_supported();
}
void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
- ApplicationType app_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ ApplicationType app_type,
+ policy::StatusNotifier status_notifier,
+ const std::string& add_info) {
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject response_params(smart_objects::SmartType_Map);
- mobile_apis::Result::eType result_code = mobile_apis::Result::SUCCESS;
-
const HMICapabilities& hmi_capabilities = hmi_capabilities_;
const uint32_t key = connection_key();
ApplicationSharedPtr application = application_manager_.application(key);
-
- resumption::ResumeCtrl& resumer = application_manager_.resume_controller();
-
- if (!application) {
- LOG4CXX_ERROR(logger_,
- "There is no application for such connection key" << key);
- LOG4CXX_DEBUG(logger_, "Need to start resume data persistent timer");
- resumer.OnAppRegistrationEnd();
- return;
- }
-
utils::SemanticVersion negotiated_version = application->msg_version();
response_params[strings::sync_msg_version][strings::major_version] =
@@ -705,27 +896,6 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
const smart_objects::SmartObject& msg_params =
(*message_)[strings::msg_params];
- if (msg_params[strings::language_desired].asInt() !=
- hmi_capabilities.active_vr_language() ||
- msg_params[strings::hmi_display_language_desired].asInt() !=
- hmi_capabilities.active_ui_language()) {
- LOG4CXX_WARN(logger_,
- "Wrong language on registering application "
- << application->name().c_str());
-
- LOG4CXX_ERROR(
- logger_,
- "VR language desired code is "
- << msg_params[strings::language_desired].asInt()
- << " , active VR language code is "
- << hmi_capabilities.active_vr_language() << ", UI language code is "
- << msg_params[strings::hmi_display_language_desired].asInt()
- << " , active UI language code is "
- << hmi_capabilities.active_ui_language());
-
- result_code = mobile_apis::Result::WRONG_LANGUAGE;
- }
-
if (HmiInterfaces::STATE_NOT_AVAILABLE !=
application_manager_.hmi_interfaces().GetInterfaceState(
HmiInterfaces::HMI_INTERFACE_TTS)) {
@@ -750,39 +920,36 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
FillVIRelatedFields(response_params, hmi_capabilities);
}
- auto button_capabilities = hmi_capabilities.button_capabilities();
- if (button_capabilities) {
- response_params[hmi_response::button_capabilities] = *button_capabilities;
+ if (hmi_capabilities.button_capabilities()) {
+ response_params[hmi_response::button_capabilities] =
+ *hmi_capabilities.button_capabilities();
}
- auto soft_button_capabilities = hmi_capabilities.soft_button_capabilities();
- if (soft_button_capabilities) {
+ if (hmi_capabilities.soft_button_capabilities()) {
response_params[hmi_response::soft_button_capabilities] =
- *soft_button_capabilities;
+ *hmi_capabilities.soft_button_capabilities();
}
- auto preset_bank_capabilities = hmi_capabilities.preset_bank_capabilities();
- if (preset_bank_capabilities) {
+ if (hmi_capabilities.preset_bank_capabilities()) {
response_params[hmi_response::preset_bank_capabilities] =
- *preset_bank_capabilities;
+ *hmi_capabilities.preset_bank_capabilities();
}
- auto hmi_zone_capabilities = hmi_capabilities.hmi_zone_capabilities();
- if (hmi_zone_capabilities) {
- if (smart_objects::SmartType_Array == hmi_zone_capabilities->getType()) {
+ if (hmi_capabilities.hmi_zone_capabilities()) {
+ if (smart_objects::SmartType_Array ==
+ hmi_capabilities.hmi_zone_capabilities()->getType()) {
// hmi_capabilities json contains array and HMI response object
response_params[hmi_response::hmi_zone_capabilities] =
- *hmi_zone_capabilities;
+ *hmi_capabilities.hmi_zone_capabilities();
} else {
response_params[hmi_response::hmi_zone_capabilities][0] =
- *hmi_zone_capabilities;
+ *hmi_capabilities.hmi_zone_capabilities();
}
}
- auto pcm_stream_capabilities = hmi_capabilities.pcm_stream_capabilities();
- if (pcm_stream_capabilities) {
+ if (hmi_capabilities.pcm_stream_capabilities()) {
response_params[strings::pcm_stream_capabilities] =
- *pcm_stream_capabilities;
+ *hmi_capabilities.pcm_stream_capabilities();
}
const std::vector<uint32_t>& diag_modes =
@@ -804,9 +971,9 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
}
if (ApplicationType::kSwitchedApplicationWrongHashId == app_type) {
- LOG4CXX_DEBUG(logger_,
- "Application has been switched from another transport, "
- "but doesn't have correct hashID.");
+ SDL_LOG_DEBUG(
+ "Application has been switched from another transport, "
+ "but doesn't have correct hashID.");
application_manager::DeleteApplicationData(application,
application_manager_);
@@ -817,115 +984,25 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
}
if (ApplicationType::kSwitchedApplicationHashOk == app_type) {
- LOG4CXX_DEBUG(logger_,
- "Application has been switched from another transport "
- "and has correct hashID.");
+ SDL_LOG_DEBUG(
+ "Application has been switched from another transport "
+ "and has correct hashID.");
SendResponse(true, mobile_apis::Result::SUCCESS, NULL, &response_params);
return;
}
- const bool hash_id_present =
- (*message_)[strings::msg_params].keyExists(strings::hash_id);
- const std::string hash_id =
- (*message_)[strings::msg_params][strings::hash_id].asString();
-
- const bool resumption = hash_id_present && !hash_id.empty();
- bool need_restore_vr = resumption;
-
- std::string add_info;
- if (resumption) {
- if (!resumer.CheckApplicationHash(application, hash_id)) {
- LOG4CXX_WARN(logger_,
- "Hash from RAI does not match to saved resume data.");
- result_code = mobile_apis::Result::RESUME_FAILED;
- add_info = "Hash from RAI does not match to saved resume data.";
- need_restore_vr = false;
- } else if (!resumer.CheckPersistenceFilesForResumption(application)) {
- LOG4CXX_WARN(logger_, "Persistent data is missing.");
- result_code = mobile_apis::Result::RESUME_FAILED;
- add_info = "Persistent data is missing.";
- need_restore_vr = false;
- } else {
- add_info = "Resume succeeded.";
- application->set_app_data_resumption_allowance(true);
- application->set_is_resuming(true);
- }
- }
- if ((mobile_apis::Result::SUCCESS == result_code) &&
- (mobile_apis::Result::INVALID_ENUM != result_code_)) {
- add_info += response_info_;
- result_code = result_code_;
- }
-
- // In case application exist in resumption we need to send resumeVrgrammars
- const bool is_app_saved_in_resumption = resumer.IsApplicationSaved(
- application->policy_app_id(), application->mac_address());
-
- // If app is in resuming state
- // DisplayCapabilitiesBuilder has to collect all the information
- // from incoming HMI notifications and send only one notification
- // to mobile app, even if hash does not match, which means that app data
- // will not be resumed, notification should be sent for default window as
- // it will be resumed in any case
- if (resumption || is_app_saved_in_resumption) {
- resumer.StartWaitingForDisplayCapabilitiesUpdate(application);
- }
-
- AppHmiTypes hmi_types;
- if ((*message_)[strings::msg_params].keyExists(strings::app_hmi_type)) {
- smart_objects::SmartArray* hmi_types_ptr =
- (*message_)[strings::msg_params][strings::app_hmi_type].asArray();
- DCHECK_OR_RETURN_VOID(hmi_types_ptr);
- SmartArrayValueExtractor extractor;
- if (hmi_types_ptr && 0 < hmi_types_ptr->size()) {
- std::transform(hmi_types_ptr->begin(),
- hmi_types_ptr->end(),
- std::back_inserter(hmi_types),
- extractor);
- }
- }
- policy::StatusNotifier notify_upd_manager = GetPolicyHandler().AddApplication(
- application->mac_address(), application->policy_app_id(), hmi_types);
+ response_info_ += add_info;
response_params[strings::icon_resumed] =
file_system::FileExists(application->app_icon_path());
- SendResponse(true, result_code, add_info.c_str(), &response_params);
- if (msg_params.keyExists(strings::app_hmi_type)) {
- GetPolicyHandler().SetDefaultHmiTypes(application->device(),
- application->policy_app_id(),
- &(msg_params[strings::app_hmi_type]));
- }
-
- // Default HMI level should be set before any permissions validation, since it
- // relies on HMI level.
- application_manager_.OnApplicationRegistered(application);
+ smart_objects::SmartObject msg_params_copy = msg_params;
+ const auto result_code = CalculateFinalResultCode();
- auto send_rc_status = [application](plugin_manager::RPCPlugin& plugin) {
- plugin.OnApplicationEvent(plugin_manager::kRCStatusChanged, application);
- };
- application_manager_.ApplyFunctorForEachPlugin(send_rc_status);
+ SendResponse(true, result_code, response_info_.c_str(), &response_params);
- SendOnAppRegisteredNotificationToHMI(
- application, resumption, need_restore_vr);
- (*notify_upd_manager)();
-
- // Start PTU after successfull registration
- // Sends OnPermissionChange notification to mobile right after RAI response
- // and HMI level set-up
- GetPolicyHandler().OnAppRegisteredOnMobile(application->mac_address(),
- application->policy_app_id());
-
- if (result_code != mobile_apis::Result::RESUME_FAILED &&
- application->is_app_data_resumption_allowed()) {
- resumer.StartResumption(application, hash_id);
- } else if (is_app_saved_in_resumption) {
- resumer.StartResumptionOnlyHMILevel(application);
- }
-
- // By default app subscribed to CUSTOM_BUTTON
- SendSubscribeCustomButtonNotification();
- SendChangeRegistrationOnHMI(application);
+ FinishSendingResponseToMobile(
+ msg_params_copy, application_manager_, key, status_notifier);
}
void RegisterAppInterfaceRequest::SendChangeRegistration(
@@ -945,7 +1022,7 @@ void RegisterAppInterfaceRequest::SendChangeRegistration(
msg_params[strings::app_id] = app_id;
SendHMIRequest(function_id, &msg_params);
} else {
- LOG4CXX_DEBUG(logger_, "Interface " << interface << "is not avaliable");
+ SDL_LOG_DEBUG("Interface " << interface << " is not available");
}
}
@@ -961,11 +1038,11 @@ void RegisterAppInterfaceRequest::SendChangeRegistrationOnHMI(
}
void RegisterAppInterfaceRequest::SendOnAppRegisteredNotificationToHMI(
- ApplicationConstSharedPtr app, bool resumption, bool need_restore_vr) {
+ ApplicationConstSharedPtr app, bool resumption) {
using namespace smart_objects;
SmartObjectSPtr notification = std::make_shared<SmartObject>(SmartType_Map);
if (!notification) {
- LOG4CXX_ERROR(logger_, "Failed to create smart object");
+ SDL_LOG_ERROR("Failed to create smart object");
return;
}
@@ -982,7 +1059,7 @@ void RegisterAppInterfaceRequest::SendOnAppRegisteredNotificationToHMI(
// Due to current requirements in case when we're in resumption mode
// we have to always send resumeVRGrammar field.
if (resumption) {
- msg_params[strings::resume_vr_grammars] = need_restore_vr;
+ msg_params[strings::resume_vr_grammars] = resumption;
}
if (app->vr_synonyms()) {
@@ -1015,7 +1092,7 @@ void RegisterAppInterfaceRequest::SendOnAppRegisteredNotificationToHMI(
}
mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckCoincidence() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& msg_params =
(*message_)[strings::msg_params];
@@ -1037,7 +1114,7 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckCoincidence() {
// Name check
const auto& cur_name = app->name();
if (app_name.CompareIgnoreCase(cur_name)) {
- LOG4CXX_ERROR(logger_, "Application name is known already.");
+ SDL_LOG_ERROR("Application name is known already.");
return mobile_apis::Result::DUPLICATE_NAME;
}
const auto vr = app->vr_synonyms();
@@ -1046,7 +1123,7 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckCoincidence() {
CoincidencePredicateVR v(app_name);
if (0 != std::count_if(curr_vr->begin(), curr_vr->end(), v)) {
- LOG4CXX_ERROR(logger_, "Application name is known already.");
+ SDL_LOG_ERROR("Application name is known already.");
return mobile_apis::Result::DUPLICATE_NAME;
}
}
@@ -1057,7 +1134,7 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckCoincidence() {
CoincidencePredicateVR v(cur_name);
if (0 != std::count_if(new_vr->begin(), new_vr->end(), v)) {
- LOG4CXX_ERROR(logger_, "vr_synonyms duplicated with app_name .");
+ SDL_LOG_ERROR("vr_synonyms duplicated with app_name .");
return mobile_apis::Result::DUPLICATE_NAME;
}
} // End vr check
@@ -1072,11 +1149,9 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckCoincidence() {
tts_curr->end(),
compare_tts_name);
if (it_tts != tts_array->end()) {
- LOG4CXX_ERROR(
- logger_,
- "TTS name: "
- << (*it_tts)[strings::text].asCustomString().AsMBString()
- << " is known already");
+ SDL_LOG_ERROR("TTS name: "
+ << (*it_tts)[strings::text].asCustomString().AsMBString()
+ << " is known already");
return mobile_apis::Result::DUPLICATE_NAME;
}
} // End tts check
@@ -1088,7 +1163,7 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckCoincidence() {
bool RegisterAppInterfaceRequest::GetDuplicateNames(
std::vector<ApplicationSharedPtr>& out_duplicate_apps) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& msg_params =
(*message_)[strings::msg_params];
@@ -1122,7 +1197,7 @@ bool RegisterAppInterfaceRequest::GetDuplicateNames(
}
mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckWithPolicyData() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// TODO(AOleynik): Check is necessary to allow register application in case
// of disabled policy
// Remove this check, when HMI will support policy
@@ -1130,17 +1205,17 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckWithPolicyData() {
return mobile_apis::Result::WARNINGS;
}
- smart_objects::SmartObject& message = *message_;
+ auto& message = *message_;
policy::StringArray app_nicknames;
- policy::StringArray app_hmi_types;
+ policy::StringArray app_hmi_types_in_policy;
const std::string mobile_app_id =
application_manager_.GetCorrectMobileIDFromMessage(message_);
const bool init_result = GetPolicyHandler().GetInitialAppData(
- mobile_app_id, &app_nicknames, &app_hmi_types);
+ mobile_app_id, &app_nicknames, &app_hmi_types_in_policy);
if (!init_result) {
- LOG4CXX_ERROR(logger_, "Error during initial application data check.");
+ SDL_LOG_ERROR("Error during initial application data check.");
return mobile_apis::Result::INVALID_DATA;
}
@@ -1150,8 +1225,7 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckWithPolicyData() {
policy::StringArray::const_iterator it =
std::find_if(app_nicknames.begin(), app_nicknames.end(), compare);
if (app_nicknames.end() == it) {
- LOG4CXX_WARN(logger_,
- "Application name was not found in nicknames list.");
+ SDL_LOG_WARN("Application name was not found in nicknames list.");
// App should be unregistered, if its name is not present in nicknames
// list
usage_statistics::AppCounter count_of_rejections_nickname_mismatch(
@@ -1163,36 +1237,20 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckWithPolicyData() {
}
}
- mobile_apis::Result::eType result = mobile_apis::Result::SUCCESS;
+ auto result = mobile_apis::Result::SUCCESS;
// If AppHMIType is not included in policy - allow any type
- if (!app_hmi_types.empty()) {
- if (message[strings::msg_params].keyExists(strings::app_hmi_type)) {
- // If AppHmiTypes are partially same, the system should allow those listed
- // in the policy table and send warning info on missed values
- smart_objects::SmartArray app_types =
- *(message[strings::msg_params][strings::app_hmi_type].asArray());
-
- std::string log;
- CheckMissedTypes checker(app_hmi_types, log);
- std::for_each(app_types.begin(), app_types.end(), checker);
- if (!log.empty()) {
- response_info_ =
- "Following AppHmiTypes are not present in policy "
- "table:" +
- log;
- result_code_ = mobile_apis::Result::WARNINGS;
- }
+ if (!app_hmi_types_in_policy.empty()) {
+ result = ProcessingAppHMITypesPolicies(message, app_hmi_types_in_policy);
+ } else {
+ result = ProcessingAppHMITypesInMessage(message);
+ if (mobile_apis::Result::DISALLOWED == result) {
+ response_info_ =
+ "WEB_VIEW AppHmiType is absent in application policies, because they "
+ "are empty";
+ SDL_LOG_DEBUG(response_info_);
+ return result;
}
- // Replace AppHmiTypes in request with values allowed by policy table
- message[strings::msg_params][strings::app_hmi_type] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- smart_objects::SmartObject& app_hmi_type =
- message[strings::msg_params][strings::app_hmi_type];
-
- AppHMITypeInserter inserter(app_hmi_type);
- std::for_each(app_hmi_types.begin(), app_hmi_types.end(), inserter);
}
return result;
@@ -1237,7 +1295,7 @@ void RegisterAppInterfaceRequest::FillDeviceInfo(
}
bool RegisterAppInterfaceRequest::IsApplicationWithSameAppIdRegistered() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const custom_string::CustomString mobile_app_id(
application_manager_.GetCorrectMobileIDFromMessage(message_));
@@ -1247,12 +1305,11 @@ bool RegisterAppInterfaceRequest::IsApplicationWithSameAppIdRegistered() {
for (const auto& app : applications) {
if (mobile_app_id.CompareIgnoreCase(app->policy_app_id().c_str())) {
if (app->device() != device_handle_) {
- LOG4CXX_DEBUG(logger_,
- "These policy_app_id equal, but applications have "
- "different device id"
- << " mobile_app_id: " << mobile_app_id.c_str()
- << " device_handle: " << device_handle_
- << " device_handle: " << app->device());
+ SDL_LOG_DEBUG(
+ "These policy_app_id equal, but applications have "
+ "different device id"
+ << " mobile_app_id: " << mobile_app_id.c_str() << " device_handle: "
+ << device_handle_ << " device_handle: " << app->device());
continue;
}
return true;
@@ -1263,12 +1320,12 @@ bool RegisterAppInterfaceRequest::IsApplicationWithSameAppIdRegistered() {
}
bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
- const char* str = NULL;
+ SDL_LOG_AUTO_TRACE();
- str = (*message_)[strings::msg_params][strings::app_name].asCharArray();
+ const char* str =
+ (*message_)[strings::msg_params][strings::app_name].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid app_name syntax check failed");
+ SDL_LOG_ERROR("Invalid app_name syntax check failed");
return true;
}
@@ -1282,7 +1339,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
for (; it_tn != it_tn_end; ++it_tn) {
str = (*it_tn)[strings::text].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid tts_name syntax check failed");
+ SDL_LOG_ERROR("Invalid tts_name syntax check failed");
return true;
}
}
@@ -1293,8 +1350,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
str = (*message_)[strings::msg_params][strings::ngn_media_screen_app_name]
.asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid ngn_media_screen_app_name syntax check failed");
+ SDL_LOG_ERROR("Invalid ngn_media_screen_app_name syntax check failed");
return true;
}
}
@@ -1309,7 +1365,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
for (; it_vs != it_vs_end; ++it_vs) {
str = (*it_vs).asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid vr_synonyms syntax check failed");
+ SDL_LOG_ERROR("Invalid vr_synonyms syntax check failed");
return true;
}
}
@@ -1318,7 +1374,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
if ((*message_)[strings::msg_params].keyExists(strings::hash_id)) {
str = (*message_)[strings::msg_params][strings::hash_id].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid hash_id syntax check failed");
+ SDL_LOG_ERROR("Invalid hash_id syntax check failed");
return true;
}
}
@@ -1330,8 +1386,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
[strings::hardware]
.asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid device_info hardware syntax check failed");
+ SDL_LOG_ERROR("Invalid device_info hardware syntax check failed");
return true;
}
}
@@ -1342,8 +1397,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
[strings::firmware_rev]
.asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid device_info firmware_rev syntax check failed");
+ SDL_LOG_ERROR("Invalid device_info firmware_rev syntax check failed");
return true;
}
}
@@ -1353,7 +1407,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
str = (*message_)[strings::msg_params][strings::device_info][strings::os]
.asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid device_info os syntax check failed");
+ SDL_LOG_ERROR("Invalid device_info os syntax check failed");
return true;
}
}
@@ -1364,8 +1418,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
[strings::os_version]
.asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid device_info os_version syntax check failed");
+ SDL_LOG_ERROR("Invalid device_info os_version syntax check failed");
return true;
}
}
@@ -1376,8 +1429,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
[strings::carrier]
.asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid device_info carrier syntax check failed");
+ SDL_LOG_ERROR("Invalid device_info carrier syntax check failed");
return true;
}
}
@@ -1386,7 +1438,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
if ((*message_)[strings::msg_params].keyExists(strings::app_id)) {
str = (*message_)[strings::msg_params][strings::app_id].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid app_id syntax check failed");
+ SDL_LOG_ERROR("Invalid app_id syntax check failed");
return true;
}
}
@@ -1396,7 +1448,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
str =
(*message_)[strings::msg_params][strings::full_app_id].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid app_id syntax check failed");
+ SDL_LOG_ERROR("Invalid app_id syntax check failed");
return true;
}
}
@@ -1412,8 +1464,7 @@ void RegisterAppInterfaceRequest::CheckResponseVehicleTypeParam(
using namespace hmi_response;
if (!vehicle_type.keyExists(param) || vehicle_type[param].empty()) {
if (!backup_value.empty()) {
- LOG4CXX_DEBUG(logger_,
- param << " is missing."
+ SDL_LOG_DEBUG(param << " is missing."
"Will be replaced with policy table value.");
vehicle_type[param] = backup_value;
} else {
@@ -1436,30 +1487,27 @@ bool RegisterAppInterfaceRequest::IsApplicationSwitched() {
const std::string& policy_app_id =
application_manager_.GetCorrectMobileIDFromMessage(message_);
- LOG4CXX_DEBUG(logger_, "Looking for application id " << policy_app_id);
+ SDL_LOG_DEBUG("Looking for application id " << policy_app_id);
auto app =
application_manager_.reregister_application_by_policy_id(policy_app_id);
if (!app) {
- LOG4CXX_DEBUG(
- logger_,
- "Application with policy id " << policy_app_id << " is not found.");
+ SDL_LOG_DEBUG("Application with policy id " << policy_app_id
+ << " is not found.");
return false;
}
- LOG4CXX_DEBUG(logger_,
- "Application with policy id " << policy_app_id << " is found.");
+ SDL_LOG_DEBUG("Application with policy id " << policy_app_id << " is found.");
const auto app_device_handle = app->device();
if (app_device_handle == device_handle_) {
- LOG4CXX_DEBUG(logger_,
- "Application " << policy_app_id
+ SDL_LOG_DEBUG("Application " << policy_app_id
<< " is already registered from this device.");
SendResponse(false, mobile_apis::Result::APPLICATION_REGISTERED_ALREADY);
return true;
}
- LOG4CXX_DEBUG(logger_, "Application is found in reconnection list.");
+ SDL_LOG_DEBUG("Application is found in reconnection list.");
auto app_type = ApplicationType::kSwitchedApplicationWrongHashId;
if ((*message_)[strings::msg_params].keyExists(strings::hash_id)) {
@@ -1473,12 +1521,15 @@ bool RegisterAppInterfaceRequest::IsApplicationSwitched() {
}
application_manager_.ProcessReconnection(app, connection_key());
- SendRegisterAppInterfaceResponseToMobile(app_type);
- MessageHelper::SendHMIStatusNotification(
- app,
- mobile_apis::PredefinedWindows::DEFAULT_WINDOW,
- application_manager_);
+ const std::string additional_info;
+ SendRegisterAppInterfaceResponseToMobile(
+ app_type, policy::StatusNotifier(), additional_info);
+
+ auto notification = MessageHelper::CreateHMIStatusNotification(
+ app, mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
+ application_manager_.GetRPCService().ManageMobileCommand(notification,
+ SOURCE_SDL);
application_manager_.OnApplicationSwitched(app);
@@ -1489,12 +1540,12 @@ bool RegisterAppInterfaceRequest::GetDataOnSessionKey(
const uint32_t key,
connection_handler::DeviceHandle* device_id,
std::string* mac_address) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if ((nullptr == mac_address) && (nullptr == device_id)) {
- LOG4CXX_ERROR(logger_,
- "Can't get data on session key because device id and mac "
- "address are empty.");
+ SDL_LOG_ERROR(
+ "Can't get data on session key because device id and mac "
+ "address are empty.");
return false;
}
@@ -1505,8 +1556,7 @@ bool RegisterAppInterfaceRequest::GetDataOnSessionKey(
connection_key(), nullptr, nullptr, &device_handle);
if (result) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Failed to get device info for connection key: " << connection_key());
return false;
}
@@ -1517,9 +1567,8 @@ bool RegisterAppInterfaceRequest::GetDataOnSessionKey(
}
if (result) {
- LOG4CXX_DEBUG(logger_,
- "Failed get unique address info for connection key: "
- << connection_key());
+ SDL_LOG_DEBUG("Failed get unique address info for connection key: "
+ << connection_key());
return false;
}
@@ -1530,6 +1579,82 @@ bool RegisterAppInterfaceRequest::GetDataOnSessionKey(
return true;
}
+mobile_apis::Result::eType
+RegisterAppInterfaceRequest::ProcessingAppHMITypesInMessage(
+ const smart_objects::SmartObject& message) {
+ const bool app_hmi_types_exist =
+ message[strings::msg_params].keyExists(strings::app_hmi_type);
+
+ const auto result = mobile_apis::Result::SUCCESS;
+
+ if (!app_hmi_types_exist) {
+ return result;
+ }
+
+ auto app_types_in_message =
+ *(message[strings::msg_params][strings::app_hmi_type].asArray());
+
+ auto it = std::find(app_types_in_message.begin(),
+ app_types_in_message.end(),
+ mobile_apis::AppHMIType::WEB_VIEW);
+ if (app_types_in_message.end() != it) {
+ return mobile_apis::Result::DISALLOWED;
+ }
+
+ return result;
+}
+
+mobile_apis::Result::eType
+RegisterAppInterfaceRequest::ProcessingAppHMITypesPolicies(
+ smart_objects::SmartObject& message,
+ policy::StringArray& app_hmi_types_in_policy) {
+ auto result = mobile_apis::Result::SUCCESS;
+ const bool app_hmi_types_exist =
+ message[strings::msg_params].keyExists(strings::app_hmi_type);
+
+ if (app_hmi_types_exist) {
+ // If AppHmiTypes are partially same, the system should allow those listed
+ // in the policy table and send warning info on missed values
+ auto app_types_in_message =
+ *(message[strings::msg_params][strings::app_hmi_type].asArray());
+
+ std::string log;
+ CheckMissedTypes checker(app_hmi_types_in_policy, log);
+ std::for_each(
+ app_types_in_message.begin(), app_types_in_message.end(), checker);
+ if (!log.empty()) {
+ result = log.find("WEB_VIEW") != std::string::npos
+ ? mobile_apis::Result::DISALLOWED
+ : mobile_apis::Result::WARNINGS;
+
+ if (mobile_apis::Result::DISALLOWED == result) {
+ response_info_ =
+ "WEB_VIEW AppHmiType is absent in application policies";
+ SDL_LOG_DEBUG(response_info_);
+ return result;
+ }
+
+ response_info_ =
+ "Following AppHmiTypes are not present in policy "
+ "table:" +
+ log;
+ are_hmi_types_invalid_ = true;
+ result = mobile_apis::Result::WARNINGS;
+ }
+ }
+ // Replace AppHmiTypes in request with values allowed by policy table
+ message[strings::msg_params][strings::app_hmi_type] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ auto& app_hmi_type = message[strings::msg_params][strings::app_hmi_type];
+
+ AppHMITypeInserter inserter(app_hmi_type);
+ std::for_each(
+ app_hmi_types_in_policy.begin(), app_hmi_types_in_policy.end(), inserter);
+
+ return result;
+}
+
policy::PolicyHandlerInterface&
RegisterAppInterfaceRequest::GetPolicyHandler() {
return policy_handler_;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_response.cc
index b5683c62cb..0c74105e56 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_response.cc
@@ -42,8 +42,10 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
void RegisterAppInterfaceResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
mobile_apis::Result::eType result_code = mobile_apis::Result::SUCCESS;
bool success = (*message_)[strings::msg_params][strings::success].asBool();
@@ -94,6 +96,15 @@ void RegisterAppInterfaceResponse::Run() {
}
SendResponse(success, result_code, last_message);
+ if (success) {
+ app->set_is_ready(true);
+ }
+ event_engine::MobileEvent event(
+ mobile_apis::FunctionID::RegisterAppInterfaceID);
+ smart_objects::SmartObject event_msg(*message_);
+ event_msg[strings::params][strings::correlation_id] = 0;
+ event.set_smart_object(event_msg);
+ event.raise(application_manager_.event_dispatcher());
if (mobile_apis::Result::SUCCESS != result_code) {
return;
@@ -102,8 +113,7 @@ void RegisterAppInterfaceResponse::Run() {
// Add registered application to the policy db right after response sent to
// mobile to be able to check all other API according to app permissions
if (!app) {
- LOG4CXX_ERROR(logger_,
- "Application with connection key " << connection_key()
+ SDL_LOG_ERROR("Application with connection key " << connection_key()
<< " is not registered.");
return;
}
@@ -113,7 +123,7 @@ void RegisterAppInterfaceResponse::Run() {
void RegisterAppInterfaceResponse::SetHeartBeatTimeout(
uint32_t connection_key, const std::string& mobile_app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
policy::PolicyHandlerInterface& policy_handler = policy_handler_;
if (policy_handler.PolicyEnabled()) {
const uint32_t timeout = policy_handler.HeartBeatTimeout(mobile_app_id);
@@ -122,7 +132,7 @@ void RegisterAppInterfaceResponse::SetHeartBeatTimeout(
connection_key, timeout);
}
} else {
- LOG4CXX_INFO(logger_, "Policy is turn off");
+ SDL_LOG_INFO("Policy is turn off");
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_request.cc
index ffd8a7dc81..40302e51d5 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_request.cc
@@ -44,6 +44,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ResetGlobalPropertiesRequest::ResetGlobalPropertiesRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -61,196 +63,62 @@ ResetGlobalPropertiesRequest::ResetGlobalPropertiesRequest(
ResetGlobalPropertiesRequest::~ResetGlobalPropertiesRequest() {}
void ResetGlobalPropertiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t app_id =
(*message_)[strings::params][strings::connection_key].asUInt();
ApplicationSharedPtr app = application_manager_.application(app_id);
if (!app) {
- LOG4CXX_ERROR(logger_, "No application associated with session key");
+ SDL_LOG_ERROR("No application associated with session key");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
- size_t obj_length =
- (*message_)[strings::msg_params][strings::properties].length();
- // if application waits for sending ttsGlobalProperties need to remove this
- // application from tts_global_properties_app_list_
- LOG4CXX_INFO(logger_, "RemoveAppFromTTSGlobalPropertiesList");
- application_manager_.RemoveAppFromTTSGlobalPropertiesList(app_id);
-
- bool helpt_promt = false;
- bool timeout_prompt = false;
- bool vr_help_title_items = false;
- bool menu_name = false;
- bool menu_icon = false;
- bool is_key_board_properties = false;
- int number_of_reset_vr = 0;
- mobile_apis::GlobalProperty::eType global_property =
- mobile_apis::GlobalProperty::INVALID_ENUM;
-
- for (size_t i = 0; i < obj_length; ++i) {
- global_property = static_cast<mobile_apis::GlobalProperty::eType>(
- (*message_)[strings::msg_params][strings::properties][i].asInt());
-
- if (mobile_apis::GlobalProperty::HELPPROMPT == global_property) {
- helpt_promt = ResetHelpPromt(app);
- } else if (mobile_apis::GlobalProperty::TIMEOUTPROMPT == global_property) {
- timeout_prompt = ResetTimeoutPromt(app);
- } else if (((mobile_apis::GlobalProperty::VRHELPTITLE == global_property) ||
- (mobile_apis::GlobalProperty::VRHELPITEMS ==
- global_property)) &&
- (0 == number_of_reset_vr)) {
- ++number_of_reset_vr;
- vr_help_title_items = ResetVrHelpTitleItems(app);
- } else if (mobile_apis::GlobalProperty::MENUNAME == global_property) {
- menu_name = true;
- } else if (mobile_apis::GlobalProperty::MENUICON == global_property) {
- menu_icon = true;
- } else if (mobile_apis::GlobalProperty::KEYBOARDPROPERTIES ==
- global_property) {
- is_key_board_properties = true;
- }
- }
+ const auto& global_properties =
+ (*message_)[strings::msg_params][strings::properties];
- if (vr_help_title_items || menu_name || menu_icon ||
- is_key_board_properties) {
+ auto reset_global_props_result =
+ application_manager_.ResetGlobalProperties(global_properties, app_id);
+
+ if (reset_global_props_result.HasUIPropertiesReset()) {
StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
}
- if (timeout_prompt || helpt_promt) {
+ if (reset_global_props_result.HasTTSPropertiesReset()) {
StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
}
app->set_reset_global_properties_active(true);
- if (vr_help_title_items || menu_name || menu_icon ||
- is_key_board_properties) {
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- if (vr_help_title_items) {
- smart_objects::SmartObjectSPtr vr_help =
- MessageHelper::CreateAppVrHelp(app);
- if (!vr_help) {
- return;
- }
- msg_params = *vr_help;
- }
- if (menu_name) {
- msg_params[hmi_request::menu_title] = "";
- app->set_menu_title(msg_params[hmi_request::menu_title]);
- }
- // TODO(DT): clarify the sending parameter menuIcon
- // if (menu_icon) {
- //}
- if (is_key_board_properties) {
- smart_objects::SmartObject key_board_properties =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- key_board_properties[strings::language] =
- static_cast<int32_t>(hmi_apis::Common_Language::EN_US);
- key_board_properties[hmi_request::keyboard_layout] =
- static_cast<int32_t>(hmi_apis::Common_KeyboardLayout::QWERTY);
-
- // Look for APPLINK-4432 for details.
- /*smart_objects::SmartObject limited_character_list =
- smart_objects::SmartObject(
- smart_objects::SmartType_Array);
- limited_character_list[0] = "";
- key_board_properties[hmi_request::limited_character_list] =
- limited_character_list;*/
-
- key_board_properties[hmi_request::auto_complete_list] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- msg_params[hmi_request::keyboard_properties] = key_board_properties;
- }
-
- msg_params[strings::app_id] = app->app_id();
- SendHMIRequest(
- hmi_apis::FunctionID::UI_SetGlobalProperties, &msg_params, true);
- }
-
- if (timeout_prompt || helpt_promt) {
+ if (reset_global_props_result.HasUIPropertiesReset()) {
// create ui request
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- if (helpt_promt) {
- msg_params[strings::help_prompt] = (*app->help_prompt());
+ smart_objects::SmartObjectSPtr msg_params =
+ MessageHelper::CreateUIResetGlobalPropertiesRequest(
+ reset_global_props_result, app);
+ if (msg_params.get()) {
+ SendHMIRequest(
+ hmi_apis::FunctionID::UI_SetGlobalProperties, msg_params.get(), true);
}
-
- if (timeout_prompt) {
- msg_params[strings::timeout_prompt] = (*app->timeout_prompt());
- }
-
- msg_params[strings::app_id] = app->app_id();
-
- SendHMIRequest(
- hmi_apis::FunctionID::TTS_SetGlobalProperties, &msg_params, true);
- }
-}
-
-bool ResetGlobalPropertiesRequest::ResetHelpPromt(
- application_manager::ApplicationSharedPtr app) {
- if (!app) {
- LOG4CXX_ERROR(logger_, "Null pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return false;
- }
- smart_objects::SmartObject so_help_prompt =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- app->set_help_prompt(so_help_prompt);
- return true;
-}
-
-bool ResetGlobalPropertiesRequest::ResetTimeoutPromt(
- application_manager::ApplicationSharedPtr const app) {
- if (!app) {
- LOG4CXX_ERROR(logger_, "Null pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return false;
- }
-
- const std::vector<std::string>& time_out_promt =
- application_manager_.get_settings().time_out_promt();
-
- smart_objects::SmartObject so_time_out_promt =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
-
- for (uint32_t i = 0; i < time_out_promt.size(); ++i) {
- smart_objects::SmartObject timeoutPrompt =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- timeoutPrompt[strings::text] = time_out_promt[i];
- timeoutPrompt[strings::type] = hmi_apis::Common_SpeechCapabilities::SC_TEXT;
- so_time_out_promt[i] = timeoutPrompt;
}
- app->set_timeout_prompt(so_time_out_promt);
-
- return true;
-}
+ if (reset_global_props_result.HasTTSPropertiesReset()) {
+ smart_objects::SmartObjectSPtr msg_params =
+ MessageHelper::CreateTTSResetGlobalPropertiesRequest(
+ reset_global_props_result, app);
-bool ResetGlobalPropertiesRequest::ResetVrHelpTitleItems(
- application_manager::ApplicationSharedPtr const app) {
- if (!app) {
- LOG4CXX_ERROR(logger_, "Null pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return false;
+ SendHMIRequest(
+ hmi_apis::FunctionID::TTS_SetGlobalProperties, msg_params.get(), true);
}
- app->reset_vr_help_title();
- app->reset_vr_help();
-
- return true;
}
void ResetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::UI_SetGlobalProperties: {
- LOG4CXX_INFO(logger_, "Received UI_SetGlobalProperties event");
+ SDL_LOG_INFO("Received UI_SetGlobalProperties event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asInt());
@@ -258,7 +126,7 @@ void ResetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
break;
}
case hmi_apis::FunctionID::TTS_SetGlobalProperties: {
- LOG4CXX_INFO(logger_, "Received TTS_SetGlobalProperties event");
+ SDL_LOG_INFO("Received TTS_SetGlobalProperties event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
tts_result_ = static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asInt());
@@ -266,13 +134,13 @@ void ResetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
if (IsPendingResponseExist()) {
- LOG4CXX_DEBUG(logger_, "Waiting for remaining responses");
+ SDL_LOG_DEBUG("Waiting for remaining responses");
return;
}
@@ -294,7 +162,7 @@ bool ResetGlobalPropertiesRequest::Init() {
bool ResetGlobalPropertiesRequest::PrepareResponseParameters(
mobile_apis::Result::eType& out_result_code,
std::string& out_response_info) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
bool result = false;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_response.cc
index 07aa23d9c9..ef1ba4f77a 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/reset_global_properties_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ResetGlobalPropertiesResponse::ResetGlobalPropertiesResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ ResetGlobalPropertiesResponse::ResetGlobalPropertiesResponse(
ResetGlobalPropertiesResponse::~ResetGlobalPropertiesResponse() {}
void ResetGlobalPropertiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
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 90dbb91b5f..89e77d9d19 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
@@ -46,6 +46,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ScrollableMessageRequest::ScrollableMessageRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -73,12 +75,12 @@ bool ScrollableMessageRequest::Init() {
}
void ScrollableMessageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -92,7 +94,7 @@ void ScrollableMessageRequest::Run() {
application_manager_);
if (mobile_apis::Result::SUCCESS != processing_result) {
- LOG4CXX_ERROR(logger_, "Wrong soft buttons parameters!");
+ SDL_LOG_ERROR("Wrong soft buttons parameters!");
SendResponse(false, processing_result);
return;
}
@@ -125,18 +127,18 @@ void ScrollableMessageRequest::Run() {
}
void ScrollableMessageRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::UI_OnResetTimeout: {
- LOG4CXX_INFO(logger_, "Received UI_OnResetTimeout event");
+ SDL_LOG_INFO("Received UI_OnResetTimeout event");
application_manager_.updateRequestTimeout(
connection_key(), correlation_id(), default_timeout());
break;
}
case hmi_apis::FunctionID::UI_ScrollableMessage: {
- LOG4CXX_INFO(logger_, "Received UI_ScrollableMessage event");
+ SDL_LOG_INFO("Received UI_ScrollableMessage event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
hmi_apis::Common_Result::eType result_code =
@@ -155,7 +157,7 @@ void ScrollableMessageRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
break;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_response.cc
index 6236506c00..a6f980b9ba 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_response.cc
@@ -41,6 +41,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ScrollableMessageResponse::ScrollableMessageResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ ScrollableMessageResponse::ScrollableMessageResponse(
policy_handler) {}
void ScrollableMessageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
mobile_apis::Result::eType result_code =
static_cast<mobile_apis::Result::eType>(
(*message_)[strings::msg_params][strings::result_code].asInt());
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_request.cc
index 6e745fe0db..aa5e1077ca 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_request.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
namespace custom_str = utils::custom_string;
SendHapticDataRequest::SendHapticDataRequest(
@@ -55,14 +57,14 @@ SendHapticDataRequest::SendHapticDataRequest(
SendHapticDataRequest::~SendHapticDataRequest() {}
void SendHapticDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -77,7 +79,7 @@ void SendHapticDataRequest::Run() {
}
void SendHapticDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
const smart_objects::SmartObject& message = event.smart_object();
@@ -97,7 +99,7 @@ void SendHapticDataRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_response.cc
index 79a0516928..57e63dbb7c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_haptic_data_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SendHapticDataResponse::SendHapticDataResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,7 +55,7 @@ SendHapticDataResponse::SendHapticDataResponse(
SendHapticDataResponse::~SendHapticDataResponse() {}
void SendHapticDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_request.cc
index 805c0f0e41..fcc898b348 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_request.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SendLocationRequest::SendLocationRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -57,14 +59,13 @@ SendLocationRequest::~SendLocationRequest() {}
void SendLocationRequest::Run() {
using namespace hmi_apis;
using smart_objects::SmartObject;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_,
- "An application with connection key "
- << connection_key() << " is not registered.");
+ SDL_LOG_ERROR("An application with connection key "
+ << connection_key() << " is not registered.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -98,7 +99,7 @@ void SendLocationRequest::Run() {
}
if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_, "Strings contain invalid characters");
+ SDL_LOG_ERROR("Strings contain invalid characters");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -112,27 +113,24 @@ void SendLocationRequest::Run() {
}
if (!CheckFieldsCompatibility()) {
- LOG4CXX_ERROR(logger_, "CheckFieldsCompatibility failed");
+ SDL_LOG_ERROR("CheckFieldsCompatibility failed");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
if (msg_params.keyExists(strings::location_image)) {
- mobile_apis::Result::eType verification_result =
- mobile_apis::Result::SUCCESS;
- verification_result = MessageHelper::VerifyImage(
+ mobile_apis::Result::eType verification_result = MessageHelper::VerifyImage(
(*message_)[strings::msg_params][strings::location_image],
app,
application_manager_);
if (mobile_apis::Result::INVALID_DATA == verification_result) {
- LOG4CXX_ERROR(logger_, "VerifyImage INVALID_DATA!");
+ SDL_LOG_ERROR("VerifyImage INVALID_DATA!");
SendResponse(false, verification_result);
return;
}
}
- SmartObject request_msg_params = SmartObject(smart_objects::SmartType_Map);
- request_msg_params = msg_params;
+ SmartObject request_msg_params = msg_params;
request_msg_params[strings::app_id] = app->hmi_app_id();
StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
SendHMIRequest(
@@ -140,11 +138,11 @@ void SendLocationRequest::Run() {
}
void SendLocationRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace hmi_apis;
const smart_objects::SmartObject& message = event.smart_object();
if (hmi_apis::FunctionID::Navigation_SendLocation == event.id()) {
- LOG4CXX_INFO(logger_, "Received Navigation_SendLocation event");
+ SDL_LOG_INFO("Received Navigation_SendLocation event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
const Common_Result::eType result_code = static_cast<Common_Result::eType>(
message[strings::params][hmi_response::code].asInt());
@@ -158,7 +156,7 @@ void SendLocationRequest::on_event(const event_engine::Event& event) {
&(message[strings::params]));
return;
}
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
}
bool SendLocationRequest::CheckFieldsCompatibility() {
@@ -172,14 +170,12 @@ bool SendLocationRequest::CheckFieldsCompatibility() {
const bool address_exist = msg_params.keyExists(strings::address);
if (latitude_degrees_exist ^ longitude_degrees_exist) {
- LOG4CXX_DEBUG(logger_,
- "latitude and longitude should be provided only in pair");
+ SDL_LOG_DEBUG("latitude and longitude should be provided only in pair");
return false;
}
if (!address_exist && !longitude_degrees_exist && !latitude_degrees_exist) {
- LOG4CXX_DEBUG(logger_,
- "address or latitude/longtitude should should be provided");
+ SDL_LOG_DEBUG("address or latitude/longtitude should should be provided");
return false;
}
return true;
@@ -194,7 +190,7 @@ void insert_if_contains(
}
bool SendLocationRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<utils::custom_string::CustomString> fields_to_check;
const smart_objects::SmartObject& msg_params =
(*message_)[strings::msg_params];
@@ -232,8 +228,7 @@ bool SendLocationRequest::IsWhiteSpaceExist() {
for (; it != fields_to_check.end(); ++it) {
const std::string& str = it->AsMBString();
if (!CheckSyntax(str, false)) {
- LOG4CXX_ERROR(logger_,
- "string '" << str << "'' contains invalid characters");
+ SDL_LOG_ERROR("string '" << str << "'' contains invalid characters");
return true;
}
}
@@ -250,7 +245,7 @@ bool SendLocationRequest::CheckHMICapabilities(
const HMICapabilities& hmi_capabilities = hmi_capabilities_;
if (!hmi_capabilities.is_ui_cooperating()) {
- LOG4CXX_ERROR(logger_, "UI is not supported.");
+ SDL_LOG_ERROR("UI is not supported.");
return false;
}
@@ -273,7 +268,7 @@ bool SendLocationRequest::CheckHMICapabilities(
}
if (!fields_names.empty()) {
- LOG4CXX_ERROR(logger_, "Some fields are not supported by capabilities");
+ SDL_LOG_ERROR("Some fields are not supported by capabilities");
return false;
}
return true;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_response.cc
index 934008b816..fcf1a0f406 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/send_location_response.cc
@@ -41,6 +41,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SendLocationResponse::SendLocationResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ SendLocationResponse::SendLocationResponse(
SendLocationResponse::~SendLocationResponse() {}
void SendLocationResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc
index acf312d532..9f30478111 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_request.cc
@@ -46,6 +46,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SetAppIconRequest::SetAppIconRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -60,6 +62,14 @@ SetAppIconRequest::SetAppIconRequest(
, is_icons_saving_enabled_(false) {
const std::string path =
application_manager_.get_settings().app_icons_folder();
+
+ if (!file_system::DirectoryExists(path)) {
+ SDL_LOG_WARN("App icons folder doesn't exist.");
+ if (!file_system::CreateDirectoryRecursively(path)) {
+ SDL_LOG_ERROR("Unable to create app icons directory: " << path);
+ }
+ }
+
is_icons_saving_enabled_ = file_system::IsWritingAllowed(path) &&
file_system::IsReadingAllowed(path);
}
@@ -67,12 +77,12 @@ SetAppIconRequest::SetAppIconRequest(
SetAppIconRequest::~SetAppIconRequest() {}
void SetAppIconRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -82,7 +92,7 @@ void SetAppIconRequest::Run() {
if (!file_system::IsFileNameValid(sync_file_name)) {
const std::string err_msg = "Sync file name contains forbidden symbols.";
- LOG4CXX_ERROR(logger_, err_msg);
+ SDL_LOG_ERROR(err_msg);
SendResponse(false, mobile_apis::Result::INVALID_DATA, err_msg.c_str());
return;
}
@@ -94,7 +104,7 @@ void SetAppIconRequest::Run() {
full_file_path += sync_file_name;
if (!file_system::FileExists(full_file_path)) {
- LOG4CXX_ERROR(logger_, "No such file " << full_file_path);
+ SDL_LOG_ERROR("No such file " << full_file_path);
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -121,19 +131,18 @@ void SetAppIconRequest::Run() {
void SetAppIconRequest::CopyToIconStorage(
const std::string& policy_app_id, const std::string& path_to_file) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!(application_manager_.protocol_handler()
.get_settings()
.max_supported_protocol_version() >=
protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_4)) {
- LOG4CXX_WARN(logger_,
- "Icon copying skipped, since protocol ver. 4 is not enabled.");
+ SDL_LOG_WARN("Icon copying skipped, since protocol ver. 4 is not enabled.");
return;
}
std::vector<uint8_t> file_content;
if (!file_system::ReadBinaryFile(path_to_file, file_content)) {
- LOG4CXX_ERROR(logger_, "Can't read icon file: " << path_to_file);
+ SDL_LOG_ERROR("Can't read icon file: " << path_to_file);
return;
}
@@ -144,13 +153,12 @@ void SetAppIconRequest::CopyToIconStorage(
const uint64_t file_size = file_system::FileSize(path_to_file);
if (0 == file_size) {
- LOG4CXX_ERROR(logger_, "Can't get the icon file size: " << path_to_file);
+ SDL_LOG_ERROR("Can't get the icon file size: " << path_to_file);
return;
}
if (storage_max_size < file_size) {
- LOG4CXX_ERROR(logger_,
- "Icon size (" << file_size
+ SDL_LOG_ERROR("Icon size (" << file_size
<< ") is bigger, than "
" icons storage maximum size ("
<< storage_max_size
@@ -162,19 +170,14 @@ void SetAppIconRequest::CopyToIconStorage(
const uint64_t storage_size =
static_cast<uint64_t>(file_system::DirectorySize(icon_storage));
- if (0 == storage_size) {
- LOG4CXX_ERROR(logger_, "Can't get the folder size: " << icon_storage);
- return;
- }
-
if (storage_max_size < (file_size + storage_size)) {
const uint32_t icons_amount =
application_manager_.get_settings().app_icons_amount_to_remove();
if (!icons_amount) {
- LOG4CXX_DEBUG(logger_,
- "No icons will be deleted, since amount icons to remove "
- "is zero. Icon saving skipped.");
+ SDL_LOG_DEBUG(
+ "No icons will be deleted, since amount icons to remove "
+ "is zero. Icon saving skipped.");
return;
}
@@ -186,17 +189,16 @@ void SetAppIconRequest::CopyToIconStorage(
const std::string icon_path = icon_storage + "/" + policy_app_id;
if (!file_system::CreateFile(icon_path)) {
- LOG4CXX_ERROR(logger_, "Can't create icon: " << icon_path);
+ SDL_LOG_ERROR("Can't create icon: " << icon_path);
return;
}
if (!file_system::WriteBinaryFile(icon_path, file_content)) {
- LOG4CXX_ERROR(logger_, "Can't write icon: " << icon_path);
+ SDL_LOG_ERROR("Can't write icon: " << icon_path);
return;
}
- LOG4CXX_DEBUG(logger_,
- "Icon was successfully copied from :" << path_to_file << " to "
+ SDL_LOG_DEBUG("Icon was successfully copied from :" << path_to_file << " to "
<< icon_path);
return;
@@ -224,17 +226,16 @@ void SetAppIconRequest::RemoveOldestIcons(const std::string& storage,
for (size_t counter = 0; counter < icons_amount; ++counter) {
if (!icon_modification_time.size()) {
- LOG4CXX_ERROR(logger_, "No more icons left for deletion.");
+ SDL_LOG_ERROR("No more icons left for deletion.");
return;
}
const std::string file_name = icon_modification_time.begin()->second;
const std::string file_path = storage + "/" + file_name;
if (!file_system::DeleteFile(file_path)) {
- LOG4CXX_DEBUG(logger_, "Error while deleting icon " << file_path);
+ SDL_LOG_DEBUG("Error while deleting icon " << file_path);
}
icon_modification_time.erase(icon_modification_time.begin());
- LOG4CXX_DEBUG(logger_,
- "Old icon " << file_path << " was deleted successfully.");
+ SDL_LOG_DEBUG("Old icon " << file_path << " was deleted successfully.");
}
}
@@ -249,7 +250,7 @@ bool SetAppIconRequest::IsEnoughSpaceForIcon(const uint64_t icon_size) const {
}
void SetAppIconRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -267,8 +268,7 @@ void SetAppIconRequest::on_event(const event_engine::Event& event) {
application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Can't get application for connection key: " << connection_key());
return;
}
@@ -280,8 +280,7 @@ void SetAppIconRequest::on_event(const event_engine::Event& event) {
app->set_app_icon_path(full_file_path_for_hmi_);
- LOG4CXX_INFO(logger_,
- "Icon path was set to '" << app->app_icon_path() << "'");
+ SDL_LOG_INFO("Icon path was set to '" << app->app_icon_path() << "'");
}
SendResponse(result,
@@ -291,7 +290,7 @@ void SetAppIconRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_response.cc
index 55255920d0..350d120f10 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_app_icon_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SetAppIconResponse::SetAppIconResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ SetAppIconResponse::SetAppIconResponse(
SetAppIconResponse::~SetAppIconResponse() {}
void SetAppIconResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_request.cc
index 680429d3b6..45ff0078fb 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_request.cc
@@ -7,6 +7,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SetCloudAppPropertiesRequest::SetCloudAppPropertiesRequest(
const app_mngr::commands::MessageSharedPtr& message,
app_mngr::ApplicationManager& application_manager,
@@ -22,11 +24,11 @@ SetCloudAppPropertiesRequest::SetCloudAppPropertiesRequest(
SetCloudAppPropertiesRequest::~SetCloudAppPropertiesRequest() {}
void SetCloudAppPropertiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -58,7 +60,7 @@ void SetCloudAppPropertiesRequest::Run() {
void SetCloudAppPropertiesRequest::on_event(
const app_mngr::event_engine::Event& event) {
- LOG4CXX_INFO(logger_, "SetCloudAppPropertiesRequest on_event");
+ SDL_LOG_INFO("SetCloudAppPropertiesRequest on_event");
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_response.cc
index 39d2ea7f90..1529788544 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloud_app_properties_response.cc
@@ -7,6 +7,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SetCloudAppPropertiesResponse::SetCloudAppPropertiesResponse(
const app_mngr::commands::MessageSharedPtr& message,
app_mngr::ApplicationManager& application_manager,
@@ -22,7 +24,7 @@ SetCloudAppPropertiesResponse::SetCloudAppPropertiesResponse(
SetCloudAppPropertiesResponse::~SetCloudAppPropertiesResponse() {}
void SetCloudAppPropertiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_request.cc
index 0cd9f6635c..b2ca3e6cfa 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_request.cc
@@ -41,6 +41,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SetDisplayLayoutRequest::SetDisplayLayoutRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,11 +58,11 @@ SetDisplayLayoutRequest::SetDisplayLayoutRequest(
SetDisplayLayoutRequest::~SetDisplayLayoutRequest() {}
void SetDisplayLayoutRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -77,11 +79,10 @@ void SetDisplayLayoutRequest::Run() {
if (new_layout != old_layout && !new_layout.empty()) {
// Template switched, hence allow any color change
- LOG4CXX_DEBUG(logger_,
- "SetDisplayLayoutRequest New Layout: " << new_layout);
+ SDL_LOG_DEBUG("SetDisplayLayoutRequest New Layout: " << new_layout);
app->set_display_layout(new_layout);
} else {
- LOG4CXX_DEBUG(logger_, "SetDisplayLayoutRequest No Layout Change");
+ SDL_LOG_DEBUG("SetDisplayLayoutRequest No Layout Change");
// Template layout is the same as previous layout
// Reject message if colors are set
if (msg_params.keyExists(strings::day_color_scheme) &&
@@ -89,7 +90,7 @@ void SetDisplayLayoutRequest::Run() {
msg_params[strings::day_color_scheme] != app->day_color_scheme()) {
// Color scheme param exists and has been previously set,
// hence do not allow color change
- LOG4CXX_DEBUG(logger_, "Reject Day Color Scheme Change");
+ SDL_LOG_DEBUG("Reject Day Color Scheme Change");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
@@ -99,19 +100,19 @@ void SetDisplayLayoutRequest::Run() {
msg_params[strings::night_color_scheme] != app->night_color_scheme()) {
// Color scheme param exists and has been previously set,
// hence do not allow color change
- LOG4CXX_DEBUG(logger_, "Reject Night Color Scheme Change");
+ SDL_LOG_DEBUG("Reject Night Color Scheme Change");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
}
if (msg_params.keyExists(strings::day_color_scheme)) {
- LOG4CXX_DEBUG(logger_, "Allow Day Color Scheme Change");
+ SDL_LOG_DEBUG("Allow Day Color Scheme Change");
app->set_day_color_scheme(msg_params[strings::day_color_scheme]);
}
if (msg_params.keyExists(strings::night_color_scheme)) {
- LOG4CXX_DEBUG(logger_, "Allow Night Color Scheme Change");
+ SDL_LOG_DEBUG("Allow Night Color Scheme Change");
app->set_night_color_scheme(msg_params[strings::night_color_scheme]);
}
@@ -123,12 +124,12 @@ void SetDisplayLayoutRequest::Run() {
}
void SetDisplayLayoutRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -136,7 +137,7 @@ void SetDisplayLayoutRequest::on_event(const event_engine::Event& event) {
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::UI_SetDisplayLayout: {
- LOG4CXX_INFO(logger_, "Received UI_SetDisplayLayout event");
+ SDL_LOG_INFO("Received UI_SetDisplayLayout event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
hmi_apis::Common_Result::eType result_code =
static_cast<hmi_apis::Common_Result::eType>(
@@ -182,7 +183,7 @@ void SetDisplayLayoutRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_response.cc
index 0999b596b5..8a5367ecd4 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_display_layout_response.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SetDisplayLayoutResponse::SetDisplayLayoutResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ SetDisplayLayoutResponse::SetDisplayLayoutResponse(
SetDisplayLayoutResponse::~SetDisplayLayoutResponse() {}
void SetDisplayLayoutResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_request.cc
index a567d1b32f..396763ff98 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_request.cc
@@ -34,6 +34,7 @@
#include <string.h>
#include <algorithm>
#include <numeric>
+#include "application_manager/resumption/resume_ctrl.h"
#include "application_manager/message_helper.h"
#include "interfaces/HMI_API.h"
@@ -46,6 +47,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
namespace {
bool IsResultCodeWarning(const app_mngr::commands::ResponseInfo& first,
const app_mngr::commands::ResponseInfo& second,
@@ -88,16 +91,15 @@ SetGlobalPropertiesRequest::SetGlobalPropertiesRequest(
SetGlobalPropertiesRequest::~SetGlobalPropertiesRequest() {}
void SetGlobalPropertiesRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(
- logger_,
- "No application associated with connection key " << connection_key());
+ SDL_LOG_ERROR("No application associated with connection key "
+ << connection_key());
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -109,14 +111,12 @@ void SetGlobalPropertiesRequest::Run() {
return;
}
- mobile_apis::Result::eType verification_result = mobile_apis::Result::SUCCESS;
-
if (msg_params.keyExists(strings::menu_icon)) {
- verification_result = MessageHelper::VerifyImage(
+ mobile_apis::Result::eType verification_result = MessageHelper::VerifyImage(
msg_params[strings::menu_icon], app, application_manager_);
if (mobile_apis::Result::INVALID_DATA == verification_result) {
- LOG4CXX_ERROR(
- logger_, "MessageHelper::VerifyImage return " << verification_result);
+ SDL_LOG_ERROR("MessageHelper::VerifyImage return "
+ << verification_result);
SendResponse(false, verification_result);
return;
}
@@ -126,7 +126,7 @@ void SetGlobalPropertiesRequest::Run() {
if (mobile_apis::Result::INVALID_DATA ==
MessageHelper::VerifyImageVrHelpItems(
msg_params[strings::vr_help], app, application_manager_)) {
- LOG4CXX_ERROR(logger_, "MessageHelper::VerifyImage return INVALID_DATA!");
+ SDL_LOG_ERROR("MessageHelper::VerifyImage return INVALID_DATA!");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -137,7 +137,7 @@ void SetGlobalPropertiesRequest::Run() {
strings::auto_complete_list) &&
msg_params[strings::keyboard_properties].keyExists(
strings::auto_complete_text)) {
- LOG4CXX_ERROR(logger_, "Replacing deprecated autoCompleteText property");
+ SDL_LOG_ERROR("Replacing deprecated autoCompleteText property");
msg_params[strings::keyboard_properties][strings::auto_complete_list][0] =
msg_params[strings::keyboard_properties][strings::auto_complete_text]
.asString();
@@ -146,7 +146,7 @@ void SetGlobalPropertiesRequest::Run() {
}
if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_, "White spaces found");
+ SDL_LOG_ERROR("White spaces found");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -162,8 +162,7 @@ void SetGlobalPropertiesRequest::Run() {
// check VR params
if (is_vr_help_title_present ^ is_vr_help_present) {
- LOG4CXX_ERROR(logger_,
- "Reject because of vr_help or vr_help_title only provided");
+ SDL_LOG_ERROR("Reject because of vr_help or vr_help_title only provided");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
@@ -187,12 +186,11 @@ void SetGlobalPropertiesRequest::Run() {
is_tts_send_ = true;
}
if (is_vr_help_title_present && is_vr_help_present) {
- LOG4CXX_DEBUG(logger_, "VRHelp params presents");
+ SDL_LOG_DEBUG("VRHelp params presents");
if (!CheckVrHelpItemsOrder(msg_params[strings::vr_help])) {
- LOG4CXX_ERROR(logger_,
- "VR Help Items contains nonsequential positions"
- << " (e.g. [1,2,4]) or not started from 1");
+ SDL_LOG_ERROR("VR Help Items contains nonsequential positions"
+ << " (e.g. [1,2,4]) or not started from 1");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
@@ -206,14 +204,14 @@ void SetGlobalPropertiesRequest::Run() {
auto& help_prompt_manager = app->help_prompt_manager();
help_prompt_manager.OnSetGlobalPropertiesReceived(params, false);
} else {
- LOG4CXX_DEBUG(logger_, "VRHelp params does not present");
+ SDL_LOG_DEBUG("VRHelp params does not present");
DCHECK_OR_RETURN_VOID(!is_vr_help_title_present && !is_vr_help_present);
PrepareUIRequestMenuAndKeyboardData(app, msg_params, params);
// Preparing data
if (params.empty()) {
- LOG4CXX_DEBUG(logger_, "No UI info provided");
+ SDL_LOG_DEBUG("No UI info provided");
} else {
params[strings::app_id] = app->app_id();
SendUIRequest(params, true);
@@ -229,7 +227,7 @@ void SetGlobalPropertiesRequest::Run() {
false, mobile_apis::Result::INVALID_DATA, "UserLocation is empty");
return;
}
- LOG4CXX_DEBUG(logger_, "Userlocation params presents");
+ SDL_LOG_DEBUG("Userlocation params presents");
const auto& user_location = msg_params[strings::user_location];
app->set_user_location(user_location);
@@ -241,29 +239,28 @@ void SetGlobalPropertiesRequest::Run() {
application_manager_.GetPluginManager().ForEachPlugin(
on_global_properties_updated);
- smart_objects::SmartObject params =
+ smart_objects::SmartObject rc_request_params =
smart_objects::SmartObject(smart_objects::SmartType_Map);
- params[strings::app_id] = app->app_id();
- params[strings::user_location] = user_location;
- SendRCRequest(params, true);
+ rc_request_params[strings::app_id] = app->app_id();
+ rc_request_params[strings::user_location] = user_location;
+ SendRCRequest(rc_request_params, true);
}
// check TTS params
if (is_help_prompt_present || is_timeout_prompt_present) {
- LOG4CXX_DEBUG(logger_, "TTS params presents");
+ SDL_LOG_DEBUG("TTS params presents");
auto tts_params = smart_objects::SmartObject(smart_objects::SmartType_Map);
std::vector<std::string> invalid_params;
if (is_help_prompt_present) {
smart_objects::SmartObject& help_prompt =
(*message_)[strings::msg_params][strings::help_prompt];
- verification_result =
+ mobile_apis::Result::eType verification_result =
MessageHelper::VerifyTtsFiles(help_prompt, app, application_manager_);
if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
- LOG4CXX_ERROR(
- logger_,
- "MessageHelper::VerifyTtsFiles return " << verification_result);
+ SDL_LOG_ERROR("MessageHelper::VerifyTtsFiles return "
+ << verification_result);
invalid_params.push_back("help_prompt");
} else {
app->set_help_prompt(help_prompt);
@@ -274,13 +271,13 @@ void SetGlobalPropertiesRequest::Run() {
if (is_timeout_prompt_present) {
smart_objects::SmartObject& timeout_prompt =
(*message_)[strings::msg_params][strings::timeout_prompt];
- verification_result = MessageHelper::VerifyTtsFiles(
- timeout_prompt, app, application_manager_);
+ mobile_apis::Result::eType verification_result =
+ MessageHelper::VerifyTtsFiles(
+ timeout_prompt, app, application_manager_);
if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
- LOG4CXX_ERROR(
- logger_,
- "MessageHelper::VerifyTtsFiles return " << verification_result);
+ SDL_LOG_ERROR("MessageHelper::VerifyTtsFiles return "
+ << verification_result);
invalid_params.push_back("timeout_prompt");
} else {
app->set_timeout_prompt(timeout_prompt);
@@ -293,7 +290,7 @@ void SetGlobalPropertiesRequest::Run() {
std::begin(invalid_params),
std::end(invalid_params),
std::string(""),
- [](std::string& first, std::string& second) {
+ [](std::string& first, const std::string& second) {
return first.empty() ? second : first + ", " + second;
});
const std::string info =
@@ -319,7 +316,7 @@ void SetGlobalPropertiesRequest::Run() {
bool SetGlobalPropertiesRequest::CheckVrHelpItemsOrder(
const smart_objects::SmartObject& vr_help) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN(vr_help.getType() == smart_objects::SmartType_Array, false);
const size_t vr_help_length = vr_help.length();
DCHECK_OR_RETURN(vr_help_length > 0, false);
@@ -329,9 +326,8 @@ bool SetGlobalPropertiesRequest::CheckVrHelpItemsOrder(
vr_help.getElement(j).getElement(strings::position).asUInt();
// Elements shall start from 1 and increment one by one
if (position != (j + 1)) {
- LOG4CXX_ERROR(logger_,
- "VR help items order is wrong"
- << " at " << j << ", position value:" << position);
+ SDL_LOG_ERROR("VR help items order is wrong"
+ << " at " << j << ", position value:" << position);
return false;
}
}
@@ -339,7 +335,7 @@ bool SetGlobalPropertiesRequest::CheckVrHelpItemsOrder(
}
void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
const smart_objects::SmartObject& message = event.smart_object();
@@ -348,7 +344,7 @@ void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
switch (event.id()) {
case hmi_apis::FunctionID::UI_SetGlobalProperties: {
- LOG4CXX_DEBUG(logger_, "Received UI_SetGlobalProperties event");
+ SDL_LOG_DEBUG("Received UI_SetGlobalProperties event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
is_ui_received_ = true;
ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
@@ -361,7 +357,7 @@ void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
break;
}
case hmi_apis::FunctionID::TTS_SetGlobalProperties: {
- LOG4CXX_DEBUG(logger_, "Received TTS_SetGlobalProperties event");
+ SDL_LOG_DEBUG("Received TTS_SetGlobalProperties event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
is_tts_received_ = true;
tts_result_ = static_cast<hmi_apis::Common_Result::eType>(
@@ -374,7 +370,7 @@ void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
break;
}
case hmi_apis::FunctionID::RC_SetGlobalProperties: {
- LOG4CXX_DEBUG(logger_, "Received RC_SetGlobalProperties event");
+ SDL_LOG_DEBUG("Received RC_SetGlobalProperties event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_RC);
is_rc_received_ = true;
rc_result_ = static_cast<hmi_apis::Common_Result::eType>(
@@ -383,13 +379,13 @@ void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
if (IsPendingResponseExist()) {
- LOG4CXX_DEBUG(logger_, "Continue waiting for response");
+ SDL_LOG_DEBUG("Continue waiting for response");
return;
}
mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
@@ -418,9 +414,21 @@ bool SetGlobalPropertiesRequest::Init() {
return true;
}
+void SetGlobalPropertiesRequest::onTimeOut() {
+ SDL_LOG_AUTO_TRACE();
+
+ CommandRequestImpl::onTimeOut();
+
+ auto& resume_ctrl = application_manager_.resume_controller();
+
+ resume_ctrl.HandleOnTimeOut(
+ correlation_id(),
+ static_cast<hmi_apis::FunctionID::eType>(function_id()));
+}
+
bool SetGlobalPropertiesRequest::PrepareResponseParameters(
mobile_apis::Result::eType& result_code, std::string& info) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
app_mngr::commands::ResponseInfo ui_properties_info(
@@ -475,7 +483,7 @@ bool SetGlobalPropertiesRequest::PrepareResultForMobileResponse(
const app_mngr::commands::ResponseInfo& first,
const app_mngr::commands::ResponseInfo& second,
const app_mngr::commands::ResponseInfo& third) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
app_mngr::commands::ResponseInfo both_info;
std::vector<hmi_apis::Common_Result::eType> success_result_codes{
@@ -508,8 +516,7 @@ SetGlobalPropertiesRequest::PrepareResultCodeForResponse(
const app_mngr::commands::ResponseInfo& first,
const app_mngr::commands::ResponseInfo& second,
const app_mngr::commands::ResponseInfo& third) {
- LOG4CXX_AUTO_TRACE(logger_);
- mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
+ SDL_LOG_AUTO_TRACE();
if (IsResultCodeUnsupported(first, second, third) ||
IsResultCodeUnsupported(second, third, first) ||
IsResultCodeUnsupported(third, first, second)) {
@@ -538,7 +545,7 @@ SetGlobalPropertiesRequest::PrepareResultCodeForResponse(
hmi_apis::Common_Result::eType intermediate_result =
std::max(first_result, second_result);
- result_code = MessageHelper::HMIToMobileResult(
+ mobile_apis::Result::eType result_code = MessageHelper::HMIToMobileResult(
std::max(intermediate_result, third_result));
return result_code;
@@ -599,7 +606,7 @@ void SetGlobalPropertiesRequest::PrepareUIRequestVRHelpData(
const ApplicationSharedPtr app,
const smart_objects::SmartObject& msg_params,
smart_objects::SmartObject& out_params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
app->set_vr_help_title(msg_params.getElement(strings::vr_help_title));
@@ -613,7 +620,7 @@ void SetGlobalPropertiesRequest::PrepareUIRequestMenuAndKeyboardData(
const ApplicationSharedPtr app,
const smart_objects::SmartObject& msg_params,
smart_objects::SmartObject& out_params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
const bool is_menu_title_present =
@@ -641,7 +648,7 @@ void SetGlobalPropertiesRequest::PrepareUIRequestMenuAndKeyboardData(
void SetGlobalPropertiesRequest::SendTTSRequest(
const smart_objects::SmartObject& params, bool use_events) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
is_tts_send_ = true;
StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
SendHMIRequest(
@@ -650,7 +657,7 @@ void SetGlobalPropertiesRequest::SendTTSRequest(
void SetGlobalPropertiesRequest::SendUIRequest(
const smart_objects::SmartObject& params, bool use_events) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
is_ui_send_ = true;
StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
SendHMIRequest(
@@ -660,7 +667,7 @@ void SetGlobalPropertiesRequest::SendUIRequest(
void SetGlobalPropertiesRequest::SendRCRequest(
const ns_smart_device_link::ns_smart_objects::SmartObject& params,
bool use_events) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
is_rc_send_ = true;
StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_RC);
SendHMIRequest(
@@ -674,7 +681,7 @@ bool SetGlobalPropertiesRequest::IsPendingResponseExist() {
bool SetGlobalPropertiesRequest::ValidateConditionalMandatoryParameters(
const smart_objects::SmartObject& params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return params.keyExists(strings::help_prompt) ||
params.keyExists(strings::timeout_prompt) ||
params.keyExists(strings::vr_help_title) ||
@@ -687,7 +694,7 @@ bool SetGlobalPropertiesRequest::ValidateConditionalMandatoryParameters(
}
bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const char* str;
const smart_objects::SmartObject& msg_params =
@@ -703,7 +710,7 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
for (; it_hp != it_hp_end; ++it_hp) {
str = (*it_hp)[strings::text].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid help_prompt syntax check failed");
+ SDL_LOG_ERROR("Invalid help_prompt syntax check failed");
return true;
}
}
@@ -719,7 +726,7 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
for (; it_tp != it_tp_end; ++it_tp) {
str = (*it_tp)[strings::text].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid timeout_prompt syntax check failed");
+ SDL_LOG_ERROR("Invalid timeout_prompt syntax check failed");
return true;
}
}
@@ -735,15 +742,14 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
for (; it_vh != it_vh_end; ++it_vh) {
str = (*it_vh)[strings::text].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid vr_help text syntax check failed");
+ SDL_LOG_ERROR("Invalid vr_help text syntax check failed");
return true;
}
if ((*it_vh).keyExists(strings::image)) {
str = (*it_vh)[strings::image][strings::value].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid vr_help image value syntax check failed");
+ SDL_LOG_ERROR("Invalid vr_help image value syntax check failed");
return true;
}
} // if image exists
@@ -753,7 +759,7 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
if (msg_params.keyExists(strings::menu_icon)) {
str = msg_params[strings::menu_icon][strings::value].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid menu_icon value syntax check failed");
+ SDL_LOG_ERROR("Invalid menu_icon value syntax check failed");
return true;
}
}
@@ -761,7 +767,7 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
if (msg_params.keyExists(strings::vr_help_title)) {
str = msg_params[strings::vr_help_title].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid vr_help_title value syntax check failed");
+ SDL_LOG_ERROR("Invalid vr_help_title value syntax check failed");
return true;
}
}
@@ -769,7 +775,7 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
if (msg_params.keyExists(strings::menu_title)) {
str = msg_params[strings::menu_title].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid menu_title value syntax check failed");
+ SDL_LOG_ERROR("Invalid menu_title value syntax check failed");
return true;
}
}
@@ -788,9 +794,9 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
for (; it_lcl != it_lcl_end; ++it_lcl) {
str = (*it_lcl).asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid keyboard_properties "
- "limited_character_list syntax check failed");
+ SDL_LOG_ERROR(
+ "Invalid keyboard_properties "
+ "limited_character_list syntax check failed");
return true;
}
}
@@ -807,9 +813,9 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
for (; it != acl_array->end(); ++it) {
str = it->asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid keyboard_properties "
- "auto_complete_list syntax check failed");
+ SDL_LOG_ERROR(
+ "Invalid keyboard_properties "
+ "auto_complete_list syntax check failed");
return true;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_response.cc
index 1de2b97d3a..03c649a02d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_global_properties_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SetGlobalPropertiesResponse::SetGlobalPropertiesResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ SetGlobalPropertiesResponse::SetGlobalPropertiesResponse(
SetGlobalPropertiesResponse::~SetGlobalPropertiesResponse() {}
void SetGlobalPropertiesResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_request.cc
index d610090aa4..cf5d80ecc0 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_request.cc
@@ -43,6 +43,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SetMediaClockRequest::SetMediaClockRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -58,27 +60,25 @@ SetMediaClockRequest::SetMediaClockRequest(
SetMediaClockRequest::~SetMediaClockRequest() {}
void SetMediaClockRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
return;
}
if (!app->is_media_application()) {
- LOG4CXX_ERROR(logger_, "Application is not media application");
+ SDL_LOG_ERROR("Application is not media application");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
if (isDataValid()) {
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
// copy entirely msg
- msg_params = (*message_)[strings::msg_params];
+ smart_objects::SmartObject msg_params = (*message_)[strings::msg_params];
msg_params[strings::app_id] = app->app_id();
StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
@@ -90,7 +90,7 @@ void SetMediaClockRequest::Run() {
}
void SetMediaClockRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -111,7 +111,7 @@ void SetMediaClockRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
@@ -126,7 +126,7 @@ bool SetMediaClockRequest::isDataValid() {
if (update_mode == mobile_apis::UpdateMode::COUNTUP ||
update_mode == mobile_apis::UpdateMode::COUNTDOWN) {
if (!msg_params.keyExists(strings::start_time)) {
- LOG4CXX_INFO(logger_, "Invalid data");
+ SDL_LOG_INFO("Invalid data");
return false;
}
@@ -151,13 +151,13 @@ bool SetMediaClockRequest::isDataValid() {
(update_mode == mobile_apis::UpdateMode::COUNTDOWN)) ||
((end_time_in_seconds < start_time_in_seconds) &&
(update_mode == mobile_apis::UpdateMode::COUNTUP))) {
- LOG4CXX_INFO(logger_, "Invalid data");
+ SDL_LOG_INFO("Invalid data");
return false;
}
}
}
- LOG4CXX_INFO(logger_, "Data is valid");
+ SDL_LOG_INFO("Data is valid");
return true;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_response.cc
index 948ff84156..0208741795 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_media_clock_timer_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SetMediaClockTimerResponse::SetMediaClockTimerResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ SetMediaClockTimerResponse::SetMediaClockTimerResponse(
SetMediaClockTimerResponse::~SetMediaClockTimerResponse() {}
void SetMediaClockTimerResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc
index 36278168dc..fdcf9d2434 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc
@@ -39,6 +39,7 @@ namespace sdl_rpc_plugin {
namespace app_mngr = application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
ShowAppMenuRequest::ShowAppMenuRequest(
const app_mngr::commands::MessageSharedPtr& message,
@@ -56,14 +57,13 @@ ShowAppMenuRequest::~ShowAppMenuRequest() {}
void ShowAppMenuRequest::Run() {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(
- logger_,
- "Application with id " << connection_key() << " is not registered.");
+ SDL_LOG_ERROR("Application with id " << connection_key()
+ << " is not registered.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -76,9 +76,8 @@ void ShowAppMenuRequest::Run() {
app->system_context(mobile_apis::PredefinedWindows::DEFAULT_WINDOW),
mobile_apis::SystemContext::SYSCTXT_MAIN,
mobile_apis::SystemContext::SYSCTXT_MENU)) {
- LOG4CXX_ERROR(
- logger_,
- "Application with id " << connection_key() << " is not activated.");
+ SDL_LOG_ERROR("Application with id " << connection_key()
+ << " is not activated.");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
@@ -89,8 +88,11 @@ void ShowAppMenuRequest::Run() {
const auto& received_msg_params = (*message_)[strings::msg_params];
if (received_msg_params.keyExists(strings::menu_id)) {
const int32_t menu_id = received_msg_params[strings::menu_id].asInt();
- if (!app->FindSubMenu(menu_id)) {
- LOG4CXX_ERROR(logger_, "Menu with id " << menu_id << " is not found.");
+
+ const auto sub_menu = app->FindSubMenu(menu_id);
+
+ if (smart_objects::SmartType_Null == sub_menu.getType()) {
+ SDL_LOG_ERROR("Menu with id " << menu_id << " is not found.");
SendResponse(false, mobile_apis::Result::INVALID_ID);
return;
}
@@ -103,7 +105,7 @@ void ShowAppMenuRequest::Run() {
void ShowAppMenuRequest::on_event(const app_mngr::event_engine::Event& event) {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -120,8 +122,7 @@ void ShowAppMenuRequest::on_event(const app_mngr::event_engine::Event& event) {
application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_,
- "Application with id " << connection_key()
+ SDL_LOG_ERROR("Application with id " << connection_key()
<< " is not registered.");
return;
}
@@ -133,7 +134,7 @@ void ShowAppMenuRequest::on_event(const app_mngr::event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event: " << event.id());
+ SDL_LOG_ERROR("Received unknown event: " << event.id());
return;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_response.cc
index 2b952ea9ac..e93e7b3d4e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_response.cc
@@ -39,6 +39,8 @@ namespace app_mngr = application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ShowAppMenuResponse::ShowAppMenuResponse(
const app_mngr::commands::MessageSharedPtr& message,
app_mngr::ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ ShowAppMenuResponse::ShowAppMenuResponse(
ShowAppMenuResponse::~ShowAppMenuResponse() {}
void ShowAppMenuResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_request.cc
index b439c1cb16..cfb9d5896e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_request.cc
@@ -46,6 +46,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ShowConstantTBTRequest::ShowConstantTBTRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -61,30 +63,27 @@ ShowConstantTBTRequest::ShowConstantTBTRequest(
ShowConstantTBTRequest::~ShowConstantTBTRequest() {}
void ShowConstantTBTRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(
(*message_)[strings::params][strings::connection_key].asUInt());
if (!app) {
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
return;
}
// SDLAQ-CRS-664, VC3.1
if ((*message_)[strings::msg_params].empty()) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA!");
+ SDL_LOG_ERROR("INVALID_DATA!");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params = (*message_)[strings::msg_params];
+ smart_objects::SmartObject msg_params = (*message_)[strings::msg_params];
if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_,
- "Incoming show constant TBT has contains \t\n \\t \\n");
+ SDL_LOG_ERROR("Incoming show constant TBT has contains \t\n \\t \\n");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -96,7 +95,7 @@ void ShowConstantTBTRequest::Run() {
msg_params, app, policy_handler_, application_manager_);
if (mobile_apis::Result::SUCCESS != processing_result) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA!");
+ SDL_LOG_ERROR("INVALID_DATA!");
SendResponse(false, processing_result);
return;
}
@@ -106,7 +105,7 @@ void ShowConstantTBTRequest::Run() {
verification_result = MessageHelper::VerifyImage(
msg_params[strings::turn_icon], app, application_manager_);
if (mobile_apis::Result::INVALID_DATA == verification_result) {
- LOG4CXX_ERROR(logger_, "VerifyImage INVALID_DATA!");
+ SDL_LOG_ERROR("VerifyImage INVALID_DATA!");
SendResponse(false, verification_result);
return;
}
@@ -116,7 +115,7 @@ void ShowConstantTBTRequest::Run() {
verification_result = MessageHelper::VerifyImage(
msg_params[strings::next_turn_icon], app, application_manager_);
if (mobile_apis::Result::INVALID_DATA == verification_result) {
- LOG4CXX_ERROR(logger_, "VerifyImage INVALID_DATA!");
+ SDL_LOG_ERROR("VerifyImage INVALID_DATA!");
SendResponse(false, verification_result);
return;
}
@@ -185,13 +184,13 @@ void ShowConstantTBTRequest::Run() {
}
void ShowConstantTBTRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace hmi_apis;
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::Navigation_ShowConstantTBT: {
- LOG4CXX_INFO(logger_, "Received Navigation_ShowConstantTBT event");
+ SDL_LOG_INFO("Received Navigation_ShowConstantTBT event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
const Common_Result::eType result_code =
static_cast<Common_Result::eType>(
@@ -207,21 +206,21 @@ void ShowConstantTBTRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
break;
}
}
}
bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const char* str = NULL;
if ((*message_)[strings::msg_params].keyExists(strings::turn_icon)) {
str = (*message_)[strings::msg_params][strings::turn_icon][strings::value]
.asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid turn_icon value syntax check failed");
+ SDL_LOG_ERROR("Invalid turn_icon value syntax check failed");
return true;
}
}
@@ -231,8 +230,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
[strings::value]
.asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid next_turn_icon value syntax check failed");
+ SDL_LOG_ERROR("Invalid next_turn_icon value syntax check failed");
return true;
}
}
@@ -241,8 +239,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
str = (*message_)[strings::msg_params][strings::navigation_text_1]
.asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid navigation_text_1 value syntax check failed");
+ SDL_LOG_ERROR("Invalid navigation_text_1 value syntax check failed");
return true;
}
}
@@ -251,8 +248,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
str = (*message_)[strings::msg_params][strings::navigation_text_2]
.asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid navigation_text_2 value syntax check failed");
+ SDL_LOG_ERROR("Invalid navigation_text_2 value syntax check failed");
return true;
}
}
@@ -260,7 +256,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
if ((*message_)[strings::msg_params].keyExists(strings::eta)) {
str = (*message_)[strings::msg_params][strings::eta].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid eta value syntax check failed");
+ SDL_LOG_ERROR("Invalid eta value syntax check failed");
return true;
}
}
@@ -269,8 +265,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
str =
(*message_)[strings::msg_params][strings::total_distance].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid total_distance value syntax check failed");
+ SDL_LOG_ERROR("Invalid total_distance value syntax check failed");
return true;
}
}
@@ -280,8 +275,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
str = (*message_)[strings::msg_params][strings::time_to_destination]
.asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid time_to_destination value syntax check failed");
+ SDL_LOG_ERROR("Invalid time_to_destination value syntax check failed");
return true;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc
index d027daf77d..7d546079e8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ShowConstantTBTResponse::ShowConstantTBTResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ ShowConstantTBTResponse::ShowConstantTBTResponse(
ShowConstantTBTResponse::~ShowConstantTBTResponse() {}
void ShowConstantTBTResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc
index 84d11f8e09..910ab9ef23 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc
@@ -44,6 +44,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ShowRequest::ShowRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -83,9 +85,8 @@ void ShowRequest::HandleMetadata(const char* field_id,
[hmi_request::field_types][i] = current_tag;
}
} else {
- LOG4CXX_INFO(logger_,
- "metadata tag provided with no item for "
- << field_id << ", ignoring with warning");
+ SDL_LOG_INFO("metadata tag provided with no item for "
+ << field_id << ", ignoring with warning");
// tag provided with no item, ignore with warning
if (mobile_apis::Result::INVALID_ENUM == core_result_code_) {
core_result_code_ = mobile_apis::Result::WARNINGS;
@@ -94,14 +95,13 @@ void ShowRequest::HandleMetadata(const char* field_id,
}
}
} else {
- LOG4CXX_INFO(logger_,
- "No metadata tagging provided for field: " << field_id);
+ SDL_LOG_INFO("No metadata tagging provided for field: " << field_id);
}
}
bool ShowRequest::CheckTemplateConfigurationForApp(
application_manager::Application& app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if ((*message_)[strings::msg_params].keyExists(strings::window_id)) {
current_window_id_ =
@@ -112,21 +112,20 @@ bool ShowRequest::CheckTemplateConfigurationForApp(
const auto new_template_layout =
template_config_[strings::template_layout].asString();
const auto old_template_layout = app.window_layout(current_window_id_);
- LOG4CXX_DEBUG(logger_, "New layout: " << new_template_layout);
- LOG4CXX_DEBUG(logger_, "Old layout: " << old_template_layout);
+ SDL_LOG_DEBUG("New layout: " << new_template_layout);
+ SDL_LOG_DEBUG("Old layout: " << old_template_layout);
const bool layouts_equal = (new_template_layout == old_template_layout);
if (!new_template_layout.empty() && !layouts_equal) {
// Template switched, hence allow any color change
- LOG4CXX_DEBUG(logger_,
- "Show Request: Setting new Layout: " << new_template_layout
+ SDL_LOG_DEBUG("Show Request: Setting new Layout: " << new_template_layout
<< " for window ID: "
<< current_window_id_);
layout_change_required_ = true;
return true;
}
- LOG4CXX_DEBUG(logger_, "Show Request: No Layout Change");
+ SDL_LOG_DEBUG("Show Request: No Layout Change");
return false;
};
@@ -140,10 +139,10 @@ bool ShowRequest::CheckTemplateConfigurationForApp(
app.day_color_scheme(current_window_id_)) {
// Color scheme param exists and has been previously set,
// hence do not allow color change
- LOG4CXX_DEBUG(logger_, "Day Color Scheme change is rejected");
+ SDL_LOG_DEBUG("Day Color Scheme change is rejected");
return false;
}
- LOG4CXX_DEBUG(logger_, "Day Color Scheme change is allowed");
+ SDL_LOG_DEBUG("Day Color Scheme change is allowed");
dcs_change_required_ = true;
return true;
@@ -159,10 +158,10 @@ bool ShowRequest::CheckTemplateConfigurationForApp(
app.night_color_scheme(current_window_id_)) {
// Color scheme param exists and has been previously set,
// hence do not allow color change
- LOG4CXX_DEBUG(logger_, "Night Color Scheme change is rejected");
+ SDL_LOG_DEBUG("Night Color Scheme change is rejected");
return false;
}
- LOG4CXX_DEBUG(logger_, "Night Color Scheme Change is allowed");
+ SDL_LOG_DEBUG("Night Color Scheme Change is allowed");
ncs_change_required_ = true;
return true;
@@ -192,7 +191,7 @@ bool ShowRequest::CheckTemplateConfigurationForApp(
void ShowRequest::ApplyTemplateConfigurationForApp(
mobile_apis::Result::eType result, application_manager::Application& app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (helpers::Compare<mobile_apis::Result::eType, helpers::EQ, helpers::ONE>(
result,
mobile_apis::Result::SUCCESS,
@@ -200,7 +199,7 @@ void ShowRequest::ApplyTemplateConfigurationForApp(
if (layout_change_required_) {
const std::string new_layout =
template_config_[strings::template_layout].asString();
- LOG4CXX_DEBUG(logger_, "New layout : " << new_layout << " is applied");
+ SDL_LOG_DEBUG("New layout : " << new_layout << " is applied");
app.set_window_layout(current_window_id_, new_layout);
if (template_config_.keyExists(strings::day_color_scheme)) {
@@ -217,13 +216,13 @@ void ShowRequest::ApplyTemplateConfigurationForApp(
}
if (dcs_change_required_) {
- LOG4CXX_DEBUG(logger_, "New day color scheme is applied");
+ SDL_LOG_DEBUG("New day color scheme is applied");
app.set_day_color_scheme(current_window_id_,
template_config_[strings::day_color_scheme]);
}
if (ncs_change_required_) {
- LOG4CXX_DEBUG(logger_, "New night color scheme is applied");
+ SDL_LOG_DEBUG("New night color scheme is applied");
app.set_night_color_scheme(current_window_id_,
template_config_[strings::night_color_scheme]);
}
@@ -231,24 +230,24 @@ void ShowRequest::ApplyTemplateConfigurationForApp(
}
void ShowRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
// SDLAQ-CRS-494, VC3.1
if ((*message_)[strings::msg_params].empty()) {
- LOG4CXX_ERROR(logger_, strings::msg_params << " is empty.");
+ SDL_LOG_ERROR(strings::msg_params << " is empty.");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
if (!CheckStringsOfShowRequest()) {
- LOG4CXX_ERROR(logger_, "Incorrect characters in string");
+ SDL_LOG_ERROR("Incorrect characters in string");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -266,7 +265,7 @@ void ShowRequest::Run() {
}
if (mobile_apis::Result::SUCCESS != processing_result) {
- LOG4CXX_ERROR(logger_, "Processing of soft buttons failed.");
+ SDL_LOG_ERROR("Processing of soft buttons failed.");
SendResponse(false, processing_result);
return;
}
@@ -281,7 +280,7 @@ void ShowRequest::Run() {
app,
application_manager_);
if (mobile_apis::Result::INVALID_DATA == verification_result) {
- LOG4CXX_ERROR(logger_, "Image verification failed.");
+ SDL_LOG_ERROR("Image verification failed.");
SendResponse(false, verification_result);
return;
}
@@ -293,7 +292,7 @@ void ShowRequest::Run() {
app,
application_manager_);
if (mobile_apis::Result::INVALID_DATA == verification_result) {
- LOG4CXX_ERROR(logger_, "Image verification failed.");
+ SDL_LOG_ERROR("Image verification failed.");
SendResponse(false, verification_result);
return;
}
@@ -421,8 +420,7 @@ void ShowRequest::Run() {
const auto window_id =
(*message_)[strings::msg_params][strings::window_id].asInt();
if (!app->WindowIdExists(window_id)) {
- LOG4CXX_ERROR(logger_,
- "Window with id #" << window_id << " does not exist");
+ SDL_LOG_ERROR("Window with id #" << window_id << " does not exist");
SendResponse(false, mobile_apis::Result::INVALID_ID);
return;
}
@@ -453,21 +451,21 @@ void ShowRequest::Run() {
}
void ShowRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
const smart_objects::SmartObject& message = event.smart_object();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
switch (event.id()) {
case hmi_apis::FunctionID::UI_Show: {
- LOG4CXX_DEBUG(logger_, "Received UI_Show event.");
+ SDL_LOG_DEBUG("Received UI_Show event.");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
std::string response_info;
hmi_apis::Common_Result::eType result_code =
@@ -498,41 +496,41 @@ void ShowRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event " << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
break;
}
}
}
bool ShowRequest::CheckStringsOfShowRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const char* str;
if ((*message_)[strings::msg_params].keyExists(strings::main_field_4)) {
str = (*message_)[strings::msg_params][strings::main_field_4].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid main_field_4 syntax check failed");
+ SDL_LOG_ERROR("Invalid main_field_4 syntax check failed");
return false;
}
}
if ((*message_)[strings::msg_params].keyExists(strings::main_field_3)) {
str = (*message_)[strings::msg_params][strings::main_field_3].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid main_field_3 syntax check failed");
+ SDL_LOG_ERROR("Invalid main_field_3 syntax check failed");
return false;
}
}
if ((*message_)[strings::msg_params].keyExists(strings::main_field_2)) {
str = (*message_)[strings::msg_params][strings::main_field_2].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid main_field_2 syntax check failed");
+ SDL_LOG_ERROR("Invalid main_field_2 syntax check failed");
return false;
}
}
if ((*message_)[strings::msg_params].keyExists(strings::main_field_1)) {
str = (*message_)[strings::msg_params][strings::main_field_1].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid main_field_1 syntax check failed");
+ SDL_LOG_ERROR("Invalid main_field_1 syntax check failed");
return false;
}
}
@@ -540,28 +538,28 @@ bool ShowRequest::CheckStringsOfShowRequest() {
str =
(*message_)[strings::msg_params][strings::template_title].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid templateTitle syntax check failed");
+ SDL_LOG_ERROR("Invalid templateTitle syntax check failed");
return false;
}
}
if ((*message_)[strings::msg_params].keyExists(strings::status_bar)) {
str = (*message_)[strings::msg_params][strings::status_bar].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid status_bar syntax check failed");
+ SDL_LOG_ERROR("Invalid status_bar syntax check failed");
return false;
}
}
if ((*message_)[strings::msg_params].keyExists(strings::media_clock)) {
str = (*message_)[strings::msg_params][strings::media_clock].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid media_clock syntax check failed");
+ SDL_LOG_ERROR("Invalid media_clock syntax check failed");
return false;
}
}
if ((*message_)[strings::msg_params].keyExists(strings::media_track)) {
str = (*message_)[strings::msg_params][strings::media_track].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid media_track syntax check failed");
+ SDL_LOG_ERROR("Invalid media_track syntax check failed");
return false;
}
}
@@ -571,7 +569,7 @@ bool ShowRequest::CheckStringsOfShowRequest() {
for (size_t i = 0; i < custom_presets_array.length(); ++i) {
str = custom_presets_array[i].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid custom_presets syntax check failed");
+ SDL_LOG_ERROR("Invalid custom_presets syntax check failed");
return false;
}
}
@@ -581,7 +579,7 @@ bool ShowRequest::CheckStringsOfShowRequest() {
str = (*message_)[strings::msg_params][strings::graphic][strings::value]
.asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid graphic value syntax check failed");
+ SDL_LOG_ERROR("Invalid graphic value syntax check failed");
return false;
}
}
@@ -591,8 +589,7 @@ bool ShowRequest::CheckStringsOfShowRequest() {
[strings::value]
.asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_,
- "Invalid secondary_graphic value syntax check failed");
+ SDL_LOG_ERROR("Invalid secondary_graphic value syntax check failed");
return false;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_response.cc
index f5667189b7..074fcabc7a 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_response.cc
@@ -41,6 +41,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ShowResponse::ShowResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ ShowResponse::ShowResponse(
ShowResponse::~ShowResponse() {}
void ShowResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_request.cc
index dd7b426b40..e46d3fd7f0 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_request.cc
@@ -43,6 +43,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SliderRequest::SliderRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -72,20 +74,20 @@ bool SliderRequest::Init() {
}
void SliderRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr application = application_manager_.application(
(*message_)[strings::params][strings::connection_key].asUInt());
if (!application) {
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
if ((*message_)[strings::msg_params][strings::num_ticks].asInt() <
(*message_)[strings::msg_params][strings::position].asInt()) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA");
+ SDL_LOG_ERROR("INVALID_DATA");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -94,7 +96,7 @@ void SliderRequest::Run() {
if (1 < (*message_)[strings::msg_params][strings::slider_footer].length()) {
if ((*message_)[strings::msg_params][strings::num_ticks].asUInt() !=
(*message_)[strings::msg_params][strings::slider_footer].length()) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA");
+ SDL_LOG_ERROR("INVALID_DATA");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -102,14 +104,12 @@ void SliderRequest::Run() {
}
if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_, "Incoming slider has contains \t\n \\t \\n");
+ SDL_LOG_ERROR("Incoming slider has contains \t\n \\t \\n");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params = (*message_)[strings::msg_params];
+ smart_objects::SmartObject msg_params = (*message_)[strings::msg_params];
msg_params[strings::app_id] = application->app_id();
if (!(*message_)[strings::msg_params].keyExists(strings::timeout)) {
@@ -126,7 +126,7 @@ void SliderRequest::Run() {
}
void SliderRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
using namespace smart_objects;
using namespace hmi_apis;
@@ -135,18 +135,18 @@ void SliderRequest::on_event(const event_engine::Event& event) {
const event_engine::Event::EventID event_id = event.id();
if (event_id == FunctionID::UI_OnResetTimeout) {
- LOG4CXX_INFO(logger_, "Received UI_OnResetTimeout event");
+ SDL_LOG_INFO("Received UI_OnResetTimeout event");
application_manager_.updateRequestTimeout(
connection_key(), correlation_id(), default_timeout());
return;
}
if (event_id != FunctionID::UI_Slider) {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
- LOG4CXX_DEBUG(logger_, "Received UI_Slider event");
+ SDL_LOG_DEBUG("Received UI_Slider event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
const Common_Result::eType response_code = static_cast<Common_Result::eType>(
message[strings::params][hmi_response::code].asInt());
@@ -163,8 +163,7 @@ void SliderRequest::on_event(const event_engine::Event& event) {
response_msg_params[strings::slider_position] =
message[strings::params][strings::data][strings::slider_position];
} else {
- LOG4CXX_ERROR(logger_,
- strings::slider_position << " field is absent"
+ SDL_LOG_ERROR(strings::slider_position << " field is absent"
" in response.");
response_msg_params[strings::slider_position] = 0;
}
@@ -181,12 +180,12 @@ void SliderRequest::on_event(const event_engine::Event& event) {
}
bool SliderRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
- const char* str = NULL;
+ SDL_LOG_AUTO_TRACE();
- str = (*message_)[strings::msg_params][strings::slider_header].asCharArray();
+ const char* str =
+ (*message_)[strings::msg_params][strings::slider_header].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid slider_header value syntax check failed");
+ SDL_LOG_ERROR("Invalid slider_header value syntax check failed");
return true;
}
@@ -200,7 +199,7 @@ bool SliderRequest::IsWhiteSpaceExist() {
for (; it_sf != it_sf_end; ++it_sf) {
str = (*it_sf).asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid slider_footer syntax check failed");
+ SDL_LOG_ERROR("Invalid slider_footer syntax check failed");
return true;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_response.cc
index 4ac96a272e..72b0003d8d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/slider_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SliderResponse::SliderResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ SliderResponse::SliderResponse(
SliderResponse::~SliderResponse() {}
void SliderResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_request.cc
index 0730a8730f..b8de053853 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_request.cc
@@ -43,6 +43,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SpeakRequest::SpeakRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -60,20 +62,20 @@ SpeakRequest::SpeakRequest(
SpeakRequest::~SpeakRequest() {}
void SpeakRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_,
- "Incoming speak has contains \\t\\n \\\\t \\\\n "
- " text contains only whitespace in ttsChunks");
+ SDL_LOG_ERROR(
+ "Incoming speak has contains \\t\\n \\\\t \\\\n "
+ " text contains only whitespace in ttsChunks");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -84,9 +86,8 @@ void SpeakRequest::Run() {
MessageHelper::VerifyTtsFiles(tts_chunks, app, application_manager_);
if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
- LOG4CXX_ERROR(
- logger_,
- "MessageHelper::VerifyTtsFiles return " << verification_result);
+ SDL_LOG_ERROR("MessageHelper::VerifyTtsFiles return "
+ << verification_result);
SendResponse(false,
mobile_apis::Result::FILE_NOT_FOUND,
"One or more files needed for tts_chunks are not present");
@@ -103,23 +104,23 @@ void SpeakRequest::Run() {
}
void SpeakRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
switch (event.id()) {
case hmi_apis::FunctionID::TTS_Speak: {
- LOG4CXX_INFO(logger_, "Received TTS_Speak event");
+ SDL_LOG_INFO("Received TTS_Speak event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
ProcessTTSSpeakResponse(event.smart_object());
break;
}
case hmi_apis::FunctionID::TTS_OnResetTimeout: {
- LOG4CXX_INFO(logger_, "Received TTS_OnResetTimeout event");
+ SDL_LOG_INFO("Received TTS_OnResetTimeout event");
application_manager_.updateRequestTimeout(
connection_key(), correlation_id(), default_timeout());
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
break;
}
}
@@ -127,14 +128,14 @@ void SpeakRequest::on_event(const event_engine::Event& event) {
void SpeakRequest::ProcessTTSSpeakResponse(
const smart_objects::SmartObject& message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
ApplicationSharedPtr application =
application_manager_.application(connection_key());
if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return;
}
@@ -158,7 +159,7 @@ void SpeakRequest::ProcessTTSSpeakResponse(
}
bool SpeakRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const char* str = NULL;
if ((*message_)[strings::msg_params].keyExists(strings::tts_chunks)) {
@@ -171,7 +172,7 @@ bool SpeakRequest::IsWhiteSpaceExist() {
for (; it_tc != it_tc_end; ++it_tc) {
str = (*it_tc)[strings::text].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOG4CXX_ERROR(logger_, "Invalid tts_chunks syntax check failed");
+ SDL_LOG_ERROR("Invalid tts_chunks syntax check failed");
return true;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_response.cc
index 69b04977ef..3f9c49ac50 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/speak_response.cc
@@ -41,6 +41,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SpeakResponse::SpeakResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,7 +58,7 @@ SpeakResponse::SpeakResponse(
SpeakResponse::~SpeakResponse() {}
void SpeakResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc
index 1acb2a7438..42cb3c60c9 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc
@@ -41,6 +41,8 @@ namespace commands {
namespace str = strings;
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SubscribeButtonRequest::SubscribeButtonRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,12 +58,12 @@ SubscribeButtonRequest::SubscribeButtonRequest(
SubscribeButtonRequest::~SubscribeButtonRequest() {}
void SubscribeButtonRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "APPLICATION_NOT_REGISTERED");
+ SDL_LOG_ERROR("APPLICATION_NOT_REGISTERED");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -71,8 +73,7 @@ void SubscribeButtonRequest::Run() {
(*message_)[str::msg_params][str::button_name].asInt());
if (!IsSubscriptionAllowed(app, btn_id)) {
- LOG4CXX_ERROR(logger_,
- "Subscribe on button " << btn_id << " isn't allowed");
+ SDL_LOG_ERROR("Subscribe on button " << btn_id << " isn't allowed");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
@@ -83,23 +84,22 @@ void SubscribeButtonRequest::Run() {
bool play_pause_supported =
CheckHMICapabilities(mobile_apis::ButtonName::PLAY_PAUSE);
if (play_pause_supported) {
- LOG4CXX_DEBUG(logger_, "Converting Legacy OK button to PLAY_PAUSE");
+ SDL_LOG_DEBUG("Converting Legacy OK button to PLAY_PAUSE");
btn_id = mobile_apis::ButtonName::PLAY_PAUSE;
(*message_)[str::msg_params][str::button_name] = btn_id;
} else if (!ok_supported) {
- LOG4CXX_ERROR(logger_, "OK button isn't allowed by HMI capabilities");
+ SDL_LOG_ERROR("OK button isn't allowed by HMI capabilities");
SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
}
} else if (!CheckHMICapabilities(btn_id)) {
- LOG4CXX_ERROR(logger_,
- "Subscribe on button "
- << btn_id << " isn't allowed by HMI capabilities");
+ SDL_LOG_ERROR("Subscribe on button "
+ << btn_id << " isn't allowed by HMI capabilities");
SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
return;
}
if (app->IsSubscribedToButton(btn_id)) {
- LOG4CXX_ERROR(logger_, "Already subscribed to button " << btn_id);
+ SDL_LOG_ERROR("Already subscribed to button " << btn_id);
SendResponse(false, mobile_apis::Result::IGNORED);
return;
}
@@ -107,8 +107,8 @@ void SubscribeButtonRequest::Run() {
app->SubscribeToButton(static_cast<mobile_apis::ButtonName::eType>(btn_id));
SendSubscribeButtonNotification();
- const bool is_succedeed = true;
- SendResponse(is_succedeed, mobile_apis::Result::SUCCESS);
+ const bool is_succeeded = true;
+ SendResponse(is_succeeded, mobile_apis::Result::SUCCESS);
}
bool SubscribeButtonRequest::Init() {
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_response.cc
index e584f84f4c..216d1e186d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SubscribeButtonResponse::SubscribeButtonResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -53,12 +55,12 @@ SubscribeButtonResponse::SubscribeButtonResponse(
SubscribeButtonResponse::~SubscribeButtonResponse() {}
void SubscribeButtonResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// check if response false
if (true == (*message_)[strings::msg_params].keyExists(strings::success)) {
if ((*message_)[strings::msg_params][strings::success].asBool() == false) {
- LOG4CXX_ERROR(logger_, "Success = false");
+ SDL_LOG_ERROR("Success = false");
SendResponse(false);
return;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_request.cc
index 2ee7771833..6e8ad05a74 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_request.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SubscribeWayPointsRequest::SubscribeWayPointsRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,19 +56,18 @@ SubscribeWayPointsRequest::SubscribeWayPointsRequest(
SubscribeWayPointsRequest::~SubscribeWayPointsRequest() {}
void SubscribeWayPointsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_,
- "An application with connection key "
- << connection_key() << " is not registered.");
+ SDL_LOG_ERROR("An application with connection key "
+ << connection_key() << " is not registered.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
- if (application_manager_.IsAppSubscribedForWayPoints(app)) {
+ if (application_manager_.IsAppSubscribedForWayPoints(*app)) {
SendResponse(false, mobile_apis::Result::IGNORED);
return;
}
@@ -83,12 +84,12 @@ void SubscribeWayPointsRequest::Run() {
}
void SubscribeWayPointsRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::Navigation_SubscribeWayPoints: {
- LOG4CXX_INFO(logger_, "Received Navigation_SubscribeWayPoints event");
+ SDL_LOG_INFO("Received Navigation_SubscribeWayPoints event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
const hmi_apis::Common_Result::eType result_code =
static_cast<hmi_apis::Common_Result::eType>(
@@ -107,7 +108,7 @@ void SubscribeWayPointsRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
break;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_response.cc
index 45486792d7..ab3fc0a4b8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_way_points_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SubscribeWayPointsResponse::SubscribeWayPointsResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ SubscribeWayPointsResponse::SubscribeWayPointsResponse(
SubscribeWayPointsResponse::~SubscribeWayPointsResponse() {}
void SubscribeWayPointsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_request.cc
new file mode 100644
index 0000000000..327315b372
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_request.cc
@@ -0,0 +1,459 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "sdl_rpc_plugin/commands/mobile/subtle_alert_request.h"
+
+#include "application_manager/application_impl.h"
+#include "application_manager/message_helper.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SDL_CREATE_LOG_VARIABLE("Commands")
+
+SubtleAlertRequest::SubtleAlertRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ rpc_service::RPCService& rpc_service,
+ HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler)
+ , awaiting_ui_subtle_alert_response_(false)
+ , awaiting_tts_speak_response_(false)
+ , awaiting_tts_stop_speaking_response_(false)
+ , is_ui_subtle_alert_sent_(false)
+ , is_tts_stop_speaking_sent_(false)
+ , subtle_alert_result_(hmi_apis::Common_Result::INVALID_ENUM)
+ , tts_speak_result_(hmi_apis::Common_Result::INVALID_ENUM) {
+ subscribe_on_event(hmi_apis::FunctionID::UI_OnResetTimeout);
+ subscribe_on_event(hmi_apis::FunctionID::TTS_OnResetTimeout);
+}
+
+SubtleAlertRequest::~SubtleAlertRequest() {}
+
+bool SubtleAlertRequest::Init() {
+ /* Timeout in milliseconds.
+ 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 (msg_params.keyExists(strings::soft_buttons)) {
+ SDL_LOG_INFO(
+ "Request contains soft buttons - request timeout "
+ "will be set to 0.");
+ default_timeout_ = 0;
+ }
+
+ return true;
+}
+
+void SubtleAlertRequest::Run() {
+ SDL_LOG_AUTO_TRACE();
+
+ uint32_t app_id =
+ (*message_)[strings::params][strings::connection_key].asInt();
+
+ if (!Validate(app_id)) {
+ // Invalid command, abort execution
+ return;
+ }
+ bool tts_chunks_exists =
+ (*message_)[strings::msg_params].keyExists(strings::tts_chunks);
+ size_t length_tts_chunks = 0;
+
+ if (tts_chunks_exists) {
+ length_tts_chunks =
+ (*message_)[strings::msg_params][strings::tts_chunks].length();
+ }
+
+ awaiting_tts_speak_response_ = (tts_chunks_exists && length_tts_chunks);
+
+ SendSubtleAlertRequest(app_id);
+ if (awaiting_tts_speak_response_) {
+ SendSpeakRequest(app_id, tts_chunks_exists, length_tts_chunks);
+ }
+}
+
+void SubtleAlertRequest::on_event(const event_engine::Event& event) {
+ SDL_LOG_AUTO_TRACE();
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::TTS_OnResetTimeout:
+ case hmi_apis::FunctionID::UI_OnResetTimeout: {
+ SDL_LOG_INFO(
+ "Received UI_OnResetTimeout event "
+ " or TTS_OnResetTimeout event"
+ << awaiting_tts_speak_response_ << " "
+ << awaiting_tts_stop_speaking_response_ << " "
+ << awaiting_ui_subtle_alert_response_);
+ application_manager_.updateRequestTimeout(
+ connection_key(), correlation_id(), default_timeout());
+ break;
+ }
+ case hmi_apis::FunctionID::UI_SubtleAlert: {
+ SDL_LOG_INFO("Received UI_SubtleAlert event");
+ // Unsubscribe from event to avoid unwanted messages
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ unsubscribe_from_event(hmi_apis::FunctionID::UI_SubtleAlert);
+ awaiting_ui_subtle_alert_response_ = false;
+ HmiInterfaces::InterfaceState ui_interface_state =
+ application_manager_.hmi_interfaces().GetInterfaceState(
+ HmiInterfaces::HMI_INTERFACE_UI);
+
+ if (awaiting_tts_speak_response_ &&
+ HmiInterfaces::STATE_NOT_AVAILABLE != ui_interface_state) {
+ awaiting_tts_stop_speaking_response_ = true;
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
+ SendHMIRequest(hmi_apis::FunctionID::TTS_StopSpeaking, NULL, true);
+ is_tts_stop_speaking_sent_ = true;
+ }
+ subtle_alert_result_ = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+
+ // Mobile Alert request is successful when UI_SubtleAlert is successful
+ subtle_alert_response_params_ = message[strings::msg_params];
+ GetInfo(message, ui_response_info_);
+ break;
+ }
+ case hmi_apis::FunctionID::TTS_Speak: {
+ SDL_LOG_INFO("Received TTS_Speak event");
+ // Unsubscribe from event to avoid unwanted messages
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
+ unsubscribe_from_event(hmi_apis::FunctionID::TTS_Speak);
+ awaiting_tts_speak_response_ = false;
+ tts_speak_result_ = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ GetInfo(message, tts_response_info_);
+ break;
+ }
+ case hmi_apis::FunctionID::TTS_StopSpeaking: {
+ SDL_LOG_INFO("Received TTS_StopSpeaking event");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
+ // Unsubscribe from event to avoid unwanted messages
+ unsubscribe_from_event(hmi_apis::FunctionID::TTS_StopSpeaking);
+ awaiting_tts_stop_speaking_response_ = false;
+ break;
+ }
+ default: {
+ SDL_LOG_ERROR("Received unknown event" << event.id());
+ return;
+ }
+ }
+
+ if (HasHmiResponsesToWait()) {
+ return;
+ }
+ mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
+ std::string info;
+ const bool result = PrepareResponseParameters(result_code, info);
+ SendResponse(result,
+ result_code,
+ info.empty() ? NULL : info.c_str(),
+ &subtle_alert_response_params_);
+}
+
+bool SubtleAlertRequest::PrepareResponseParameters(
+ mobile_apis::Result::eType& result_code, std::string& info) {
+ app_mngr::commands::ResponseInfo ui_subtle_alert_info(
+ subtle_alert_result_,
+ HmiInterfaces::HMI_INTERFACE_UI,
+ application_manager_);
+ app_mngr::commands::ResponseInfo tts_alert_info(
+ tts_speak_result_,
+ HmiInterfaces::HMI_INTERFACE_TTS,
+ application_manager_);
+
+ bool result =
+ PrepareResultForMobileResponse(ui_subtle_alert_info, tts_alert_info);
+
+ /* result=false if UI interface is ok and TTS interface = UNSUPPORTED_RESOURCE
+ * and sdl receive TTS.IsReady=true or SDL doesn't receive response for
+ * TTS.IsReady.
+ */
+ if (result && ui_subtle_alert_info.is_ok &&
+ tts_alert_info.is_unsupported_resource &&
+ HmiInterfaces::STATE_NOT_AVAILABLE != tts_alert_info.interface_state) {
+ result = false;
+ }
+ result_code = mobile_apis::Result::WARNINGS;
+ if ((ui_subtle_alert_info.is_ok || ui_subtle_alert_info.is_not_used) &&
+ tts_alert_info.is_unsupported_resource &&
+ HmiInterfaces::STATE_AVAILABLE == tts_alert_info.interface_state) {
+ tts_response_info_ = "Unsupported phoneme type sent in a prompt";
+ info = app_mngr::commands::MergeInfos(ui_subtle_alert_info,
+ ui_response_info_,
+ tts_alert_info,
+ tts_response_info_);
+ return result;
+ }
+ // Ignore TTS.Speak result if ABORTED due to TTS.StopSpeaking request
+ if (is_tts_stop_speaking_sent_ &&
+ hmi_apis::Common_Result::ABORTED == tts_alert_info.result_code) {
+ result_code =
+ MessageHelper::HMIToMobileResult(ui_subtle_alert_info.result_code);
+ info = app_mngr::commands::MergeInfos(ui_subtle_alert_info,
+ ui_response_info_,
+ tts_alert_info,
+ tts_response_info_);
+ return ui_subtle_alert_info.is_ok;
+ }
+ result_code =
+ PrepareResultCodeForResponse(ui_subtle_alert_info, tts_alert_info);
+ info = app_mngr::commands::MergeInfos(ui_subtle_alert_info,
+ ui_response_info_,
+ tts_alert_info,
+ tts_response_info_);
+ // Mobile Alert request is successful when UI_SubtleAlert is successful
+ if (is_ui_subtle_alert_sent_ && !ui_subtle_alert_info.is_ok) {
+ return false;
+ }
+ return result;
+}
+
+bool SubtleAlertRequest::Validate(uint32_t app_id) {
+ SDL_LOG_AUTO_TRACE();
+ ApplicationSharedPtr app = application_manager_.application(app_id);
+
+ if (!app) {
+ SDL_LOG_ERROR("No application associated with session key");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return false;
+ }
+
+ if (mobile_apis::HMILevel::HMI_BACKGROUND ==
+ app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW) &&
+ app->AreCommandLimitsExceeded(
+ static_cast<mobile_apis::FunctionID::eType>(function_id()),
+ application_manager::TLimitSource::POLICY_TABLE)) {
+ SDL_LOG_ERROR("SubtleAlert frequency is too high.");
+ SendResponse(false,
+ mobile_apis::Result::REJECTED,
+ "SubtleAlert frequency is too high.");
+ return false;
+ }
+
+ if (!CheckStrings()) {
+ SendResponse(false, mobile_apis::Result::INVALID_DATA);
+ return false;
+ }
+
+ // ProcessSoftButtons checks strings on the contents incorrect character
+
+ mobile_apis::Result::eType processing_result =
+ MessageHelper::ProcessSoftButtons((*message_)[strings::msg_params],
+ app,
+ policy_handler_,
+ application_manager_);
+
+ if (mobile_apis::Result::SUCCESS != processing_result) {
+ SDL_LOG_ERROR("INVALID_DATA!");
+ SendResponse(false, processing_result);
+ return false;
+ }
+
+ // check if mandatory params(alertText1 and TTSChunk) specified
+ if ((!(*message_)[strings::msg_params].keyExists(strings::alert_text1)) &&
+ (!(*message_)[strings::msg_params].keyExists(strings::alert_text2)) &&
+ (!(*message_)[strings::msg_params].keyExists(strings::tts_chunks))) {
+ SDL_LOG_ERROR("Mandatory parameters are missing");
+ SendResponse(false,
+ mobile_apis::Result::INVALID_DATA,
+ "Mandatory parameters are missing");
+ return false;
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::tts_chunks)) {
+ smart_objects::SmartObject& tts_chunks =
+ (*message_)[strings::msg_params][strings::tts_chunks];
+ mobile_apis::Result::eType verification_result =
+ MessageHelper::VerifyTtsFiles(tts_chunks, app, application_manager_);
+
+ if (mobile_apis::Result::FILE_NOT_FOUND == verification_result) {
+ SDL_LOG_ERROR("MessageHelper::VerifyTtsFiles return "
+ << verification_result);
+ SendResponse(false,
+ mobile_apis::Result::FILE_NOT_FOUND,
+ "One or more files needed for tts_chunks are not present");
+ return false;
+ }
+ }
+
+ return true;
+}
+
+void SubtleAlertRequest::SendSubtleAlertRequest(int32_t app_id) {
+ SDL_LOG_AUTO_TRACE();
+ ApplicationSharedPtr app = application_manager_.application(app_id);
+
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ msg_params[hmi_request::alert_strings] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ if ((*message_)[strings::msg_params].keyExists(strings::cancel_id)) {
+ msg_params[strings::cancel_id] =
+ (*message_)[strings::msg_params][strings::cancel_id].asInt();
+ }
+
+ int32_t index = 0;
+ if ((*message_)[strings::msg_params].keyExists(strings::alert_text1)) {
+ msg_params[hmi_request::alert_strings][index][hmi_request::field_name] =
+ hmi_apis::Common_TextFieldName::subtleAlertText1;
+ msg_params[hmi_request::alert_strings][index][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::alert_text1];
+ index++;
+ }
+ if ((*message_)[strings::msg_params].keyExists(strings::alert_text2)) {
+ msg_params[hmi_request::alert_strings][index][hmi_request::field_name] =
+ hmi_apis::Common_TextFieldName::subtleAlertText2;
+ msg_params[hmi_request::alert_strings][index][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::alert_text2];
+ }
+
+ // softButtons
+ if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
+ msg_params[hmi_request::soft_buttons] =
+ (*message_)[strings::msg_params][strings::soft_buttons];
+ MessageHelper::SubscribeApplicationToSoftButton(
+ (*message_)[strings::msg_params], app, function_id());
+ } else {
+ msg_params[strings::duration] =
+ (*message_)[strings::msg_params][strings::duration].asUInt();
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::alert_icon)) {
+ auto verification_result = MessageHelper::VerifyImage(
+ (*message_)[strings::msg_params][strings::alert_icon],
+ app,
+ application_manager_);
+
+ if (mobile_apis::Result::INVALID_DATA == verification_result) {
+ SDL_LOG_ERROR("Image verification failed.");
+ SendResponse(false, verification_result);
+ return;
+ }
+
+ msg_params[strings::alert_icon] =
+ (*message_)[strings::msg_params][strings::alert_icon];
+ }
+
+ // app_id
+ msg_params[strings::app_id] = app_id;
+
+ // PASA Alert type
+ msg_params[strings::alert_type] = hmi_apis::Common_AlertType::UI;
+ if (awaiting_tts_speak_response_) {
+ msg_params[strings::alert_type] = hmi_apis::Common_AlertType::BOTH;
+ }
+
+ // check out if there are alert strings or soft buttons
+ if (msg_params[hmi_request::alert_strings].length() > 0 ||
+ msg_params.keyExists(hmi_request::soft_buttons)) {
+ awaiting_ui_subtle_alert_response_ = true;
+ is_ui_subtle_alert_sent_ = true;
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ SendHMIRequest(hmi_apis::FunctionID::UI_SubtleAlert, &msg_params, true);
+ }
+}
+
+void SubtleAlertRequest::SendSpeakRequest(int32_t app_id,
+ bool tts_chunks_exists,
+ size_t length_tts_chunks) {
+ SDL_LOG_AUTO_TRACE();
+ using namespace hmi_apis;
+ using namespace smart_objects;
+ // crate HMI speak request
+ SmartObject msg_params = smart_objects::SmartObject(SmartType_Map);
+ if (tts_chunks_exists && length_tts_chunks) {
+ msg_params[hmi_request::tts_chunks] =
+ (*message_)[strings::msg_params][strings::tts_chunks];
+ }
+ msg_params[strings::app_id] = app_id;
+ msg_params[hmi_request::speak_type] = Common_MethodName::SUBTLE_ALERT;
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_TTS);
+ SendHMIRequest(FunctionID::TTS_Speak, &msg_params, true);
+}
+
+bool SubtleAlertRequest::CheckStrings() {
+ SDL_LOG_AUTO_TRACE();
+ const char* str = NULL;
+
+ if ((*message_)[strings::msg_params].keyExists(strings::alert_text1)) {
+ str = (*message_)[strings::msg_params][strings::alert_text1].asCharArray();
+ if (!CheckSyntax(str)) {
+ SDL_LOG_ERROR("Invalid alert_text_1 syntax check failed");
+ return false;
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::alert_text2)) {
+ str = (*message_)[strings::msg_params][strings::alert_text2].asCharArray();
+ if (!CheckSyntax(str)) {
+ SDL_LOG_ERROR("Invalid alert_text_2 syntax check failed");
+ return false;
+ }
+ }
+
+ if ((*message_)[strings::msg_params].keyExists(strings::tts_chunks)) {
+ smart_objects::SmartObject& tts_chunks_array =
+ (*message_)[strings::msg_params][strings::tts_chunks];
+ for (size_t i = 0; i < tts_chunks_array.length(); ++i) {
+ str = tts_chunks_array[i][strings::text].asCharArray();
+ if (strlen(str) && !CheckSyntax(str)) {
+ SDL_LOG_ERROR("Invalid tts_chunks text syntax check failed");
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+bool SubtleAlertRequest::HasHmiResponsesToWait() {
+ SDL_LOG_AUTO_TRACE();
+ return awaiting_ui_subtle_alert_response_ || awaiting_tts_speak_response_ ||
+ awaiting_tts_stop_speaking_response_;
+}
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_response.cc
new file mode 100644
index 0000000000..594a967877
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_response.cc
@@ -0,0 +1,66 @@
+/*
+ Copyright (c) 2020, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "sdl_rpc_plugin/commands/mobile/subtle_alert_response.h"
+
+#include "application_manager/application_impl.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace sdl_rpc_plugin {
+using namespace application_manager;
+
+namespace commands {
+
+SDL_CREATE_LOG_VARIABLE("Commands")
+
+SubtleAlertResponse::SubtleAlertResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+SubtleAlertResponse::~SubtleAlertResponse() {}
+
+void SubtleAlertResponse::Run() {
+ SDL_LOG_AUTO_TRACE();
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_request.cc
index 033e70a29c..cca088ed2d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_request.cc
@@ -34,10 +34,12 @@ Copyright (c) 2018, Ford Motor Company
#include "sdl_rpc_plugin/commands/mobile/system_request.h"
#include <stdio.h>
+
#include <algorithm>
#include <sstream>
#include <string>
#include <vector>
+
#include "application_manager/policies/policy_handler_interface.h"
#include "formatters/CFormatterJsonBase.h"
#include "interfaces/MOBILE_API.h"
@@ -51,7 +53,7 @@ Copyright (c) 2018, Ford Motor Company
namespace sdl_rpc_plugin {
using namespace application_manager;
-CREATE_LOGGERPTR_LOCAL(logger_, "ApplicationManager")
+SDL_CREATE_LOG_VARIABLE("Commands")
namespace {
#ifdef ENABLE_LOG
@@ -70,21 +72,108 @@ const unsigned int kAppIdLengthMax = 40U;
const unsigned int kAppNameLengthMax = 100U;
const unsigned int kLanguageArraySizeMax = 100U;
+typedef std::set<std::string> SynonymsSet;
+typedef std::map<std::string, SynonymsSet> SynonymsMap;
+
+bool ValidateSynonymsAtLanguage(const smart_objects::SmartObject& language,
+ const std::string& language_name,
+ SynonymsMap& synonyms_map) {
+ if (!language[language_name].keyExists(json::vrSynonyms)) {
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "'languages.vrSynonyms' doesn't exist");
+ return false;
+ }
+ const smart_objects::SmartArray* synonyms_array =
+ language[language_name][json::vrSynonyms].asArray();
+ if (!synonyms_array) {
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "vrSynonyms is not array.");
+ return false;
+ }
+ const size_t synonyms_array_size = synonyms_array->size();
+ if (synonyms_array_size < kVrArraySizeMin) {
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "vrSynomyms array has [" << synonyms_array_size
+ << "] size < allowed min size [" << kVrArraySizeMin << "]");
+ return false;
+ }
+ if (synonyms_array_size > kVrArraySizeMax) {
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "vrSynomyms array size [" << synonyms_array_size
+ << "] exceeds maximum allowed size [" << kVrArraySizeMax
+ << "]");
+ return false;
+ }
+
+ for (std::size_t idx = 0; idx < synonyms_array_size; ++idx) {
+ const smart_objects::SmartObject& synonym = (*synonyms_array)[idx];
+ const std::string vrSynonym = synonym.asString();
+ if (vrSynonym.length() > kVrSynonymLengthMax) {
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "vrSYnomym item [" << idx << "] exceeds max length ["
+ << vrSynonym.length() << "]>[" << kVrSynonymLengthMax
+ << "]");
+ return false;
+ }
+ if (vrSynonym.length() < kVrSynonymLengthMin) {
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "vrSYnomym item [" << idx << "] length ["
+ << vrSynonym.length() << "] is less then min length ["
+ << kVrSynonymLengthMin << "] allowed.");
+ return false;
+ }
+ // Verify duplicates
+ SynonymsMap::iterator synonyms_map_iter = synonyms_map.find(language_name);
+ if (synonyms_map_iter != synonyms_map.end()) {
+ if (!(*synonyms_map_iter).second.insert(vrSynonym).second) {
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "vrSYnomym item already defined [" << vrSynonym.c_str()
+ << "] for language [" << language_name << "]");
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+bool CheckMandatoryParametersPresent(
+ const smart_objects::SmartObject& app_data) {
+ if (!app_data.keyExists(json::android) && !app_data.keyExists(json::ios)) {
+ return false;
+ }
+
+ if (app_data.keyExists(json::android) &&
+ !app_data[json::android].keyExists(json::packageName)) {
+ return false;
+ }
+
+ if (app_data.keyExists(json::ios) &&
+ !app_data[json::ios].keyExists(json::urlScheme)) {
+ return false;
+ }
+
+ if (!app_data.keyExists(json::appId)) {
+ return false;
+ }
+
+ if (!app_data.keyExists(json::name)) {
+ return false;
+ }
+
+ return true;
+}
+
class QueryAppsDataValidator {
public:
- typedef std::set<std::string> SynonymsSet;
- typedef std::map<std::string, SynonymsSet> SynonymsMap;
-
QueryAppsDataValidator(smart_objects::SmartObject& object,
const ApplicationManager& manager)
: data_(object), manager_(manager) {}
bool Validate() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!data_.isValid()) {
- LOG4CXX_ERROR(logger_,
- kQueryAppsValidationFailedPrefix
- << "QueryApps response is not valid.");
+ SDL_LOG_ERROR(kQueryAppsValidationFailedPrefix
+ << "QueryApps response is not valid.");
return false;
}
if (!HasResponseKey()) {
@@ -96,10 +185,9 @@ class QueryAppsDataValidator {
private:
bool HasResponseKey() const {
if (!data_.keyExists(json::response)) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "QueryApps response does not contain '"
- << json::response << "' parameter.");
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "QueryApps response does not contain '" << json::response
+ << "' parameter.");
return false;
}
return true;
@@ -109,9 +197,8 @@ class QueryAppsDataValidator {
smart_objects::SmartArray* objects_array = data_[json::response].asArray();
if (!objects_array) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "QueryApps response is not array.");
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "QueryApps response is not array.");
return false;
}
@@ -125,16 +212,15 @@ class QueryAppsDataValidator {
const smart_objects::SmartObject& app_data = *applications_iterator;
if (!app_data.isValid()) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "Wrong application data in json file.");
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "Wrong application data in json file.");
return false;
}
if (!CheckMandatoryParametersPresent(app_data)) {
- LOG4CXX_WARN(logger_,
- "Application hasn`t some of mandatory parameters. "
- "Application will be skipped.");
+ SDL_LOG_WARN(
+ "Application hasn`t some of mandatory parameters. "
+ "Application will be skipped.");
applications_iterator = objects_array->erase(applications_iterator);
continue;
@@ -153,12 +239,11 @@ class QueryAppsDataValidator {
if (json::ios == os_type) {
if (app_data[json::ios][json::urlScheme].asString().length() >
kUrlSchemaLengthMax) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
kQueryAppsValidationFailedPrefix
- << "An urlscheme length exceeds maximum allowed ["
- << app_data[json::ios][json::urlScheme].asString().length()
- << "]>[" << kUrlSchemaLengthMax << "]");
+ << "An urlscheme length exceeds maximum allowed ["
+ << app_data[json::ios][json::urlScheme].asString().length()
+ << "]>[" << kUrlSchemaLengthMax << "]");
return false;
}
}
@@ -166,23 +251,20 @@ class QueryAppsDataValidator {
if (json::android == os_type) {
if (app_data[json::android][json::packageName].asString().length() >
kPackageNameLengthMax) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "Package name length ["
- << app_data[json::android][json::packageName]
- .asString()
- .length()
- << "] exceeds max length [" << kPackageNameLengthMax
- << "]in json file.");
+ SDL_LOG_WARN(
+ kQueryAppsValidationFailedPrefix
+ << "Package name length ["
+ << app_data[json::android][json::packageName].asString().length()
+ << "] exceeds max length [" << kPackageNameLengthMax
+ << "]in json file.");
return false;
}
}
// Languages verification
if (!app_data[os_type].keyExists(json::languages)) {
- LOG4CXX_WARN(
- logger_,
- kQueryAppsValidationFailedPrefix << "'languages' doesn't exist");
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "'languages' doesn't exist");
return false;
}
if (!ValidateLanguages(app_data[os_type][json::languages],
@@ -199,18 +281,16 @@ class QueryAppsDataValidator {
// Verify appid length
const std::string app_id(app_data[json::appId].asString());
if (app_id.length() > kAppIdLengthMax) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "An Object ID length exceeds maximum allowed ["
- << app_id.length() << "]>[" << kAppIdLengthMax << "]");
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "An Object ID length exceeds maximum allowed ["
+ << app_id.length() << "]>[" << kAppIdLengthMax << "]");
return false;
}
// Verify that appid is unique
if (applications_id_set_.find(app_id) != applications_id_set_.end()) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "An Object ID is not unigue [" << app_id << "]");
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "An Object ID is not unigue [" << app_id << "]");
return false;
}
applications_id_set_.insert(app_id);
@@ -219,18 +299,15 @@ class QueryAppsDataValidator {
ApplicationSharedPtr registered_app =
manager_.application_by_policy_id(app_id);
if (registered_app) {
- LOG4CXX_INFO(
- logger_,
- "Application with the id: " << app_id << " is already registered.");
+ SDL_LOG_INFO("Application with the id: " << app_id
+ << " is already registered.");
}
// And app name length
const std::string appName(app_data[json::name].asString());
if (appName.length() > kAppNameLengthMax) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "Name of application exceeds maximum allowed ["
- << appName.length() << "]>[" << kAppNameLengthMax
- << "].");
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "Name of application exceeds maximum allowed ["
+ << appName.length() << "]>[" << kAppNameLengthMax << "].");
return false;
}
return true;
@@ -241,33 +318,29 @@ class QueryAppsDataValidator {
bool default_language_found = false;
const size_t languages_array_size = languages.length();
if (languages_array_size > kLanguageArraySizeMax) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "'languages' array exceeds max size ["
- << languages_array_size << "]>[" << kLanguageArraySizeMax
- << "]");
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "'languages' array exceeds max size ["
+ << languages_array_size << "]>[" << kLanguageArraySizeMax
+ << "]");
return false;
}
// Every language has ttsname string and vrsynonyms array
for (size_t idx = 0; idx < languages_array_size; ++idx) {
const smart_objects::SmartObject& language = languages.getElement(idx);
if (smart_objects::SmartType_Map != language.getType()) {
- LOG4CXX_WARN(
- logger_,
- kQueryAppsValidationFailedPrefix << "language is not a map.");
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "language is not a map.");
return false;
}
if (language.length() != 1) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "language map size is not equal 1.");
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "language map size is not equal 1.");
return false;
}
const std::string language_name = (*language.map_begin()).first;
if (!language_name.length()) {
- LOG4CXX_WARN(
- logger_,
- kQueryAppsValidationFailedPrefix << "language name is empty");
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "language name is empty");
return false;
}
// Verify default language defined
@@ -280,9 +353,8 @@ class QueryAppsDataValidator {
}
// ttsName verification
if (!language[language_name].keyExists(json::ttsName)) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "'languages.ttsName' doesn't exist");
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "'languages.ttsName' doesn't exist");
return false;
}
const smart_objects::SmartObject& ttsNameObject =
@@ -292,17 +364,15 @@ class QueryAppsDataValidator {
const std::string ttsName =
language[language_name][json::ttsName].asString();
if (ttsName.length() > kTtsNameLengthMax) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "ttsName string exceeds max length ["
- << ttsName.length() << "]>[" << kTtsNameLengthMax
- << "]");
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "ttsName string exceeds max length ["
+ << ttsName.length() << "]>[" << kTtsNameLengthMax
+ << "]");
return false;
}
} else {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "ttsName is not the string type.");
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << "ttsName is not the string type.");
return false;
}
@@ -311,109 +381,10 @@ class QueryAppsDataValidator {
}
}
if (!default_language_found) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << " 'languages'.default' doesn't exist");
- return false;
- }
- return true;
- }
-
- bool ValidateSynonymsAtLanguage(const smart_objects::SmartObject& language,
- const std::string& language_name,
- SynonymsMap& synonyms_map) const {
- if (!language[language_name].keyExists(json::vrSynonyms)) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "'languages.vrSynonyms' doesn't exist");
- return false;
- }
- const smart_objects::SmartArray* synonyms_array =
- language[language_name][json::vrSynonyms].asArray();
- if (!synonyms_array) {
- LOG4CXX_WARN(
- logger_,
- kQueryAppsValidationFailedPrefix << "vrSynonyms is not array.");
- return false;
- }
- const size_t synonyms_array_size = synonyms_array->size();
- if (synonyms_array_size < kVrArraySizeMin) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "vrSynomyms array has [" << synonyms_array_size
- << "] size < allowed min size [" << kVrArraySizeMin
- << "]");
+ SDL_LOG_WARN(kQueryAppsValidationFailedPrefix
+ << " 'languages'.default' doesn't exist");
return false;
}
- if (synonyms_array_size > kVrArraySizeMax) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "vrSynomyms array size [" << synonyms_array_size
- << "] exceeds maximum allowed size [" << kVrArraySizeMax
- << "]");
- return false;
- }
-
- for (std::size_t idx = 0; idx < synonyms_array_size; ++idx) {
- const smart_objects::SmartObject& synonym = (*synonyms_array)[idx];
- const std::string vrSynonym = synonym.asString();
- if (vrSynonym.length() > kVrSynonymLengthMax) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "vrSYnomym item [" << idx
- << "] exceeds max length [" << vrSynonym.length()
- << "]>[" << kVrSynonymLengthMax << "]");
- return false;
- }
- if (vrSynonym.length() < kVrSynonymLengthMin) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "vrSYnomym item [" << idx << "] length ["
- << vrSynonym.length() << "] is less then min length ["
- << kVrSynonymLengthMin << "] allowed.");
- return false;
- }
- // Verify duplicates
- SynonymsMap::iterator synonyms_map_iter =
- synonyms_map.find(language_name);
- if (synonyms_map_iter != synonyms_map.end()) {
- if (!(*synonyms_map_iter).second.insert(vrSynonym).second) {
- LOG4CXX_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "vrSYnomym item already defined ["
- << vrSynonym.c_str() << "] for language ["
- << language_name << "]");
- return false;
- }
- }
- }
- return true;
- }
-
- bool CheckMandatoryParametersPresent(
- const smart_objects::SmartObject& app_data) const {
- if (!app_data.keyExists(json::android) && !app_data.keyExists(json::ios)) {
- return false;
- }
-
- if (app_data.keyExists(json::android) &&
- !app_data[json::android].keyExists(json::packageName)) {
- return false;
- }
-
- if (app_data.keyExists(json::ios) &&
- !app_data[json::ios].keyExists(json::urlScheme)) {
- return false;
- }
-
- if (!app_data.keyExists(json::appId)) {
- return false;
- }
-
- if (!app_data.keyExists(json::name)) {
- return false;
- }
-
return true;
}
@@ -449,13 +420,13 @@ SystemRequest::SystemRequest(
SystemRequest::~SystemRequest() {}
void SystemRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr application =
application_manager_.application(connection_key());
if (application.use_count() == 0) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -473,14 +444,12 @@ void SystemRequest::Run() {
if (!policy_handler.IsRequestTypeAllowed(
application->device(), application->policy_app_id(), request_type)) {
- LOG4CXX_ERROR(logger_,
- "RequestType " << stringified_request_type
+ SDL_LOG_ERROR("RequestType " << stringified_request_type
<< " is DISALLOWED by policies");
SendResponse(false, mobile_apis::Result::DISALLOWED);
return;
}
- LOG4CXX_TRACE(logger_,
- "RequestType " << stringified_request_type << " is ALLOWED");
+ SDL_LOG_TRACE("RequestType " << stringified_request_type << " is ALLOWED");
const bool request_subtype_present =
(*message_)[strings::msg_params].keyExists(strings::request_subtype);
@@ -489,17 +458,15 @@ void SystemRequest::Run() {
(*message_)[strings::msg_params][strings::request_subtype].asString();
if (!policy_handler.IsRequestSubTypeAllowed(application->policy_app_id(),
request_subtype)) {
- LOG4CXX_ERROR(logger_,
- "Request subtype: " << request_subtype
+ SDL_LOG_ERROR("Request subtype: " << request_subtype
<< " is DISALLOWED by policies");
SendResponse(false, mobile_apis::Result::DISALLOWED);
return;
}
- LOG4CXX_TRACE(logger_,
- "Request subtype: " << request_subtype << " is ALLOWED");
+ SDL_LOG_TRACE("Request subtype: " << request_subtype << " is ALLOWED");
}
- std::string file_name = kSYNC;
+ std::string file_name;
if ((*message_)[strings::msg_params].keyExists(strings::file_name)) {
file_name = (*message_)[strings::msg_params][strings::file_name].asString();
} else {
@@ -507,8 +474,7 @@ void SystemRequest::Run() {
}
if (!CheckSyntax(file_name)) {
- LOG4CXX_ERROR(logger_,
- "Incoming request contains \t\n \\t \\n or whitespace");
+ SDL_LOG_ERROR("Incoming request contains \t\n \\t \\n or whitespace");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -516,7 +482,7 @@ void SystemRequest::Run() {
if (!file_system::IsFileNameValid(file_name) &&
mobile_apis::RequestType::ICON_URL != request_type) {
const std::string err_msg = "Sync file name contains forbidden symbols.";
- LOG4CXX_ERROR(logger_, err_msg);
+ SDL_LOG_ERROR(err_msg);
SendResponse(false, mobile_apis::Result::INVALID_DATA, err_msg.c_str());
return;
}
@@ -547,7 +513,7 @@ void SystemRequest::Run() {
SendResponse(false, mobile_apis::Result::INVALID_DATA, err_msg.c_str());
return;
}
- LOG4CXX_DEBUG(logger_, "Got ICON_URL Request. File name: " << file_name);
+ SDL_LOG_DEBUG("Got ICON_URL Request. File name: " << file_name);
} else {
binary_data_folder =
application_manager_.get_settings().system_files_path();
@@ -566,13 +532,12 @@ void SystemRequest::Run() {
file_dst_path += file_name;
if ((*message_)[strings::params].keyExists(strings::binary_data)) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Binary data is present. Trying to save it to: " << binary_data_folder);
if (mobile_apis::Result::SUCCESS !=
(application_manager_.SaveBinary(
binary_data, binary_data_folder, file_name, 0))) {
- LOG4CXX_DEBUG(logger_, "Binary data can't be saved.");
+ SDL_LOG_DEBUG("Binary data can't be saved.");
SendResponse(false, mobile_apis::Result::GENERIC_ERROR);
return;
}
@@ -580,23 +545,22 @@ void SystemRequest::Run() {
std::string app_full_file_path = binary_data_folder;
app_full_file_path += file_name;
- LOG4CXX_DEBUG(logger_,
- "Binary data is not present. Trying to find file "
- << file_name << " within previously saved app file in "
- << binary_data_folder);
+ SDL_LOG_DEBUG("Binary data is not present. Trying to find file "
+ << file_name << " within previously saved app file in "
+ << binary_data_folder);
const application_manager::AppFile* file =
application->GetFile(app_full_file_path);
if (!file || !file->is_download_complete ||
!file_system::MoveFile(app_full_file_path, file_dst_path)) {
- LOG4CXX_DEBUG(logger_, "Binary data not found.");
+ SDL_LOG_DEBUG("Binary data not found.");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
processing_file_ = file_dst_path;
}
- LOG4CXX_DEBUG(logger_, "Binary data ok.");
+ SDL_LOG_DEBUG("Binary data ok.");
if (mobile_apis::RequestType::ICON_URL == request_type) {
application_manager_.SetIconFileFromSystemRequest(file_name);
@@ -620,7 +584,7 @@ void SystemRequest::Run() {
Json::Value root;
if (!reader.parse(json, &root)) {
- LOG4CXX_DEBUG(logger_, "Unable to parse query_app json file. ");
+ SDL_LOG_DEBUG("Unable to parse query_app json file. ");
return;
}
@@ -662,7 +626,7 @@ void SystemRequest::Run() {
}
void SystemRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
const smart_objects::SmartObject& message = event.smart_object();
@@ -683,7 +647,7 @@ void SystemRequest::on_event(const event_engine::Event& event) {
application_manager_.application(connection_key());
if (application.use_count() == 0) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
return;
}
@@ -696,7 +660,7 @@ void SystemRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
@@ -705,16 +669,14 @@ void SystemRequest::on_event(const event_engine::Event& event) {
bool SystemRequest::ValidateQueryAppData(
smart_objects::SmartObject& data) const {
if (!data.isValid()) {
- LOG4CXX_ERROR(
- logger_,
- kQueryAppsValidationFailedPrefix << "QueryApps response is not valid.");
+ SDL_LOG_ERROR(kQueryAppsValidationFailedPrefix
+ << "QueryApps response is not valid.");
return false;
}
if (!data.keyExists(json::response)) {
- LOG4CXX_ERROR(logger_,
- kQueryAppsValidationFailedPrefix
- << "QueryApps response does not contain '"
- << json::response << "' parameter.");
+ SDL_LOG_ERROR(kQueryAppsValidationFailedPrefix
+ << "QueryApps response does not contain '" << json::response
+ << "' parameter.");
return false;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_response.cc
index 428901a1c5..00b0cd3b5e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SystemResponse::SystemResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ SystemResponse::SystemResponse(
SystemResponse::~SystemResponse() {}
void SystemResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_request.cc
index 3ba0513aeb..14b316f374 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_request.cc
@@ -40,20 +40,17 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
void UnregisterAppInterfaceRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!application_manager_.application(connection_key())) {
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
return;
}
- rpc_service_.ManageMobileCommand(
- MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- connection_key(),
- mobile_api::AppInterfaceUnregisteredReason::INVALID_ENUM),
- SOURCE_SDL);
application_manager_.EndNaviServices(connection_key());
application_manager_.UnregisterApplication(connection_key(),
mobile_apis::Result::SUCCESS);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_response.cc
index 7c90639968..28d05bef73 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unregister_app_interface_response.cc
@@ -38,8 +38,10 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
void UnregisterAppInterfaceResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendResponse((*message_)[strings::msg_params][strings::success].asBool());
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_request.cc
index ec8de68c9e..69f85568eb 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_request.cc
@@ -41,6 +41,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
namespace str = strings;
UnsubscribeButtonRequest::UnsubscribeButtonRequest(
@@ -58,12 +60,12 @@ UnsubscribeButtonRequest::UnsubscribeButtonRequest(
UnsubscribeButtonRequest::~UnsubscribeButtonRequest() {}
void UnsubscribeButtonRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "APPLICATION_NOT_REGISTERED");
+ SDL_LOG_ERROR("APPLICATION_NOT_REGISTERED");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -78,23 +80,22 @@ void UnsubscribeButtonRequest::Run() {
bool play_pause_supported =
CheckHMICapabilities(mobile_apis::ButtonName::PLAY_PAUSE);
if (play_pause_supported) {
- LOG4CXX_DEBUG(logger_, "Converting Legacy OK button to PLAY_PAUSE");
+ SDL_LOG_DEBUG("Converting Legacy OK button to PLAY_PAUSE");
btn_id = mobile_apis::ButtonName::PLAY_PAUSE;
(*message_)[str::msg_params][str::button_name] = btn_id;
} else if (!ok_supported) {
- LOG4CXX_ERROR(logger_, "OK button isn't allowed by HMI capabilities");
+ SDL_LOG_ERROR("OK button isn't allowed by HMI capabilities");
SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
}
} else if (!CheckHMICapabilities(btn_id)) {
- LOG4CXX_ERROR(logger_,
- "Button " << btn_id << " isn't allowed by HMI capabilities");
+ SDL_LOG_ERROR("Button " << btn_id << " isn't allowed by HMI capabilities");
SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
return;
}
if (!app->UnsubscribeFromButton(
static_cast<mobile_apis::ButtonName::eType>(btn_id))) {
- LOG4CXX_ERROR(logger_, "App doesn't subscribe to button " << btn_id);
+ SDL_LOG_ERROR("App doesn't subscribe to button " << btn_id);
SendResponse(false, mobile_apis::Result::IGNORED);
return;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_response.cc
index c69d49bca1..8321840899 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_button_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UnsubscribeButtonResponse::UnsubscribeButtonResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,12 +56,12 @@ UnsubscribeButtonResponse::UnsubscribeButtonResponse(
UnsubscribeButtonResponse::~UnsubscribeButtonResponse() {}
void UnsubscribeButtonResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// check if response false
if (true == (*message_)[strings::msg_params].keyExists(strings::success)) {
if ((*message_)[strings::msg_params][strings::success].asBool() == false) {
- LOG4CXX_ERROR(logger_, "Success = false");
+ SDL_LOG_ERROR("Success = false");
SendResponse(false);
return;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_request.cc
index 17326a99a0..545a36def8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_request.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UnsubscribeWayPointsRequest::UnsubscribeWayPointsRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,19 +56,18 @@ UnsubscribeWayPointsRequest::UnsubscribeWayPointsRequest(
UnsubscribeWayPointsRequest::~UnsubscribeWayPointsRequest() {}
void UnsubscribeWayPointsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_,
- "An application with connection key "
- << connection_key() << " is not registered.");
+ SDL_LOG_ERROR("An application with connection key "
+ << connection_key() << " is not registered.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
- if (!application_manager_.IsAppSubscribedForWayPoints(app)) {
+ if (!application_manager_.IsAppSubscribedForWayPoints(*app)) {
SendResponse(false, mobile_apis::Result::IGNORED);
return;
}
@@ -88,12 +89,12 @@ void UnsubscribeWayPointsRequest::Run() {
}
void UnsubscribeWayPointsRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints: {
- LOG4CXX_INFO(logger_, "Received Navigation_UnsubscribeWayPoints event");
+ SDL_LOG_INFO("Received Navigation_UnsubscribeWayPoints event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
const hmi_apis::Common_Result::eType result_code =
static_cast<hmi_apis::Common_Result::eType>(
@@ -112,7 +113,7 @@ void UnsubscribeWayPointsRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
break;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_response.cc
index a7a180fb46..beb7ef695d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_way_points_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UnsubscribeWayPointsResponse::UnsubscribeWayPointsResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -54,7 +56,7 @@ UnsubscribeWayPointsResponse::UnsubscribeWayPointsResponse(
UnsubscribeWayPointsResponse::~UnsubscribeWayPointsResponse() {}
void UnsubscribeWayPointsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_request.cc
index 8c2cce9765..3da9206184 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_request.cc
@@ -46,6 +46,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
namespace custom_str = utils::custom_string;
UpdateTurnListRequest::UpdateTurnListRequest(
@@ -63,20 +65,19 @@ UpdateTurnListRequest::UpdateTurnListRequest(
UpdateTurnListRequest::~UpdateTurnListRequest() {}
void UpdateTurnListRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(
(*message_)[strings::params][strings::connection_key].asUInt());
if (!app) {
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- LOG4CXX_ERROR(logger_, "Application is not registered");
+ SDL_LOG_ERROR("Application is not registered");
return;
}
if (IsWhiteSpaceExist()) {
- LOG4CXX_ERROR(logger_,
- "Incoming update turn list has contains \t\n \\t \\n");
+ SDL_LOG_ERROR("Incoming update turn list has contains \t\n \\t \\n");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -90,7 +91,7 @@ void UpdateTurnListRequest::Run() {
application_manager_);
if (mobile_apis::Result::SUCCESS != processing_result) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA!");
+ SDL_LOG_ERROR("INVALID_DATA!");
SendResponse(false, processing_result);
return;
}
@@ -104,21 +105,18 @@ void UpdateTurnListRequest::Run() {
MessageHelper::VerifyImage(turn_list_array[i][strings::turn_icon],
app,
application_manager_))) {
- LOG4CXX_ERROR(logger_,
- "MessageHelper::VerifyImage return INVALID_DATA");
+ SDL_LOG_ERROR("MessageHelper::VerifyImage return INVALID_DATA");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
}
}
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params = (*message_)[strings::msg_params];
+ smart_objects::SmartObject msg_params = (*message_)[strings::msg_params];
if ((*message_)[strings::msg_params].keyExists(strings::turn_list)) {
if (!CheckTurnListArray()) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA!");
+ SDL_LOG_ERROR("INVALID_DATA!");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -152,18 +150,18 @@ void UpdateTurnListRequest::Run() {
hmi_apis::FunctionID::Navigation_UpdateTurnList, &msg_params, true);
} else {
// conditional mandatory
- LOG4CXX_ERROR(logger_, "INVALID_DATA!");
+ SDL_LOG_ERROR("INVALID_DATA!");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
}
}
void UpdateTurnListRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::Navigation_UpdateTurnList: {
- LOG4CXX_INFO(logger_, "Received Navigation_UpdateTurnList event");
+ SDL_LOG_INFO("Received Navigation_UpdateTurnList event");
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
const hmi_apis::Common_Result::eType result_code =
static_cast<hmi_apis::Common_Result::eType>(
@@ -179,7 +177,7 @@ void UpdateTurnListRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
break;
}
}
@@ -204,7 +202,7 @@ bool UpdateTurnListRequest::CheckTurnListArray() {
}
bool UpdateTurnListRequest::IsWhiteSpaceExist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const char* str = NULL;
if ((*message_)[strings::msg_params].keyExists(strings::turn_list)) {
@@ -218,8 +216,7 @@ bool UpdateTurnListRequest::IsWhiteSpaceExist() {
if ((*it_tl).keyExists(strings::navigation_text)) {
str = (*it_tl)[strings::navigation_text].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Invalid turn_list navigation_text text syntax check failed");
return true;
}
@@ -228,8 +225,8 @@ bool UpdateTurnListRequest::IsWhiteSpaceExist() {
if ((*it_tl).keyExists(strings::turn_icon)) {
str = (*it_tl)[strings::turn_icon][strings::value].asCharArray();
if (!CheckSyntax(str)) {
- LOG4CXX_ERROR(
- logger_, "Invalid turn_list turn_icon value syntax check failed");
+ SDL_LOG_ERROR(
+ "Invalid turn_list turn_icon value syntax check failed");
return true;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc
index eca9e3703c..bedf91b45c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UpdateTurnListResponse::UpdateTurnListResponse(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -55,7 +57,7 @@ UpdateTurnListResponse::UpdateTurnListResponse(
UpdateTurnListResponse::~UpdateTurnListResponse() {}
void UpdateTurnListResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/extensions/system_capability_app_extension.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/extensions/system_capability_app_extension.cc
index 5ffbbd83bb..311ba5d4aa 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/extensions/system_capability_app_extension.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/extensions/system_capability_app_extension.cc
@@ -1,9 +1,12 @@
#include "sdl_rpc_plugin/extensions/system_capability_app_extension.h"
+#include "application_manager/smart_object_keys.h"
namespace sdl_rpc_plugin {
-CREATE_LOGGERPTR_GLOBAL(logger_, "GetSystemCapabilitiesAppExtension")
+SDL_CREATE_LOG_VARIABLE("GetSystemCapabilitiesAppExtension")
namespace app_mngr_ = application_manager;
+namespace strings = app_mngr::strings;
+
const app_mngr_::AppExtensionUID
SystemCapabilityAppExtension::SystemCapabilityAppExtensionUID = 200;
@@ -18,16 +21,14 @@ SystemCapabilityAppExtension::~SystemCapabilityAppExtension() {}
bool SystemCapabilityAppExtension::SubscribeTo(
const SystemCapabilityType system_capability_type) {
- LOG4CXX_INFO(logger_,
- "Subscribing to System Capability " << system_capability_type);
+ SDL_LOG_INFO("Subscribing to System Capability " << system_capability_type);
return subscribed_data_.insert(system_capability_type).second;
}
bool SystemCapabilityAppExtension::UnsubscribeFrom(
const SystemCapabilityType system_capability_type) {
- LOG4CXX_INFO(
- logger_,
- "Unsubscribing from System Capability " << system_capability_type);
+ SDL_LOG_INFO("Unsubscribing from System Capability "
+ << system_capability_type);
auto it = subscribed_data_.find(system_capability_type);
if (it != subscribed_data_.end()) {
subscribed_data_.erase(it);
@@ -37,13 +38,13 @@ bool SystemCapabilityAppExtension::UnsubscribeFrom(
}
void SystemCapabilityAppExtension::UnsubscribeFromAll() {
- LOG4CXX_INFO(logger_, "Unsubscribing from ALL System Capabilities");
+ SDL_LOG_INFO("Unsubscribing from ALL System Capabilities");
subscribed_data_.clear();
}
bool SystemCapabilityAppExtension::IsSubscribedTo(
const SystemCapabilityType system_capability_type) const {
- LOG4CXX_DEBUG(logger_, system_capability_type);
+ SDL_LOG_DEBUG(system_capability_type);
return subscribed_data_.find(system_capability_type) !=
subscribed_data_.end();
}
@@ -53,39 +54,49 @@ SystemCapabilitySubscriptions SystemCapabilityAppExtension::Subscriptions() {
}
void SystemCapabilityAppExtension::SaveResumptionData(
- ns_smart_device_link::ns_smart_objects::SmartObject& resumption_data) {
- LOG4CXX_AUTO_TRACE(logger_);
- const char* application_system_capability = "systemCapability";
+ smart_objects::SmartObject& resumption_data) {
+ SDL_LOG_AUTO_TRACE();
- resumption_data[application_system_capability] =
+ resumption_data[strings::system_capability] =
smart_objects::SmartObject(smart_objects::SmartType_Array);
int i = 0;
for (const auto& subscription : subscribed_data_) {
- resumption_data[application_system_capability][i] = subscription;
+ resumption_data[strings::system_capability][i] = subscription;
i++;
}
}
void SystemCapabilityAppExtension::ProcessResumption(
- const smart_objects::SmartObject& resumption_data) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- const char* application_system_capability = "systemCapability";
- if (resumption_data.keyExists(application_system_capability)) {
- const smart_objects::SmartObject& subscriptions =
- resumption_data[application_system_capability];
- for (size_t i = 0; i < subscriptions.length(); ++i) {
- SystemCapabilityType capability_type =
- static_cast<SystemCapabilityType>((resumption_data[i]).asInt());
+ const smart_objects::SmartObject& saved_app) {
+ SDL_LOG_AUTO_TRACE();
+
+ const smart_objects::SmartObject& subscriptions =
+ saved_app[strings::application_subscriptions];
+
+ if (saved_app.keyExists(strings::system_capability)) {
+ const auto& system_capability_subscriptions =
+ subscriptions[strings::system_capability];
+ for (size_t i = 0; i < system_capability_subscriptions.length(); ++i) {
+ SystemCapabilityType capability_type = static_cast<SystemCapabilityType>(
+ (system_capability_subscriptions[i]).asInt());
SubscribeTo(capability_type);
}
}
}
+void SystemCapabilityAppExtension::RevertResumption(
+ const smart_objects::SmartObject& subscriptions) {
+ SDL_LOG_AUTO_TRACE();
+
+ // No need to revert subscriptions here when an app gets RESUME_FAILED
+ // System capability subscriptions should still be active
+ UNUSED(subscriptions);
+}
+
SystemCapabilityAppExtension& SystemCapabilityAppExtension::ExtractExtension(
app_mngr_::Application& app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto ext_ptr = app.QueryInterface(
SystemCapabilityAppExtension::SystemCapabilityAppExtensionUID);
DCHECK(ext_ptr);
@@ -95,4 +106,4 @@ SystemCapabilityAppExtension& SystemCapabilityAppExtension::ExtractExtension(
DCHECK(app_extension);
return *app_extension;
}
-} // namespace sdl_rpc_plugin \ No newline at end of file
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc
index b89a8dbd68..570a4ce12e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc
@@ -135,6 +135,8 @@
#include "sdl_rpc_plugin/commands/hmi/ui_show_response.h"
#include "sdl_rpc_plugin/commands/hmi/ui_slider_request.h"
#include "sdl_rpc_plugin/commands/hmi/ui_slider_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_subtle_alert_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_subtle_alert_response.h"
#include "sdl_rpc_plugin/commands/hmi/update_app_list_request.h"
#include "sdl_rpc_plugin/commands/hmi/update_app_list_response.h"
#include "sdl_rpc_plugin/commands/hmi/update_device_list_request.h"
@@ -229,7 +231,10 @@
#include "sdl_rpc_plugin/commands/hmi/on_ui_keyboard_input_notification.h"
#include "sdl_rpc_plugin/commands/hmi/on_ui_language_change_notification.h"
#include "sdl_rpc_plugin/commands/hmi/on_ui_reset_timeout_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ui_subtle_alert_pressed_notification.h"
#include "sdl_rpc_plugin/commands/hmi/on_ui_touch_event_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ui_update_file_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ui_update_sub_menu_notification.h"
#include "sdl_rpc_plugin/commands/hmi/on_vr_command_notification.h"
#include "sdl_rpc_plugin/commands/hmi/on_vr_language_change_notification.h"
#include "sdl_rpc_plugin/commands/hmi/on_vr_started_notification.h"
@@ -265,7 +270,7 @@
namespace sdl_rpc_plugin {
using namespace application_manager;
-CREATE_LOGGERPTR_GLOBAL(logger_, "HMICommandFactory")
+SDL_CREATE_LOG_VARIABLE("HMICommandFactory")
HMICommandFactory::HMICommandFactory(
ApplicationManager& application_manager,
@@ -283,20 +288,20 @@ CommandSharedPtr HMICommandFactory::CreateCommand(
const hmi_apis::FunctionID::eType function_id =
static_cast<hmi_apis::FunctionID::eType>(
(*message)[strings::params][strings::function_id].asInt());
- LOG4CXX_DEBUG(
- logger_, "HMICommandFactory::CreateCommand function_id: " << function_id);
+ SDL_LOG_DEBUG(
+ "HMICommandFactory::CreateCommand function_id: " << function_id);
const hmi_apis::messageType::eType message_type =
static_cast<hmi_apis::messageType::eType>(
(*message)[strings::params][strings::message_type].asInt());
if (hmi_apis::messageType::response == message_type) {
- LOG4CXX_DEBUG(logger_, "HMICommandFactory::CreateCommand response");
+ SDL_LOG_DEBUG("HMICommandFactory::CreateCommand response");
} else if ((*message)[strings::params][strings::message_type] ==
hmi_apis::messageType::error_response) {
- LOG4CXX_DEBUG(logger_, "HMICommandFactory::CreateCommand error response");
+ SDL_LOG_DEBUG("HMICommandFactory::CreateCommand error response");
} else {
- LOG4CXX_DEBUG(logger_, "HMICommandFactory::CreateCommand request");
+ SDL_LOG_DEBUG("HMICommandFactory::CreateCommand request");
}
return get_creator_factory(function_id, message_type, source).create(message);
@@ -511,6 +516,11 @@ CommandCreator& HMICommandFactory::get_creator_factory(
? factory.GetCreator<commands::UIAlertRequest>()
: factory.GetCreator<commands::UIAlertResponse>();
}
+ case hmi_apis::FunctionID::UI_SubtleAlert: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UISubtleAlertRequest>()
+ : factory.GetCreator<commands::UISubtleAlertResponse>();
+ }
case hmi_apis::FunctionID::VR_IsReady: {
return hmi_apis::messageType::request == message_type
? factory.GetCreator<commands::VRIsReadyRequest>()
@@ -923,6 +933,15 @@ CommandCreator& HMICommandFactory::get_creator_factory(
case hmi_apis::FunctionID::BasicCommunication_OnAppPropertiesChange: {
return factory.GetCreator<commands::OnAppPropertiesChangeNotification>();
}
+ case hmi_apis::FunctionID::UI_OnUpdateFile: {
+ return factory.GetCreator<commands::OnUIUpdateFileNotification>();
+ }
+ case hmi_apis::FunctionID::UI_OnUpdateSubMenu: {
+ return factory.GetCreator<commands::OnUIUpdateSubMenuNotification>();
+ }
+ case hmi_apis::FunctionID::UI_OnSubtleAlertPressed: {
+ return factory.GetCreator<commands::OnUISubtleAlertPressedNotification>();
+ }
default: { return factory.GetCreator<InvalidCommand>(); }
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/mobile_command_factory.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/mobile_command_factory.cc
index c6f4b64636..d2f1325c82 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/mobile_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/mobile_command_factory.cc
@@ -31,6 +31,7 @@
*/
#include "sdl_rpc_plugin/mobile_command_factory.h"
+
#include "interfaces/MOBILE_API.h"
#include "sdl_rpc_plugin/commands/mobile/add_command_request.h"
#include "sdl_rpc_plugin/commands/mobile/add_command_response.h"
@@ -87,10 +88,13 @@
#include "sdl_rpc_plugin/commands/mobile/on_keyboard_input_notification.h"
#include "sdl_rpc_plugin/commands/mobile/on_language_change_notification.h"
#include "sdl_rpc_plugin/commands/mobile/on_permissions_change_notification.h"
+#include "sdl_rpc_plugin/commands/mobile/on_subtle_alert_pressed_notification.h"
#include "sdl_rpc_plugin/commands/mobile/on_system_capability_updated_notification.h"
#include "sdl_rpc_plugin/commands/mobile/on_system_request_notification.h"
#include "sdl_rpc_plugin/commands/mobile/on_tbt_client_state_notification.h"
#include "sdl_rpc_plugin/commands/mobile/on_touch_event_notification.h"
+#include "sdl_rpc_plugin/commands/mobile/on_update_file_notification.h"
+#include "sdl_rpc_plugin/commands/mobile/on_update_sub_menu_notification.h"
#include "sdl_rpc_plugin/commands/mobile/on_way_point_change_notification.h"
#include "sdl_rpc_plugin/commands/mobile/perform_audio_pass_thru_request.h"
#include "sdl_rpc_plugin/commands/mobile/perform_audio_pass_thru_response.h"
@@ -132,6 +136,8 @@
#include "sdl_rpc_plugin/commands/mobile/subscribe_button_response.h"
#include "sdl_rpc_plugin/commands/mobile/subscribe_way_points_request.h"
#include "sdl_rpc_plugin/commands/mobile/subscribe_way_points_response.h"
+#include "sdl_rpc_plugin/commands/mobile/subtle_alert_request.h"
+#include "sdl_rpc_plugin/commands/mobile/subtle_alert_response.h"
#include "sdl_rpc_plugin/commands/mobile/system_request.h"
#include "sdl_rpc_plugin/commands/mobile/system_response.h"
#include "sdl_rpc_plugin/commands/mobile/unregister_app_interface_request.h"
@@ -143,7 +149,7 @@
#include "sdl_rpc_plugin/commands/mobile/update_turn_list_request.h"
#include "sdl_rpc_plugin/commands/mobile/update_turn_list_response.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationManager")
+SDL_CREATE_LOG_VARIABLE("ApplicationManager")
namespace sdl_rpc_plugin {
using namespace application_manager;
@@ -222,6 +228,11 @@ CommandCreator& MobileCommandFactory::get_command_creator(
? factory.GetCreator<commands::AlertRequest>()
: factory.GetCreator<commands::AlertResponse>();
}
+ case mobile_apis::FunctionID::SubtleAlertID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::SubtleAlertRequest>()
+ : factory.GetCreator<commands::SubtleAlertResponse>();
+ }
case mobile_apis::FunctionID::SpeakID: {
return mobile_api::messageType::request == message_type
? factory.GetCreator<commands::SpeakRequest>()
@@ -458,6 +469,15 @@ CommandCreator& MobileCommandFactory::get_notification_creator(
case mobile_apis::FunctionID::OnWayPointChangeID: {
return factory.GetCreator<commands::OnWayPointChangeNotification>();
}
+ case mobile_apis::FunctionID::OnUpdateFileID: {
+ return factory.GetCreator<commands::OnUpdateFileNotification>();
+ }
+ case mobile_apis::FunctionID::OnUpdateSubMenuID: {
+ return factory.GetCreator<commands::OnUpdateSubMenuNotification>();
+ }
+ case mobile_apis::FunctionID::OnSubtleAlertPressedID: {
+ return factory.GetCreator<commands::OnSubtleAlertPressedNotification>();
+ }
default: {}
}
return factory.GetCreator<InvalidCommand>();
@@ -540,8 +560,7 @@ CommandSharedPtr MobileCommandFactory::CreateCommand(
static_cast<mobile_apis::FunctionID::eType>(
(*message)[strings::params][strings::function_id].asInt());
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"MobileCommandFactory::CreateCommand function_id: " << function_id);
return get_creator_factory(function_id, message_type, source).create(message);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_rpc_plugin.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_rpc_plugin.cc
index 2a1261f643..4756c8b9a2 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_rpc_plugin.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_rpc_plugin.cc
@@ -31,15 +31,21 @@
*/
#include "sdl_rpc_plugin/sdl_rpc_plugin.h"
+#include "application_manager/message_helper.h"
#include "application_manager/plugin_manager/plugin_keys.h"
#include "sdl_rpc_plugin/extensions/system_capability_app_extension.h"
#include "sdl_rpc_plugin/sdl_command_factory.h"
+#include "sdl_rpc_plugin/waypoints_app_extension.h"
+#include "sdl_rpc_plugin/waypoints_pending_resumption_handler.h"
namespace sdl_rpc_plugin {
namespace app_mngr = application_manager;
namespace plugins = application_manager::plugin_manager;
-CREATE_LOGGERPTR_GLOBAL(logger_, "SdlRPCPlugin")
+SDL_CREATE_LOG_VARIABLE("SdlRPCPlugin")
+
+SDLRPCPlugin::SDLRPCPlugin()
+ : application_manager_(nullptr), pending_resumption_handler_(nullptr) {}
bool SDLRPCPlugin::Init(app_mngr::ApplicationManager& app_manager,
app_mngr::rpc_service::RPCService& rpc_service,
@@ -47,6 +53,9 @@ bool SDLRPCPlugin::Init(app_mngr::ApplicationManager& app_manager,
policy::PolicyHandlerInterface& policy_handler,
resumption::LastStateWrapperPtr last_state) {
UNUSED(last_state);
+ application_manager_ = &app_manager;
+ pending_resumption_handler_ =
+ std::make_shared<WayPointsPendingResumptionHandler>(app_manager);
command_factory_.reset(new sdl_rpc_plugin::SDLCommandFactory(
app_manager, rpc_service, hmi_capabilities, policy_handler));
return true;
@@ -83,20 +92,56 @@ void SDLRPCPlugin::OnPolicyEvent(plugins::PolicyEvent event) {}
void SDLRPCPlugin::OnApplicationEvent(
plugins::ApplicationEvent event,
app_mngr::ApplicationSharedPtr application) {
+ SDL_LOG_AUTO_TRACE();
if (plugins::ApplicationEvent::kApplicationRegistered == event) {
+ application->AddExtension(
+ std::make_shared<WayPointsAppExtension>(*this, *application));
+
auto sys_cap_ext_ptr =
std::make_shared<SystemCapabilityAppExtension>(*this, *application);
application->AddExtension(sys_cap_ext_ptr);
// Processing automatic subscription to SystemCapabilities for DISPLAY type
const auto capability_type =
mobile_apis::SystemCapabilityType::eType::DISPLAYS;
- LOG4CXX_DEBUG(logger_, "Subscription to DISPLAYS capability is enabled");
+ SDL_LOG_DEBUG("Subscription to DISPLAYS capability is enabled");
sys_cap_ext_ptr->SubscribeTo(capability_type);
+
} else if (plugins::ApplicationEvent::kDeleteApplicationData == event) {
ClearSubscriptions(application);
}
}
+void SDLRPCPlugin::ProcessResumptionSubscription(
+ application_manager::Application& app, WayPointsAppExtension& ext) {
+ SDL_LOG_AUTO_TRACE();
+
+ pending_resumption_handler_->HandleResumptionSubscriptionRequest(ext, app);
+}
+
+void SDLRPCPlugin::SaveResumptionData(
+ application_manager::Application& app,
+ smart_objects::SmartObject& resumption_data) {
+ resumption_data[application_manager::strings::subscribed_for_way_points] =
+ application_manager_->IsAppSubscribedForWayPoints(app);
+}
+
+void SDLRPCPlugin::RevertResumption(application_manager::Application& app) {
+ SDL_LOG_AUTO_TRACE();
+
+ pending_resumption_handler_->OnResumptionRevert();
+
+ if (application_manager_->IsAppSubscribedForWayPoints(app)) {
+ application_manager_->UnsubscribeAppFromWayPoints(app.app_id());
+ if (!application_manager_->IsAnyAppSubscribedForWayPoints()) {
+ SDL_LOG_DEBUG("Send UnsubscribeWayPoints");
+ auto request =
+ application_manager::MessageHelper::CreateUnsubscribeWayPointsRequest(
+ application_manager_->GetNextHMICorrelationID());
+ application_manager_->GetRPCService().ManageHMICommand(request);
+ }
+ }
+}
+
void SDLRPCPlugin::ClearSubscriptions(app_mngr::ApplicationSharedPtr app) {
auto& ext = SystemCapabilityAppExtension::ExtractExtension(*app);
ext.UnsubscribeFromAll();
@@ -106,12 +151,12 @@ void SDLRPCPlugin::ClearSubscriptions(app_mngr::ApplicationSharedPtr app) {
extern "C" __attribute__((visibility("default")))
application_manager::plugin_manager::RPCPlugin*
-Create() {
+Create(logger::Logger* logger_instance) {
+ logger::Logger::instance(logger_instance);
return new sdl_rpc_plugin::SDLRPCPlugin();
}
extern "C" __attribute__((visibility("default"))) void Delete(
application_manager::plugin_manager::RPCPlugin* data) {
delete data;
- DELETE_THREAD_LOGGER(sdl_rpc_plugin::logger_);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/waypoints_app_extension.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/waypoints_app_extension.cc
new file mode 100644
index 0000000000..ed8283e1f9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/waypoints_app_extension.cc
@@ -0,0 +1,76 @@
+/*
+ Copyright (c) 2020, Ford Motor Company
+ All rights reserved.
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "sdl_rpc_plugin/waypoints_app_extension.h"
+#include "sdl_rpc_plugin/sdl_rpc_plugin.h"
+
+SDL_CREATE_LOG_VARIABLE("WayPointsAppExtension")
+
+namespace sdl_rpc_plugin {
+namespace strings = application_manager::strings;
+unsigned WayPointsAppExtension::WayPointsAppExtensionUID = 138;
+
+WayPointsAppExtension::WayPointsAppExtension(
+ SDLRPCPlugin& plugin, application_manager::Application& app)
+ : app_mngr::AppExtension(WayPointsAppExtension::WayPointsAppExtensionUID)
+ , plugin_(plugin)
+ , app_(app) {
+ SDL_LOG_AUTO_TRACE();
+}
+
+WayPointsAppExtension::~WayPointsAppExtension() {
+ SDL_LOG_AUTO_TRACE();
+}
+
+void WayPointsAppExtension::SaveResumptionData(
+ smart_objects::SmartObject& resumption_data) {
+ plugin_.SaveResumptionData(app_, resumption_data);
+}
+
+void WayPointsAppExtension::ProcessResumption(
+ const smart_objects::SmartObject& saved_app) {
+ SDL_LOG_AUTO_TRACE();
+
+ if (!saved_app.keyExists(strings::subscribed_for_way_points)) {
+ SDL_LOG_ERROR("subscribed_for_way_points section does not exist");
+ return;
+ }
+ const bool subscribed_for_way_points =
+ saved_app[strings::subscribed_for_way_points].asBool();
+ if (subscribed_for_way_points) {
+ plugin_.ProcessResumptionSubscription(app_, *this);
+ }
+}
+
+void WayPointsAppExtension::RevertResumption(
+ const smart_objects::SmartObject& resumption_data) {
+ SDL_LOG_AUTO_TRACE();
+ UNUSED(resumption_data);
+
+ plugin_.RevertResumption(app_);
+}
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/waypoints_pending_resumption_handler.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/waypoints_pending_resumption_handler.cc
new file mode 100644
index 0000000000..7aa6dd5273
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/waypoints_pending_resumption_handler.cc
@@ -0,0 +1,203 @@
+/*
+ Copyright (c) 2020, Ford Motor Company
+ All rights reserved.
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "sdl_rpc_plugin/waypoints_pending_resumption_handler.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/event_engine/event_observer.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/resumption/resumption_data_processor.h"
+#include "utils/helpers.h"
+
+namespace sdl_rpc_plugin {
+
+SDL_CREATE_LOG_VARIABLE("SdlRPCPlugin")
+
+using hmi_apis::FunctionID::Navigation_SubscribeWayPoints;
+
+WayPointsPendingResumptionHandler::WayPointsPendingResumptionHandler(
+ application_manager::ApplicationManager& application_manager)
+ : PendingResumptionHandler(application_manager) {}
+
+smart_objects::SmartObjectSPtr
+WayPointsPendingResumptionHandler::CreateSubscriptionRequest() {
+ SDL_LOG_AUTO_TRACE();
+
+ auto subscribe_waypoints_msg =
+ application_manager::MessageHelper::CreateMessageForHMI(
+ Navigation_SubscribeWayPoints,
+ application_manager_.GetNextHMICorrelationID());
+ (*subscribe_waypoints_msg)[application_manager::strings::params]
+ [application_manager::strings::message_type] =
+ hmi_apis::messageType::request;
+ return subscribe_waypoints_msg;
+}
+
+void WayPointsPendingResumptionHandler::SendPendingHMIRequest(
+ PendingRequest& pending_request) {
+ SDL_LOG_AUTO_TRACE();
+ using namespace application_manager;
+
+ SDL_LOG_DEBUG("Sending request with function id: "
+ << Navigation_SubscribeWayPoints
+ << " and correlation_id: " << pending_request.corr_id_);
+
+ auto request = MessageHelper::CreateMessageForHMI(
+ Navigation_SubscribeWayPoints, pending_request.corr_id_);
+ (*request)[strings::params][strings::message_type] =
+ hmi_apis::messageType::request;
+ subscribe_on_event(Navigation_SubscribeWayPoints, pending_request.corr_id_);
+ application_manager_.GetRPCService().ManageHMICommand(request);
+ pending_request.waiting_for_hmi_response_ = true;
+}
+
+void WayPointsPendingResumptionHandler::HandleResumptionSubscriptionRequest(
+ application_manager::AppExtension& extension,
+ application_manager::Application& app) {
+ SDL_LOG_AUTO_TRACE();
+ using namespace application_manager;
+ sync_primitives::AutoLock lock(pending_resumption_lock_);
+ UNUSED(extension);
+
+ if (application_manager_.IsAnyAppSubscribedForWayPoints()) {
+ SDL_LOG_DEBUG(
+ "Subscription to waypoint already exist, no need to send "
+ "request to HMI");
+ application_manager_.SubscribeAppForWayPoints(app.app_id());
+ return;
+ }
+
+ const auto request = CreateSubscriptionRequest();
+ const auto corr_id =
+ (*request)[strings::params][strings::correlation_id].asInt();
+ auto resumption_request =
+ MakeResumptionRequest(corr_id, Navigation_SubscribeWayPoints, *request);
+
+ PendingRequest pending_request(app.app_id(), corr_id);
+ pending_requests_.push_back(pending_request);
+ SDL_LOG_DEBUG("Add to pending resumptins corr_id = " << corr_id);
+
+ if (pending_requests_.size() == 1) {
+ SendPendingHMIRequest(pending_requests_.front());
+ }
+ resumption_data_processor().SubscribeToResponse(app.app_id(),
+ resumption_request);
+}
+
+void WayPointsPendingResumptionHandler::OnResumptionRevert() {
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(pending_resumption_lock_);
+
+ if (pending_requests_.empty()) {
+ SDL_LOG_DEBUG("No pending resumptions");
+ return;
+ }
+
+ auto& pending_request = pending_requests_.front();
+ if (pending_request.waiting_for_hmi_response_) {
+ SDL_LOG_DEBUG("Pending resumption for "
+ << pending_request.app_id_
+ << " is already waiting for HMI response");
+ return;
+ }
+ SendPendingHMIRequest(pending_request);
+}
+
+void WayPointsPendingResumptionHandler::RaiseFakeSuccessfulResponse(
+ const int32_t corr_id) {
+ using namespace application_manager;
+
+ auto response = MessageHelper::CreateResponseMessageFromHmi(
+ Navigation_SubscribeWayPoints, corr_id, hmi_apis::Common_Result::SUCCESS);
+
+ event_engine::Event event(Navigation_SubscribeWayPoints);
+ event.set_smart_object(*response);
+
+ SDL_LOG_TRACE("Raise fake response for subscriber. corr_id : " << corr_id);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+void WayPointsPendingResumptionHandler::on_event(
+ const application_manager::event_engine::Event& event) {
+ using namespace application_manager;
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(pending_resumption_lock_);
+
+ unsubscribe_from_event(Navigation_SubscribeWayPoints);
+
+ if (pending_requests_.empty()) {
+ SDL_LOG_DEBUG("Not waiting for any response");
+ return;
+ }
+
+ const smart_objects::SmartObject& response = event.smart_object();
+ const uint32_t corr_id = event.smart_object_correlation_id();
+
+ SDL_LOG_TRACE("Received event with function id: "
+ << event.id() << " and correlation id: " << corr_id);
+
+ auto current_pending = pending_requests_.front();
+ pending_requests_.pop_front();
+
+ auto app = application_manager_.application(current_pending.app_id_);
+ if (!app) {
+ SDL_LOG_WARN("Application not found " << current_pending.app_id_);
+ return;
+ }
+
+ if (resumption::IsResponseSuccessful(response)) {
+ SDL_LOG_DEBUG("Resumption of waypoints is successful");
+ application_manager_.SubscribeAppForWayPoints(app);
+ }
+ ProcessNextPendingResumption();
+}
+
+void WayPointsPendingResumptionHandler::ProcessNextPendingResumption() {
+ SDL_LOG_AUTO_TRACE();
+ if (pending_requests_.empty()) {
+ SDL_LOG_DEBUG("No more pending resumptions");
+ return;
+ }
+ auto& pending = pending_requests_.front();
+ if (pending.waiting_for_hmi_response_) {
+ SDL_LOG_DEBUG("Request was already sent to HMI for " << pending.app_id_);
+ return;
+ }
+
+ if (!application_manager_.IsAnyAppSubscribedForWayPoints()) {
+ SendPendingHMIRequest(pending);
+ return;
+ }
+
+ auto pending_copy = pending;
+ pending_requests_.pop_front();
+ auto app = application_manager_.application(pending_copy.app_id_);
+ application_manager_.SubscribeAppForWayPoints(app);
+ RaiseFakeSuccessfulResponse(pending_copy.corr_id_);
+ ProcessNextPendingResumption();
+}
+
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/button_get_capabilities_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/button_get_capabilities_request_test.cc
new file mode 100644
index 0000000000..f3d8dd4f93
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/button_get_capabilities_request_test.cc
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "hmi/button_get_capabilities_request.h"
+
+#include <memory>
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/request_to_hmi.h"
+#include "application_manager/smart_object_keys.h"
+#include "smart_objects/smart_object.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace button_get_capabilities_request {
+
+using ::testing::_;
+using ::testing::Return;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::CommandImpl;
+using am::commands::RequestToHMI;
+using sdl_rpc_plugin::commands::ButtonGetCapabilitiesRequest;
+
+typedef std::shared_ptr<RequestToHMI> RequestToHMIPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+} // namespace
+
+class ButtonGetCapabilitiesRequestTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
+
+TEST_F(ButtonGetCapabilitiesRequestTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(
+ CreateCommand<ButtonGetCapabilitiesRequest>(command_msg));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+TEST_F(ButtonGetCapabilitiesRequestTest,
+ onTimeOut_ButtonsGetCapabilitiesUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(
+ CreateCommand<ButtonGetCapabilitiesRequest>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::Buttons_GetCapabilities));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+ command->onTimeOut();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+} // namespace button_get_capabilities_request
+} // namespace hmi_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/button_get_capabilities_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/button_get_capabilities_response_test.cc
index 7d9ed899a6..f90611f58d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/button_get_capabilities_response_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/button_get_capabilities_response_test.cc
@@ -86,6 +86,7 @@ TEST_F(ButtonGetCapabilitiesResponseTest, Run_CodeSuccess_SUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_, set_button_capabilities(capabilities_));
EXPECT_CALL(mock_hmi_capabilities_,
set_preset_bank_capabilities(preset_bank_capabilities_));
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -102,6 +103,23 @@ TEST_F(ButtonGetCapabilitiesResponseTest, Run_CodeAborted_SUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_preset_bank_capabilities(preset_bank_capabilities_))
.Times(0);
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+}
+
+TEST_F(ButtonGetCapabilitiesResponseTest,
+ onTimeOut_Run_ResponseForInterface_ReceivedError) {
+ MessageSharedPtr msg = CreateMsgParams();
+ (*msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+
+ ResponsePtr command(CreateCommand<ButtonGetCapabilitiesResponse>(msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::Buttons_GetCapabilities));
+ ASSERT_TRUE(command->Init());
command->Run();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc
index c66cb81141..5fa910b2d9 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc
@@ -30,13 +30,18 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "application_manager/commands/command_request_test.h"
-
#include <stdint.h>
+
#include <string>
#include <vector>
-#include "gtest/gtest.h"
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application_manager_settings.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "gtest/gtest.h"
#include "hmi/activate_app_request.h"
#include "hmi/activate_app_response.h"
#include "hmi/add_statistics_info_notification.h"
@@ -200,6 +205,8 @@
#include "hmi/ui_show_response.h"
#include "hmi/ui_slider_request.h"
#include "hmi/ui_slider_response.h"
+#include "hmi/ui_subtle_alert_request.h"
+#include "hmi/ui_subtle_alert_response.h"
#include "hmi/update_app_list_request.h"
#include "hmi/update_app_list_response.h"
#include "hmi/update_device_list_request.h"
@@ -223,12 +230,6 @@
#include "hmi/vr_perform_interaction_request.h"
#include "hmi/vr_perform_interaction_response.h"
-#include "application_manager/commands/commands_test.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_application_manager_settings.h"
-#include "application_manager/mock_event_dispatcher.h"
-
namespace am = application_manager;
namespace test {
@@ -499,7 +500,9 @@ typedef Types<commands::AllowAllAppsRequest,
commands::AllowAppRequest,
commands::AllowAppResponse,
commands::BCGetFilePathRequest,
- commands::BCGetFilePathResponse>
+ commands::BCGetFilePathResponse,
+ commands::UISubtleAlertResponse,
+ commands::UISubtleAlertRequest>
HMICommandsListFifth;
TYPED_TEST_CASE(HMICommandsTestFirst, HMICommandsListFirst);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_system_info_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_system_info_response_test.cc
index 11589683be..8cdce4fa74 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_system_info_response_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_system_info_response_test.cc
@@ -69,8 +69,7 @@ namespace {
const uint32_t kConnectionKey = 2u;
const std::string ccpu_version("4.1.3.B_EB355B");
const std::string wers_country_code("WAEGB");
-const uint32_t lang_code = 0u;
-const std::string kLanguage = "";
+const std::string lang_code("EN-US");
} // namespace
class GetSystemInfoResponseTest
@@ -99,15 +98,8 @@ TEST_F(GetSystemInfoResponseTest, GetSystemInfo_SUCCESS) {
ResponseFromHMIPtr command(CreateCommand<GetSystemInfoResponse>(command_msg));
- std::string language;
- EXPECT_CALL(mock_message_helper_,
- CommonLanguageToString(
- static_cast<hmi_apis::Common_Language::eType>(lang_code)))
- .WillOnce(Return(language));
- EXPECT_EQ(kLanguage, language);
-
EXPECT_CALL(mock_policy_handler_,
- OnGetSystemInfo(ccpu_version, wers_country_code, kLanguage));
+ OnGetSystemInfo(ccpu_version, wers_country_code, lang_code));
command->Run();
}
@@ -121,13 +113,24 @@ TEST_F(GetSystemInfoResponseTest, GetSystemInfo_UNSUCCESS) {
ResponseFromHMIPtr command(CreateCommand<GetSystemInfoResponse>(command_msg));
- EXPECT_CALL(mock_message_helper_,
- CommonLanguageToString(
- static_cast<hmi_apis::Common_Language::eType>(lang_code)))
- .Times(0);
+ EXPECT_CALL(mock_hmi_capabilities_, UpdateCachedCapabilities());
+ EXPECT_CALL(mock_policy_handler_, SetPreloadedPtFlag(false));
+
+ command->Run();
+}
+
+TEST_F(GetSystemInfoResponseTest, GetSystemInfo_UpdateCapabilities_Called) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*command_msg)[strings::msg_params][hmi_response::capabilities] =
+ (capabilities_);
+
+ ResponseFromHMIPtr command(CreateCommand<GetSystemInfoResponse>(command_msg));
- EXPECT_CALL(mock_policy_handler_, OnGetSystemInfo("", "", ""));
+ EXPECT_CALL(mock_hmi_capabilities_, OnSoftwareVersionReceived(ccpu_version));
+ ASSERT_TRUE(command->Init());
command->Run();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc
index 26f7a63872..400481f506 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc
@@ -79,6 +79,7 @@
#include "sdl_rpc_plugin/commands/hmi/on_ui_keyboard_input_notification.h"
#include "sdl_rpc_plugin/commands/hmi/on_ui_language_change_notification.h"
#include "sdl_rpc_plugin/commands/hmi/on_ui_reset_timeout_notification.h"
+#include "sdl_rpc_plugin/commands/hmi/on_ui_subtle_alert_pressed_notification.h"
#include "sdl_rpc_plugin/commands/hmi/on_ui_touch_event_notification.h"
#include "sdl_rpc_plugin/commands/hmi/on_video_data_streaming_notification.h"
#include "sdl_rpc_plugin/commands/hmi/on_vr_command_notification.h"
@@ -100,6 +101,7 @@
#include "application_manager/mock_rpc_plugin_manager.h"
#include "application_manager/mock_state_controller.h"
#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/resumption/resumption_data_processor.h"
#include "application_manager/smart_object_keys.h"
#include "connection_handler/mock_connection_handler.h"
#include "connection_handler/mock_connection_handler_settings.h"
@@ -254,8 +256,8 @@ class HMICommandsNotificationsTest
ON_CALL(app_mngr_, application_by_hmi_app(_)).WillByDefault(Return(app_));
ON_CALL(*app_ptr_, app_id()).WillByDefault(Return(kAppId_));
ON_CALL(app_mngr_, application(kConnectionKey)).WillByDefault(Return(app_));
- ON_CALL(mock_message_helper_, MobileLanguageToString(kMobileLanguage))
- .WillByDefault(Return(kDefaultLanguage));
+ ON_CALL(app_mngr_, connection_handler())
+ .WillByDefault(ReturnRef(mock_connection_handler_));
}
am::ApplicationSharedPtr ConfigureApp(NiceMock<MockApplication>** app_mock,
@@ -479,6 +481,21 @@ TEST_F(HMICommandsNotificationsTest, OnUITouchEventSendNotificationToMobile) {
}
TEST_F(HMICommandsNotificationsTest,
+ OnUISubtleAlertPressedSendNotificationToMobile) {
+ MessageSharedPtr message = CreateMessage();
+ std::shared_ptr<Command> command =
+ CreateCommand<OnUISubtleAlertPressedNotification>(message);
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL));
+ command->Run();
+ EXPECT_EQ(
+ static_cast<int32_t>(mobile_apis::FunctionID::OnSubtleAlertPressedID),
+ (*message)[am::strings::params][am::strings::function_id].asInt());
+ EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification),
+ (*message)[am::strings::params][am::strings::message_type].asInt());
+}
+
+TEST_F(HMICommandsNotificationsTest,
OnAppRegisteredNotificationSendNotificationToHmi) {
int32_t event_id = hmi_apis::FunctionID::INVALID_ENUM;
MessageSharedPtr message = CreateMessage();
@@ -545,7 +562,7 @@ TEST_F(HMICommandsNotificationsTest, OnReadyNotificationEventDispatcher) {
std::shared_ptr<Command> command =
CreateCommand<OnReadyNotification>(message);
- EXPECT_CALL(app_mngr_, OnHMIStartedCooperation());
+ EXPECT_CALL(app_mngr_, OnHMIReady());
EXPECT_CALL(app_mngr_, event_dispatcher());
EXPECT_CALL(mock_event_dispatcher_, raise_event(_))
.WillOnce(GetEventId(&event_id));
@@ -767,7 +784,6 @@ TEST_F(HMICommandsNotificationsTest,
std::shared_ptr<Command> command =
CreateCommand<OnSystemInfoChangedNotification>(message);
- EXPECT_CALL(mock_message_helper_, CommonLanguageToString(_));
EXPECT_CALL(mock_policy_handler_, OnSystemInfoChanged(_));
command->Run();
}
@@ -957,7 +973,7 @@ TEST_F(HMICommandsNotificationsTest,
kCorrelationId_;
MessageSharedPtr temp_message = CreateMessage();
- resumprion_test::MockResumeCtrl mock_resume_ctrl;
+ resumption_test::MockResumeCtrl mock_resume_ctrl;
EXPECT_CALL(app_mngr_, resume_controller())
.WillOnce(ReturnRef(mock_resume_ctrl));
EXPECT_CALL(mock_resume_ctrl, OnSuspend());
@@ -1009,18 +1025,15 @@ TEST_F(HMICommandsNotificationsTest,
static_cast<int32_t>(am::MessageType::kNotification);
(*notification)[am::strings::params][am::strings::connection_key] = kAppId_;
- std::vector<hmi_apis::Common_ApplicationExitReason::eType> reason_list;
- reason_list.push_back(hmi_apis::Common_ApplicationExitReason::
- UNAUTHORIZED_TRANSPORT_REGISTRATION);
- reason_list.push_back(
- hmi_apis::Common_ApplicationExitReason::UNSUPPORTED_HMI_RESOURCE);
+ using ExitReason = hmi_apis::Common_ApplicationExitReason::eType;
+ std::vector<ExitReason> reason_list = {
+ ExitReason::UNAUTHORIZED_TRANSPORT_REGISTRATION,
+ ExitReason::UNSUPPORTED_HMI_RESOURCE};
- std::vector<mobile_apis::AppInterfaceUnregisteredReason::eType>
- mobile_reason_list;
- mobile_reason_list.push_back(
- mobile_apis::AppInterfaceUnregisteredReason::APP_UNAUTHORIZED);
- mobile_reason_list.push_back(
- mobile_apis::AppInterfaceUnregisteredReason::UNSUPPORTED_HMI_RESOURCE);
+ using UnregisteredReason = mobile_apis::AppInterfaceUnregisteredReason::eType;
+ std::vector<UnregisteredReason> mobile_reason_list = {
+ UnregisteredReason::APP_UNAUTHORIZED,
+ UnregisteredReason::UNSUPPORTED_HMI_RESOURCE};
std::vector<mobile_apis::AppInterfaceUnregisteredReason::eType>::iterator
it_mobile_reason = mobile_reason_list.begin();
@@ -1054,6 +1067,47 @@ TEST_F(HMICommandsNotificationsTest,
}
TEST_F(HMICommandsNotificationsTest,
+ OnExitApplicationNotificationResourceConstraintReason) {
+ auto message = CreateMessage();
+ (*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
+ const auto notification = std::make_shared<smart_objects::SmartObject>();
+ (*notification)[am::strings::params][am::strings::function_id] =
+ static_cast<int32_t>(
+ mobile_apis::FunctionID::OnAppInterfaceUnregisteredID);
+ (*notification)[am::strings::params][am::strings::message_type] =
+ static_cast<int32_t>(am::MessageType::kNotification);
+ (*notification)[am::strings::params][am::strings::connection_key] = kAppId_;
+
+ using ExitReason = hmi_apis::Common_ApplicationExitReason::eType;
+ auto hmi_reason = ExitReason::RESOURCE_CONSTRAINT;
+
+ using UnregisteredReason = mobile_apis::AppInterfaceUnregisteredReason::eType;
+ auto mobile_reason = UnregisteredReason::RESOURCE_CONSTRAINT;
+
+ (*message)[am::strings::msg_params][am::strings::reason] = hmi_reason;
+ const auto command = CreateCommand<OnExitApplicationNotification>(message);
+
+ (*notification)[am::strings::msg_params][am::strings::reason] =
+ static_cast<int32_t>(mobile_reason);
+
+ am::plugin_manager::MockRPCPluginManager mock_rpc_plugin_manager_;
+ EXPECT_CALL(app_mngr_, GetPluginManager())
+ .WillRepeatedly(ReturnRef(mock_rpc_plugin_manager_));
+
+ EXPECT_CALL(app_mngr_, application(kAppId_)).WillRepeatedly(Return(app_));
+ EXPECT_CALL(
+ mock_message_helper_,
+ GetOnAppInterfaceUnregisteredNotificationToMobile(kAppId_, mobile_reason))
+ .WillOnce(Return(notification));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(notification, Command::SOURCE_SDL));
+ EXPECT_CALL(app_mngr_, UnregisterApplication(_, _, _, _)).Times(0);
+
+ ASSERT_TRUE(command->Init());
+ command->Run();
+}
+
+TEST_F(HMICommandsNotificationsTest,
OnExitApplicationNotificationUnhandledReason) {
MessageSharedPtr message = CreateMessage();
(*message)[am::strings::msg_params][am::strings::app_id] = kAppId_;
@@ -1824,7 +1878,7 @@ TEST_F(HMICommandsNotificationsTest, OnDriverDistractionNotificationEmptyData) {
ON_CALL(mock_policy_handler_, LockScreenDismissalEnabledState())
.WillByDefault(Return(OptionalBool(true)));
- std::string required_language = "en-us";
+ std::string required_language = "EN-US";
ON_CALL(mock_policy_handler_,
LockScreenDismissalWarningMessage(required_language))
.WillByDefault(Return(
@@ -1854,7 +1908,7 @@ TEST_F(HMICommandsNotificationsTest,
typedef boost::optional<bool> OptionalBool;
ON_CALL(mock_policy_handler_, LockScreenDismissalEnabledState())
.WillByDefault(Return(OptionalBool(true)));
- std::string required_language = "en-us";
+ std::string required_language = "EN-US";
ON_CALL(mock_policy_handler_,
LockScreenDismissalWarningMessage(required_language))
.WillByDefault(Return(
@@ -1882,7 +1936,9 @@ TEST_F(HMICommandsNotificationsTest, OnDriverDistractionNotificationValidApp) {
typedef boost::optional<bool> OptionalBool;
ON_CALL(mock_policy_handler_, LockScreenDismissalEnabledState())
.WillByDefault(Return(OptionalBool(true)));
- std::string required_language = "en-us";
+ std::string required_language = "EN-US";
+ ON_CALL(*app_ptr_, ui_language()).WillByDefault(ReturnRef(kMobileLanguage));
+
ON_CALL(mock_policy_handler_,
LockScreenDismissalWarningMessage(required_language))
.WillByDefault(Return(
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_audio_start_stream_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_audio_start_stream_request_test.cc
index 926e51446f..00c95b5425 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_audio_start_stream_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_audio_start_stream_request_test.cc
@@ -60,6 +60,7 @@ using sdl_rpc_plugin::commands::AudioStartStreamRequest;
namespace {
const uint32_t kHmiAppId = 13u;
+const uint32_t kCorrelationId = 2u;
const am::HmiInterfaces::InterfaceID kHmiInterface =
am::HmiInterfaces::HMI_INTERFACE_Navigation;
} // namespace
@@ -74,11 +75,24 @@ class AudioStartStreamRequestTest
command_ = CreateCommand<AudioStartStreamRequest>(msg_);
}
+ void UpdateMsgParams(MessageSharedPtr& message) {
+ (*message)[am::strings::params][am::strings::correlation_id] =
+ kCorrelationId;
+ (*message)[am::strings::params][am::strings::message_type] =
+ am::MessageType::kRequest;
+ (*message)[am::strings::params][am::strings::function_id] =
+ static_cast<int32_t>(hmi_apis::FunctionID::Navigation_StartAudioStream);
+ (*message)[am::strings::msg_params][am::strings::app_id] = kHmiAppId;
+ }
+
std::pair<uint32_t, int32_t> start_stream_retry_amount_;
MessageSharedPtr msg_;
std::shared_ptr<AudioStartStreamRequest> command_;
+ static const std::string big_url_;
};
+const std::string AudioStartStreamRequestTest::big_url_(20000u, 'a');
+
TEST_F(AudioStartStreamRequestTest, Run_HmiInterfaceNotAvailable_NoRequest) {
EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(kHmiInterface))
.WillOnce(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
@@ -114,6 +128,48 @@ TEST_F(AudioStartStreamRequestTest, Run_HmiInterfaceAvailable_SentRequest) {
command_->Run();
}
+TEST_F(AudioStartStreamRequestTest, Run_HmiHugeUrl_SentRequest_SUCCESS) {
+ UpdateMsgParams(msg_);
+
+ (*msg_)[am::strings::msg_params][am::strings::url] = big_url_;
+
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(kHmiInterface))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ MockAppPtr mock_app = CreateMockApp();
+ ON_CALL(app_mngr_, application_by_hmi_app(kHmiAppId))
+ .WillByDefault(Return(mock_app));
+
+ ON_CALL(app_mngr_, application(kHmiAppId)).WillByDefault(Return(mock_app));
+ ON_CALL(*mock_app, hmi_app_id()).WillByDefault(Return(kHmiAppId));
+
+ EXPECT_CALL(*mock_app, set_audio_streaming_allowed(true));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(msg_));
+
+ ASSERT_TRUE(command_->Init());
+ command_->Run();
+}
+
+TEST_F(AudioStartStreamRequestTest, ValidateSchema_HmiHugeUrl_SUCCESS) {
+ UpdateMsgParams(msg_);
+
+ (*msg_)[am::strings::params][am::strings::protocol_type] =
+ am::commands::CommandImpl::hmi_protocol_type_;
+ (*msg_)[am::strings::params][am::strings::protocol_version] =
+ am::commands::CommandImpl::protocol_version_;
+
+ (*msg_)[am::strings::msg_params][am::strings::url] = big_url_;
+
+ hmi_apis::HMI_API hmi_so_factory;
+ ns_smart_device_link::ns_smart_objects::CSmartSchema schema;
+ hmi_so_factory.GetSchema(hmi_apis::FunctionID::Navigation_StartAudioStream,
+ hmi_apis::messageType::eType::request,
+ schema);
+
+ rpc::ValidationReport report("RPC");
+ EXPECT_EQ(smart_objects::errors::eType::OK, schema.validate(*msg_, &report));
+ EXPECT_EQ("", rpc::PrettyFormat(report));
+}
+
} // namespace navi_audio_start_stream_request
} // namespace hmi_commands_test
} // namespace commands_test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_set_video_config_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_set_video_config_request_test.cc
index d6ef540bc0..7ce3a353e9 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_set_video_config_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_set_video_config_request_test.cc
@@ -101,11 +101,9 @@ TEST_F(NaviSetVideoConfigRequestTest, OnEventWithSuccessResponse) {
Event event(kEventID);
event.set_smart_object(*event_msg);
- std::vector<std::string> empty;
- EXPECT_CALL(
- app_mngr_,
- OnStreamingConfigured(
- kAppId, protocol_handler::ServiceType::kMobileNav, true, empty))
+ EXPECT_CALL(app_mngr_,
+ OnStreamingConfigurationSuccessful(
+ kAppId, protocol_handler::ServiceType::kMobileNav))
.Times(1);
command->on_event(event);
@@ -151,10 +149,9 @@ TEST_F(NaviSetVideoConfigRequestTest, OnEventWithRejectedResponse) {
event.set_smart_object(*event_msg);
std::vector<std::string> rejected_params;
- EXPECT_CALL(app_mngr_,
- OnStreamingConfigured(
- kAppId, protocol_handler::ServiceType::kMobileNav, false, _))
- .WillOnce(SaveArg<3>(&rejected_params));
+ std::string reason("Received SetVideoConfig failure response");
+ EXPECT_CALL(app_mngr_, OnStreamingConfigurationFailed(kAppId, _, reason))
+ .WillOnce(SaveArg<1>(&rejected_params));
command->on_event(event);
@@ -181,10 +178,8 @@ TEST_F(NaviSetVideoConfigRequestTest,
event.set_smart_object(*event_msg);
std::vector<std::string> empty;
- EXPECT_CALL(
- app_mngr_,
- OnStreamingConfigured(
- kAppId, protocol_handler::ServiceType::kMobileNav, false, empty))
+ std::string reason("Received SetVideoConfig failure response");
+ EXPECT_CALL(app_mngr_, OnStreamingConfigurationFailed(kAppId, empty, reason))
.WillOnce(Return());
command->on_event(event);
@@ -198,10 +193,8 @@ TEST_F(NaviSetVideoConfigRequestTest, OnTimeout) {
CreateCommand<NaviSetVideoConfigRequest>(request_msg);
std::vector<std::string> empty;
- EXPECT_CALL(
- app_mngr_,
- OnStreamingConfigured(
- kAppId, protocol_handler::ServiceType::kMobileNav, false, empty))
+ std::string reason("Timed out while waiting for SetVideoConfig response");
+ EXPECT_CALL(app_mngr_, OnStreamingConfigurationFailed(kAppId, empty, reason))
.WillOnce(Return());
EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _)).Times(1);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_start_stream_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_start_stream_request_test.cc
index 232d5ab628..ba4eefeee1 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_start_stream_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/navi_start_stream_request_test.cc
@@ -59,6 +59,7 @@ using sdl_rpc_plugin::commands::NaviStartStreamRequest;
namespace {
const uint32_t kHmiAppId = 13u;
+const uint32_t kCorrelationId = 2u;
const am::HmiInterfaces::InterfaceID kHmiInterface =
am::HmiInterfaces::HMI_INTERFACE_Navigation;
} // namespace
@@ -73,11 +74,24 @@ class NaviStartStreamRequestTest
command_ = CreateCommand<NaviStartStreamRequest>(msg_);
}
+ void UpdateMsgParams(MessageSharedPtr& message) {
+ (*message)[am::strings::params][am::strings::correlation_id] =
+ kCorrelationId;
+ (*message)[am::strings::params][am::strings::message_type] =
+ am::MessageType::kRequest;
+ (*message)[am::strings::params][am::strings::function_id] =
+ static_cast<int32_t>(hmi_apis::FunctionID::Navigation_StartStream);
+ (*message)[am::strings::msg_params][am::strings::app_id] = kHmiAppId;
+ }
+
std::pair<uint32_t, int32_t> start_stream_retry_amount_;
MessageSharedPtr msg_;
std::shared_ptr<NaviStartStreamRequest> command_;
+ static const std::string big_url_;
};
+const std::string NaviStartStreamRequestTest::big_url_(20000u, 'a');
+
TEST_F(NaviStartStreamRequestTest, Run_HmiInterfaceNotAvailable_NoRequest) {
EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(kHmiInterface))
.WillOnce(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE));
@@ -113,6 +127,48 @@ TEST_F(NaviStartStreamRequestTest, Run_HmiInterfaceAvailable_SentRequest) {
command_->Run();
}
+TEST_F(NaviStartStreamRequestTest, Run_HmiHugeUrl_SentRequest_SUCCESS) {
+ UpdateMsgParams(msg_);
+
+ (*msg_)[am::strings::msg_params][am::strings::url] = big_url_;
+
+ ON_CALL(mock_hmi_interfaces_, GetInterfaceState(kHmiInterface))
+ .WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
+ MockAppPtr mock_app = CreateMockApp();
+ ON_CALL(app_mngr_, application_by_hmi_app(kHmiAppId))
+ .WillByDefault(Return(mock_app));
+
+ ON_CALL(app_mngr_, application(kHmiAppId)).WillByDefault(Return(mock_app));
+ ON_CALL(*mock_app, hmi_app_id()).WillByDefault(Return(kHmiAppId));
+
+ EXPECT_CALL(*mock_app, set_video_streaming_allowed(true));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(msg_));
+
+ ASSERT_TRUE(command_->Init());
+ command_->Run();
+}
+
+TEST_F(NaviStartStreamRequestTest, ValidateSchema_HmiHugeUrl_SUCCESS) {
+ UpdateMsgParams(msg_);
+
+ (*msg_)[am::strings::params][am::strings::protocol_type] =
+ am::commands::CommandImpl::hmi_protocol_type_;
+ (*msg_)[am::strings::params][am::strings::protocol_version] =
+ am::commands::CommandImpl::protocol_version_;
+
+ (*msg_)[am::strings::msg_params][am::strings::url] = big_url_;
+
+ hmi_apis::HMI_API hmi_so_factory;
+ ns_smart_device_link::ns_smart_objects::CSmartSchema schema;
+ hmi_so_factory.GetSchema(hmi_apis::FunctionID::Navigation_StartStream,
+ hmi_apis::messageType::eType::request,
+ schema);
+
+ rpc::ValidationReport report("RPC");
+ EXPECT_EQ(smart_objects::errors::eType::OK, schema.validate(*msg_, &report));
+ EXPECT_EQ("", rpc::PrettyFormat(report));
+}
+
} // namespace navi_start_stream_request
} // namespace hmi_commands_test
} // namespace commands_test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/on_bc_system_capability_updated_notification_from_hmi_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/on_bc_system_capability_updated_notification_from_hmi_test.cc
index f3ed480180..ae2a544cc9 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/on_bc_system_capability_updated_notification_from_hmi_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/on_bc_system_capability_updated_notification_from_hmi_test.cc
@@ -137,6 +137,9 @@ TEST_F(
(*message_)[strings::msg_params][strings::app_id] = kAppId;
ON_CALL(app_mngr_, application(kAppId)).WillByDefault(Return(mock_app_));
+ application_manager::DisplayCapabilitiesBuilder builder(*mock_app_);
+ ON_CALL(*mock_app_, display_capabilities_builder())
+ .WillByDefault(ReturnRef(builder));
EXPECT_CALL(*mock_app_,
set_display_capabilities(
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/on_driver_distraction_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/on_driver_distraction_notification_test.cc
index fe6ba7c4e3..642b4e651d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/on_driver_distraction_notification_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/on_driver_distraction_notification_test.cc
@@ -95,8 +95,6 @@ class HMIOnDriverDistractionNotificationTest
.WillByDefault(ReturnRef(kMobileLanguage));
ON_CALL(app_mngr_, application(kConnectionKey))
.WillByDefault(Return(mock_app_));
- ON_CALL(mock_message_helper_, MobileLanguageToString(kMobileLanguage))
- .WillByDefault(Return(kDefaultLanguage));
}
MockAppPtr mock_app_;
@@ -327,8 +325,6 @@ TEST_F(HMIOnDriverDistractionNotificationTest,
mobile_apis::Language::FR_FR;
std::string required_language = "FR-FR";
ON_CALL(*mock_app_, ui_language()).WillByDefault(ReturnRef(mobile_language));
- ON_CALL(mock_message_helper_, MobileLanguageToString(mobile_language))
- .WillByDefault(Return(required_language));
policy::CheckPermissionResult result;
result.hmi_level_permitted = policy::kRpcAllowed;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_request_test.cc
new file mode 100644
index 0000000000..f7da89df0b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_request_test.cc
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "hmi/rc_get_capabilities_request.h"
+
+#include <memory>
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/request_to_hmi.h"
+#include "application_manager/smart_object_keys.h"
+#include "smart_objects/smart_object.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace rc_get_capabilities_request {
+
+using ::testing::_;
+using ::testing::Return;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::CommandImpl;
+using am::commands::RequestToHMI;
+using sdl_rpc_plugin::commands::RCGetCapabilitiesRequest;
+
+typedef std::shared_ptr<RequestToHMI> RequestToHMIPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStrNumber{"123"};
+} // namespace
+
+class RCGetCapabilitiesRequestTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(RCGetCapabilitiesRequestTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ RequestToHMIPtr command(CreateCommand<RCGetCapabilitiesRequest>(command_msg));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+TEST_F(RCGetCapabilitiesRequestTest,
+ onTimeOut_OnCapabilityInitialized_RemoveRCGetCapabilities) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ RequestToHMIPtr command(CreateCommand<RCGetCapabilitiesRequest>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::RC_GetCapabilities));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+ command->onTimeOut();
+}
+
+} // namespace rc_get_capabilities_request
+} // namespace hmi_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_response_test.cc
index 67c36dce9c..22ecb014b0 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_response_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_response_test.cc
@@ -166,6 +166,24 @@ TEST_F(RCGetCapabilitiesResponseTest, RUN_SUCCESSS) {
EXPECT_CALL(mock_hmi_capabilities_, set_rc_capability(rc_capability_so));
EXPECT_CALL(mock_hmi_capabilities_, set_rc_supported(true));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+}
+
+TEST_F(RCGetCapabilitiesResponseTest,
+ onTimeOut_Run_ResponseForInterface_ReceivedError) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+
+ RCGetCapabilitiesResponsePtr command(
+ CreateCommand<RCGetCapabilitiesResponse>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::RC_GetCapabilities));
+ ASSERT_TRUE(command->Init());
command->Run();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_is_ready_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_is_ready_request_test.cc
index 539c0efeb3..cb90859018 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_is_ready_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_is_ready_request_test.cc
@@ -56,7 +56,6 @@ namespace am = ::application_manager;
using am::commands::MessageSharedPtr;
using am::event_engine::Event;
using sdl_rpc_plugin::commands::RCIsReadyRequest;
-
typedef std::shared_ptr<RCIsReadyRequest> RCIsReadyRequestPtr;
class RCIsReadyRequestTest
@@ -102,19 +101,33 @@ class RCIsReadyRequestTest
EXPECT_CALL(mock_rpc_service_, ManageHMICommand(capabilities, _));
}
- void PrepareEvent(bool is_message_contain_param,
- Event& event,
- bool is_rc_cooperating_available = false) {
+ MessageSharedPtr CreateResultMessage(
+ bool is_rc_cooperating_available,
+ hmi_apis::Common_Result::eType result_code =
+ hmi_apis::Common_Result::INVALID_ENUM) {
MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- if (is_message_contain_param) {
- (*msg)[am::strings::msg_params][am::strings::available] =
- is_rc_cooperating_available;
+ (*msg)[am::strings::msg_params][am::strings::available] =
+ is_rc_cooperating_available;
+ if (hmi_apis::Common_Result::INVALID_ENUM != result_code) {
+ (*msg)[am::strings::params][am::hmi_response::code] = result_code;
}
- event.set_smart_object(*msg);
+ return msg;
+ }
+
+ MessageSharedPtr CreateErrorMessage() {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ (*msg)[am::strings::params][am::strings::error_msg] = true;
+ return msg;
+ }
+
+ void HMICapabilitiesExpectations() {
+ EXPECT_CALL(mock_hmi_capabilities_,
+ IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::RC_GetCapabilities))
+ .WillOnce(Return(true));
}
RCIsReadyRequestPtr command_;
- am::MockHmiInterfaces mock_hmi_interfaces_;
};
TEST_F(RCIsReadyRequestTest, Run_NoKeyAvailableInMessage_HmiInterfacesIgnored) {
@@ -122,7 +135,11 @@ TEST_F(RCIsReadyRequestTest, Run_NoKeyAvailableInMessage_HmiInterfacesIgnored) {
const bool is_send_message_to_hmi = true;
const bool is_message_contain_param = false;
Event event(hmi_apis::FunctionID::RC_IsReady);
- PrepareEvent(is_message_contain_param, event);
+
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ event.set_smart_object(*msg);
+ HMICapabilitiesExpectations();
+
SetUpExpectations(is_rc_cooperating_available,
is_send_message_to_hmi,
is_message_contain_param,
@@ -135,7 +152,8 @@ TEST_F(RCIsReadyRequestTest, Run_KeyAvailableEqualToFalse_StateNotAvailable) {
const bool is_send_message_to_hmi = false;
const bool is_message_contain_param = true;
Event event(hmi_apis::FunctionID::RC_IsReady);
- PrepareEvent(is_message_contain_param, event);
+ MessageSharedPtr msg = CreateResultMessage(is_rc_cooperating_available);
+ event.set_smart_object(*msg);
SetUpExpectations(is_rc_cooperating_available,
is_send_message_to_hmi,
is_message_contain_param,
@@ -143,12 +161,20 @@ TEST_F(RCIsReadyRequestTest, Run_KeyAvailableEqualToFalse_StateNotAvailable) {
command_->on_event(event);
}
-TEST_F(RCIsReadyRequestTest, Run_KeyAvailableEqualToTrue_StateAvailable) {
+TEST_F(RCIsReadyRequestTest,
+ Run_KeyAvailableEqualToTrueResultCodeSuccess_StateAvailable) {
const bool is_rc_cooperating_available = true;
const bool is_send_message_to_hmi = true;
const bool is_message_contain_param = true;
+ const hmi_apis::Common_Result::eType result_code =
+ hmi_apis::Common_Result::SUCCESS;
Event event(hmi_apis::FunctionID::RC_IsReady);
- PrepareEvent(is_message_contain_param, event, is_rc_cooperating_available);
+
+ MessageSharedPtr msg =
+ CreateResultMessage(is_rc_cooperating_available, result_code);
+ event.set_smart_object(*msg);
+ HMICapabilitiesExpectations();
+
SetUpExpectations(is_rc_cooperating_available,
is_send_message_to_hmi,
is_message_contain_param,
@@ -156,7 +182,40 @@ TEST_F(RCIsReadyRequestTest, Run_KeyAvailableEqualToTrue_StateAvailable) {
command_->on_event(event);
}
+TEST_F(RCIsReadyRequestTest,
+ Run_KeyAvailableEqualToTrueResultCodeUnsuccess_StateNotAvailable) {
+ const bool is_rc_cooperating_available = false;
+ const bool is_send_message_to_hmi = false;
+ const bool is_message_contain_param = true;
+ const hmi_apis::Common_Result::eType result_code =
+ hmi_apis::Common_Result::GENERIC_ERROR;
+ Event event(hmi_apis::FunctionID::RC_IsReady);
+ MessageSharedPtr msg =
+ CreateResultMessage(is_rc_cooperating_available, result_code);
+ event.set_smart_object(*msg);
+ SetUpExpectations(is_rc_cooperating_available,
+ is_send_message_to_hmi,
+ is_message_contain_param,
+ am::HmiInterfaces::STATE_NOT_AVAILABLE);
+ command_->on_event(event);
+}
+
+TEST_F(RCIsReadyRequestTest, Run_ErrorMessage_StateNotAvailable) {
+ const bool is_rc_cooperating_available = false;
+ const bool is_send_message_to_hmi = false;
+ const bool is_message_contain_param = true;
+ Event event(hmi_apis::FunctionID::RC_IsReady);
+ MessageSharedPtr msg = CreateErrorMessage();
+ event.set_smart_object(*msg);
+ SetUpExpectations(is_rc_cooperating_available,
+ is_send_message_to_hmi,
+ is_message_contain_param,
+ am::HmiInterfaces::STATE_NOT_AVAILABLE);
+ command_->on_event(event);
+}
+
TEST_F(RCIsReadyRequestTest, Run_HMIDoestRespond_SendMessageToHMIByTimeout) {
+ HMICapabilitiesExpectations();
ExpectSendMessagesToHMI();
command_->onTimeOut();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_activate_app_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_activate_app_request_test.cc
index 93344f1a0d..31285f5b17 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_activate_app_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_activate_app_request_test.cc
@@ -40,6 +40,7 @@
#include "application_manager/mock_message_helper.h"
#include "application_manager/mock_state_controller.h"
#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/postponed_activation_controller.h"
#include "connection_handler/mock_connection_handler.h"
#include "gtest/gtest.h"
#include "hmi/sdl_activate_app_request.h"
@@ -139,13 +140,20 @@ TEST_F(SDLActivateAppRequestTest, Run_ActivateApp_SUCCESS) {
std::shared_ptr<SDLActivateAppRequest> command(
CreateCommand<SDLActivateAppRequest>(msg));
+ MockAppPtr mock_app(CreateMockApp());
EXPECT_CALL(app_mngr_, WaitingApplicationByID(kAppID))
- .WillOnce(Return(ApplicationSharedPtr()));
- EXPECT_CALL(app_mngr_, state_controller())
- .WillOnce(ReturnRef(mock_state_controller_));
+ .WillOnce(Return(mock_app));
+ ON_CALL(app_mngr_, state_controller())
+ .WillByDefault(ReturnRef(mock_state_controller_));
EXPECT_CALL(mock_state_controller_,
IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
.WillOnce(Return(false));
+ am::HmiStatePtr state = std::make_shared<am::HmiState>(mock_app, app_mngr_);
+ state->set_hmi_level(mobile_apis::HMILevel::HMI_NONE);
+
+ EXPECT_CALL(*mock_app,
+ CurrentHmiState(mobile_apis::PredefinedWindows::DEFAULT_WINDOW))
+ .WillOnce(Return(state));
EXPECT_CALL(mock_policy_handler_, OnActivateApp(kAppID, kCorrelationID));
@@ -303,7 +311,7 @@ TEST_F(SDLActivateAppRequestTest, FirstAppActive_SUCCESS) {
command->Run();
}
-TEST_F(SDLActivateAppRequestTest, FirstAppNotActive_SUCCESS) {
+TEST_F(SDLActivateAppRequestTest, FirstAppNotActiveNONE_SUCCESS) {
MessageSharedPtr msg = CreateMessage();
SetCorrelationAndAppID(msg);
@@ -312,12 +320,18 @@ TEST_F(SDLActivateAppRequestTest, FirstAppNotActive_SUCCESS) {
MockAppPtr mock_app(CreateMockApp());
ON_CALL(app_mngr_, application(kAppID)).WillByDefault(Return(mock_app));
- EXPECT_CALL(app_mngr_, state_controller())
- .WillOnce(ReturnRef(mock_state_controller_));
+ ON_CALL(app_mngr_, state_controller())
+ .WillByDefault(ReturnRef(mock_state_controller_));
EXPECT_CALL(mock_state_controller_,
IsStateActive(am::HmiState::StateID::STATE_ID_DEACTIVATE_HMI))
.WillOnce(Return(false));
EXPECT_CALL(*mock_app, IsRegistered()).WillOnce(Return(true));
+ am::HmiStatePtr state = std::make_shared<am::HmiState>(mock_app, app_mngr_);
+ state->set_hmi_level(mobile_apis::HMILevel::HMI_NONE);
+
+ EXPECT_CALL(*mock_app,
+ CurrentHmiState(mobile_apis::PredefinedWindows::DEFAULT_WINDOW))
+ .WillOnce(Return(state));
EXPECT_CALL(mock_policy_handler_, OnActivateApp(kAppID, kCorrelationID));
@@ -542,6 +556,10 @@ TEST_F(SDLActivateAppRequestTest, OnEvent_SUCCESS) {
MockAppPtr mock_app(CreateMockApp());
EXPECT_CALL(app_mngr_, application_by_hmi_app(_)).WillOnce(Return(mock_app));
+
+ auto hmi_state = std::make_shared<am::HmiState>(mock_app, app_mngr_);
+ hmi_state->set_hmi_level(mobile_apis::HMILevel::HMI_NONE);
+ EXPECT_CALL(*mock_app, CurrentHmiState(_)).WillOnce(Return(hmi_state));
EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kAppID));
EXPECT_CALL(mock_policy_handler_, OnActivateApp(kAppID, kCorrelationID));
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_get_user_friendly_message_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_get_user_friendly_message_request_test.cc
index 5cac1c823f..d457b2a697 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_get_user_friendly_message_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/sdl_get_user_friendly_message_request_test.cc
@@ -62,8 +62,8 @@ using testing::ReturnRef;
namespace {
const uint32_t kCorrelationID = 1u;
const uint32_t kAppID = 2u;
-const std::string kLanguageDe = "de-de";
-const std::string kLanguageEn = "en-gb";
+const std::string kLanguageDe = "DE-DE";
+const std::string kLanguageEn = "EN-GB";
const std::string kMessageCodes = "messageCodes";
const hmi_apis::Common_Language::eType kLanguage =
hmi_apis::Common_Language::EN_GB;
@@ -102,14 +102,13 @@ TEST_F(SDLGetUserFriendlyMessageRequestTest, Run_LanguageSet_SUCCESS) {
std::shared_ptr<SDLGetUserFriendlyMessageRequest> command(
CreateCommand<SDLGetUserFriendlyMessageRequest>(msg));
- EXPECT_CALL(mock_message_helper_, CommonLanguageToString(kLanguage))
- .WillOnce(Return(kLanguageEn));
std::vector<std::string> msg_codes;
msg_codes.push_back(kLanguageDe);
msg_codes.push_back(kLanguageEn);
EXPECT_CALL(mock_policy_handler_,
OnGetUserFriendlyMessage(msg_codes, kLanguageEn, kCorrelationID));
+ command->Init();
command->Run();
}
@@ -128,14 +127,13 @@ TEST_F(SDLGetUserFriendlyMessageRequestTest, Run_LanguageNotSet_SUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_, active_ui_language())
.WillOnce(Return(kLanguage));
- EXPECT_CALL(mock_message_helper_, CommonLanguageToString(kLanguage))
- .WillOnce(Return(kLanguageEn));
std::vector<std::string> msg_codes;
msg_codes.push_back(kLanguageDe);
msg_codes.push_back(kLanguageEn);
EXPECT_CALL(mock_policy_handler_,
OnGetUserFriendlyMessage(msg_codes, kLanguageEn, kCorrelationID));
+ command->Init();
command->Run();
}
@@ -147,9 +145,40 @@ TEST_F(SDLGetUserFriendlyMessageRequestTest, Run_NoMsgCodes_Canceled) {
std::shared_ptr<SDLGetUserFriendlyMessageRequest> command(
CreateCommand<SDLGetUserFriendlyMessageRequest>(msg));
- EXPECT_CALL(mock_message_helper_, CommonLanguageToString(_)).Times(0);
EXPECT_CALL(mock_policy_handler_, OnGetUserFriendlyMessage(_, _, _)).Times(0);
+ command->Init();
+ command->Run();
+}
+
+MATCHER_P(HMIRequestResultCodeIs, result_code, "") {
+ return result_code ==
+ static_cast<hmi_apis::Common_Result::eType>(
+ (*arg)[strings::params][am::hmi_response::code].asInt());
+}
+
+TEST_F(
+ SDLGetUserFriendlyMessageRequestTest,
+ RUN_InvalidRequestInvalidSymbolsStringMandatoryParam_SendInvalidDataErrorResponse) {
+ const std::string kInvalidSyntaxString = "\n\t ";
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][strings::correlation_id] = kCorrelationID;
+ (*msg)[strings::msg_params][strings::app_id] = kAppID;
+
+ (*msg)[strings::msg_params][kMessageCodes] =
+ SmartObject(smart_objects::SmartType_Array);
+ (*msg)[strings::msg_params][kMessageCodes][0] =
+ SmartObject(kInvalidSyntaxString);
+ (*msg)[strings::msg_params][kMessageCodes][1] = SmartObject(kLanguageEn);
+
+ (*msg)[strings::msg_params][strings::language] = kLanguage;
+
+ std::shared_ptr<SDLGetUserFriendlyMessageRequest> command(
+ CreateCommand<SDLGetUserFriendlyMessageRequest>(msg));
+
+ EXPECT_CALL(mock_policy_handler_, OnGetUserFriendlyMessage(_, _, _)).Times(0);
+
+ command->Init();
command->Run();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_requests_to_hmi_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_requests_to_hmi_test.cc
index 162e832e9f..21260250ae 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_requests_to_hmi_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_requests_to_hmi_test.cc
@@ -85,6 +85,7 @@
#include "sdl_rpc_plugin/commands/hmi/ui_set_media_clock_timer_request.h"
#include "sdl_rpc_plugin/commands/hmi/ui_show_request.h"
#include "sdl_rpc_plugin/commands/hmi/ui_slider_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_subtle_alert_request.h"
#include "sdl_rpc_plugin/commands/hmi/vr_add_command_request.h"
#include "sdl_rpc_plugin/commands/hmi/vr_change_registration_request.h"
#include "sdl_rpc_plugin/commands/hmi/vr_delete_command_request.h"
@@ -156,6 +157,7 @@ typedef Types<sdl_rpc_plugin::commands::hmi::DialNumberRequest,
sdl_rpc_plugin::commands::UIAddCommandRequest,
sdl_rpc_plugin::commands::UIAddSubmenuRequest,
sdl_rpc_plugin::commands::UIAlertRequest,
+ sdl_rpc_plugin::commands::UISubtleAlertRequest,
sdl_rpc_plugin::commands::UIChangeRegistrationRequest,
sdl_rpc_plugin::commands::UIDeleteCommandRequest,
sdl_rpc_plugin::commands::UIDeleteSubmenuRequest,
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_response_from_hmi_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_response_from_hmi_test.cc
index f232240c28..c406d38f3d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_response_from_hmi_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_response_from_hmi_test.cc
@@ -79,6 +79,7 @@
#include "hmi/ui_set_media_clock_timer_response.h"
#include "hmi/ui_show_response.h"
#include "hmi/ui_slider_response.h"
+#include "hmi/ui_subtle_alert_response.h"
#include "hmi/update_app_list_response.h"
#include "hmi/update_device_list_response.h"
#include "hmi/vr_add_command_response.h"
@@ -148,6 +149,8 @@ typedef Types<
hmi_apis::FunctionID::UI_AddSubMenu>,
CommandData<sdl_rpc_plugin::commands::UIAlertResponse,
hmi_apis::FunctionID::UI_Alert>,
+ CommandData<sdl_rpc_plugin::commands::UISubtleAlertResponse,
+ hmi_apis::FunctionID::UI_SubtleAlert>,
CommandData<sdl_rpc_plugin::commands::UIChangeRegistratioResponse,
hmi_apis::FunctionID::UI_ChangeRegistration>,
CommandData<sdl_rpc_plugin::commands::UIDeleteCommandResponse,
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_capabilities_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_capabilities_request_test.cc
new file mode 100644
index 0000000000..bae6b6082e
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_capabilities_request_test.cc
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "hmi/tts_get_capabilities_request.h"
+
+#include <memory>
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/request_to_hmi.h"
+#include "application_manager/smart_object_keys.h"
+#include "smart_objects/smart_object.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace tts_get_capabilities_request {
+
+using ::testing::_;
+using ::testing::Return;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::CommandImpl;
+using am::commands::RequestToHMI;
+using sdl_rpc_plugin::commands::TTSGetCapabilitiesRequest;
+
+typedef std::shared_ptr<RequestToHMI> RequestToHMIPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStrNumber{"123"};
+} // namespace
+
+class TTSGetCapabilitiesRequestTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
+
+TEST_F(TTSGetCapabilitiesRequestTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(
+ CreateCommand<TTSGetCapabilitiesRequest>(command_msg));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+TEST_F(TTSGetCapabilitiesRequestTest, onTimeOut_TTSGetCapabilitiesUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(
+ CreateCommand<TTSGetCapabilitiesRequest>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetCapabilities));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+ command->onTimeOut();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+} // namespace tts_get_capabilities_request
+} // namespace hmi_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_capabilities_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_capabilities_response_test.cc
index c7b96f1acf..2479b0a28e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_capabilities_response_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_capabilities_response_test.cc
@@ -52,16 +52,20 @@ using testing::_;
namespace strings = ::application_manager::strings;
namespace hmi_response = ::application_manager::hmi_response;
+namespace hmi_interface = ::application_manager::hmi_interface;
namespace {
-const std::string kText = "TEXT";
-}
+const std::string kText{"TEXT"};
+const hmi_apis::Common_Result::eType kSuccess =
+ hmi_apis::Common_Result::SUCCESS;
+} // namespace
class TTSGetCapabilitiesResponseTest
: public CommandsTest<CommandsTestMocks::kIsNice> {};
TEST_F(TTSGetCapabilitiesResponseTest, Run_BothExist_SUCCESS) {
MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][hmi_response::code] = kSuccess;
(*msg)[strings::msg_params][hmi_response::speech_capabilities] = kText;
(*msg)[strings::msg_params][hmi_response::prerecorded_speech_capabilities] =
kText;
@@ -70,50 +74,82 @@ TEST_F(TTSGetCapabilitiesResponseTest, Run_BothExist_SUCCESS) {
set_speech_capabilities(SmartObject(kText)));
EXPECT_CALL(mock_hmi_capabilities_,
set_prerecorded_speech(SmartObject(kText)));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ SaveCachedCapabilitiesToFile(hmi_interface::tts, _, _));
std::shared_ptr<TTSGetCapabilitiesResponse> command(
CreateCommand<TTSGetCapabilitiesResponse>(msg));
+ ASSERT_TRUE(command->Init());
command->Run();
}
TEST_F(TTSGetCapabilitiesResponseTest, Run_OnlySpeech_SUCCESS) {
MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][hmi_response::code] = kSuccess;
(*msg)[strings::msg_params][hmi_response::speech_capabilities] = kText;
EXPECT_CALL(mock_hmi_capabilities_,
set_speech_capabilities(SmartObject(kText)));
EXPECT_CALL(mock_hmi_capabilities_, set_prerecorded_speech(_)).Times(0);
+ EXPECT_CALL(mock_hmi_capabilities_,
+ SaveCachedCapabilitiesToFile(hmi_interface::tts, _, _));
std::shared_ptr<TTSGetCapabilitiesResponse> command(
CreateCommand<TTSGetCapabilitiesResponse>(msg));
+ ASSERT_TRUE(command->Init());
command->Run();
}
TEST_F(TTSGetCapabilitiesResponseTest, Run_OnlyPrerecorded_SUCCESS) {
MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][hmi_response::code] = kSuccess;
(*msg)[strings::msg_params][hmi_response::prerecorded_speech_capabilities] =
kText;
EXPECT_CALL(mock_hmi_capabilities_, set_speech_capabilities(_)).Times(0);
EXPECT_CALL(mock_hmi_capabilities_,
set_prerecorded_speech(SmartObject(kText)));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ SaveCachedCapabilitiesToFile(hmi_interface::tts, _, _));
std::shared_ptr<TTSGetCapabilitiesResponse> command(
CreateCommand<TTSGetCapabilitiesResponse>(msg));
+ ASSERT_TRUE(command->Init());
command->Run();
}
TEST_F(TTSGetCapabilitiesResponseTest, Run_Nothing_SUCCESS) {
MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][hmi_response::code] = kSuccess;
EXPECT_CALL(mock_hmi_capabilities_, set_speech_capabilities(_)).Times(0);
EXPECT_CALL(mock_hmi_capabilities_, set_prerecorded_speech(_)).Times(0);
+ EXPECT_CALL(mock_hmi_capabilities_,
+ SaveCachedCapabilitiesToFile(hmi_interface::tts, _, _));
std::shared_ptr<TTSGetCapabilitiesResponse> command(
CreateCommand<TTSGetCapabilitiesResponse>(msg));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+}
+
+TEST_F(TTSGetCapabilitiesResponseTest,
+ onTimeOut_Run_ResponseForInterface_ReceivedError) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+
+ std::shared_ptr<TTSGetCapabilitiesResponse> command(
+ CreateCommand<TTSGetCapabilitiesResponse>(msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetCapabilities));
+ ASSERT_TRUE(command->Init());
command->Run();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_language_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_language_request_test.cc
new file mode 100644
index 0000000000..a0bf0887db
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_language_request_test.cc
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "hmi/tts_get_language_request.h"
+
+#include <memory>
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/request_to_hmi.h"
+#include "application_manager/smart_object_keys.h"
+#include "smart_objects/smart_object.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace tts_get_language_request {
+
+using ::testing::_;
+using ::testing::Return;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::CommandImpl;
+using am::commands::RequestToHMI;
+using sdl_rpc_plugin::commands::TTSGetLanguageRequest;
+
+typedef std::shared_ptr<RequestToHMI> RequestToHMIPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStrNumber{"123"};
+} // namespace
+
+class TTSGetLanguageRequestTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
+
+TEST_F(TTSGetLanguageRequestTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(CreateCommand<TTSGetLanguageRequest>(command_msg));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+TEST_F(TTSGetLanguageRequestTest, onTimeOut_TTSGetLanguageUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(CreateCommand<TTSGetLanguageRequest>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetLanguage));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+ command->onTimeOut();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+} // namespace tts_get_language_request
+} // namespace hmi_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_language_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_language_response_test.cc
index c0d23cb34b..4aeef5198b 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_language_response_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_language_response_test.cc
@@ -51,10 +51,13 @@ using testing::ReturnRef;
namespace strings = application_manager::strings;
namespace hmi_response = application_manager::hmi_response;
+namespace hmi_interface = application_manager::hmi_interface;
using namespace hmi_apis;
namespace {
const Common_Language::eType kLanguage = Common_Language::EN_GB;
+const hmi_apis::Common_Result::eType kSuccess =
+ hmi_apis::Common_Result::SUCCESS;
} // namespace
class TTSGetLanguageResponseTest
@@ -63,22 +66,28 @@ class TTSGetLanguageResponseTest
TEST_F(TTSGetLanguageResponseTest, Run_LanguageSet_SUCCESS) {
MessageSharedPtr msg = CreateMessage();
(*msg)[strings::msg_params][hmi_response::language] = kLanguage;
+ (*msg)[strings::params][hmi_response::code] = kSuccess;
std::shared_ptr<TTSGetLanguageResponse> command(
CreateCommand<TTSGetLanguageResponse>(msg));
EXPECT_CALL(mock_hmi_capabilities_, set_active_tts_language(kLanguage));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ SaveCachedCapabilitiesToFile(hmi_interface::tts, _, _));
+
MockEventDispatcher mock_event_dispatcher;
EXPECT_CALL(app_mngr_, event_dispatcher())
.WillOnce(ReturnRef(mock_event_dispatcher));
EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+ ASSERT_TRUE(command->Init());
command->Run();
}
TEST_F(TTSGetLanguageResponseTest, Run_LanguageNotSet_SUCCESS) {
MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][hmi_response::code] = kSuccess;
std::shared_ptr<TTSGetLanguageResponse> command(
CreateCommand<TTSGetLanguageResponse>(msg));
@@ -86,10 +95,31 @@ TEST_F(TTSGetLanguageResponseTest, Run_LanguageNotSet_SUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_active_tts_language(Common_Language::INVALID_ENUM));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ SaveCachedCapabilitiesToFile(hmi_interface::tts, _, _));
+
MockEventDispatcher mock_event_dispatcher;
EXPECT_CALL(app_mngr_, event_dispatcher())
.WillOnce(ReturnRef(mock_event_dispatcher));
EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+}
+
+TEST_F(TTSGetLanguageResponseTest,
+ onTimeOut_Run_ResponseForInterface_ReceivedError) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+
+ std::shared_ptr<TTSGetLanguageResponse> command(
+ CreateCommand<TTSGetLanguageResponse>(msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetLanguage));
+ ASSERT_TRUE(command->Init());
command->Run();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_supported_languages_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_supported_languages_request_test.cc
new file mode 100644
index 0000000000..1561e1def5
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_supported_languages_request_test.cc
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "hmi/tts_get_supported_languages_request.h"
+
+#include <memory>
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/request_to_hmi.h"
+#include "application_manager/smart_object_keys.h"
+#include "smart_objects/smart_object.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace tts_get_supported_languages_request {
+
+using ::testing::_;
+using ::testing::Return;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::CommandImpl;
+using am::commands::RequestToHMI;
+using sdl_rpc_plugin::commands::TTSGetSupportedLanguagesRequest;
+
+typedef std::shared_ptr<RequestToHMI> RequestToHMIPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStrNumber{"123"};
+} // namespace
+
+class TTSGetSupportedLanguagesRequestTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
+
+TEST_F(TTSGetSupportedLanguagesRequestTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(
+ CreateCommand<TTSGetSupportedLanguagesRequest>(command_msg));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+TEST_F(TTSGetSupportedLanguagesRequestTest,
+ onTimeOut_TTSGetSupportedLanguagesUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(
+ CreateCommand<TTSGetSupportedLanguagesRequest>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+ command->onTimeOut();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+} // namespace tts_get_supported_languages_request
+} // namespace hmi_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_supported_languages_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_supported_languages_response_test.cc
index c0f187a85f..e09d3198d7 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_supported_languages_response_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_supported_languages_response_test.cc
@@ -57,6 +57,7 @@ using ::testing::Return;
namespace am = ::application_manager;
namespace strings = ::application_manager::strings;
namespace hmi_response = am::hmi_response;
+namespace hmi_interface = ::application_manager::hmi_interface;
using am::commands::CommandImpl;
using application_manager::commands::ResponseFromHMI;
using sdl_rpc_plugin::commands::TTSGetSupportedLanguagesResponse;
@@ -95,6 +96,9 @@ TEST_F(TTSGetSupportedLanguageResponseTest, RUN_SUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_tts_supported_languages((
*command_msg)[strings::msg_params][hmi_response::languages]));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ SaveCachedCapabilitiesToFile(hmi_interface::tts, _, _));
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -115,6 +119,7 @@ TEST_F(TTSGetSupportedLanguageResponseTest, RUN_UNSUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_tts_supported_languages(supported_languages))
.Times(0);
+ ASSERT_TRUE(command->Init());
command->Run();
@@ -122,6 +127,23 @@ TEST_F(TTSGetSupportedLanguageResponseTest, RUN_UNSUCCESS) {
am::hmi_response::languages));
}
+TEST_F(TTSGetSupportedLanguageResponseTest,
+ onTimeOut_Run_ResponseForInterface_ReceivedError) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+
+ ResponseFromHMIPtr command(
+ CreateCommand<TTSGetSupportedLanguagesResponse>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+}
+
} // namespace tts_get_supported_languages_response
} // namespace hmi_commands_test
} // namespace commands_test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_is_ready_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_is_ready_request_test.cc
new file mode 100644
index 0000000000..e758bfca1f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_is_ready_request_test.cc
@@ -0,0 +1,252 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "hmi/tts_is_ready_request.h"
+
+#include <memory>
+#include <set>
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/event_engine/event.h"
+#include "application_manager/hmi_interfaces.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/smart_object_keys.h"
+#include "smart_objects/smart_object.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace tts_is_ready_request {
+
+using ::testing::_;
+using ::testing::ReturnRef;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::CommandImpl;
+using am::commands::MessageSharedPtr;
+using am::commands::RequestToHMI;
+using am::event_engine::Event;
+using sdl_rpc_plugin::commands::TTSIsReadyRequest;
+
+typedef std::shared_ptr<RequestToHMI> RequestToHMIPtr;
+typedef std::shared_ptr<TTSIsReadyRequest> TTSIsReadyRequestPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStrNumber{"123"};
+} // namespace
+
+class TTSIsReadyRequestTest
+ : public CommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ TTSIsReadyRequestTest() : command_(CreateCommand<TTSIsReadyRequest>()) {}
+
+ void SetUpExpectations(const bool is_tts_cooperating_available,
+ const bool should_message_be_sent,
+ const bool message_contains_param,
+ const am::HmiInterfaces::InterfaceState state) {
+ if (should_message_be_sent) {
+ ExpectSendMessagesToHMI();
+ }
+ EXPECT_CALL(mock_hmi_capabilities_,
+ set_is_tts_cooperating(is_tts_cooperating_available));
+
+ if (message_contains_param) {
+ ON_CALL(app_mngr_, hmi_interfaces())
+ .WillByDefault(ReturnRef(mock_hmi_interfaces_));
+ EXPECT_CALL(
+ mock_hmi_interfaces_,
+ SetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS, state));
+ } else {
+ EXPECT_CALL(app_mngr_, hmi_interfaces())
+ .WillOnce(ReturnRef(mock_hmi_interfaces_));
+ EXPECT_CALL(mock_hmi_interfaces_, SetInterfaceState(_, _)).Times(0);
+ }
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
+ .WillOnce(Return(state));
+ }
+
+ void ExpectSendMessagesToHMI() {
+ smart_objects::SmartObjectSPtr language =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+ EXPECT_CALL(mock_message_helper_,
+ CreateModuleInfoSO(hmi_apis::FunctionID::TTS_GetLanguage, _))
+ .WillOnce(Return(language));
+ EXPECT_CALL(mock_hmi_capabilities_, set_handle_response_for(*language));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(language, _));
+
+ smart_objects::SmartObjectSPtr support_language =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+ EXPECT_CALL(
+ mock_message_helper_,
+ CreateModuleInfoSO(hmi_apis::FunctionID::TTS_GetSupportedLanguages, _))
+ .WillOnce(Return(support_language));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(support_language, _));
+
+ smart_objects::SmartObjectSPtr capabilities =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+ EXPECT_CALL(
+ mock_message_helper_,
+ CreateModuleInfoSO(hmi_apis::FunctionID::TTS_GetCapabilities, _))
+ .WillOnce(Return(capabilities));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(capabilities, _));
+ }
+
+ void PrepareEvent(const bool message_contains_param,
+ const bool is_tts_cooperating_available,
+ Event& out_event) {
+ MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
+ if (message_contains_param) {
+ (*msg)[am::strings::msg_params][am::strings::available] =
+ is_tts_cooperating_available;
+ }
+ out_event.set_smart_object(*msg);
+ }
+
+ void HMICapabilitiesExpectations() {
+ EXPECT_CALL(mock_hmi_capabilities_,
+ IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetLanguage))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetCapabilities))
+ .WillOnce(Return(true));
+ }
+
+ TTSIsReadyRequestPtr command_;
+};
+
+TEST_F(TTSIsReadyRequestTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ RequestToHMIPtr command(CreateCommand<TTSIsReadyRequest>(command_msg));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+TEST_F(TTSIsReadyRequestTest,
+ Run_NoKeyAvailableInMessage_HmiInterfacesIgnored_CacheIsAbsent) {
+ const bool is_tts_cooperating_available = false;
+ const bool should_message_be_sent = true;
+ const bool message_contains_param = false;
+ const auto state = am::HmiInterfaces::STATE_NOT_RESPONSE;
+ Event event(hmi_apis::FunctionID::TTS_IsReady);
+ PrepareEvent(message_contains_param, is_tts_cooperating_available, event);
+ HMICapabilitiesExpectations();
+ SetUpExpectations(is_tts_cooperating_available,
+ should_message_be_sent,
+ message_contains_param,
+ state);
+ ASSERT_TRUE(command_->Init());
+
+ command_->Run();
+ command_->on_event(event);
+}
+
+TEST_F(TTSIsReadyRequestTest,
+ Run_KeyAvailableEqualToFalse_StateNotAvailable_CacheIsAbsent) {
+ const bool is_tts_cooperating_available = false;
+ const bool should_message_be_sent = false;
+ const bool message_contains_param = true;
+ const auto state = am::HmiInterfaces::STATE_NOT_AVAILABLE;
+ Event event(hmi_apis::FunctionID::TTS_IsReady);
+ PrepareEvent(message_contains_param, is_tts_cooperating_available, event);
+ SetUpExpectations(is_tts_cooperating_available,
+ should_message_be_sent,
+ message_contains_param,
+ state);
+ ASSERT_TRUE(command_->Init());
+
+ command_->Run();
+ command_->on_event(event);
+}
+
+TEST_F(TTSIsReadyRequestTest,
+ Run_KeyAvailableEqualToTrue_StateAvailable_CacheIsAbsnet) {
+ const bool is_tts_cooperating_available = true;
+ const bool should_message_be_sent = true;
+ const bool message_contains_param = true;
+ const auto state = am::HmiInterfaces::STATE_AVAILABLE;
+ Event event(hmi_apis::FunctionID::TTS_IsReady);
+ PrepareEvent(message_contains_param, is_tts_cooperating_available, event);
+ HMICapabilitiesExpectations();
+ SetUpExpectations(is_tts_cooperating_available,
+ should_message_be_sent,
+ message_contains_param,
+ state);
+ ASSERT_TRUE(command_->Init());
+
+ command_->Run();
+ command_->on_event(event);
+}
+
+TEST_F(TTSIsReadyRequestTest,
+ Run_HMIDoestRespond_SendMessageToHMIByTimeout_CacheIsAbsent) {
+ HMICapabilitiesExpectations();
+ ExpectSendMessagesToHMI();
+ ASSERT_TRUE(command_->Init());
+
+ command_->Run();
+ command_->onTimeOut();
+}
+
+} // namespace tts_is_ready_request
+} // namespace hmi_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_request_test.cc
new file mode 100644
index 0000000000..1057a89cc6
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_request_test.cc
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "hmi/ui_get_capabilities_request.h"
+
+#include <memory>
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/request_to_hmi.h"
+#include "application_manager/smart_object_keys.h"
+#include "smart_objects/smart_object.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace ui_get_capabilities_request {
+
+using ::testing::_;
+using ::testing::Return;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::CommandImpl;
+using am::commands::RequestToHMI;
+using sdl_rpc_plugin::commands::UIGetCapabilitiesRequest;
+
+typedef std::shared_ptr<RequestToHMI> RequestToHMIPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStrNumber{"123"};
+} // namespace
+
+class UIGetCapabilitiesRequestTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
+
+TEST_F(UIGetCapabilitiesRequestTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(CreateCommand<UIGetCapabilitiesRequest>(command_msg));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+TEST_F(UIGetCapabilitiesRequestTest, onTimeOut_UIGetCapabilitiesUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(CreateCommand<UIGetCapabilitiesRequest>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetCapabilities));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+ command->onTimeOut();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+} // namespace ui_get_capabilities_request
+} // namespace hmi_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_response_test.cc
index 4683fc62c7..cf701caf51 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_response_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_response_test.cc
@@ -51,6 +51,7 @@ using ::testing::NiceMock;
namespace am = ::application_manager;
namespace strings = am::strings;
namespace hmi_response = am::hmi_response;
+namespace hmi_interface = ::application_manager::hmi_interface;
using am::commands::CommandImpl;
using application_manager::commands::ResponseFromHMI;
using sdl_rpc_plugin::commands::UIGetCapabilitiesResponse;
@@ -99,6 +100,7 @@ TEST_F(UIGetCapabilitiesResponseTest, RUN_SetDisplay_SUCCESSS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_display_capabilities(display_capabilities_so));
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -119,6 +121,7 @@ TEST_F(UIGetCapabilitiesResponseTest, SetSoftButton_SUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_soft_button_capabilities(soft_button_capabilities_so));
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -138,6 +141,7 @@ TEST_F(UIGetCapabilitiesResponseTest, SetHmiZone_SUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_hmi_zone_capabilities(hmi_zone_capabilities_so));
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -162,6 +166,7 @@ TEST_F(UIGetCapabilitiesResponseTest, SetAudioPassThru_SUCCESS) {
EXPECT_CALL(
mock_hmi_capabilities_,
set_audio_pass_thru_capabilities(audio_pass_thru_capabilities_list_so));
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -187,6 +192,7 @@ TEST_F(UIGetCapabilitiesResponseTest, SetAudioPassThruList_SUCCESS) {
EXPECT_CALL(
mock_hmi_capabilities_,
set_audio_pass_thru_capabilities(audio_pass_thru_capabilities_list_so));
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -206,6 +212,7 @@ TEST_F(UIGetCapabilitiesResponseTest, SetNavigation_SUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_navigation_supported(
hmi_capabilities_so[strings::navigation].asBool()));
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -225,6 +232,7 @@ TEST_F(UIGetCapabilitiesResponseTest, SetPhoneCall_SUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_phone_call_supported(
hmi_capabilities_so[strings::phone_call].asBool()));
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -244,6 +252,7 @@ TEST_F(UIGetCapabilitiesResponseTest, SetVideoStreaming_SUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_video_streaming_supported(
hmi_capabilities_so[strings::video_streaming].asBool()));
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -268,6 +277,7 @@ TEST_F(UIGetCapabilitiesResponseTest, SetNavigationCapability_SUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_navigation_capability(navigation_capability_so));
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -289,6 +299,7 @@ TEST_F(UIGetCapabilitiesResponseTest, SetPhonenCapability_SUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_phone_capability(phone_capability_so));
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -339,6 +350,7 @@ TEST_F(UIGetCapabilitiesResponseTest, SetVideoStreamingCapability_SUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_video_streaming_capability(video_streaming_capability));
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -362,6 +374,39 @@ TEST_F(UIGetCapabilitiesResponseTest, SetSystemDisplayCapabilities_SUCCESS) {
command->Run();
}
+TEST_F(UIGetCapabilitiesResponseTest,
+ SaveCachedCapabilitiesToFileCall_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::msg_params][strings::system_capabilities] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ ResponseFromHMIPtr command(
+ CreateCommand<UIGetCapabilitiesResponse>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ SaveCachedCapabilitiesToFile(hmi_interface::ui, _, _));
+
+ ASSERT_TRUE(command->Init());
+ command->Run();
+}
+
+TEST_F(UIGetCapabilitiesResponseTest,
+ onTimeOut_Run_ResponseForInterface_ReceivedError) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+
+ ResponseFromHMIPtr command(
+ CreateCommand<UIGetCapabilitiesResponse>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetCapabilities));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+}
+
} // namespace ui_get_capabilities_response
} // namespace hmi_commands_test
} // namespace commands_test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_language_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_language_request_test.cc
new file mode 100644
index 0000000000..c944f1b49b
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_language_request_test.cc
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "hmi/ui_get_language_request.h"
+
+#include <memory>
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/request_to_hmi.h"
+#include "application_manager/smart_object_keys.h"
+#include "smart_objects/smart_object.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace ui_get_language_request {
+
+using ::testing::_;
+using ::testing::Return;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::CommandImpl;
+using am::commands::RequestToHMI;
+using sdl_rpc_plugin::commands::UIGetLanguageRequest;
+
+typedef std::shared_ptr<RequestToHMI> RequestToHMIPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStrNumber{"123"};
+} // namespace
+
+class UIGetLanguageRequestTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
+
+TEST_F(UIGetLanguageRequestTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(CreateCommand<UIGetLanguageRequest>(command_msg));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+TEST_F(UIGetLanguageRequestTest, onTimeOut_UIGetLanguageUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(CreateCommand<UIGetLanguageRequest>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetLanguage));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+ command->onTimeOut();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+} // namespace ui_get_language_request
+} // namespace hmi_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_language_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_language_response_test.cc
index 7e8040543d..d3edf074bd 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_language_response_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_language_response_test.cc
@@ -52,6 +52,7 @@ using testing::ReturnRef;
namespace strings = application_manager::strings;
namespace hmi_response = application_manager::hmi_response;
+namespace hmi_interface = application_manager::hmi_interface;
using namespace hmi_apis;
typedef NiceMock<
@@ -60,6 +61,8 @@ typedef NiceMock<
namespace {
const hmi_apis::Common_Language::eType kLanguage = Common_Language::EN_GB;
+const hmi_apis::Common_Result::eType kSuccess =
+ hmi_apis::Common_Result::SUCCESS;
} // namespace
class UIGetLanguageResponseTest
@@ -68,33 +71,58 @@ class UIGetLanguageResponseTest
TEST_F(UIGetLanguageResponseTest, Run_LanguageSet_SUCCESS) {
MessageSharedPtr msg = CreateMessage();
(*msg)[strings::msg_params][hmi_response::language] = kLanguage;
+ (*msg)[strings::params][hmi_response::code] = kSuccess;
std::shared_ptr<UIGetLanguageResponse> command(
CreateCommand<UIGetLanguageResponse>(msg));
EXPECT_CALL(mock_hmi_capabilities_, set_active_ui_language(kLanguage));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ SaveCachedCapabilitiesToFile(hmi_interface::ui, _, _));
MockEventDispatcher mock_event_dispatcher;
EXPECT_CALL(app_mngr_, event_dispatcher())
.WillOnce(ReturnRef(mock_event_dispatcher));
EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+ ASSERT_TRUE(command->Init());
command->Run();
}
TEST_F(UIGetLanguageResponseTest, Run_LanguageNotSet_SUCCESS) {
MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][hmi_response::code] = kSuccess;
std::shared_ptr<UIGetLanguageResponse> command(
CreateCommand<UIGetLanguageResponse>(msg));
EXPECT_CALL(mock_hmi_capabilities_,
set_active_ui_language(Common_Language::INVALID_ENUM));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ SaveCachedCapabilitiesToFile(hmi_interface::ui, _, _));
MockEventDispatcher mock_event_dispatcher;
EXPECT_CALL(app_mngr_, event_dispatcher())
.WillOnce(ReturnRef(mock_event_dispatcher));
EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+}
+
+TEST_F(UIGetLanguageResponseTest,
+ onTimeOut_Run_ResponseForInterface_ReceivedError) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+
+ std::shared_ptr<UIGetLanguageResponse> command(
+ CreateCommand<UIGetLanguageResponse>(msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetLanguage));
+ ASSERT_TRUE(command->Init());
command->Run();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_supported_languages_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_supported_languages_request_test.cc
new file mode 100644
index 0000000000..251b6b7d58
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_supported_languages_request_test.cc
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "hmi/ui_get_supported_languages_request.h"
+
+#include <memory>
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/request_to_hmi.h"
+#include "application_manager/smart_object_keys.h"
+#include "smart_objects/smart_object.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace ui_get_supported_languages_request {
+
+using ::testing::_;
+using ::testing::Return;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::CommandImpl;
+using am::commands::RequestToHMI;
+using sdl_rpc_plugin::commands::UIGetSupportedLanguagesRequest;
+
+typedef std::shared_ptr<RequestToHMI> RequestToHMIPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStrNumber{"123"};
+} // namespace
+
+class UIGetSupportedLanguagesRequestTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
+
+TEST_F(UIGetSupportedLanguagesRequestTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(
+ CreateCommand<UIGetSupportedLanguagesRequest>(command_msg));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+TEST_F(UIGetSupportedLanguagesRequestTest,
+ onTimeOut_UIGetSupportedLanguagesUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(
+ CreateCommand<UIGetSupportedLanguagesRequest>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetSupportedLanguages));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+ command->onTimeOut();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+} // namespace ui_get_supported_languages_request
+} // namespace hmi_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_supported_languages_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_supported_languages_response_test.cc
index 10cf244bcf..d73519734d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_supported_languages_response_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_supported_languages_response_test.cc
@@ -54,6 +54,7 @@ using ::testing::Return;
namespace am = ::application_manager;
namespace strings = ::application_manager::strings;
namespace hmi_response = am::hmi_response;
+namespace hmi_interface = ::application_manager::hmi_interface;
using sdl_rpc_plugin::commands::UIGetSupportedLanguagesResponse;
typedef std::shared_ptr<UIGetSupportedLanguagesResponse>
@@ -91,6 +92,9 @@ TEST_F(UIGetSupportedLanguagesResponseTest, RUN_SUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_ui_supported_languages((supported_languages)));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ SaveCachedCapabilitiesToFile(hmi_interface::ui, _, _));
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -109,6 +113,7 @@ TEST_F(UIGetSupportedLanguagesResponseTest, RUN_UNSUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_ui_supported_languages(supported_languages))
.Times(0);
+ ASSERT_TRUE(command->Init());
command->Run();
@@ -116,6 +121,23 @@ TEST_F(UIGetSupportedLanguagesResponseTest, RUN_UNSUCCESS) {
am::hmi_response::languages));
}
+TEST_F(UIGetSupportedLanguagesResponseTest,
+ onTimeOut_Run_ResponseForInterface_ReceivedError) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+
+ UIGetSupportedLanguagesResponsePtr command(
+ CreateCommand<UIGetSupportedLanguagesResponse>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetSupportedLanguages));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+}
+
} // namespace ui_get_supported_languages_response
} // namespace hmi_commands_test
} // namespace commands_test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_is_ready_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_is_ready_request_test.cc
index 837b8438dc..a82ad39d83 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_is_ready_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_is_ready_request_test.cc
@@ -141,17 +141,33 @@ class UIIsReadyRequestTest
event.set_smart_object(*msg);
}
+ void HMICapabilitiesExpectations() {
+ EXPECT_CALL(
+ mock_hmi_capabilities_,
+ IsRequestsRequiredForCapabilities(hmi_apis::FunctionID::UI_GetLanguage))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetSupportedLanguages))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetCapabilities))
+ .WillOnce(Return(true));
+ }
+
UIIsReadyRequestPtr command_;
policy_test::MockPolicyHandlerInterface mock_policy_handler_interface_;
};
TEST_F(UIIsReadyRequestTest,
- OnEvent_NoKeyAvailableInMessage_HmiInterfacesIgnored) {
+ OnEvent_NoKeyAvailableInMessage_HmiInterfacesIgnored_CacheIsAbsent) {
const bool is_ui_cooperating_available = false;
const bool is_send_message_to_hmi = true;
const bool is_message_contain_param = false;
Event event(hmi_apis::FunctionID::UI_IsReady);
PrepareEvent(is_message_contain_param, event);
+ HMICapabilitiesExpectations();
SetUpExpectations(is_ui_cooperating_available,
is_send_message_to_hmi,
is_message_contain_param,
@@ -161,7 +177,7 @@ TEST_F(UIIsReadyRequestTest,
}
TEST_F(UIIsReadyRequestTest,
- OnEvent_KeyAvailableEqualToFalse_StateNotAvailable) {
+ OnEvent_KeyAvailableEqualToFalse_StateNotAvailable_CacheIsAbsent) {
const bool is_ui_cooperating_available = false;
const bool is_send_message_to_hmi = false;
const bool is_message_contain_param = true;
@@ -174,12 +190,14 @@ TEST_F(UIIsReadyRequestTest,
command_->on_event(event);
}
-TEST_F(UIIsReadyRequestTest, OnEvent_KeyAvailableEqualToTrue_StateAvailable) {
+TEST_F(UIIsReadyRequestTest,
+ OnEvent_KeyAvailableEqualToTrue_StateAvailable_CacheIsAbsent) {
const bool is_ui_cooperating_available = true;
const bool is_send_message_to_hmi = true;
const bool is_message_contain_param = true;
Event event(hmi_apis::FunctionID::UI_IsReady);
PrepareEvent(is_message_contain_param, event, is_ui_cooperating_available);
+ HMICapabilitiesExpectations();
SetUpExpectations(is_ui_cooperating_available,
is_send_message_to_hmi,
is_message_contain_param,
@@ -187,7 +205,8 @@ TEST_F(UIIsReadyRequestTest, OnEvent_KeyAvailableEqualToTrue_StateAvailable) {
command_->on_event(event);
}
-TEST_F(UIIsReadyRequestTest, OnTimeout_SUCCESS) {
+TEST_F(UIIsReadyRequestTest, OnTimeout_SUCCESS_CacheIsAbsent) {
+ HMICapabilitiesExpectations();
ExpectSendMessagesToHMI();
command_->onTimeOut();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_sdl_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_sdl_request_test.cc
index 96f3b38fbf..92e3fa1187 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_sdl_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_sdl_request_test.cc
@@ -58,7 +58,7 @@ typedef std::shared_ptr<UpdateSDLRequest> UpdateSDLRequestPtr;
namespace {
const uint32_t kConnectionKey = 2u;
const uint32_t kCorrelationId = 1u;
-const std::string kStrNumber = "123";
+const std::string kStrNumber{"123"};
} // namespace
class UpdateSDLRequestTest : public CommandsTest<CommandsTestMocks::kIsNice> {};
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_sdl_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_sdl_response_test.cc
index 62ffc6be4d..f0d431ac86 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_sdl_response_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/update_sdl_response_test.cc
@@ -55,7 +55,7 @@ typedef std::shared_ptr<UpdateSDLResponse> UpdateSDLResponsePtr;
namespace {
const uint32_t kConnectionKey = 2u;
-const std::string kStrNumber = "123";
+const std::string kStrNumber{"123"};
} // namespace
class UpdateSDLResponseTest : public CommandsTest<CommandsTestMocks::kIsNice> {
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_capabilities_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_capabilities_request_test.cc
new file mode 100644
index 0000000000..cef87f06b4
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_capabilities_request_test.cc
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "hmi/vr_get_capabilities_request.h"
+
+#include <memory>
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/request_to_hmi.h"
+#include "application_manager/smart_object_keys.h"
+#include "smart_objects/smart_object.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace vr_get_capabilities_request {
+
+using ::testing::_;
+using ::testing::Return;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::CommandImpl;
+using am::commands::RequestToHMI;
+using sdl_rpc_plugin::commands::VRGetCapabilitiesRequest;
+
+typedef std::shared_ptr<RequestToHMI> RequestToHMIPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStrNumber{"123"};
+} // namespace
+
+class VRGetCapabilitiesRequestTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
+
+TEST_F(VRGetCapabilitiesRequestTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(CreateCommand<VRGetCapabilitiesRequest>(command_msg));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+TEST_F(VRGetCapabilitiesRequestTest, onTimeOut_VRGetCapabilitiesUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(CreateCommand<VRGetCapabilitiesRequest>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetCapabilities));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+ command->onTimeOut();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+} // namespace vr_get_capabilities_request
+} // namespace hmi_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_capabilities_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_capabilities_response_test.cc
index 21acf2bb70..99024df485 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_capabilities_response_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_capabilities_response_test.cc
@@ -51,6 +51,7 @@ using ::testing::NiceMock;
namespace am = ::application_manager;
namespace strings = am::strings;
namespace hmi_response = am::hmi_response;
+namespace hmi_interface = ::application_manager::hmi_interface;
using am::commands::CommandImpl;
using sdl_rpc_plugin::commands::VRGetCapabilitiesResponse;
@@ -95,6 +96,26 @@ TEST_F(VRGetCapabilitiesResponseTest, RUN_SUCCESSS) {
(*command_msg)[strings::msg_params][strings::vr_capabilities];
EXPECT_CALL(mock_hmi_capabilities_, set_vr_capabilities(vr_capabilities_so));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ SaveCachedCapabilitiesToFile(hmi_interface::vr, _, _));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+}
+
+TEST_F(VRGetCapabilitiesResponseTest,
+ onTimeOut_Run_ResponseForInterface_ReceivedError) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+
+ VRGetCapabilitiesResponsePtr command(
+ CreateCommand<VRGetCapabilitiesResponse>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetCapabilities));
+ ASSERT_TRUE(command->Init());
command->Run();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_language_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_language_request_test.cc
new file mode 100644
index 0000000000..6235b41691
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_language_request_test.cc
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "hmi/vr_get_language_request.h"
+
+#include <memory>
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/request_to_hmi.h"
+#include "application_manager/smart_object_keys.h"
+#include "smart_objects/smart_object.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace vr_get_language_request {
+
+using ::testing::_;
+using ::testing::Return;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::CommandImpl;
+using am::commands::RequestToHMI;
+using sdl_rpc_plugin::commands::VRGetLanguageRequest;
+
+typedef std::shared_ptr<RequestToHMI> RequestToHMIPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStrNumber{"123"};
+} // namespace
+
+class VRGetLanguageRequestTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
+
+TEST_F(VRGetLanguageRequestTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(CreateCommand<VRGetLanguageRequest>(command_msg));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+TEST_F(VRGetLanguageRequestTest, onTimeOut_VRGetLanguageUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(CreateCommand<VRGetLanguageRequest>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetLanguage));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+ command->onTimeOut();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+} // namespace vr_get_language_request
+} // namespace hmi_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_language_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_language_response_test.cc
index 8b00b4dded..d927195fd5 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_language_response_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_language_response_test.cc
@@ -52,6 +52,7 @@ using testing::ReturnRef;
namespace strings = application_manager::strings;
namespace hmi_response = application_manager::hmi_response;
+namespace hmi_interface = application_manager::hmi_interface;
using namespace hmi_apis;
typedef NiceMock<
@@ -60,6 +61,8 @@ typedef NiceMock<
namespace {
const hmi_apis::Common_Language::eType kLanguage = Common_Language::EN_GB;
+const hmi_apis::Common_Result::eType kSuccess =
+ hmi_apis::Common_Result::SUCCESS;
} // namespace
class VRGetLanguageResponseTest
@@ -68,22 +71,28 @@ class VRGetLanguageResponseTest
TEST_F(VRGetLanguageResponseTest, Run_LanguageSet_SUCCESS) {
MessageSharedPtr msg = CreateMessage();
(*msg)[strings::msg_params][hmi_response::language] = kLanguage;
+ (*msg)[strings::params][hmi_response::code] = kSuccess;
std::shared_ptr<VRGetLanguageResponse> command(
CreateCommand<VRGetLanguageResponse>(msg));
EXPECT_CALL(mock_hmi_capabilities_, set_active_vr_language(kLanguage));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ SaveCachedCapabilitiesToFile(hmi_interface::vr, _, _));
+
MockEventDispatcher mock_event_dispatcher;
EXPECT_CALL(app_mngr_, event_dispatcher())
.WillOnce(ReturnRef(mock_event_dispatcher));
EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+ ASSERT_TRUE(command->Init());
command->Run();
}
TEST_F(VRGetLanguageResponseTest, Run_LanguageNotSet_SUCCESS) {
MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][hmi_response::code] = kSuccess;
std::shared_ptr<VRGetLanguageResponse> command(
CreateCommand<VRGetLanguageResponse>(msg));
@@ -91,10 +100,31 @@ TEST_F(VRGetLanguageResponseTest, Run_LanguageNotSet_SUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_active_vr_language(Common_Language::INVALID_ENUM));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ SaveCachedCapabilitiesToFile(hmi_interface::vr, _, _));
+
MockEventDispatcher mock_event_dispatcher;
EXPECT_CALL(app_mngr_, event_dispatcher())
.WillOnce(ReturnRef(mock_event_dispatcher));
EXPECT_CALL(mock_event_dispatcher, raise_event(_));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+}
+
+TEST_F(VRGetLanguageResponseTest,
+ onTimeOut_Run_ResponseForInterface_ReceivedError) {
+ MessageSharedPtr msg = CreateMessage();
+ (*msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+
+ std::shared_ptr<VRGetLanguageResponse> command(
+ CreateCommand<VRGetLanguageResponse>(msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetLanguage));
+ ASSERT_TRUE(command->Init());
command->Run();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_request_test.cc
new file mode 100644
index 0000000000..73657528e9
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_request_test.cc
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "hmi/vr_get_supported_languages_request.h"
+
+#include <memory>
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/request_to_hmi.h"
+#include "application_manager/smart_object_keys.h"
+#include "smart_objects/smart_object.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace vr_get_supported_languages_request {
+
+using ::testing::_;
+using ::testing::Return;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::CommandImpl;
+using am::commands::RequestToHMI;
+using sdl_rpc_plugin::commands::VRGetSupportedLanguagesRequest;
+
+typedef std::shared_ptr<RequestToHMI> RequestToHMIPtr;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStrNumber{"123"};
+} // namespace
+
+class VRGetSupportedLanguagesRequestTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
+
+TEST_F(VRGetSupportedLanguagesRequestTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+
+ RequestToHMIPtr command(
+ CreateCommand<VRGetSupportedLanguagesRequest>(command_msg));
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+TEST_F(VRGetSupportedLanguagesRequestTest,
+ onTimeOut_VRGetSupportedLanguagesUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ RequestToHMIPtr command(
+ CreateCommand<VRGetSupportedLanguagesRequest>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetSupportedLanguages));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+ command->onTimeOut();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+} // namespace vr_get_supported_languages_request
+} // namespace hmi_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_response_test.cc
index b81823624c..2d51ee9d8a 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_response_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_response_test.cc
@@ -54,6 +54,7 @@ using ::testing::Return;
namespace am = ::application_manager;
namespace strings = ::application_manager::strings;
namespace hmi_response = am::hmi_response;
+namespace hmi_interface = ::application_manager::hmi_interface;
using sdl_rpc_plugin::commands::VRGetSupportedLanguagesResponse;
typedef std::shared_ptr<VRGetSupportedLanguagesResponse>
@@ -91,6 +92,9 @@ TEST_F(VRGetSupportedLanguagesResponseTest, RUN_SUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_vr_supported_languages((supported_languages)));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ SaveCachedCapabilitiesToFile(hmi_interface::vr, _, _));
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -109,6 +113,7 @@ TEST_F(VRGetSupportedLanguagesResponseTest, RUN_UNSUCCESS) {
EXPECT_CALL(mock_hmi_capabilities_,
set_vr_supported_languages(supported_languages))
.Times(0);
+ ASSERT_TRUE(command->Init());
command->Run();
@@ -116,6 +121,23 @@ TEST_F(VRGetSupportedLanguagesResponseTest, RUN_UNSUCCESS) {
am::hmi_response::languages));
}
+TEST_F(VRGetSupportedLanguagesResponseTest,
+ onTimeOut_Run_ResponseForInterface_ReceivedError) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+
+ VRGetSupportedLanguagesResponsePtr command(
+ CreateCommand<VRGetSupportedLanguagesResponse>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetSupportedLanguages));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+}
+
} // namespace vr_get_supported_languages_response
} // namespace hmi_commands_test
} // namespace commands_test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_is_ready_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_is_ready_request_test.cc
index 9bb8e4c2d5..3d2a46707e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_is_ready_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_is_ready_request_test.cc
@@ -68,9 +68,8 @@ class VRIsReadyRequestTest
bool is_send_message_to_hmi,
bool is_message_contain_param,
am::HmiInterfaces::InterfaceState state) {
- const bool is_send_message_by_timeout = false;
if (is_send_message_to_hmi) {
- ExpectSendMessagesToHMI(is_send_message_by_timeout);
+ ExpectSendMessagesToHMI();
}
EXPECT_CALL(mock_hmi_capabilities_,
set_is_vr_cooperating(is_vr_cooperating_available));
@@ -91,7 +90,7 @@ class VRIsReadyRequestTest
.WillOnce(Return(state));
}
- void ExpectSendMessagesToHMI(bool is_send_message_by_timeout) {
+ void ExpectSendMessagesToHMI() {
smart_objects::SmartObjectSPtr language(
new smart_objects::SmartObject(smart_objects::SmartType_Map));
EXPECT_CALL(mock_message_helper_,
@@ -127,15 +126,32 @@ class VRIsReadyRequestTest
event.set_smart_object(*msg);
}
+ void HMICapabilitiesExpectations() {
+ EXPECT_CALL(
+ mock_hmi_capabilities_,
+ IsRequestsRequiredForCapabilities(hmi_apis::FunctionID::VR_GetLanguage))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetSupportedLanguages))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetCapabilities))
+ .WillOnce(Return(true));
+ }
+
VRIsReadyRequestPtr command_;
};
-TEST_F(VRIsReadyRequestTest, Run_NoKeyAvailableInMessage_HmiInterfacesIgnored) {
+TEST_F(VRIsReadyRequestTest,
+ Run_NoKeyAvailableInMessage_HmiInterfacesIgnored_CacheIsAbsent) {
const bool is_vr_cooperating_available = false;
const bool is_send_message_to_hmi = true;
const bool is_message_contain_param = false;
Event event(hmi_apis::FunctionID::VR_IsReady);
PrepareEvent(is_message_contain_param, event);
+ HMICapabilitiesExpectations();
SetUpExpectations(is_vr_cooperating_available,
is_send_message_to_hmi,
is_message_contain_param,
@@ -143,7 +159,8 @@ TEST_F(VRIsReadyRequestTest, Run_NoKeyAvailableInMessage_HmiInterfacesIgnored) {
command_->on_event(event);
}
-TEST_F(VRIsReadyRequestTest, Run_KeyAvailableEqualToFalse_StateNotAvailable) {
+TEST_F(VRIsReadyRequestTest,
+ Run_KeyAvailableEqualToFalse_StateNotAvailable_CacheIsAbsent) {
const bool is_vr_cooperating_available = false;
const bool is_send_message_to_hmi = false;
const bool is_message_contain_param = true;
@@ -156,12 +173,14 @@ TEST_F(VRIsReadyRequestTest, Run_KeyAvailableEqualToFalse_StateNotAvailable) {
command_->on_event(event);
}
-TEST_F(VRIsReadyRequestTest, Run_KeyAvailableEqualToTrue_StateAvailable) {
+TEST_F(VRIsReadyRequestTest,
+ Run_KeyAvailableEqualToTrue_StateAvailable_CacheIsAbsnet) {
const bool is_vr_cooperating_available = true;
const bool is_send_message_to_hmi = true;
const bool is_message_contain_param = true;
Event event(hmi_apis::FunctionID::VR_IsReady);
PrepareEvent(is_message_contain_param, event, is_vr_cooperating_available);
+ HMICapabilitiesExpectations();
SetUpExpectations(is_vr_cooperating_available,
is_send_message_to_hmi,
is_message_contain_param,
@@ -169,9 +188,10 @@ TEST_F(VRIsReadyRequestTest, Run_KeyAvailableEqualToTrue_StateAvailable) {
command_->on_event(event);
}
-TEST_F(VRIsReadyRequestTest, Run_HMIDoestRespond_SendMessageToHMIByTimeout) {
- const bool is_send_message_by_timeout = true;
- ExpectSendMessagesToHMI(is_send_message_by_timeout);
+TEST_F(VRIsReadyRequestTest,
+ Run_HMIDoestRespond_SendMessageToHMIByTimeout_CacheIsAbsent) {
+ HMICapabilitiesExpectations();
+ ExpectSendMessagesToHMI();
command_->onTimeOut();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc
index b11312eb33..aa199bd112 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc
@@ -48,6 +48,8 @@
#include "application_manager/mock_help_prompt_manager.h"
#include "application_manager/mock_hmi_interface.h"
#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_resume_ctrl.h"
+#include "application_manager/resumption/resumption_data_processor.h"
#include "application_manager/smart_object_keys.h"
#include "smart_objects/smart_object.h"
#include "utils/custom_string.h"
@@ -104,6 +106,7 @@ class AddCommandRequestTest
public:
AddCommandRequestTest()
: msg_(CreateMessage())
+ , smart_obj_(smart_objects::SmartType_Null)
, default_app_name_("test_default_app_name_")
, lock_ptr_(std::make_shared<sync_primitives::Lock>())
, mock_help_prompt_manager_(
@@ -124,8 +127,7 @@ class AddCommandRequestTest
void InitGetters() {
ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kAppId));
- ON_CALL(*mock_app_, FindCommand(kCmdId))
- .WillByDefault(Return(so_ptr_.get()));
+ ON_CALL(*mock_app_, FindCommand(kCmdId)).WillByDefault(Return(smart_obj_));
}
void CreateBasicParamsUIRequest() {
@@ -173,8 +175,7 @@ class AddCommandRequestTest
SmartObject& image = msg_params[cmd_icon];
EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
.WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(*mock_app_, FindCommand(kCmdId))
- .WillOnce(Return(so_ptr_.get()));
+ EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(smart_obj_));
SmartObject first_command = SmartObject(SmartType_Map);
SmartObject second_command = SmartObject(SmartType_Map);
const am::CommandsMap commands_map =
@@ -182,9 +183,9 @@ class AddCommandRequestTest
EXPECT_CALL(*mock_app_, commands_map())
.WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
commands_map, lock_ptr_)));
- so_ptr_ = std::make_shared<SmartObject>(SmartType_Map);
+ SmartObject sub_menu(SmartType_Map);
EXPECT_CALL(*mock_app_, FindSubMenu(kSecondParentId))
- .WillOnce(Return(so_ptr_.get()));
+ .WillOnce(Return(sub_menu));
{
InSequence dummy;
@@ -221,13 +222,14 @@ class AddCommandRequestTest
mock_rpc_service_,
ManageMobileCommand(response,
am::commands::Command::CommandSource::SOURCE_SDL));
+
std::shared_ptr<CommandRequestImpl> base_class_request =
static_cast<std::shared_ptr<CommandRequestImpl> >(request_ptr);
base_class_request->onTimeOut();
}
MessageSharedPtr msg_;
- SmartObjectSPtr so_ptr_;
+ smart_objects::SmartObject smart_obj_;
const utils::custom_string::CustomString default_app_name_;
std::shared_ptr<sync_primitives::Lock> lock_ptr_;
std::shared_ptr<am_test::MockHelpPromptManager> mock_help_prompt_manager_;
@@ -292,14 +294,13 @@ TEST_F(AddCommandRequestTest, Run_MenuNameHasSyntaxError_EXPECT_INVALID_DATA) {
SmartObject& image = msg_params[cmd_icon];
EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
.WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(so_ptr_.get()));
+ EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(smart_obj_));
am::CommandsMap commands_map;
EXPECT_CALL(*mock_app_, commands_map())
.WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
commands_map, lock_ptr_)));
SmartObject parent = SmartObject(SmartType_Map);
- EXPECT_CALL(*mock_app_, FindSubMenu(kFirstParentId))
- .WillOnce(Return(&parent));
+ EXPECT_CALL(*mock_app_, FindSubMenu(kFirstParentId)).WillOnce(Return(parent));
EXPECT_CALL(mock_rpc_service_,
ManageMobileCommand(
@@ -314,7 +315,7 @@ TEST_F(AddCommandRequestTest,
CreateBasicParamsVRRequest();
SmartObject& msg_params = (*msg_)[strings::msg_params];
msg_params[vr_commands][0] = kErroredVRCommand;
- EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(so_ptr_.get()));
+ EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(smart_obj_));
am::CommandsMap commands_map;
EXPECT_CALL(*mock_app_, commands_map())
.WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
@@ -340,7 +341,7 @@ TEST_F(AddCommandRequestTest, Run_CMDIconHasError_EXPECT_INVALID_DATA) {
SmartObject& image = msg_params[cmd_icon];
EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
.WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(so_ptr_.get()));
+ EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(smart_obj_));
am::CommandsMap commands_map;
EXPECT_CALL(*mock_app_, commands_map())
.WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
@@ -360,8 +361,9 @@ TEST_F(AddCommandRequestTest, Run_CommandIDAlreadyExists_EXPECT_INVALID_ID) {
SmartObject& image = msg_params[cmd_icon];
EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
.WillOnce(Return(mobile_apis::Result::SUCCESS));
- so_ptr_ = std::make_shared<SmartObject>(SmartType_Map);
- EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(so_ptr_.get()));
+ SmartObject existing_cmd_so(smart_objects::SmartType_Map);
+ EXPECT_CALL(*mock_app_, FindCommand(kCmdId))
+ .WillOnce(Return(existing_cmd_so));
EXPECT_CALL(mock_rpc_service_,
ManageMobileCommand(
@@ -379,7 +381,7 @@ TEST_F(AddCommandRequestTest,
SmartObject& image = msg_params[cmd_icon];
EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
.WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(so_ptr_.get()));
+ EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(smart_obj_));
SmartObject first_command = SmartObject(SmartType_Map);
SmartObject second_command = SmartObject(SmartType_Map);
const am::CommandsMap commands_map =
@@ -404,7 +406,7 @@ TEST_F(AddCommandRequestTest,
SmartObject& image = msg_params[cmd_icon];
EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
.WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(so_ptr_.get()));
+ EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(smart_obj_));
SmartObject first_command = SmartObject(SmartType_Map);
SmartObject second_command = SmartObject(SmartType_Map);
const am::CommandsMap commands_map =
@@ -412,8 +414,10 @@ TEST_F(AddCommandRequestTest,
EXPECT_CALL(*mock_app_, commands_map())
.WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
commands_map, lock_ptr_)));
+
+ SmartObject invalid_command(SmartType_Null);
EXPECT_CALL(*mock_app_, FindSubMenu(kSecondParentId))
- .WillOnce(Return(so_ptr_.get()));
+ .WillOnce(Return(invalid_command));
EXPECT_CALL(mock_rpc_service_,
ManageMobileCommand(
@@ -432,7 +436,7 @@ TEST_F(AddCommandRequestTest,
SmartObject& image = msg_params[cmd_icon];
EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
.WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(so_ptr_.get()));
+ EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(smart_obj_));
SmartObject first_command = SmartObject(SmartType_Map);
SmartObject second_command = SmartObject(SmartType_Map);
@@ -441,9 +445,9 @@ TEST_F(AddCommandRequestTest,
EXPECT_CALL(*mock_app_, commands_map())
.WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
commands_map, lock_ptr_)));
- so_ptr_ = std::make_shared<SmartObject>(SmartType_Map);
+ SmartObject sub_menu(SmartType_Map);
EXPECT_CALL(*mock_app_, FindSubMenu(kSecondParentId))
- .WillOnce(Return(so_ptr_.get()));
+ .WillOnce(Return(sub_menu));
EXPECT_CALL(mock_rpc_service_,
ManageMobileCommand(
@@ -459,7 +463,7 @@ TEST_F(AddCommandRequestTest, Run_MsgDataEmpty_EXPECT_INVALID_DATA) {
SmartObject& msg_params = (*msg)[strings::msg_params];
msg_params[app_id] = kAppId;
msg_params[cmd_id] = kCmdId;
- EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(so_ptr_.get()));
+ EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(smart_obj_));
EXPECT_CALL(mock_rpc_service_,
ManageMobileCommand(
@@ -478,7 +482,7 @@ TEST_F(AddCommandRequestTest,
SmartObject& image = msg_params[cmd_icon];
EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
.WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(so_ptr_.get()));
+ EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(smart_obj_));
SmartObject first_command = SmartObject(SmartType_Map);
SmartObject second_command = SmartObject(SmartType_Map);
const am::CommandsMap commands_map =
@@ -486,9 +490,9 @@ TEST_F(AddCommandRequestTest,
EXPECT_CALL(*mock_app_, commands_map())
.WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
commands_map, lock_ptr_)));
- so_ptr_ = std::make_shared<SmartObject>(SmartType_Map);
+ SmartObject sub_menu(SmartType_Map);
EXPECT_CALL(*mock_app_, FindSubMenu(kSecondParentId))
- .WillOnce(Return(so_ptr_.get()));
+ .WillOnce(Return(sub_menu));
{
InSequence dummy;
@@ -512,7 +516,7 @@ TEST_F(AddCommandRequestTest, GetRunMethods_SUCCESS) {
SmartObject& image = (*msg_)[msg_params][cmd_icon];
EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
.WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(so_ptr_.get()));
+ EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(smart_obj_));
EXPECT_CALL(*mock_app_, AddCommand(kCmdId, (*msg_)[msg_params]));
am::CommandsMap commands_map;
@@ -1092,6 +1096,7 @@ TEST_F(AddCommandRequestTest,
EXPECT_CALL(mock_rpc_service_,
ManageMobileCommand(
response, am::commands::Command::CommandSource::SOURCE_SDL));
+
std::shared_ptr<CommandRequestImpl> base_class_request =
static_cast<std::shared_ptr<CommandRequestImpl> >(
CreateCommand<AddCommandRequest>(msg_));
@@ -1106,7 +1111,7 @@ TEST_F(AddCommandRequestTest, OnTimeOut_AppRemoveCommandCalled) {
msg_params[menu_params][hmi_request::parent_id] = kSecondParentId;
EXPECT_CALL(mock_message_helper_, VerifyImage(image, _, _))
.WillOnce(Return(mobile_apis::Result::SUCCESS));
- EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(so_ptr_.get()));
+ EXPECT_CALL(*mock_app_, FindCommand(kCmdId)).WillOnce(Return(smart_obj_));
SmartObject first_command = SmartObject(SmartType_Map);
SmartObject second_command = SmartObject(SmartType_Map);
const am::CommandsMap commands_map =
@@ -1114,9 +1119,9 @@ TEST_F(AddCommandRequestTest, OnTimeOut_AppRemoveCommandCalled) {
EXPECT_CALL(*mock_app_, commands_map())
.WillRepeatedly(Return(DataAccessor<application_manager::CommandsMap>(
commands_map, lock_ptr_)));
- so_ptr_ = std::make_shared<SmartObject>(SmartType_Map);
+ SmartObject sub_menu(SmartType_Map);
EXPECT_CALL(*mock_app_, FindSubMenu(kSecondParentId))
- .WillOnce(Return(so_ptr_.get()));
+ .WillOnce(Return(sub_menu));
{
InSequence dummy;
EXPECT_CALL(mock_rpc_service_,
@@ -1142,6 +1147,7 @@ TEST_F(AddCommandRequestTest, OnTimeOut_AppRemoveCommandCalled) {
EXPECT_CALL(mock_rpc_service_,
ManageMobileCommand(
response, am::commands::Command::CommandSource::SOURCE_SDL));
+
std::shared_ptr<CommandRequestImpl> base_class_request =
static_cast<std::shared_ptr<CommandRequestImpl> >(request_ptr);
base_class_request->onTimeOut();
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_sub_menu_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_sub_menu_request_test.cc
index a88a1ade69..23e4418726 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_sub_menu_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_sub_menu_request_test.cc
@@ -104,6 +104,31 @@ TEST_F(AddSubMenuRequestTest, Run_ImageVerificationFailed_EXPECT_INVALID_DATA) {
request_ptr->Run();
}
+TEST_F(AddSubMenuRequestTest, Run_NonExistentParentID_EXPECT_INVALID_ID) {
+ const uint32_t menu_id = 10;
+ const uint32_t parent_id = 4;
+ MessageSharedPtr msg = CreateMsgParams();
+ SmartObject& msg_params = (*msg)[am::strings::msg_params];
+
+ msg_params[am::strings::menu_id] = menu_id;
+ msg_params[am::strings::menu_name] = "test";
+ msg_params[am::strings::parent_id] = parent_id;
+
+ SmartObject sub_menu(smart_objects::SmartType_Null);
+ EXPECT_CALL(*mock_app, FindSubMenu(menu_id)).WillOnce(Return(sub_menu));
+
+ SmartObject parent(smart_objects::SmartType_Null);
+ EXPECT_CALL(*mock_app, FindSubMenu(parent_id)).WillOnce(Return(parent));
+
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_apis::Result::INVALID_ID), _));
+ std::shared_ptr<AddSubMenuRequest> request_ptr =
+ CreateCommand<AddSubMenuRequest>(msg);
+
+ request_ptr->Run();
+}
+
TEST_F(AddSubMenuRequestTest, OnEvent_UI_UNSUPPORTED_RESOURCE) {
const uint32_t menu_id = 10u;
MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/change_registration_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/change_registration_test.cc
index 4394c6fe5e..9736bb380b 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/change_registration_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/change_registration_test.cc
@@ -103,11 +103,11 @@ class ChangeRegistrationRequestTest
(*supported_languages_)[0] =
static_cast<int32_t>(mobile_apis::Language::EN_US);
EXPECT_CALL(mock_hmi_capabilities_, ui_supported_languages())
- .WillOnce(Return(supported_languages_.get()));
+ .WillOnce(Return(supported_languages_));
EXPECT_CALL(mock_hmi_capabilities_, vr_supported_languages())
- .WillOnce(Return(supported_languages_.get()));
+ .WillOnce(Return(supported_languages_));
EXPECT_CALL(mock_hmi_capabilities_, tts_supported_languages())
- .WillOnce(Return(supported_languages_.get()));
+ .WillOnce(Return(supported_languages_));
EXPECT_CALL(app_mngr_, hmi_interfaces())
.WillRepeatedly(ReturnRef(mock_hmi_interfaces_));
@@ -242,11 +242,11 @@ class ChangeRegistrationRequestTest
void ExpectationsHmiCapabilities(
smart_objects::SmartObjectSPtr supported_languages) {
EXPECT_CALL(mock_hmi_capabilities_, ui_supported_languages())
- .WillOnce(Return(supported_languages.get()));
+ .WillOnce(Return(supported_languages));
EXPECT_CALL(mock_hmi_capabilities_, vr_supported_languages())
- .WillOnce(Return(supported_languages.get()));
+ .WillOnce(Return(supported_languages));
EXPECT_CALL(mock_hmi_capabilities_, tts_supported_languages())
- .WillOnce(Return(supported_languages.get()));
+ .WillOnce(Return(supported_languages));
}
void ResultCommandExpectations(MessageSharedPtr msg,
@@ -381,11 +381,11 @@ TEST_F(ChangeRegistrationRequestTest,
(*supported_languages_)[0] =
static_cast<int32_t>(mobile_apis::Language::EN_US);
EXPECT_CALL(mock_hmi_capabilities_, ui_supported_languages())
- .WillOnce(Return(supported_languages_.get()));
+ .WillOnce(Return(supported_languages_));
EXPECT_CALL(mock_hmi_capabilities_, vr_supported_languages())
- .WillOnce(Return(supported_languages_.get()));
+ .WillOnce(Return(supported_languages_));
EXPECT_CALL(mock_hmi_capabilities_, tts_supported_languages())
- .WillOnce(Return(supported_languages_.get()));
+ .WillOnce(Return(supported_languages_));
EXPECT_CALL(app_mngr_, hmi_interfaces())
.WillRepeatedly(ReturnRef(mock_hmi_interfaces_));
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/create_interaction_choice_set_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/create_interaction_choice_set_test.cc
index 73a0008624..80abfec61d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/create_interaction_choice_set_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/create_interaction_choice_set_test.cc
@@ -44,6 +44,8 @@
#include "application_manager/mock_hmi_capabilities.h"
#include "application_manager/mock_hmi_interface.h"
#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_resume_ctrl.h"
+#include "application_manager/resumption/resumption_data_processor.h"
#include "application_manager/smart_object_keys.h"
#include "gtest/gtest.h"
#include "smart_objects/smart_object.h"
@@ -184,6 +186,11 @@ TEST_F(CreateInteractionChoiceSetRequestTest, OnTimeout_GENERIC_ERROR) {
ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
.WillOnce(DoAll(SaveArg<0>(&vr_command_result), Return(true)));
+ resumption_test::MockResumeCtrl mock_resume_ctrl;
+ EXPECT_CALL(app_mngr_, resume_controller())
+ .WillOnce(ReturnRef(mock_resume_ctrl));
+ EXPECT_CALL(mock_resume_ctrl, HandleOnTimeOut(_, _));
+
req_vr->onTimeOut();
EXPECT_EQ(
(*vr_command_result)[strings::msg_params][strings::success].asBool(),
@@ -207,7 +214,7 @@ TEST_F(CreateInteractionChoiceSetRequestTest, OnEvent_VR_UNSUPPORTED_RESOURCE) {
ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_));
- smart_objects::SmartObject* null_obj = NULL;
+ smart_objects::SmartObject null_obj(smart_objects::SmartType_Null);
ON_CALL(*mock_app_, FindChoiceSet(_)).WillByDefault(Return(null_obj));
MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
@@ -219,9 +226,9 @@ TEST_F(CreateInteractionChoiceSetRequestTest, OnEvent_VR_UNSUPPORTED_RESOURCE) {
am::event_engine::Event event(hmi_apis::FunctionID::VR_AddCommand);
event.set_smart_object(*msg);
- smart_objects::SmartObject* ptr = NULL;
- ON_CALL(*mock_app_, FindCommand(kCmdId)).WillByDefault(Return(ptr));
- EXPECT_EQ(NULL, ptr);
+ smart_objects::SmartObject invalid_command(smart_objects::SmartType_Null);
+ ON_CALL(*mock_app_, FindCommand(kCmdId))
+ .WillByDefault(Return(invalid_command));
am::CommandsMap commands_map;
ON_CALL(*mock_app_, commands_map())
@@ -293,9 +300,9 @@ TEST_F(CreateInteractionChoiceSetRequestTest, Run_FindChoiceSetFail_UNSUCCESS) {
EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
.WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
- smart_objects::SmartObject* invalid_choice_set_id =
- &((*message_)[am::strings::msg_params]
- [am::strings::interaction_choice_set_id]);
+ smart_objects::SmartObject invalid_choice_set_id =
+ (*message_)[am::strings::msg_params]
+ [am::strings::interaction_choice_set_id];
EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
.WillOnce(Return(invalid_choice_set_id));
EXPECT_CALL(app_mngr_, GenerateGrammarID()).Times(0);
@@ -329,7 +336,7 @@ TEST_F(CreateInteractionChoiceSetRequestTest,
EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
.WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
- smart_objects::SmartObject* choice_set_id = NULL;
+ smart_objects::SmartObject choice_set_id(smart_objects::SmartType_Null);
EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
.WillOnce(Return(choice_set_id));
@@ -358,7 +365,7 @@ TEST_F(CreateInteractionChoiceSetRequestTest,
(*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
kChoiceSetId;
- smart_objects::SmartObject* choice_set_id = NULL;
+ smart_objects::SmartObject choice_set_id(smart_objects::SmartType_Null);
EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
.WillRepeatedly(Return(choice_set_id));
EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(mock_app_));
@@ -435,7 +442,7 @@ TEST_F(CreateInteractionChoiceSetRequestTest,
EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
.WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
- smart_objects::SmartObject* choice_set_id = NULL;
+ smart_objects::SmartObject choice_set_id(smart_objects::SmartType_Null);
EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
.WillOnce(Return(choice_set_id));
@@ -478,7 +485,7 @@ TEST_F(CreateInteractionChoiceSetRequestTest,
EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
.WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
- smart_objects::SmartObject* choice_set_id = NULL;
+ smart_objects::SmartObject choice_set_id(smart_objects::SmartType_Null);
EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
.WillOnce(Return(choice_set_id));
@@ -511,7 +518,7 @@ TEST_F(CreateInteractionChoiceSetRequestTest, Run_WithoutVrCommands_SUCCESS) {
EXPECT_CALL(mock_message_helper_, CheckChoiceSetVRCommands(_))
.WillOnce(Return(am::MessageHelper::ChoiceSetVRCommandsStatus::NONE));
- smart_objects::SmartObject* choice_set_id = NULL;
+ smart_objects::SmartObject choice_set_id(smart_objects::SmartType_Null);
EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
.WillOnce(Return(choice_set_id));
@@ -549,7 +556,7 @@ TEST_F(CreateInteractionChoiceSetRequestTest,
EXPECT_CALL(mock_message_helper_, CheckChoiceSetVRCommands(_))
.WillOnce(Return(am::MessageHelper::ChoiceSetVRCommandsStatus::MIXED));
- smart_objects::SmartObject* choice_set_id = NULL;
+ smart_objects::SmartObject choice_set_id(smart_objects::SmartType_Null);
EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
.WillOnce(Return(choice_set_id));
@@ -598,7 +605,7 @@ TEST_F(CreateInteractionChoiceSetRequestTest, OnEvent_ValidVrNoError_SUCCESS) {
EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
.WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
- smart_objects::SmartObject* choice_set_id = NULL;
+ smart_objects::SmartObject choice_set_id(smart_objects::SmartType_Null);
EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
.WillOnce(Return(choice_set_id));
@@ -635,7 +642,7 @@ TEST_F(CreateInteractionChoiceSetRequestTest,
EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
.WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
- smart_objects::SmartObject* choice_set_id = NULL;
+ smart_objects::SmartObject choice_set_id(smart_objects::SmartType_Null);
EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
.WillOnce(Return(choice_set_id));
@@ -673,7 +680,7 @@ TEST_F(CreateInteractionChoiceSetRequestTest,
EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
.WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
- smart_objects::SmartObject* choice_set_id = NULL;
+ smart_objects::SmartObject choice_set_id(smart_objects::SmartType_Null);
EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
.WillOnce(Return(choice_set_id));
@@ -704,7 +711,12 @@ TEST_F(CreateInteractionChoiceSetRequestTest,
MobileResultCodeIs(mobile_apis::Result::GENERIC_ERROR),
am::commands::Command::SOURCE_SDL));
+ resumption_test::MockResumeCtrl mock_resume_ctrl;
+ EXPECT_CALL(app_mngr_, resume_controller())
+ .WillOnce(ReturnRef(mock_resume_ctrl));
+ EXPECT_CALL(mock_resume_ctrl, HandleOnTimeOut(_, _));
EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
+
command_->onTimeOut();
}
@@ -724,7 +736,7 @@ TEST_F(CreateInteractionChoiceSetRequestTest,
EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
.WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
- smart_objects::SmartObject* choice_set_id = NULL;
+ smart_objects::SmartObject choice_set_id(smart_objects::SmartType_Null);
EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
.WillOnce(Return(choice_set_id));
@@ -748,7 +760,12 @@ TEST_F(CreateInteractionChoiceSetRequestTest,
EXPECT_CALL(*mock_app_, RemoveChoiceSet(kChoiceSetId));
EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ resumption_test::MockResumeCtrl mock_resume_ctrl;
+ EXPECT_CALL(app_mngr_, resume_controller())
+ .WillOnce(ReturnRef(mock_resume_ctrl));
+ EXPECT_CALL(mock_resume_ctrl, HandleOnTimeOut(_, _));
EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
+
command_->onTimeOut();
}
@@ -769,7 +786,7 @@ TEST_F(CreateInteractionChoiceSetRequestTest, OnTimeOut_InvalidApp_UNSUCCESS) {
EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
.WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
- smart_objects::SmartObject* choice_set_id = NULL;
+ smart_objects::SmartObject choice_set_id(smart_objects::SmartType_Null);
EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
.WillOnce(Return(choice_set_id));
@@ -794,6 +811,11 @@ TEST_F(CreateInteractionChoiceSetRequestTest, OnTimeOut_InvalidApp_UNSUCCESS) {
EXPECT_CALL(app_mngr_, application(kConnectionKey))
.WillOnce(Return(invalid_app));
EXPECT_CALL(*mock_app_, RemoveChoiceSet(_)).Times(0);
+ resumption_test::MockResumeCtrl mock_resume_ctrl;
+ EXPECT_CALL(app_mngr_, resume_controller())
+ .WillOnce(ReturnRef(mock_resume_ctrl));
+ EXPECT_CALL(mock_resume_ctrl, HandleOnTimeOut(_, _));
+
command_->onTimeOut();
}
@@ -813,7 +835,7 @@ TEST_F(CreateInteractionChoiceSetRequestTest,
EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
.WillRepeatedly(Return(mobile_apis::Result::SUCCESS));
- smart_objects::SmartObject* choice_set_id = NULL;
+ smart_objects::SmartObject choice_set_id(smart_objects::SmartType_Null);
EXPECT_CALL(app_mngr_, application(kConnectionKey))
.WillOnce(Return(mock_app_));
@@ -833,6 +855,10 @@ TEST_F(CreateInteractionChoiceSetRequestTest,
FillMessageFieldsItem2(message_);
EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _)).Times(0);
+ resumption_test::MockResumeCtrl mock_resume_ctrl;
+ EXPECT_CALL(app_mngr_, resume_controller())
+ .WillOnce(ReturnRef(mock_resume_ctrl));
+ EXPECT_CALL(mock_resume_ctrl, HandleOnTimeOut(_, _));
EXPECT_CALL(app_mngr_, TerminateRequest(_, _, _));
Event event(hmi_apis::FunctionID::VR_AddCommand);
@@ -889,7 +915,7 @@ TEST_F(CreateInteractionChoiceSetRequestTest, Run_ErrorFromHmiFalse_UNSUCCESS) {
EXPECT_CALL(mock_message_helper_, VerifyImage(_, _, _))
.WillRepeatedly(Return(mobile_apis::Result::GENERIC_ERROR));
- smart_objects::SmartObject* choice_set_id = NULL;
+ smart_objects::SmartObject choice_set_id(smart_objects::SmartType_Null);
EXPECT_CALL(*mock_app_, FindChoiceSet(kChoiceSetId))
.WillRepeatedly(Return(choice_set_id));
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_command_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_command_request_test.cc
index 081058f05a..b8ae3af7fd 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_command_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_command_request_test.cc
@@ -152,9 +152,10 @@ TEST_F(DeleteCommandRequestTest,
ON_CALL(app_mngr_, application(_)).WillByDefault(Return(mock_app_));
- MessageSharedPtr test_msg(CreateMessage(smart_objects::SmartType_Map));
- (*test_msg)[am::strings::vr_commands] = 0;
- (*test_msg)[am::strings::menu_params] = 0;
+ smart_objects::SmartObject test_msg(
+ *CreateMessage(smart_objects::SmartType_Map));
+ test_msg[am::strings::vr_commands] = 0;
+ test_msg[am::strings::menu_params] = 0;
ON_CALL(hmi_interfaces_, GetInterfaceFromFunction(_))
.WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_VR));
@@ -164,8 +165,7 @@ TEST_F(DeleteCommandRequestTest,
ON_CALL(hmi_interfaces_,
GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
.WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- ON_CALL(*mock_app_, FindCommand(kCommandId))
- .WillByDefault(Return(test_msg.get()));
+ ON_CALL(*mock_app_, FindCommand(kCommandId)).WillByDefault(Return(test_msg));
ON_CALL(*mock_app_, get_grammar_id()).WillByDefault(Return(kConnectionKey));
MessageSharedPtr msg(CreateMessage(smart_objects::SmartType_Map));
(*msg)[am::strings::params][am::hmi_response::code] =
@@ -216,9 +216,10 @@ TEST_F(DeleteCommandRequestTest,
MockAppPtr app = CreateMockApp();
ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
- MessageSharedPtr test_msg(CreateMessage(smart_objects::SmartType_Map));
- (*test_msg)[am::strings::vr_commands] = 0;
- (*test_msg)[am::strings::menu_params] = 0;
+ smart_objects::SmartObject test_msg(
+ *CreateMessage(smart_objects::SmartType_Map));
+ test_msg[am::strings::vr_commands] = 0;
+ test_msg[am::strings::menu_params] = 0;
ON_CALL(hmi_interfaces_, GetInterfaceFromFunction(_))
.WillByDefault(Return(am::HmiInterfaces::HMI_INTERFACE_UI));
@@ -228,7 +229,7 @@ TEST_F(DeleteCommandRequestTest,
ON_CALL(hmi_interfaces_,
GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VR))
.WillByDefault(Return(am::HmiInterfaces::STATE_AVAILABLE));
- ON_CALL(*app, FindCommand(kCommandId)).WillByDefault(Return(test_msg.get()));
+ ON_CALL(*app, FindCommand(kCommandId)).WillByDefault(Return(test_msg));
ON_CALL(*app, get_grammar_id()).WillByDefault(Return(kConnectionKey));
MessageSharedPtr msg(CreateMessage(smart_objects::SmartType_Map));
(*msg)[am::strings::params][am::hmi_response::code] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_interaction_choice_set_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_interaction_choice_set_test.cc
index fa96b21ca7..dd4c6fd526 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_interaction_choice_set_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_interaction_choice_set_test.cc
@@ -142,7 +142,7 @@ TEST_F(DeleteInteractionChoiceSetRequestTest, Run_FindChoiceSetFail_UNSUCCESS) {
EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app_));
- smart_objects::SmartObject* choice_set_id = NULL;
+ smart_objects::SmartObject choice_set_id(smart_objects::SmartType_Null);
EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId))
.WillOnce(Return(choice_set_id));
@@ -161,9 +161,9 @@ TEST_F(DeleteInteractionChoiceSetRequestTest, Run_ChoiceSetInUse_SUCCESS) {
EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app_));
- smart_objects::SmartObject* choice_set_id =
- &((*message_)[am::strings::msg_params]
- [am::strings::interaction_choice_set_id]);
+ smart_objects::SmartObject choice_set_id =
+ (*message_)[am::strings::msg_params]
+ [am::strings::interaction_choice_set_id];
choice_set_map_[0].insert(
std::make_pair(kChoiceSetId,
@@ -189,10 +189,11 @@ TEST_F(DeleteInteractionChoiceSetRequestTest,
kConnectionKey;
(*message_)[am::strings::msg_params][am::strings::interaction_choice_set_id] =
kChoiceSetId;
- smart_objects::SmartObject* choice_set_id =
- &((*message_)[am::strings::msg_params]
- [am::strings::interaction_choice_set_id]);
- smart_objects::SmartObject* invalid_choice_set_id = NULL;
+ smart_objects::SmartObject choice_set_id =
+ (*message_)[am::strings::msg_params]
+ [am::strings::interaction_choice_set_id];
+ smart_objects::SmartObject invalid_choice_set_id(
+ smart_objects::SmartType_Null);
EXPECT_CALL(app_mngr_, application(kConnectionKey))
.WillRepeatedly(Return(app_));
@@ -228,8 +229,8 @@ TEST_F(DeleteInteractionChoiceSetRequestTest, Run_SendVrDeleteCommand_SUCCESS) {
(*message_)[am::strings::msg_params][am::strings::grammar_id] = kGrammarId;
(*message_)[am::strings::msg_params][am::strings::choice_set][0]
[am::strings::choice_id] = kChoiceId;
- smart_objects::SmartObject* choice_set_id =
- &((*message_)[am::strings::msg_params]);
+ smart_objects::SmartObject choice_set_id =
+ (*message_)[am::strings::msg_params];
EXPECT_CALL(app_mngr_, application(kConnectionKey))
.WillRepeatedly(Return(app_));
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_sub_menu_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_sub_menu_test.cc
index 04f12568b4..f5856a8eda 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_sub_menu_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/delete_sub_menu_test.cc
@@ -98,7 +98,9 @@ class DeleteSubMenuRequestTest
public:
DeleteSubMenuRequestTest()
: commands_lock_(std::make_shared<sync_primitives::Lock>())
+ , sub_menu_lock_(std::make_shared<sync_primitives::RecursiveLock>())
, accessor_(commands_map_, commands_lock_)
+ , sub_menu_accessor_(sub_menu_map_, sub_menu_lock_)
, message_(CreateMessage())
, command_(CreateCommand<DeleteSubMenuRequest>(message_))
, mock_help_prompt_manager_(
@@ -106,8 +108,11 @@ class DeleteSubMenuRequestTest
, app_(CreateMockApp()) {}
am::CommandsMap commands_map_;
+ am::SubMenuMap sub_menu_map_;
mutable std::shared_ptr<sync_primitives::Lock> commands_lock_;
+ mutable std::shared_ptr<sync_primitives::RecursiveLock> sub_menu_lock_;
DataAccessor<am::CommandsMap> accessor_;
+ DataAccessor<am::SubMenuMap> sub_menu_accessor_;
MessageSharedPtr message_;
DeleteSubMenuRequestPtr command_;
@@ -198,7 +203,7 @@ TEST_F(DeleteSubMenuRequestTest, Run_FindSubMenuFalse_UNSUCCESS) {
(*message_)[am::strings::params][am::strings::connection_key] =
kConnectionKey;
- smart_objects::SmartObject* invalid_sub_menu = NULL;
+ smart_objects::SmartObject invalid_sub_menu(smart_objects::SmartType_Null);
EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app_));
EXPECT_CALL(*app_, FindSubMenu(kMenuId)).WillOnce(Return(invalid_sub_menu));
@@ -215,8 +220,8 @@ TEST_F(DeleteSubMenuRequestTest, Run_SendHMIRequest_SUCCESS) {
(*message_)[am::strings::params][am::strings::connection_key] =
kConnectionKey;
- smart_objects::SmartObject* sub_menu =
- &((*message_)[am::strings::msg_params][am::strings::menu_id]);
+ smart_objects::SmartObject sub_menu =
+ (*message_)[am::strings::msg_params][am::strings::menu_id];
EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app_));
EXPECT_CALL(*app_, FindSubMenu(kMenuId)).WillOnce(Return(sub_menu));
@@ -266,6 +271,17 @@ TEST_F(DeleteSubMenuRequestTest, OnEvent_DeleteSubmenu_SUCCESS) {
commands_map_.insert(
std::make_pair(0, &((*message_)[am::strings::msg_params])));
+ smart_objects::SmartObjectSPtr smartObjectPtr =
+ std::make_shared<smart_objects::SmartObject>();
+
+ smart_objects::SmartObject& object = *smartObjectPtr;
+
+ object[am::strings::position] = 1;
+ object[am::strings::menu_name] = "SubMenu";
+
+ sub_menu_map_.insert(
+ std::pair<uint32_t, smart_objects::SmartObject*>(5, &object));
+ EXPECT_CALL(*app_, sub_menu_map()).WillRepeatedly(Return(sub_menu_accessor_));
EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app_));
InSequence seq;
@@ -330,6 +346,7 @@ TEST_F(DeleteSubMenuRequestTest,
std::make_pair(0, &((*message_)[am::strings::msg_params])));
EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app_));
+ EXPECT_CALL(*app_, sub_menu_map()).WillRepeatedly(Return(sub_menu_accessor_));
EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(0);
EXPECT_CALL(*app_, commands_map()).Times(2).WillRepeatedly(Return(accessor_));
EXPECT_CALL(*app_, RemoveCommand(_)).Times(0);
@@ -357,6 +374,7 @@ TEST_F(DeleteSubMenuRequestTest,
std::make_pair(0, &((*message_)[am::strings::msg_params])));
EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app_));
+ EXPECT_CALL(*app_, sub_menu_map()).WillRepeatedly(Return(sub_menu_accessor_));
EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(0);
EXPECT_CALL(*app_, commands_map()).Times(2).WillRepeatedly(Return(accessor_));
EXPECT_CALL(*app_, RemoveCommand(_)).Times(0);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_app_interface_unregistered_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_app_interface_unregistered_notification_test.cc
new file mode 100644
index 0000000000..64dcec2e0a
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_app_interface_unregistered_notification_test.cc
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "mobile/on_app_interface_unregistered_notification.h"
+
+#include <utility>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/smart_object_keys.h"
+#include "interfaces/MOBILE_API.h"
+#include "smart_objects/smart_object.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace on_app_interface_unregistered_notification_test {
+
+namespace am = ::application_manager;
+
+using sdl_rpc_plugin::commands::OnAppInterfaceUnregisteredNotification;
+using Reason = mobile_apis::AppInterfaceUnregisteredReason::eType;
+using ::testing::Return;
+
+namespace {
+const uint32_t kAppId = 1u;
+typedef std::shared_ptr<MockApplication> MockAppPtr;
+} // namespace
+
+const auto retrieve_data_to_check = [](const smart_objects::SmartObject& so) {
+ return std::make_pair(
+ so[am::strings::params][am::strings::connection_key].asUInt(),
+ so[am::strings::msg_params][am::strings::reason].asInt());
+};
+
+MATCHER_P(CheckMessageData, initial_data, "") {
+ return retrieve_data_to_check(*arg) == initial_data;
+}
+
+class OnAppInterfaceUnregisteredNotificationTest
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ OnAppInterfaceUnregisteredNotificationTest()
+ : message_(CreateMessage()), command_(), mock_app_(CreateMockApp()) {
+ (*message_)[am::strings::params][am::strings::connection_key] = kAppId;
+ ON_CALL(app_mngr_, application(kAppId)).WillByDefault(Return(mock_app_));
+ CommandsTest<CommandsTestMocks::kIsNice>::InitCommand(kDefaultTimeout_);
+ command_.reset(
+ new OnAppInterfaceUnregisteredNotification(message_,
+ app_mngr_,
+ mock_rpc_service_,
+ mock_hmi_capabilities_,
+ mock_policy_handler_));
+ }
+
+ void CheckResponseParameters(const bool is_wep_mode_enabled,
+ const bool is_final_message) {
+ ON_CALL(*mock_app_, webengine_projection_enabled())
+ .WillByDefault(Return(is_wep_mode_enabled));
+
+ const auto initial_data = retrieve_data_to_check(*message_);
+ EXPECT_CALL(
+ mock_rpc_service_,
+ SendMessageToMobile(CheckMessageData(initial_data), is_final_message));
+ }
+
+ am::commands::MessageSharedPtr message_;
+ std::unique_ptr<OnAppInterfaceUnregisteredNotification> command_;
+ MockAppPtr mock_app_;
+};
+
+TEST_F(OnAppInterfaceUnregisteredNotificationTest,
+ Run_AnyReasonButResourceConstraint_NonFinalMessageSent) {
+ (*message_)[am::strings::msg_params][am::strings::reason] =
+ Reason::IGNITION_OFF;
+
+ CheckResponseParameters(true, false);
+
+ ASSERT_TRUE(command_->Init());
+ command_->Run();
+}
+
+TEST_F(OnAppInterfaceUnregisteredNotificationTest,
+ Run_ResourceConstraintForNonWebApp_NonFinalMessageSent) {
+ (*message_)[am::strings::msg_params][am::strings::reason] =
+ Reason::RESOURCE_CONSTRAINT;
+
+ CheckResponseParameters(false, true);
+
+ ASSERT_TRUE(command_->Init());
+ command_->Run();
+}
+
+TEST_F(OnAppInterfaceUnregisteredNotificationTest,
+ Run_ResourceConstraintForWebApp_FinalMessageSent) {
+ (*message_)[am::strings::msg_params][am::strings::reason] =
+ Reason::RESOURCE_CONSTRAINT;
+
+ CheckResponseParameters(true, true);
+
+ ASSERT_TRUE(command_->Init());
+ command_->Run();
+}
+
+} // namespace on_app_interface_unregistered_notification_test
+} // namespace mobile_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_button_notification_commands_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_button_notification_commands_test.cc
index aa48e8916b..e4536ddeea 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_button_notification_commands_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_button_notification_commands_test.cc
@@ -351,6 +351,7 @@ TYPED_TEST(OnButtonNotificationCommandsTest, Run_SUCCESS) {
.WillRepeatedly(Return(mobile_apis::HMILevel::HMI_FULL));
ON_CALL(*mock_app, IsFullscreen()).WillByDefault(Return(true));
+ ON_CALL(this->app_mngr_, application(kAppId)).WillByDefault(Return(mock_app));
EXPECT_CALL(this->app_mngr_, applications_by_button(kButtonName))
.WillOnce(Return(subscribed_apps_list));
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_command_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_command_notification_test.cc
index 1356b1c5fa..10a84452e9 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_command_notification_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_command_notification_test.cc
@@ -86,8 +86,10 @@ TEST_F(OnCommandNotificationTest, Run_NoAppsForTheCommand_UNSUCCESS) {
MockAppPtr mock_app(CreateMockApp());
EXPECT_CALL(app_mngr_, application(kAppId)).WillOnce(Return(mock_app));
+ smart_objects::SmartObject invalid_command(smart_objects::SmartType_Null);
+
EXPECT_CALL(*mock_app, FindCommand(kCommandId))
- .WillOnce(Return(static_cast<SmartObject*>(NULL)));
+ .WillOnce(Return(invalid_command));
EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
@@ -121,9 +123,9 @@ TEST_F(OnCommandNotificationTest, Run_SUCCESS) {
MockAppPtr mock_app(CreateMockApp());
EXPECT_CALL(app_mngr_, application(kAppId)).WillOnce(Return(mock_app));
- MessageSharedPtr dummy_msg(CreateMessage());
+ smart_objects::SmartObject empty_command(smart_objects::SmartType_Map);
EXPECT_CALL(*mock_app, FindCommand(kCommandId))
- .WillOnce(Return(dummy_msg.get()));
+ .WillOnce(Return(empty_command));
EXPECT_CALL(mock_rpc_service_,
SendMessageToMobile(CheckNotificationMessage(), _));
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_capability_updated_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_capability_updated_notification_test.cc
index 349ada66a2..7e7b16aa89 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_capability_updated_notification_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_capability_updated_notification_test.cc
@@ -183,6 +183,10 @@ TEST_F(
ON_CALL(mock_hmi_capabilities_, system_display_capabilities())
.WillByDefault(Return(system_display_capabilities));
+ application_manager::DisplayCapabilitiesBuilder builder(*mock_app_);
+ ON_CALL(*mock_app_, display_capabilities_builder())
+ .WillByDefault(ReturnRef(builder));
+
sdl_rpc_plugin::SDLRPCPlugin sdl_rpc_plugin;
std::shared_ptr<sdl_rpc_plugin::SystemCapabilityAppExtension>
@@ -197,7 +201,7 @@ TEST_F(
DataAccessor<application_manager::ApplicationSet>(apps, apps_lock_));
ON_CALL(app_mngr_, applications()).WillByDefault(Return(apps_data));
- ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kAppId));
ON_CALL(*mock_app_, display_capabilities()).WillByDefault(Return(nullptr));
ON_CALL(*mock_app_,
QueryInterface(sdl_rpc_plugin::SystemCapabilityAppExtension::
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_request_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_request_notification_test.cc
index ffa7203f1f..93ccf6c435 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_request_notification_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_request_notification_test.cc
@@ -77,10 +77,25 @@ class OnSystemRequestNotificationTest
ON_CALL(*mock_app_, device()).WillByDefault(Return(kDeviceId));
}
+ MessageSharedPtr CreateBasicMessage() {
+ MessageSharedPtr message = CreateMessage();
+ (*message)[strings::params][strings::connection_key] = kConnectionKey;
+ (*message)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::eType::OnSystemRequestID);
+ const mobile_apis::RequestType::eType request_type =
+ RequestType::NAVIGATION;
+ (*message)[strings::msg_params][strings::request_type] = request_type;
+ return message;
+ }
+
+ static const std::string big_url_;
+
protected:
MockAppPtr mock_app_;
};
+const std::string OnSystemRequestNotificationTest::big_url_(20000u, 'a');
+
TEST_F(OnSystemRequestNotificationTest, Run_ProprietaryType_SUCCESS) {
const mobile_apis::RequestType::eType request_type =
mobile_apis::RequestType::PROPRIETARY;
@@ -160,6 +175,56 @@ TEST_F(OnSystemRequestNotificationTest, Run_HTTPType_SUCCESS) {
(*msg)[strings::params][strings::protocol_version].asInt());
}
+TEST_F(OnSystemRequestNotificationTest, Run_NavigationHugeUrl_SUCCESS) {
+ MessageSharedPtr msg = CreateBasicMessage();
+
+ (*msg)[strings::msg_params][strings::url] = big_url_;
+
+ auto command = CreateCommand<OnSystemRequestNotification>(msg);
+
+ PreConditions();
+
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_));
+ ON_CALL(*mock_app_, policy_app_id()).WillByDefault(Return(kPolicyAppId));
+ ON_CALL(
+ mock_policy_handler_,
+ IsRequestTypeAllowed(kDeviceId, kPolicyAppId, RequestType::NAVIGATION))
+ .WillByDefault(Return(true));
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(msg, false));
+
+ ASSERT_TRUE(command->Init());
+ command->Run();
+
+ EXPECT_EQ(application_manager::MessageType::kNotification,
+ (*msg)[strings::params][strings::message_type].asInt());
+}
+
+TEST_F(OnSystemRequestNotificationTest,
+ ValidateSchema_NavigationHugeUrl_SUCCESS) {
+ MessageSharedPtr msg = CreateBasicMessage();
+
+ (*msg)[strings::params][strings::protocol_type] =
+ CommandImpl::hmi_protocol_type_;
+ (*msg)[strings::params][strings::protocol_version] =
+ CommandImpl::protocol_version_;
+ (*msg)[strings::params][strings::message_type] =
+ static_cast<int32_t>(application_manager::MessageType::kNotification);
+
+ (*msg)[strings::msg_params][strings::url] = big_url_;
+
+ mobile_apis::MOBILE_API mobile_so_factoy;
+ ns_smart_device_link::ns_smart_objects::CSmartSchema schema;
+ mobile_so_factoy.GetSchema(mobile_apis::FunctionID::eType::OnSystemRequestID,
+ mobile_apis::messageType::eType::notification,
+ schema);
+
+ rpc::ValidationReport report("RPC");
+ EXPECT_EQ(smart_objects::errors::eType::OK, schema.validate(*msg, &report));
+ EXPECT_EQ("", rpc::PrettyFormat(report));
+}
+
TEST_F(OnSystemRequestNotificationTest, Run_InvalidApp_NoNotification) {
const mobile_apis::RequestType::eType request_type =
mobile_apis::RequestType::HTTP;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_way_point_change_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_way_point_change_notification_test.cc
index 83958954cd..ec401ae2a8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_way_point_change_notification_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_way_point_change_notification_test.cc
@@ -59,19 +59,40 @@ using sdl_rpc_plugin::commands::OnWayPointChangeNotification;
typedef std::shared_ptr<OnWayPointChangeNotification> NotificationPtr;
namespace {
-const uint32_t kAppId = 1u;
+const uint32_t kApp1Id = 1u;
+const uint32_t kApp2Id = 2u;
} // namespace
class OnWayPointChangeNotificationTest
: public CommandsTest<CommandsTestMocks::kIsNice> {
public:
- OnWayPointChangeNotificationTest()
- : command_(CreateCommand<OnWayPointChangeNotification>()) {}
+ OnWayPointChangeNotificationTest() {}
+
+ void SetUp() OVERRIDE {
+ command_ = CreateCommand();
+ }
+
+ std::shared_ptr<OnWayPointChangeNotification> CreateCommand() {
+ InitCommand(CommandsTest<CommandsTestMocks::kIsNice>::kDefaultTimeout_);
+ message_ = CreateMessage();
+ return std::make_shared<OnWayPointChangeNotification>(
+ message_,
+ app_mngr_,
+ mock_rpc_service_,
+ mock_hmi_capabilities_,
+ mock_policy_handler_);
+ }
+
+ MessageSharedPtr CreateMessage(
+ const smart_objects::SmartType type = smart_objects::SmartType_Null) {
+ return std::make_shared<SmartObject>(type);
+ }
NotificationPtr command_;
+ MessageSharedPtr message_;
};
-MATCHER(CheckMessageData, "") {
+MATCHER_P(CheckMessageData, appID, "") {
const bool kIsMobileProtocolTypeCorrect =
(*arg)[am::strings::params][am::strings::protocol_type].asInt() ==
am::commands::CommandImpl::mobile_protocol_type_;
@@ -86,7 +107,7 @@ MATCHER(CheckMessageData, "") {
const bool kIsConnectionKeyCorrect =
(*arg)[am::strings::params][am::strings::connection_key].asUInt() ==
- kAppId;
+ appID;
using namespace helpers;
return Compare<bool, EQ, ALL>(true,
@@ -99,11 +120,42 @@ MATCHER(CheckMessageData, "") {
TEST_F(OnWayPointChangeNotificationTest,
Run_NotEmptyListOfAppsSubscribedForWayPoints_SUCCESS) {
std::set<uint32_t> apps_subscribed_for_way_points;
- apps_subscribed_for_way_points.insert(kAppId);
+ apps_subscribed_for_way_points.insert(kApp1Id);
EXPECT_CALL(app_mngr_, GetAppsSubscribedForWayPoints())
.WillOnce(Return(apps_subscribed_for_way_points));
- EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(CheckMessageData(), _));
+ EXPECT_CALL(mock_rpc_service_,
+ SendMessageToMobile(CheckMessageData(kApp1Id), _));
+
+ command_->Run();
+}
+
+TEST_F(OnWayPointChangeNotificationTest,
+ Run_StoreWayPointsDuringNotification_SUCCESS) {
+ std::set<uint32_t> apps_subscribed_for_way_points;
+ apps_subscribed_for_way_points.insert(kApp1Id);
+
+ EXPECT_CALL(app_mngr_, GetAppsSubscribedForWayPoints())
+ .WillOnce(Return(apps_subscribed_for_way_points));
+ EXPECT_CALL(mock_rpc_service_,
+ SendMessageToMobile(CheckMessageData(kApp1Id), _));
+ EXPECT_CALL(app_mngr_, SaveWayPointsMessage(message_));
+
+ command_->Run();
+}
+
+TEST_F(OnWayPointChangeNotificationTest,
+ Run_BroadcastingWayPointsToAllApps_SUCCESS) {
+ std::set<uint32_t> apps_subscribed_for_way_points;
+ apps_subscribed_for_way_points.insert(kApp1Id);
+ apps_subscribed_for_way_points.insert(kApp2Id);
+
+ EXPECT_CALL(app_mngr_, GetAppsSubscribedForWayPoints())
+ .WillOnce(Return(apps_subscribed_for_way_points));
+ EXPECT_CALL(mock_rpc_service_,
+ SendMessageToMobile(CheckMessageData(kApp1Id), _));
+ EXPECT_CALL(mock_rpc_service_,
+ SendMessageToMobile(CheckMessageData(kApp2Id), _));
command_->Run();
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/register_app_interface_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/register_app_interface_request_test.cc
index 6376570106..fab648fc95 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/register_app_interface_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/register_app_interface_request_test.cc
@@ -43,7 +43,9 @@
#include "application_manager/mock_hmi_capabilities.h"
#include "application_manager/mock_hmi_interface.h"
#include "application_manager/mock_resume_ctrl.h"
+#include "application_manager/mock_rpc_plugin_manager.h"
#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/resumption/resumption_data_processor.h"
#include "application_manager/smart_object_keys.h"
#include "connection_handler/mock_connection_handler.h"
#include "gtest/gtest.h"
@@ -73,11 +75,13 @@ using ::testing::SetArgPointee;
namespace am = ::application_manager;
using am::commands::MessageSharedPtr;
+using am::plugin_manager::MockRPCPluginManager;
using sdl_rpc_plugin::commands::RegisterAppInterfaceRequest;
namespace {
const uint32_t kConnectionKey = 1u;
const uint32_t kConnectionKey2 = 2u;
+const uint32_t kDefaultTimeout = 0u;
const connection_handler::DeviceHandle kDeviceHandle = 3u;
const hmi_apis::Common_Language::eType kHmiLanguage =
hmi_apis::Common_Language::EN_US;
@@ -93,6 +97,7 @@ const std::string kFullAppId = "test_app_id_long";
const std::string kDummyString = "test_string";
const std::vector<uint32_t> kDummyDiagModes;
const utils::SemanticVersion mock_semantic_version(1, 0, 0);
+const connection_handler::DeviceHandle kHandle = 1;
} // namespace
class RegisterAppInterfaceRequestTest
@@ -107,17 +112,33 @@ class RegisterAppInterfaceRequestTest
, pending_lock_ptr_(std::make_shared<sync_primitives::Lock>())
, mock_application_helper_(
application_manager_test::MockApplicationHelper::
- application_helper_mock()) {
+ application_helper_mock())
+ , mock_rpc_plugin_manager_(
+ std::make_shared<NiceMock<MockRPCPluginManager> >())
+ , message_helper_mock_(
+ *application_manager::MockMessageHelper::message_helper_mock())
+ , notify_upd_manager_(std::make_shared<utils::CallNothing>()) {
InitGetters();
InitLanguage();
}
void SetUp() OVERRIDE {
testing::Mock::VerifyAndClearExpectations(&mock_application_helper_);
+ testing::Mock::VerifyAndClearExpectations(&message_helper_mock_);
+
+ ON_CALL(app_mngr_, GetPluginManager())
+ .WillByDefault(ReturnRef(*mock_rpc_plugin_manager_));
+
+ ON_CALL(app_mngr_, GetPolicyHandler())
+ .WillByDefault(ReturnRef(mock_policy_handler_));
+
+ ON_CALL(app_mngr_, GetRPCService())
+ .WillByDefault(ReturnRef(mock_rpc_service_));
}
void TearDown() OVERRIDE {
testing::Mock::VerifyAndClearExpectations(&mock_application_helper_);
+ testing::Mock::VerifyAndClearExpectations(&message_helper_mock_);
}
void InitBasicMessage() {
@@ -150,6 +171,15 @@ class RegisterAppInterfaceRequestTest
ON_CALL(*mock_app, policy_app_id()).WillByDefault(Return(kAppId1));
ON_CALL(*mock_app, msg_version())
.WillByDefault(ReturnRef(mock_semantic_version));
+ ON_CALL(*mock_app, protocol_version())
+ .WillByDefault(
+ Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5));
+
+ capabilities_builder_ptr_.reset(
+ new application_manager::DisplayCapabilitiesBuilder(*mock_app));
+ ON_CALL(*mock_app, display_capabilities_builder())
+ .WillByDefault(ReturnRef(*capabilities_builder_ptr_));
+
return mock_app;
}
@@ -187,6 +217,8 @@ class RegisterAppInterfaceRequestTest
.WillByDefault(Return(smart_objects::SmartObjectSPtr()));
ON_CALL(mock_hmi_capabilities_, display_capabilities())
.WillByDefault(Return(smart_objects::SmartObjectSPtr()));
+ ON_CALL(mock_hmi_capabilities_, seat_location_capability())
+ .WillByDefault(Return(smart_objects::SmartObjectSPtr()));
ON_CALL(mock_hmi_capabilities_, audio_pass_thru_capabilities())
.WillByDefault(Return(smart_objects::SmartObjectSPtr()));
ON_CALL(mock_hmi_capabilities_, vehicle_type())
@@ -201,6 +233,8 @@ class RegisterAppInterfaceRequestTest
.WillByDefault(Return(smart_objects::SmartObjectSPtr()));
ON_CALL(mock_hmi_capabilities_, pcm_stream_capabilities())
.WillByDefault(Return(smart_objects::SmartObjectSPtr()));
+ ON_CALL(mock_hmi_capabilities_, seat_location_capability())
+ .WillByDefault(Return(smart_objects::SmartObjectSPtr()));
ON_CALL(app_mngr_settings_, supported_diag_modes())
.WillByDefault(ReturnRef(kDummyDiagModes));
ON_CALL(mock_policy_handler_, GetAppRequestTypes(_, _))
@@ -277,12 +311,62 @@ class RegisterAppInterfaceRequestTest
HMIResultCodeIs(hmi_apis::FunctionID::VR_ChangeRegistration), _))
.Times(0);
+ auto notification = std::make_shared<smart_objects::SmartObject>();
+ ON_CALL(message_helper_mock_, CreateHMIStatusNotification(_, _))
+ .WillByDefault(Return(notification));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(notification, _));
+
EXPECT_CALL(app_mngr_,
OnApplicationSwitched(
std::static_pointer_cast<application_manager::Application>(
mock_app)));
}
+ void SetCommonPreconditionsToRegisterApplication() {
+ ON_CALL(app_mngr_, IsApplicationForbidden(_, _))
+ .WillByDefault(Return(false));
+ ON_CALL(mock_connection_handler_,
+ GetDataOnSessionKey(kConnectionKey, _, _, _))
+ .WillByDefault(DoAll(SetArgPointee<3>(kDeviceHandle), Return(0)));
+ ON_CALL(mock_session_observer_,
+ GetDataOnDeviceID(kDeviceHandle, _, _, _, _))
+ .WillByDefault(DoAll(SetArgPointee<3>(kMacAddress1), Return(0)));
+ ON_CALL(app_mngr_, reregister_application_by_policy_id(kAppId1))
+ .WillByDefault(Return(ApplicationSharedPtr()));
+ ON_CALL(app_mngr_, application(kMacAddress1, kAppId1))
+ .WillByDefault(Return(ApplicationSharedPtr()));
+ ON_CALL(app_mngr_, applications())
+ .WillByDefault(
+ Return(DataAccessor<am::ApplicationSet>(app_set_, lock_ptr_)));
+ ON_CALL(app_mngr_, pending_applications())
+ .WillByDefault(Return(DataAccessor<am::AppsWaitRegistrationSet>(
+ pending_app_set_, pending_lock_ptr_)));
+ ON_CALL(mock_policy_handler_, PolicyEnabled()).WillByDefault(Return(true));
+ ON_CALL(mock_policy_handler_, GetInitialAppData(kAppId1, _, _))
+ .WillByDefault(Return(true));
+ ON_CALL(mock_rpc_service_,
+ ManageHMICommand(
+ HMIResultCodeIs(
+ hmi_apis::FunctionID::BasicCommunication_OnAppRegistered),
+ _))
+ .WillByDefault(Return(true));
+ ON_CALL(
+ mock_rpc_service_,
+ ManageHMICommand(
+ HMIResultCodeIs(hmi_apis::FunctionID::Buttons_OnButtonSubscription),
+ _))
+ .WillByDefault(Return(true));
+ }
+
+ void SetCommonPreconditionsToCheckWithPolicyData(MockAppPtr mock_app) {
+ ON_CALL(mock_policy_handler_, AddApplication(kMacAddress1, kAppId1, _))
+ .WillByDefault(Return(notify_upd_manager_));
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app));
+ ON_CALL(app_mngr_, RegisterApplication(msg_))
+ .WillByDefault(Return(mock_app));
+ }
+
MessageSharedPtr msg_;
std::shared_ptr<RegisterAppInterfaceRequest> command_;
@@ -296,7 +380,7 @@ class RegisterAppInterfaceRequestTest
typedef IsNiceMock<policy_test::MockPolicyHandlerInterface,
kMocksAreNice>::Result MockPolicyHandlerInterface;
- typedef IsNiceMock<resumprion_test::MockResumeCtrl, kMocksAreNice>::Result
+ typedef IsNiceMock<resumption_test::MockResumeCtrl, kMocksAreNice>::Result
MockResumeCtrl;
typedef IsNiceMock<connection_handler_test::MockConnectionHandler,
@@ -312,12 +396,23 @@ class RegisterAppInterfaceRequestTest
MockConnectionHandler mock_connection_handler_;
MockSessionObserver mock_session_observer_;
application_manager_test::MockApplicationHelper& mock_application_helper_;
+ std::shared_ptr<am::plugin_manager::MockRPCPluginManager>
+ mock_rpc_plugin_manager_;
+ application_manager::MockMessageHelper& message_helper_mock_;
+ policy::StatusNotifier notify_upd_manager_;
+ std::unique_ptr<application_manager::DisplayCapabilitiesBuilder>
+ capabilities_builder_ptr_;
};
TEST_F(RegisterAppInterfaceRequestTest, Init_SUCCESS) {
EXPECT_TRUE(command_->Init());
}
+TEST_F(RegisterAppInterfaceRequestTest, DefaultTimeout_CheckIfZero_SUCCESS) {
+ command_->Init();
+ EXPECT_EQ(command_->default_timeout(), kDefaultTimeout);
+}
+
TEST_F(RegisterAppInterfaceRequestTest, Run_MinimalData_SUCCESS) {
InitBasicMessage();
(*msg_)[am::strings::msg_params][am::strings::hash_id] = kAppId1;
@@ -326,14 +421,12 @@ TEST_F(RegisterAppInterfaceRequestTest, Run_MinimalData_SUCCESS) {
.WillOnce(Return(true))
.WillOnce(Return(false));
ON_CALL(app_mngr_, IsHMICooperating()).WillByDefault(Return(false));
- EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _));
EXPECT_CALL(app_mngr_, IsApplicationForbidden(_, _)).WillOnce(Return(false));
- connection_handler::DeviceHandle handle = 1;
ON_CALL(mock_connection_handler_,
GetDataOnSessionKey(kConnectionKey, _, _, _))
- .WillByDefault(DoAll(SetArgPointee<3>(handle), Return(0)));
- ON_CALL(mock_session_observer_, GetDataOnDeviceID(handle, _, _, _, _))
+ .WillByDefault(DoAll(SetArgPointee<3>(kHandle), Return(0)));
+ ON_CALL(mock_session_observer_, GetDataOnDeviceID(kHandle, _, _, _, _))
.WillByDefault(DoAll(SetArgPointee<3>(kMacAddress1), Return(0)));
MockAppPtr mock_app = CreateBasicMockedApp();
@@ -349,16 +442,14 @@ TEST_F(RegisterAppInterfaceRequestTest, Run_MinimalData_SUCCESS) {
.WillByDefault(Return(DataAccessor<am::AppsWaitRegistrationSet>(
pending_app_set_, pending_lock_ptr_)));
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app));
ON_CALL(mock_policy_handler_, PolicyEnabled()).WillByDefault(Return(true));
ON_CALL(mock_policy_handler_, GetInitialAppData(kAppId1, _, _))
.WillByDefault(Return(true));
- policy::StatusNotifier notify_upd_manager =
- std::make_shared<utils::CallNothing>();
ON_CALL(mock_policy_handler_, AddApplication(kMacAddress1, kAppId1, _))
- .WillByDefault(Return(notify_upd_manager));
+ .WillByDefault(Return(notify_upd_manager_));
EXPECT_CALL(app_mngr_, RegisterApplication(msg_)).WillOnce(Return(mock_app));
@@ -374,6 +465,11 @@ TEST_F(RegisterAppInterfaceRequestTest, Run_MinimalData_SUCCESS) {
HMIResultCodeIs(hmi_apis::FunctionID::Buttons_OnButtonSubscription),
_))
.WillOnce(Return(true));
+
+ application_manager::DisplayCapabilitiesBuilder builder(*mock_app);
+ ON_CALL(*mock_app, display_capabilities_builder())
+ .WillByDefault(ReturnRef(builder));
+
EXPECT_CALL(mock_rpc_service_,
ManageMobileCommand(_, am::commands::Command::SOURCE_SDL))
.Times(2);
@@ -413,13 +509,11 @@ TEST_F(RegisterAppInterfaceRequestTest,
.WillOnce(Return(true))
.WillOnce(Return(false));
ON_CALL(app_mngr_, IsHMICooperating()).WillByDefault(Return(false));
- EXPECT_CALL(app_mngr_, updateRequestTimeout(_, _, _));
EXPECT_CALL(app_mngr_, IsApplicationForbidden(_, _)).WillOnce(Return(false));
- connection_handler::DeviceHandle handle = 1;
ON_CALL(mock_connection_handler_,
GetDataOnSessionKey(kConnectionKey, _, _, _))
- .WillByDefault(DoAll(SetArgPointee<3>(handle), Return(0)));
+ .WillByDefault(DoAll(SetArgPointee<3>(kHandle), Return(0)));
ON_CALL(mock_session_observer_, GetDataOnDeviceID(_, _, _, _, _))
.WillByDefault(DoAll(SetArgPointee<3>(kMacAddress1), Return(0)));
@@ -429,8 +523,8 @@ TEST_F(RegisterAppInterfaceRequestTest,
EXPECT_CALL(app_mngr_, application(kMacAddress1, kAppId1))
.WillRepeatedly(Return(ApplicationSharedPtr()));
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(mock_app));
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app));
MessageSharedPtr expected_message =
CreateMessage(smart_objects::SmartType_Map);
@@ -478,10 +572,8 @@ TEST_F(RegisterAppInterfaceRequestTest,
ON_CALL(mock_policy_handler_, PolicyEnabled()).WillByDefault(Return(true));
ON_CALL(mock_policy_handler_, GetInitialAppData(kAppId1, _, _))
.WillByDefault(Return(true));
- policy::StatusNotifier notify_upd_manager =
- std::make_shared<utils::CallNothing>();
ON_CALL(mock_policy_handler_, AddApplication(kMacAddress1, kAppId1, _))
- .WillByDefault(Return(notify_upd_manager));
+ .WillByDefault(Return(notify_upd_manager_));
EXPECT_CALL(app_mngr_, RegisterApplication(msg_)).WillOnce(Return(mock_app));
@@ -515,6 +607,11 @@ TEST_F(RegisterAppInterfaceRequestTest,
ManageHMICommand(
HMIResultCodeIs(hmi_apis::FunctionID::UI_ChangeRegistration), _))
.WillOnce(Return(true));
+
+ application_manager::DisplayCapabilitiesBuilder builder(*mock_app);
+ ON_CALL(*mock_app, display_capabilities_builder())
+ .WillByDefault(ReturnRef(builder));
+
EXPECT_CALL(mock_rpc_service_,
ManageMobileCommand(_, am::commands::Command::SOURCE_SDL))
.Times(2);
@@ -560,8 +657,8 @@ TEST_F(RegisterAppInterfaceRequestTest,
EXPECT_CALL(mock_application_helper_, RecallApplicationData(_, _)).Times(0);
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(mock_app));
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app));
SetCommonExpectionsOnSwitchedApplication(mock_app,
mobile_apis::Result::SUCCESS);
@@ -607,8 +704,8 @@ TEST_F(RegisterAppInterfaceRequestTest,
EXPECT_CALL(app_mngr_, RegisterApplication(msg_)).Times(0);
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(mock_app));
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app));
SetCommonExpectionsOnSwitchedApplication(mock_app,
mobile_apis::Result::RESUME_FAILED);
@@ -643,8 +740,8 @@ TEST_F(RegisterAppInterfaceRequestTest,
EXPECT_CALL(app_mngr_, RegisterApplication(msg_)).Times(0);
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillRepeatedly(Return(mock_app));
+ ON_CALL(app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app));
SetCommonExpectionsOnSwitchedApplication(mock_app,
mobile_apis::Result::RESUME_FAILED);
@@ -716,7 +813,6 @@ TEST_F(RegisterAppInterfaceRequestTest,
.WillOnce(Return(true))
.WillOnce(Return(false));
ON_CALL(app_mngr_, IsHMICooperating()).WillByDefault(Return(false));
- EXPECT_CALL(app_mngr_, updateRequestTimeout(kConnectionKey2, _, _));
EXPECT_CALL(app_mngr_, IsApplicationForbidden(kConnectionKey2, kAppId1))
.WillOnce(Return(false));
@@ -737,16 +833,14 @@ TEST_F(RegisterAppInterfaceRequestTest,
EXPECT_CALL(app_mngr_, reregister_application_by_policy_id(kAppId1))
.WillOnce(Return(ApplicationSharedPtr()));
- EXPECT_CALL(app_mngr_, application(kConnectionKey2))
- .WillOnce(Return(mock_app2));
+ ON_CALL(app_mngr_, application(kConnectionKey2))
+ .WillByDefault(Return(mock_app2));
ON_CALL(mock_policy_handler_, PolicyEnabled()).WillByDefault(Return(true));
ON_CALL(mock_policy_handler_, GetInitialAppData(kAppId1, _, _))
.WillByDefault(Return(true));
- policy::StatusNotifier notify_upd_manager =
- std::make_shared<utils::CallNothing>();
ON_CALL(mock_policy_handler_, AddApplication(kMacAddress2, kAppId1, _))
- .WillByDefault(Return(notify_upd_manager));
+ .WillByDefault(Return(notify_upd_manager_));
EXPECT_CALL(app_mngr_, RegisterApplication(msg_)).WillOnce(Return(mock_app2));
@@ -780,6 +874,11 @@ TEST_F(RegisterAppInterfaceRequestTest,
ManageHMICommand(
HMIResultCodeIs(hmi_apis::FunctionID::UI_ChangeRegistration), _))
.WillOnce(Return(true));
+
+ application_manager::DisplayCapabilitiesBuilder builder(*mock_app2);
+ ON_CALL(*mock_app2, display_capabilities_builder())
+ .WillByDefault(ReturnRef(builder));
+
EXPECT_CALL(mock_rpc_service_,
ManageMobileCommand(_, am::commands::Command::SOURCE_SDL))
.Times(2);
@@ -789,6 +888,264 @@ TEST_F(RegisterAppInterfaceRequestTest,
command_->Run();
}
+TEST_F(RegisterAppInterfaceRequestTest,
+ RegisterAppWith_WEB_VIEW_HMITypeSuccess) {
+ SetCommonPreconditionsToRegisterApplication();
+
+ InitBasicMessage();
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][0] =
+ mobile_apis::AppHMIType::WEB_VIEW;
+
+ MockAppPtr mock_app = CreateBasicMockedApp();
+ SetCommonPreconditionsToCheckWithPolicyData(mock_app);
+ std::vector<std::string> present_hmi_types_in_policy{"WEB_VIEW"};
+ ON_CALL(mock_policy_handler_, GetInitialAppData(kAppId1, _, _))
+ .WillByDefault(
+ DoAll(SetArgPointee<2>(present_hmi_types_in_policy), Return(true)));
+
+ auto app = std::static_pointer_cast<am::Application>(mock_app);
+
+ EXPECT_CALL(*mock_app, set_webengine_projection_enabled(true));
+ EXPECT_CALL(app_mngr_, OnApplicationRegistered(app));
+ EXPECT_CALL(mock_policy_handler_,
+ OnAppRegisteredOnMobile(kMacAddress1, kAppId1));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::SOURCE_SDL))
+ .Times(2);
+ EXPECT_CALL(app_mngr_, SendDriverDistractionState(app));
+
+ ASSERT_TRUE(command_->Init());
+ command_->Run();
+}
+
+TEST_F(RegisterAppInterfaceRequestTest,
+ RegisterApp_WithoutAppHMITypes_SuccessfulRegistration) {
+ SetCommonPreconditionsToRegisterApplication();
+ InitBasicMessage();
+
+ MockAppPtr mock_app = CreateBasicMockedApp();
+ SetCommonPreconditionsToCheckWithPolicyData(mock_app);
+ std::vector<std::string> present_hmi_types_in_policy{"NAVIGATION"};
+ ON_CALL(mock_policy_handler_, GetInitialAppData(kAppId1, _, _))
+ .WillByDefault(
+ DoAll(SetArgPointee<2>(present_hmi_types_in_policy), Return(true)));
+
+ auto response_to_mobile = CreateMessage();
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)))
+ .WillOnce(Return(true));
+
+ ASSERT_TRUE(command_->Init());
+ command_->Run();
+
+ const auto result_code = static_cast<mobile_apis::Result::eType>(
+ (*response_to_mobile)[am::strings::msg_params][am::strings::result_code]
+ .asUInt());
+
+ EXPECT_EQ(mobile_apis::Result::SUCCESS, result_code);
+}
+
+TEST_F(
+ RegisterAppInterfaceRequestTest,
+ RegisterAppInterface_AppHMITypesDontExistInPTForSpecifiedApp_SuccessfulRegistration) {
+ SetCommonPreconditionsToRegisterApplication();
+ InitBasicMessage();
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][0] =
+ mobile_apis::AppHMIType::PROJECTION;
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][1] =
+ mobile_apis::AppHMIType::INFORMATION;
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][2] =
+ mobile_apis::AppHMIType::COMMUNICATION;
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][3] =
+ mobile_apis::AppHMIType::NAVIGATION;
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][4] =
+ mobile_apis::AppHMIType::MESSAGING;
+
+ MockAppPtr mock_app = CreateBasicMockedApp();
+ SetCommonPreconditionsToCheckWithPolicyData(mock_app);
+ std::vector<std::string> present_hmi_types_in_policy;
+ ON_CALL(mock_policy_handler_, GetInitialAppData(kAppId1, _, _))
+ .WillByDefault(
+ DoAll(SetArgPointee<2>(present_hmi_types_in_policy), Return(true)));
+
+ auto response_to_mobile = CreateMessage();
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)))
+ .WillOnce(Return(true));
+
+ ASSERT_TRUE(command_->Init());
+ command_->Run();
+
+ const auto result_code = static_cast<mobile_apis::Result::eType>(
+ (*response_to_mobile)[am::strings::msg_params][am::strings::result_code]
+ .asUInt());
+ EXPECT_EQ(mobile_apis::Result::SUCCESS, result_code);
+}
+
+TEST_F(
+ RegisterAppInterfaceRequestTest,
+ RegisterApp_AppHMITypeNotCoincidedWithCurrentNonEmptyDataStoredInPT_SuccessfulRegistrationWithWarning) {
+ SetCommonPreconditionsToRegisterApplication();
+ InitBasicMessage();
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][0] =
+ mobile_apis::AppHMIType::PROJECTION;
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][1] =
+ mobile_apis::AppHMIType::INFORMATION;
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][2] =
+ mobile_apis::AppHMIType::COMMUNICATION;
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][3] =
+ mobile_apis::AppHMIType::NAVIGATION;
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][4] =
+ mobile_apis::AppHMIType::MESSAGING;
+
+ MockAppPtr mock_app = CreateBasicMockedApp();
+ SetCommonPreconditionsToCheckWithPolicyData(mock_app);
+ std::vector<std::string> present_hmi_types_in_policy{"NAVIGATION"};
+ ON_CALL(mock_policy_handler_, GetInitialAppData(kAppId1, _, _))
+ .WillByDefault(
+ DoAll(SetArgPointee<2>(present_hmi_types_in_policy), Return(true)));
+
+ auto response_to_mobile = CreateMessage();
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)))
+ .WillOnce(Return(true));
+
+ ASSERT_TRUE(command_->Init());
+ command_->Run();
+
+ const auto result_code = static_cast<mobile_apis::Result::eType>(
+ (*response_to_mobile)[am::strings::msg_params][am::strings::result_code]
+ .asUInt());
+ EXPECT_EQ(mobile_apis::Result::WARNINGS, result_code);
+
+ // Regarding to requairements, response info string should contain all
+ // AppHMITypes that are not contained in the policy table.
+ std::vector<std::string> expected_app_hmi_types_in_info_string{
+ "PROJECTION", "INFORMATION", "COMMUNICATION", "MESSAGING"};
+
+ const std::string info_string_in_response =
+ (*response_to_mobile)[am::strings::msg_params][am::strings::info]
+ .asString();
+
+ for (const auto& app_hmi_type : expected_app_hmi_types_in_info_string) {
+ EXPECT_TRUE(info_string_in_response.find(app_hmi_type) != std::string::npos)
+ << "AppHMItype absent in the response string: " << app_hmi_type;
+ }
+}
+
+TEST_F(RegisterAppInterfaceRequestTest,
+ RegisterAppWithWebView_WebViewNotAllowedInPT_RejectRegistration) {
+ SetCommonPreconditionsToRegisterApplication();
+ InitBasicMessage();
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][0] =
+ mobile_apis::AppHMIType::WEB_VIEW;
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][1] =
+ mobile_apis::AppHMIType::INFORMATION;
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][2] =
+ mobile_apis::AppHMIType::COMMUNICATION;
+
+ MockAppPtr mock_app = CreateBasicMockedApp();
+ SetCommonPreconditionsToCheckWithPolicyData(mock_app);
+ std::vector<std::string> present_hmi_types_in_policy{"INFORMATION",
+ "COMMUNICATION"};
+ ON_CALL(mock_policy_handler_, GetInitialAppData(kAppId1, _, _))
+ .WillByDefault(
+ DoAll(SetArgPointee<2>(present_hmi_types_in_policy), Return(true)));
+
+ EXPECT_CALL(*mock_app, set_webengine_projection_enabled(true)).Times(0);
+
+ auto response_to_mobile = CreateMessage();
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
+
+ ASSERT_TRUE(command_->Init());
+ command_->Run();
+
+ const auto result_code = static_cast<mobile_apis::Result::eType>(
+ (*response_to_mobile)[am::strings::msg_params][am::strings::result_code]
+ .asUInt());
+
+ EXPECT_EQ(mobile_apis::Result::DISALLOWED, result_code);
+}
+
+TEST_F(RegisterAppInterfaceRequestTest,
+ RegisterAppWithWebView_EmptyPT_RejectRegistration) {
+ SetCommonPreconditionsToRegisterApplication();
+ InitBasicMessage();
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][0] =
+ mobile_apis::AppHMIType::PROJECTION;
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][1] =
+ mobile_apis::AppHMIType::INFORMATION;
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][2] =
+ mobile_apis::AppHMIType::WEB_VIEW;
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][3] =
+ mobile_apis::AppHMIType::NAVIGATION;
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][4] =
+ mobile_apis::AppHMIType::MESSAGING;
+
+ MockAppPtr mock_app = CreateBasicMockedApp();
+ SetCommonPreconditionsToCheckWithPolicyData(mock_app);
+ std::vector<std::string> present_hmi_types_in_policy;
+ ON_CALL(mock_policy_handler_, GetInitialAppData(kAppId1, _, _))
+ .WillByDefault(
+ DoAll(SetArgPointee<2>(present_hmi_types_in_policy), Return(true)));
+
+ auto response_to_mobile = CreateMessage();
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
+
+ ASSERT_TRUE(command_->Init());
+ command_->Run();
+
+ const auto result_code = static_cast<mobile_apis::Result::eType>(
+ (*response_to_mobile)[am::strings::msg_params][am::strings::result_code]
+ .asUInt());
+ EXPECT_EQ(mobile_apis::Result::DISALLOWED, result_code);
+}
+
+TEST_F(RegisterAppInterfaceRequestTest,
+ RegisterAppWithWebViewOnly_WebViewNotAllowedInPT_RejectRegistration) {
+ SetCommonPreconditionsToRegisterApplication();
+ InitBasicMessage();
+ (*msg_)[am::strings::msg_params][am::strings::app_hmi_type][0] =
+ mobile_apis::AppHMIType::WEB_VIEW;
+
+ MockAppPtr mock_app = CreateBasicMockedApp();
+ SetCommonPreconditionsToCheckWithPolicyData(mock_app);
+ std::vector<std::string> present_hmi_types_in_policy{"INFORMATION",
+ "COMMUNICATION"};
+ ON_CALL(mock_policy_handler_, GetInitialAppData(kAppId1, _, _))
+ .WillByDefault(
+ DoAll(SetArgPointee<2>(present_hmi_types_in_policy), Return(true)));
+
+ EXPECT_CALL(*mock_app, set_webengine_projection_enabled(true)).Times(0);
+
+ auto response_to_mobile = CreateMessage();
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(_, am::commands::Command::CommandSource::SOURCE_SDL))
+ .WillOnce(DoAll(SaveArg<0>(&response_to_mobile), Return(true)));
+
+ ASSERT_TRUE(command_->Init());
+ command_->Run();
+
+ const auto result_code = static_cast<mobile_apis::Result::eType>(
+ (*response_to_mobile)[am::strings::msg_params][am::strings::result_code]
+ .asUInt());
+
+ EXPECT_EQ(mobile_apis::Result::DISALLOWED, result_code);
+}
+
} // namespace register_app_interface_request
} // namespace mobile_commands_test
} // namespace commands_test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/reset_global_properties_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/reset_global_properties_test.cc
index 98c0ad098a..8ca15f39fe 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/reset_global_properties_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/reset_global_properties_test.cc
@@ -125,117 +125,50 @@ TEST_F(ResetGlobalPropertiesRequestTest, Run_InvalidApp_UNSUCCESS) {
}
TEST_F(ResetGlobalPropertiesRequestTest, Run_InvalidVrHelp_UNSUCCESS) {
- (*msg_)[am::strings::msg_params][am::strings::properties][0] =
- mobile_apis::GlobalProperty::HELPPROMPT;
- (*msg_)[am::strings::msg_params][am::strings::properties][1] =
- mobile_apis::GlobalProperty::TIMEOUTPROMPT;
- (*msg_)[am::strings::msg_params][am::strings::properties][2] =
- mobile_apis::GlobalProperty::VRHELPTITLE;
- (*msg_)[am::strings::msg_params][am::strings::properties][3] =
- mobile_apis::GlobalProperty::MENUNAME;
- (*msg_)[am::strings::msg_params][am::strings::properties][4] =
- mobile_apis::GlobalProperty::MENUICON;
- (*msg_)[am::strings::msg_params][am::strings::properties][5] =
- mobile_apis::GlobalProperty::KEYBOARDPROPERTIES;
-
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
- smart_objects::SmartObject so_prompt =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- EXPECT_CALL(*mock_app_, set_help_prompt(so_prompt));
-
- std::vector<std::string> time_out_prompt;
- time_out_prompt.push_back("time_out");
- EXPECT_CALL(app_mngr_settings_, time_out_promt())
- .WillOnce(ReturnRef(time_out_prompt));
+ am::ResetGlobalPropertiesResult result;
+ result.help_prompt = true;
+ result.timeout_prompt = true;
+ result.vr_help_title_items = true;
+ result.menu_name = true;
+ result.menu_icon = true;
+ result.keyboard_properties = true;
- smart_objects::SmartObject timeout_prompt =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- timeout_prompt[am::strings::text] = time_out_prompt[0];
- timeout_prompt[am::strings::type] =
- hmi_apis::Common_SpeechCapabilities::SC_TEXT;
+ EXPECT_CALL(app_mngr_, ResetGlobalProperties(_, _)).WillOnce(Return(result));
- smart_objects::SmartObject so_time_out_prompt =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
+ EXPECT_CALL(mock_message_helper_, CreateUIResetGlobalPropertiesRequest(_, _))
+ .WillOnce(Return(smart_objects::SmartObjectSPtr()));
- so_time_out_prompt[0] = timeout_prompt;
+ ON_CALL(mock_message_helper_, CreateTTSResetGlobalPropertiesRequest(_, _))
+ .WillByDefault(Return(std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map)));
- EXPECT_CALL(*mock_app_, set_timeout_prompt(so_time_out_prompt));
-
- EXPECT_CALL(*mock_app_, reset_vr_help_title());
- EXPECT_CALL(*mock_app_, reset_vr_help());
-
- EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
-
- smart_objects::SmartObjectSPtr vr_help; // = NULL;
- EXPECT_CALL(mock_message_helper_, CreateAppVrHelp(_))
- .WillOnce(Return(vr_help));
-
- EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(1);
command_->Run();
}
TEST_F(ResetGlobalPropertiesRequestTest, Run_SUCCESS) {
- (*msg_)[am::strings::msg_params][am::strings::properties][0] =
- mobile_apis::GlobalProperty::HELPPROMPT;
- (*msg_)[am::strings::msg_params][am::strings::properties][1] =
- mobile_apis::GlobalProperty::TIMEOUTPROMPT;
- (*msg_)[am::strings::msg_params][am::strings::properties][2] =
- mobile_apis::GlobalProperty::VRHELPTITLE;
- (*msg_)[am::strings::msg_params][am::strings::properties][3] =
- mobile_apis::GlobalProperty::MENUNAME;
- (*msg_)[am::strings::msg_params][am::strings::properties][4] =
- mobile_apis::GlobalProperty::MENUICON;
- (*msg_)[am::strings::msg_params][am::strings::properties][5] =
- mobile_apis::GlobalProperty::KEYBOARDPROPERTIES;
-
- EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey));
- smart_objects::SmartObject so_prompt =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- EXPECT_CALL(*mock_app_, set_help_prompt(so_prompt));
-
- std::vector<std::string> time_out_prompt;
- time_out_prompt.push_back("time_out");
- EXPECT_CALL(app_mngr_settings_, time_out_promt())
- .WillOnce(ReturnRef(time_out_prompt));
-
- smart_objects::SmartObject timeout_prompt =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- timeout_prompt[am::strings::text] = time_out_prompt[0];
- timeout_prompt[am::strings::type] =
- hmi_apis::Common_SpeechCapabilities::SC_TEXT;
-
- smart_objects::SmartObject so_time_out_prompt =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
+ am::ResetGlobalPropertiesResult result;
+ result.help_prompt = true;
+ result.timeout_prompt = true;
+ result.vr_help_title_items = true;
+ result.menu_name = true;
+ result.menu_icon = true;
+ result.keyboard_properties = true;
+ result.vr_has_been_reset = true;
- so_time_out_prompt[0] = timeout_prompt;
-
- EXPECT_CALL(*mock_app_, set_timeout_prompt(so_time_out_prompt));
-
- EXPECT_CALL(*mock_app_, reset_vr_help_title());
- EXPECT_CALL(*mock_app_, reset_vr_help());
+ ON_CALL(app_mngr_, ResetGlobalProperties(_, _)).WillByDefault(Return(result));
EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
- smart_objects::SmartObjectSPtr vr_help =
+ smart_objects::SmartObjectSPtr msg_params =
std::make_shared<smart_objects::SmartObject>(
smart_objects::SmartType_Map);
- EXPECT_CALL(mock_message_helper_, CreateAppVrHelp(_))
- .WillOnce(Return(vr_help));
-
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
- msg_params[am::hmi_request::menu_title] = "";
- EXPECT_CALL(*mock_app_,
- set_menu_title(msg_params[am::hmi_request::menu_title]));
-
- const smart_objects::SmartObjectSPtr so_help_prompt =
- std::make_shared<smart_objects::SmartObject>(
- smart_objects::SmartType_Map);
- EXPECT_CALL(*mock_app_, help_prompt()).WillOnce(Return(so_help_prompt.get()));
- EXPECT_CALL(*mock_app_, timeout_prompt())
- .WillOnce(Return(so_help_prompt.get()));
+ EXPECT_CALL(mock_message_helper_, CreateTTSResetGlobalPropertiesRequest(_, _))
+ .WillOnce(Return(msg_params));
+ EXPECT_CALL(mock_message_helper_, CreateUIResetGlobalPropertiesRequest(_, _))
+ .WillOnce(Return(msg_params));
EXPECT_CALL(
mock_rpc_service_,
@@ -264,18 +197,18 @@ TEST_F(ResetGlobalPropertiesRequestTest,
hmi_apis::Common_Result::SUCCESS;
(*msg_)[am::strings::params][am::hmi_response::code] = result_code;
- (*msg_)[am::strings::msg_params][am::strings::properties][0] =
- mobile_apis::GlobalProperty::VRHELPTITLE;
+ am::ResetGlobalPropertiesResult result;
+ result.vr_help_title_items = true;
- EXPECT_CALL(*mock_app_, reset_vr_help_title());
- EXPECT_CALL(*mock_app_, reset_vr_help());
- EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
+ EXPECT_CALL(app_mngr_, ResetGlobalProperties(_, _)).WillOnce(Return(result));
- smart_objects::SmartObjectSPtr vr_help =
+ smart_objects::SmartObjectSPtr msg_params =
std::make_shared<smart_objects::SmartObject>(
smart_objects::SmartType_Map);
- EXPECT_CALL(mock_message_helper_, CreateAppVrHelp(_))
- .WillOnce(Return(vr_help));
+
+ EXPECT_CALL(mock_message_helper_, CreateUIResetGlobalPropertiesRequest(_, _))
+ .WillOnce(Return(msg_params));
+
EXPECT_CALL(
mock_rpc_service_,
ManageHMICommand(
@@ -304,20 +237,22 @@ TEST_F(ResetGlobalPropertiesRequestTest,
(*msg_)[am::strings::msg_params][am::strings::properties][1] =
mobile_apis::GlobalProperty::MENUICON;
- std::vector<std::string> time_out_prompt;
- time_out_prompt.push_back("time_out");
- EXPECT_CALL(app_mngr_settings_, time_out_promt())
- .WillOnce(ReturnRef(time_out_prompt));
+ am::ResetGlobalPropertiesResult result;
+ result.timeout_prompt = true;
+ result.menu_icon = true;
- EXPECT_CALL(*mock_app_, set_timeout_prompt(_));
+ EXPECT_CALL(app_mngr_, ResetGlobalProperties(_, _)).WillOnce(Return(result));
- smart_objects::SmartObjectSPtr prompt =
- std::make_shared<smart_objects::SmartObject>();
- *prompt = "prompt";
+ EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
- EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(prompt.get()));
+ smart_objects::SmartObjectSPtr msg_params =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
- EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
+ EXPECT_CALL(mock_message_helper_, CreateTTSResetGlobalPropertiesRequest(_, _))
+ .WillOnce(Return(msg_params));
+ EXPECT_CALL(mock_message_helper_, CreateUIResetGlobalPropertiesRequest(_, _))
+ .WillOnce(Return(msg_params));
MessageSharedPtr ui_msg = CreateMessage();
(*ui_msg)[am::strings::params][am::strings::correlation_id] = kCorrelationId;
@@ -363,10 +298,22 @@ TEST_F(ResetGlobalPropertiesRequestTest, OnEvent_InvalidApp_NoHashUpdate) {
(*msg_)[am::strings::msg_params][am::strings::properties][0] =
mobile_apis::GlobalProperty::VRHELPTITLE;
- EXPECT_CALL(*mock_app_, reset_vr_help_title());
- EXPECT_CALL(*mock_app_, reset_vr_help());
+ am::ResetGlobalPropertiesResult result;
+ result.vr_help_title_items = true;
+
+ EXPECT_CALL(app_mngr_, ResetGlobalProperties(_, _)).WillOnce(Return(result));
EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
+
+ smart_objects::SmartObjectSPtr msg_params =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+
+ EXPECT_CALL(mock_message_helper_, CreateTTSResetGlobalPropertiesRequest(_, _))
+ .Times(0);
+ EXPECT_CALL(mock_message_helper_, CreateUIResetGlobalPropertiesRequest(_, _))
+ .WillOnce(Return(msg_params));
+
EXPECT_CALL(
mock_rpc_service_,
ManageHMICommand(
@@ -375,8 +322,6 @@ TEST_F(ResetGlobalPropertiesRequestTest, OnEvent_InvalidApp_NoHashUpdate) {
smart_objects::SmartObjectSPtr vr_help =
std::make_shared<smart_objects::SmartObject>(
smart_objects::SmartType_Map);
- EXPECT_CALL(mock_message_helper_, CreateAppVrHelp(_))
- .WillOnce(Return(vr_help));
EXPECT_CALL(*mock_app_, UpdateHash()).Times(0);
@@ -403,20 +348,22 @@ TEST_F(ResetGlobalPropertiesRequestTest,
(*msg_)[am::strings::msg_params][am::strings::properties][1] =
mobile_apis::GlobalProperty::MENUICON;
- std::vector<std::string> time_out_prompt;
- time_out_prompt.push_back("time_out");
- EXPECT_CALL(app_mngr_settings_, time_out_promt())
- .WillOnce(ReturnRef(time_out_prompt));
+ am::ResetGlobalPropertiesResult result;
+ result.timeout_prompt = true;
+ result.menu_icon = true;
- EXPECT_CALL(*mock_app_, set_timeout_prompt(_));
+ EXPECT_CALL(app_mngr_, ResetGlobalProperties(_, _)).WillOnce(Return(result));
- smart_objects::SmartObjectSPtr prompt =
- std::make_shared<smart_objects::SmartObject>();
- *prompt = "prompt";
+ EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
- EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(prompt.get()));
+ smart_objects::SmartObjectSPtr msg_params =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
- EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
+ EXPECT_CALL(mock_message_helper_, CreateTTSResetGlobalPropertiesRequest(_, _))
+ .WillOnce(Return(msg_params));
+ EXPECT_CALL(mock_message_helper_, CreateUIResetGlobalPropertiesRequest(_, _))
+ .WillOnce(Return(msg_params));
EXPECT_CALL(
mock_rpc_service_,
@@ -470,18 +417,20 @@ TEST_F(ResetGlobalPropertiesRequestTest,
(*msg_)[am::strings::msg_params][am::strings::properties][1] =
mobile_apis::GlobalProperty::MENUICON;
- std::vector<std::string> time_out_prompt;
- time_out_prompt.push_back("time_out");
- EXPECT_CALL(app_mngr_settings_, time_out_promt())
- .WillOnce(ReturnRef(time_out_prompt));
+ am::ResetGlobalPropertiesResult result;
+ result.timeout_prompt = true;
+ result.menu_icon = true;
- EXPECT_CALL(*mock_app_, set_timeout_prompt(_));
+ EXPECT_CALL(app_mngr_, ResetGlobalProperties(_, _)).WillOnce(Return(result));
- smart_objects::SmartObjectSPtr prompt =
- std::make_shared<smart_objects::SmartObject>();
- *prompt = "prompt";
+ smart_objects::SmartObjectSPtr msg_params =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
- EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(prompt.get()));
+ EXPECT_CALL(mock_message_helper_, CreateTTSResetGlobalPropertiesRequest(_, _))
+ .WillOnce(Return(msg_params));
+ EXPECT_CALL(mock_message_helper_, CreateUIResetGlobalPropertiesRequest(_, _))
+ .WillOnce(Return(msg_params));
EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
@@ -536,18 +485,20 @@ TEST_F(ResetGlobalPropertiesRequestTest,
(*msg_)[am::strings::msg_params][am::strings::properties][1] =
mobile_apis::GlobalProperty::MENUICON;
- std::vector<std::string> time_out_prompt;
- time_out_prompt.push_back("time_out");
- EXPECT_CALL(app_mngr_settings_, time_out_promt())
- .WillOnce(ReturnRef(time_out_prompt));
+ am::ResetGlobalPropertiesResult result;
+ result.timeout_prompt = true;
+ result.menu_icon = true;
- EXPECT_CALL(*mock_app_, set_timeout_prompt(_));
+ EXPECT_CALL(app_mngr_, ResetGlobalProperties(_, _)).WillOnce(Return(result));
- smart_objects::SmartObjectSPtr prompt =
- std::make_shared<smart_objects::SmartObject>();
- *prompt = "prompt";
+ smart_objects::SmartObjectSPtr msg_params =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
- EXPECT_CALL(*mock_app_, timeout_prompt()).WillOnce(Return(prompt.get()));
+ EXPECT_CALL(mock_message_helper_, CreateTTSResetGlobalPropertiesRequest(_, _))
+ .WillOnce(Return(msg_params));
+ EXPECT_CALL(mock_message_helper_, CreateUIResetGlobalPropertiesRequest(_, _))
+ .WillOnce(Return(msg_params));
EXPECT_CALL(*mock_app_, set_reset_global_properties_active(true));
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_notification_commands_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_notification_commands_test.cc
index 6e85aff281..e31f6d209d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_notification_commands_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_notification_commands_test.cc
@@ -39,7 +39,6 @@
#include "application_manager/commands/commands_test.h"
#include "application_manager/mock_message_helper.h"
#include "application_manager/smart_object_keys.h"
-#include "mobile/on_app_interface_unregistered_notification.h"
#include "mobile/on_audio_pass_thru_notification.h"
#include "mobile/on_driver_distraction_notification.h"
#include "mobile/on_language_change_notification.h"
@@ -66,8 +65,7 @@ class MobileNotificationCommandsTest
typedef Command CommandType;
};
-typedef Types<commands::OnAppInterfaceUnregisteredNotification,
- commands::OnAudioPassThruNotification,
+typedef Types<commands::OnAudioPassThruNotification,
commands::OnLanguageChangeNotification,
commands::OnPermissionsChangeNotification,
commands::mobile::OnDriverDistractionNotification>
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/subscribe_way_points_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/subscribe_way_points_request_test.cc
index 56e4e05d48..528f8a0700 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/subscribe_way_points_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/subscribe_way_points_request_test.cc
@@ -71,7 +71,7 @@ TEST_F(SubscribeWayPointsRequestTest, Run_SUCCESS) {
MockAppPtr app(CreateMockApp());
ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app));
- ON_CALL(app_mngr_, IsAppSubscribedForWayPoints(A<am::ApplicationSharedPtr>()))
+ ON_CALL(app_mngr_, IsAppSubscribedForWayPoints(Ref(*app)))
.WillByDefault(Return(false));
ON_CALL(app_mngr_, IsAnyAppSubscribedForWayPoints())
.WillByDefault(Return(true));
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unregister_app_interface_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unregister_app_interface_request_test.cc
index f244acb8d6..d7dcbdfa9d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unregister_app_interface_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unregister_app_interface_request_test.cc
@@ -85,20 +85,9 @@ TEST_F(UnregisterAppInterfaceRequestTest, Run_SUCCESS) {
MockAppPtr mock_app(CreateMockApp());
EXPECT_CALL(app_mngr_, application(kConnectionKey))
.WillRepeatedly(Return(mock_app));
-
- const mobile_apis::AppInterfaceUnregisteredReason::eType kUnregisterReason =
- mobile_apis::AppInterfaceUnregisteredReason::INVALID_ENUM;
-
- MessageSharedPtr dummy_msg(CreateMessage());
- EXPECT_CALL(mock_message_helper_,
- GetOnAppInterfaceUnregisteredNotificationToMobile(
- kConnectionKey, kUnregisterReason))
- .WillOnce(Return(dummy_msg));
{
::testing::InSequence sequence;
- EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(dummy_msg, _));
-
EXPECT_CALL(app_mngr_,
UnregisterApplication(
kConnectionKey, mobile_apis::Result::SUCCESS, _, _));
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unsubscribe_way_points_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unsubscribe_way_points_request_test.cc
index 3165d57d44..ec4d2420d6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unsubscribe_way_points_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/unsubscribe_way_points_request_test.cc
@@ -100,9 +100,7 @@ TEST_F(UnsubscribeWayPointsRequestTest,
EXPECT_CALL(app_mngr_, application(kConnectionKey))
.WillOnce(Return(mock_app));
- EXPECT_CALL(app_mngr_,
- IsAppSubscribedForWayPoints(
- ::testing::Matcher<am::ApplicationSharedPtr>(mock_app)))
+ EXPECT_CALL(app_mngr_, IsAppSubscribedForWayPoints(Ref(*mock_app)))
.WillOnce(Return(false));
EXPECT_CALL(
@@ -117,9 +115,7 @@ TEST_F(UnsubscribeWayPointsRequestTest, Run_AppSubscribedForWayPoints_SUCCESS) {
EXPECT_CALL(app_mngr_, application(kConnectionKey))
.WillOnce(Return(mock_app));
- EXPECT_CALL(app_mngr_,
- IsAppSubscribedForWayPoints(
- ::testing::Matcher<am::ApplicationSharedPtr>(mock_app)))
+ EXPECT_CALL(app_mngr_, IsAppSubscribedForWayPoints(Ref(*mock_app)))
.WillOnce(Return(true));
const std::set<uint32_t> subscribed_apps{kConnectionKey};
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_type_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_type_request.h
index 7f2e8389ad..74f12c07d4 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_type_request.h
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_get_vehicle_type_request.h
@@ -59,10 +59,9 @@ class VIGetVehicleTypeRequest : public app_mngr::commands::RequestToHMI {
**/
virtual ~VIGetVehicleTypeRequest();
- /**
- * @brief Execute command
- **/
- virtual void Run();
+ void Run() OVERRIDE;
+
+ void onTimeOut() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(VIGetVehicleTypeRequest);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_is_ready_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_is_ready_request.h
index fa9bfebad4..96f8c8ecb8 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_is_ready_request.h
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_is_ready_request.h
@@ -75,11 +75,6 @@ class VIIsReadyRequest : public app_mngr::commands::RequestToHMI,
*/
void onTimeOut() OVERRIDE;
- /**
- * @brief Send request to HMI for fetching of cappabilities
- */
- void SendMessageToHMI();
-
private:
DISALLOW_COPY_AND_ASSIGN(VIIsReadyRequest);
};
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_subscribe_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_subscribe_vehicle_data_request.h
index 0e91006e52..7fc84b7986 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_subscribe_vehicle_data_request.h
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/hmi/vi_subscribe_vehicle_data_request.h
@@ -66,6 +66,8 @@ class VISubscribeVehicleDataRequest : public app_mngr::commands::RequestToHMI {
**/
virtual void Run();
+ void onTimeOut() OVERRIDE;
+
private:
CustomVehicleDataManager& custom_vehicle_data_manager_;
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_app_extension.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_app_extension.h
index fb7c2b0f82..7e3eabb6a1 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_app_extension.h
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_app_extension.h
@@ -58,6 +58,8 @@ class VehicleInfoAppExtension : public app_mngr::AppExtension {
*/
VehicleInfoAppExtension(VehicleInfoPlugin& plugin,
app_mngr::Application& app);
+ VehicleInfoAppExtension(const VehicleInfoAppExtension&) = delete;
+ VehicleInfoAppExtension& operator=(const VehicleInfoAppExtension&) = delete;
virtual ~VehicleInfoAppExtension();
/**
@@ -90,24 +92,60 @@ class VehicleInfoAppExtension : public app_mngr::AppExtension {
bool isSubscribedToVehicleInfo(const std::string& vehicle_data_type) const;
/**
+ * @brief isPendingSubscriptionToVehicleInfo checks if there any extension
+ * with pending subscription to vehicle data
+ * @param vehicle_data vehicle data to check
+ * @return true if extension is subscribed to this vehicle_data, otherwise
+ * returns false
+ */
+ bool isPendingSubscriptionToVehicleInfo(
+ const std::string& vehicle_data) const;
+
+ /**
* @brief Subscriptions get list of subscriptions for application extension
* @return list of subscriptions for application extension
*/
- VehicleInfoSubscriptions Subscriptions();
+ const DataAccessor<VehicleInfoSubscriptions> Subscriptions();
/**
- * @brief SaveResumptionData saves vehicle info data
- * @param resumption_data plase to store resumption data
+ * @brief AddPendingSubscription add pending subscription
+ * @param vehicle_data subscription to add
+ * @return
*/
- void SaveResumptionData(ns_smart_device_link::ns_smart_objects::SmartObject&
- resumption_data) OVERRIDE;
+ bool AddPendingSubscription(const std::string& vehicle_data);
/**
- * @brief ProcessResumption load resumtion data back to plugin during
- * resumption
- * @param resumption_data resumption data
+ * @brief RemovePendingSubscription remove some paticular pending subscription
+ * @param vehicle_data subscription to remove
+ * @return
*/
- void ProcessResumption(
+ bool RemovePendingSubscription(const std::string& vehicle_data);
+
+ /**
+ * @brief RemovePendingSubscriptions removed all pending subscriptions
+ * @return
+ */
+ void RemovePendingSubscriptions();
+
+ /**
+ * @brief PendingSubscriptions list of preliminary subscriptoins
+ * That will be moved to subscriptions as soon as HMI will respond with
+ * success.
+ * Used for resumption to keep list of preliminary subcriptions and wait for
+ * HMI response
+ * @return
+ */
+ const DataAccessor<VehicleInfoSubscriptions> PendingSubscriptions();
+
+ /**
+ * @brief SaveResumptionData saves vehicle info data
+ * @param resumption_data plase to store resumption data
+ */
+ void SaveResumptionData(smart_objects::SmartObject& resumption_data) OVERRIDE;
+
+ void ProcessResumption(const smart_objects::SmartObject& saved_app) OVERRIDE;
+
+ void RevertResumption(
const smart_objects::SmartObject& resumption_data) OVERRIDE;
/**
@@ -126,7 +164,11 @@ class VehicleInfoAppExtension : public app_mngr::AppExtension {
application_manager::Application& app);
private:
+ mutable std::shared_ptr<sync_primitives::Lock> subscribed_data_lock_;
VehicleInfoSubscriptions subscribed_data_;
+
+ mutable std::shared_ptr<sync_primitives::Lock> pending_subscriptions_lock_;
+ VehicleInfoSubscriptions pending_subscriptions_;
VehicleInfoPlugin& plugin_;
app_mngr::Application& app_;
};
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_pending_resumption_handler.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_pending_resumption_handler.h
new file mode 100644
index 0000000000..78f8f685cc
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_pending_resumption_handler.h
@@ -0,0 +1,150 @@
+/*
+ Copyright (c) 2020, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_PENDING_RESUMPTION_HANDLER_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_PENDING_RESUMPTION_HANDLER_H_
+#include <queue>
+#include "application_manager/event_engine/event_observer.h"
+#include "application_manager/resumption/pending_resumption_handler.h"
+#include "application_manager/resumption/resumption_data_processor.h"
+
+#include "utils/optional.h"
+#include "vehicle_info_app_extension.h"
+namespace vehicle_info_plugin {
+class CustomVehicleDataManager;
+
+namespace app_mngr = application_manager;
+
+class VehicleInfoPendingResumptionHandler
+ : public resumption::PendingResumptionHandler {
+ public:
+ typedef std::set<std::string> VehicleDataList;
+ VehicleInfoPendingResumptionHandler(
+ app_mngr::ApplicationManager& application_manager,
+ CustomVehicleDataManager& custom_vehicle_data_manager);
+
+ void on_event(const app_mngr::event_engine::Event& event) OVERRIDE;
+
+ void HandleResumptionSubscriptionRequest(app_mngr::AppExtension& extension,
+ app_mngr::Application& app) OVERRIDE;
+ void OnResumptionRevert() OVERRIDE;
+
+ smart_objects::SmartObjectSPtr CreateSubscribeRequestToHMI(
+ const VehicleDataList& subscriptions);
+
+ ns_smart_device_link::ns_smart_objects::SmartObject CreateFakeResponseFromHMI(
+ const std::map<std::string, smart_objects::SmartObject>& subscriptions,
+ const uint32_t fake_corrlation_id);
+
+ private:
+ void ProcessNextPendingResumption(
+ const smart_objects::SmartObject& response_message);
+ void TriggerPendingResumption();
+
+ struct PendingSubscriptionsResumption {
+ PendingSubscriptionsResumption(
+ const uint32_t app_id,
+ const uint32_t corr_id,
+ const VehicleDataList& requested_vehicle_data)
+ : app_id_(app_id)
+ , fake_corr_id_(corr_id)
+ , waiting_for_hmi_response_(false)
+ , requested_vehicle_data_(requested_vehicle_data) {}
+
+ PendingSubscriptionsResumption(const PendingSubscriptionsResumption& copy) =
+ default;
+
+ /**
+ * @brief IsSuccessfullyDone check if SDL restored all required data or not
+ * @return
+ */
+ bool IsSuccessfullyDone() const;
+ bool DataWasRequested(const std::string& vd) const;
+ VehicleDataList NotSubscribedData() const;
+
+ /**
+ * @brief FillSubscriptionResults fill subscription results based on
+ * response message
+ * @param response
+ */
+ void FillSubscriptionResults(const smart_objects::SmartObject& response);
+
+ /**
+ * @brief FillSubscriptionResults fill subscription results based on list of
+ * requested data and list of restored data
+ *
+ */
+ void FillSubscriptionResults();
+
+ void FillRestoredData(const VehicleDataList& successful_subscriptions);
+
+ uint32_t app_id_;
+ uint32_t fake_corr_id_;
+ bool waiting_for_hmi_response_;
+ VehicleDataList requested_vehicle_data_;
+ VehicleDataList restored_vehicle_data_;
+ std::map<std::string, smart_objects::SmartObject> subscription_results_;
+ };
+
+ void SendHMIRequestForNotSubscribed(
+ const PendingSubscriptionsResumption& pending_resumption);
+ void RaiseFinishedPendingResumption(
+ const PendingSubscriptionsResumption& pending_resumption);
+ /**
+ * @brief SubscribeToFakeRequest will create fake subscription for subscriber
+ * ( resumption_data_processor)
+ * Fake request is required only for subscriber subscription.
+ * This request will not be sen't to HMI so it named as fake request.
+ * Fake request contains all data that need to be resumed for the application
+ * When HMI will respond for any VehicleData request,
+ * PendingSubscriptionsResumption will go through all pending resumptions and
+ * fill them with received subscriptions. If certain pending resumption will
+ * take all requested subscriptions PendingSubscriptionsResumption will take
+ * this fake request correaltion id and create fake response based on it.
+ * Within fake response it will notify subscriber about resumption status.
+ *
+ * @param app_id applicaiton to pass into subscriber
+ * @param subscriptions list of requested subscriptions
+ * @param subscriber function to subscribe caller for finished resumption
+ * @return pending_resumption with information about fake correlation id for
+ * subscriber, list of vehicle data to subscribe
+ */
+ PendingSubscriptionsResumption SubscribeToFakeRequest(
+ const uint32_t app, const VehicleDataList& subscriptions);
+
+ std::deque<PendingSubscriptionsResumption> pending_requests_;
+
+ CustomVehicleDataManager& custom_vehicle_data_manager_;
+ sync_primitives::RecursiveLock pending_resumption_lock_;
+};
+} // namespace vehicle_info_plugin
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_PENDING_RESUMPTION_HANDLER_H_
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 80336b6967..1910a9efdf 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
@@ -34,6 +34,7 @@
#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_PLUGIN_H
#include "application_manager/command_factory.h"
+#include "application_manager/resumption/pending_resumption_handler.h"
#include "vehicle_info_plugin/custom_vehicle_data_manager.h"
namespace vehicle_info_plugin {
@@ -41,6 +42,9 @@ class VehicleInfoAppExtension;
namespace app_mngr = application_manager;
namespace plugins = application_manager::plugin_manager;
+bool IsSubscribedAppExist(const std::string& ivi,
+ const app_mngr::ApplicationManager& app_manager);
+
class VehicleInfoPlugin : public plugins::RPCPlugin {
public:
VehicleInfoPlugin();
@@ -74,22 +78,41 @@ class VehicleInfoPlugin : public plugins::RPCPlugin {
* to HMI
* @param app application for subscription
* @param ext application extension
+ * @param subscriber callback for subscription
*/
void ProcessResumptionSubscription(app_mngr::Application& app,
VehicleInfoAppExtension& ext);
+ /**
+ * @brief Revert the data to the state before Resumption.
+ * @param subscriptions Subscriptions to be returned
+ **/
+ void RevertResumption(app_mngr::Application& app,
+ const std::set<std::string>& list_of_subscriptions);
+
+ smart_objects::SmartObjectSPtr CreateSubscriptionRequest(
+ const std::set<std::string>& list_of_subscriptions);
+
+ smart_objects::SmartObjectSPtr CreateUnsubscriptionRequest(
+ const std::set<std::string>& list_of_subscriptions);
+
private:
+ bool IsAnyPendingSubscriptionExist(const std::string& ivi);
void UnsubscribeFromRemovedVDItems();
smart_objects::SmartObjectSPtr GetUnsubscribeIVIRequest(
const std::vector<std::string>& ivi_names);
void DeleteSubscriptions(app_mngr::ApplicationSharedPtr app);
std::unique_ptr<app_mngr::CommandFactory> command_factory_;
- std::unique_ptr<CustomVehicleDataManager> custom_vehicle_data_manager_;
+ typedef std::shared_ptr<resumption::PendingResumptionHandler>
+ PendingResumptionHandlerSPtr;
app_mngr::ApplicationManager* application_manager_;
+ std::unique_ptr<CustomVehicleDataManager> custom_vehicle_data_manager_;
+ PendingResumptionHandlerSPtr pending_resumption_handler_;
};
} // namespace vehicle_info_plugin
-extern "C" application_manager::plugin_manager::RPCPlugin* Create();
+extern "C" application_manager::plugin_manager::RPCPlugin* Create(
+ logger::Logger* logger_instances);
extern "C" void Delete(application_manager::plugin_manager::RPCPlugin* data);
#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_VEHICLE_INFO_PLUGIN_H
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/on_vi_vehicle_data_notification.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/on_vi_vehicle_data_notification.cc
index b8d1b3a100..88884e365a 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/on_vi_vehicle_data_notification.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/on_vi_vehicle_data_notification.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVIVehicleDataNotification::OnVIVehicleDataNotification(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -50,7 +52,7 @@ OnVIVehicleDataNotification::OnVIVehicleDataNotification(
OnVIVehicleDataNotification::~OnVIVehicleDataNotification() {}
void OnVIVehicleDataNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// prepare SmartObject for mobile factory
(*message_)[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_request.cc
index ae64c74f26..95999c76f9 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIDiagnosticMessageRequest::VIDiagnosticMessageRequest(
const app_mngr::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -49,7 +51,7 @@ VIDiagnosticMessageRequest::VIDiagnosticMessageRequest(
VIDiagnosticMessageRequest::~VIDiagnosticMessageRequest() {}
void VIDiagnosticMessageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_response.cc
index 6482d97d10..4ee6e1e495 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_diagnostic_message_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIDiagnosticMessageResponse::VIDiagnosticMessageResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -50,7 +52,7 @@ VIDiagnosticMessageResponse::VIDiagnosticMessageResponse(
VIDiagnosticMessageResponse::~VIDiagnosticMessageResponse() {}
void VIDiagnosticMessageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(
hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_request.cc
index 620ee4c3e4..6b312c826d 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIGetDTCsRequest::VIGetDTCsRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -49,7 +51,7 @@ VIGetDTCsRequest::VIGetDTCsRequest(
VIGetDTCsRequest::~VIGetDTCsRequest() {}
void VIGetDTCsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_response.cc
index 64e948a4e1..b84e67d7c5 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_dtcs_response.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIGetDTCsResponse::VIGetDTCsResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -50,7 +52,7 @@ VIGetDTCsResponse::VIGetDTCsResponse(
VIGetDTCsResponse::~VIGetDTCsResponse() {}
void VIGetDTCsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_GetDTCs);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_request.cc
index eded6c685b..a3e3a83f62 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_request.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIGetVehicleDataRequest::VIGetVehicleDataRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -51,7 +53,7 @@ VIGetVehicleDataRequest::VIGetVehicleDataRequest(
VIGetVehicleDataRequest::~VIGetVehicleDataRequest() {}
void VIGetVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& rpc_spec_vehicle_data = MessageHelper::vehicle_data();
auto& msg_params = (*message_)[strings::msg_params];
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_response.cc
index 763ddf1cfa..0ef6a97e91 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_data_response.cc
@@ -39,6 +39,8 @@ namespace vehicle_info_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIGetVehicleDataResponse::VIGetVehicleDataResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -51,7 +53,7 @@ VIGetVehicleDataResponse::VIGetVehicleDataResponse(
VIGetVehicleDataResponse::~VIGetVehicleDataResponse() {}
void VIGetVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_GetVehicleData);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_request.cc
index 250584bd12..26a9990079 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIGetVehicleTypeRequest::VIGetVehicleTypeRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -49,11 +51,17 @@ VIGetVehicleTypeRequest::VIGetVehicleTypeRequest(
VIGetVehicleTypeRequest::~VIGetVehicleTypeRequest() {}
void VIGetVehicleTypeRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
+void VIGetVehicleTypeRequest::onTimeOut() {
+ SDL_LOG_AUTO_TRACE();
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType);
+}
+
} // namespace commands
} // namespace vehicle_info_plugin
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_response.cc
index fb6eadf747..dbd1b48033 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_get_vehicle_type_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIGetVehicleTypeResponse::VIGetVehicleTypeResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -48,12 +50,30 @@ VIGetVehicleTypeResponse::VIGetVehicleTypeResponse(
VIGetVehicleTypeResponse::~VIGetVehicleTypeResponse() {}
void VIGetVehicleTypeResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
+
+ const auto result_code = static_cast<hmi_apis::Common_Result::eType>(
+ (*message_)[strings::params][hmi_response::code].asInt());
- HMICapabilities& hmi_capabilities = hmi_capabilities_;
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType);
- hmi_capabilities.set_vehicle_type(
+ if (hmi_apis::Common_Result::SUCCESS != result_code) {
+ SDL_LOG_DEBUG("Request was not successful. Don't change HMI capabilities");
+ return;
+ }
+
+ std::vector<std::string> sections_to_update{hmi_response::vehicle_type};
+ hmi_capabilities_.set_vehicle_type(
(*message_)[strings::msg_params][hmi_response::vehicle_type]);
+
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::vehicle_info,
+ sections_to_update,
+ message_->getSchema())) {
+ SDL_LOG_ERROR(
+ "Failed to save VehicleInfo.GetVehicleType response to cache");
+ }
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_request.cc
index 93781a7420..578f650e98 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_request.cc
@@ -31,7 +31,9 @@
*/
#include "vehicle_info_plugin/commands/hmi/vi_is_ready_request.h"
-#include "application_manager/message_helper.h"
+
+#include <set>
+
#include "application_manager/policies/policy_handler_interface.h"
#include "application_manager/rpc_service.h"
@@ -40,6 +42,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIIsReadyRequest::VIIsReadyRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -53,18 +57,18 @@ VIIsReadyRequest::VIIsReadyRequest(
VIIsReadyRequest::~VIIsReadyRequest() {}
void VIIsReadyRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
subscribe_on_event(hmi_apis::FunctionID::VehicleInfo_IsReady,
correlation_id());
SendRequest();
}
void VIIsReadyRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::VehicleInfo_IsReady: {
- LOG4CXX_DEBUG(logger_, "VehicleInfo_IsReady event");
+ SDL_LOG_DEBUG("VehicleInfo_IsReady event");
unsubscribe_from_event(hmi_apis::FunctionID::VehicleInfo_IsReady);
const bool is_available = app_mngr::commands::ChangeInterfaceState(
application_manager_,
@@ -76,17 +80,18 @@ void VIIsReadyRequest::on_event(const event_engine::Event& event) {
policy_handler_.OnVIIsReady();
if (!app_mngr::commands::CheckAvailabilityHMIInterfaces(
application_manager_, HmiInterfaces::HMI_INTERFACE_VehicleInfo)) {
- LOG4CXX_INFO(
- logger_,
+ SDL_LOG_INFO(
"HmiInterfaces::HMI_INTERFACE_VehicleInfo isn't available");
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType);
return;
}
- SendMessageToHMI();
+ RequestInterfaceCapabilities(hmi_interface ::vehicle_info);
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
@@ -94,15 +99,7 @@ void VIIsReadyRequest::on_event(const event_engine::Event& event) {
void VIIsReadyRequest::onTimeOut() {
// Note(dtrunov): According to new requirment APPLINK-27956
- SendMessageToHMI();
-}
-
-void VIIsReadyRequest::SendMessageToHMI() {
- std::shared_ptr<smart_objects::SmartObject> get_type(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::VehicleInfo_GetVehicleType,
- application_manager_));
- rpc_service_.ManageHMICommand(get_type);
+ RequestInterfaceCapabilities(hmi_interface ::vehicle_info);
}
} // namespace commands
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_response.cc
index 349a1137ce..b40ecc51db 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_is_ready_response.cc
@@ -36,6 +36,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIIsReadyResponse::VIIsReadyResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -48,7 +50,7 @@ VIIsReadyResponse::VIIsReadyResponse(
VIIsReadyResponse::~VIIsReadyResponse() {}
void VIIsReadyResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_IsReady);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_request.cc
index 47373bb4bf..529ed248d0 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_request.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIReadDIDRequest::VIReadDIDRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -49,7 +51,7 @@ VIReadDIDRequest::VIReadDIDRequest(
VIReadDIDRequest::~VIReadDIDRequest() {}
void VIReadDIDRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendRequest();
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_response.cc
index 7c2db1e875..09abb3c9fc 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_read_did_response.cc
@@ -37,6 +37,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIReadDIDResponse::VIReadDIDResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -49,7 +51,7 @@ VIReadDIDResponse::VIReadDIDResponse(
VIReadDIDResponse::~VIReadDIDResponse() {}
void VIReadDIDResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(hmi_apis::FunctionID::VehicleInfo_ReadDID);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_request.cc
index 4c5f067d0d..da925e68e7 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_request.cc
@@ -32,12 +32,15 @@
#include "vehicle_info_plugin/commands/hmi/vi_subscribe_vehicle_data_request.h"
#include "application_manager/message_helper.h"
+#include "application_manager/resumption/resume_ctrl.h"
namespace vehicle_info_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VISubscribeVehicleDataRequest::VISubscribeVehicleDataRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -51,7 +54,7 @@ VISubscribeVehicleDataRequest::VISubscribeVehicleDataRequest(
VISubscribeVehicleDataRequest::~VISubscribeVehicleDataRequest() {}
void VISubscribeVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& rpc_spec_vehicle_data = MessageHelper::vehicle_data();
auto& msg_params = (*message_)[strings::msg_params];
@@ -74,5 +77,19 @@ void VISubscribeVehicleDataRequest::Run() {
SendRequest();
}
+void VISubscribeVehicleDataRequest::onTimeOut() {
+ event_engine::Event timeout_event(
+ hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData);
+ SDL_LOG_AUTO_TRACE();
+
+ auto error_response = MessageHelper::CreateNegativeResponseFromHmi(
+ function_id(),
+ correlation_id(),
+ hmi_apis::Common_Result::GENERIC_ERROR,
+ std::string("Timed out"));
+ timeout_event.set_smart_object(*error_response);
+ timeout_event.raise(application_manager_.event_dispatcher());
+}
+
} // namespace commands
} // namespace vehicle_info_plugin
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_response.cc
index 061e13c766..5fbd9a7f82 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_subscribe_vehicle_data_response.cc
@@ -37,6 +37,8 @@ namespace vehicle_info_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VISubscribeVehicleDataResponse::VISubscribeVehicleDataResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -49,7 +51,7 @@ VISubscribeVehicleDataResponse::VISubscribeVehicleDataResponse(
VISubscribeVehicleDataResponse::~VISubscribeVehicleDataResponse() {}
void VISubscribeVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(
hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc
index aa24ac7375..d9c9b0729a 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_request.cc
@@ -38,6 +38,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIUnsubscribeVehicleDataRequest::VIUnsubscribeVehicleDataRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -51,7 +53,7 @@ VIUnsubscribeVehicleDataRequest::VIUnsubscribeVehicleDataRequest(
VIUnsubscribeVehicleDataRequest::~VIUnsubscribeVehicleDataRequest() {}
void VIUnsubscribeVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& rpc_spec_vehicle_data = MessageHelper::vehicle_data();
auto& msg_params = (*message_)[strings::msg_params];
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc
index 01fc521b10..ea1ab16d0d 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/hmi/vi_unsubscribe_vehicle_data_response.cc
@@ -37,6 +37,8 @@ namespace vehicle_info_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
VIUnsubscribeVehicleDataResponse::VIUnsubscribeVehicleDataResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -49,7 +51,7 @@ VIUnsubscribeVehicleDataResponse::VIUnsubscribeVehicleDataResponse(
VIUnsubscribeVehicleDataResponse::~VIUnsubscribeVehicleDataResponse() {}
void VIUnsubscribeVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
event_engine::Event event(
hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData);
event.set_smart_object(*message_);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_request.cc
index ef6c284faf..762528c51b 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_request.cc
@@ -44,6 +44,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DiagnosticMessageRequest::DiagnosticMessageRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -56,12 +58,12 @@ DiagnosticMessageRequest::DiagnosticMessageRequest(
DiagnosticMessageRequest::~DiagnosticMessageRequest() {}
void DiagnosticMessageRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "Application is not registered.");
+ SDL_LOG_ERROR("Application is not registered.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -77,8 +79,7 @@ void DiagnosticMessageRequest::Run() {
if (supported_diag_modes.end() == std::find(supported_diag_modes.begin(),
supported_diag_modes.end(),
msg_diagnostic_mode)) {
- LOG4CXX_ERROR(logger_,
- "Received diagnostic mode " << msg_diagnostic_mode
+ SDL_LOG_ERROR("Received diagnostic mode " << msg_diagnostic_mode
<< " is not supported.");
SendResponse(false,
mobile_apis::Result::REJECTED,
@@ -96,7 +97,7 @@ void DiagnosticMessageRequest::Run() {
}
void DiagnosticMessageRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -116,7 +117,7 @@ void DiagnosticMessageRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_response.cc
index f5ccc4d0a7..5448d8c48b 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
DiagnosticMessageResponse::DiagnosticMessageResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -51,7 +53,7 @@ DiagnosticMessageResponse::DiagnosticMessageResponse(
DiagnosticMessageResponse::~DiagnosticMessageResponse() {}
void DiagnosticMessageResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_request.cc
index dfa1cf305b..2f236dd8b2 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_request.cc
@@ -42,6 +42,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetDTCsRequest::GetDTCsRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -54,13 +56,13 @@ GetDTCsRequest::GetDTCsRequest(
GetDTCsRequest::~GetDTCsRequest() {}
void GetDTCsRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(
(*message_)[strings::params][strings::connection_key].asUInt());
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -83,7 +85,7 @@ void GetDTCsRequest::Run() {
}
void GetDTCsRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -105,7 +107,7 @@ void GetDTCsRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_response.cc
index 33945a2f00..6631274c0d 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetDTCsResponse::GetDTCsResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -51,7 +53,7 @@ GetDTCsResponse::GetDTCsResponse(
GetDTCsResponse::~GetDTCsResponse() {}
void GetDTCsResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc
index d15cf6a580..e5656d60c5 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc
@@ -47,6 +47,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
namespace str = strings;
GetVehicleDataRequest::GetVehicleDataRequest(
@@ -62,12 +64,12 @@ GetVehicleDataRequest::GetVehicleDataRequest(
GetVehicleDataRequest::~GetVehicleDataRequest() {}
void GetVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "No such application : " << connection_key());
+ SDL_LOG_ERROR("No such application : " << connection_key());
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -110,7 +112,7 @@ void GetVehicleDataRequest::Run() {
}
void GetVehicleDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject message = event.smart_object();
switch (event.id()) {
@@ -178,7 +180,7 @@ void GetVehicleDataRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
@@ -188,7 +190,7 @@ bool GetVehicleDataRequest::CheckFrequency(Application& app) {
if (app.AreCommandLimitsExceeded(
static_cast<mobile_apis::FunctionID::eType>(function_id()),
application_manager::TLimitSource::CONFIG_FILE)) {
- LOG4CXX_ERROR(logger_, "GetVehicleData frequency is too high.");
+ SDL_LOG_ERROR("GetVehicleData frequency is too high.");
return false;
}
return true;
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_response.cc
index 60a44745a5..c263acd33f 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_response.cc
@@ -40,6 +40,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
GetVehicleDataResponse::GetVehicleDataResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -52,7 +54,7 @@ GetVehicleDataResponse::GetVehicleDataResponse(
GetVehicleDataResponse::~GetVehicleDataResponse() {}
void GetVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc
index 79134cae40..e336b778ff 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc
@@ -45,6 +45,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
OnVehicleDataNotification::OnVehicleDataNotification(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -58,7 +60,7 @@ OnVehicleDataNotification::OnVehicleDataNotification(
OnVehicleDataNotification::~OnVehicleDataNotification() {}
void OnVehicleDataNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<ApplicationSharedPtr> notify_apps;
std::vector<ApplicationSharedPtr>::iterator notified_app_it =
@@ -70,7 +72,7 @@ void OnVehicleDataNotification::Run() {
const auto& param_names = (*message_)[strings::msg_params].enumerate();
for (const auto& name : param_names) {
- LOG4CXX_DEBUG(logger_, "vehicle_data name: " << name);
+ SDL_LOG_DEBUG("vehicle_data name: " << name);
auto vehicle_data_value = (*message_)[strings::msg_params][name].asInt();
application_manager_.IviInfoUpdated(name, vehicle_data_value);
@@ -84,7 +86,7 @@ void OnVehicleDataNotification::Run() {
application_manager_.applications(), subscribed_to_ivi_predicate);
for (const auto& app : applications) {
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
continue;
}
notified_app_it = find(notify_apps.begin(), notify_apps.end(), app);
@@ -101,14 +103,12 @@ void OnVehicleDataNotification::Run() {
}
}
- LOG4CXX_DEBUG(logger_,
- "Number of Notifications to be send: " << notify_apps.size());
+ SDL_LOG_DEBUG("Number of Notifications to be send: " << notify_apps.size());
for (size_t idx = 0; idx < notify_apps.size(); idx++) {
- LOG4CXX_INFO(logger_,
- "Send OnVehicleData PRNDL notification to "
- << notify_apps[idx]->name().c_str() << " application id "
- << notify_apps[idx]->app_id());
+ SDL_LOG_INFO("Send OnVehicleData PRNDL notification to "
+ << notify_apps[idx]->name().c_str() << " application id "
+ << notify_apps[idx]->app_id());
(*message_)[strings::params][strings::connection_key] =
notify_apps[idx]->app_id();
(*message_)[strings::msg_params] = appSO[idx];
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_request.cc
index c090df7852..c718d18965 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_request.cc
@@ -43,6 +43,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ReadDIDRequest::ReadDIDRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -55,19 +57,18 @@ ReadDIDRequest::ReadDIDRequest(
ReadDIDRequest::~ReadDIDRequest() {}
void ReadDIDRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t app_id =
(*message_)[strings::params][strings::connection_key].asUInt();
ApplicationSharedPtr app = application_manager_.application(app_id);
- LOG4CXX_INFO(
- logger_,
+ SDL_LOG_INFO(
"Correlation_id :"
- << (*message_)[strings::params][strings::correlation_id].asUInt());
+ << (*message_)[strings::params][strings::correlation_id].asUInt());
if (!app) {
- LOG4CXX_ERROR(logger_, "An application is not registered.");
+ SDL_LOG_ERROR("An application is not registered.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -75,13 +76,13 @@ void ReadDIDRequest::Run() {
if (app->AreCommandLimitsExceeded(
static_cast<mobile_apis::FunctionID::eType>(function_id()),
application_manager::TLimitSource::CONFIG_FILE)) {
- LOG4CXX_ERROR(logger_, "ReadDID frequency is too high.");
+ SDL_LOG_ERROR("ReadDID frequency is too high.");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
if ((*message_)[strings::msg_params][strings::did_location].empty()) {
- LOG4CXX_ERROR(logger_, "INVALID_DATA");
+ SDL_LOG_ERROR("INVALID_DATA");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -99,7 +100,7 @@ void ReadDIDRequest::Run() {
}
void ReadDIDRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
switch (event.id()) {
@@ -120,7 +121,7 @@ void ReadDIDRequest::on_event(const event_engine::Event& event) {
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_response.cc
index 42e7fc1ba9..806aeb611c 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_response.cc
@@ -39,6 +39,8 @@ using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ReadDIDResponse::ReadDIDResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -51,7 +53,7 @@ ReadDIDResponse::ReadDIDResponse(
ReadDIDResponse::~ReadDIDResponse() {}
void ReadDIDResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc
index 36d972d5fd..9e35e96ce3 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc
@@ -42,6 +42,8 @@ namespace vehicle_info_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SubscribeVehicleDataRequest::SubscribeVehicleDataRequest(
const application_manager::commands::MessageSharedPtr& message,
VehicleInfoCommandParams params)
@@ -55,12 +57,12 @@ SubscribeVehicleDataRequest::SubscribeVehicleDataRequest(
SubscribeVehicleDataRequest::~SubscribeVehicleDataRequest() {}
void SubscribeVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -90,13 +92,13 @@ void SubscribeVehicleDataRequest::Run() {
}
void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
const smart_objects::SmartObject& message = event.smart_object();
if (hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData != event.id()) {
- LOG4CXX_ERROR(logger_, "Received unknown event.");
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
@@ -104,7 +106,7 @@ void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
application_manager_.application(CommandRequestImpl::connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer.");
+ SDL_LOG_ERROR("NULL pointer.");
return;
}
@@ -134,7 +136,7 @@ void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
const auto& converted_name = ConvertResponseToRequestName(param);
if (vi_waiting_for_subscribe_.end() ==
vi_waiting_for_subscribe_.find(converted_name)) {
- LOG4CXX_DEBUG(logger_, "erase " << converted_name);
+ SDL_LOG_DEBUG("erase " << converted_name);
converted_msg_params.erase(param);
}
}
@@ -184,8 +186,7 @@ bool SubscribeVehicleDataRequest::CheckSubscriptionStatus(
std::string vi_name, const smart_objects::SmartObject& msg_params) {
const auto subscribed_items = msg_params.enumerate();
if (subscribed_items.end() == subscribed_items.find(vi_name)) {
- LOG4CXX_WARN(logger_,
- vi_name << " is waiting to be subscribed, but missing in "
+ SDL_LOG_WARN(vi_name << " is waiting to be subscribed, but missing in "
"vehicle response.");
return false;
}
@@ -193,8 +194,7 @@ bool SubscribeVehicleDataRequest::CheckSubscriptionStatus(
auto res_code = msg_params[vi_name][strings::result_code].asInt();
if (VD_ResultCode::VDRC_SUCCESS != res_code &&
VD_ResultCode::VDRC_DATA_ALREADY_SUBSCRIBED != res_code) {
- LOG4CXX_WARN(logger_,
- "Subscription to " << vi_name << " for " << connection_key()
+ SDL_LOG_WARN("Subscription to " << vi_name << " for " << connection_key()
<< " failed.");
return false;
}
@@ -203,7 +203,7 @@ bool SubscribeVehicleDataRequest::CheckSubscriptionStatus(
bool SubscribeVehicleDataRequest::SubscribePendingVehicleData(
ApplicationSharedPtr app, smart_objects::SmartObject& msg_params) {
- LOG4CXX_DEBUG(logger_, "Subscribing to all pending VehicleData");
+ SDL_LOG_DEBUG("Subscribing to all pending VehicleData");
std::set<hmi_apis::Common_VehicleDataResultCode::eType> skiped_result_codes(
{VD_ResultCode::VDRC_TRUNCATED_DATA,
@@ -245,7 +245,7 @@ bool SubscribeVehicleDataRequest::Init() {
void SubscribeVehicleDataRequest::AddAlreadySubscribedVI(
smart_objects::SmartObject& msg_params) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace mobile_apis;
for (const auto& item : vi_already_subscribed_by_this_app_) {
@@ -261,7 +261,7 @@ void SubscribeVehicleDataRequest::AddAlreadySubscribedVI(
struct SubscribedToIVIPredicate {
std::string vehicle_info_;
- SubscribedToIVIPredicate(std::string vehicle_info)
+ explicit SubscribedToIVIPredicate(const std::string& vehicle_info)
: vehicle_info_(vehicle_info) {}
bool operator()(const ApplicationSharedPtr app) const {
DCHECK_OR_RETURN(app, false);
@@ -272,7 +272,7 @@ struct SubscribedToIVIPredicate {
bool SubscribeVehicleDataRequest::IsSomeoneSubscribedFor(
const std::string& param_name) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SubscribedToIVIPredicate finder(param_name);
DataAccessor<ApplicationSet> accessor = application_manager_.applications();
ApplicationSetConstIt it = std::find_if(
@@ -287,8 +287,8 @@ void SubscribeVehicleDataRequest::CheckVISubscriptions(
smart_objects::SmartObject& out_response_params,
smart_objects::SmartObject& out_request_params,
bool& out_result) {
- const bool is_interface_not_available =
- (HmiInterfaces::STATE_NOT_AVAILABLE ==
+ const bool is_interface_available =
+ (HmiInterfaces::STATE_NOT_AVAILABLE !=
application_manager_.hmi_interfaces().GetInterfaceState(
HmiInterfaces::HMI_INTERFACE_VehicleInfo));
@@ -298,11 +298,10 @@ void SubscribeVehicleDataRequest::CheckVISubscriptions(
[this, &out_response_params](
const std::string& key_name,
const mobile_apis::VehicleDataType::eType vd_type) {
- LOG4CXX_DEBUG(
- logger_,
- "App with connection key "
- << connection_key()
- << " is subscribed already for VehicleData: " << key_name);
+ SDL_LOG_DEBUG("App with connection key "
+ << connection_key()
+ << " is subscribed already for VehicleData: "
+ << key_name);
vi_already_subscribed_by_this_app_.insert(key_name);
out_response_params[key_name][strings::data_type] = vd_type;
out_response_params[key_name][strings::result_code] =
@@ -314,21 +313,20 @@ void SubscribeVehicleDataRequest::CheckVISubscriptions(
const std::string& key_name,
const mobile_apis::VehicleDataType::eType vd_type,
vehicle_info_plugin::VehicleInfoAppExtension& ext) {
- LOG4CXX_DEBUG(logger_,
- "There are apps subscribed already for "
- "VehicleDataType: "
- << key_name);
+ SDL_LOG_DEBUG(
+ "There are apps subscribed already for "
+ "VehicleDataType: "
+ << key_name);
if (!ext.subscribeToVehicleInfo(key_name)) {
- LOG4CXX_ERROR(
- logger_, "Unable to subscribe for VehicleDataType: " << key_name);
+ SDL_LOG_ERROR(
+ "Unable to subscribe for VehicleDataType: " << key_name);
return;
}
- LOG4CXX_DEBUG(
- logger_,
- "App with connection key "
- << connection_key()
- << " have been subscribed for VehicleDataType: " << key_name);
+ SDL_LOG_DEBUG("App with connection key "
+ << connection_key()
+ << " have been subscribed for VehicleDataType: "
+ << key_name);
vi_already_subscribed_by_another_apps_.insert(key_name);
out_response_params[key_name][strings::data_type] = vd_type;
out_response_params[key_name][strings::result_code] =
@@ -341,11 +339,9 @@ void SubscribeVehicleDataRequest::CheckVISubscriptions(
out_request_params[vi_name] = (*message_)[strings::msg_params][vi_name];
vi_waiting_for_subscribe_.insert(vi_name);
- LOG4CXX_DEBUG(
- logger_,
- "App with connection key "
- << connection_key()
- << " will be subscribed for VehicleDataType: " << vi_name);
+ SDL_LOG_DEBUG("App with connection key "
+ << connection_key()
+ << " will be subscribed for VehicleDataType: " << vi_name);
++subscribed_items;
return true;
};
@@ -355,7 +351,7 @@ void SubscribeVehicleDataRequest::CheckVISubscriptions(
VehicleInfoSubscriptions::size_type items_to_subscribe = 0;
auto item_names = (*message_)[strings::msg_params].enumerate();
- if (!is_interface_not_available) {
+ if (is_interface_available) {
for (const auto& name : item_names) {
auto enabled = (*message_)[strings::msg_params][name].asBool();
if (!enabled) {
@@ -386,6 +382,9 @@ void SubscribeVehicleDataRequest::CheckVISubscriptions(
if (0 == items_to_subscribe) {
if (HasDisallowedParams()) {
out_result_code = mobile_apis::Result::DISALLOWED;
+ } else if (!is_interface_available) {
+ out_result_code = mobile_apis::Result::UNSUPPORTED_RESOURCE;
+ out_info = "VehicleInfo is not supported by system";
} else {
out_result_code = mobile_apis::Result::INVALID_DATA;
out_info = "No data in the request";
@@ -394,7 +393,8 @@ void SubscribeVehicleDataRequest::CheckVISubscriptions(
return;
}
- if (0 == subscribed_items && !is_interface_not_available) {
+ // cppcheck-suppress knownConditionTrueFalse
+ if (0 == subscribed_items && is_interface_available) {
out_result_code = mobile_apis::Result::IGNORED;
out_info = "Already subscribed on provided VehicleData.";
out_result = false;
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc
index 8330176af6..0527532acc 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc
@@ -40,6 +40,8 @@ namespace vehicle_info_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SubscribeVehicleDataResponse::SubscribeVehicleDataResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -52,7 +54,7 @@ SubscribeVehicleDataResponse::SubscribeVehicleDataResponse(
SubscribeVehicleDataResponse::~SubscribeVehicleDataResponse() {}
void SubscribeVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
rpc_service_.SendMessageToMobile(message_);
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc
index 32d63f0c35..8ffeaf922a 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc
@@ -47,6 +47,8 @@ namespace vehicle_info_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UnsubscribeVehicleDataRequest::UnsubscribeVehicleDataRequest(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -60,12 +62,12 @@ UnsubscribeVehicleDataRequest::UnsubscribeVehicleDataRequest(
UnsubscribeVehicleDataRequest::~UnsubscribeVehicleDataRequest() {}
void UnsubscribeVehicleDataRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
+ SDL_LOG_ERROR("NULL pointer");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -82,20 +84,19 @@ void UnsubscribeVehicleDataRequest::Run() {
std::set<std::string> custom_vehicle_data;
auto app_not_subscribed_response = [this](const std::string& key_name) {
- LOG4CXX_DEBUG(logger_,
- "App with connection key "
- << connection_key()
- << " is not subscribed for VehicleData: " << key_name);
+ SDL_LOG_DEBUG("App with connection key "
+ << connection_key()
+ << " is not subscribed for VehicleData: " << key_name);
vi_already_unsubscribed_by_this_app_.insert(key_name);
response_params_[key_name][strings::result_code] =
mobile_apis::VehicleDataResultCode::VDRC_DATA_NOT_SUBSCRIBED;
};
auto other_app_subscribed_response = [this](const std::string& key_name) {
- LOG4CXX_DEBUG(logger_,
- "There are apps still subscribed for "
- "VehicleDataType: "
- << key_name);
+ SDL_LOG_DEBUG(
+ "There are apps still subscribed for "
+ "VehicleDataType: "
+ << key_name);
vi_still_subscribed_by_another_apps_.insert(key_name);
response_params_[key_name][strings::result_code] =
mobile_apis::VehicleDataResultCode::VDRC_SUCCESS;
@@ -117,9 +118,8 @@ void UnsubscribeVehicleDataRequest::Run() {
continue;
}
- LOG4CXX_DEBUG(logger_,
- "Unsubscribed app with connection key "
- << connection_key() << " from VehicleDataType: " << name);
+ SDL_LOG_DEBUG("Unsubscribed app with connection key "
+ << connection_key() << " from VehicleDataType: " << name);
++unsubscribed_items;
@@ -153,7 +153,7 @@ void UnsubscribeVehicleDataRequest::Run() {
if (0 == unsubscribed_items) {
SendResponse(false,
mobile_apis::Result::IGNORED,
- "Was not subscribed on any VehicleData.",
+ "Some provided VehicleData was not subscribed.",
&response_params_);
return;
}
@@ -177,13 +177,13 @@ void UnsubscribeVehicleDataRequest::Run() {
}
void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
const smart_objects::SmartObject& message = event.smart_object();
if (hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData != event.id()) {
- LOG4CXX_ERROR(logger_, "Received unknown event.");
+ SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo);
@@ -192,7 +192,7 @@ void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
application_manager_.application(CommandRequestImpl::connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "NULL pointer.");
+ SDL_LOG_ERROR("NULL pointer.");
return;
}
@@ -260,7 +260,7 @@ bool UnsubscribeVehicleDataRequest::Init() {
bool UnsubscribeVehicleDataRequest::IsSomeoneSubscribedFor(
const std::string& param_name) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto conn_key = connection_key();
auto subscribed_to_ivi = [&param_name,
&conn_key](const ApplicationSharedPtr app) {
@@ -280,7 +280,7 @@ bool UnsubscribeVehicleDataRequest::IsSomeoneSubscribedFor(
void UnsubscribeVehicleDataRequest::AddAlreadyUnsubscribedVI(
smart_objects::SmartObject& response) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace mobile_apis;
for (const auto& item : vi_already_unsubscribed_by_this_app_) {
@@ -297,16 +297,14 @@ bool UnsubscribeVehicleDataRequest::CheckSubscriptionStatus(
std::string key, const smart_objects::SmartObject& msg_params) {
const auto unsubscribed_items = msg_params.enumerate();
if (unsubscribed_items.end() == unsubscribed_items.find(key)) {
- LOG4CXX_WARN(logger_,
- key << " is waiting to be unsubscribed, but missing in "
+ SDL_LOG_WARN(key << " is waiting to be unsubscribed, but missing in "
"vehicle response.");
return false;
}
auto res_code = msg_params[key][strings::result_code].asInt();
if (hmi_apis::Common_VehicleDataResultCode::VDRC_SUCCESS != res_code) {
- LOG4CXX_WARN(logger_,
- "Unubscribing from " << key << " for " << connection_key()
+ SDL_LOG_WARN("Unubscribing from " << key << " for " << connection_key()
<< " failed.");
return false;
}
@@ -315,7 +313,7 @@ bool UnsubscribeVehicleDataRequest::CheckSubscriptionStatus(
bool UnsubscribeVehicleDataRequest::UnsubscribePendingVehicleData(
ApplicationSharedPtr app, const smart_objects::SmartObject& msg_params) {
- LOG4CXX_DEBUG(logger_, "Unsubscribing from all pending VehicleData");
+ SDL_LOG_DEBUG("Unsubscribing from all pending VehicleData");
for (const auto& vi_name : vi_waiting_for_unsubscribe_) {
const auto converted_item = ConvertRequestToResponseName(vi_name);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc
index 352239c331..89b5261938 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc
@@ -38,6 +38,8 @@ namespace vehicle_info_plugin {
using namespace application_manager;
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
UnsubscribeVehicleDataResponse::UnsubscribeVehicleDataResponse(
const application_manager::commands::MessageSharedPtr& message,
const VehicleInfoCommandParams& params)
@@ -50,12 +52,12 @@ UnsubscribeVehicleDataResponse::UnsubscribeVehicleDataResponse(
UnsubscribeVehicleDataResponse::~UnsubscribeVehicleDataResponse() {}
void UnsubscribeVehicleDataResponse::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// check if response false
if (true == (*message_)[strings::msg_params].keyExists(strings::success)) {
if ((*message_)[strings::msg_params][strings::success].asBool() == false) {
- LOG4CXX_ERROR(logger_, "Success = false");
+ SDL_LOG_ERROR("Success = false");
SendResponse(false);
return;
}
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 9df6d922aa..af9d605ff0 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
@@ -45,7 +45,7 @@
#include "utils/helpers.h"
#include "utils/optional.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
+SDL_CREATE_LOG_VARIABLE("VehicleInfoPlugin")
namespace vehicle_info_plugin {
@@ -64,7 +64,7 @@ CustomVehicleDataManagerImpl::CustomVehicleDataManagerImpl(
std::string CustomVehicleDataManagerImpl::GetVehicleDataItemType(
const std::string& vehicle_data_item_name) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& schema = FindSchemaByNameNonRecursive(vehicle_data_item_name);
return schema.is_initialized() ? std::string(schema->type)
@@ -86,7 +86,7 @@ bool CustomVehicleDataManagerImpl::IsRemovedCustomVehicleDataName(
void CustomVehicleDataManagerImpl::CreateMobileMessageParams(
smart_objects::SmartObject& msg_params) {
using namespace application_manager;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
typedef std::function<smart_objects::SmartObject(
const smart_objects::SmartObject& input_params,
@@ -105,7 +105,7 @@ void CustomVehicleDataManagerImpl::CreateMobileMessageParams(
? FindSchemaByKeyRecursive(key)
: FindSchemaByKeyNonRecursive(key);
if (!schema.is_initialized()) {
- LOG4CXX_DEBUG(logger_, "Schema for: " << key << " cannot be found");
+ SDL_LOG_DEBUG("Schema for: " << key << " cannot be found");
continue;
}
@@ -161,7 +161,7 @@ smart_objects::SmartObject CustomVehicleDataManagerImpl::CreateHMIMessageParams(
const policy_table::VehicleDataItem&)>
ParamsConstructor;
- auto fill_param = [](ParamsConstructor& constructor,
+ auto fill_param = [](const ParamsConstructor& constructor,
const policy_table::VehicleDataItem& param,
smart_objects::SmartObject* out_params) {
DCHECK_OR_RETURN_VOID(out_params)
@@ -208,7 +208,7 @@ const OptionalDataItem FindSchema(
const std::vector<policy_table::VehicleDataItem>& oem_items,
SearchMethod search_method,
Comparer comparer) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<policy_table::VehicleDataItem> items;
for (const auto& item : oem_items) {
@@ -354,12 +354,14 @@ void CustomVehicleDataManagerImpl::UpdateVehicleDataItems() {
};
auto get_vehicle_data_history =
- [&vehicle_data_items](std::string name) -> std::vector<VehicleDataItem> {
+ [&vehicle_data_items](
+ const std::string& name) -> std::vector<VehicleDataItem> {
std::vector<VehicleDataItem> result;
- std::copy_if(vehicle_data_items.begin(),
- vehicle_data_items.end(),
- std::back_inserter(result),
- [&name](VehicleDataItem& item) { return item.name == name; });
+ std::copy_if(
+ vehicle_data_items.begin(),
+ vehicle_data_items.end(),
+ std::back_inserter(result),
+ [&name](const VehicleDataItem& item) { return item.name == name; });
std::sort(result.begin(),
result.end(),
@@ -495,7 +497,7 @@ void CustomVehicleDataManagerImpl::UpdateVehicleDataItems() {
void CustomVehicleDataManagerImpl::OnPolicyEvent(
plugin_manager::PolicyEvent policy_event) {
using namespace plugin_manager;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
switch (policy_event) {
case kApplicationPolicyUpdated:
@@ -510,7 +512,7 @@ void CustomVehicleDataManagerImpl::OnPolicyEvent(
const OptionalDataItem
CustomVehicleDataManagerImpl::FindSchemaByNameNonRecursive(
const std::string& name) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto& oem_items = vehicle_data_provider_.GetVehicleDataItems();
auto compare_by_name = [&name](const policy_table::VehicleDataItem& item) {
@@ -523,7 +525,7 @@ CustomVehicleDataManagerImpl::FindSchemaByNameNonRecursive(
const OptionalDataItem
CustomVehicleDataManagerImpl::FindRemovedSchemaByNameNonRecursive(
const std::string& name) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& removed_oem_items =
vehicle_data_provider_.GetRemovedVehicleDataItems();
@@ -537,7 +539,7 @@ CustomVehicleDataManagerImpl::FindRemovedSchemaByNameNonRecursive(
const OptionalDataItem CustomVehicleDataManagerImpl::FindSchemaByNameRecursive(
const std::string& name) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto& oem_items = vehicle_data_provider_.GetVehicleDataItems();
auto compare_by_name = [&name](const policy_table::VehicleDataItem& item) {
@@ -550,7 +552,7 @@ const OptionalDataItem CustomVehicleDataManagerImpl::FindSchemaByNameRecursive(
const OptionalDataItem
CustomVehicleDataManagerImpl::FindSchemaByKeyNonRecursive(
const std::string& key) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto& oem_items = vehicle_data_provider_.GetVehicleDataItems();
auto compare_by_key = [&key](const policy_table::VehicleDataItem& item) {
@@ -562,7 +564,7 @@ CustomVehicleDataManagerImpl::FindSchemaByKeyNonRecursive(
const OptionalDataItem CustomVehicleDataManagerImpl::FindSchemaByKeyRecursive(
const std::string& key) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto& oem_items = vehicle_data_provider_.GetVehicleDataItems();
auto compare_by_key = [&key](const policy_table::VehicleDataItem& item) {
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_data_item_schema.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_data_item_schema.cc
index 750da9fa6e..dce0a41183 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_data_item_schema.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_data_item_schema.cc
@@ -4,7 +4,7 @@
namespace vehicle_info_plugin {
#ifdef ENABLE_LOG
-CREATE_LOGGERPTR_LOCAL(vehicle_data_logger, "VehicleDataItemSchema");
+SDL_CREATE_LOG_VARIABLE("VehicleDataItemSchema");
#endif // ENABLE_LOG
VehicleDataItemSchema::VehicleDataItemSchema(PolicyDataItem& policy_item,
@@ -117,16 +117,21 @@ smart_objects::ISchemaItemPtr VehicleDataItemSchema::GetPODTypeSchema(
using FloatItemParam = smart_objects::TSchemaItemParameter<double>;
using StringSchemaItem = smart_objects::CStringSchemaItem;
using StringItemParam = smart_objects::TSchemaItemParameter<size_t>;
+ using StringItemValueParam = smart_objects::TSchemaItemParameter<std::string>;
using BoolSchemaItem = smart_objects::CBoolSchemaItem;
using BoolItemParam = smart_objects::TSchemaItemParameter<bool>;
if (policy_item.type == policy_table::VehicleDataItem::kInteger) {
- return IntSchemaItem::create(policy_item.minvalue.is_initialized()
- ? IntItemParam(*policy_item.minvalue)
- : IntItemParam(),
- policy_item.maxvalue.is_initialized()
- ? IntItemParam(*policy_item.maxvalue)
- : IntItemParam());
+ return IntSchemaItem::create(
+ policy_item.minvalue.is_initialized()
+ ? IntItemParam(*policy_item.minvalue)
+ : IntItemParam(),
+ policy_item.maxvalue.is_initialized()
+ ? IntItemParam(*policy_item.maxvalue)
+ : IntItemParam(),
+ policy_item.defvalue.is_initialized()
+ ? IntItemParam(std::stol(*policy_item.defvalue))
+ : IntItemParam());
}
if (policy_item.type == policy_table::VehicleDataItem::kFloat ||
policy_item.type == policy_table::VehicleDataItem::kDouble) {
@@ -136,6 +141,9 @@ smart_objects::ISchemaItemPtr VehicleDataItemSchema::GetPODTypeSchema(
: FloatItemParam(),
policy_item.maxvalue.is_initialized()
? FloatItemParam(double(*policy_item.maxvalue))
+ : FloatItemParam(),
+ policy_item.defvalue.is_initialized()
+ ? FloatItemParam(std::stod(*policy_item.defvalue))
: FloatItemParam());
}
if (policy_item.type == policy_table::VehicleDataItem::kString) {
@@ -145,15 +153,21 @@ smart_objects::ISchemaItemPtr VehicleDataItemSchema::GetPODTypeSchema(
: 0),
policy_item.maxlength.is_initialized()
? StringItemParam(*policy_item.maxlength)
- : StringItemParam());
+ : StringItemParam(),
+ policy_item.defvalue.is_initialized()
+ ? StringItemValueParam(std::string(*policy_item.defvalue))
+ : StringItemValueParam());
}
if (policy_item.type == policy_table::VehicleDataItem::kBoolean) {
- return BoolSchemaItem::create(BoolItemParam(true));
+ return BoolSchemaItem::create(
+ policy_item.defvalue.is_initialized()
+ ? BoolItemParam(*policy_item.defvalue == "true")
+ : BoolItemParam());
}
std::string error_msg = std::string("Invalid POD type provided: ") +
std::string(policy_item.type);
- LOG4CXX_ERROR(vehicle_data_logger, error_msg.c_str());
+ SDL_LOG_ERROR(error_msg.c_str());
return nullptr;
}
@@ -168,7 +182,7 @@ smart_objects::ISchemaItemPtr VehicleDataItemSchema::getEnumSchema(
const std::string& type_name) const {
auto enum_schema = policy_table::EnumSchemaItemFactory::Get(type_name);
if (!enum_schema) {
- LOG4CXX_ERROR(vehicle_data_logger, "NULL pointer: " << type_name);
+ SDL_LOG_ERROR("NULL pointer: " << type_name);
}
return enum_schema;
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc
index 149299d3bb..dd6d797e39 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc
@@ -33,9 +33,10 @@
#include "vehicle_info_plugin/vehicle_info_app_extension.h"
#include "vehicle_info_plugin/vehicle_info_plugin.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
+SDL_CREATE_LOG_VARIABLE("VehicleInfoPlugin")
namespace vehicle_info_plugin {
+namespace strings = application_manager::strings;
unsigned VehicleInfoAppExtension::VehicleInfoAppExtensionUID = 146;
@@ -43,24 +44,28 @@ VehicleInfoAppExtension::VehicleInfoAppExtension(
VehicleInfoPlugin& plugin, application_manager::Application& app)
: app_mngr::AppExtension(
VehicleInfoAppExtension::VehicleInfoAppExtensionUID)
+ , subscribed_data_lock_(std::make_shared<sync_primitives::Lock>())
+ , pending_subscriptions_lock_(std::make_shared<sync_primitives::Lock>())
, plugin_(plugin)
, app_(app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
VehicleInfoAppExtension::~VehicleInfoAppExtension() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
bool VehicleInfoAppExtension::subscribeToVehicleInfo(
const std::string& vehicle_data) {
- LOG4CXX_DEBUG(logger_, vehicle_data);
+ SDL_LOG_DEBUG(vehicle_data);
+ sync_primitives::AutoLock lock(*subscribed_data_lock_);
return subscribed_data_.insert(vehicle_data).second;
}
bool VehicleInfoAppExtension::unsubscribeFromVehicleInfo(
const std::string& vehicle_data) {
- LOG4CXX_DEBUG(logger_, vehicle_data);
+ SDL_LOG_DEBUG(vehicle_data);
+ sync_primitives::AutoLock lock(*subscribed_data_lock_);
auto it = subscribed_data_.find(vehicle_data);
if (it != subscribed_data_.end()) {
subscribed_data_.erase(it);
@@ -70,44 +75,126 @@ bool VehicleInfoAppExtension::unsubscribeFromVehicleInfo(
}
void VehicleInfoAppExtension::unsubscribeFromVehicleInfo() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(*subscribed_data_lock_);
subscribed_data_.clear();
}
bool VehicleInfoAppExtension::isSubscribedToVehicleInfo(
const std::string& vehicle_data) const {
- LOG4CXX_DEBUG(logger_, vehicle_data);
+ SDL_LOG_DEBUG(vehicle_data);
+ sync_primitives::AutoLock lock(*subscribed_data_lock_);
return subscribed_data_.find(vehicle_data) != subscribed_data_.end();
}
-VehicleInfoSubscriptions VehicleInfoAppExtension::Subscriptions() {
- return subscribed_data_;
+bool VehicleInfoAppExtension::isPendingSubscriptionToVehicleInfo(
+ const std::string& vehicle_data) const {
+ SDL_LOG_DEBUG(vehicle_data);
+ sync_primitives::AutoLock lock(*pending_subscriptions_lock_);
+ return pending_subscriptions_.find(vehicle_data) !=
+ pending_subscriptions_.end();
+}
+
+const DataAccessor<VehicleInfoSubscriptions>
+VehicleInfoAppExtension::Subscriptions() {
+ DataAccessor<VehicleInfoSubscriptions> data_accessor(subscribed_data_,
+ subscribed_data_lock_);
+ return data_accessor;
+}
+
+bool VehicleInfoAppExtension::AddPendingSubscription(
+ const std::string& vehicle_data) {
+ sync_primitives::AutoLock lock(*pending_subscriptions_lock_);
+ return pending_subscriptions_.insert(vehicle_data).second;
+}
+
+bool VehicleInfoAppExtension::RemovePendingSubscription(
+ const std::string& vehicle_data) {
+ SDL_LOG_DEBUG(vehicle_data);
+ sync_primitives::AutoLock lock(*pending_subscriptions_lock_);
+ auto it = pending_subscriptions_.find(vehicle_data);
+ if (it != pending_subscriptions_.end()) {
+ pending_subscriptions_.erase(it);
+ return true;
+ }
+ return false;
+}
+
+void VehicleInfoAppExtension::RemovePendingSubscriptions() {
+ sync_primitives::AutoLock lock(*pending_subscriptions_lock_);
+ pending_subscriptions_.clear();
+}
+
+const DataAccessor<VehicleInfoSubscriptions>
+VehicleInfoAppExtension::PendingSubscriptions() {
+ return DataAccessor<VehicleInfoSubscriptions>(pending_subscriptions_,
+ pending_subscriptions_lock_);
}
void VehicleInfoAppExtension::SaveResumptionData(
smart_objects::SmartObject& resumption_data) {
- const char* application_vehicle_info = "vehicleInfo";
- resumption_data[application_vehicle_info] =
+ resumption_data[strings::application_vehicle_info] =
smart_objects::SmartObject(smart_objects::SmartType_Array);
int i = 0;
+ sync_primitives::AutoLock lock(*subscribed_data_lock_);
for (const auto& subscription : subscribed_data_) {
- resumption_data[application_vehicle_info][i++] = subscription;
+ resumption_data[strings::application_vehicle_info][i++] = subscription;
}
}
void VehicleInfoAppExtension::ProcessResumption(
+ const smart_objects::SmartObject& saved_app) {
+ SDL_LOG_AUTO_TRACE();
+
+ if (!saved_app.keyExists(strings::application_subscriptions)) {
+ SDL_LOG_DEBUG("application_subscriptions section is not exists");
+ return;
+ }
+
+ const smart_objects::SmartObject& resumption_data =
+ saved_app[strings::application_subscriptions];
+
+ if (!resumption_data.keyExists(strings::application_vehicle_info)) {
+ SDL_LOG_DEBUG("application_vehicle_info section is not exists");
+ return;
+ }
+
+ const auto subscriptions_ivi =
+ resumption_data[strings::application_vehicle_info].asArray();
+ for (const auto& ivi : *subscriptions_ivi) {
+ AddPendingSubscription(ivi.asString());
+ }
+ if (!subscriptions_ivi->empty()) {
+ plugin_.ProcessResumptionSubscription(app_, *this);
+ }
+}
+
+void VehicleInfoAppExtension::RevertResumption(
const smart_objects::SmartObject& resumption_data) {
- const char* application_vehicle_info = "vehicleInfo";
- if (resumption_data.keyExists(application_vehicle_info)) {
- const auto* subscriptions_ivi =
- resumption_data[application_vehicle_info].asArray();
- if (subscriptions_ivi) {
- for (const auto& ivi : (*subscriptions_ivi)) {
- subscribeToVehicleInfo(ivi.asString());
- }
+ SDL_LOG_AUTO_TRACE();
+
+ unsubscribeFromVehicleInfo();
+
+ if (!resumption_data.keyExists(
+ application_manager::hmi_interface::vehicle_info)) {
+ SDL_LOG_DEBUG("No resumption vahicle data subscription to revert");
+ return;
+ }
+ const auto& resumption_vd_data =
+ resumption_data[application_manager::hmi_interface::vehicle_info];
+
+ std::set<std::string> ivi_subscriptions_to_revert;
+ const auto ivi_subscriptions_keys = resumption_vd_data.enumerate();
+ for (const auto& key : ivi_subscriptions_keys) {
+ // Only boolean keys in subscriptions list are true vehicle data
+ // subscriptions
+ if (smart_objects::SmartType::SmartType_Boolean ==
+ resumption_vd_data.getElement(key).getType()) {
+ ivi_subscriptions_to_revert.insert(key);
}
- plugin_.ProcessResumptionSubscription(app_, *this);
}
+
+ plugin_.RevertResumption(app_, ivi_subscriptions_to_revert);
}
VehicleInfoAppExtension& VehicleInfoAppExtension::ExtractVIExtension(
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc
index 52ee9f476d..5bebdf8e2a 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc
@@ -32,7 +32,7 @@
#include "vehicle_info_plugin/vehicle_info_command_factory.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
+SDL_CREATE_LOG_VARIABLE("VehicleInfoPlugin")
namespace vehicle_info_plugin {
@@ -57,7 +57,7 @@ VehicleInfoCommandFactory::VehicleInfoCommandFactory(
hmi_capabilities,
policy_handler,
custom_vehicle_data_manager)) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
VehicleInfoCommandFactory::~VehicleInfoCommandFactory() {}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc
index e8d852b612..131b5304c4 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc
@@ -52,7 +52,7 @@
#include "vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_request.h"
#include "vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_response.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
+SDL_CREATE_LOG_VARIABLE("VehicleInfoPlugin")
namespace vehicle_info_plugin {
namespace strings = app_mngr::strings;
@@ -60,7 +60,7 @@ namespace strings = app_mngr::strings;
template <typename VehicleInfoCommandType>
class VehicleInfoCommandCreator : public application_manager::CommandCreator {
public:
- VehicleInfoCommandCreator(const VehicleInfoCommandParams& params)
+ explicit VehicleInfoCommandCreator(const VehicleInfoCommandParams& params)
: params_(params) {}
private:
@@ -85,7 +85,8 @@ template <>
class VehicleInfoCommandCreator<VehicleInfoInvalidCommand>
: public application_manager::CommandCreator {
public:
- VehicleInfoCommandCreator(const VehicleInfoCommandParams& params) {
+ // cppcheck-suppress unusedFunction //Used in VehicleInfoCommandCreatorFactory
+ explicit VehicleInfoCommandCreator(const VehicleInfoCommandParams& params) {
UNUSED(params);
}
@@ -103,12 +104,13 @@ class VehicleInfoCommandCreator<VehicleInfoInvalidCommand>
};
struct VehicleInfoCommandCreatorFactory {
- VehicleInfoCommandCreatorFactory(const VehicleInfoCommandParams& params)
+ explicit VehicleInfoCommandCreatorFactory(
+ const VehicleInfoCommandParams& params)
: params_(params) {}
template <typename VehicleInfoCommandType>
application_manager::CommandCreator& GetCreator() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
static VehicleInfoCommandCreator<VehicleInfoCommandType> res(params_);
return res;
}
@@ -126,7 +128,7 @@ VehicleInfoHmiCommandFactory::VehicleInfoHmiCommandFactory(
, hmi_capabilities_(hmi_capabilities)
, policy_handler_(policy_handler)
, custom_vehicle_data_manager_(custom_vehicle_data_manager) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
app_mngr::CommandSharedPtr VehicleInfoHmiCommandFactory::CreateCommand(
@@ -150,9 +152,8 @@ app_mngr::CommandSharedPtr VehicleInfoHmiCommandFactory::CreateCommand(
}
UNUSED(message_type_str);
- LOG4CXX_DEBUG(logger_,
- "HMICommandFactory::CreateCommand function_id: "
- << function_id << ", message type: " << message_type_str);
+ SDL_LOG_DEBUG("HMICommandFactory::CreateCommand function_id: "
+ << function_id << ", message type: " << message_type_str);
return buildCommandCreator(function_id, message_type).create(message);
}
@@ -212,7 +213,7 @@ app_mngr::CommandCreator& VehicleInfoHmiCommandFactory::buildCommandCreator(
? factory.GetCreator<commands::VIDiagnosticMessageRequest>()
: factory.GetCreator<commands::VIDiagnosticMessageResponse>();
default:
- LOG4CXX_WARN(logger_, "Unsupported function_id: " << function_id);
+ SDL_LOG_WARN("Unsupported function_id: " << function_id);
return factory.GetCreator<VehicleInfoInvalidCommand>();
}
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc
index c3c8d9c8d7..77cb5e71d7 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc
@@ -52,7 +52,7 @@
#include "vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_request.h"
#include "vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_response.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
+SDL_CREATE_LOG_VARIABLE("VehicleInfoPlugin")
namespace vehicle_info_plugin {
namespace strings = app_mngr::strings;
@@ -60,7 +60,7 @@ namespace strings = app_mngr::strings;
template <typename VehicleInfoCommandType>
class VehicleInfoCommandCreator : public application_manager::CommandCreator {
public:
- VehicleInfoCommandCreator(const VehicleInfoCommandParams& params)
+ explicit VehicleInfoCommandCreator(const VehicleInfoCommandParams& params)
: params_(params) {}
private:
@@ -85,7 +85,7 @@ template <>
class VehicleInfoCommandCreator<VehicleInfoInvalidCommand>
: public application_manager::CommandCreator {
public:
- VehicleInfoCommandCreator(const VehicleInfoCommandParams& params) {
+ explicit VehicleInfoCommandCreator(const VehicleInfoCommandParams& params) {
UNUSED(params);
}
@@ -103,12 +103,13 @@ class VehicleInfoCommandCreator<VehicleInfoInvalidCommand>
};
struct VehicleInfoCommandCreatorFactory {
- VehicleInfoCommandCreatorFactory(const VehicleInfoCommandParams& params)
+ explicit VehicleInfoCommandCreatorFactory(
+ const VehicleInfoCommandParams& params)
: params_(params) {}
template <typename VehicleInfoCommandType>
application_manager::CommandCreator& GetCreator() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
static VehicleInfoCommandCreator<VehicleInfoCommandType> res(params_);
return res;
}
@@ -126,7 +127,7 @@ VehicleInfoMobileCommandFactory::VehicleInfoMobileCommandFactory(
, hmi_capabilities_(hmi_capabilities)
, policy_handler_(policy_handler)
, custom_vehicle_data_manager_(custom_vehicle_data_manager) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
app_mngr::CommandSharedPtr VehicleInfoMobileCommandFactory::CreateCommand(
@@ -150,9 +151,8 @@ app_mngr::CommandSharedPtr VehicleInfoMobileCommandFactory::CreateCommand(
}
UNUSED(message_type_str);
- LOG4CXX_DEBUG(logger_,
- "HMICommandFactory::CreateCommand function_id: "
- << function_id << ", message type: " << message_type_str);
+ SDL_LOG_DEBUG("HMICommandFactory::CreateCommand function_id: "
+ << function_id << ", message type: " << message_type_str);
return get_creator_factory(function_id, message_type, source).create(message);
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_pending_resumption_handler.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_pending_resumption_handler.cc
new file mode 100644
index 0000000000..6721d93658
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_pending_resumption_handler.cc
@@ -0,0 +1,424 @@
+/*
+ Copyright (c) 2020, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "vehicle_info_plugin/vehicle_info_pending_resumption_handler.h"
+#include <boost/range/algorithm/set_algorithm.hpp>
+#include <functional>
+#include "application_manager/event_engine/event_observer.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/resumption/resumption_data_processor.h"
+#include "utils/helpers.h"
+#include "vehicle_info_plugin/custom_vehicle_data_manager.h"
+#include "vehicle_info_plugin/vehicle_info_plugin.h"
+
+namespace vehicle_info_plugin {
+SDL_CREATE_LOG_VARIABLE("VehicleInfoPlugin")
+
+using hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData;
+
+uint32_t get_corr_id_from_message(const smart_objects::SmartObject& message) {
+ using namespace application_manager;
+ return message[strings::params][strings::correlation_id].asInt();
+}
+
+template <class T>
+std::string Stringify(const T& container) {
+ std::stringstream ss;
+ for (const auto& val : container) {
+ ss << val << " ";
+ }
+ return ss.str();
+}
+
+VehicleInfoPendingResumptionHandler::VehicleDataList SubscriptionsFromResponse(
+ const smart_objects::SmartObject& response,
+ std::function<bool(const smart_objects::SmartObject& vehicle_data)>
+ vehicle_data_check) {
+ namespace strings = application_manager::strings;
+ VehicleInfoPendingResumptionHandler::VehicleDataList result;
+ const auto response_params = response[strings::msg_params];
+ const auto response_keys = response_params.enumerate();
+ for (auto key : response_keys) {
+ if (vehicle_data_check(response_params[key])) {
+ result.insert(key);
+ }
+ }
+ return result;
+}
+
+void FillResponseWithMissedVD(
+ const VehicleInfoPendingResumptionHandler::VehicleDataList& vehicle_data,
+ smart_objects::SmartObject* response) {
+ DCHECK(response)
+ namespace strings = application_manager::strings;
+ auto& msg_params = (*response)[strings::msg_params];
+ for (const auto& vd : vehicle_data) {
+ smart_objects::SmartObject vd_result(smart_objects::SmartType_Map);
+ vd_result[strings::result_code] =
+ hmi_apis::Common_VehicleDataResultCode::VDRC_SUCCESS;
+ msg_params[vd] = vd_result;
+ }
+}
+
+VehicleInfoPendingResumptionHandler::VehicleDataList
+SuccessfulSubscriptionsFromResponse(
+ const smart_objects::SmartObject& response) {
+ SDL_LOG_AUTO_TRACE();
+ using namespace application_manager;
+
+ VehicleInfoPendingResumptionHandler::VehicleDataList result;
+ if (!resumption::IsResponseSuccessful(response)) {
+ return result;
+ }
+
+ auto successful_vehicle_data =
+ [](const smart_objects::SmartObject& vehicle_data) {
+ constexpr auto kSuccess =
+ hmi_apis::Common_VehicleDataResultCode::VDRC_SUCCESS;
+ const auto vd_result_code = vehicle_data[strings::result_code].asInt();
+ return kSuccess == vd_result_code;
+ };
+ return SubscriptionsFromResponse(response, successful_vehicle_data);
+}
+
+VehicleInfoPendingResumptionHandler::VehicleInfoPendingResumptionHandler(
+ application_manager::ApplicationManager& application_manager,
+ CustomVehicleDataManager& custom_vehicle_data_manager)
+ : PendingResumptionHandler(application_manager)
+ , custom_vehicle_data_manager_(custom_vehicle_data_manager) {}
+
+void VehicleInfoPendingResumptionHandler::OnResumptionRevert() {
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(pending_resumption_lock_);
+ TriggerPendingResumption();
+}
+
+void VehicleInfoPendingResumptionHandler::RaiseFinishedPendingResumption(
+ const PendingSubscriptionsResumption& pending_resumption) {
+ SDL_LOG_AUTO_TRACE();
+ using namespace application_manager;
+
+ auto app = application_manager_.application(pending_resumption.app_id_);
+ if (!app) {
+ SDL_LOG_DEBUG("Application not found " << pending_resumption.app_id_);
+ return;
+ }
+ auto& ext = VehicleInfoAppExtension::ExtractVIExtension(*app);
+ ext.RemovePendingSubscriptions();
+ for (const auto& subscription : pending_resumption.restored_vehicle_data_) {
+ SDL_LOG_DEBUG("Subscribe " << app->app_id() << " to " << subscription);
+ ext.subscribeToVehicleInfo(subscription);
+ }
+
+ unsubscribe_from_event(VehicleInfo_SubscribeVehicleData);
+ auto fake_response =
+ CreateFakeResponseFromHMI(pending_resumption.subscription_results_,
+ pending_resumption.fake_corr_id_);
+ event_engine::Event event(VehicleInfo_SubscribeVehicleData);
+ event.set_smart_object(fake_response);
+ SDL_LOG_DEBUG("Raise fake response for resumption data processor");
+ event.raise(application_manager_.event_dispatcher());
+}
+
+void VehicleInfoPendingResumptionHandler::SendHMIRequestForNotSubscribed(
+ const PendingSubscriptionsResumption& pending_resumption) {
+ SDL_LOG_AUTO_TRACE();
+ const auto remaining_subscriptions = pending_resumption.NotSubscribedData();
+ auto request = CreateSubscribeRequestToHMI(remaining_subscriptions);
+ const auto corr_id = get_corr_id_from_message(*request);
+ subscribe_on_event(VehicleInfo_SubscribeVehicleData, corr_id);
+ application_manager_.GetRPCService().ManageHMICommand(request);
+}
+
+void VehicleInfoPendingResumptionHandler::ProcessNextPendingResumption(
+ const smart_objects::SmartObject& response_message) {
+ SDL_LOG_AUTO_TRACE();
+ if (pending_requests_.empty()) {
+ SDL_LOG_DEBUG("No more pending resumptions");
+ return;
+ }
+ auto& pending = pending_requests_.front();
+ if (pending.waiting_for_hmi_response_) {
+ SDL_LOG_DEBUG("Requests was already sent to HMI for " << pending.app_id_);
+ return;
+ }
+ const auto successful_subscriptions =
+ SuccessfulSubscriptionsFromResponse(response_message);
+ pending.FillRestoredData(successful_subscriptions);
+
+ if (!pending.IsSuccessfullyDone()) {
+ SendHMIRequestForNotSubscribed(pending);
+ pending.waiting_for_hmi_response_ = true;
+ return;
+ }
+ auto pending_copy = pending;
+ pending_requests_.pop_front();
+ RaiseFinishedPendingResumption(pending_copy);
+ ProcessNextPendingResumption(response_message);
+}
+
+void VehicleInfoPendingResumptionHandler::TriggerPendingResumption() {
+ SDL_LOG_AUTO_TRACE();
+ if (pending_requests_.empty()) {
+ SDL_LOG_DEBUG("No pending resumptions");
+ return;
+ }
+ auto& pending_resumption = pending_requests_.front();
+ if (pending_resumption.waiting_for_hmi_response_) {
+ SDL_LOG_DEBUG("Pending resumption for "
+ << pending_resumption.app_id_
+ << " is already waiting for HMI response");
+ return;
+ }
+ if (!pending_resumption.IsSuccessfullyDone()) {
+ SendHMIRequestForNotSubscribed(pending_resumption);
+ pending_resumption.waiting_for_hmi_response_ = true;
+ }
+}
+
+void VehicleInfoPendingResumptionHandler::on_event(
+ const application_manager::event_engine::Event& event) {
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(pending_resumption_lock_);
+ using namespace application_manager;
+
+ if (pending_requests_.empty()) {
+ SDL_LOG_DEBUG("Not waiting for any response");
+ return;
+ }
+
+ auto response_message = event.smart_object();
+ smart_objects::SmartObject converted_msg_params(
+ response_message[strings::msg_params]);
+
+ custom_vehicle_data_manager_.CreateMobileMessageParams(converted_msg_params);
+ response_message[strings::msg_params] = converted_msg_params;
+
+ const auto vs_count_in_response =
+ response_message[application_manager::strings::msg_params].length();
+
+ if (resumption::IsResponseSuccessful(response_message) &&
+ vs_count_in_response == 0) {
+ const auto& requested_vd =
+ pending_requests_.front().requested_vehicle_data_;
+ FillResponseWithMissedVD(requested_vd, &response_message);
+ }
+
+ for (auto& pending : pending_requests_) {
+ pending.FillSubscriptionResults(response_message);
+ }
+
+ auto current_pending = pending_requests_.front();
+ pending_requests_.pop_front();
+
+ RaiseFinishedPendingResumption(current_pending);
+
+ ProcessNextPendingResumption(response_message);
+}
+
+VehicleInfoPendingResumptionHandler::PendingSubscriptionsResumption
+VehicleInfoPendingResumptionHandler::SubscribeToFakeRequest(
+ const uint32_t app_id, const VehicleDataList& subscriptions) {
+ SDL_LOG_AUTO_TRACE();
+ const auto fake_request = CreateSubscribeRequestToHMI(subscriptions);
+ const auto fake_corr_id = get_corr_id_from_message(*fake_request);
+ auto resumption_request = MakeResumptionRequest(
+ fake_corr_id,
+ hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData,
+ *fake_request);
+ SDL_LOG_DEBUG("Subscribe subscriber "
+ << app_id
+ << " to fake request with corr id = " << fake_corr_id);
+ resumption_data_processor().SubscribeToResponse(app_id, resumption_request);
+ PendingSubscriptionsResumption pending_request(
+ app_id, fake_corr_id, subscriptions);
+ return pending_request;
+}
+
+void VehicleInfoPendingResumptionHandler::HandleResumptionSubscriptionRequest(
+ application_manager::AppExtension& extension,
+ application_manager::Application& app) {
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(pending_resumption_lock_);
+ SDL_LOG_TRACE("app id " << app.app_id());
+ auto& ext = dynamic_cast<VehicleInfoAppExtension&>(extension);
+
+ auto subscriptions = ext.PendingSubscriptions().GetData();
+ for (auto ivi = subscriptions.begin(); ivi != subscriptions.end();) {
+ if (IsSubscribedAppExist(*ivi, application_manager_)) {
+ ext.RemovePendingSubscription(*ivi);
+ ext.subscribeToVehicleInfo(*ivi);
+ subscriptions.erase(ivi++);
+ } else {
+ ++ivi;
+ }
+ }
+
+ if (subscriptions.empty()) {
+ SDL_LOG_DEBUG("Subscriptions is empty");
+ return;
+ }
+ SDL_LOG_TRACE("resume subscriptions to : " << Stringify(subscriptions));
+ auto pending_request = SubscribeToFakeRequest(app.app_id(), subscriptions);
+
+ pending_requests_.push_back(pending_request);
+ SDL_LOG_DEBUG(
+ "Add to pending resumptins corr_id = " << pending_request.fake_corr_id_);
+ if (pending_requests_.size() == 1) {
+ TriggerPendingResumption();
+ }
+ // If there was pending resumption before, it will be triggered on HMI
+ // response
+}
+
+smart_objects::SmartObjectSPtr
+VehicleInfoPendingResumptionHandler::CreateSubscribeRequestToHMI(
+ const VehicleDataList& subscriptions) {
+ sync_primitives::AutoLock lock(pending_resumption_lock_);
+ using namespace application_manager;
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ for (const auto& ivi_data : subscriptions) {
+ msg_params[ivi_data] = true;
+ }
+
+ smart_objects::SmartObjectSPtr request =
+ application_manager::MessageHelper::CreateModuleInfoSO(
+ VehicleInfo_SubscribeVehicleData, application_manager_);
+ (*request)[strings::msg_params] = msg_params;
+
+ return request;
+}
+
+smart_objects::SmartObject
+VehicleInfoPendingResumptionHandler::CreateFakeResponseFromHMI(
+ const std::map<std::string, smart_objects::SmartObject>& subscriptions,
+ const uint32_t fake_corrlation_id) {
+ SDL_LOG_AUTO_TRACE();
+ namespace strings = application_manager::strings;
+
+ auto response =
+ application_manager::MessageHelper::CreateResponseMessageFromHmi(
+ VehicleInfo_SubscribeVehicleData,
+ fake_corrlation_id,
+ hmi_apis::Common_Result::SUCCESS);
+ auto& message = *response;
+ smart_objects::SmartObject msg_params(smart_objects::SmartType_Map);
+ for (const auto& subscription : subscriptions) {
+ msg_params[subscription.first] = subscription.second;
+ SDL_LOG_DEBUG("fake response data : "
+ << subscription.first << " result = "
+ << subscription.second[strings::result_code].asInt());
+ }
+
+ message[strings::msg_params] = msg_params;
+ return *response;
+}
+
+bool VehicleInfoPendingResumptionHandler::PendingSubscriptionsResumption::
+ IsSuccessfullyDone() const {
+ return requested_vehicle_data_.size() == restored_vehicle_data_.size();
+}
+
+bool VehicleInfoPendingResumptionHandler::PendingSubscriptionsResumption::
+ DataWasRequested(const std::string& vd) const {
+ bool result =
+ (requested_vehicle_data_.end() != requested_vehicle_data_.find(vd));
+ return result;
+}
+
+VehicleInfoPendingResumptionHandler::VehicleDataList
+VehicleInfoPendingResumptionHandler::PendingSubscriptionsResumption::
+ NotSubscribedData() const {
+ VehicleDataList not_subscribed;
+ boost::set_difference(requested_vehicle_data_,
+ restored_vehicle_data_,
+ std::inserter(not_subscribed, not_subscribed.end()));
+ return not_subscribed;
+}
+
+void VehicleInfoPendingResumptionHandler::PendingSubscriptionsResumption::
+ FillSubscriptionResults() {
+ namespace strings = application_manager::strings;
+ for (const auto& key : restored_vehicle_data_) {
+ smart_objects::SmartObject vd_result(smart_objects::SmartType_Map);
+ vd_result[strings::result_code] =
+ hmi_apis::Common_VehicleDataResultCode::VDRC_SUCCESS;
+ subscription_results_[key] = vd_result;
+ }
+
+ const auto not_subscribed = NotSubscribedData();
+ for (const auto& key : not_subscribed) {
+ smart_objects::SmartObject vd_result(smart_objects::SmartType_Map);
+ vd_result[strings::result_code] =
+ hmi_apis::Common_VehicleDataResultCode::VDRC_DATA_NOT_SUBSCRIBED;
+ subscription_results_[key] = vd_result;
+ }
+}
+
+void VehicleInfoPendingResumptionHandler::PendingSubscriptionsResumption::
+ FillRestoredData(const VehicleDataList& successful_subscriptions) {
+ for (auto& subscribed : successful_subscriptions) {
+ if (DataWasRequested(subscribed)) {
+ restored_vehicle_data_.insert(subscribed);
+ }
+ }
+}
+
+void VehicleInfoPendingResumptionHandler::PendingSubscriptionsResumption::
+ FillSubscriptionResults(const smart_objects::SmartObject& response) {
+ SDL_LOG_AUTO_TRACE();
+ using namespace application_manager;
+
+ auto successful_subscriptions = SuccessfulSubscriptionsFromResponse(response);
+
+ SDL_LOG_DEBUG("Requested data : " << Stringify(requested_vehicle_data_));
+ SDL_LOG_DEBUG("Successful subscription in response : "
+ << Stringify(successful_subscriptions));
+
+ FillRestoredData(successful_subscriptions);
+
+ SDL_LOG_DEBUG("Restored data : " << Stringify(restored_vehicle_data_));
+
+ FillSubscriptionResults();
+
+ auto msg_params = response[strings::msg_params];
+ auto keys = msg_params.enumerate();
+ for (auto key : keys) {
+ if (DataWasRequested(key)) {
+ subscription_results_[key] = msg_params[key];
+ }
+ }
+}
+
+} // namespace vehicle_info_plugin
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 3e8ef6b29d..1a357a86ee 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
@@ -33,20 +33,38 @@
#include "vehicle_info_plugin/vehicle_info_plugin.h"
#include "application_manager/message_helper.h"
#include "application_manager/plugin_manager/plugin_keys.h"
+#include "application_manager/resumption/resumption_data_processor.h"
#include "application_manager/rpc_handler.h"
#include "application_manager/smart_object_keys.h"
#include "vehicle_info_plugin/custom_vehicle_data_manager_impl.h"
#include "vehicle_info_plugin/vehicle_info_app_extension.h"
#include "vehicle_info_plugin/vehicle_info_command_factory.h"
+#include "vehicle_info_plugin/vehicle_info_pending_resumption_handler.h"
namespace vehicle_info_plugin {
-CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
+SDL_CREATE_LOG_VARIABLE("VehicleInfoPlugin")
namespace strings = application_manager::strings;
namespace plugins = application_manager::plugin_manager;
namespace commands = application_manager::commands;
-VehicleInfoPlugin::VehicleInfoPlugin() : application_manager_(nullptr) {}
+bool IsSubscribedAppExist(
+ const std::string& ivi,
+ const application_manager::ApplicationManager& app_manager) {
+ SDL_LOG_AUTO_TRACE();
+ auto apps_accessor = app_manager.applications();
+
+ for (auto& app : apps_accessor.GetData()) {
+ auto& ext = VehicleInfoAppExtension::ExtractVIExtension(*app);
+ if (ext.isSubscribedToVehicleInfo(ivi)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+VehicleInfoPlugin::VehicleInfoPlugin()
+ : application_manager_(nullptr), pending_resumption_handler_(nullptr) {}
bool VehicleInfoPlugin::Init(
application_manager::ApplicationManager& app_manager,
@@ -58,6 +76,9 @@ bool VehicleInfoPlugin::Init(
application_manager_ = &app_manager;
custom_vehicle_data_manager_.reset(
new CustomVehicleDataManagerImpl(policy_handler, rpc_service));
+ pending_resumption_handler_ =
+ std::make_shared<VehicleInfoPendingResumptionHandler>(
+ app_manager, *custom_vehicle_data_manager_);
command_factory_.reset(new vehicle_info_plugin::VehicleInfoCommandFactory(
app_manager,
rpc_service,
@@ -107,6 +128,7 @@ void VehicleInfoPlugin::OnPolicyEvent(plugins::PolicyEvent event) {
void VehicleInfoPlugin::OnApplicationEvent(
plugins::ApplicationEvent event,
app_mngr::ApplicationSharedPtr application) {
+ SDL_LOG_AUTO_TRACE();
if (plugins::ApplicationEvent::kApplicationRegistered == event) {
application->AddExtension(
std::make_shared<VehicleInfoAppExtension>(*this, *application));
@@ -117,7 +139,7 @@ void VehicleInfoPlugin::OnApplicationEvent(
}
void VehicleInfoPlugin::UnsubscribeFromRemovedVDItems() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
typedef std::vector<std::string> StringsVector;
auto get_items_to_unsubscribe = [this]() -> StringsVector {
@@ -125,16 +147,15 @@ void VehicleInfoPlugin::UnsubscribeFromRemovedVDItems() {
auto applications = application_manager_->applications();
for (auto& app : applications.GetData()) {
auto& ext = VehicleInfoAppExtension::ExtractVIExtension(*app);
- auto subscription_names = ext.Subscriptions();
+ auto subscription_names = ext.Subscriptions().GetData();
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");
+ SDL_LOG_DEBUG("Vehicle data item "
+ << subscription_name
+ << " has been removed by policy");
output_items_list.push_back(subscription_name);
}
}
@@ -146,7 +167,7 @@ void VehicleInfoPlugin::UnsubscribeFromRemovedVDItems() {
const StringsVector items_to_unsubscribe = get_items_to_unsubscribe();
if (items_to_unsubscribe.empty()) {
- LOG4CXX_DEBUG(logger_, "There is no data to unsubscribe");
+ SDL_LOG_DEBUG("There is no data to unsubscribe");
return;
}
@@ -156,26 +177,78 @@ void VehicleInfoPlugin::UnsubscribeFromRemovedVDItems() {
void VehicleInfoPlugin::ProcessResumptionSubscription(
application_manager::Application& app, VehicleInfoAppExtension& ext) {
- LOG4CXX_AUTO_TRACE(logger_);
- smart_objects::SmartObject msg_params =
- 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");
+ SDL_LOG_AUTO_TRACE();
+
+ pending_resumption_handler_->HandleResumptionSubscriptionRequest(ext, app);
+}
+
+void VehicleInfoPlugin::RevertResumption(
+ application_manager::Application& app,
+ const std::set<std::string>& list_of_subscriptions) {
+ SDL_LOG_AUTO_TRACE();
+ UNUSED(app);
+
+ pending_resumption_handler_->OnResumptionRevert();
+ std::set<std::string> subscriptions_to_revert;
+ for (auto& ivi_data : list_of_subscriptions) {
+ if (!IsSubscribedAppExist(ivi_data, *application_manager_) &&
+ !IsAnyPendingSubscriptionExist(ivi_data)) {
+ subscriptions_to_revert.insert(ivi_data);
+ }
+ }
+
+ if (subscriptions_to_revert.empty()) {
+ SDL_LOG_DEBUG("No data to unsubscribe");
return;
}
+ const auto request = CreateUnsubscriptionRequest(subscriptions_to_revert);
+ application_manager_->GetRPCService().ManageHMICommand(request);
+}
- for (const auto& item : subscriptions) {
- msg_params[item] = true;
+smart_objects::SmartObjectSPtr VehicleInfoPlugin::CreateSubscriptionRequest(
+ const std::set<std::string>& list_of_subscriptions) {
+ SDL_LOG_AUTO_TRACE();
+ auto msg_params = smart_objects::SmartObject(smart_objects::SmartType_Map);
+ for (auto& ivi_data : list_of_subscriptions) {
+ msg_params[ivi_data] = true;
}
- smart_objects::SmartObjectSPtr request =
- application_manager::MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData,
- *application_manager_);
+ auto request = application_manager::MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData,
+ *application_manager_);
(*request)[strings::msg_params] = msg_params;
- application_manager_->GetRPCService().ManageHMICommand(request);
+ return request;
+}
+
+smart_objects::SmartObjectSPtr VehicleInfoPlugin::CreateUnsubscriptionRequest(
+ const std::set<std::string>& list_of_subscriptions) {
+ SDL_LOG_AUTO_TRACE();
+ auto msg_params = smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ for (auto& ivi_data : list_of_subscriptions) {
+ msg_params[ivi_data] = true;
+ }
+
+ auto request = application_manager::MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData,
+ *application_manager_);
+ (*request)[strings::msg_params] = msg_params;
+
+ return request;
+}
+
+bool VehicleInfoPlugin::IsAnyPendingSubscriptionExist(const std::string& ivi) {
+ SDL_LOG_AUTO_TRACE();
+ auto apps_accessor = application_manager_->applications();
+
+ for (auto& app : apps_accessor.GetData()) {
+ auto& ext = VehicleInfoAppExtension::ExtractVIExtension(*app);
+ if (ext.isPendingSubscriptionToVehicleInfo(ivi)) {
+ return true;
+ }
+ }
+
+ return false;
}
application_manager::ApplicationSharedPtr FindAppSubscribedToIVI(
@@ -194,7 +267,7 @@ application_manager::ApplicationSharedPtr FindAppSubscribedToIVI(
smart_objects::SmartObjectSPtr VehicleInfoPlugin::GetUnsubscribeIVIRequest(
const std::vector<std::string>& ivi_names) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace smart_objects;
auto msg_params = smart_objects::SmartObject(smart_objects::SmartType_Map);
@@ -242,7 +315,7 @@ smart_objects::SmartObjectSPtr VehicleInfoPlugin::GetUnsubscribeIVIRequest(
void VehicleInfoPlugin::DeleteSubscriptions(
application_manager::ApplicationSharedPtr app) {
auto& ext = VehicleInfoAppExtension::ExtractVIExtension(*app);
- auto subscriptions = ext.Subscriptions();
+ auto subscriptions = ext.Subscriptions().GetData();
std::vector<std::string> ivi_to_unsubscribe;
for (auto& ivi : subscriptions) {
ext.unsubscribeFromVehicleInfo(ivi);
@@ -262,12 +335,12 @@ void VehicleInfoPlugin::DeleteSubscriptions(
extern "C" __attribute__((visibility("default")))
application_manager::plugin_manager::RPCPlugin*
-Create() {
+Create(logger::Logger* logger_instance) {
+ logger::Logger::instance(logger_instance);
return new vehicle_info_plugin::VehicleInfoPlugin();
}
extern "C" __attribute__((visibility("default"))) void Delete(
application_manager::plugin_manager::RPCPlugin* data) {
delete data;
- DELETE_THREAD_LOGGER(vehicle_info_plugin::logger_);
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/CMakeLists.txt b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/CMakeLists.txt
index a8193c17f0..c9697d71f2 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/CMakeLists.txt
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/CMakeLists.txt
@@ -52,6 +52,7 @@ file(GLOB SOURCES
${COMMANDS_TEST_DIR}/mobile/*
${CMAKE_CURRENT_SOURCE_DIR}/custom_vehicle_data_manager_test.cc
${CMAKE_CURRENT_SOURCE_DIR}/vehicle_data_item_schema_test.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/vehicle_info_pending_resumption_test.cc
${COMPONENTS_DIR}/application_manager/src/message.cc
${COMPONENTS_DIR}/application_manager/src/event_engine/*
${COMPONENTS_DIR}/resumption/src/last_state_wrapper_impl.cc
@@ -60,7 +61,6 @@ file(GLOB SOURCES
set(LIBRARIES
gmock
Utils
- SmartObjects
HMI_API
MOBILE_API
connectionHandler
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_get_vehicle_data_response_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_get_vehicle_data_response_test.cc
index ea8dab0366..48df3d03bd 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_get_vehicle_data_response_test.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_get_vehicle_data_response_test.cc
@@ -70,7 +70,7 @@ typedef std::shared_ptr<VIGetVehicleDataResponse> VIGetVehicleDataResponsePtr;
namespace {
const uint32_t kConnectionKey = 2u;
const uint32_t kCorrelationId = 1u;
-const std::string kStrNumber = "123";
+const std::string kStrNumber{"123"};
} // namespace
class VIGetVehicleDataResponseTest
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_get_vehicle_type_request_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_get_vehicle_type_request_test.cc
new file mode 100644
index 0000000000..20bf34f2ca
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_get_vehicle_type_request_test.cc
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "hmi/vi_get_vehicle_type_request.h"
+
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/request_to_hmi.h"
+#include "application_manager/smart_object_keys.h"
+#include "smart_objects/smart_object.h"
+#include "vehicle_info_plugin/commands/vi_command_request_test.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace vi_get_vehicle_type_request {
+
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::CommandImpl;
+using ::testing::_;
+using vehicle_info_plugin::commands::VIGetVehicleTypeRequest;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kStrNumber{"123"};
+} // namespace
+
+class VIGetVehicleTypeRequestTest
+ : public VICommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ auto command_msg = CreateMessage(smart_objects::SmartType_Map);
+ (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ return command_msg;
+ }
+};
+
+TEST_F(VIGetVehicleTypeRequestTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ auto command = CreateCommandVI<VIGetVehicleTypeRequest>(command_msg);
+
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
+TEST_F(
+ VIGetVehicleTypeRequestTest,
+ onTimeOut_VIGetVehicleTypeRequestTimeoutExpired_UpdateRequestsRequiredForVIGetVehicleType) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
+ auto command(CreateCommandVI<VIGetVehicleTypeRequest>(command_msg));
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+ command->onTimeOut();
+}
+
+} // namespace vi_get_vehicle_type_request
+} // namespace hmi_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_get_vehicle_type_response_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_get_vehicle_type_response_test.cc
new file mode 100644
index 0000000000..8239905df7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_get_vehicle_type_response_test.cc
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "hmi/vi_get_vehicle_type_response.h"
+
+#include <memory>
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/application.h"
+#include "application_manager/commands/commands_test.h"
+#include "application_manager/commands/response_from_hmi.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_hmi_capabilities.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/smart_object_keys.h"
+#include "smart_objects/smart_object.h"
+#include "vehicle_info_plugin/commands/vi_command_request_test.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace hmi_commands_test {
+namespace vi_get_vehicle_type_response {
+
+using ::testing::_;
+using ::testing::NiceMock;
+using ::testing::Return;
+namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+namespace hmi_response = am::hmi_response;
+namespace hmi_interface = ::application_manager::hmi_interface;
+using vehicle_info_plugin::commands::VIGetVehicleTypeResponse;
+
+typedef std::shared_ptr<VIGetVehicleTypeResponse> VIGetVehicleTypeResponsePtr;
+typedef NiceMock<
+ ::test::components::application_manager_test::MockHMICapabilities>
+ MockHMICapabilities;
+
+namespace {
+const uint32_t kConnectionKey = 2u;
+const std::string kVehicleType{"vehicle_type"};
+} // namespace
+
+class VIGetVehicleTypeResponseTest
+ : public VICommandRequestTest<CommandsTestMocks::kIsNice> {};
+
+TEST_F(VIGetVehicleTypeResponseTest,
+ RUN_ResultCodeSuccess_ChangeHMICapabilities) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::params][hmi_response::vehicle_type] = kVehicleType;
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+
+ VIGetVehicleTypeResponsePtr command =
+ CreateCommandVI<VIGetVehicleTypeResponse>(command_msg);
+
+ EXPECT_CALL(
+ mock_hmi_capabilities_,
+ set_vehicle_type(
+ (*command_msg)[strings::msg_params][hmi_response::vehicle_type]));
+ EXPECT_CALL(mock_hmi_capabilities_,
+ SaveCachedCapabilitiesToFile(hmi_interface::vehicle_info, _, _));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+ EXPECT_TRUE((*command_msg)[am::strings::msg_params].keyExists(
+ hmi_response::vehicle_type));
+}
+
+TEST_F(VIGetVehicleTypeResponseTest,
+ RUN_ResultCodeNotSuccess_DontChangeHMICapabilities) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+ (*command_msg)[strings::params][hmi_response::vehicle_type] = kVehicleType;
+
+ VIGetVehicleTypeResponsePtr command =
+ CreateCommandVI<VIGetVehicleTypeResponse>(command_msg);
+
+ EXPECT_CALL(mock_hmi_capabilities_, set_vehicle_type(_)).Times(0);
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+
+ EXPECT_FALSE((*command_msg)[am::strings::msg_params].keyExists(
+ hmi_response::vehicle_type));
+}
+
+TEST_F(VIGetVehicleTypeResponseTest,
+ onTimeOut_Run_ResponseForInterface_ReceivedError) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::ABORTED;
+
+ VIGetVehicleTypeResponsePtr command =
+ CreateCommandVI<VIGetVehicleTypeResponse>(command_msg);
+
+ EXPECT_CALL(mock_hmi_capabilities_,
+ UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+}
+
+} // namespace vi_get_vehicle_type_response
+} // namespace hmi_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_is_ready_request_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_is_ready_request_test.cc
index c083bf4d60..f207faad77 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_is_ready_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/hmi/vi_is_ready_request_test.cc
@@ -32,6 +32,9 @@
#include "hmi/vi_is_ready_request.h"
+#include <memory>
+#include <set>
+
#include "gtest/gtest.h"
#include "application_manager/event_engine/event.h"
@@ -55,25 +58,32 @@ using ::testing::_;
using ::testing::Return;
using ::testing::ReturnRef;
namespace am = ::application_manager;
+namespace strings = ::application_manager::strings;
+using am::commands::CommandImpl;
using am::commands::MessageSharedPtr;
+using am::commands::RequestToHMI;
using am::event_engine::Event;
using vehicle_info_plugin::commands::VIIsReadyRequest;
typedef std::shared_ptr<VIIsReadyRequest> VIIsReadyRequestPtr;
+namespace {
+const uint32_t kConnectionKey = 2u;
+} // namespace
+
class VIIsReadyRequestTest
: public VICommandRequestTest<CommandsTestMocks::kIsNice> {
public:
VIIsReadyRequestTest() : command_(CreateCommandVI<VIIsReadyRequest>()) {}
void SetUpExpectations(bool is_vi_cooperating_available,
- bool is_send_message_to_hmi,
- bool is_message_contain_param,
+ bool should_message_be_sent,
+ bool message_contains_param,
am::HmiInterfaces::InterfaceState state) {
EXPECT_CALL(mock_hmi_capabilities_,
set_is_ivi_cooperating(is_vi_cooperating_available));
- if (is_message_contain_param) {
+ if (message_contains_param) {
EXPECT_CALL(app_mngr_, hmi_interfaces())
.WillRepeatedly(ReturnRef(mock_hmi_interfaces_));
EXPECT_CALL(mock_hmi_interfaces_,
@@ -90,7 +100,7 @@ class VIIsReadyRequestTest
GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VehicleInfo))
.WillOnce(Return(state));
- if (is_send_message_to_hmi) {
+ if (should_message_be_sent) {
ExpectSendMessagesToHMI();
}
}
@@ -104,61 +114,102 @@ class VIIsReadyRequestTest
EXPECT_CALL(mock_rpc_service_, ManageHMICommand(ivi_type, _));
}
- void PrepareEvent(bool is_message_contain_param,
- Event& event,
- bool is_vi_cooperating_available = false) {
+ void PrepareEvent(bool message_contains_param,
+ bool is_vi_cooperating_available,
+ Event& out_event) {
MessageSharedPtr msg = CreateMessage(smart_objects::SmartType_Map);
- if (is_message_contain_param) {
+ if (message_contains_param) {
(*msg)[am::strings::msg_params][am::strings::available] =
is_vi_cooperating_available;
}
- event.set_smart_object(*msg);
+ out_event.set_smart_object(*msg);
+ }
+
+ void HMICapabilitiesExpectations() {
+ EXPECT_CALL(mock_hmi_capabilities_,
+ IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType))
+ .WillOnce(Return(true));
}
VIIsReadyRequestPtr command_;
};
+TEST_F(VIIsReadyRequestTest, RUN_SendRequest_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ VIIsReadyRequestPtr command = CreateCommandVI<VIIsReadyRequest>(command_msg);
+ EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
+ ASSERT_TRUE(command->Init());
+
+ command->Run();
+
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
+}
+
TEST_F(VIIsReadyRequestTest, Run_NoKeyAvailableInMessage_HmiInterfacesIgnored) {
const bool is_vi_cooperating_available = false;
- const bool is_send_message_to_hmi = true;
- const bool is_message_contain_param = false;
+ const bool should_message_be_sent = true;
+ const bool message_contains_param = false;
+ const auto state = am::HmiInterfaces::STATE_NOT_RESPONSE;
Event event(hmi_apis::FunctionID::VehicleInfo_IsReady);
- PrepareEvent(is_message_contain_param, event);
+ PrepareEvent(message_contains_param, is_vi_cooperating_available, event);
+ HMICapabilitiesExpectations();
SetUpExpectations(is_vi_cooperating_available,
- is_send_message_to_hmi,
- is_message_contain_param,
- am::HmiInterfaces::STATE_NOT_RESPONSE);
+ should_message_be_sent,
+ message_contains_param,
+ state);
+ ASSERT_TRUE(command_->Init());
+
+ command_->Run();
command_->on_event(event);
}
TEST_F(VIIsReadyRequestTest, Run_KeyAvailableEqualToFalse_StateNotAvailable) {
const bool is_vi_cooperating_available = false;
- const bool is_send_message_to_hmi = false;
- const bool is_message_contain_param = true;
+ const bool should_message_be_sent = false;
+ const bool message_contains_param = true;
+ const auto state = am::HmiInterfaces::STATE_NOT_AVAILABLE;
Event event(hmi_apis::FunctionID::VehicleInfo_IsReady);
- PrepareEvent(is_message_contain_param, event);
+ PrepareEvent(message_contains_param, is_vi_cooperating_available, event);
SetUpExpectations(is_vi_cooperating_available,
- is_send_message_to_hmi,
- is_message_contain_param,
- am::HmiInterfaces::STATE_NOT_AVAILABLE);
+ should_message_be_sent,
+ message_contains_param,
+ state);
+ ASSERT_TRUE(command_->Init());
+
+ command_->Run();
command_->on_event(event);
}
TEST_F(VIIsReadyRequestTest, Run_KeyAvailableEqualToTrue_StateAvailable) {
const bool is_vi_cooperating_available = true;
- const bool is_send_message_to_hmi = true;
- const bool is_message_contain_param = true;
+ const bool should_message_be_sent = true;
+ const bool message_contains_param = true;
+ const auto state = am::HmiInterfaces::STATE_AVAILABLE;
Event event(hmi_apis::FunctionID::VehicleInfo_IsReady);
- PrepareEvent(is_message_contain_param, event, is_vi_cooperating_available);
+ HMICapabilitiesExpectations();
+ PrepareEvent(message_contains_param, is_vi_cooperating_available, event);
SetUpExpectations(is_vi_cooperating_available,
- is_send_message_to_hmi,
- is_message_contain_param,
- am::HmiInterfaces::STATE_AVAILABLE);
+ should_message_be_sent,
+ message_contains_param,
+ state);
+ ASSERT_TRUE(command_->Init());
+
+ command_->Run();
command_->on_event(event);
}
TEST_F(VIIsReadyRequestTest, Run_HMIDoestRespond_SendMessageToHMIByTimeout) {
+ HMICapabilitiesExpectations();
ExpectSendMessagesToHMI();
+ ASSERT_TRUE(command_->Init());
+
+ command_->Run();
command_->onTimeOut();
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/subscribe_vehicle_request_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/subscribe_vehicle_request_test.cc
new file mode 100644
index 0000000000..0d1b8a74c7
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/subscribe_vehicle_request_test.cc
@@ -0,0 +1,346 @@
+/*
+ Copyright (c) 2020, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "application_manager/commands/command_request_test.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_message_helper.h"
+#include "mobile/subscribe_vehicle_data_request.h"
+#include "resumption/last_state_wrapper_impl.h"
+#include "resumption/mock_last_state.h"
+#include "vehicle_info_plugin/commands/vi_command_request_test.h"
+#include "vehicle_info_plugin/vehicle_info_app_extension.h"
+#include "vehicle_info_plugin/vehicle_info_plugin.h"
+
+#include "application_manager/mock_rpc_handler.h"
+
+namespace test {
+namespace components {
+namespace commands_test {
+namespace mobile_commands_test {
+namespace subscribe_vehicle_data_request {
+
+namespace am = ::application_manager;
+namespace mobile_result = mobile_apis::Result;
+
+using ::testing::_;
+
+using am::commands::MessageSharedPtr;
+using vehicle_info_plugin::commands::SubscribeVehicleDataRequest;
+
+typedef std::shared_ptr<SubscribeVehicleDataRequest> CommandPtr;
+
+namespace {
+const uint32_t kConnectionKey = 1u;
+const std::string kMsgParamKey = "test_key";
+const mobile_apis::VehicleDataType::eType kVehicleType =
+ mobile_apis::VehicleDataType::VEHICLEDATA_WINDOWSTATUS;
+const std::string kVehicleTypeStr = am::strings::window_status;
+} // namespace
+
+class SubscribeVehicleRequestTest
+ : public VICommandRequestTest<CommandsTestMocks::kIsNice> {
+ public:
+ SubscribeVehicleRequestTest()
+ : mock_app_(CreateMockApp())
+ , vi_app_extension_ptr_(
+ std::make_shared<vehicle_info_plugin::VehicleInfoAppExtension>(
+ vi_plugin_, *mock_app_))
+ , app_set_lock_ptr_(std::make_shared<sync_primitives::Lock>())
+ , mock_last_state_(std::make_shared<resumption::LastStateWrapperImpl>(
+ std::make_shared<resumption_test::MockLastState>())) {}
+
+ protected:
+ void SubscribeSuccessfully();
+ void SetUp() OVERRIDE {
+ ON_CALL(app_mngr_, GetRPCHandler())
+ .WillByDefault(ReturnRef(mock_rpc_handler_));
+ ON_CALL(app_mngr_, event_dispatcher())
+ .WillByDefault(ReturnRef(event_dispatcher_));
+
+ vi_plugin_.Init(app_mngr_,
+ mock_rpc_service_,
+ mock_hmi_capabilities_,
+ mock_policy_handler_,
+ mock_last_state_);
+ ON_CALL(*mock_app_, AddExtension(vi_app_extension_ptr_));
+ vi_plugin_.OnApplicationEvent(application_manager::plugin_manager::
+ ApplicationEvent::kApplicationRegistered,
+ mock_app_);
+ ON_CALL(*mock_app_,
+ QueryInterface(vehicle_info_plugin::VehicleInfoAppExtension::
+ VehicleInfoAppExtensionUID))
+ .WillByDefault(Return(vi_app_extension_ptr_));
+ ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
+ }
+
+ MockAppPtr mock_app_;
+ application_manager::AppExtensionPtr vi_app_extension_ptr_;
+ std::shared_ptr<sync_primitives::Lock> app_set_lock_ptr_;
+ vehicle_info_plugin::VehicleInfoPlugin vi_plugin_;
+ application_manager_test::MockRPCHandler mock_rpc_handler_;
+ resumption::LastStateWrapperPtr mock_last_state_;
+};
+
+TEST_F(SubscribeVehicleRequestTest, Run_AppNotRegistered_UNSUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ CommandPtr command(CreateCommandVI<SubscribeVehicleDataRequest>(command_msg));
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(ApplicationSharedPtr()));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(
+ MobileResultCodeIs(mobile_result::APPLICATION_NOT_REGISTERED), _));
+
+ ASSERT_TRUE(command->Init());
+ command->Run();
+}
+
+TEST_F(SubscribeVehicleRequestTest, Run_DataToSubscribeIsNotExisted_UNSUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*command_msg)[am::strings::msg_params][am::strings::button_name] =
+ kVehicleTypeStr;
+
+ am::VehicleData empty_data;
+ EXPECT_CALL(mock_message_helper_, vehicle_data())
+ .WillRepeatedly(ReturnRef(empty_data));
+
+ smart_objects::SmartObject empty_hmi_custom_params;
+ const std::set<std::string> hmi_message_params;
+ ON_CALL(mock_custom_vehicle_data_manager_,
+ CreateHMIMessageParams(hmi_message_params))
+ .WillByDefault(Return(empty_hmi_custom_params));
+
+ CommandPtr command(CreateCommandVI<SubscribeVehicleDataRequest>(command_msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ ASSERT_TRUE(command->Init());
+ command->Run();
+}
+
+TEST_F(SubscribeVehicleRequestTest,
+ Run_EmptyVehicleData_INVALID_DATA_SentToMobile) {
+ am::VehicleData vehicle_data;
+ EXPECT_CALL(mock_message_helper_, vehicle_data())
+ .WillRepeatedly(ReturnRef(vehicle_data));
+
+ smart_objects::SmartObject empty_hmi_custom_params;
+ const std::set<std::string> hmi_message_params;
+ ON_CALL(mock_custom_vehicle_data_manager_,
+ CreateHMIMessageParams(hmi_message_params))
+ .WillByDefault(Return(empty_hmi_custom_params));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*command_msg)[am::strings::msg_params][kMsgParamKey] = false;
+ CommandPtr command(CreateCommandVI<SubscribeVehicleDataRequest>(command_msg));
+ ASSERT_TRUE(command->Init());
+ command->Run();
+}
+
+TEST_F(SubscribeVehicleRequestTest,
+ Run_SubscribeDataNotIncludedToRequest_UNSUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+
+ smart_objects::SmartObject empty_hmi_custom_params;
+ const std::set<std::string> hmi_message_params;
+ ON_CALL(mock_custom_vehicle_data_manager_,
+ CreateHMIMessageParams(hmi_message_params))
+ .WillByDefault(Return(empty_hmi_custom_params));
+
+ CommandPtr command(CreateCommandVI<SubscribeVehicleDataRequest>(command_msg));
+
+ am::VehicleData vehicle_data;
+ vehicle_data.insert(am::VehicleData::value_type(kMsgParamKey, kVehicleType));
+ EXPECT_CALL(mock_message_helper_, vehicle_data())
+ .WillRepeatedly(ReturnRef(vehicle_data));
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillOnce(Return(mock_app_));
+
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::INVALID_DATA), _));
+
+ ASSERT_TRUE(command->Init());
+ command->Run();
+}
+
+TEST_F(SubscribeVehicleRequestTest, Run_Subscribe_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*command_msg)[am::strings::msg_params]
+ [application_manager::strings::window_status] = true;
+
+ CommandPtr command(CreateCommandVI<SubscribeVehicleDataRequest>(command_msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(mock_app_));
+ EXPECT_CALL(app_mngr_, hmi_interfaces())
+ .WillRepeatedly(ReturnRef(mock_hmi_interfaces_));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_VehicleInfo))
+ .WillRepeatedly(Return(
+ application_manager::HmiInterfaces::InterfaceState::STATE_AVAILABLE));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
+ .WillRepeatedly(Return(
+ application_manager::HmiInterfaces::InterfaceState::STATE_AVAILABLE));
+ EXPECT_CALL(mock_hmi_interfaces_,
+ GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_SDL))
+ .WillRepeatedly(Return(
+ application_manager::HmiInterfaces::InterfaceState::STATE_AVAILABLE));
+ am::VehicleData vehicle_data;
+ EXPECT_CALL(mock_message_helper_, vehicle_data())
+ .WillRepeatedly(ReturnRef(vehicle_data));
+
+ application_manager::ApplicationSet app_set = {mock_app_};
+ DataAccessor<application_manager::ApplicationSet> accessor(app_set,
+ app_set_lock_ptr_);
+ EXPECT_CALL(app_mngr_, applications()).WillRepeatedly(Return(accessor));
+ EXPECT_CALL(mock_rpc_service_,
+ ManageHMICommand(
+ HMIResultCodeIs(
+ hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData),
+ _));
+
+ ASSERT_TRUE(command->Init());
+ command->Run();
+}
+
+TEST_F(SubscribeVehicleRequestTest, OnEvent_WrongEvent_FAIL) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*command_msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*command_msg)[am::strings::msg_params]
+ [application_manager::strings::window_status] = true;
+ CommandPtr command(CreateCommandVI<SubscribeVehicleDataRequest>(command_msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(mock_app_));
+
+ am::event_engine::Event test_event(
+ hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData);
+ test_event.set_smart_object(*command_msg);
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey)).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ ASSERT_TRUE(command->Init());
+ command->on_event(test_event);
+}
+
+TEST_F(SubscribeVehicleRequestTest, OnEvent_AppNotRegistered_FAIL) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*command_msg)[am::strings::params][am::hmi_response::code] =
+ hmi_apis::Common_Result::SUCCESS;
+ (*command_msg)[am::strings::msg_params]
+ [application_manager::strings::window_status] = true;
+ CommandPtr command(CreateCommandVI<SubscribeVehicleDataRequest>(command_msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(nullptr));
+
+ am::event_engine::Event test_event(
+ hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData);
+ test_event.set_smart_object(*command_msg);
+
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0);
+ ASSERT_TRUE(command->Init());
+ command->on_event(test_event);
+}
+
+TEST_F(SubscribeVehicleRequestTest, OnEvent_DataSubscribed_SUCCESS) {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ (*command_msg)[am::strings::msg_params]
+ [application_manager::strings::window_status] = true;
+ CommandPtr command(CreateCommandVI<SubscribeVehicleDataRequest>(command_msg));
+
+ EXPECT_CALL(app_mngr_, application(kConnectionKey))
+ .WillRepeatedly(Return(mock_app_));
+ am::event_engine::Event test_event(
+ hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData);
+ SmartObject message(smart_objects::SmartType_Map);
+ const hmi_apis::Common_Result::eType hmi_result =
+ hmi_apis::Common_Result::SUCCESS;
+ message[am::strings::params][am::hmi_response::code] = hmi_result;
+ message[am::strings::msg_params][kVehicleTypeStr] = true;
+ test_event.set_smart_object(message);
+
+ am::VehicleData vehicle_data;
+ vehicle_data.insert(am::VehicleData::value_type(
+ kVehicleTypeStr, mobile_apis::VehicleDataType::VEHICLEDATA_WINDOWSTATUS));
+ EXPECT_CALL(mock_message_helper_, vehicle_data())
+ .WillRepeatedly(ReturnRef(vehicle_data));
+ EXPECT_CALL(
+ mock_rpc_service_,
+ ManageMobileCommand(MobileResultCodeIs(mobile_result::SUCCESS), _));
+
+ ASSERT_TRUE(command->Init());
+ command->on_event(test_event);
+}
+
+} // namespace subscribe_vehicle_data_request
+} // namespace mobile_commands_test
+} // namespace commands_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/unsubscribe_vehicle_request_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/unsubscribe_vehicle_request_test.cc
index 450bb5ac26..d8efb495fc 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/unsubscribe_vehicle_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/unsubscribe_vehicle_request_test.cc
@@ -88,6 +88,8 @@ class UnsubscribeVehicleRequestTest
void SetUp() OVERRIDE {
ON_CALL(app_mngr_, GetRPCHandler())
.WillByDefault(ReturnRef(mock_rpc_handler_));
+ ON_CALL(app_mngr_, event_dispatcher())
+ .WillByDefault(ReturnRef(event_dispatcher_));
vi_plugin_.Init(app_mngr_,
mock_rpc_service_,
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/vehicle_data_item_schema_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/vehicle_data_item_schema_test.cc
index 2443310409..262fef39f6 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/vehicle_data_item_schema_test.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/vehicle_data_item_schema_test.cc
@@ -85,6 +85,7 @@ class VehicleDataItemSchemaTest : public ::testing::Test {
schema.params->mark_initialized();
schema.mandatory = true;
*schema.array = false;
+ *schema.defvalue = "10";
// default value bounds
*schema.minvalue = 10;
*schema.maxvalue = 100;
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/vehicle_info_pending_resumption_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/vehicle_info_pending_resumption_test.cc
new file mode 100644
index 0000000000..5b2f4d5e25
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/vehicle_info_pending_resumption_test.cc
@@ -0,0 +1,696 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE. */
+
+#include <boost/range/algorithm/set_algorithm.hpp>
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/mock_event_observer.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_resume_ctrl.h"
+#include "application_manager/mock_resumption_data_processor.h"
+#include "application_manager/mock_rpc_service.h"
+#include "gtest/gtest.h"
+#include "vehicle_info_plugin/mock_custom_vehicle_data_manager.h"
+#include "vehicle_info_plugin/vehicle_info_pending_resumption_handler.h"
+#include "vehicle_info_plugin/vehicle_info_plugin.h"
+
+namespace vehicle_info_plugin_test {
+using namespace vehicle_info_plugin;
+
+using ::testing::_;
+using ::testing::DoAll;
+using ::testing::Mock;
+using ::testing::NiceMock;
+using ::testing::Return;
+using ::testing::ReturnRef;
+using ::testing::SaveArg;
+
+using application_manager::MockMessageHelper;
+using test::components::resumption_test::MockResumeCtrl;
+using test::components::resumption_test::MockResumptionDataProcessor;
+typedef NiceMock< ::test::components::event_engine_test::MockEventDispatcher>
+ MockEventDispatcher;
+typedef NiceMock< ::test::components::event_engine_test::MockEventObserver>
+ MockEventObserver;
+typedef NiceMock<
+ ::test::components::application_manager_test::MockApplicationManager>
+ MockApplicationManager;
+typedef NiceMock< ::test::components::application_manager_test::MockApplication>
+ MockApplication;
+typedef NiceMock<test::components::application_manager_test::MockRPCService>
+ MockRPCService;
+typedef std::shared_ptr<MockApplication> MockAppPtr;
+typedef std::shared_ptr<vehicle_info_plugin::VehicleInfoAppExtension>
+ VehicleInfoAppExtensionPtr;
+using hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData;
+
+smart_objects::SmartObjectSPtr CreateVDRequest(const uint32_t corr_id) {
+ using namespace application_manager;
+ smart_objects::SmartObjectSPtr request =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+ smart_objects::SmartObject& object = *request;
+ const auto message_type_request = 0;
+ object[strings::params][strings::message_type] = message_type_request;
+ object[strings::params][strings::function_id] =
+ static_cast<int>(VehicleInfo_SubscribeVehicleData);
+
+ object[strings::params][strings::correlation_id] = corr_id;
+ object[strings::msg_params] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ return request;
+}
+
+mobile_apis::VehicleDataType::eType ToVDType(const std::string& vd) {
+ if ("gps" == vd) {
+ return mobile_apis::VehicleDataType::VEHICLEDATA_GPS;
+ }
+ if ("speed" == vd) {
+ return mobile_apis::VehicleDataType::VEHICLEDATA_SPEED;
+ }
+ return mobile_apis::VehicleDataType::VEHICLEDATA_OEM_CUSTOM_DATA;
+}
+
+smart_objects::SmartObject CreateVDError(const uint32_t correlation_id,
+ const int32_t result_code,
+ const std::string& info) {
+ namespace strings = application_manager::strings;
+ namespace hmi_response = application_manager::hmi_response;
+ smart_objects::SmartObject message(smart_objects::SmartType_Map);
+
+ message[strings::params][strings::function_id] =
+ VehicleInfo_SubscribeVehicleData;
+ const auto hmi_protocol_type = 1;
+ message[strings::params][strings::protocol_type] = hmi_protocol_type;
+ message[strings::params][strings::correlation_id] = correlation_id;
+
+ const auto message_type_response = 1;
+ message[strings::params][strings::message_type] = message_type_response;
+ message[strings::params][hmi_response::code] = result_code;
+ message[strings::params][strings::error_msg] = info;
+
+ return message;
+}
+
+smart_objects::SmartObjectSPtr CreateHMIResponseMessage(
+ const hmi_apis::Common_Result::eType common_result,
+ uint32_t correlation_id) {
+ namespace strings = application_manager::strings;
+ namespace hmi_response = application_manager::hmi_response;
+ smart_objects::SmartObject params(smart_objects::SmartType_Map);
+ params[strings::function_id] = VehicleInfo_SubscribeVehicleData;
+ params[strings::message_type] = application_manager::MessageType::kResponse;
+ params[strings::correlation_id] = correlation_id;
+ const auto hmi_protocol_type = 1;
+ params[strings::protocol_type] = hmi_protocol_type;
+ params[hmi_response::code] = common_result;
+
+ smart_objects::SmartObjectSPtr response =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+ auto& message = *response;
+ message[strings::params] = params;
+ message[strings::msg_params] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ return response;
+}
+
+typedef std::map<std::string, hmi_apis::Common_VehicleDataResultCode::eType>
+ VDResponseMap;
+smart_objects::SmartObject CreateVDResponse(
+ const hmi_apis::Common_Result::eType common_result,
+ const VDResponseMap& subscriptions_result,
+ uint32_t correleation_id) {
+ namespace strings = application_manager::strings;
+ namespace hmi_response = application_manager::hmi_response;
+
+ smart_objects::SmartObject msg_params(smart_objects::SmartType_Map);
+ for (const auto& subscription : subscriptions_result) {
+ smart_objects::SmartObject subscription_result(
+ smart_objects::SmartType_Map);
+ subscription_result[strings::data_type] = ToVDType(subscription.first);
+ subscription_result[strings::result_code] = subscription.second;
+ msg_params[subscription.first] = subscription_result;
+ }
+ auto response = CreateHMIResponseMessage(common_result, correleation_id);
+ (*response)[strings::msg_params] = msg_params;
+ return *response;
+}
+
+enum class ContainsPolicy { Strict, Nice };
+
+bool CheckThatMessageContainsVD(
+ const smart_objects::SmartObject& message,
+ const std::set<std::string>& vehicle_data,
+ ContainsPolicy policy = ContainsPolicy::Strict) {
+ using namespace application_manager;
+ auto& msg_params = message[strings::msg_params];
+ auto keys = msg_params.enumerate();
+ std::set<std::string> missed;
+ boost::set_difference(
+ vehicle_data, keys, std::inserter(missed, missed.end()));
+ if (missed.size() > 0) {
+ return false;
+ }
+ if (ContainsPolicy::Strict == policy) {
+ std::set<std::string> redundant;
+ boost::set_difference(
+ keys, vehicle_data, std::inserter(redundant, redundant.end()));
+ if (redundant.size() > 0) {
+ return false;
+ }
+ }
+ return true;
+}
+
+/**
+ * @brief EventCheck check that event contains apropriate vehicle data,
+ * check that is matched correlation id,
+ * check that function id is correct
+ */
+MATCHER_P2(EventCheck, expected_corr_id, vehicle_data, "") {
+ namespace strings = application_manager::strings;
+ const auto& response_message = arg.smart_object();
+ const bool vehicle_data_ok =
+ CheckThatMessageContainsVD(response_message, vehicle_data);
+ const auto cid =
+ response_message[strings::params][strings::correlation_id].asInt();
+ const bool cid_ok = (cid == expected_corr_id);
+ const auto fid =
+ response_message[strings::params][strings::function_id].asInt();
+ const bool fid_ok = (fid == VehicleInfo_SubscribeVehicleData);
+ return fid_ok && cid_ok && vehicle_data_ok;
+}
+
+// Replace correlation id in the message shared pointer with argument specified
+// in template
+ACTION_TEMPLATE(ReplaceCorrelationId,
+ HAS_1_TEMPLATE_PARAMS(int, k),
+ AND_1_VALUE_PARAMS(pointer)) {
+ namespace strings = application_manager::strings;
+ (**pointer)[strings::params][strings::correlation_id] =
+ ::std::tr1::get<k>(args);
+}
+
+class VehicleInfoPendingResumptionHandlerTest : public ::testing::Test {
+ // using namespace vehicle_info_plugin;
+ public:
+ VehicleInfoPendingResumptionHandlerTest()
+ : mock_message_helper_(
+ *application_manager::MockMessageHelper::message_helper_mock())
+ , applications_lock_(std::make_shared<sync_primitives::Lock>())
+ , applications_(application_set_, applications_lock_) {
+ Mock::VerifyAndClearExpectations(&mock_message_helper_);
+ }
+
+ void SetUp() OVERRIDE {
+ ON_CALL(app_manager_mock_, event_dispatcher())
+ .WillByDefault(ReturnRef(event_dispatcher_mock_));
+ ON_CALL(app_manager_mock_, GetRPCService())
+ .WillByDefault(ReturnRef(mock_rpc_service_));
+ ON_CALL(app_manager_mock_, resume_controller())
+ .WillByDefault(ReturnRef(resume_ctrl_mock_));
+ ON_CALL(resume_ctrl_mock_, resumption_data_processor())
+ .WillByDefault(ReturnRef(resumption_data_processor_mock_));
+ EXPECT_CALL(app_manager_mock_, applications())
+ .WillRepeatedly(Return(applications_));
+
+ resumption_handler_.reset(
+ new vehicle_info_plugin::VehicleInfoPendingResumptionHandler(
+ app_manager_mock_, custom_vehicle_data_manager_mock_));
+ MessageHelperResponseCreateExpectation();
+ }
+
+ ~VehicleInfoPendingResumptionHandlerTest() {
+ Mock::VerifyAndClearExpectations(&mock_message_helper_);
+ Mock::VerifyAndClearExpectations(&app_manager_mock_);
+ }
+
+ void MessageHelperResponseCreateExpectation() {
+ const int default_corr_id = 0;
+ static auto response = CreateHMIResponseMessage(
+ hmi_apis::Common_Result::SUCCESS, default_corr_id);
+
+ ON_CALL(mock_message_helper_,
+ CreateResponseMessageFromHmi(VehicleInfo_SubscribeVehicleData,
+ _,
+ hmi_apis::Common_Result::SUCCESS))
+ .WillByDefault(
+ DoAll(ReplaceCorrelationId<1>(&response), Return(response)));
+ }
+
+ MockAppPtr CreateApp(uint32_t app_id) {
+ auto mock_app = std::make_shared<MockApplication>();
+
+ ON_CALL(app_manager_mock_, application(app_id))
+ .WillByDefault(Return(mock_app));
+ ON_CALL(*mock_app, app_id()).WillByDefault(Return(app_id));
+ return mock_app;
+ }
+
+ VehicleInfoAppExtensionPtr CreateExtension(MockApplication& app) {
+ auto ext_ptr = std::make_shared<VehicleInfoAppExtension>(plugin_, app);
+ ON_CALL(app,
+ QueryInterface(VehicleInfoAppExtension::VehicleInfoAppExtensionUID))
+ .WillByDefault(Return(ext_ptr));
+ return ext_ptr;
+ }
+
+ MockMessageHelper& mock_message_helper_;
+ MockApplicationManager app_manager_mock_;
+ NiceMock<MockResumeCtrl> resume_ctrl_mock_;
+ MockResumptionDataProcessor resumption_data_processor_mock_;
+ MockEventDispatcher event_dispatcher_mock_;
+ MockRPCService mock_rpc_service_;
+ NiceMock<MockCustomVehicleDataManager> custom_vehicle_data_manager_mock_;
+ vehicle_info_plugin::VehicleInfoPlugin plugin_;
+ application_manager::ApplicationSet application_set_;
+ std::shared_ptr<sync_primitives::Lock> applications_lock_;
+ DataAccessor<application_manager::ApplicationSet> applications_;
+
+ std::unique_ptr<vehicle_info_plugin::VehicleInfoPendingResumptionHandler>
+ resumption_handler_;
+};
+
+TEST_F(VehicleInfoPendingResumptionHandlerTest, NoSubscriptionNoAction) {
+ auto mock_app = CreateApp(1);
+ auto ext_ptr = CreateExtension(*mock_app);
+
+ EXPECT_CALL(resumption_data_processor_mock_, SubscribeToResponse(_, _))
+ .Times(0);
+ resumption_handler_->HandleResumptionSubscriptionRequest(*ext_ptr, *mock_app);
+}
+
+TEST_F(VehicleInfoPendingResumptionHandlerTest,
+ OneAppSeveralVehicleDataSuccess) {
+ auto mock_app = CreateApp(1);
+ application_set_.insert(mock_app);
+
+ auto ext = CreateExtension(*mock_app);
+ ext->AddPendingSubscription("gps");
+ ext->AddPendingSubscription("speed");
+
+ auto request = CreateVDRequest(1);
+ ON_CALL(mock_message_helper_,
+ CreateModuleInfoSO(VehicleInfo_SubscribeVehicleData, _))
+ .WillByDefault(Return(request));
+
+ resumption::ResumptionRequest resumption_request;
+ EXPECT_CALL(resumption_data_processor_mock_, SubscribeToResponse(_, _))
+ .WillOnce(SaveArg<1>(&resumption_request));
+
+ smart_objects::SmartObjectSPtr message_to_hmi;
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _))
+ .WillOnce(DoAll(SaveArg<0>(&message_to_hmi), Return(true)));
+ resumption_handler_->HandleResumptionSubscriptionRequest(*ext, *mock_app);
+ EXPECT_EQ(resumption_request.request_id.function_id,
+ VehicleInfo_SubscribeVehicleData);
+ EXPECT_TRUE(
+ CheckThatMessageContainsVD(resumption_request.message, {"gps", "speed"}));
+ EXPECT_TRUE(CheckThatMessageContainsVD(*message_to_hmi, {"gps", "speed"}));
+}
+
+TEST_F(VehicleInfoPendingResumptionHandlerTest,
+ OneAppSeveralVehicleDataResponseSuccess) {
+ auto mock_app = CreateApp(1);
+ application_set_.insert(mock_app);
+
+ auto ext = CreateExtension(*mock_app);
+ ext->AddPendingSubscription("gps");
+ ext->AddPendingSubscription("speed");
+
+ uint32_t corr_id = 345;
+ auto request = CreateVDRequest(corr_id);
+ ON_CALL(mock_message_helper_,
+ CreateModuleInfoSO(VehicleInfo_SubscribeVehicleData, _))
+ .WillByDefault(Return(request));
+
+ resumption::ResumptionRequest resumption_request;
+ EXPECT_CALL(resumption_data_processor_mock_, SubscribeToResponse(_, _))
+ .WillOnce(SaveArg<1>(&resumption_request));
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(1);
+
+ const std::map<std::string, hmi_apis::Common_VehicleDataResultCode::eType>
+ subscriptions_result = {
+ {"gps", hmi_apis::Common_VehicleDataResultCode::VDRC_SUCCESS},
+ {"speed", hmi_apis::Common_VehicleDataResultCode::VDRC_SUCCESS},
+ };
+
+ auto response = CreateVDResponse(
+ hmi_apis::Common_Result::SUCCESS, subscriptions_result, corr_id);
+ application_manager::event_engine::Event event(
+ VehicleInfo_SubscribeVehicleData);
+ event.set_smart_object(response);
+ resumption_handler_->HandleResumptionSubscriptionRequest(*ext, *mock_app);
+
+ std::set<std::string> expected_data_in_event = {"gps", "speed"};
+ const auto subscribed_correlation_id =
+ resumption_request.request_id.correlation_id;
+ EXPECT_CALL(event_dispatcher_mock_,
+ raise_event(EventCheck(subscribed_correlation_id,
+ expected_data_in_event)));
+
+ resumption_handler_->on_event(event);
+ EXPECT_TRUE(ext->isSubscribedToVehicleInfo("gps"));
+ EXPECT_TRUE(ext->isSubscribedToVehicleInfo("speed"));
+ EXPECT_EQ(ext->PendingSubscriptions().GetData().size(), 0u);
+}
+
+TEST_F(VehicleInfoPendingResumptionHandlerTest,
+ OneAppSeveralVehicleDataResponseOneFailed) {
+ auto mock_app = CreateApp(1);
+ application_set_.insert(mock_app);
+
+ auto ext = CreateExtension(*mock_app);
+ ext->AddPendingSubscription("gps");
+ ext->AddPendingSubscription("speed");
+
+ uint32_t corr_id = 345;
+ auto request = CreateVDRequest(corr_id);
+ ON_CALL(mock_message_helper_,
+ CreateModuleInfoSO(VehicleInfo_SubscribeVehicleData, _))
+ .WillByDefault(Return(request));
+
+ resumption::ResumptionRequest resumption_request;
+ EXPECT_CALL(resumption_data_processor_mock_, SubscribeToResponse(_, _))
+ .WillOnce(SaveArg<1>(&resumption_request));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(1);
+ const std::map<std::string, hmi_apis::Common_VehicleDataResultCode::eType>
+ subscriptions_result = {
+ {"gps", hmi_apis::Common_VehicleDataResultCode::VDRC_SUCCESS},
+ {"speed",
+ hmi_apis::Common_VehicleDataResultCode::VDRC_DATA_NOT_SUBSCRIBED},
+ };
+ resumption_handler_->HandleResumptionSubscriptionRequest(*ext, *mock_app);
+
+ auto response = CreateVDResponse(
+ hmi_apis::Common_Result::SUCCESS, subscriptions_result, corr_id);
+ application_manager::event_engine::Event event(
+ VehicleInfo_SubscribeVehicleData);
+ event.set_smart_object(response);
+ std::set<std::string> expected_data_in_event = {"gps", "speed"};
+ const auto subscribed_correlation_id =
+ resumption_request.request_id.correlation_id;
+
+ EXPECT_CALL(event_dispatcher_mock_,
+ raise_event(EventCheck(subscribed_correlation_id,
+ expected_data_in_event)));
+
+ // TODO check that raized the same fid and cid as subscribed
+ resumption_handler_->on_event(event);
+ EXPECT_TRUE(ext->isSubscribedToVehicleInfo("gps"));
+ EXPECT_FALSE(ext->isSubscribedToVehicleInfo("speed"));
+ EXPECT_EQ(ext->PendingSubscriptions().GetData().size(), 0u);
+}
+
+TEST_F(VehicleInfoPendingResumptionHandlerTest,
+ OneAppSeveralVehicleDataResponseAllFailed) {
+ auto mock_app = CreateApp(1);
+ application_set_.insert(mock_app);
+
+ auto ext = CreateExtension(*mock_app);
+ ext->AddPendingSubscription("gps");
+ ext->AddPendingSubscription("speed");
+
+ uint32_t corr_id = 345;
+ auto request = CreateVDRequest(corr_id);
+ ON_CALL(mock_message_helper_,
+ CreateModuleInfoSO(VehicleInfo_SubscribeVehicleData, _))
+ .WillByDefault(Return(request));
+
+ resumption::ResumptionRequest resumption_request;
+ EXPECT_CALL(resumption_data_processor_mock_, SubscribeToResponse(_, _))
+ .WillOnce(SaveArg<1>(&resumption_request));
+ EXPECT_CALL(event_dispatcher_mock_, raise_event(_));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(1);
+ const std::map<std::string, hmi_apis::Common_VehicleDataResultCode::eType>
+ subscriptions_result = {
+ {"gps",
+ hmi_apis::Common_VehicleDataResultCode::VDRC_DATA_NOT_SUBSCRIBED},
+ {"speed",
+ hmi_apis::Common_VehicleDataResultCode::VDRC_DATA_NOT_SUBSCRIBED},
+ };
+
+ auto response = CreateVDResponse(
+ hmi_apis::Common_Result::SUCCESS, subscriptions_result, corr_id);
+ application_manager::event_engine::Event event(
+ VehicleInfo_SubscribeVehicleData);
+ event.set_smart_object(response);
+ resumption_handler_->HandleResumptionSubscriptionRequest(*ext, *mock_app);
+
+ // TODO check that raized the same fid and cid as subscribed
+ resumption_handler_->on_event(event);
+ EXPECT_FALSE(ext->isSubscribedToVehicleInfo("gps"));
+ EXPECT_FALSE(ext->isSubscribedToVehicleInfo("speed"));
+ EXPECT_EQ(ext->PendingSubscriptions().GetData().size(), 0u);
+}
+
+TEST_F(VehicleInfoPendingResumptionHandlerTest,
+ OneAppSeveralVehicleDataResponseOveralResultFailed) {
+ auto mock_app = CreateApp(1);
+ application_set_.insert(mock_app);
+
+ auto ext = CreateExtension(*mock_app);
+ ext->AddPendingSubscription("gps");
+ ext->AddPendingSubscription("speed");
+
+ uint32_t corr_id = 345;
+ auto request = CreateVDRequest(corr_id);
+ ON_CALL(mock_message_helper_,
+ CreateModuleInfoSO(VehicleInfo_SubscribeVehicleData, _))
+ .WillByDefault(Return(request));
+
+ resumption::ResumptionRequest resumption_request;
+ EXPECT_CALL(resumption_data_processor_mock_, SubscribeToResponse(_, _))
+ .WillOnce(SaveArg<1>(&resumption_request));
+
+ EXPECT_CALL(event_dispatcher_mock_, raise_event(_));
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(1);
+
+ auto response =
+ CreateVDError(corr_id, hmi_apis::Common_Result::ABORTED, "error message");
+ // TODO use error message type instead of result code
+ application_manager::event_engine::Event event(
+ VehicleInfo_SubscribeVehicleData);
+ event.set_smart_object(response);
+ resumption_handler_->HandleResumptionSubscriptionRequest(*ext, *mock_app);
+
+ // TODO check that raized the same fid and cid as subscribed
+ resumption_handler_->on_event(event);
+ EXPECT_FALSE(ext->isSubscribedToVehicleInfo("gps"));
+ EXPECT_FALSE(ext->isSubscribedToVehicleInfo("speed"));
+ EXPECT_EQ(ext->PendingSubscriptions().GetData().size(), 0u);
+}
+
+TEST_F(VehicleInfoPendingResumptionHandlerTest, TwoAppsOneSharedDataSuccess) {
+ auto mock_app = CreateApp(1);
+ application_set_.insert(mock_app);
+
+ auto mock_app2 = CreateApp(2);
+ application_set_.insert(mock_app2);
+
+ auto ext = CreateExtension(*mock_app);
+ auto ext2 = CreateExtension(*mock_app2);
+ ext->AddPendingSubscription("gps");
+ ext2->AddPendingSubscription("gps");
+
+ uint32_t corr_id = 345;
+ auto request = CreateVDRequest(corr_id);
+ ON_CALL(mock_message_helper_,
+ CreateModuleInfoSO(VehicleInfo_SubscribeVehicleData, _))
+ .WillByDefault(Return(request));
+
+ EXPECT_CALL(resumption_data_processor_mock_, SubscribeToResponse(_, _))
+ .Times(2);
+
+ // TODO save cid and fid of the subscription
+ EXPECT_CALL(event_dispatcher_mock_, raise_event(_)).Times(2);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(1);
+ const std::map<std::string, hmi_apis::Common_VehicleDataResultCode::eType>
+ subscriptions_result = {
+ {"gps", hmi_apis::Common_VehicleDataResultCode::VDRC_SUCCESS},
+ };
+
+ auto response = CreateVDResponse(
+ hmi_apis::Common_Result::SUCCESS, subscriptions_result, corr_id);
+ // TODO use error message type instead of result code
+ application_manager::event_engine::Event event(
+ VehicleInfo_SubscribeVehicleData);
+ event.set_smart_object(response);
+ resumption_handler_->HandleResumptionSubscriptionRequest(*ext, *mock_app);
+ resumption_handler_->HandleResumptionSubscriptionRequest(*ext2, *mock_app2);
+ // TODO check that raized the same fid and cid as subscribed
+ resumption_handler_->on_event(event);
+ EXPECT_TRUE(ext->isSubscribedToVehicleInfo("gps"));
+ EXPECT_TRUE(ext2->isSubscribedToVehicleInfo("gps"));
+ EXPECT_EQ(ext->PendingSubscriptions().GetData().size(), 0u);
+ EXPECT_EQ(ext2->PendingSubscriptions().GetData().size(), 0u);
+}
+
+TEST_F(VehicleInfoPendingResumptionHandlerTest,
+ TwoAppsMultipleSharedDataSuccessResumption) {
+ auto mock_app = CreateApp(1);
+ application_set_.insert(mock_app);
+
+ auto mock_app2 = CreateApp(2);
+ application_set_.insert(mock_app2);
+
+ auto ext = CreateExtension(*mock_app);
+ auto ext2 = CreateExtension(*mock_app2);
+ ext->AddPendingSubscription("gps");
+ ext->AddPendingSubscription("speed");
+ ext2->AddPendingSubscription("gps");
+ ext2->AddPendingSubscription("speed");
+
+ uint32_t corr_id = 345;
+ auto request = CreateVDRequest(corr_id);
+ ON_CALL(mock_message_helper_,
+ CreateModuleInfoSO(VehicleInfo_SubscribeVehicleData, _))
+ .WillByDefault(Return(request));
+
+ EXPECT_CALL(resumption_data_processor_mock_, SubscribeToResponse(_, _))
+ .Times(2);
+
+ // TODO save cid and fid of the subscription
+ EXPECT_CALL(event_dispatcher_mock_, raise_event(_)).Times(2);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(1);
+ const std::map<std::string, hmi_apis::Common_VehicleDataResultCode::eType>
+ subscriptions_result = {
+ {"gps", hmi_apis::Common_VehicleDataResultCode::VDRC_SUCCESS},
+ {"speed", hmi_apis::Common_VehicleDataResultCode::VDRC_SUCCESS},
+ };
+
+ auto response = CreateVDResponse(
+ hmi_apis::Common_Result::SUCCESS, subscriptions_result, corr_id);
+ // TODO use error message type instead of result code
+ application_manager::event_engine::Event event(
+ VehicleInfo_SubscribeVehicleData);
+ event.set_smart_object(response);
+ resumption_handler_->HandleResumptionSubscriptionRequest(*ext, *mock_app);
+ resumption_handler_->HandleResumptionSubscriptionRequest(*ext2, *mock_app2);
+ // TODO check that raized the same fid and cid as subscribed
+ resumption_handler_->on_event(event);
+ EXPECT_TRUE(ext->isSubscribedToVehicleInfo("gps"));
+ EXPECT_TRUE(ext->isSubscribedToVehicleInfo("speed"));
+ EXPECT_TRUE(ext2->isSubscribedToVehicleInfo("gps"));
+ EXPECT_TRUE(ext2->isSubscribedToVehicleInfo("speed"));
+ EXPECT_EQ(ext->PendingSubscriptions().GetData().size(), 0u);
+ EXPECT_EQ(ext2->PendingSubscriptions().GetData().size(), 0u);
+}
+
+TEST_F(VehicleInfoPendingResumptionHandlerTest,
+ TwoAppsOneSharedDataFailRetryforSecondApp) {
+ auto mock_app = CreateApp(1);
+ application_set_.insert(mock_app);
+
+ auto mock_app2 = CreateApp(2);
+ application_set_.insert(mock_app2);
+
+ auto ext = CreateExtension(*mock_app);
+ auto ext2 = CreateExtension(*mock_app2);
+ ext->AddPendingSubscription("gps");
+ ext2->AddPendingSubscription("gps");
+
+ uint32_t corr_id = 345;
+ auto request = CreateVDRequest(corr_id);
+ ON_CALL(mock_message_helper_,
+ CreateModuleInfoSO(VehicleInfo_SubscribeVehicleData, _))
+ .WillByDefault(Return(request));
+
+ EXPECT_CALL(resumption_data_processor_mock_, SubscribeToResponse(_, _))
+ .Times(2);
+
+ // TODO save cid and fid of the subscription
+ EXPECT_CALL(event_dispatcher_mock_, raise_event(_)).Times(2);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(2);
+ const std::map<std::string, hmi_apis::Common_VehicleDataResultCode::eType>
+ subscriptions_result = {
+ {"gps",
+ hmi_apis::Common_VehicleDataResultCode::VDRC_DATA_NOT_AVAILABLE},
+ };
+
+ auto response = CreateVDResponse(
+ hmi_apis::Common_Result::SUCCESS, subscriptions_result, corr_id);
+ // TODO use error message type instead of result code
+ application_manager::event_engine::Event event(
+ VehicleInfo_SubscribeVehicleData);
+ event.set_smart_object(response);
+ resumption_handler_->HandleResumptionSubscriptionRequest(*ext, *mock_app);
+ resumption_handler_->HandleResumptionSubscriptionRequest(*ext2, *mock_app2);
+ // TODO check that raized the same fid and cid as subscribed
+ resumption_handler_->on_event(event);
+
+ const std::map<std::string, hmi_apis::Common_VehicleDataResultCode::eType>
+ second_subscriptions_result = {
+ {"gps", hmi_apis::Common_VehicleDataResultCode::VDRC_SUCCESS},
+ };
+ auto second_response = CreateVDResponse(
+ hmi_apis::Common_Result::SUCCESS, second_subscriptions_result, corr_id);
+ // TODO use error message type instead of result code
+ application_manager::event_engine::Event second_event(
+ VehicleInfo_SubscribeVehicleData);
+ second_event.set_smart_object(second_response);
+
+ resumption_handler_->on_event(second_event);
+ EXPECT_FALSE(ext->isSubscribedToVehicleInfo("gps"));
+ EXPECT_TRUE(ext2->isSubscribedToVehicleInfo("gps"));
+ EXPECT_EQ(ext->PendingSubscriptions().GetData().size(), 0u);
+ EXPECT_EQ(ext2->PendingSubscriptions().GetData().size(), 0u);
+}
+
+TEST_F(VehicleInfoPendingResumptionHandlerTest,
+ TwoAppsOneSharedDataAlreadySubscribedByFirstAppNoRetryforSecondApp) {
+ auto mock_app = CreateApp(1);
+ application_set_.insert(mock_app);
+
+ auto mock_app2 = CreateApp(2);
+ application_set_.insert(mock_app2);
+
+ auto ext = CreateExtension(*mock_app);
+ auto ext2 = CreateExtension(*mock_app2);
+
+ ext->subscribeToVehicleInfo("gps");
+ ext2->AddPendingSubscription("gps");
+
+ EXPECT_CALL(resumption_data_processor_mock_, SubscribeToResponse(_, _))
+ .Times(0);
+ EXPECT_CALL(event_dispatcher_mock_, raise_event(_)).Times(0);
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(0);
+
+ resumption_handler_->HandleResumptionSubscriptionRequest(*ext2, *mock_app2);
+
+ EXPECT_TRUE(ext->isSubscribedToVehicleInfo("gps"));
+ EXPECT_TRUE(ext2->isSubscribedToVehicleInfo("gps"));
+ EXPECT_EQ(ext2->PendingSubscriptions().GetData().size(), 0u);
+}
+} // namespace vehicle_info_plugin_test
diff --git a/src/components/application_manager/src/app_launch/app_launch_ctrl_impl.cc b/src/components/application_manager/src/app_launch/app_launch_ctrl_impl.cc
index 691f8d3259..4dafe9a8e6 100644
--- a/src/components/application_manager/src/app_launch/app_launch_ctrl_impl.cc
+++ b/src/components/application_manager/src/app_launch/app_launch_ctrl_impl.cc
@@ -40,7 +40,7 @@
#include "utils/timer_task_impl.h"
namespace app_launch {
-CREATE_LOGGERPTR_GLOBAL(logger_, "AppLaunch")
+SDL_CREATE_LOG_VARIABLE("AppLaunch")
AppLaunchCtrlImpl::AppLaunchCtrlImpl(
AppLaunchData& data,
@@ -57,7 +57,7 @@ AppLaunchCtrlImpl::AppLaunchCtrlImpl(
void AppLaunchCtrlImpl::OnAppRegistered(
const application_manager::Application& app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// TODO (AKutsan) : get device mac
ApplicationDataPtr app_data = std::make_shared<ApplicationData>(
app.policy_app_id(), app.bundle_id(), app.mac_address());
@@ -82,7 +82,7 @@ bool HmiLevelSorter(const std::pair<int32_t, ApplicationDataPtr>& lval,
}
void AppLaunchCtrlImpl::OnDeviceConnected(const std::string& device_mac) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<ApplicationDataPtr> apps_on_device =
app_launch_data_.GetApplicationDataByDevice(device_mac);
std::vector<std::pair<int32_t, ApplicationDataPtr> > apps_hmi_levels;
@@ -104,12 +104,12 @@ void AppLaunchCtrlImpl::OnDeviceConnected(const std::string& device_mac) {
if (apps_on_device.size() > 0) {
device_apps_launcher_.LaunchAppsOnDevice(device_mac, apps_on_device);
} else {
- LOG4CXX_DEBUG(logger_, "No apps in saved for device " << device_mac);
+ SDL_LOG_DEBUG("No apps in saved for device " << device_mac);
}
}
void AppLaunchCtrlImpl::OnMasterReset() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
app_launch_data_.Clear();
}
} // namespace app_launch
diff --git a/src/components/application_manager/src/app_launch/app_launch_data_db.cc b/src/components/application_manager/src/app_launch/app_launch_data_db.cc
index a931b96fa1..c9357a0ec5 100644
--- a/src/components/application_manager/src/app_launch/app_launch_data_db.cc
+++ b/src/components/application_manager/src/app_launch/app_launch_data_db.cc
@@ -39,7 +39,7 @@
#include "application_manager/smart_object_keys.h"
namespace app_launch {
-CREATE_LOGGERPTR_GLOBAL(logger_, "AppLaunch")
+SDL_CREATE_LOG_VARIABLE("AppLaunch")
AppLaunchDataDB::AppLaunchDataDB(const AppLaunchSettings& settings,
DbStorage db_storage)
@@ -56,8 +56,8 @@ AppLaunchDataDB::AppLaunchDataDB(const AppLaunchSettings& settings,
#endif // __QNX__
DCHECK(db_.get());
} else {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_ERROR(logger_, "Get not existed type of database storage");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_ERROR("Get not existed type of database storage");
}
// Connect to resumption DB
@@ -69,48 +69,44 @@ AppLaunchDataDB::~AppLaunchDataDB() {
}
bool AppLaunchDataDB::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!db()->Open()) {
- LOG4CXX_ERROR(logger_, "Failed opening database.");
- LOG4CXX_INFO(logger_, "Starting opening retries.");
+ SDL_LOG_ERROR("Failed opening database.");
+ SDL_LOG_INFO("Starting opening retries.");
const uint16_t attempts = settings_.app_launch_max_retry_attempt();
- LOG4CXX_DEBUG(logger_, "Total attempts number is: " << attempts);
+ SDL_LOG_DEBUG("Total attempts number is: " << attempts);
bool is_opened = false;
const uint16_t open_attempt_timeout_ms =
settings_.app_launch_retry_wait_time();
const useconds_t sleep_interval_mcsec = open_attempt_timeout_ms * 1000u;
- LOG4CXX_DEBUG(logger_,
- "Open attempt timeout(ms) is: " << open_attempt_timeout_ms);
+ SDL_LOG_DEBUG("Open attempt timeout(ms) is: " << open_attempt_timeout_ms);
for (size_t i = 0u; i < attempts; ++i) {
usleep(sleep_interval_mcsec);
- LOG4CXX_INFO(logger_, "Attempt: " << i + 1);
+ SDL_LOG_INFO("Attempt: " << i + 1);
if (db()->Open()) {
- LOG4CXX_INFO(logger_, "Database opened.");
+ SDL_LOG_INFO("Database opened.");
is_opened = true;
break;
}
}
if (!is_opened) {
- LOG4CXX_ERROR(logger_,
- "Open retry sequence failed. Tried "
- << attempts << " attempts with "
- << open_attempt_timeout_ms
- << " open timeout(ms) for each.");
+ SDL_LOG_ERROR("Open retry sequence failed. Tried "
+ << attempts << " attempts with " << open_attempt_timeout_ms
+ << " open timeout(ms) for each.");
return false;
}
}
#ifndef __QNX__
if (!db()->IsReadWrite()) {
- LOG4CXX_ERROR(logger_, "There are no read/write permissions for database");
+ SDL_LOG_ERROR("There are no read/write permissions for database");
return false;
}
#endif // __QNX__
utils::dbms::SQLQuery query(db());
if (!query.Exec(kCreateSchema)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed creating schema of database: " << query.LastError().text());
return false;
}
@@ -119,20 +115,20 @@ bool AppLaunchDataDB::Init() {
}
bool AppLaunchDataDB::Persist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool retVal = false;
if (!init_successeful_) {
- LOG4CXX_ERROR(logger_,
- "AppLaunch data base was not successfully "
- "initialize, AppLaunch won't work!");
+ SDL_LOG_ERROR(
+ "AppLaunch data base was not successfully "
+ "initialize, AppLaunch won't work!");
return retVal;
}
if ((retVal = WriteDb())) {
- LOG4CXX_DEBUG(logger_, "App_lauch had been successfully saved.");
+ SDL_LOG_DEBUG("App_lauch had been successfully saved.");
} else {
- LOG4CXX_WARN(logger_, "Fail to save app_launch data.");
+ SDL_LOG_WARN("Fail to save app_launch data.");
}
return retVal;
@@ -140,21 +136,20 @@ bool AppLaunchDataDB::Persist() {
bool AppLaunchDataDB::IsAppDataAlreadyExisted(
const ApplicationData& app_data) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool retVal = false;
if (!init_successeful_) {
- LOG4CXX_ERROR(logger_,
- "AppLaunch data base was not successfully "
- "initialize, AppLaunch won't work!");
+ SDL_LOG_ERROR(
+ "AppLaunch data base was not successfully "
+ "initialize, AppLaunch won't work!");
return retVal;
}
utils::dbms::SQLQuery query(db());
if (!query.Prepare(kFindApplicationData)) {
- LOG4CXX_WARN(logger_,
- "Problem with verification queries 'kFindApplicationData'");
+ SDL_LOG_WARN("Problem with verification queries 'kFindApplicationData'");
return retVal;
}
@@ -165,31 +160,30 @@ bool AppLaunchDataDB::IsAppDataAlreadyExisted(
if (query.Exec()) {
retVal = query.GetBoolean(result_query);
} else {
- LOG4CXX_WARN(logger_,
- "Failed execute query 'kGetNumberOfApplicationData'. Reson: "
- << query.LastError().text());
+ SDL_LOG_WARN("Failed execute query 'kGetNumberOfApplicationData'. Reson: "
+ << query.LastError().text());
}
return retVal;
}
bool AppLaunchDataDB::RefreshAppSessionTime(const ApplicationData& app_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool retVal = false;
if (!init_successeful_) {
- LOG4CXX_ERROR(logger_,
- "AppLaunch data base was not successfully "
- "initialize, AppLaunch won't work!");
+ SDL_LOG_ERROR(
+ "AppLaunch data base was not successfully "
+ "initialize, AppLaunch won't work!");
return retVal;
}
utils::dbms::SQLQuery query(db());
if (!query.Prepare(kRefreshApplicationDataSessionTime)) {
- LOG4CXX_WARN(logger_,
- "Problem with verification queries "
- "'kRefreshApplicationDataSessionTime'");
+ SDL_LOG_WARN(
+ "Problem with verification queries "
+ "'kRefreshApplicationDataSessionTime'");
return retVal;
}
@@ -198,33 +192,31 @@ bool AppLaunchDataDB::RefreshAppSessionTime(const ApplicationData& app_data) {
query.Bind(bundle_id_index, app_data.bundle_id_);
if (query.Exec()) {
- LOG4CXX_DEBUG(logger_, "Dare&time last session were updated successfully");
+ SDL_LOG_DEBUG("Dare&time last session were updated successfully");
retVal = WriteDb();
} else {
- LOG4CXX_WARN(logger_,
- "Failed execute query 'kGetNumberOfApplicationData'. Reson: "
- << query.LastError().text());
+ SDL_LOG_WARN("Failed execute query 'kGetNumberOfApplicationData'. Reson: "
+ << query.LastError().text());
}
return retVal;
}
bool AppLaunchDataDB::AddNewAppData(const ApplicationData& app_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool retVal = false;
if (!init_successeful_) {
- LOG4CXX_ERROR(logger_,
- "AppLaunch data base was not successfully "
- "initialize, AppLaunch won't work!");
+ SDL_LOG_ERROR(
+ "AppLaunch data base was not successfully "
+ "initialize, AppLaunch won't work!");
return retVal;
}
utils::dbms::SQLQuery query(db());
if (!query.Prepare(kAddApplicationData)) {
- LOG4CXX_WARN(logger_,
- "Problem with verification queries 'kAddApplicationData'");
+ SDL_LOG_WARN("Problem with verification queries 'kAddApplicationData'");
return retVal;
}
@@ -234,12 +226,11 @@ bool AppLaunchDataDB::AddNewAppData(const ApplicationData& app_data) {
retVal = query.Exec();
if (retVal) {
- LOG4CXX_DEBUG(logger_, "New application data was added successfully");
+ SDL_LOG_DEBUG("New application data was added successfully");
retVal = WriteDb();
} else {
- LOG4CXX_WARN(logger_,
- "Failed execute query 'kGetNumberOfApplicationData'. Reson: "
- << query.LastError().text());
+ SDL_LOG_WARN("Failed execute query 'kGetNumberOfApplicationData'. Reson: "
+ << query.LastError().text());
}
return retVal;
@@ -247,21 +238,20 @@ bool AppLaunchDataDB::AddNewAppData(const ApplicationData& app_data) {
std::vector<ApplicationDataPtr> AppLaunchDataDB::GetAppDataByDevMac(
const std::string& dev_mac) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<ApplicationDataPtr> dev_apps;
if (!init_successeful_) {
- LOG4CXX_ERROR(logger_,
- "AppLaunch data base was not successfully "
- "initialize, AppLaunch won't work!");
+ SDL_LOG_ERROR(
+ "AppLaunch data base was not successfully "
+ "initialize, AppLaunch won't work!");
return dev_apps;
}
utils::dbms::SQLQuery query(db());
if (!query.Prepare(kGetApplicationDataByDevID)) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Problem with verification queries 'kGetApplicationDataByDevID'");
return dev_apps;
}
@@ -269,8 +259,7 @@ std::vector<ApplicationDataPtr> AppLaunchDataDB::GetAppDataByDevMac(
query.Bind(device_mac_index, dev_mac);
const bool retVal = query.Exec();
if (retVal) {
- LOG4CXX_INFO(logger_,
- "Values of ignition off counts were updated successfully");
+ SDL_LOG_INFO("Values of ignition off counts were updated successfully");
do {
const std::string device_mac = query.GetString(device_mac_index);
const std::string mobile_app_id = query.GetString(application_id_index);
@@ -278,106 +267,96 @@ std::vector<ApplicationDataPtr> AppLaunchDataDB::GetAppDataByDevMac(
dev_apps.push_back(std::make_shared<ApplicationData>(
mobile_app_id, bundle_id, device_mac));
} while (query.Next());
- LOG4CXX_DEBUG(logger_, "All application data has been successfully loaded");
+ SDL_LOG_DEBUG("All application data has been successfully loaded");
} else {
- LOG4CXX_WARN(logger_,
- "Failed execute query 'kGetNumberOfApplicationData'. Reson: "
- << query.LastError().text());
+ SDL_LOG_WARN("Failed execute query 'kGetNumberOfApplicationData'. Reson: "
+ << query.LastError().text());
}
return dev_apps;
}
bool AppLaunchDataDB::Clear() {
- LOG4CXX_AUTO_TRACE(logger_);
- bool retVal = false;
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
- retVal = query.Exec(kDropSchema);
+ bool retVal = query.Exec(kDropSchema);
if (retVal) {
- LOG4CXX_INFO(logger_, "App_Launch table had been cleared successfully");
+ SDL_LOG_INFO("App_Launch table had been cleared successfully");
retVal = WriteDb();
init_successeful_ = false;
} else {
- LOG4CXX_WARN(logger_,
- "Failed dropping database: " << query.LastError().text());
+ SDL_LOG_WARN("Failed dropping database: " << query.LastError().text());
}
return retVal;
}
uint32_t AppLaunchDataDB::GetCurentNumberOfAppData() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t number_of_app_data = 0u;
if (!init_successeful_) {
- LOG4CXX_ERROR(logger_,
- "AppLaunch data base was not successfully "
- "initialize, AppLaunch won't work!");
+ SDL_LOG_ERROR(
+ "AppLaunch data base was not successfully "
+ "initialize, AppLaunch won't work!");
return number_of_app_data;
}
utils::dbms::SQLQuery query(db());
if (!query.Prepare(kGetNumberOfApplicationData)) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Problem with verification queries 'kGetNumberOfApplicationData'");
return number_of_app_data;
}
if (query.Exec()) {
- LOG4CXX_INFO(logger_,
- "Values of ignition off counts were updated successfully");
+ SDL_LOG_INFO("Values of ignition off counts were updated successfully");
number_of_app_data = query.GetInteger(result_query);
- LOG4CXX_DEBUG(
- logger_,
- "Total cout saved mobile applications is " << number_of_app_data);
+ SDL_LOG_DEBUG("Total cout saved mobile applications is "
+ << number_of_app_data);
} else {
- LOG4CXX_WARN(logger_,
- "Failed execute query 'kGetNumberOfApplicationData'. Reson: "
- << query.LastError().text());
+ SDL_LOG_WARN("Failed execute query 'kGetNumberOfApplicationData'. Reson: "
+ << query.LastError().text());
}
return number_of_app_data;
}
bool AppLaunchDataDB::DeleteOldestAppData() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool retVal = false;
if (!init_successeful_) {
- LOG4CXX_ERROR(logger_,
- "AppLaunch data base was not successfully "
- "initialize, AppLaunch won't work!");
+ SDL_LOG_ERROR(
+ "AppLaunch data base was not successfully "
+ "initialize, AppLaunch won't work!");
return retVal;
}
utils::dbms::SQLQuery query(db());
if (!query.Prepare(kDeleteOldestAppData)) {
- LOG4CXX_WARN(logger_,
- "Problem with verification queries 'kDeleteOldestAppData'");
+ SDL_LOG_WARN("Problem with verification queries 'kDeleteOldestAppData'");
return retVal;
}
if ((retVal = query.Exec())) {
- LOG4CXX_INFO(logger_,
- "Values of ignition off counts were updated successfully");
+ SDL_LOG_INFO("Values of ignition off counts were updated successfully");
retVal = WriteDb();
} else {
- LOG4CXX_WARN(logger_,
- "Failed execute query 'kGetNumberOfApplicationData'. Reson: "
- << query.LastError().text());
+ SDL_LOG_WARN("Failed execute query 'kGetNumberOfApplicationData'. Reson: "
+ << query.LastError().text());
}
return retVal;
}
bool AppLaunchDataDB::WriteDb() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return db_->Backup();
}
diff --git a/src/components/application_manager/src/app_launch/app_launch_data_impl.cc b/src/components/application_manager/src/app_launch/app_launch_data_impl.cc
index c095cc9d94..524c1e393b 100644
--- a/src/components/application_manager/src/app_launch/app_launch_data_impl.cc
+++ b/src/components/application_manager/src/app_launch/app_launch_data_impl.cc
@@ -34,7 +34,7 @@
namespace app_launch {
-CREATE_LOGGERPTR_GLOBAL(logger_, "AppLaunch")
+SDL_CREATE_LOG_VARIABLE("AppLaunch")
AppLaunchDataImpl::AppLaunchDataImpl(const AppLaunchSettings& settings)
: settings_(settings)
@@ -43,24 +43,24 @@ AppLaunchDataImpl::AppLaunchDataImpl(const AppLaunchSettings& settings)
AppLaunchDataImpl::~AppLaunchDataImpl() {}
bool AppLaunchDataImpl::AddApplicationData(const ApplicationData& app_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool retVal = true;
if (app_data.device_mac_.empty() == false &&
app_data.mobile_app_id_.empty() == false &&
app_data.bundle_id_.empty() == false) {
if (IsAppDataAlreadyExisted(app_data)) {
- LOG4CXX_INFO(logger_, "This application data already existed");
+ SDL_LOG_INFO("This application data already existed");
retVal &= RefreshAppSessionTime(app_data);
} else {
if (GetCurentNumberOfAppData() >= get_max_number_iOS_devs()) {
- LOG4CXX_INFO(logger_,
- "Max number of application data have. It will be deleted "
- "the oldest one");
+ SDL_LOG_INFO(
+ "Max number of application data have. It will be deleted "
+ "the oldest one");
retVal &= DeleteOldestAppData();
}
retVal &= AddNewAppData(app_data);
- LOG4CXX_INFO(logger_, "Added new application data to DB");
+ SDL_LOG_INFO("Added new application data to DB");
}
} else {
retVal = false;
@@ -70,11 +70,11 @@ bool AppLaunchDataImpl::AddApplicationData(const ApplicationData& app_data) {
std::vector<ApplicationDataPtr> AppLaunchDataImpl::GetApplicationDataByDevice(
const std::string& dev_mac) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<ApplicationDataPtr> apps = GetAppDataByDevMac(dev_mac);
if (apps.empty()) {
- LOG4CXX_DEBUG(logger_, "No application founded by mac" << dev_mac);
+ SDL_LOG_DEBUG("No application found by device mac " << dev_mac);
}
return apps;
diff --git a/src/components/application_manager/src/app_launch/app_launch_data_json.cc b/src/components/application_manager/src/app_launch/app_launch_data_json.cc
index 86d585f215..d618e63e15 100644
--- a/src/components/application_manager/src/app_launch/app_launch_data_json.cc
+++ b/src/components/application_manager/src/app_launch/app_launch_data_json.cc
@@ -38,7 +38,7 @@
namespace app_launch {
-CREATE_LOGGERPTR_GLOBAL(logger_, "AppLaunch")
+SDL_CREATE_LOG_VARIABLE("AppLaunch")
AppLaunchDataJson::AppLaunchDataJson(
const AppLaunchSettings& settings,
@@ -50,16 +50,16 @@ AppLaunchDataJson::~AppLaunchDataJson() {}
Json::Value& AppLaunchDataJson::GetSavedApplicationDataList(
Json::Value& dictionary) const {
using namespace application_manager;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock autolock(app_launch_json_lock_);
Json::Value& app_launch = GetApplicationData(dictionary);
if (!app_launch.isMember(strings::app_launch_list)) {
app_launch[strings::app_launch_list] = Json::Value(Json::arrayValue);
- LOG4CXX_WARN(logger_, "app_list section is missed");
+ SDL_LOG_WARN("app_list section is missed");
}
Json::Value& app_launch_list = app_launch[strings::app_launch_list];
if (!app_launch_list.isArray()) {
- LOG4CXX_ERROR(logger_, "app_launch_list type INVALID rewrite");
+ SDL_LOG_ERROR("app_launch_list type INVALID rewrite");
app_launch_list = Json::Value(Json::arrayValue);
}
return app_launch_list;
@@ -68,15 +68,15 @@ Json::Value& AppLaunchDataJson::GetSavedApplicationDataList(
Json::Value& AppLaunchDataJson::GetApplicationData(
Json::Value& dictionary) const {
using namespace application_manager;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock autolock(app_launch_json_lock_);
if (!dictionary.isMember(strings::app_launch)) {
dictionary[strings::app_launch] = Json::Value(Json::objectValue);
- LOG4CXX_WARN(logger_, "app_launch section is missed");
+ SDL_LOG_WARN("app_launch section is missed");
}
Json::Value& app_launch = dictionary[strings::app_launch];
if (!app_launch.isObject()) {
- LOG4CXX_ERROR(logger_, "resumption type INVALID rewrite");
+ SDL_LOG_ERROR("resumption type INVALID rewrite");
app_launch = Json::Value(Json::objectValue);
}
return app_launch;
@@ -87,7 +87,7 @@ Json::Value& AppLaunchDataJson::GetApplicationListAndIndex(
int32_t& found_index,
Json::Value& dictionary) const {
using namespace application_manager;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock autolock(app_launch_json_lock_);
Json::Value& apps_list = GetSavedApplicationDataList(dictionary);
@@ -116,7 +116,7 @@ Json::Value& AppLaunchDataJson::GetApplicationListAndIndex(
bool AppLaunchDataJson::IsAppDataAlreadyExisted(
const ApplicationData& app_data) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
int32_t index = NotFound;
@@ -130,7 +130,7 @@ bool AppLaunchDataJson::IsAppDataAlreadyExisted(
bool AppLaunchDataJson::RefreshAppSessionTime(const ApplicationData& app_data) {
using namespace application_manager;
using namespace date_time;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool retVal = false;
int32_t index = NotFound;
@@ -152,7 +152,7 @@ bool AppLaunchDataJson::RefreshAppSessionTime(const ApplicationData& app_data) {
bool AppLaunchDataJson::AddNewAppData(const ApplicationData& app_data) {
using namespace application_manager;
using namespace date_time;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock autolock(app_launch_json_lock_);
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
@@ -166,18 +166,17 @@ bool AppLaunchDataJson::AddNewAppData(const ApplicationData& app_data) {
static_cast<Json::Value::UInt64>(getSecs(getCurrentTime()));
accessor.GetMutableData().set_dictionary(dictionary);
- LOG4CXX_DEBUG(logger_,
- "New application data saved. Detatils device_id: "
- << app_data.device_mac_
- << ", app_id: " << app_data.mobile_app_id_
- << ", bundle_id: " << app_data.bundle_id_ << ".");
+ SDL_LOG_DEBUG("New application data saved. Detatils device_id: "
+ << app_data.device_mac_
+ << ", app_id: " << app_data.mobile_app_id_
+ << ", bundle_id: " << app_data.bundle_id_ << ".");
return true;
}
std::vector<ApplicationDataPtr> AppLaunchDataJson::GetAppDataByDevMac(
const std::string& dev_mac) const {
using namespace application_manager;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock autolock(app_launch_json_lock_);
std::vector<ApplicationDataPtr> dev_apps;
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
@@ -207,32 +206,30 @@ std::vector<ApplicationDataPtr> AppLaunchDataJson::GetAppDataByDevMac(
}
bool AppLaunchDataJson::Clear() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
Json::Value dictionary = accessor.GetData().dictionary();
GetSavedApplicationDataList(dictionary).clear();
accessor.GetMutableData().set_dictionary(dictionary);
- LOG4CXX_DEBUG(logger_,
- "Application launch JSON section successfully cleared.");
+ SDL_LOG_DEBUG("Application launch JSON section successfully cleared.");
return true;
}
uint32_t AppLaunchDataJson::GetCurentNumberOfAppData() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
Json::Value dictionary = accessor.GetData().dictionary();
const uint32_t list_size = GetSavedApplicationDataList(dictionary).size();
accessor.GetMutableData().set_dictionary(dictionary);
- LOG4CXX_DEBUG(logger_,
- "Successfully was gotten app_launch list. Size: " << list_size);
+ SDL_LOG_DEBUG("Successfully was gotten app_launch list. Size: " << list_size);
return list_size;
}
bool AppLaunchDataJson::DeleteOldestAppData() {
using namespace application_manager;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock autolock(app_launch_json_lock_);
std::vector<uint64_t> temp_array;
std::vector<Json::Value> temp_json_list;
@@ -279,14 +276,14 @@ bool AppLaunchDataJson::DeleteOldestAppData() {
GetSavedApplicationDataList(dictionary).append(item);
}
accessor.GetMutableData().set_dictionary(dictionary);
- LOG4CXX_DEBUG(
- logger_, "Oldest application launch data had been successfully deleted.");
+ SDL_LOG_DEBUG(
+ "Oldest application launch data had been successfully deleted.");
return true;
}
bool AppLaunchDataJson::Persist() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
last_state_wrapper_->get_accessor().GetMutableData().SaveToFileSystem();
return true;
}
diff --git a/src/components/application_manager/src/app_launch/apps_launcher.cc b/src/components/application_manager/src/app_launch/apps_launcher.cc
index 993a57364e..1ee7bffb2a 100644
--- a/src/components/application_manager/src/app_launch/apps_launcher.cc
+++ b/src/components/application_manager/src/app_launch/apps_launcher.cc
@@ -28,7 +28,7 @@ struct LauncherGenerator {
const uint16_t app_launch_retry_wait_time_;
};
-CREATE_LOGGERPTR_GLOBAL(logger_, "AppLaunch")
+SDL_CREATE_LOG_VARIABLE("AppLaunch")
AppsLauncher::AppsLauncher(
connection_handler::ConnectionHandler& connection_handler,
const uint16_t max_number_of_ios_device,
@@ -45,7 +45,7 @@ AppsLauncher::AppsLauncher(
}
void AppsLauncher::StartLaunching(ApplicationDataPtr app_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(launchers_lock_);
DCHECK_OR_RETURN_VOID(!free_launchers_.empty())
const AppLaunchers::iterator it = free_launchers_.begin();
@@ -56,7 +56,8 @@ void AppsLauncher::StartLaunching(ApplicationDataPtr app_data) {
}
struct AppLauncherFinder {
- AppLauncherFinder(const ApplicationDataPtr& app_data) : app_data_(app_data) {}
+ explicit AppLauncherFinder(const ApplicationDataPtr& app_data)
+ : app_data_(app_data) {}
bool operator()(const AppsLauncher::LauncherPtr& launcher) const {
DCHECK_OR_RETURN(launcher->app_data_ && app_data_, false)
return *launcher->app_data_ == *app_data_;
@@ -75,18 +76,17 @@ void AppsLauncher::StopLaunching(ApplicationDataPtr app_data) {
free_launchers_.push_back(launcher);
works_launchers_.erase(it);
} else {
- LOG4CXX_DEBUG(logger_,
- "Unable to StopLaunching" << app_data->mobile_app_id_);
+ SDL_LOG_DEBUG("Unable to StopLaunching" << app_data->mobile_app_id_);
}
}
void AppsLauncher::OnLaunched(ApplicationDataPtr app_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
StopLaunching(app_data);
}
void AppsLauncher::OnRetryAttemptsExhausted(ApplicationDataPtr app_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
StopLaunching(app_data);
}
@@ -110,8 +110,7 @@ void AppsLauncher::Launcher::PosponedLaunch(
app_data_ = app_data;
retry_index_ = 0;
retry_timer_.Start(app_launch_retry_wait_time_, timer::kPeriodic);
- LOG4CXX_DEBUG(logger_,
- "Applicaiton " << app_data->mobile_app_id_ << " on device "
+ SDL_LOG_DEBUG("Applicaiton " << app_data->mobile_app_id_ << " on device "
<< app_data->device_mac_
<< " will be launched in "
<< app_launch_retry_wait_time_ << " ms");
@@ -125,8 +124,7 @@ void AppsLauncher::Launcher::Clear() {
void AppsLauncher::Launcher::LaunchNow() {
if (retry_index_++ < app_launch_max_retry_attempt_) {
- LOG4CXX_DEBUG(logger_,
- "Run App " << app_data_->mobile_app_id_ << "with bundle "
+ SDL_LOG_DEBUG("Run App " << app_data_->mobile_app_id_ << "with bundle "
<< app_data_->bundle_id_ << " On Device "
<< app_data_->device_mac_);
diff --git a/src/components/application_manager/src/app_launch/device_apps_launcher.cc b/src/components/application_manager/src/app_launch/device_apps_launcher.cc
index 9a7a6658fe..5f36e41efb 100644
--- a/src/components/application_manager/src/app_launch/device_apps_launcher.cc
+++ b/src/components/application_manager/src/app_launch/device_apps_launcher.cc
@@ -12,7 +12,7 @@
#include "utils/timer_task_impl.h"
namespace app_launch {
-CREATE_LOGGERPTR_GLOBAL(logger_, "AppLaunch")
+SDL_CREATE_LOG_VARIABLE("AppLaunch")
typedef std::pair<std::string, std::vector<ApplicationDataPtr> > AppsOnDevice;
typedef std::shared_ptr<AppsOnDevice> AppsOnDevicePtr;
@@ -58,9 +58,8 @@ class Launcher {
device_launcher_.settings().wait_time_between_apps(),
timer::kSingleShot);
} else {
- LOG4CXX_DEBUG(
- logger_,
- "All Apps on " << apps_on_device_->first << " postponed launched");
+ SDL_LOG_DEBUG("All Apps on " << apps_on_device_->first
+ << " postponed launched");
device_launcher_.StopLaunchingAppsOnDevice(apps_on_device_->first);
}
}
@@ -69,15 +68,6 @@ class Launcher {
LaunchNext();
}
- void OnAppRegistered(const ApplicationDataPtr& app_data) {
- std::vector<ApplicationDataPtr>& apps = apps_on_device_->second;
- std::vector<ApplicationDataPtr>::iterator it =
- std::find(apps.begin(), apps.end(), app_data);
- if (it != apps.end()) {
- apps.erase(it);
- }
- }
-
void Clear() {
gap_between_app_timer_.Stop();
wait_before_launch_timer_.Stop();
@@ -135,9 +125,8 @@ bool DeviceAppsLauncherImpl::LauncherFinder::operator()(
bool DeviceAppsLauncherImpl::LaunchAppsOnDevice(
const std::string& device_mac,
const std::vector<ApplicationDataPtr>& applications_to_launch) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "On Device " << device_mac << " will be launched "
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("On Device " << device_mac << " will be launched "
<< applications_to_launch.size() << " apps");
AppsOnDevicePtr apps_on_device =
std::make_shared<AppsOnDevice>(device_mac, applications_to_launch);
@@ -153,7 +142,7 @@ bool DeviceAppsLauncherImpl::LaunchAppsOnDevice(
bool DeviceAppsLauncherImpl::StopLaunchingAppsOnDevice(
const std::string& device_mac) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(launchers_lock_);
const Launchers::iterator it = std::find_if(works_launchers_.begin(),
works_launchers_.end(),
diff --git a/src/components/application_manager/src/app_service_manager.cc b/src/components/application_manager/src/app_service_manager.cc
index 3e7b4b99fe..9b31d57ca0 100644
--- a/src/components/application_manager/src/app_service_manager.cc
+++ b/src/components/application_manager/src/app_service_manager.cc
@@ -45,7 +45,7 @@
#include "smart_objects/enum_schema_item.h"
#include "utils/logger.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "AppServiceManager")
+SDL_CREATE_LOG_VARIABLE("AppServiceManager")
namespace application_manager {
@@ -59,15 +59,15 @@ AppServiceManager::AppServiceManager(ApplicationManager& app_manager,
, rpc_passing_handler_(*this, app_manager_) {}
AppServiceManager::~AppServiceManager() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
smart_objects::SmartObject AppServiceManager::PublishAppService(
const smart_objects::SmartObject& manifest,
const bool mobile_service,
const uint32_t connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
- std::string str_to_hash = "";
+ SDL_LOG_AUTO_TRACE();
+ std::string str_to_hash;
std::string service_id = "";
std::string service_type = manifest[strings::service_type].asString();
@@ -86,13 +86,12 @@ smart_objects::SmartObject AppServiceManager::PublishAppService(
auto found_service_id =
found_service->record[strings::service_id].asString();
if (service_by_name_id != found_service_id) {
- LOG4CXX_WARN(logger_,
- "A service already exists with this name, rejecting");
+ SDL_LOG_WARN("A service already exists with this name, rejecting");
return smart_objects::SmartObject();
}
}
}
- LOG4CXX_WARN(logger_, "Service already exists for this provider, updating");
+ SDL_LOG_WARN("Service already exists for this provider, updating");
published_services_lock_.Acquire();
found_service->record[strings::service_manifest] = manifest;
found_service->record[strings::service_published] = true;
@@ -114,7 +113,7 @@ smart_objects::SmartObject AppServiceManager::PublishAppService(
if (manifest.keyExists(strings::service_name) &&
FindServiceByName(manifest[strings::service_name].asString())) {
- LOG4CXX_WARN(logger_, "A service already exists with this name, rejecting");
+ SDL_LOG_WARN("A service already exists with this name, rejecting");
return smart_objects::SmartObject();
}
@@ -183,14 +182,14 @@ smart_objects::SmartObject AppServiceManager::PublishAppService(
}
bool AppServiceManager::UnpublishAppService(const std::string service_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(published_services_lock_);
auto it = published_services_.find(service_id);
if (it == published_services_.end()) {
- LOG4CXX_ERROR(logger_, "Service id does not exist in published services");
+ SDL_LOG_ERROR("Service id does not exist in published services");
return false;
}
- LOG4CXX_DEBUG(logger_, "Unpublishing app service: " << service_id);
+ SDL_LOG_DEBUG("Unpublishing app service: " << service_id);
SetServicePublished(service_id, false);
smart_objects::SmartObject msg_params;
@@ -222,8 +221,8 @@ bool AppServiceManager::UnpublishAppService(const std::string service_id) {
}
void AppServiceManager::UnpublishServices(const uint32_t connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Unpublishing all app services: " << connection_key);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Unpublishing all app services: " << connection_key);
std::list<std::string> app_published_services;
{
@@ -242,7 +241,7 @@ void AppServiceManager::UnpublishServices(const uint32_t connection_key) {
}
void AppServiceManager::OnAppActivated(ApplicationConstSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(published_services_lock_);
auto it = published_services_.begin();
// Activate all services published by the app
@@ -255,7 +254,7 @@ void AppServiceManager::OnAppActivated(ApplicationConstSharedPtr app) {
std::vector<smart_objects::SmartObject>
AppServiceManager::GetAllServiceRecords() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<smart_objects::SmartObject> services;
sync_primitives::AutoLock lock(published_services_lock_);
for (auto it = published_services_.begin(); it != published_services_.end();
@@ -269,16 +268,15 @@ void AppServiceManager::GetProviderByType(const std::string& service_type,
const bool mobile_consumer,
ApplicationSharedPtr& app,
bool& hmi_service) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto active_service = ActiveServiceForType(service_type);
if (!active_service) {
- LOG4CXX_ERROR(logger_,
- "There is no active service for the given service type: "
- << service_type);
+ SDL_LOG_ERROR("There is no active service for the given service type: "
+ << service_type);
return;
}
- LOG4CXX_DEBUG(logger_, "Found provider for service type: " << service_type);
+ SDL_LOG_DEBUG("Found provider for service type: " << service_type);
GetProviderFromService(*active_service, mobile_consumer, app, hmi_service);
}
@@ -286,15 +284,15 @@ void AppServiceManager::GetProviderByID(const std::string& service_id,
const bool mobile_consumer,
ApplicationSharedPtr& app,
bool& hmi_service) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(published_services_lock_);
auto it = published_services_.find(service_id);
if (it == published_services_.end()) {
- LOG4CXX_ERROR(logger_, "Service id does not exist in published services");
+ SDL_LOG_ERROR("Service id does not exist in published services");
return;
}
- LOG4CXX_DEBUG(logger_, "Found provider with service ID: " << service_id);
+ SDL_LOG_DEBUG("Found provider with service ID: " << service_id);
GetProviderFromService(it->second, mobile_consumer, app, hmi_service);
}
@@ -302,11 +300,11 @@ void AppServiceManager::GetProviderFromService(const AppService& service,
const bool mobile_consumer,
ApplicationSharedPtr& app,
bool& hmi_service) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (mobile_consumer &&
!service.record[strings::service_manifest][strings::allow_app_consumers]
.asBool()) {
- LOG4CXX_ERROR(logger_, "Service does not support app consumers");
+ SDL_LOG_ERROR("Service does not support app consumers");
return;
}
bool mobile_service = service.mobile_service;
@@ -319,11 +317,11 @@ void AppServiceManager::GetProviderFromService(const AppService& service,
}
bool AppServiceManager::SetDefaultService(const std::string service_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(published_services_lock_);
auto it = published_services_.find(service_id);
if (it == published_services_.end()) {
- LOG4CXX_ERROR(logger_, "Unable to find published service " << service_id);
+ SDL_LOG_ERROR("Unable to find published service " << service_id);
return false;
}
AppService& service = it->second;
@@ -350,17 +348,17 @@ bool AppServiceManager::SetDefaultService(const std::string service_id) {
}
bool AppServiceManager::RemoveDefaultService(const std::string service_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(published_services_lock_);
auto it = published_services_.find(service_id);
if (it == published_services_.end()) {
- LOG4CXX_ERROR(logger_, "Unable to find published service " << service_id);
+ SDL_LOG_ERROR("Unable to find published service " << service_id);
return false;
}
AppService& service = it->second;
if (!service.default_service) {
- LOG4CXX_ERROR(logger_, "Service was not default " << service_id);
+ SDL_LOG_ERROR("Service was not default " << service_id);
return false;
}
service.default_service = false;
@@ -377,17 +375,17 @@ bool AppServiceManager::RemoveDefaultService(const std::string service_id) {
}
bool AppServiceManager::ActivateAppService(const std::string service_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(published_services_lock_);
auto it = published_services_.find(service_id);
if (it == published_services_.end()) {
- LOG4CXX_ERROR(logger_, "Unable to find published service " << service_id);
+ SDL_LOG_ERROR("Unable to find published service " << service_id);
return false;
}
smart_objects::SmartObject& service = it->second.record;
if (service[strings::service_active].asBool()) {
- LOG4CXX_DEBUG(logger_, "Service was already active " << service_id);
+ SDL_LOG_DEBUG("Service was already active " << service_id);
return true;
}
@@ -415,20 +413,20 @@ bool AppServiceManager::ActivateAppService(const std::string service_id) {
EnumConversionHelper<mobile_apis::AppServiceType::eType>::EnumToString(
mobile_apis::AppServiceType::NAVIGATION, &navi_service_type);
if (service_type == navi_service_type) {
- smart_objects::SmartObject msg_params;
- msg_params[strings::system_capability][strings::system_capability_type] =
+ smart_objects::SmartObject params;
+ params[strings::system_capability][strings::system_capability_type] =
mobile_apis::SystemCapabilityType::NAVIGATION;
- MessageHelper::BroadcastCapabilityUpdate(msg_params, app_manager_);
+ MessageHelper::BroadcastCapabilityUpdate(params, app_manager_);
}
return true;
}
bool AppServiceManager::DeactivateAppService(const std::string service_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(published_services_lock_);
auto it = published_services_.find(service_id);
if (it == published_services_.end()) {
- LOG4CXX_ERROR(logger_, "Unable to find published service " << service_id);
+ SDL_LOG_ERROR("Unable to find published service " << service_id);
return false;
}
smart_objects::SmartObject& service = it->second.record;
@@ -465,7 +463,7 @@ bool AppServiceManager::DeactivateAppService(const std::string service_id) {
AppService* AppServiceManager::ActiveServiceForType(
const std::string service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(published_services_lock_);
for (auto it = published_services_.begin(); it != published_services_.end();
++it) {
@@ -481,7 +479,7 @@ AppService* AppServiceManager::ActiveServiceForType(
AppService* AppServiceManager::EmbeddedServiceForType(
const std::string service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(published_services_lock_);
for (auto it = published_services_.begin(); it != published_services_.end();
++it) {
@@ -496,7 +494,7 @@ AppService* AppServiceManager::EmbeddedServiceForType(
AppService* AppServiceManager::FindServiceByPolicyAppID(
const std::string policy_app_id, const std::string type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(published_services_lock_);
for (auto it = published_services_.begin(); it != published_services_.end();
++it) {
@@ -513,12 +511,12 @@ AppService* AppServiceManager::FindServiceByPolicyAppID(
}
AppService* AppServiceManager::FindServiceByID(const std::string service_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(published_services_lock_);
auto it = published_services_.find(service_id);
if (it == published_services_.end()) {
- LOG4CXX_ERROR(logger_, "Service id does not exist in published services");
+ SDL_LOG_ERROR("Service id does not exist in published services");
return NULL;
}
return &(it->second);
@@ -526,7 +524,7 @@ AppService* AppServiceManager::FindServiceByID(const std::string service_id) {
AppService* AppServiceManager::FindServiceByProvider(
const uint32_t connection_key, const std::string service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(published_services_lock_);
for (auto& service : published_services_) {
if (service.second.connection_key == connection_key &&
@@ -539,7 +537,7 @@ AppService* AppServiceManager::FindServiceByProvider(
}
AppService* AppServiceManager::FindServiceByName(std::string name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(published_services_lock_);
for (auto& service : published_services_) {
if (service.second.record[strings::service_manifest][strings::service_name]
@@ -552,7 +550,7 @@ AppService* AppServiceManager::FindServiceByName(std::string name) {
std::string AppServiceManager::DefaultServiceByType(
const std::string service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto last_state_accessor = last_state_->get_accessor();
Json::Value dictionary = last_state_accessor.GetData().dictionary();
@@ -564,11 +562,11 @@ std::string AppServiceManager::DefaultServiceByType(
void AppServiceManager::SetServicePublished(const std::string service_id,
const bool service_published) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(published_services_lock_);
auto it = published_services_.find(service_id);
if (it == published_services_.end()) {
- LOG4CXX_ERROR(logger_, "Service id does not exist in published services");
+ SDL_LOG_ERROR("Service id does not exist in published services");
return;
}
it->second.record[strings::service_published] = service_published;
@@ -584,7 +582,7 @@ std::string AppServiceManager::GetPolicyAppID(AppService service) {
bool AppServiceManager::UpdateNavigationCapabilities(
smart_objects::SmartObject& out_params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::string navi_service_type;
ns_smart_device_link::ns_smart_objects::
EnumConversionHelper<mobile_apis::AppServiceType::eType>::EnumToString(
@@ -623,7 +621,7 @@ void AppServiceManager::AppServiceUpdated(
const smart_objects::SmartObject& service_record,
const mobile_apis::ServiceUpdateReason::eType update_reason,
smart_objects::SmartObject& msg_params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject& services =
msg_params[strings::system_capability][strings::app_services_capabilities]
[strings::app_services];
diff --git a/src/components/application_manager/src/application_data_impl.cc b/src/components/application_manager/src/application_data_impl.cc
index 25fc60f3d9..8f7a1e2815 100644
--- a/src/components/application_manager/src/application_data_impl.cc
+++ b/src/components/application_manager/src/application_data_impl.cc
@@ -37,7 +37,7 @@
#include "utils/logger.h"
namespace application_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationManager")
+SDL_CREATE_LOG_VARIABLE("ApplicationManager")
namespace {
struct CommandIdComparator {
@@ -205,14 +205,16 @@ DynamicApplicationDataImpl::DynamicApplicationDataImpl()
, commands_()
, commands_lock_ptr_(std::make_shared<sync_primitives::RecursiveLock>())
, sub_menu_()
- , sub_menu_lock_ptr_(std::make_shared<sync_primitives::Lock>())
+ , sub_menu_lock_ptr_(std::make_shared<sync_primitives::RecursiveLock>())
, choice_set_map_()
- , choice_set_map_lock_ptr_(std::make_shared<sync_primitives::Lock>())
+ , choice_set_map_lock_ptr_(
+ std::make_shared<sync_primitives::RecursiveLock>())
, performinteraction_choice_set_map_()
, performinteraction_choice_set_lock_ptr_(
std::make_shared<sync_primitives::RecursiveLock>())
, window_params_map_()
- , window_params_map_lock_ptr_(std::make_shared<sync_primitives::Lock>())
+ , window_params_map_lock_ptr_(
+ std::make_shared<sync_primitives::RecursiveLock>())
, is_perform_interaction_active_(false)
, is_reset_global_properties_active_(false)
, perform_interaction_mode_(-1)
@@ -244,6 +246,21 @@ DynamicApplicationDataImpl::~DynamicApplicationDataImpl() {
show_command_ = NULL;
}
+ if (keyboard_props_) {
+ delete keyboard_props_;
+ keyboard_props_ = NULL;
+ }
+
+ if (menu_title_) {
+ delete menu_title_;
+ menu_title_ = NULL;
+ }
+
+ if (menu_icon_) {
+ delete menu_icon_;
+ menu_icon_ = NULL;
+ }
+
if (tbt_show_command_) {
delete tbt_show_command_;
tbt_show_command_ = NULL;
@@ -263,6 +280,11 @@ DynamicApplicationDataImpl::~DynamicApplicationDataImpl() {
}
sub_menu_.clear();
+ for (auto command : choice_set_map_) {
+ delete command.second;
+ }
+ choice_set_map_.clear();
+
PerformChoiceSetMap::iterator it = performinteraction_choice_set_map_.begin();
for (; performinteraction_choice_set_map_.end() != it; ++it) {
PerformChoice::iterator choice_it =
@@ -380,29 +402,35 @@ DynamicApplicationDataImpl::display_capabilities() const {
smart_objects::SmartObjectSPtr DynamicApplicationDataImpl::display_capabilities(
const WindowID window_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- auto result_display_caps = std::make_shared<smart_objects::SmartObject>(
- smart_objects::SmartType_Array);
- const auto window_caps =
- (*display_capabilities_)[0][strings::window_capabilities].asArray();
- if (!window_caps) {
- LOG4CXX_WARN(logger_, "Current window capabilities are empty");
+ if (!display_capabilities_) {
+ SDL_LOG_WARN("Current window capabilities are empty");
// SDL still needs to retreive display capabilities
return display_capabilities_;
}
- auto find_res =
- std::find_if(window_caps->begin(),
- window_caps->end(),
- [&window_id](const smart_objects::SmartObject& element) {
- if (window_id == element[strings::window_id].asInt()) {
- return true;
- }
- return false;
- });
+ smart_objects::SmartObject result_window_caps(
+ smart_objects::SmartType::SmartType_Map);
+
+ const auto window_caps =
+ (*display_capabilities_)[0][strings::window_capabilities].asArray();
+ if (window_caps) {
+ auto find_res = std::find_if(
+ window_caps->begin(),
+ window_caps->end(),
+ [&window_id](const smart_objects::SmartObject& element) {
+ return (window_id == element[strings::window_id].asInt());
+ });
+
+ if (find_res != window_caps->end()) {
+ result_window_caps = *find_res;
+ }
+ }
+
+ auto result_display_caps = std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Array);
- DCHECK(find_res != window_caps->end());
const auto disp_caps_keys = (*display_capabilities_)[0].enumerate();
for (const auto& key : disp_caps_keys) {
if (strings::window_capabilities == key) {
@@ -411,7 +439,8 @@ smart_objects::SmartObjectSPtr DynamicApplicationDataImpl::display_capabilities(
(*result_display_caps)[0][key] = (*display_capabilities_)[0][key];
}
- (*result_display_caps)[0][strings::window_capabilities][0] = *find_res;
+ (*result_display_caps)[0][strings::window_capabilities][0] =
+ result_window_caps;
return result_display_caps;
}
@@ -546,7 +575,7 @@ void DynamicApplicationDataImpl::set_night_color_scheme(
}
void DynamicApplicationDataImpl::set_display_layout(const std::string& layout) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace mobile_apis::PredefinedWindows;
smart_objects::SmartObject template_config(smart_objects::SmartType_Map);
template_config[strings::template_layout] = layout;
@@ -555,7 +584,7 @@ void DynamicApplicationDataImpl::set_display_layout(const std::string& layout) {
void DynamicApplicationDataImpl::set_display_capabilities(
const smart_objects::SmartObject& display_capabilities) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& incoming_window_capabilities =
display_capabilities[0][strings::window_capabilities];
@@ -608,7 +637,12 @@ void DynamicApplicationDataImpl::set_display_capabilities(
void DynamicApplicationDataImpl::remove_window_capability(
const WindowID window_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
+
+ if (!display_capabilities_) {
+ SDL_LOG_ERROR("Application display capabilities are not available");
+ return;
+ }
auto window_capabilities =
(*display_capabilities_)[0][strings::window_capabilities].asArray();
@@ -625,9 +659,8 @@ void DynamicApplicationDataImpl::remove_window_capability(
}
}
- LOG4CXX_WARN(
- logger_,
- "No window id " << window_id << " found in display capabilities");
+ SDL_LOG_WARN("No window id " << window_id
+ << " found in display capabilities");
}
bool DynamicApplicationDataImpl::menu_layout_supported(
@@ -662,7 +695,7 @@ bool DynamicApplicationDataImpl::menu_layout_supported(
void DynamicApplicationDataImpl::set_window_layout(const WindowID window_id,
const std::string& layout) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject template_config(smart_objects::SmartType_Map);
template_config[strings::template_layout] = layout;
@@ -671,21 +704,21 @@ void DynamicApplicationDataImpl::set_window_layout(const WindowID window_id,
void DynamicApplicationDataImpl::set_day_color_scheme(
const WindowID window_id, const smart_objects::SmartObject& color_scheme) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(color_scheme.getType() == smart_objects::SmartType_Map);
window_templates_[window_id][strings::day_color_scheme] = color_scheme;
}
void DynamicApplicationDataImpl::set_night_color_scheme(
const WindowID window_id, const smart_objects::SmartObject& color_scheme) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(color_scheme.getType() == smart_objects::SmartType_Map);
window_templates_[window_id][strings::night_color_scheme] = color_scheme;
}
std::string DynamicApplicationDataImpl::window_layout(
const WindowID window_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
AppWindowsTemplates::const_iterator window_template_it =
window_templates_.find(window_id);
@@ -702,7 +735,7 @@ std::string DynamicApplicationDataImpl::window_layout(
smart_objects::SmartObject DynamicApplicationDataImpl::day_color_scheme(
const WindowID window_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
AppWindowsTemplates::const_iterator window_template_it =
window_templates_.find(window_id);
@@ -719,7 +752,7 @@ smart_objects::SmartObject DynamicApplicationDataImpl::day_color_scheme(
smart_objects::SmartObject DynamicApplicationDataImpl::night_color_scheme(
const WindowID window_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
AppWindowsTemplates::const_iterator window_template_it =
window_templates_.find(window_id);
@@ -745,7 +778,7 @@ void DynamicApplicationDataImpl::SetGlobalProperties(
(this->*callback)(param);
}
} else {
- LOG4CXX_WARN(logger_, "Invalid or Null smart object");
+ SDL_LOG_WARN("Invalid or Null smart object");
}
}
@@ -756,11 +789,10 @@ void DynamicApplicationDataImpl::AddCommand(
CommandsMap::const_iterator it = commands_.find(internal_id);
if (commands_.end() == it) {
commands_[internal_id] = new smart_objects::SmartObject(command);
- LOG4CXX_DEBUG(logger_,
- "Command with internal number "
- << internal_id << " and id "
- << (*commands_[internal_id])[strings::cmd_id].asUInt()
- << " is added.");
+ SDL_LOG_DEBUG("Command with internal number "
+ << internal_id << " and id "
+ << (*commands_[internal_id])[strings::cmd_id].asUInt()
+ << " is added.");
}
}
@@ -773,19 +805,17 @@ void DynamicApplicationDataImpl::RemoveCommand(const uint32_t cmd_id) {
if (it != commands_.end()) {
delete it->second;
- LOG4CXX_DEBUG(logger_,
- "Command with internal number " << (it->first) << " and id "
+ SDL_LOG_DEBUG("Command with internal number " << (it->first) << " and id "
<< cmd_id << " is removed.");
commands_.erase(it);
return;
}
- LOG4CXX_WARN(
- logger_,
- "Command with id " << cmd_id << " is not found. Removal skipped.");
+ SDL_LOG_WARN("Command with id " << cmd_id
+ << " is not found. Removal skipped.");
}
-smart_objects::SmartObject* DynamicApplicationDataImpl::FindCommand(
+smart_objects::SmartObject DynamicApplicationDataImpl::FindCommand(
const uint32_t cmd_id) {
sync_primitives::AutoLock lock(commands_lock_ptr_);
@@ -794,13 +824,13 @@ smart_objects::SmartObject* DynamicApplicationDataImpl::FindCommand(
find_if(commands_.begin(), commands_.end(), is_id_equal);
if (it != commands_.end()) {
- LOG4CXX_DEBUG(logger_,
- "Command with internal number " << (it->first) << " and id "
+ SDL_LOG_DEBUG("Command with internal number " << (it->first) << " and id "
<< cmd_id << " is found.");
- return it->second;
+ smart_objects::SmartObject command(*it->second);
+ return command;
}
- return NULL;
+ return smart_objects::SmartObject(smart_objects::SmartType_Null);
}
// TODO(VS): Create common functions for processing collections
@@ -823,24 +853,26 @@ void DynamicApplicationDataImpl::RemoveSubMenu(uint32_t menu_id) {
}
}
-smart_objects::SmartObject* DynamicApplicationDataImpl::FindSubMenu(
+smart_objects::SmartObject DynamicApplicationDataImpl::FindSubMenu(
uint32_t menu_id) const {
sync_primitives::AutoLock lock(sub_menu_lock_ptr_);
SubMenuMap::const_iterator it = sub_menu_.find(menu_id);
if (it != sub_menu_.end()) {
- return it->second;
+ smart_objects::SmartObject sub_menu(*it->second);
+ return sub_menu;
}
- return NULL;
+ return smart_objects::SmartObject(smart_objects::SmartType_Null);
}
bool DynamicApplicationDataImpl::IsSubMenuNameAlreadyExist(
- const std::string& name) {
+ const std::string& name, const uint32_t parent_id) {
sync_primitives::AutoLock lock(sub_menu_lock_ptr_);
for (SubMenuMap::iterator it = sub_menu_.begin(); sub_menu_.end() != it;
++it) {
smart_objects::SmartObject* menu = it->second;
- if ((*menu)[strings::menu_name] == name) {
+ if ((*menu)[strings::menu_name].asString() == name &&
+ (*menu)[strings::parent_id].asInt() == parent_id) {
return true;
}
}
@@ -855,7 +887,7 @@ DynamicApplicationDataImpl::window_optional_params_map() const {
void DynamicApplicationDataImpl::SetWindowInfo(
const WindowID window_id, const smart_objects::SmartObject& window_info) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto it = window_params_map_.find(window_id);
if (window_params_map_.end() == it) {
window_params_map_[window_id] =
@@ -865,12 +897,12 @@ void DynamicApplicationDataImpl::SetWindowInfo(
DisplayCapabilitiesBuilder&
DynamicApplicationDataImpl::display_capabilities_builder() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return display_capabilities_builder_;
}
void DynamicApplicationDataImpl::RemoveWindowInfo(const WindowID window_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
window_params_map_.erase(window_id);
}
@@ -893,15 +925,16 @@ void DynamicApplicationDataImpl::RemoveChoiceSet(uint32_t choice_set_id) {
}
}
-smart_objects::SmartObject* DynamicApplicationDataImpl::FindChoiceSet(
+smart_objects::SmartObject DynamicApplicationDataImpl::FindChoiceSet(
uint32_t choice_set_id) {
sync_primitives::AutoLock lock(choice_set_map_lock_ptr_);
ChoiceSetMap::const_iterator it = choice_set_map_.find(choice_set_id);
if (it != choice_set_map_.end()) {
- return it->second;
+ smart_objects::SmartObject choice_set(*it->second);
+ return choice_set;
}
- return NULL;
+ return smart_objects::SmartObject(smart_objects::SmartType_Null);
}
void DynamicApplicationDataImpl::AddPerformInteractionChoiceSet(
diff --git a/src/components/application_manager/src/application_impl.cc b/src/components/application_manager/src/application_impl.cc
index 11d038fee2..6b4500e394 100644
--- a/src/components/application_manager/src/application_impl.cc
+++ b/src/components/application_manager/src/application_impl.cc
@@ -73,7 +73,7 @@ mobile_apis::FileType::eType StringToFileType(const char* str) {
}
} // namespace
-CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationManager")
+SDL_CREATE_LOG_VARIABLE("ApplicationManager")
namespace application_manager {
@@ -81,7 +81,7 @@ void SwitchApplicationParameters(ApplicationSharedPtr app,
const uint32_t app_id,
const size_t device_id,
const std::string& mac_address) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::shared_ptr<ApplicationImpl> application =
std::dynamic_pointer_cast<ApplicationImpl>(app);
DCHECK_OR_RETURN_VOID(application);
@@ -106,6 +106,7 @@ ApplicationImpl::ApplicationImpl(
, is_navi_(false)
, is_remote_control_supported_(false)
, mobile_projection_enabled_(false)
+ , webengine_projection_enabled_(false)
, video_streaming_approved_(false)
, audio_streaming_approved_(false)
, video_streaming_allowed_(false)
@@ -115,6 +116,7 @@ ApplicationImpl::ApplicationImpl(
, is_app_allowed_(true)
, is_app_data_resumption_allowed_(false)
, has_been_activated_(false)
+ , is_ready_(false)
, tts_properties_in_none_(false)
, tts_properties_in_full_(false)
, keep_context_(false)
@@ -199,33 +201,39 @@ bool ApplicationImpl::is_audio() const {
}
void ApplicationImpl::ChangeSupportingAppHMIType() {
- is_navi_ = false;
- is_voice_communication_application_ = false;
- mobile_projection_enabled_ = false;
+ set_is_navi(false);
+ set_voice_communication_supported(false);
+ set_mobile_projection_enabled(false);
+ set_webengine_projection_enabled(false);
const smart_objects::SmartObject& array_app_types = *app_types_;
uint32_t lenght_app_types = array_app_types.length();
for (uint32_t i = 0; i < lenght_app_types; ++i) {
- if (mobile_apis::AppHMIType::NAVIGATION ==
- static_cast<mobile_apis::AppHMIType::eType>(
- array_app_types[i].asUInt())) {
- is_navi_ = true;
- }
- if (mobile_apis::AppHMIType::COMMUNICATION ==
- static_cast<mobile_apis::AppHMIType::eType>(
- array_app_types[i].asUInt())) {
- is_voice_communication_application_ = true;
- }
- if (mobile_apis::AppHMIType::PROJECTION ==
- static_cast<mobile_apis::AppHMIType::eType>(
- array_app_types[i].asUInt())) {
- mobile_projection_enabled_ = true;
+ const auto app_hmi_type = static_cast<mobile_apis::AppHMIType::eType>(
+ array_app_types[i].asUInt());
+
+ switch (app_hmi_type) {
+ case mobile_apis::AppHMIType::NAVIGATION:
+ set_is_navi(true);
+ break;
+ case mobile_apis::AppHMIType::COMMUNICATION:
+ set_voice_communication_supported(true);
+ break;
+ case mobile_apis::AppHMIType::PROJECTION:
+ set_mobile_projection_enabled(true);
+ break;
+ case mobile_apis::AppHMIType::WEB_VIEW:
+ set_webengine_projection_enabled(true);
+ break;
+ default:
+ break;
}
}
}
-void ApplicationImpl::set_is_navi(bool allow) {
- is_navi_ = allow;
+void ApplicationImpl::set_is_navi(bool option) {
+ SDL_LOG_TRACE("option " << std::boolalpha << option);
+ is_navi_ = option;
}
bool ApplicationImpl::is_remote_control_supported() const {
@@ -240,53 +248,51 @@ bool ApplicationImpl::is_voice_communication_supported() const {
return is_voice_communication_application_;
}
-void ApplicationImpl::set_voice_communication_supported(
- bool is_voice_communication_supported) {
- is_voice_communication_application_ = is_voice_communication_supported;
+void ApplicationImpl::set_voice_communication_supported(bool option) {
+ SDL_LOG_TRACE("option " << std::boolalpha << option);
+ is_voice_communication_application_ = option;
}
bool ApplicationImpl::IsAudioApplication() const {
const bool is_audio_app =
is_media_application() || is_voice_communication_supported() || is_navi();
- LOG4CXX_DEBUG(logger_,
- std::boolalpha << "is audio app --> ((is_media_app: "
- << is_media_application() << ")"
- << " || (is_voice_communication_app: "
- << is_voice_communication_supported() << ")"
- << " || (is_navi: " << is_navi() << ")) --> "
- << is_audio_app);
+ SDL_LOG_DEBUG(std::boolalpha
+ << "is audio app --> ((is_media_app: " << is_media_application()
+ << ")"
+ << " || (is_voice_communication_app: "
+ << is_voice_communication_supported() << ")"
+ << " || (is_navi: " << is_navi() << ")) --> " << is_audio_app);
return is_audio_app;
}
bool ApplicationImpl::IsVideoApplication() const {
const bool is_video_app = is_navi() || mobile_projection_enabled();
- LOG4CXX_DEBUG(logger_,
- std::boolalpha
- << "is video app --> ((is_navi: " << is_navi() << ")"
- << " || (mobile_projection: " << mobile_projection_enabled()
- << ")) --> " << is_video_app);
+ SDL_LOG_DEBUG(std::boolalpha
+ << "is video app --> ((is_navi: " << is_navi() << ")"
+ << " || (mobile_projection: " << mobile_projection_enabled()
+ << ")) --> " << is_video_app);
return is_video_app;
}
void ApplicationImpl::SetRegularState(const WindowID window_id,
HmiStatePtr state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
state_.AddState(window_id, state);
}
void ApplicationImpl::RemovePostponedState(const WindowID window_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
state_.RemoveState(window_id, HmiState::STATE_ID_POSTPONED);
}
void ApplicationImpl::SetPostponedState(const WindowID window_id,
HmiStatePtr state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
state_.AddState(window_id, state);
}
void ApplicationImpl::set_mobile_projection_enabled(bool option) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_TRACE("option " << std::boolalpha << option);
mobile_projection_enabled_ = option;
}
@@ -294,22 +300,32 @@ bool ApplicationImpl::mobile_projection_enabled() const {
return mobile_projection_enabled_;
}
+void ApplicationImpl::set_webengine_projection_enabled(const bool option) {
+ SDL_LOG_TRACE("option " << std::boolalpha << option);
+ webengine_projection_enabled_ = option;
+}
+
+bool ApplicationImpl::webengine_projection_enabled() const {
+ return webengine_projection_enabled_;
+}
+
struct StateIDComparator {
HmiState::StateID state_id_;
- StateIDComparator(HmiState::StateID state_id) : state_id_(state_id) {}
- bool operator()(const HmiStatePtr cur) {
+ explicit StateIDComparator(HmiState::StateID state_id)
+ : state_id_(state_id) {}
+ bool operator()(const HmiStatePtr cur) const {
return cur->state_id() == state_id_;
}
};
void ApplicationImpl::AddHMIState(const WindowID window_id, HmiStatePtr state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
state_.AddState(window_id, state);
}
void ApplicationImpl::RemoveHMIState(const WindowID window_id,
HmiState::StateID state_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
state_.RemoveState(window_id, state_id);
}
@@ -324,8 +340,7 @@ const HmiStatePtr ApplicationImpl::RegularHmiState(
}
WindowNames ApplicationImpl::GetWindowNames() const {
- LOG4CXX_DEBUG(logger_,
- "Collecting window names for application " << app_id());
+ SDL_LOG_DEBUG("Collecting window names for application " << app_id());
WindowNames window_names;
std::string stringified_window_names;
@@ -339,13 +354,12 @@ WindowNames ApplicationImpl::GetWindowNames() const {
(stringified_window_names.empty() ? "" : ",") + window_name;
}
- LOG4CXX_DEBUG(logger_,
- "Existing window names: [" + stringified_window_names + "]");
+ SDL_LOG_DEBUG("Existing window names: [" + stringified_window_names + "]");
return window_names;
}
WindowIds ApplicationImpl::GetWindowIds() const {
- LOG4CXX_DEBUG(logger_, "Collecting window IDs for application " << app_id());
+ SDL_LOG_DEBUG("Collecting window IDs for application " << app_id());
return state_.GetWindowIds();
}
@@ -457,12 +471,9 @@ void ApplicationImpl::set_name(const custom_str::CustomString& name) {
app_name_ = name;
}
-void ApplicationImpl::set_is_media_application(bool is_media) {
- is_media_ = is_media;
-}
-
-bool IsTTSState(const HmiStatePtr state) {
- return state->state_id() == HmiState::STATE_ID_TTS_SESSION;
+void ApplicationImpl::set_is_media_application(bool option) {
+ SDL_LOG_TRACE("option " << std::boolalpha << option);
+ is_media_ = option;
}
void ApplicationImpl::set_tts_properties_in_none(bool active) {
@@ -524,13 +535,13 @@ bool ApplicationImpl::audio_streaming_allowed() const {
bool ApplicationImpl::SetVideoConfig(protocol_handler::ServiceType service_type,
const smart_objects::SmartObject& params) {
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (ServiceType::kMobileNav == service_type) {
// See StartStreaming(). We issue SetVideoConfig and StartStream
// only when streaming is not approved yet
if (!video_streaming_approved()) {
- LOG4CXX_TRACE(logger_, "Video streaming not approved");
+ SDL_LOG_TRACE("Video streaming not approved");
MessageHelper::SendNaviSetVideoConfig(
app_id(), application_manager_, params);
return true;
@@ -542,19 +553,19 @@ bool ApplicationImpl::SetVideoConfig(protocol_handler::ServiceType service_type,
void ApplicationImpl::StartStreaming(
protocol_handler::ServiceType service_type) {
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (ServiceType::kMobileNav == service_type) {
- LOG4CXX_TRACE(logger_, "ServiceType = Video");
+ SDL_LOG_TRACE("ServiceType = Video");
if (!video_streaming_approved()) {
- LOG4CXX_TRACE(logger_, "Video streaming not approved");
+ SDL_LOG_TRACE("Video streaming not approved");
MessageHelper::SendNaviStartStream(app_id(), application_manager_);
set_video_stream_retry_number(0);
}
} else if (ServiceType::kAudio == service_type) {
- LOG4CXX_TRACE(logger_, "ServiceType = Audio");
+ SDL_LOG_TRACE("ServiceType = Audio");
if (!audio_streaming_approved()) {
- LOG4CXX_TRACE(logger_, "Audio streaming not approved");
+ SDL_LOG_TRACE("Audio streaming not approved");
MessageHelper::SendAudioStartStream(app_id(), application_manager_);
set_audio_stream_retry_number(0);
}
@@ -564,7 +575,7 @@ void ApplicationImpl::StartStreaming(
void ApplicationImpl::StopStreamingForce(
protocol_handler::ServiceType service_type) {
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// see the comment in StopStreaming()
sync_primitives::AutoLock lock(streaming_stop_lock_);
@@ -581,7 +592,7 @@ void ApplicationImpl::StopStreamingForce(
void ApplicationImpl::StopStreaming(
protocol_handler::ServiceType service_type) {
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// since WakeUpStreaming() is called from another thread, it is possible that
// the stream will be restarted after we call SuspendStreaming() and before
@@ -600,16 +611,22 @@ void ApplicationImpl::StopStreaming(
}
void ApplicationImpl::StopNaviStreaming() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
video_stream_suspend_timer_.Stop();
+ application_manager_.OnAppStreaming(app_id(),
+ protocol_handler::ServiceType::kMobileNav,
+ StreamingState::kStopped);
MessageHelper::SendNaviStopStream(app_id(), application_manager_);
set_video_streaming_approved(false);
set_video_stream_retry_number(0);
}
void ApplicationImpl::StopAudioStreaming() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
audio_stream_suspend_timer_.Stop();
+ application_manager_.OnAppStreaming(app_id(),
+ protocol_handler::ServiceType::kAudio,
+ StreamingState::kStopped);
MessageHelper::SendAudioStopStream(app_id(), application_manager_);
set_audio_streaming_approved(false);
set_audio_stream_retry_number(0);
@@ -618,16 +635,19 @@ void ApplicationImpl::StopAudioStreaming() {
void ApplicationImpl::SuspendStreaming(
protocol_handler::ServiceType service_type) {
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- if (ServiceType::kMobileNav == service_type) {
+ if (ServiceType::kMobileNav == service_type && !video_streaming_suspended_) {
video_stream_suspend_timer_.Stop();
- application_manager_.OnAppStreaming(app_id(), service_type, false);
+ application_manager_.OnAppStreaming(
+ app_id(), service_type, StreamingState::kSuspended);
sync_primitives::AutoLock lock(video_streaming_suspended_lock_);
video_streaming_suspended_ = true;
- } else if (ServiceType::kAudio == service_type) {
+ } else if (ServiceType::kAudio == service_type &&
+ !audio_streaming_suspended_) {
audio_stream_suspend_timer_.Stop();
- application_manager_.OnAppStreaming(app_id(), service_type, false);
+ application_manager_.OnAppStreaming(
+ app_id(), service_type, StreamingState::kSuspended);
sync_primitives::AutoLock lock(audio_streaming_suspended_lock_);
audio_streaming_suspended_ = true;
}
@@ -636,9 +656,9 @@ void ApplicationImpl::SuspendStreaming(
}
void ApplicationImpl::WakeUpStreaming(
- protocol_handler::ServiceType service_type, uint32_t timer_len) {
+ protocol_handler::ServiceType service_type) {
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// See the comment in StopStreaming(). Also, please make sure that we acquire
// streaming_stop_lock_ then xxx_streaming_suspended_lock_ in this order!
@@ -646,44 +666,45 @@ void ApplicationImpl::WakeUpStreaming(
if (ServiceType::kMobileNav == service_type) {
{ // reduce the range of video_streaming_suspended_lock_
- sync_primitives::AutoLock lock(video_streaming_suspended_lock_);
+ sync_primitives::AutoLock auto_lock(video_streaming_suspended_lock_);
if (video_streaming_suspended_) {
- application_manager_.OnAppStreaming(app_id(), service_type, true);
+ application_manager_.OnAppStreaming(
+ app_id(), service_type, StreamingState::kStarted);
application_manager_.ProcessOnDataStreamingNotification(
service_type, app_id(), true);
video_streaming_suspended_ = false;
}
}
- video_stream_suspend_timer_.Start(
- timer_len == 0 ? video_stream_suspend_timeout_ : timer_len,
- timer::kPeriodic);
+
+ video_stream_suspend_timer_.Start(video_stream_suspend_timeout_,
+ timer::kPeriodic);
} else if (ServiceType::kAudio == service_type) {
{ // reduce the range of audio_streaming_suspended_lock_
- sync_primitives::AutoLock lock(audio_streaming_suspended_lock_);
+ sync_primitives::AutoLock auto_lock(audio_streaming_suspended_lock_);
if (audio_streaming_suspended_) {
- application_manager_.OnAppStreaming(app_id(), service_type, true);
+ application_manager_.OnAppStreaming(
+ app_id(), service_type, StreamingState::kStarted);
application_manager_.ProcessOnDataStreamingNotification(
service_type, app_id(), true);
audio_streaming_suspended_ = false;
}
}
- audio_stream_suspend_timer_.Start(
- timer_len == 0 ? audio_stream_suspend_timeout_ : timer_len,
- timer::kPeriodic);
+ audio_stream_suspend_timer_.Start(audio_stream_suspend_timeout_,
+ timer::kPeriodic);
}
}
void ApplicationImpl::OnVideoStreamSuspend() {
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_INFO(logger_, "Suspend video streaming by timer");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_INFO("Suspend video streaming by timer");
SuspendStreaming(ServiceType::kMobileNav);
}
void ApplicationImpl::OnAudioStreamSuspend() {
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_INFO(logger_, "Suspend audio streaming by timer");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_INFO("Suspend audio streaming by timer");
SuspendStreaming(ServiceType::kAudio);
}
@@ -769,6 +790,15 @@ bool ApplicationImpl::set_activated(bool is_active) {
return true;
}
+bool ApplicationImpl::is_ready() const {
+ return is_ready_;
+}
+
+bool ApplicationImpl::set_is_ready(bool is_ready) {
+ is_ready_ = is_ready;
+ return true;
+}
+
void ApplicationImpl::set_protocol_version(
const protocol_handler::MajorProtocolVersion& protocol_version) {
protocol_version_ = protocol_version;
@@ -799,8 +829,7 @@ mobile_api::HMILevel::eType ApplicationImpl::deferred_resumption_hmi_level()
bool ApplicationImpl::AddFile(const AppFile& file) {
if (app_files_.count(file.file_name) == 0) {
- LOG4CXX_INFO(logger_,
- "AddFile file " << file.file_name << " File type is "
+ SDL_LOG_INFO("AddFile file " << file.file_name << " File type is "
<< file.file_type);
app_files_[file.file_name] = file;
return true;
@@ -810,8 +839,7 @@ bool ApplicationImpl::AddFile(const AppFile& file) {
bool ApplicationImpl::UpdateFile(const AppFile& file) {
if (app_files_.count(file.file_name) != 0) {
- LOG4CXX_INFO(logger_,
- "UpdateFile file " << file.file_name << " File type is "
+ SDL_LOG_INFO("UpdateFile file " << file.file_name << " File type is "
<< file.file_type);
app_files_[file.file_name] = file;
return true;
@@ -822,8 +850,7 @@ bool ApplicationImpl::UpdateFile(const AppFile& file) {
bool ApplicationImpl::DeleteFile(const std::string& file_name) {
AppFilesMap::iterator it = app_files_.find(file_name);
if (it != app_files_.end()) {
- LOG4CXX_INFO(logger_,
- "DeleteFile file " << it->second.file_name << " File type is "
+ SDL_LOG_INFO("DeleteFile file " << it->second.file_name << " File type is "
<< it->second.file_type);
app_files_.erase(it);
return true;
@@ -881,8 +908,7 @@ bool ApplicationImpl::AreCommandLimitsExceeded(
CommandNumberTimeLimit::iterator it =
cmd_number_to_time_limits_.find(cmd_id);
if (cmd_number_to_time_limits_.end() == it) {
- LOG4CXX_WARN(logger_,
- "Limits for command id " << cmd_id << "had not been set.");
+ SDL_LOG_WARN("Limits for command id " << cmd_id << "had not been set.");
return true;
}
@@ -898,19 +924,18 @@ bool ApplicationImpl::AreCommandLimitsExceeded(
frequency_restrictions =
application_manager_.get_settings().get_vehicle_data_frequency();
} else {
- LOG4CXX_INFO(logger_, "No restrictions for request");
+ SDL_LOG_INFO("No restrictions for request");
return false;
}
- LOG4CXX_INFO(logger_,
- "Time Info: "
- << "\n Current: " << date_time::getSecs(current)
- << "\n Limit: (" << date_time::getSecs(limit.first)
- << "," << limit.second
- << ")"
- "\n frequency_restrictions: ("
- << frequency_restrictions.first << ","
- << frequency_restrictions.second << ")");
+ SDL_LOG_INFO("Time Info: "
+ << "\n Current: " << date_time::getSecs(current)
+ << "\n Limit: (" << date_time::getSecs(limit.first) << ","
+ << limit.second
+ << ")"
+ "\n frequency_restrictions: ("
+ << frequency_restrictions.first << ","
+ << frequency_restrictions.second << ")");
if (date_time::getSecs(current) <
date_time::getSecs(limit.first) + frequency_restrictions.second) {
if (limit.second < frequency_restrictions.first) {
@@ -922,10 +947,7 @@ bool ApplicationImpl::AreCommandLimitsExceeded(
limit.first = current;
limit.second = 1;
-
return false;
-
- break;
}
// In case of policy table values, there is EVEN limitation for number of
// commands per minute, e.g. 10 command per minute i.e. 1 command per 6 sec
@@ -934,7 +956,10 @@ bool ApplicationImpl::AreCommandLimitsExceeded(
application_manager_.GetPolicyHandler();
std::string priority;
policy_handler.GetPriority(policy_app_id(), &priority);
- uint32_t cmd_limit = policy_handler.GetNotificationsNumber(priority);
+ const bool is_subtle_alert =
+ (cmd_id == mobile_apis::FunctionID::SubtleAlertID);
+ uint32_t cmd_limit =
+ policy_handler.GetNotificationsNumber(priority, is_subtle_alert);
if (0 == cmd_limit) {
return true;
@@ -963,10 +988,9 @@ bool ApplicationImpl::AreCommandLimitsExceeded(
cmd_number_to_time_limits_[cmd_id] = {current, dummy_limit};
return false;
- break;
}
default: {
- LOG4CXX_WARN(logger_, "Limit source is not implemented.");
+ SDL_LOG_WARN("Limit source is not implemented.");
break;
}
}
@@ -999,7 +1023,7 @@ void ApplicationImpl::set_is_application_data_changed(
}
void ApplicationImpl::UpdateHash() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
hash_val_ =
utils::gen_hash(application_manager_.get_settings().hash_string_size());
set_is_application_data_changed(true);
@@ -1036,7 +1060,7 @@ void ApplicationImpl::CleanupFiles() {
app_files_it = app_files_.find(file_name);
if ((app_files_it == app_files_.end()) ||
(!app_files_it->second.is_persistent)) {
- LOG4CXX_INFO(logger_, "DeleteFile file " << file_name);
+ SDL_LOG_INFO("DeleteFile file " << file_name);
file_system::DeleteFile(file_name);
}
}
@@ -1088,9 +1112,8 @@ void ApplicationImpl::LoadPersistentFiles() {
file.file_type = StringToFileType(file_type.c_str());
}
- LOG4CXX_INFO(logger_,
- "Loaded persistent file "
- << file.file_name << " File type is " << file.file_type);
+ SDL_LOG_INFO("Loaded persistent file "
+ << file.file_name << " File type is " << file.file_type);
AddFile(file);
}
}
@@ -1143,16 +1166,16 @@ void ApplicationImpl::SubscribeToSoftButtons(
struct FindSoftButtonId {
uint32_t soft_button_id_;
- FindSoftButtonId(const uint32_t soft_button_id)
+ explicit FindSoftButtonId(const uint32_t soft_button_id)
: soft_button_id_(soft_button_id) {}
- bool operator()(const std::pair<uint32_t, WindowID>& element) {
+ bool operator()(const std::pair<uint32_t, WindowID>& element) const {
return soft_button_id_ == element.first;
}
};
bool ApplicationImpl::IsSubscribedToSoftButton(const uint32_t softbutton_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(cmd_softbuttonid_lock_);
CommandSoftButtonID::iterator it = cmd_softbuttonid_.begin();
for (; it != cmd_softbuttonid_.end(); ++it) {
@@ -1168,7 +1191,7 @@ bool ApplicationImpl::IsSubscribedToSoftButton(const uint32_t softbutton_id) {
}
WindowID ApplicationImpl::GetSoftButtonWindowID(const uint32_t softbutton_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(cmd_softbuttonid_lock_);
CommandSoftButtonID::iterator it = cmd_softbuttonid_.begin();
@@ -1204,9 +1227,9 @@ void ApplicationImpl::set_audio_streaming_state(
const mobile_api::AudioStreamingState::eType& state) {
if (!(is_media_application() || is_navi()) &&
state != mobile_api::AudioStreamingState::NOT_AUDIBLE) {
- LOG4CXX_WARN(logger_,
- "Trying to set audio streaming state"
- " for non-media application to different from NOT_AUDIBLE");
+ SDL_LOG_WARN(
+ "Trying to set audio streaming state"
+ " for non-media application to different from NOT_AUDIBLE");
return;
}
@@ -1233,7 +1256,7 @@ void ApplicationImpl::set_hmi_level(
DCHECK_OR_RETURN_VOID(app)
application_manager_.state_controller().SetRegularState(
app, window_id, new_hmi_level);
- LOG4CXX_INFO(logger_, "hmi_level = " << new_hmi_level);
+ SDL_LOG_INFO("hmi_level = " << new_hmi_level);
usage_report_.RecordHmiStateChanged(new_hmi_level);
}
@@ -1244,12 +1267,13 @@ AppExtensionPtr ApplicationImpl::QueryInterface(AppExtensionUID uid) {
return (*it);
}
}
-
return AppExtensionPtr();
}
bool ApplicationImpl::AddExtension(AppExtensionPtr extension) {
if (!QueryInterface(extension->uid())) {
+ SDL_LOG_TRACE("Add extenstion to add id" << app_id() << " with uid "
+ << extension->uid());
extensions_.push_back(extension);
return true;
}
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index e6705a4d8e..6b0ea39804 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -117,8 +117,7 @@ DeviceTypes devicesType = {
bool device_id_comparator(const std::string& device_id,
ApplicationSharedPtr app) {
DCHECK_OR_RETURN(app, false);
- LOG4CXX_DEBUG(logger_,
- "Data to compare: device_id : " << device_id << " app mac: "
+ SDL_LOG_DEBUG("Data to compare: device_id : " << device_id << " app mac: "
<< app->mac_address());
return device_id == app->mac_address();
@@ -228,9 +227,9 @@ ApplicationManagerImpl::ApplicationManagerImpl(
}
ApplicationManagerImpl::~ApplicationManagerImpl() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- is_stopping_ = true;
+ is_stopping_.store(true);
SendOnSDLClose();
media_manager_ = NULL;
hmi_handler_ = NULL;
@@ -244,7 +243,7 @@ ApplicationManagerImpl::~ApplicationManagerImpl() {
mobile_so_factory_ = NULL;
}
protocol_handler_ = NULL;
- LOG4CXX_DEBUG(logger_, "Destroying Policy Handler");
+ SDL_LOG_DEBUG("Destroying Policy Handler");
RemovePolicyObserver(this);
{
@@ -354,16 +353,17 @@ ApplicationSharedPtr ApplicationManagerImpl::get_full_or_limited_application()
return FindApp(accessor, FullOrLimitedAppPredicate);
}
-bool LimitedAppPredicate(const ApplicationSharedPtr app) {
- return app ? app->hmi_level(mobile_api::PredefinedWindows::DEFAULT_WINDOW) ==
- mobile_api::HMILevel::HMI_LIMITED
+bool LimitedMediaAppPredicate(const ApplicationSharedPtr app) {
+ return app ? (app->is_media_application() &&
+ app->hmi_level(mobile_api::PredefinedWindows::DEFAULT_WINDOW) ==
+ mobile_api::HMILevel::HMI_LIMITED)
: false;
}
ApplicationSharedPtr ApplicationManagerImpl::get_limited_media_application()
const {
DataAccessor<ApplicationSet> accessor = applications();
- return FindApp(accessor, LimitedAppPredicate);
+ return FindApp(accessor, LimitedMediaAppPredicate);
}
bool LimitedNaviAppPredicate(const ApplicationSharedPtr app) {
@@ -463,7 +463,7 @@ void ApplicationManagerImpl::IviInfoUpdated(const std::string& vehicle_info,
}
void ApplicationManagerImpl::OnApplicationRegistered(ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
sync_primitives::AutoLock lock(applications_list_lock_ptr_);
const mobile_apis::HMILevel::eType default_level = GetDefaultHmiLevel(app);
@@ -471,14 +471,14 @@ void ApplicationManagerImpl::OnApplicationRegistered(ApplicationSharedPtr app) {
}
void ApplicationManagerImpl::OnApplicationSwitched(ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
commands_holder_->Resume(app, CommandHolder::CommandType::kMobileCommand);
commands_holder_->Resume(app, CommandHolder::CommandType::kHmiCommand);
}
bool ApplicationManagerImpl::IsAppTypeExistsInFullOrLimited(
ApplicationConstSharedPtr app) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool voice_state = app->is_voice_communication_supported();
bool media_state = app->is_media_application();
bool navi_state = app->is_navi();
@@ -546,7 +546,7 @@ bool ApplicationManagerImpl::IsAppTypeExistsInFullOrLimited(
ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
const std::shared_ptr<smart_objects::SmartObject>&
request_for_registration) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject& message = *request_for_registration;
uint32_t connection_key =
@@ -561,7 +561,7 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
DCHECK_OR_RETURN(connection_handler_, ApplicationSharedPtr());
if (connection_handler().get_session_observer().GetDataOnSessionKey(
connection_key, &app_id, &sessions_list, &device_id) == -1) {
- LOG4CXX_ERROR(logger_, "Failed to create application: no connection info.");
+ SDL_LOG_ERROR("Failed to create application: no connection info.");
std::shared_ptr<smart_objects::SmartObject> response(
MessageHelper::CreateNegativeResponse(
connection_key,
@@ -581,20 +581,18 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
std::string connection_type;
if (connection_handler().get_session_observer().GetDataOnDeviceID(
device_id, NULL, NULL, &device_mac, &connection_type) == -1) {
- LOG4CXX_DEBUG(logger_, "Failed to extract device mac for id " << device_id);
+ SDL_LOG_DEBUG("Failed to extract device mac for id " << device_id);
} else {
- LOG4CXX_DEBUG(logger_,
- "Device mac for id" << device_id << " is " << device_mac);
+ SDL_LOG_DEBUG("Device mac for id " << device_id << " is " << device_mac);
}
- LOG4CXX_DEBUG(logger_, "Restarting application list update timer");
+ SDL_LOG_DEBUG("Restarting application list update timer");
GetPolicyHandler().OnAppsSearchStarted();
uint32_t timeout = get_settings().application_list_update_timeout();
application_list_update_timer_.Start(timeout, timer::kSingleShot);
if (!is_all_apps_allowed_) {
- LOG4CXX_WARN(logger_,
- "RegisterApplication: access to app's disabled by user");
+ SDL_LOG_WARN("RegisterApplication: access to app's disabled by user");
std::shared_ptr<smart_objects::SmartObject> response(
MessageHelper::CreateNegativeResponse(
connection_key,
@@ -695,9 +693,9 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
bool is_mismatched_cloud_app = false;
if (apps_to_register_.end() == it) {
- DevicePredicate finder(application->device());
+ DevicePredicate device_finder(application->device());
it = std::find_if(
- apps_to_register_.begin(), apps_to_register_.end(), finder);
+ apps_to_register_.begin(), apps_to_register_.end(), device_finder);
bool found = apps_to_register_.end() != it;
is_mismatched_cloud_app = found && (*it)->is_cloud_app() &&
@@ -757,6 +755,11 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
// Timer will be started after hmi level resumption.
resume_controller().OnAppRegistrationStart(policy_app_id, device_mac);
+ return application;
+}
+
+void ApplicationManagerImpl::FinalizeAppRegistration(
+ ApplicationSharedPtr application, const uint32_t connection_key) {
AddAppToRegisteredAppList(application);
// Update cloud app information, in case any pending apps are unable to be
@@ -774,16 +777,14 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
connection_handler::DeviceHandle secondary_device_handle = itr->second;
application->set_secondary_device(secondary_device_handle);
}
-
- return application;
}
bool ApplicationManagerImpl::ActivateApplication(ApplicationSharedPtr app) {
using namespace mobile_api;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN(app, false);
- LOG4CXX_DEBUG(logger_, "Activating application with id:" << app->app_id());
+ SDL_LOG_DEBUG("Activating application with id: " << app->app_id());
// Remove from resumption if app was activated by user
resume_controller().OnAppActivated(app);
@@ -799,9 +800,9 @@ bool ApplicationManagerImpl::ActivateApplication(ApplicationSharedPtr app) {
mobile_api::HMILevel::eType ApplicationManagerImpl::IsHmiLevelFullAllowed(
ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!app) {
- LOG4CXX_ERROR(logger_, "Application pointer invalid");
+ SDL_LOG_ERROR("Application pointer invalid");
NOTREACHED();
return mobile_api::HMILevel::INVALID_ENUM;
}
@@ -818,36 +819,32 @@ mobile_api::HMILevel::eType ApplicationManagerImpl::IsHmiLevelFullAllowed(
} else if (is_active_app_exist && (!is_audio_app)) {
result = GetDefaultHmiLevel(app);
}
- LOG4CXX_ERROR(
- logger_,
- "is_audio_app : " << is_audio_app
- << "; does_audio_app_with_same_type_exist : "
- << does_audio_app_with_same_type_exist
- << "; is_active_app_exist : " << is_active_app_exist
- << "; result : " << result);
+ SDL_LOG_ERROR("is_audio_app : "
+ << is_audio_app << "; does_audio_app_with_same_type_exist : "
+ << does_audio_app_with_same_type_exist
+ << "; is_active_app_exist : " << is_active_app_exist
+ << "; result : " << result);
return result;
}
void ApplicationManagerImpl::ConnectToDevice(const std::string& device_mac) {
// TODO(VS): Call function from ConnectionHandler
if (!connection_handler_) {
- LOG4CXX_WARN(logger_, "Connection handler is not set.");
+ SDL_LOG_WARN("Connection handler is not set.");
return;
}
connection_handler::DeviceHandle handle;
if (!connection_handler().GetDeviceID(device_mac, &handle)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Attempt to connect to invalid device with mac:" << device_mac);
return;
}
connection_handler().ConnectToDevice(handle);
}
-void ApplicationManagerImpl::OnHMIStartedCooperation() {
- LOG4CXX_AUTO_TRACE(logger_);
- hmi_cooperating_ = true;
+void ApplicationManagerImpl::OnHMIReady() {
+ SDL_LOG_AUTO_TRACE();
#ifdef WEBSOCKET_SERVER_TRANSPORT_SUPPORT
connection_handler_->CreateWebEngineDevice();
@@ -855,6 +852,29 @@ void ApplicationManagerImpl::OnHMIStartedCooperation() {
MessageHelper::SendGetSystemInfoRequest(*this);
+ std::shared_ptr<smart_objects::SmartObject> is_navi_ready(
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::Navigation_IsReady, *this));
+ rpc_service_->ManageHMICommand(is_navi_ready);
+
+ std::shared_ptr<smart_objects::SmartObject> mixing_audio_supported_request(
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::BasicCommunication_MixingAudioSupported,
+ *this));
+ rpc_service_->ManageHMICommand(mixing_audio_supported_request);
+ resume_controller().ResetLaunchTime();
+
+ RefreshCloudAppInformation();
+ policy_handler_->TriggerPTUOnStartupIfRequired();
+}
+
+void ApplicationManagerImpl::RequestForInterfacesAvailability() {
+ SDL_LOG_AUTO_TRACE();
+ std::shared_ptr<smart_objects::SmartObject> is_ivi_ready(
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::VehicleInfo_IsReady, *this));
+ rpc_service_->ManageHMICommand(is_ivi_ready);
+
std::shared_ptr<smart_objects::SmartObject> is_vr_ready(
MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::VR_IsReady,
*this));
@@ -870,34 +890,18 @@ void ApplicationManagerImpl::OnHMIStartedCooperation() {
*this));
rpc_service_->ManageHMICommand(is_ui_ready);
- std::shared_ptr<smart_objects::SmartObject> is_navi_ready(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::Navigation_IsReady, *this));
- rpc_service_->ManageHMICommand(is_navi_ready);
-
- std::shared_ptr<smart_objects::SmartObject> is_ivi_ready(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::VehicleInfo_IsReady, *this));
- rpc_service_->ManageHMICommand(is_ivi_ready);
-
std::shared_ptr<smart_objects::SmartObject> is_rc_ready(
MessageHelper::CreateModuleInfoSO(hmi_apis::FunctionID::RC_IsReady,
*this));
rpc_service_->ManageHMICommand(is_rc_ready);
- std::shared_ptr<smart_objects::SmartObject> button_capabilities(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::Buttons_GetCapabilities, *this));
- rpc_service_->ManageHMICommand(button_capabilities);
-
- std::shared_ptr<smart_objects::SmartObject> mixing_audio_supported_request(
- MessageHelper::CreateModuleInfoSO(
- hmi_apis::FunctionID::BasicCommunication_MixingAudioSupported,
- *this));
- rpc_service_->ManageHMICommand(mixing_audio_supported_request);
- resume_controller().ResetLaunchTime();
-
- RefreshCloudAppInformation();
+ if (hmi_capabilities_->IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::Buttons_GetCapabilities)) {
+ std::shared_ptr<smart_objects::SmartObject> button_capabilities(
+ MessageHelper::CreateModuleInfoSO(
+ hmi_apis::FunctionID::Buttons_GetCapabilities, *this));
+ rpc_service_->ManageHMICommand(button_capabilities);
+ }
}
std::string ApplicationManagerImpl::PolicyIDByIconUrl(const std::string url) {
@@ -906,7 +910,7 @@ std::string ApplicationManagerImpl::PolicyIDByIconUrl(const std::string url) {
auto policy_id = x.first;
std::string icon_url = GetPolicyHandler().GetIconUrl(policy_id);
if (icon_url == url) {
- LOG4CXX_DEBUG(logger_, "Matched icon url: " << url);
+ SDL_LOG_DEBUG("Matched icon url: " << url);
x.second.pending_request = false;
return policy_id;
}
@@ -931,7 +935,7 @@ void ApplicationManagerImpl::SetIconFileFromSystemRequest(
const std::string app_icon_dir(settings_.app_icons_folder());
const std::string full_icon_path(app_icon_dir + "/" + policy_id);
if (file_system::FileExists(full_icon_path)) {
- LOG4CXX_DEBUG(logger_, "Set Icon Path: " << full_icon_path);
+ SDL_LOG_DEBUG("Set Icon Path: " << full_icon_path);
AppFile file;
file.is_persistent = true;
file.is_download_complete = true;
@@ -956,14 +960,14 @@ void ApplicationManagerImpl::SetIconFileFromSystemRequest(
void ApplicationManagerImpl::DisconnectCloudApp(ApplicationSharedPtr app) {
#if !defined(CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT)
- LOG4CXX_TRACE(logger_, "Cloud app support is disabled. Exiting function");
+ SDL_LOG_TRACE("Cloud app support is disabled. Exiting function");
return;
#else
std::string policy_app_id = app->policy_app_id();
policy::AppProperties app_properties;
GetPolicyHandler().GetAppProperties(policy_app_id, app_properties);
if (app->IsRegistered() && app->is_cloud_app()) {
- LOG4CXX_DEBUG(logger_, "Disabled app is registered, unregistering now");
+ SDL_LOG_DEBUG("Disabled app is registered, unregistering now");
GetRPCService().ManageMobileCommand(
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
app->app_id(),
@@ -983,17 +987,17 @@ void ApplicationManagerImpl::DisconnectCloudApp(ApplicationSharedPtr app) {
app_properties.transport_type,
app_properties.hybrid_app_preference};
// Create device in pending state
- LOG4CXX_DEBUG(logger_, "Re-adding the cloud app device");
+ SDL_LOG_DEBUG("Re-adding the cloud app device");
connection_handler().AddCloudAppDevice(policy_app_id, properties);
#endif // CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT
}
void ApplicationManagerImpl::RefreshCloudAppInformation() {
#if !defined(CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT)
- LOG4CXX_TRACE(logger_, "Cloud app support is disabled. Exiting function");
+ SDL_LOG_TRACE("Cloud app support is disabled. Exiting function");
return;
#else
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (is_stopping()) {
return;
}
@@ -1029,7 +1033,7 @@ void ApplicationManagerImpl::RefreshCloudAppInformation() {
GetPolicyHandler().GetInitialAppData(policy_id, &nicknames, &app_hmi_types);
if (nicknames.empty()) {
- LOG4CXX_ERROR(logger_, "Cloud App missing nickname");
+ SDL_LOG_ERROR("Cloud App missing nickname");
continue;
} else if (mobile_apis::HybridAppPreference::MOBILE ==
hybrid_app_preference) {
@@ -1039,9 +1043,8 @@ void ApplicationManagerImpl::RefreshCloudAppInformation() {
auto apps = applications_by_name(*nickname_it);
for (auto app : apps) {
if (app.use_count() != 0 && !app->is_cloud_app()) {
- LOG4CXX_ERROR(logger_,
- "Mobile app already registered for cloud app: "
- << *nickname_it);
+ SDL_LOG_ERROR("Mobile app already registered for cloud app: "
+ << *nickname_it);
duplicate_found = true;
break;
}
@@ -1077,13 +1080,13 @@ void ApplicationManagerImpl::RefreshCloudAppInformation() {
std::string url = GetPolicyHandler().GetIconUrl(policy_id);
if (url.empty()) {
- LOG4CXX_DEBUG(logger_, "No Icon Url for cloud app");
+ SDL_LOG_DEBUG("No Icon Url for cloud app");
continue;
}
auto app_icon_it = app_icon_map_.find(policy_id);
if (app_icon_it != app_icon_map_.end()) {
- LOG4CXX_DEBUG(logger_, "Cloud App Already Exists in Icon Map");
+ SDL_LOG_DEBUG("Cloud App Already Exists in Icon Map");
continue;
}
@@ -1091,8 +1094,7 @@ void ApplicationManagerImpl::RefreshCloudAppInformation() {
const std::string full_icon_path(app_icon_dir + "/" + policy_id);
if (!file_system::FileExists(full_icon_path)) {
AppIconInfo icon_info(app_properties.endpoint, false);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Inserting cloud app into icon map: " << app_icon_map_.size());
app_icon_map_.insert(
std::pair<std::string, AppIconInfo>(policy_id, icon_info));
@@ -1115,9 +1117,8 @@ void ApplicationManagerImpl::RefreshCloudAppInformation() {
ApplicationSet::iterator it = std::find_if(
apps_to_register_.begin(), apps_to_register_.end(), finder);
if (it == apps_to_register_.end()) {
- LOG4CXX_DEBUG(
- logger_,
- "Unable to find app to remove (" << policy_app_id << "), skipping");
+ SDL_LOG_DEBUG("Unable to find app to remove (" << policy_app_id
+ << "), skipping");
continue;
}
app = *it;
@@ -1126,7 +1127,7 @@ void ApplicationManagerImpl::RefreshCloudAppInformation() {
// If the disabled app is registered, unregistered it before destroying the
// device
if (app->IsRegistered() && app->is_cloud_app()) {
- LOG4CXX_DEBUG(logger_, "Disabled app is registered, unregistering now");
+ SDL_LOG_DEBUG("Disabled app is registered, unregistering now");
GetRPCService().ManageMobileCommand(
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
app->app_id(),
@@ -1142,7 +1143,7 @@ void ApplicationManagerImpl::RefreshCloudAppInformation() {
// Update app list if disabled apps were removed
if (removed_app_count > 0) {
- LOG4CXX_DEBUG(logger_, "Removed " << removed_app_count << " disabled apps");
+ SDL_LOG_DEBUG("Removed " << removed_app_count << " disabled apps");
SendUpdateAppList();
}
#endif // CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT
@@ -1152,7 +1153,7 @@ void ApplicationManagerImpl::CreatePendingApplication(
const transport_manager::ConnectionUID connection_id,
const transport_manager::DeviceInfo& device_info,
connection_handler::DeviceHandle device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::string name = device_info.name();
pending_device_map_lock_ptr_->Acquire();
@@ -1172,7 +1173,7 @@ void ApplicationManagerImpl::CreatePendingApplication(
policy_app_id, &nicknames, &app_hmi_types);
if (nicknames.empty()) {
- LOG4CXX_ERROR(logger_, "Cloud App missing nickname");
+ SDL_LOG_ERROR("Cloud App missing nickname");
return;
}
@@ -1188,7 +1189,7 @@ void ApplicationManagerImpl::CreatePendingApplication(
*this));
if (!application) {
- LOG4CXX_INFO(logger_, "Could not create application");
+ SDL_LOG_INFO("Could not create application");
return;
}
@@ -1208,9 +1209,8 @@ void ApplicationManagerImpl::CreatePendingApplication(
&hybrid_app_preference_enum);
if (!app_properties.hybrid_app_preference.empty() && !convert_result) {
- LOG4CXX_ERROR(logger_,
- "Could not convert string to enum: "
- << app_properties.hybrid_app_preference);
+ SDL_LOG_ERROR("Could not convert string to enum: "
+ << app_properties.hybrid_app_preference);
return;
}
@@ -1221,34 +1221,33 @@ void ApplicationManagerImpl::CreatePendingApplication(
application->set_hybrid_app_preference(hybrid_app_preference_enum);
application->set_cloud_app_certificate(app_properties.certificate);
- sync_primitives::AutoLock lock(apps_to_register_list_lock_ptr_);
- LOG4CXX_DEBUG(logger_,
- "apps_to_register_ size before: " << apps_to_register_.size());
- apps_to_register_.insert(application);
- LOG4CXX_DEBUG(logger_,
- "apps_to_register_ size after: " << apps_to_register_.size());
+ {
+ sync_primitives::AutoLock lock(apps_to_register_list_lock_ptr_);
+ SDL_LOG_DEBUG(
+ "apps_to_register_ size before: " << apps_to_register_.size());
+ apps_to_register_.insert(application);
+ SDL_LOG_DEBUG("apps_to_register_ size after: " << apps_to_register_.size());
+ }
SendUpdateAppList();
}
void ApplicationManagerImpl::RemovePendingApplication(
const std::string& policy_app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(apps_to_register_list_lock_ptr_);
PolicyAppIdPredicate finder(policy_app_id);
auto app_it =
std::find_if(apps_to_register_.begin(), apps_to_register_.end(), finder);
if (apps_to_register_.end() == app_it) {
- LOG4CXX_WARN(
- logger_,
- "Unable to find app to remove (" << policy_app_id << "), skipping");
+ SDL_LOG_WARN("Unable to find app to remove (" << policy_app_id
+ << "), skipping");
return;
}
apps_to_register_.erase(app_it);
- LOG4CXX_DEBUG(logger_,
- "Remove " << policy_app_id
+ SDL_LOG_DEBUG("Remove " << policy_app_id
<< " from apps_to_register_. new size = "
<< apps_to_register_.size());
}
@@ -1262,8 +1261,7 @@ void ApplicationManagerImpl::CreatePendingLocalApplication(
policy_app_id, &nicknames, &app_hmi_types);
if (nicknames.empty()) {
- LOG4CXX_ERROR(logger_,
- "Cloud/Web App " << policy_app_id << "missing nickname");
+ SDL_LOG_ERROR("Cloud/Web App " << policy_app_id << " missing nickname");
return;
}
@@ -1295,9 +1293,8 @@ void ApplicationManagerImpl::CreatePendingLocalApplication(
&hybrid_app_preference_enum);
if (!app_properties.hybrid_app_preference.empty() && !convert_result) {
- LOG4CXX_ERROR(logger_,
- "Could not convert string to enum: "
- << app_properties.hybrid_app_preference);
+ SDL_LOG_ERROR("Could not convert string to enum: "
+ << app_properties.hybrid_app_preference);
return;
}
@@ -1310,18 +1307,17 @@ void ApplicationManagerImpl::CreatePendingLocalApplication(
sync_primitives::AutoLock lock(apps_to_register_list_lock_ptr_);
apps_to_register_.insert(application);
- LOG4CXX_DEBUG(logger_,
- "Insert " << application->name().c_str()
+ SDL_LOG_DEBUG("Insert " << application->name().c_str()
<< " to apps_to_register_. new size = "
<< apps_to_register_.size());
}
void ApplicationManagerImpl::OnWebEngineDeviceCreated() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto enabled_local_apps = policy_handler_->GetEnabledLocalApps();
if (enabled_local_apps.empty()) {
- LOG4CXX_DEBUG(logger_, "No enabled local apps present");
+ SDL_LOG_DEBUG("No enabled local apps present");
return;
}
@@ -1349,17 +1345,14 @@ void ApplicationManagerImpl::SetPendingApplicationState(
if (!app) {
return;
}
- LOG4CXX_DEBUG(logger_,
- "Unregister application and move into apps_to_register");
+ SDL_LOG_DEBUG("Unregister application and move into apps_to_register");
UnregisterApplication(
app->app_id(), mobile_apis::Result::INVALID_ENUM, true, true);
app->MarkUnregistered();
- {
- sync_primitives::AutoLock lock(apps_to_register_list_lock_ptr_);
- apps_to_register_.insert(app);
- }
+ sync_primitives::AutoLock lock(apps_to_register_list_lock_ptr_);
+ apps_to_register_.insert(app);
}
void ApplicationManagerImpl::OnConnectionStatusUpdated() {
@@ -1466,15 +1459,20 @@ void ApplicationManagerImpl::StartAudioPassThruThread(int32_t session_key,
int32_t sampling_rate,
int32_t bits_per_sample,
int32_t audio_type) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_INFO(logger_, "START MICROPHONE RECORDER");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_INFO("START MICROPHONE RECORDER");
DCHECK_OR_RETURN_VOID(media_manager_);
media_manager_->StartMicrophoneRecording(
- session_key, get_settings().recording_file_name(), max_duration);
+ session_key,
+ get_settings().recording_file_name(),
+ max_duration,
+ static_cast<mobile_apis::SamplingRate::eType>(sampling_rate),
+ static_cast<mobile_apis::BitsPerSample::eType>(bits_per_sample),
+ static_cast<mobile_apis::AudioType::eType>(audio_type));
}
void ApplicationManagerImpl::StopAudioPassThru(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(audio_pass_thru_lock_);
DCHECK_OR_RETURN_VOID(media_manager_);
media_manager_->StopMicrophoneRecording(application_key);
@@ -1486,9 +1484,9 @@ std::string ApplicationManagerImpl::GetDeviceName(
std::string device_name = "";
if (connection_handler().get_session_observer().GetDataOnDeviceID(
handle, &device_name, NULL, NULL, NULL) == -1) {
- LOG4CXX_ERROR(logger_, "Failed to extract device name for id " << handle);
+ SDL_LOG_ERROR("Failed to extract device name for id " << handle);
} else {
- LOG4CXX_DEBUG(logger_, "\t\t\t\t\tDevice name is " << device_name);
+ SDL_LOG_DEBUG("\t\t\t\t\tDevice name is " << device_name);
}
return device_name;
@@ -1504,7 +1502,7 @@ ApplicationManagerImpl::GetDeviceTransportType(
if (it != devicesType.end()) {
return devicesType[transport_type];
} else {
- LOG4CXX_ERROR(logger_, "Unknown transport type " << transport_type);
+ SDL_LOG_ERROR("Unknown transport type " << transport_type);
}
return result;
@@ -1554,7 +1552,7 @@ std::string ApplicationManagerImpl::GetCorrectMobileIDFromMessage(
if ((*message)[strings::msg_params].keyExists(strings::full_app_id)) {
return (*message)[strings::msg_params][strings::full_app_id].asString();
} else {
- LOG4CXX_DEBUG(logger_, "UseFullAppID is on but only short ID given!");
+ SDL_LOG_DEBUG("UseFullAppID is on but only short ID given!");
}
}
// If core isn't using full or no full given, use regular appID
@@ -1575,7 +1573,7 @@ void application_manager::ApplicationManagerImpl::MarkAppsGreyOut(
void ApplicationManagerImpl::OnDeviceListUpdated(
const connection_handler::DeviceMap& device_list) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// add device to policy DB
connection_handler::DeviceMap::const_iterator it = device_list.begin();
@@ -1599,7 +1597,7 @@ void ApplicationManagerImpl::OnDeviceListUpdated(
smart_objects::SmartObjectSPtr msg_params =
MessageHelper::CreateDeviceListSO(device_list, GetPolicyHandler(), *this);
if (!msg_params) {
- LOG4CXX_WARN(logger_, "Failed to create sub-smart object.");
+ SDL_LOG_WARN("Failed to create sub-smart object.");
return;
}
@@ -1620,7 +1618,7 @@ void ApplicationManagerImpl::OnDeviceListUpdated(
void ApplicationManagerImpl::OnFindNewApplicationsRequest() {
connection_handler().ConnectToAllDevices();
- LOG4CXX_DEBUG(logger_, "Starting application list update timer");
+ SDL_LOG_DEBUG("Starting application list update timer");
uint32_t timeout = get_settings().application_list_update_timeout();
application_list_update_timer_.Start(timeout, timer::kSingleShot);
GetPolicyHandler().OnAppsSearchStarted();
@@ -1628,13 +1626,13 @@ void ApplicationManagerImpl::OnFindNewApplicationsRequest() {
void ApplicationManagerImpl::OnQueryAppsRequest(
const connection_handler::DeviceHandle device) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(query_apps_devices_lock_);
query_apps_devices_.insert(device);
}
void ApplicationManagerImpl::SendUpdateAppList() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace smart_objects;
using namespace hmi_apis;
@@ -1645,18 +1643,21 @@ void ApplicationManagerImpl::SendUpdateAppList() {
(*request)[strings::msg_params][strings::applications] =
SmartObject(SmartType_Array);
- SmartObject& applications =
+ SmartObject& applications_so =
(*request)[strings::msg_params][strings::applications];
- PrepareApplicationListSO(applications_, applications, *this);
- PrepareApplicationListSO(apps_to_register_, applications, *this);
+ const auto applications_list = applications().GetData();
+ PrepareApplicationListSO(applications_list, applications_so, *this);
+
+ const auto pending_apps_list = AppsWaitingForRegistration().GetData();
+ PrepareApplicationListSO(pending_apps_list, applications_so, *this);
rpc_service_->ManageHMICommand(request);
}
void ApplicationManagerImpl::RemoveDevice(
const connection_handler::DeviceHandle& device_handle) {
- LOG4CXX_DEBUG(logger_, "device_handle " << device_handle);
+ SDL_LOG_DEBUG("device_handle " << device_handle);
sync_primitives::AutoLock lock(query_apps_devices_lock_);
query_apps_devices_.erase(device_handle);
}
@@ -1664,7 +1665,7 @@ void ApplicationManagerImpl::RemoveDevice(
void ApplicationManagerImpl::OnDeviceSwitchingStart(
const connection_handler::Device& device_from,
const connection_handler::Device& device_to) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ReregisterWaitList wait_list;
{
auto apps_data_accessor = applications();
@@ -1696,7 +1697,7 @@ void ApplicationManagerImpl::OnDeviceSwitchingStart(
void ApplicationManagerImpl::OnDeviceSwitchingFinish(
const std::string& device_uid) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
UNUSED(device_uid);
ReregisterWaitList wait_list;
@@ -1720,17 +1721,15 @@ void ApplicationManagerImpl::SwitchApplication(ApplicationSharedPtr app,
const uint32_t connection_key,
const size_t device_id,
const std::string& mac_address) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
sync_primitives::AutoLock lock(applications_list_lock_ptr_);
DCHECK_OR_RETURN_VOID(1 == applications_.erase(app));
- LOG4CXX_DEBUG(logger_,
- "Changing app id to " << connection_key
- << ". Changing device id to "
- << device_id);
+ SDL_LOG_DEBUG("Changing app id to "
+ << connection_key << ". Changing device id to " << device_id);
- bool is_subscribed_to_way_points = IsAppSubscribedForWayPoints(app);
+ bool is_subscribed_to_way_points = IsAppSubscribedForWayPoints(*app);
if (is_subscribed_to_way_points) {
UnsubscribeAppFromWayPoints(app);
}
@@ -1752,7 +1751,7 @@ void ApplicationManagerImpl::SwitchApplication(ApplicationSharedPtr app,
mobile_apis::HMILevel::eType ApplicationManagerImpl::GetDefaultHmiLevel(
ApplicationConstSharedPtr application) const {
using namespace mobile_apis;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
HMILevel::eType default_hmi = HMILevel::HMI_NONE;
if (GetPolicyHandler().PolicyEnabled()) {
@@ -1769,13 +1768,11 @@ mobile_apis::HMILevel::eType ApplicationManagerImpl::GetDefaultHmiLevel(
} else if ("NONE" == default_hmi_string) {
default_hmi = HMILevel::HMI_NONE;
} else {
- LOG4CXX_ERROR(
- logger_,
- "Unable to convert " + default_hmi_string + " to HMILevel");
+ SDL_LOG_ERROR("Unable to convert " + default_hmi_string +
+ " to HMILevel");
}
} else {
- LOG4CXX_ERROR(logger_,
- "Unable to get default hmi_level for " << policy_app_id);
+ SDL_LOG_ERROR("Unable to get default hmi_level for " << policy_app_id);
}
}
return default_hmi;
@@ -1784,7 +1781,7 @@ mobile_apis::HMILevel::eType ApplicationManagerImpl::GetDefaultHmiLevel(
bool ApplicationManagerImpl::CheckResumptionRequiredTransportAvailable(
ApplicationConstSharedPtr application) const {
using namespace mobile_apis;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::map<std::string, std::vector<std::string> >& transport_map =
get_settings().transport_required_for_resumption_map();
@@ -1819,8 +1816,8 @@ bool ApplicationManagerImpl::CheckResumptionRequiredTransportAvailable(
} else {
// check all AppHMITypes that the app has
for (size_t i = 0; i < app_types_array->length(); i++) {
- const std::string app_type_string =
- AppHMITypeToString(static_cast<mobile_apis::AppHMIType::eType>(
+ std::string app_type_string =
+ EnumToString(static_cast<mobile_apis::AppHMIType::eType>(
app_types_array->getElement(i).asUInt()));
bool transport_is_found = false;
@@ -1859,14 +1856,14 @@ uint32_t ApplicationManagerImpl::GenerateGrammarID() {
}
uint32_t ApplicationManagerImpl::GenerateNewHMIAppID() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t hmi_app_id = get_rand_from_range(1);
- LOG4CXX_DEBUG(logger_, "GenerateNewHMIAppID value is: " << hmi_app_id);
+ SDL_LOG_DEBUG("GenerateNewHMIAppID value is: " << hmi_app_id);
while (resume_controller().IsHMIApplicationIdExist(hmi_app_id)) {
- LOG4CXX_DEBUG(logger_, "HMI appID " << hmi_app_id << " is exists.");
+ SDL_LOG_DEBUG("HMI appID " << hmi_app_id << " is exists.");
hmi_app_id = get_rand_from_range(1);
- LOG4CXX_DEBUG(logger_, "Trying new value: " << hmi_app_id);
+ SDL_LOG_DEBUG("Trying new value: " << hmi_app_id);
}
return hmi_app_id;
@@ -1877,7 +1874,7 @@ bool ApplicationManagerImpl::StartNaviService(
protocol_handler::ServiceType service_type,
const BsonObject* params) {
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (HMIStateAllowsStreaming(app_id, service_type)) {
{
@@ -1890,7 +1887,7 @@ bool ApplicationManagerImpl::StartNaviService(
std::pair<uint32_t, std::pair<bool, bool> >(
app_id, std::make_pair(false, false)));
if (!res.second) {
- LOG4CXX_WARN(logger_, "Navi service refused");
+ SDL_LOG_WARN("Navi service refused");
return false;
}
it = res.first;
@@ -1901,17 +1898,14 @@ bool ApplicationManagerImpl::StartNaviService(
/* Fix: For NaviApp1 Switch to NaviApp2, App1's Endcallback() arrives
later than App2's Startcallback(). Cause streaming issue on HMI.
*/
- sync_primitives::AutoLock lock(applications_list_lock_ptr_);
- for (auto app : applications_) {
+ auto accessor = applications();
+ for (auto app : accessor.GetData()) {
if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) {
- LOG4CXX_DEBUG(logger_,
- "Continue, Not Navi App Id: " << app->app_id());
+ SDL_LOG_DEBUG("Continue, Not Navi App Id: " << app->app_id());
continue;
}
- LOG4CXX_DEBUG(logger_,
- "Abort Stream Service of other NaviAppId: "
- << app->app_id()
- << " Service_type: " << service_type);
+ SDL_LOG_DEBUG("Abort Stream Service of other NaviAppId: "
+ << app->app_id() << " Service_type: " << service_type);
StopNaviService(app->app_id(), service_type);
}
}
@@ -1932,10 +1926,10 @@ bool ApplicationManagerImpl::StartNaviService(
}
if (!rejected_params.empty()) {
- OnStreamingConfigured(app_id, service_type, false, rejected_params);
+ OnStreamingConfigurationFailed(app_id, rejected_params, std::string());
return false;
} else if (!converted_params.empty()) {
- LOG4CXX_INFO(logger_, "Sending video configuration params");
+ SDL_LOG_INFO("Sending video configuration params");
MessageHelper::PrintSmartObject(converted_params);
bool request_sent =
application(app_id)->SetVideoConfig(service_type, converted_params);
@@ -1945,111 +1939,112 @@ bool ApplicationManagerImpl::StartNaviService(
}
}
// no configuration is needed, or SetVideoConfig is not sent
- std::vector<std::string> empty;
- OnStreamingConfigured(app_id, service_type, true, empty);
+ OnStreamingConfigurationSuccessful(app_id, service_type);
return true;
-
- } else {
- LOG4CXX_WARN(logger_, "Refused navi service by HMI level");
}
+ SDL_LOG_WARN("Refused navi service by HMI level");
std::vector<std::string> empty;
- OnStreamingConfigured(app_id, service_type, false, empty);
+ OnStreamingConfigurationFailed(
+ app_id,
+ empty,
+ "Service type: " + std::to_string(service_type) +
+ " disallowed with current HMI level");
return false;
}
-void ApplicationManagerImpl::OnStreamingConfigured(
- uint32_t app_id,
- protocol_handler::ServiceType service_type,
- bool result,
- std::vector<std::string>& rejected_params) {
- using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
-
- LOG4CXX_INFO(logger_,
- "OnStreamingConfigured called for service "
- << service_type << ", result=" << result);
+void ApplicationManagerImpl::OnStreamingConfigurationSuccessful(
+ uint32_t app_id, protocol_handler::ServiceType service_type) {
+ SDL_LOG_AUTO_TRACE();
- if (result) {
- std::vector<std::string> empty;
- {
- sync_primitives::AutoLock lock(navi_service_status_lock_);
+ SDL_LOG_INFO("Streaming configuration successful for service "
+ << service_type);
+ std::vector<std::string> empty;
+ std::string reason;
+ {
+ sync_primitives::AutoLock lock(navi_service_status_lock_);
- NaviServiceStatusMap::iterator it = navi_service_status_.find(app_id);
- if (navi_service_status_.end() == it) {
- LOG4CXX_WARN(logger_, "Application not found in navi status map");
- connection_handler().NotifyServiceStartedResult(app_id, false, empty);
- return;
- }
+ NaviServiceStatusMap::iterator it = navi_service_status_.find(app_id);
+ if (navi_service_status_.end() == it) {
+ SDL_LOG_WARN("Application not found in navi status map");
+ connection_handler().NotifyServiceStartedResult(
+ app_id, false, empty, reason);
+ return;
+ }
- // Fill NaviServices map. Set true to first value of pair if
- // we've started video service or to second value if we've
- // started audio service
- service_type == ServiceType::kMobileNav ? it->second.first = true
- : it->second.second = true;
+ // Fill NaviServices map. Set true to first value of pair if
+ // we've started video service or to second value if we've
+ // started audio service
+ service_type == protocol_handler::ServiceType::kMobileNav
+ ? it->second.first = true
+ : it->second.second = true;
- {
- sync_primitives::AutoLock lock(navi_app_to_stop_lock_);
- for (size_t i = 0; i < navi_app_to_stop_.size(); ++i) {
- if (app_id == navi_app_to_stop_[i]) {
- sync_primitives::AutoLock lock(close_app_timer_pool_lock_);
- close_app_timer_pool_.erase(close_app_timer_pool_.begin() + i);
- navi_app_to_stop_.erase(navi_app_to_stop_.begin() + i);
- break;
- }
+ {
+ sync_primitives::AutoLock lock(navi_app_to_stop_lock_);
+ for (size_t i = 0; i < navi_app_to_stop_.size(); ++i) {
+ if (app_id == navi_app_to_stop_[i]) {
+ sync_primitives::AutoLock lock(close_app_timer_pool_lock_);
+ close_app_timer_pool_.erase(close_app_timer_pool_.begin() + i);
+ navi_app_to_stop_.erase(navi_app_to_stop_.begin() + i);
+ break;
}
}
}
+ }
- application(app_id)->StartStreaming(service_type);
- connection_handler().NotifyServiceStartedResult(app_id, true, empty);
+ application(app_id)->StartStreaming(service_type);
+ connection_handler().NotifyServiceStartedResult(app_id, true, empty, reason);
- // Fix: For wifi Secondary
- // Should erase appid from deque of ForbidStreaming() push in the last time
- std::deque<uint32_t>::const_iterator iter = std::find(
- navi_app_to_end_stream_.begin(), navi_app_to_end_stream_.end(), app_id);
- if (navi_app_to_end_stream_.end() != iter) {
- navi_app_to_end_stream_.erase(iter);
- }
- } else {
- std::vector<std::string> converted_params =
- ConvertRejectedParamList(rejected_params);
- connection_handler().NotifyServiceStartedResult(
- app_id, false, converted_params);
+ // Fix: For wifi Secondary
+ // Should erase appid from deque of ForbidStreaming() push in the last time
+ std::deque<uint32_t>::const_iterator iter = std::find(
+ navi_app_to_end_stream_.begin(), navi_app_to_end_stream_.end(), app_id);
+ if (navi_app_to_end_stream_.end() != iter) {
+ navi_app_to_end_stream_.erase(iter);
}
}
+void ApplicationManagerImpl::OnStreamingConfigurationFailed(
+ uint32_t app_id,
+ std::vector<std::string>& rejected_params,
+ const std::string& reason) {
+ SDL_LOG_AUTO_TRACE();
+
+ std::vector<std::string> converted_params =
+ ConvertRejectedParamList(rejected_params);
+ connection_handler().NotifyServiceStartedResult(
+ app_id, false, converted_params, reason);
+}
+
void ApplicationManagerImpl::StopNaviService(
uint32_t app_id, protocol_handler::ServiceType service_type) {
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
{
sync_primitives::AutoLock lock(navi_service_status_lock_);
NaviServiceStatusMap::iterator it = navi_service_status_.find(app_id);
if (navi_service_status_.end() == it) {
- LOG4CXX_WARN(logger_,
- "No Information about navi service " << service_type);
+ SDL_LOG_WARN("No Information about navi service " << service_type);
// Fix: Need return for Not navi service at now
return;
} else {
// Fix: Repeated tests are not executed after they have stopped for Navi
if (false == it->second.first &&
ServiceType::kMobileNav == service_type) {
- LOG4CXX_DEBUG(logger_, "appId: " << app_id << "Navi had stopped");
+ SDL_LOG_DEBUG("appId: " << app_id << "Navi had stopped");
return;
}
// Fix: Repeated tests are not executed after they have stopped for Audio
if (false == it->second.second && ServiceType::kAudio == service_type) {
- LOG4CXX_DEBUG(logger_, "appId: " << app_id << "Audio had stopped");
+ SDL_LOG_DEBUG("appId: " << app_id << "Audio had stopped");
return;
}
// Fill NaviServices map. Set false to first value of pair if
// we've stopped video service or to second value if we've
// stopped audio service
- LOG4CXX_DEBUG(logger_,
- "appId: " << app_id << " service_type: " << service_type
+ SDL_LOG_DEBUG("appId: " << app_id << " service_type: " << service_type
<< " to stopped");
service_type == ServiceType::kMobileNav ? it->second.first = false
: it->second.second = false;
@@ -2059,7 +2054,7 @@ void ApplicationManagerImpl::StopNaviService(
// because Not set Allowstream flag
ApplicationSharedPtr app = application(app_id);
if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) {
- LOG4CXX_ERROR(logger_, "Navi/Projection application not found");
+ SDL_LOG_ERROR("Navi/Projection application not found");
return;
}
if (service_type == ServiceType::kMobileNav) {
@@ -2074,7 +2069,7 @@ void ApplicationManagerImpl::StopNaviService(
ApplicationSharedPtr app = application(app_id);
if (!app) {
- LOG4CXX_WARN(logger_, "An application is not registered.");
+ SDL_LOG_WARN("An application is not registered.");
return;
}
@@ -2088,23 +2083,22 @@ void ApplicationManagerImpl::OnServiceStartedCallback(
const BsonObject* params) {
using namespace helpers;
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(
- logger_,
- "ServiceType = " << type << ". Session = " << std::hex << session_key);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("ServiceType = " << type << ". Session = " << std::hex
+ << session_key);
std::vector<std::string> empty;
+ std::string reason;
if (kRpc == type) {
- LOG4CXX_DEBUG(logger_, "RPC service is about to be started.");
- connection_handler().NotifyServiceStartedResult(session_key, true, empty);
+ SDL_LOG_DEBUG("RPC service is about to be started.");
+ connection_handler().NotifyServiceStartedResult(
+ session_key, true, empty, reason);
return;
}
ApplicationSharedPtr app = application(session_key);
if (!app) {
- LOG4CXX_WARN(
- logger_,
- "The application with id:" << session_key << " doesn't exists.");
- connection_handler().NotifyServiceStartedResult(session_key, false, empty);
+ SDL_LOG_WARN("The application with id:" << session_key
+ << " doesn't exists.");
return;
}
@@ -2112,17 +2106,20 @@ void ApplicationManagerImpl::OnServiceStartedCallback(
type, ServiceType::kMobileNav, ServiceType::kAudio)) {
if (app->is_navi() || app->mobile_projection_enabled()) {
if (!StartNaviService(session_key, type, params)) {
- LOG4CXX_WARN(logger_, "Starting Navigation service failed");
+ SDL_LOG_WARN("Starting Navigation service failed");
}
return;
} else {
- LOG4CXX_WARN(logger_, "Refuse not navi/projection application");
+ SDL_LOG_WARN("Refuse not navi/projection application");
+ reason = "Service type: " + std::to_string(type) +
+ " disallowed with current HMI type";
}
} else {
- LOG4CXX_WARN(logger_, "Refuse unknown service");
+ SDL_LOG_WARN("Refuse unknown service");
}
- connection_handler().NotifyServiceStartedResult(session_key, false, empty);
+ connection_handler().NotifyServiceStartedResult(
+ session_key, false, empty, reason);
}
void ApplicationManagerImpl::OnServiceEndedCallback(
@@ -2134,10 +2131,9 @@ void ApplicationManagerImpl::OnServiceEndedCallback(
using namespace connection_handler;
using namespace mobile_apis;
- LOG4CXX_DEBUG(logger_,
- "OnServiceEndedCallback for service "
- << type << " with reason " << close_reason
- << " in session 0x" << std::hex << session_key);
+ SDL_LOG_DEBUG("OnServiceEndedCallback for service "
+ << type << " with reason " << close_reason << " in session 0x"
+ << std::hex << session_key);
auto app = application(static_cast<uint32_t>(session_key));
if (!app) {
@@ -2145,13 +2141,12 @@ void ApplicationManagerImpl::OnServiceEndedCallback(
}
if (IsAppInReconnectMode(app->device(), app->policy_app_id())) {
- LOG4CXX_DEBUG(logger_,
- "Application is in reconnection list and won't be closed.");
+ SDL_LOG_DEBUG("Application is in reconnection list and won't be closed.");
return;
}
if (type == kRpc) {
- LOG4CXX_INFO(logger_, "Remove application.");
+ SDL_LOG_INFO("Remove application.");
/* In case it was unexpected disconnect or some special case
(malformed message, flood) application will be removed
and we will unregister application correctly, but in case it was
@@ -2186,6 +2181,12 @@ void ApplicationManagerImpl::OnServiceEndedCallback(
is_unexpected_disconnect = false;
break;
}
+ case CloseSessionReason::kFinalMessage: {
+ reason = Result::SUCCESS;
+ is_resuming = false;
+ is_unexpected_disconnect = false;
+ break;
+ }
default: {
reason = Result::INVALID_ENUM;
is_resuming = true;
@@ -2210,13 +2211,12 @@ void ApplicationManagerImpl::ProcessServiceStatusUpdate(
hmi_apis::Common_ServiceEvent::eType service_event,
utils::Optional<hmi_apis::Common_ServiceStatusUpdateReason::eType>
service_update_reason) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- LOG4CXX_DEBUG(logger_,
- "Processing status update with connection key: "
- << connection_key << " service type: " << service_type
- << " service_event " << service_event
- << " service_update_reason " << service_update_reason);
+ SDL_LOG_DEBUG("Processing status update with connection key: "
+ << connection_key << " service type: " << service_type
+ << " service_event " << service_event
+ << " service_update_reason " << service_update_reason);
const auto app = application(connection_key);
@@ -2243,9 +2243,9 @@ void ApplicationManagerImpl::ProcessServiceStatusUpdate(
bool ApplicationManagerImpl::HandleRejectedServiceStatus(
ApplicationSharedPtr app,
const hmi_apis::Common_ServiceType::eType service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!app) {
- LOG4CXX_WARN(logger_, "Received invalid app");
+ SDL_LOG_WARN("Received invalid app");
return false;
}
@@ -2259,20 +2259,19 @@ bool ApplicationManagerImpl::HandleRejectedServiceStatus(
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");
+ SDL_LOG_DEBUG("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");
+ SDL_LOG_DEBUG("RPC service for appID: " << app << " is stopped");
return true;
}
default:
- LOG4CXX_DEBUG(logger_, "Unknown service type: " << service_type);
+ SDL_LOG_DEBUG("Unknown service type: " << service_type);
return false;
}
}
@@ -2280,12 +2279,11 @@ bool ApplicationManagerImpl::HandleRejectedServiceStatus(
void ApplicationManagerImpl::OnSecondaryTransportStartedCallback(
const connection_handler::DeviceHandle device_handle,
const int32_t session_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (device_handle == 0) {
- LOG4CXX_WARN(logger_,
- "Invalid device handle passed for secondary transport of app "
- << session_key);
+ SDL_LOG_WARN("Invalid device handle passed for secondary transport of app "
+ << session_key);
return;
}
@@ -2298,8 +2296,7 @@ void ApplicationManagerImpl::OnSecondaryTransportStartedCallback(
// It is possible that secondary transport is established prior to
// RegisterAppInterface request being processed. In this case, we will
// update the app's information during RegisterApplication().
- LOG4CXX_DEBUG(logger_,
- "Application with id: " << session_key << " is not found");
+ SDL_LOG_DEBUG("Application with id: " << session_key << " is not found");
return;
}
app->set_secondary_device(device_handle);
@@ -2314,14 +2311,13 @@ void ApplicationManagerImpl::OnSecondaryTransportStartedCallback(
void ApplicationManagerImpl::OnSecondaryTransportEndedCallback(
const int32_t session_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DeviceMap::iterator it = secondary_transport_devices_cache_.find(session_key);
if (it == secondary_transport_devices_cache_.end()) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Unknown session_key specified while removing secondary transport: "
- << session_key);
+ << session_key);
} else {
secondary_transport_devices_cache_.erase(it);
}
@@ -2330,16 +2326,14 @@ void ApplicationManagerImpl::OnSecondaryTransportEndedCallback(
sync_primitives::AutoLock auto_lock(applications_list_lock_ptr_);
ApplicationSharedPtr app = application(session_key);
if (!app) {
- LOG4CXX_DEBUG(logger_,
- "Application with id: " << session_key << " is not found");
+ SDL_LOG_DEBUG("Application with id: " << session_key << " is not found");
return;
}
connection_handler::DeviceHandle device_handle = app->secondary_device();
if (device_handle == 0) {
- LOG4CXX_WARN(
- logger_,
- "Secondary transport of app " << session_key << " is not found");
+ SDL_LOG_WARN("Secondary transport of app " << session_key
+ << " is not found");
return;
}
@@ -2351,7 +2345,7 @@ void ApplicationManagerImpl::OnSecondaryTransportEndedCallback(
}
bool ApplicationManagerImpl::CheckAppIsNavi(const uint32_t app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application(app_id);
if (app) {
return app->is_navi();
@@ -2363,15 +2357,14 @@ bool ApplicationManagerImpl::CheckAppIsNavi(const uint32_t app_id) const {
bool ApplicationManagerImpl::OnHandshakeDone(
uint32_t connection_key,
security_manager::SSLContext::HandshakeResult result) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using security_manager::SSLContext;
using namespace helpers;
ApplicationSharedPtr app = application(connection_key);
if (!app) {
- LOG4CXX_WARN(logger_,
- "Application for connection key: " << connection_key
+ SDL_LOG_WARN("Application for connection key: " << connection_key
<< " was not found");
return false;
}
@@ -2388,30 +2381,30 @@ bool ApplicationManagerImpl::OnHandshakeDone(
}
#ifdef ENABLE_SECURITY
bool ApplicationManagerImpl::OnPTUFailed() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return false;
}
#endif // ENABLE_SECURITY
bool ApplicationManagerImpl::OnGetSystemTimeFailed() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return false;
}
void ApplicationManagerImpl::OnCertificateUpdateRequired() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
GetPolicyHandler().OnPTExchangeNeeded();
}
bool ApplicationManagerImpl::GetPolicyCertificateData(std::string& data) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
data = GetPolicyHandler().RetrieveCertificate();
return true;
}
security_manager::SSLContext::HandshakeContext
ApplicationManagerImpl::GetHandshakeContext(uint32_t key) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using security_manager::SSLContext;
ApplicationConstSharedPtr app = application(key);
if (app) {
@@ -2462,11 +2455,10 @@ void ApplicationManagerImpl::TerminateRequest(const uint32_t connection_key,
void ApplicationManagerImpl::RemoveHMIFakeParameters(
application_manager::commands::MessageSharedPtr& message,
const hmi_apis::FunctionID::eType& function_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
hmi_apis::HMI_API factory;
if (!(*message)[jhs::S_PARAMS].keyExists(jhs::S_FUNCTION_ID)) {
- LOG4CXX_ERROR(logger_,
- "RemoveHMIFakeParameters message missing function id");
+ SDL_LOG_ERROR("RemoveHMIFakeParameters message missing function id");
return;
}
mobile_apis::FunctionID::eType mobile_function_id =
@@ -2485,7 +2477,7 @@ bool ApplicationManagerImpl::Init(resumption::LastState&,
bool ApplicationManagerImpl::Init(
resumption::LastStateWrapperPtr last_state_wrapper,
media_manager::MediaManager* media_manager) {
- LOG4CXX_TRACE(logger_, "Init application manager");
+ SDL_LOG_TRACE("Init application manager");
plugin_manager_.reset(
new plugin_manager::RPCPluginManagerImpl(*this,
*rpc_service_,
@@ -2493,7 +2485,7 @@ bool ApplicationManagerImpl::Init(
*policy_handler_,
last_state_wrapper));
if (!plugin_manager_->LoadPlugins(get_settings().plugins_folder())) {
- LOG4CXX_ERROR(logger_, "Plugins are not loaded");
+ SDL_LOG_ERROR("Plugins are not loaded");
return false;
}
const std::string app_storage_folder = get_settings().app_storage_folder();
@@ -2502,15 +2494,14 @@ bool ApplicationManagerImpl::Init(
return false;
}
if (!resume_controller().Init(last_state_wrapper)) {
- LOG4CXX_ERROR(logger_, "Problem with initialization of resume controller");
+ SDL_LOG_ERROR("Problem with initialization of resume controller");
return false;
}
hmi_capabilities_->Init(last_state_wrapper);
if (!(file_system::IsWritingAllowed(app_storage_folder) &&
file_system::IsReadingAllowed(app_storage_folder))) {
- LOG4CXX_ERROR(logger_,
- "Storage directory doesn't have read/write permissions");
+ SDL_LOG_ERROR("Storage directory doesn't have read/write permissions");
return false;
}
@@ -2528,18 +2519,16 @@ bool ApplicationManagerImpl::Init(
IsReadWriteAllowed(app_icons_folder, TYPE_ICONS);
if (GetPolicyHandler().PolicyEnabled()) {
if (!GetPolicyHandler().LoadPolicyLibrary()) {
- LOG4CXX_ERROR(logger_,
- "Policy library is not loaded. Check LD_LIBRARY_PATH");
+ SDL_LOG_ERROR("Policy library is not loaded. Check LD_LIBRARY_PATH");
return false;
}
- LOG4CXX_INFO(logger_, "Policy library is loaded, now initing PT");
+ SDL_LOG_INFO("Policy library is loaded, now initing PT");
if (!GetPolicyHandler().InitPolicyTable()) {
- LOG4CXX_ERROR(logger_, "Policy table is not initialized.");
+ SDL_LOG_ERROR("Policy table is not initialized.");
return false;
}
} else {
- LOG4CXX_WARN(logger_,
- "System is configured to work without policy functionality.");
+ SDL_LOG_WARN("System is configured to work without policy functionality.");
}
media_manager_ = media_manager;
@@ -2565,23 +2554,24 @@ bool ApplicationManagerImpl::Init(
}
bool ApplicationManagerImpl::Stop() {
- LOG4CXX_AUTO_TRACE(logger_);
- stopping_application_mng_lock_.Acquire();
- is_stopping_ = true;
- stopping_application_mng_lock_.Release();
+ SDL_LOG_AUTO_TRACE();
+ is_stopping_.store(true);
application_list_update_timer_.Stop();
try {
- SetUnregisterAllApplicationsReason(
- mobile_api::AppInterfaceUnregisteredReason::IGNITION_OFF);
+ if (unregister_reason_ ==
+ mobile_api::AppInterfaceUnregisteredReason::INVALID_ENUM) {
+ SetUnregisterAllApplicationsReason(
+ mobile_api::AppInterfaceUnregisteredReason::IGNITION_OFF);
+ }
+
UnregisterAllApplications();
} catch (...) {
- LOG4CXX_ERROR(logger_,
- "An error occurred during unregistering applications.");
+ SDL_LOG_ERROR("An error occurred during unregistering applications.");
}
request_ctrl_.DestroyThreadpool();
// for PASA customer policy backup should happen :AllApp(SUSPEND)
- LOG4CXX_DEBUG(logger_, "Unloading policy library.");
+ SDL_LOG_DEBUG("Unloading policy library.");
GetPolicyHandler().UnloadPolicyLibrary();
rpc_service_->Stop();
@@ -2593,16 +2583,15 @@ bool ApplicationManagerImpl::ConvertSOtoMessage(
const smart_objects::SmartObject& message,
Message& output,
const bool allow_unknown_parameters) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (smart_objects::SmartType_Null == message.getType() ||
smart_objects::SmartType_Invalid == message.getType()) {
- LOG4CXX_WARN(logger_, "Invalid smart object received.");
+ SDL_LOG_WARN("Invalid smart object received.");
return false;
}
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Message with protocol: " << message.getElement(jhs::S_PARAMS)
.getElement(jhs::S_PROTOCOL_TYPE)
.asInt());
@@ -2619,7 +2608,7 @@ bool ApplicationManagerImpl::ConvertSOtoMessage(
if (protocol_version == 1) {
if (!formatters::CFormatterJsonSDLRPCv1::toString(
message, output_string, !allow_unknown_parameters)) {
- LOG4CXX_WARN(logger_, "Failed to serialize smart object");
+ SDL_LOG_WARN("Failed to serialize smart object");
return false;
}
output.set_protocol_version(
@@ -2627,7 +2616,7 @@ bool ApplicationManagerImpl::ConvertSOtoMessage(
} else {
if (!formatters::CFormatterJsonSDLRPCv2::toString(
message, output_string, !allow_unknown_parameters)) {
- LOG4CXX_WARN(logger_, "Failed to serialize smart object");
+ SDL_LOG_WARN("Failed to serialize smart object");
return false;
}
output.set_protocol_version(
@@ -2640,7 +2629,7 @@ bool ApplicationManagerImpl::ConvertSOtoMessage(
case 1: {
if (!formatters::FormatterJsonRpc::ToString(
message, output_string, !allow_unknown_parameters)) {
- LOG4CXX_WARN(logger_, "Failed to serialize smart object");
+ SDL_LOG_WARN("Failed to serialize smart object");
return false;
}
output.set_protocol_version(
@@ -2652,7 +2641,7 @@ bool ApplicationManagerImpl::ConvertSOtoMessage(
return false;
}
- LOG4CXX_DEBUG(logger_, "Convertion result: " << output_string);
+ SDL_LOG_DEBUG("Convertion result: " << output_string);
output.set_connection_key(message.getElement(jhs::S_PARAMS)
.getElement(strings::connection_key)
@@ -2687,7 +2676,7 @@ bool ApplicationManagerImpl::ConvertSOtoMessage(
output.set_binary_data(&binaryData);
}
- LOG4CXX_DEBUG(logger_, "Successfully parsed smart object into message");
+ SDL_LOG_DEBUG("Successfully parsed smart object into message");
return true;
}
@@ -2695,7 +2684,7 @@ hmi_apis::HMI_API& ApplicationManagerImpl::hmi_so_factory() {
if (!hmi_so_factory_) {
hmi_so_factory_ = new hmi_apis::HMI_API;
if (!hmi_so_factory_) {
- LOG4CXX_ERROR(logger_, "Out of memory");
+ SDL_LOG_ERROR("Out of memory");
NOTREACHED();
}
}
@@ -2706,7 +2695,7 @@ mobile_apis::MOBILE_API& ApplicationManagerImpl::mobile_so_factory() {
if (!mobile_so_factory_) {
mobile_so_factory_ = new mobile_apis::MOBILE_API;
if (!mobile_so_factory_) {
- LOG4CXX_ERROR(logger_, "Out of memory.");
+ SDL_LOG_ERROR("Out of memory");
NOTREACHED();
}
}
@@ -2724,15 +2713,14 @@ const HMICapabilities& ApplicationManagerImpl::hmi_capabilities() const {
void ApplicationManagerImpl::PullLanguagesInfo(const SmartObject& app_data,
SmartObject& ttsName,
SmartObject& vrSynonym) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!app_data.keyExists(json::languages)) {
- LOG4CXX_WARN(logger_, "\"languages\" not exists");
+ SDL_LOG_WARN("\"languages\" not exists");
return;
}
const HMICapabilities& hmi_cap = hmi_capabilities();
- std::string cur_vr_lang(
- MessageHelper::CommonLanguageToString(hmi_cap.active_vr_language()));
+ std::string cur_vr_lang(EnumToString(hmi_cap.active_vr_language()));
const SmartObject& languages = app_data[json::languages];
std::transform(
@@ -2744,44 +2732,41 @@ void ApplicationManagerImpl::PullLanguagesInfo(const SmartObject& app_data,
const size_t size = languages.length();
for (size_t idx = 0; idx < size; ++idx) {
if (languages[idx].keyExists(cur_vr_lang)) {
- LOG4CXX_DEBUG(logger_, "Found active HMI language " << cur_vr_lang);
+ SDL_LOG_DEBUG("Found active HMI language " << cur_vr_lang);
specific_idx = idx;
} else if (languages[idx].keyExists(json::default_)) {
- LOG4CXX_DEBUG(logger_, "Found default language");
+ SDL_LOG_DEBUG("Found default language");
default_idx = idx;
}
}
if ((-1 == specific_idx) && (-1 == default_idx)) {
- LOG4CXX_DEBUG(logger_, "No suitable language found");
+ SDL_LOG_DEBUG("No suitable language found");
return;
}
if (app_data[json::languages][specific_idx][cur_vr_lang].keyExists(
json::ttsName)) {
- LOG4CXX_DEBUG(logger_, "Get ttsName from " << cur_vr_lang << " language");
+ SDL_LOG_DEBUG("Get ttsName from " << cur_vr_lang << " language");
ttsName =
app_data[json::languages][specific_idx][cur_vr_lang][json::ttsName];
} else {
- LOG4CXX_DEBUG(logger_,
- "No data for ttsName for " << cur_vr_lang << " language");
+ SDL_LOG_DEBUG("No data for ttsName for " << cur_vr_lang << " language");
}
if (app_data[json::languages][specific_idx][cur_vr_lang].keyExists(
json::vrSynonyms)) {
- LOG4CXX_DEBUG(logger_,
- "Get vrSynonyms from " << cur_vr_lang << " language");
+ SDL_LOG_DEBUG("Get vrSynonyms from " << cur_vr_lang << " language");
vrSynonym =
app_data[json::languages][specific_idx][cur_vr_lang][json::vrSynonyms];
} else {
- LOG4CXX_DEBUG(logger_,
- "No data for vrSynonyms for " << cur_vr_lang << " language");
+ SDL_LOG_DEBUG("No data for vrSynonyms for " << cur_vr_lang << " language");
}
}
void ApplicationManagerImpl::CreateApplications(SmartArray& obj_array,
const uint32_t connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace policy;
const std::size_t arr_size(obj_array.size());
@@ -2789,7 +2774,7 @@ void ApplicationManagerImpl::CreateApplications(SmartArray& obj_array,
const SmartObject& app_data = obj_array[idx];
if (!(app_data.keyExists(json::name) && app_data.keyExists(json::appId))) {
- LOG4CXX_DEBUG(logger_, "The entry in query apps json is not valid");
+ SDL_LOG_DEBUG("The entry in query apps json is not valid");
continue;
}
@@ -2798,24 +2783,21 @@ void ApplicationManagerImpl::CreateApplications(SmartArray& obj_array,
connection_handler::DeviceHandle device_handle;
if (-1 == connection_handler().get_session_observer().GetDataOnSessionKey(
connection_key, nullptr, nullptr, &device_handle)) {
- LOG4CXX_ERROR(logger_,
- "Failed to create application: no connection info.");
+ SDL_LOG_ERROR("Failed to create application: no connection info.");
continue;
}
std::string device_id;
if (-1 == connection_handler().get_session_observer().GetDataOnDeviceID(
device_handle, nullptr, nullptr, &device_id)) {
- LOG4CXX_ERROR(logger_,
- "Failed to create application: no connection info.");
+ SDL_LOG_ERROR("Failed to create application: no connection info.");
continue;
}
ApplicationSharedPtr registered_app = application(device_id, policy_app_id);
if (registered_app) {
- LOG4CXX_DEBUG(logger_,
- "Application with the same id: "
- << policy_app_id << " is registered already.");
+ SDL_LOG_DEBUG("Application with the same id: "
+ << policy_app_id << " is registered already.");
continue;
}
@@ -2875,22 +2857,21 @@ void ApplicationManagerImpl::CreateApplications(SmartArray& obj_array,
app->set_tts_name(ttsName);
sync_primitives::AutoLock lock(apps_to_register_list_lock_ptr_);
- LOG4CXX_DEBUG(
- logger_, "apps_to_register_ size before: " << apps_to_register_.size());
+ SDL_LOG_DEBUG(
+ "apps_to_register_ size before: " << apps_to_register_.size());
apps_to_register_.insert(app);
- LOG4CXX_DEBUG(logger_,
- "apps_to_register_ size after: " << apps_to_register_.size());
+ SDL_LOG_DEBUG("apps_to_register_ size after: " << apps_to_register_.size());
}
}
void ApplicationManagerImpl::ProcessQueryApp(
const smart_objects::SmartObject& sm_object,
const uint32_t connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace policy;
if (!sm_object.keyExists(json::response)) {
- LOG4CXX_DEBUG(logger_, "The response key is not exists.");
+ SDL_LOG_DEBUG("The response key is not exists.");
return;
}
@@ -2899,6 +2880,7 @@ void ApplicationManagerImpl::ProcessQueryApp(
CreateApplications(*obj_array, connection_key);
SendUpdateAppList();
+ sync_primitives::AutoLock lock(apps_to_register_list_lock_ptr_);
AppsWaitRegistrationSet::const_iterator it = apps_to_register_.begin();
for (; it != apps_to_register_.end(); ++it) {
const std::string full_icon_path((*it)->app_icon_path());
@@ -2935,16 +2917,15 @@ void ApplicationManagerImpl::updateRequestTimeout(
uint32_t connection_key,
uint32_t mobile_correlation_id,
uint32_t new_timeout_value) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
request_ctrl_.updateRequestTimeout(
connection_key, mobile_correlation_id, new_timeout_value);
}
void ApplicationManagerImpl::IncreaseForwardedRequestTimeout(
uint32_t connection_key, uint32_t mobile_correlation_id) {
- LOG4CXX_DEBUG(logger_,
- "Increasing Request Timeout by "
- << get_settings().rpc_pass_through_timeout());
+ SDL_LOG_DEBUG("Increasing Request Timeout by "
+ << get_settings().rpc_pass_through_timeout());
uint32_t new_timeout_value = get_settings().default_timeout() +
get_settings().rpc_pass_through_timeout();
request_ctrl_.updateRequestTimeout(
@@ -2990,49 +2971,51 @@ void ApplicationManagerImpl::RemovePolicyObserver(
void ApplicationManagerImpl::SetUnregisterAllApplicationsReason(
mobile_api::AppInterfaceUnregisteredReason::eType reason) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_TRACE(logger_, "reason = " << reason);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_TRACE("reason = " << reason);
unregister_reason_ = reason;
}
void ApplicationManagerImpl::HeadUnitReset(
mobile_api::AppInterfaceUnregisteredReason::eType reason) {
- LOG4CXX_AUTO_TRACE(logger_);
- stopping_application_mng_lock_.Acquire();
- is_stopping_ = true;
- stopping_application_mng_lock_.Release();
+ SDL_LOG_AUTO_TRACE();
+ is_stopping_.store(true);
switch (reason) {
case mobile_api::AppInterfaceUnregisteredReason::MASTER_RESET: {
- LOG4CXX_TRACE(logger_, "Performing MASTER_RESET");
+ SDL_LOG_TRACE("Performing MASTER_RESET");
UnregisterAllApplications();
GetPolicyHandler().ResetPolicyTable();
GetPolicyHandler().UnloadPolicyLibrary();
resume_controller().StopSavePersistentDataTimer();
-
+ if (!hmi_capabilities_->DeleteCachedCapabilitiesFile()) {
+ SDL_LOG_ERROR("Failed to remove HMI capabilities cache file");
+ }
const std::string storage_folder = get_settings().app_storage_folder();
file_system::RemoveDirectory(storage_folder, true);
ClearAppsPersistentData();
break;
}
case mobile_api::AppInterfaceUnregisteredReason::FACTORY_DEFAULTS: {
- LOG4CXX_TRACE(logger_, "Performing FACTORY_DEFAULTS");
+ SDL_LOG_TRACE("Performing FACTORY_DEFAULTS");
GetPolicyHandler().ClearUserConsent();
resume_controller().StopSavePersistentDataTimer();
-
+ if (!hmi_capabilities_->DeleteCachedCapabilitiesFile()) {
+ SDL_LOG_ERROR("Failed to remove HMI capabilities cache file");
+ }
ClearAppsPersistentData();
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Bad AppInterfaceUnregisteredReason");
+ SDL_LOG_ERROR("Bad AppInterfaceUnregisteredReason");
return;
}
}
}
void ApplicationManagerImpl::ClearAppsPersistentData() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
typedef std::vector<std::string> FilesList;
const std::string apps_info_storage_file = get_settings().app_info_storage();
file_system::DeleteFile(apps_info_storage_file);
@@ -3050,14 +3033,12 @@ void ApplicationManagerImpl::ClearAppsPersistentData() {
for (; it != files.end(); ++it) {
const std::string path_to_item = storage_folder + "/";
const std::string item_to_remove = path_to_item + (*it);
- LOG4CXX_TRACE(logger_, "Removing : " << item_to_remove);
+ SDL_LOG_TRACE("Removing : " << item_to_remove);
if (file_system::IsDirectory(item_to_remove)) {
- LOG4CXX_TRACE(logger_,
- "Removal result : " << file_system::RemoveDirectory(
+ SDL_LOG_TRACE("Removal result : " << file_system::RemoveDirectory(
item_to_remove, true));
} else {
- LOG4CXX_TRACE(
- logger_,
+ SDL_LOG_TRACE(
"Removal result : " << file_system::DeleteFile(item_to_remove));
}
}
@@ -3069,9 +3050,9 @@ void ApplicationManagerImpl::ClearAppsPersistentData() {
}
void ApplicationManagerImpl::SendOnSDLClose() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (IsLowVoltage()) {
- LOG4CXX_TRACE(logger_, "SDL is in Low Voltage State");
+ SDL_LOG_TRACE("SDL is in Low Voltage State");
return;
}
// must be sent to PASA HMI on shutdown synchronously
@@ -3088,7 +3069,7 @@ void ApplicationManagerImpl::SendOnSDLClose() {
commands::CommandImpl::protocol_version_;
if (!msg) {
- LOG4CXX_WARN(logger_, "Null-pointer message received.");
+ SDL_LOG_WARN("Null-pointer message received.");
NOTREACHED();
return;
}
@@ -3098,18 +3079,16 @@ void ApplicationManagerImpl::SendOnSDLClose() {
new Message(protocol_handler::MessagePriority::kDefault));
hmi_so_factory().attachSchema(*msg, false);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Attached schema to message, result if valid: " << msg->isValid());
if (!ConvertSOtoMessage(*msg, *message_to_send)) {
- LOG4CXX_WARN(logger_,
- "Cannot send message to HMI: failed to create string");
+ SDL_LOG_WARN("Cannot send message to HMI: failed to create string");
return;
}
if (!hmi_handler_) {
- LOG4CXX_WARN(logger_, "No HMI Handler set");
+ SDL_LOG_WARN("No HMI Handler set");
return;
}
@@ -3117,14 +3096,14 @@ void ApplicationManagerImpl::SendOnSDLClose() {
}
void ApplicationManagerImpl::UnregisterAllApplications() {
- LOG4CXX_DEBUG(logger_, "Unregister reason " << unregister_reason_);
+ SDL_LOG_DEBUG("Unregister reason " << unregister_reason_);
+
+ SetHMICooperating(false);
- hmi_cooperating_ = false;
- bool is_ignition_off = false;
using namespace mobile_api::AppInterfaceUnregisteredReason;
using namespace helpers;
- is_ignition_off =
+ bool is_ignition_off =
Compare<eType, EQ, ONE>(unregister_reason_, IGNITION_OFF, INVALID_ENUM);
bool is_unexpected_disconnect = Compare<eType, NEQ, ALL>(
@@ -3173,7 +3152,7 @@ void ApplicationManagerImpl::UnregisterAllApplications() {
void ApplicationManagerImpl::RemoveAppsWaitingForRegistration(
const connection_handler::DeviceHandle handle) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DevicePredicate device_finder(handle);
apps_to_register_list_lock_ptr_->Acquire();
std::vector<ApplicationSharedPtr> apps_to_remove;
@@ -3187,8 +3166,7 @@ void ApplicationManagerImpl::RemoveAppsWaitingForRegistration(
const bool is_app_enabled =
helpers::in_range(enabled_local_apps, app->policy_app_id());
if (!is_app_enabled) {
- LOG4CXX_DEBUG(logger_,
- "Waiting app: " << app->name().c_str() << " is removed.");
+ SDL_LOG_DEBUG("Waiting app: " << app->name().c_str() << " is removed.");
apps_to_register_.erase(app);
}
}
@@ -3201,25 +3179,13 @@ void ApplicationManagerImpl::UnregisterApplication(
mobile_apis::Result::eType reason,
bool is_resuming,
bool is_unexpected_disconnect) {
- LOG4CXX_DEBUG(logger_,
- "app_id = " << app_id << "; reason = " << reason
+ SDL_LOG_DEBUG("app_id = " << app_id << "; reason = " << reason
<< "; is_resuming = " << is_resuming
<< "; is_unexpected_disconnect = "
<< is_unexpected_disconnect);
- size_t subscribed_for_way_points_app_count = 0;
GetAppServiceManager().UnpublishServices(app_id);
- // SDL sends UnsubscribeWayPoints only for last application
- {
- sync_primitives::AutoLock lock(subscribed_way_points_apps_lock_);
- subscribed_for_way_points_app_count =
- subscribed_way_points_apps_list_.size();
- }
- if (1 == subscribed_for_way_points_app_count) {
- LOG4CXX_ERROR(logger_, "Send UnsubscribeWayPoints");
- MessageHelper::SendUnsubscribedWayPoints(*this);
- }
EndNaviServices(app_id);
{
@@ -3250,8 +3216,7 @@ void ApplicationManagerImpl::UnregisterApplication(
if (app_ptr) {
app_ptr->usage_report().RecordRemovalsForBadBehavior();
if (reason == mobile_apis::Result::TOO_MANY_PENDING_REQUESTS) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"INSERT: " << GetHashedAppID(app_id, app_ptr->policy_app_id()));
forbidden_applications.insert(
GetHashedAppID(app_id, app_ptr->policy_app_id()));
@@ -3260,7 +3225,7 @@ void ApplicationManagerImpl::UnregisterApplication(
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Unknown unregister reason " << reason);
+ SDL_LOG_ERROR("Unknown unregister reason " << reason);
break;
}
}
@@ -3279,11 +3244,11 @@ void ApplicationManagerImpl::UnregisterApplication(
}
}
if (!app_to_remove) {
- LOG4CXX_ERROR(logger_, "Cant find application with app_id = " << app_id);
+ SDL_LOG_ERROR("Cant find application with app_id = " << app_id);
// Just to terminate RAI in case of connection is dropped (rare case)
// App won't be unregistered since RAI has not been started yet
- LOG4CXX_DEBUG(logger_, "Trying to terminate possible RAI request.");
+ SDL_LOG_DEBUG("Trying to terminate possible RAI request.");
request_ctrl_.terminateAppRequests(app_id);
return;
@@ -3295,6 +3260,16 @@ void ApplicationManagerImpl::UnregisterApplication(
resume_controller().RemoveApplicationFromSaved(app_to_remove);
}
+ if (IsAppSubscribedForWayPoints(app_id)) {
+ UnsubscribeAppFromWayPoints(app_id);
+ if (!IsAnyAppSubscribedForWayPoints()) {
+ SDL_LOG_DEBUG("Send UnsubscribeWayPoints");
+ auto request = MessageHelper::CreateUnsubscribeWayPointsRequest(
+ GetNextHMICorrelationID());
+ rpc_service_->ManageHMICommand(request);
+ }
+ }
+
(hmi_capabilities_->get_hmi_language_handler())
.OnUnregisterApplication(app_id);
@@ -3303,18 +3278,22 @@ void ApplicationManagerImpl::UnregisterApplication(
AppV4DevicePredicate finder(handle);
ApplicationSharedPtr app = FindApp(applications(), finder);
if (!app) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"There is no more SDL4 apps with device handle: " << handle);
RemoveAppsWaitingForRegistration(handle);
}
}
+
+ MessageHelper::SendOnAppUnregNotificationToHMI(
+ app_to_remove, is_unexpected_disconnect, *this);
+ commands_holder_->Clear(app_to_remove);
+
const auto enabled_local_apps = policy_handler_->GetEnabledLocalApps();
if (helpers::in_range(enabled_local_apps, app_to_remove->policy_app_id())) {
- LOG4CXX_DEBUG(logger_,
- "Enabled local app has been unregistered. Re-create "
- "pending application");
+ SDL_LOG_DEBUG(
+ "Enabled local app has been unregistered. Re-create "
+ "pending application");
CreatePendingLocalApplication(app_to_remove->policy_app_id());
}
@@ -3322,8 +3301,6 @@ void ApplicationManagerImpl::UnregisterApplication(
SendUpdateAppList();
}
- commands_holder_->Clear(app_to_remove);
-
if (EndAudioPassThru(app_id)) {
// May be better to put this code in MessageHelper?
StopAudioPassThru(app_id);
@@ -3334,12 +3311,12 @@ void ApplicationManagerImpl::UnregisterApplication(
plugin.OnApplicationEvent(plugin_manager::kApplicationUnregistered,
app_to_remove);
};
- plugin_manager_->ForEachPlugin(on_app_unregistered);
- MessageHelper::SendOnAppUnregNotificationToHMI(
- app_to_remove, is_unexpected_disconnect, *this);
+ plugin_manager_->ForEachPlugin(on_app_unregistered);
request_ctrl_.terminateAppRequests(app_id);
- if (applications_.empty()) {
+
+ const bool is_applications_list_empty = applications().GetData().empty();
+ if (is_applications_list_empty) {
policy_handler_->StopRetrySequence();
}
return;
@@ -3356,7 +3333,7 @@ mobile_apis::Result::eType ApplicationManagerImpl::CheckPolicyPermissions(
const std::string& function_id,
const RPCParams& rpc_params,
CommandParametersPermissions* params_permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// TODO(AOleynik): Remove check of policy_enable, when this flag will be
// unused in config file
if (!GetPolicyHandler().PolicyEnabled()) {
@@ -3387,11 +3364,11 @@ mobile_apis::Result::eType ApplicationManagerImpl::CheckPolicyPermissions(
#ifdef ENABLE_LOG
const std::string log_msg =
"Application: " + app->policy_app_id() + ", RPC: " + function_id +
- ", window_id: " + std::to_string(window_id) + ", HMI status: " +
- MessageHelper::StringifiedHMILevel(app->hmi_level(window_id));
+ ", window_id: " + std::to_string(window_id) +
+ ", HMI status: " + EnumToString(app->hmi_level(window_id));
#endif // ENABLE_LOG
if (result.hmi_level_permitted != policy::kRpcAllowed) {
- LOG4CXX_WARN(logger_, "Request is blocked by policies. " << log_msg);
+ SDL_LOG_WARN("Request is blocked by policies. " << log_msg);
app->usage_report().RecordPolicyRejectedRpcCall();
@@ -3404,12 +3381,11 @@ mobile_apis::Result::eType ApplicationManagerImpl::CheckPolicyPermissions(
return mobile_apis::Result::INVALID_ENUM;
}
}
- LOG4CXX_DEBUG(logger_, "Request is allowed by policies. " << log_msg);
+ SDL_LOG_DEBUG("Request is allowed by policies. " << log_msg);
return mobile_api::Result::SUCCESS;
}
bool ApplicationManagerImpl::is_stopping() const {
- sync_primitives::AutoLock lock(stopping_application_mng_lock_);
return is_stopping_;
}
@@ -3418,7 +3394,7 @@ bool ApplicationManagerImpl::is_audio_pass_thru_active() const {
}
void ApplicationManagerImpl::OnLowVoltage() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
is_low_voltage_ = true;
resume_ctrl_->SaveLowVoltageTime();
resume_ctrl_->StopSavePersistentDataTimer();
@@ -3426,12 +3402,12 @@ void ApplicationManagerImpl::OnLowVoltage() {
}
bool ApplicationManagerImpl::IsLowVoltage() const {
- LOG4CXX_TRACE(logger_, "Result: " << is_low_voltage_);
+ SDL_LOG_TRACE("Result: " << is_low_voltage_);
return is_low_voltage_;
}
void ApplicationManagerImpl::OnWakeUp() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
resume_ctrl_->SaveWakeUpTime();
resume_ctrl_->StartSavePersistentDataTimer();
request_ctrl_.OnWakeUp();
@@ -3452,7 +3428,7 @@ std::string ApplicationManagerImpl::GetHashedAppID(
bool ApplicationManagerImpl::HMIStateAllowsStreaming(
uint32_t app_id, protocol_handler::ServiceType service_type) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace mobile_apis::HMILevel;
using namespace mobile_apis::PredefinedWindows;
using namespace mobile_apis::VideoStreamingState;
@@ -3460,7 +3436,7 @@ bool ApplicationManagerImpl::HMIStateAllowsStreaming(
ApplicationSharedPtr app = application(app_id);
if (!app) {
- LOG4CXX_WARN(logger_, "An application is not registered.");
+ SDL_LOG_WARN("An application is not registered.");
return false;
}
@@ -3477,11 +3453,11 @@ bool ApplicationManagerImpl::HMIStateAllowsStreaming(
bool ApplicationManagerImpl::CanAppStream(
uint32_t app_id, protocol_handler::ServiceType service_type) const {
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application(app_id);
if (!app) {
- LOG4CXX_WARN(logger_, "An application is not registered.");
+ SDL_LOG_WARN("An application is not registered.");
return false;
}
@@ -3491,7 +3467,7 @@ bool ApplicationManagerImpl::CanAppStream(
} else if (ServiceType::kAudio == service_type) {
is_allowed = app->audio_streaming_allowed();
} else {
- LOG4CXX_WARN(logger_, "Unsupported service_type " << service_type);
+ SDL_LOG_WARN("Unsupported service_type " << service_type);
}
return HMIStateAllowsStreaming(app_id, service_type) && is_allowed;
@@ -3501,12 +3477,11 @@ void ApplicationManagerImpl::ForbidStreaming(uint32_t app_id) {
using namespace mobile_apis::AppInterfaceUnregisteredReason;
using namespace mobile_apis::Result;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application(app_id);
if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"There is no navi or projection application with id: " << app_id);
return;
}
@@ -3551,12 +3526,11 @@ void ApplicationManagerImpl::ForbidStreaming(
using namespace mobile_apis::Result;
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application(app_id);
if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"There is no navi or projection application with id: " << app_id);
return;
}
@@ -3596,12 +3570,12 @@ void ApplicationManagerImpl::ForbidStreaming(
if (ServiceType::kMobileNav == service_type &&
app->video_streaming_allowed()) {
- LOG4CXX_DEBUG(logger_, "Video streaming is still allowed");
+ SDL_LOG_DEBUG("Video streaming is still allowed");
return;
}
if (ServiceType::kAudio == service_type && app->audio_streaming_allowed()) {
- LOG4CXX_DEBUG(logger_, "Audio streaming is still allowed");
+ SDL_LOG_DEBUG("Audio streaming is still allowed");
return;
}
@@ -3609,35 +3583,54 @@ void ApplicationManagerImpl::ForbidStreaming(
}
void ApplicationManagerImpl::OnAppStreaming(
- uint32_t app_id, protocol_handler::ServiceType service_type, bool state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ uint32_t app_id,
+ protocol_handler::ServiceType service_type,
+ const Application::StreamingState new_state) {
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application(app_id);
if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
" There is no navi or projection application with id: " << app_id);
return;
}
DCHECK_OR_RETURN_VOID(media_manager_);
- if (state) {
- state_ctrl_.OnVideoStreamingStarted(app);
- media_manager_->StartStreaming(app_id, service_type);
- } else {
- media_manager_->StopStreaming(app_id, service_type);
- state_ctrl_.OnVideoStreamingStopped(app);
+ SDL_LOG_DEBUG("New state for service " << static_cast<int32_t>(service_type)
+ << " is "
+ << static_cast<int32_t>(new_state));
+ switch (new_state) {
+ case Application::StreamingState::kStopped: {
+ // Stop activity in media_manager_ when service is stopped
+ // State controller has been already notified by kSuspended event
+ // received before
+ media_manager_->StopStreaming(app_id, service_type);
+ break;
+ }
+
+ case Application::StreamingState::kStarted: {
+ // Apply temporary streaming state and start activity in media_manager_
+ state_ctrl_.OnVideoStreamingStarted(app);
+ media_manager_->StartStreaming(app_id, service_type);
+ break;
+ }
+
+ case Application::StreamingState::kSuspended: {
+ // Don't stop activity in media_manager_ in that case
+ // Just cancel the temporary streaming state
+ state_ctrl_.OnVideoStreamingStopped(app);
+ break;
+ }
}
}
void ApplicationManagerImpl::EndNaviServices(uint32_t app_id) {
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application(app_id);
if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"There is no navi or projection application with id: " << app_id);
return;
}
@@ -3649,7 +3642,7 @@ void ApplicationManagerImpl::EndNaviServices(uint32_t app_id) {
NaviServiceStatusMap::iterator it = navi_service_status_.find(app_id);
if (navi_service_status_.end() == it) {
- LOG4CXX_ERROR(logger_, "No info about navi servicies for app");
+ SDL_LOG_ERROR("No info about navi servicies for app");
return;
}
end_video = it->second.first;
@@ -3658,12 +3651,12 @@ void ApplicationManagerImpl::EndNaviServices(uint32_t app_id) {
if (connection_handler_) {
if (end_video) {
- LOG4CXX_DEBUG(logger_, "Going to end video service");
+ SDL_LOG_DEBUG("Going to end video service");
connection_handler().SendEndService(app_id, ServiceType::kMobileNav);
app->StopStreamingForce(ServiceType::kMobileNav);
}
if (end_audio) {
- LOG4CXX_DEBUG(logger_, "Going to end audio service");
+ SDL_LOG_DEBUG("Going to end audio service");
connection_handler().SendEndService(app_id, ServiceType::kAudio);
app->StopStreamingForce(ServiceType::kAudio);
}
@@ -3689,17 +3682,17 @@ void ApplicationManagerImpl::EndNaviServices(uint32_t app_id) {
void ApplicationManagerImpl::OnHMIStateChanged(const uint32_t app_id,
const HmiStatePtr from,
const HmiStatePtr to) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProcessPostponedMessages(app_id);
ProcessApp(app_id, from, to);
}
void ApplicationManagerImpl::ProcessPostponedMessages(const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application(app_id);
if (!app) {
- LOG4CXX_WARN(logger_, "The app with id: " << app_id << " does not exist");
+ SDL_LOG_WARN("The app with id: " << app_id << " does not exist");
return;
}
MobileMessageQueue messages;
@@ -3727,7 +3720,7 @@ void ApplicationManagerImpl::ProcessOnDataStreamingNotification(
const protocol_handler::ServiceType service_type,
const uint32_t app_id,
const bool streaming_data_available) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool should_send_notification = false;
@@ -3737,23 +3730,21 @@ void ApplicationManagerImpl::ProcessOnDataStreamingNotification(
should_send_notification = active_services.empty();
if (streaming_data_available) {
active_services.insert(app_id);
- LOG4CXX_DEBUG(logger_,
- "Streaming session with id "
- << app_id << " for service "
- << static_cast<uint32_t>(service_type)
- << " was added. Currently streaming sessions count: "
- << active_services.size());
+ SDL_LOG_DEBUG("Streaming session with id "
+ << app_id << " for service "
+ << static_cast<uint32_t>(service_type)
+ << " was added. Currently streaming sessions count: "
+ << active_services.size());
} else {
active_services.erase(app_id);
should_send_notification =
!should_send_notification && active_services.empty();
- LOG4CXX_DEBUG(logger_,
- "Streaming session with id "
- << app_id << " for service "
- << static_cast<uint32_t>(service_type)
- << " was removed. Currently streaming sessions count: "
- << active_services.size());
+ SDL_LOG_DEBUG("Streaming session with id "
+ << app_id << " for service "
+ << static_cast<uint32_t>(service_type)
+ << " was removed. Currently streaming sessions count: "
+ << active_services.size());
}
}
@@ -3772,7 +3763,7 @@ void ApplicationManagerImpl::ProcessApp(const uint32_t app_id,
ApplicationSharedPtr app = application(app_id);
if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) {
- LOG4CXX_ERROR(logger_, "Navi/Projection application not found");
+ SDL_LOG_ERROR("Navi/Projection application not found");
return;
}
@@ -3783,7 +3774,7 @@ void ApplicationManagerImpl::ProcessApp(const uint32_t app_id,
if (hmi_level_from == hmi_level_to &&
streaming_state_from == streaming_state_to) {
- LOG4CXX_TRACE(logger_, "HMILevel && streaming state were not changed");
+ SDL_LOG_TRACE("HMILevel && streaming state were not changed");
return;
}
@@ -3800,11 +3791,10 @@ void ApplicationManagerImpl::ProcessApp(const uint32_t app_id,
full_or_limited_hmi_level(hmi_level_to) &&
STREAMABLE == streaming_state_to;
if (allow_streaming_by_streaming_state || allow_streaming_by_hmi_level) {
- LOG4CXX_TRACE(logger_,
- "Allow streaming by streaming state: "
- << std::boolalpha << allow_streaming_by_streaming_state
- << "; by hmi level: " << std::boolalpha
- << allow_streaming_by_hmi_level);
+ SDL_LOG_TRACE("Allow streaming by streaming state: "
+ << std::boolalpha << allow_streaming_by_streaming_state
+ << "; by hmi level: " << std::boolalpha
+ << allow_streaming_by_hmi_level);
AllowStreaming(app_id);
return;
}
@@ -3817,11 +3807,10 @@ void ApplicationManagerImpl::ProcessApp(const uint32_t app_id,
full_or_limited_hmi_level(hmi_level_from) &&
HMI_BACKGROUND == hmi_level_to;
if (end_streaming_by_streaming_state || start_timer_by_hmi_level) {
- LOG4CXX_TRACE(logger_,
- "Start EndStream timer by streaming state: "
- << std::boolalpha << end_streaming_by_streaming_state
- << "; by hmi level: " << std::boolalpha
- << start_timer_by_hmi_level);
+ SDL_LOG_TRACE("Start EndStream timer by streaming state: "
+ << std::boolalpha << end_streaming_by_streaming_state
+ << "; by hmi level: " << std::boolalpha
+ << start_timer_by_hmi_level);
StartEndStreamTimer(app_id);
return;
}
@@ -3829,18 +3818,82 @@ void ApplicationManagerImpl::ProcessApp(const uint32_t app_id,
const bool end_streaming_by_hmi_level =
full_or_limited_hmi_level(hmi_level_from) && HMI_NONE == hmi_level_to;
if (end_streaming_by_hmi_level) {
- LOG4CXX_TRACE(logger_,
- "End streaming services by hmi level: "
- << std::boolalpha << end_streaming_by_hmi_level);
+ SDL_LOG_TRACE("End streaming services by hmi level: "
+ << std::boolalpha << end_streaming_by_hmi_level);
EndNaviServices(app_id);
return;
}
- LOG4CXX_TRACE(logger_, "No actions required for app " << app_id);
+ SDL_LOG_TRACE("No actions required for app " << app_id);
+}
+
+bool ApplicationManagerImpl::ResetHelpPromt(ApplicationSharedPtr app) const {
+ if (!app) {
+ SDL_LOG_ERROR("Null pointer");
+ return false;
+ }
+ const std::vector<std::string>& help_prompt = get_settings().help_prompt();
+
+ smart_objects::SmartObject so_help_prompt =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ for (size_t i = 0; i < help_prompt.size(); ++i) {
+ smart_objects::SmartObject help_prompt_item =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ help_prompt_item[strings::text] = help_prompt[i];
+ help_prompt_item[strings::type] =
+ hmi_apis::Common_SpeechCapabilities::SC_TEXT;
+ so_help_prompt[i] = help_prompt_item;
+ }
+
+ app->set_help_prompt(so_help_prompt);
+ return true;
+}
+
+bool ApplicationManagerImpl::ResetTimeoutPromt(ApplicationSharedPtr app) const {
+ if (!app) {
+ SDL_LOG_ERROR("Null pointer");
+ return false;
+ }
+
+ const std::vector<std::string>& time_out_promt =
+ get_settings().time_out_promt();
+
+ smart_objects::SmartObject so_time_out_promt =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ for (uint32_t i = 0; i < time_out_promt.size(); ++i) {
+ smart_objects::SmartObject timeoutPrompt =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ timeoutPrompt[strings::text] = time_out_promt[i];
+ timeoutPrompt[strings::type] = hmi_apis::Common_SpeechCapabilities::SC_TEXT;
+ so_time_out_promt[i] = timeoutPrompt;
+ }
+
+ app->set_timeout_prompt(so_time_out_promt);
+
+ return true;
+}
+
+bool ApplicationManagerImpl::ResetVrHelpTitleItems(
+ ApplicationSharedPtr app) const {
+ if (!app) {
+ SDL_LOG_ERROR("Null pointer");
+ return false;
+ }
+
+ const std::string& vr_help_title = get_settings().vr_help_title();
+ smart_objects::SmartObject so_vr_help_title(vr_help_title);
+
+ app->reset_vr_help_title();
+ app->reset_vr_help();
+ app->set_vr_help_title(so_vr_help_title);
+
+ return true;
}
void ApplicationManagerImpl::StartEndStreamTimer(const uint32_t app_id) {
- LOG4CXX_DEBUG(logger_, "Start end stream timer for app " << app_id);
+ SDL_LOG_DEBUG("Start end stream timer for app " << app_id);
navi_app_to_end_stream_.push_back(app_id);
TimerSPtr end_stream_timer(std::make_shared<timer::Timer>(
"DisallowAppStreamTimer",
@@ -3853,7 +3906,7 @@ void ApplicationManagerImpl::StartEndStreamTimer(const uint32_t app_id) {
}
void ApplicationManagerImpl::ClearTimerPool() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
{
sync_primitives::AutoLock lock(close_app_timer_pool_lock_);
@@ -3875,7 +3928,7 @@ void ApplicationManagerImpl::ClearTimerPool() {
}
void ApplicationManagerImpl::CloseNaviApp() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace mobile_apis::AppInterfaceUnregisteredReason;
using namespace mobile_apis::Result;
uint32_t app_id;
@@ -3900,8 +3953,7 @@ void ApplicationManagerImpl::CloseNaviApp() {
}
}
if (unregister) {
- LOG4CXX_INFO(logger_,
- "App haven't answered for EndService. Unregister it.");
+ SDL_LOG_INFO("App haven't answered for EndService. Unregister it.");
rpc_service_->ManageMobileCommand(
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
app_id, PROTOCOL_VIOLATION),
@@ -3911,7 +3963,7 @@ void ApplicationManagerImpl::CloseNaviApp() {
}
void ApplicationManagerImpl::EndNaviStreaming() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace mobile_apis::AppInterfaceUnregisteredReason;
using namespace mobile_apis::Result;
@@ -3932,11 +3984,11 @@ void ApplicationManagerImpl::EndNaviStreaming() {
void ApplicationManagerImpl::DisallowStreaming(uint32_t app_id) {
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application(app_id);
if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) {
- LOG4CXX_ERROR(logger_, "Navi/Projection application not found");
+ SDL_LOG_ERROR("Navi/Projection application not found");
return;
}
@@ -3957,11 +4009,11 @@ void ApplicationManagerImpl::DisallowStreaming(uint32_t app_id) {
void ApplicationManagerImpl::AllowStreaming(uint32_t app_id) {
using namespace protocol_handler;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application(app_id);
if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) {
- LOG4CXX_ERROR(logger_, "Navi/Projection application not found");
+ SDL_LOG_ERROR("Navi/Projection application not found");
return;
}
@@ -3989,7 +4041,7 @@ bool ApplicationManagerImpl::IsApplicationForbidden(
bool ApplicationManagerImpl::IsAppInReconnectMode(
const connection_handler::DeviceHandle& device_id,
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(reregister_wait_list_lock_ptr_);
return reregister_wait_list_.end() !=
std::find_if(reregister_wait_list_.begin(),
@@ -4007,12 +4059,11 @@ mobile_apis::Result::eType ApplicationManagerImpl::SaveBinary(
const std::string& file_path,
const std::string& file_name,
const uint64_t offset) {
- LOG4CXX_DEBUG(logger_,
- "SaveBinaryWithOffset binary_size = "
- << binary_data.size() << " offset = " << offset);
+ SDL_LOG_DEBUG("SaveBinaryWithOffset binary_size = "
+ << binary_data.size() << " offset = " << offset);
if (binary_data.size() > file_system::GetAvailableDiskSpace(file_path)) {
- LOG4CXX_ERROR(logger_, "Out of free disc space.");
+ SDL_LOG_ERROR("Out of free disc space.");
return mobile_apis::Result::OUT_OF_MEMORY;
}
@@ -4021,15 +4072,13 @@ mobile_apis::Result::eType ApplicationManagerImpl::SaveBinary(
std::ofstream* file_stream;
if (offset != 0) {
if (file_size != offset) {
- LOG4CXX_DEBUG(logger_,
- "ApplicationManagerImpl::SaveBinaryWithOffset offset"
- << " does'n match existing file size");
+ SDL_LOG_DEBUG("ApplicationManagerImpl::SaveBinaryWithOffset offset"
+ << " does'n match existing file size");
return mobile_apis::Result::INVALID_DATA;
}
file_stream = file_system::Open(full_file_path, std::ios_base::app);
} else {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"ApplicationManagerImpl::SaveBinaryWithOffset offset is 0, rewrite");
// if offset == 0: rewrite file
file_stream = file_system::Open(full_file_path, std::ios_base::out);
@@ -4046,7 +4095,7 @@ mobile_apis::Result::eType ApplicationManagerImpl::SaveBinary(
file_system::Close(file_stream);
delete file_stream;
file_stream = NULL;
- LOG4CXX_INFO(logger_, "Successfully write data to file");
+ SDL_LOG_INFO("Successfully write data to file");
return mobile_apis::Result::SUCCESS;
}
@@ -4082,14 +4131,16 @@ bool ApplicationManagerImpl::IsHMICooperating() const {
return hmi_cooperating_;
}
+void ApplicationManagerImpl::SetHMICooperating(const bool hmi_cooperating) {
+ hmi_cooperating_ = hmi_cooperating;
+}
+
void ApplicationManagerImpl::OnApplicationListUpdateTimer() {
- LOG4CXX_DEBUG(logger_, "Application list update timer finished");
+ SDL_LOG_DEBUG("Application list update timer finished");
const bool is_new_app_registered = registered_during_timer_execution_;
registered_during_timer_execution_ = false;
- apps_to_register_list_lock_ptr_->Acquire();
- const bool trigger_ptu = apps_size_ != applications_.size();
- apps_to_register_list_lock_ptr_->Release();
+ const bool trigger_ptu = apps_size_ != applications().GetData().size();
if (is_new_app_registered) {
SendUpdateAppList();
@@ -4117,8 +4168,7 @@ void ApplicationManagerImpl::OnTimerSendTTSGlobalProperties() {
}
if (!app_list.empty()) {
for (uint32_t i = 0; i < app_list.size(); ++i) {
- LOG4CXX_INFO(logger_,
- "Send TTS GlobalProperties to HMI with default helpPrompt");
+ SDL_LOG_INFO("Send TTS GlobalProperties to HMI with default helpPrompt");
MessageHelper::SendTTSGlobalProperties(
application(app_list[i]), true, *this);
RemoveAppFromTTSGlobalPropertiesList(app_list[i]);
@@ -4128,7 +4178,7 @@ void ApplicationManagerImpl::OnTimerSendTTSGlobalProperties() {
void ApplicationManagerImpl::AddAppToTTSGlobalPropertiesList(
const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint16_t timeout = get_settings().tts_global_properties_timeout();
date_time::TimeDuration current_time = date_time::getCurrentTime();
current_time += date_time::seconds(timeout);
@@ -4140,7 +4190,7 @@ void ApplicationManagerImpl::AddAppToTTSGlobalPropertiesList(
}
// if add first item need to start timer on one second
if (1 == tts_global_properties_app_list_.size()) {
- LOG4CXX_INFO(logger_, "Start tts_global_properties_timer_");
+ SDL_LOG_INFO("Start tts_global_properties_timer_");
tts_global_properties_app_list_lock_.Release();
const uint32_t timeout_ms = 1000;
tts_global_properties_timer_.Start(timeout_ms, timer::kSingleShot);
@@ -4151,7 +4201,7 @@ void ApplicationManagerImpl::AddAppToTTSGlobalPropertiesList(
void ApplicationManagerImpl::RemoveAppFromTTSGlobalPropertiesList(
const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// please avoid AutoLock usage to avoid deadlock
tts_global_properties_app_list_lock_.Acquire();
std::map<uint32_t, date_time::TimeDuration>::iterator it =
@@ -4159,7 +4209,7 @@ void ApplicationManagerImpl::RemoveAppFromTTSGlobalPropertiesList(
if (tts_global_properties_app_list_.end() != it) {
tts_global_properties_app_list_.erase(it);
if (tts_global_properties_app_list_.empty()) {
- LOG4CXX_DEBUG(logger_, "Stop tts_global_properties_timer_");
+ SDL_LOG_DEBUG("Stop tts_global_properties_timer_");
// if container is empty need to stop timer
tts_global_properties_app_list_lock_.Release();
tts_global_properties_timer_.Stop();
@@ -4169,73 +4219,111 @@ void ApplicationManagerImpl::RemoveAppFromTTSGlobalPropertiesList(
tts_global_properties_app_list_lock_.Release();
}
-mobile_apis::AppHMIType::eType ApplicationManagerImpl::StringToAppHMIType(
- std::string str) {
- LOG4CXX_AUTO_TRACE(logger_);
- if ("DEFAULT" == str) {
- return mobile_apis::AppHMIType::DEFAULT;
- } else if ("COMMUNICATION" == str) {
- return mobile_apis::AppHMIType::COMMUNICATION;
- } else if ("MEDIA" == str) {
- return mobile_apis::AppHMIType::MEDIA;
- } else if ("MESSAGING" == str) {
- return mobile_apis::AppHMIType::MESSAGING;
- } else if ("NAVIGATION" == str) {
- return mobile_apis::AppHMIType::NAVIGATION;
- } else if ("PROJECTION" == str) {
- return mobile_apis::AppHMIType::PROJECTION;
- } else if ("INFORMATION" == str) {
- return mobile_apis::AppHMIType::INFORMATION;
- } else if ("SOCIAL" == str) {
- return mobile_apis::AppHMIType::SOCIAL;
- } else if ("BACKGROUND_PROCESS" == str) {
- return mobile_apis::AppHMIType::BACKGROUND_PROCESS;
- } else if ("TESTING" == str) {
- return mobile_apis::AppHMIType::TESTING;
- } else if ("SYSTEM" == str) {
- return mobile_apis::AppHMIType::SYSTEM;
- } else {
- return mobile_apis::AppHMIType::INVALID_ENUM;
- }
-}
-
-const std::string ApplicationManagerImpl::AppHMITypeToString(
- mobile_apis::AppHMIType::eType type) const {
- LOG4CXX_AUTO_TRACE(logger_);
- switch (type) {
- case mobile_apis::AppHMIType::DEFAULT:
- return "DEFAULT";
- case mobile_apis::AppHMIType::COMMUNICATION:
- return "COMMUNICATION";
- case mobile_apis::AppHMIType::MEDIA:
- return "MEDIA";
- case mobile_apis::AppHMIType::MESSAGING:
- return "MESSAGING";
- case mobile_apis::AppHMIType::NAVIGATION:
- return "NAVIGATION";
- case mobile_apis::AppHMIType::INFORMATION:
- return "INFORMATION";
- case mobile_apis::AppHMIType::SOCIAL:
- return "SOCIAL";
- case mobile_apis::AppHMIType::BACKGROUND_PROCESS:
- return "BACKGROUND_PROCESS";
- case mobile_apis::AppHMIType::TESTING:
- return "TESTING";
- case mobile_apis::AppHMIType::SYSTEM:
- return "SYSTEM";
- case mobile_apis::AppHMIType::PROJECTION:
- return "PROJECTION";
- case mobile_apis::AppHMIType::REMOTE_CONTROL:
- return "REMOTE_CONTROL";
- default:
- return "INVALID_ENUM";
+ResetGlobalPropertiesResult ApplicationManagerImpl::ResetGlobalProperties(
+ const smart_objects::SmartObject& global_properties_ids,
+ const uint32_t app_id) {
+ SDL_LOG_AUTO_TRACE();
+
+ ApplicationSharedPtr application =
+ ApplicationManagerImpl::application(app_id);
+ // if application waits for sending ttsGlobalProperties need to remove this
+ // application from tts_global_properties_app_list_
+ SDL_LOG_DEBUG("RemoveAppFromTTSGlobalPropertiesList");
+ RemoveAppFromTTSGlobalPropertiesList(app_id);
+
+ ResetGlobalPropertiesResult result;
+
+ for (size_t i = 0; i < global_properties_ids.length(); ++i) {
+ mobile_apis::GlobalProperty::eType global_property =
+ static_cast<mobile_apis::GlobalProperty::eType>(
+ global_properties_ids[i].asInt());
+ switch (global_property) {
+ case mobile_apis::GlobalProperty::HELPPROMPT: {
+ result.help_prompt = ResetHelpPromt(application);
+ break;
+ }
+ case mobile_apis::GlobalProperty::TIMEOUTPROMPT: {
+ result.timeout_prompt = ResetTimeoutPromt(application);
+ break;
+ }
+ case mobile_apis::GlobalProperty::VRHELPTITLE:
+ case mobile_apis::GlobalProperty::VRHELPITEMS: {
+ if (!result.vr_has_been_reset) {
+ result.vr_has_been_reset = true;
+ result.vr_help_title_items = ResetVrHelpTitleItems(application);
+ }
+ break;
+ }
+ case mobile_apis::GlobalProperty::MENUNAME: {
+ result.menu_name = true;
+ break;
+ }
+ case mobile_apis::GlobalProperty::MENUICON: {
+ result.menu_icon = true;
+ break;
+ }
+ case mobile_apis::GlobalProperty::KEYBOARDPROPERTIES: {
+ result.keyboard_properties = true;
+ break;
+ }
+ default: {
+ SDL_LOG_TRACE("Unknown global property: " << global_property);
+ break;
+ }
+ }
+ }
+
+ return result;
+}
+
+ResetGlobalPropertiesResult
+ApplicationManagerImpl::ResetAllApplicationGlobalProperties(
+ const uint32_t app_id) {
+ const smart_objects::SmartObjectSPtr application_gl_props =
+ CreateAllAppGlobalPropsIDList(app_id);
+ return ResetGlobalProperties(*application_gl_props, app_id);
+}
+
+const smart_objects::SmartObjectSPtr
+ApplicationManagerImpl::CreateAllAppGlobalPropsIDList(
+ const uint32_t app_id) const {
+ auto global_properties = std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Array);
+ using namespace mobile_apis;
+
+ ApplicationConstSharedPtr application =
+ ApplicationManagerImpl::application(app_id);
+ int32_t i = 0;
+
+ if (application->help_prompt()) {
+ (*global_properties)[i++] = GlobalProperty::HELPPROMPT;
+ }
+ if (application->timeout_prompt()) {
+ (*global_properties)[i++] = GlobalProperty::TIMEOUTPROMPT;
+ }
+ if (application->vr_help_title()) {
+ (*global_properties)[i++] = GlobalProperty::VRHELPTITLE;
}
+ if (application->vr_help()) {
+ (*global_properties)[i++] = GlobalProperty::VRHELPITEMS;
+ }
+ if (application->menu_title()) {
+ (*global_properties)[i++] = GlobalProperty::MENUNAME;
+ }
+ if (application->menu_icon()) {
+ (*global_properties)[i++] = GlobalProperty::MENUICON;
+ }
+ if (application->keyboard_props()) {
+ (*global_properties)[i++] = GlobalProperty::KEYBOARDPROPERTIES;
+ }
+
+ return global_properties;
}
bool ApplicationManagerImpl::CompareAppHMIType(
const smart_objects::SmartObject& from_policy,
const smart_objects::SmartObject& from_application) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool equal = false;
uint32_t lenght_policy_app_types = from_policy.length();
uint32_t lenght_application_app_types = from_application.length();
@@ -4257,14 +4345,14 @@ bool ApplicationManagerImpl::CompareAppHMIType(
void ApplicationManagerImpl::OnUpdateHMIAppType(
std::map<std::string, std::vector<std::string> > app_hmi_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::map<std::string, std::vector<std::string> >::iterator
it_app_hmi_types_from_policy;
std::vector<std::string> hmi_types_from_policy;
smart_objects::SmartObject transform_app_hmi_types(
smart_objects::SmartType_Array);
- bool flag_diffirence_app_hmi_type = false;
+ bool flag_diffirence_app_hmi_type;
DataAccessor<ApplicationSet> accessor(applications());
for (ApplicationSetIt it = accessor.GetData().begin();
it != accessor.GetData().end();
@@ -4273,7 +4361,6 @@ void ApplicationManagerImpl::OnUpdateHMIAppType(
if (it_app_hmi_types_from_policy != app_hmi_types.end() &&
((it_app_hmi_types_from_policy->second).size())) {
- flag_diffirence_app_hmi_type = false;
hmi_types_from_policy = (it_app_hmi_types_from_policy->second);
if (transform_app_hmi_types.length()) {
@@ -4283,7 +4370,8 @@ void ApplicationManagerImpl::OnUpdateHMIAppType(
for (uint32_t i = 0; i < hmi_types_from_policy.size(); ++i) {
transform_app_hmi_types[i] =
- StringToAppHMIType(hmi_types_from_policy[i]);
+ StringToEnum<mobile_api::AppHMIType::eType>(
+ hmi_types_from_policy[i]);
}
ApplicationConstSharedPtr app = *it;
@@ -4322,9 +4410,9 @@ void ApplicationManagerImpl::OnUpdateHMIAppType(
void ApplicationManagerImpl::EraseAppFromReconnectionList(
const ApplicationSharedPtr& app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!app) {
- LOG4CXX_WARN(logger_, "Application is not valid.");
+ SDL_LOG_WARN("Application is not valid.");
return;
}
@@ -4341,7 +4429,7 @@ void ApplicationManagerImpl::EraseAppFromReconnectionList(
void ApplicationManagerImpl::ProcessReconnection(
ApplicationSharedPtr application, const uint32_t connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(application);
connection_handler::DeviceHandle new_device_id = 0;
@@ -4363,7 +4451,7 @@ void ApplicationManagerImpl::ProcessReconnection(
}
void ApplicationManagerImpl::OnPTUFinished(const bool ptu_result) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!ptu_result) {
protocol_handler_->ProcessFailedPTU();
return;
@@ -4386,29 +4474,29 @@ void ApplicationManagerImpl::OnPTUFinished(const bool ptu_result) {
#if defined(EXTERNAL_PROPRIETARY_MODE) && defined(ENABLE_SECURITY)
void ApplicationManagerImpl::OnCertDecryptFinished(const bool decrypt_result) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!decrypt_result) {
protocol_handler_->ProcessFailedCertDecrypt();
}
}
bool ApplicationManagerImpl::OnCertDecryptFailed() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return false;
}
#endif
void ApplicationManagerImpl::OnPTUTimeoutExceeded() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
protocol_handler_->ProcessFailedPTU();
}
void ApplicationManagerImpl::SendDriverDistractionState(
ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (hmi_apis::Common_DriverDistractionState::INVALID_ENUM ==
driver_distraction_state()) {
- LOG4CXX_WARN(logger_, "DriverDistractionState is INVALID_ENUM");
+ SDL_LOG_WARN("DriverDistractionState is INVALID_ENUM");
return;
}
@@ -4430,8 +4518,7 @@ void ApplicationManagerImpl::SendDriverDistractionState(
driver_distraction_state()) {
bool dismissal_enabled = *lock_screen_dismissal;
if (dismissal_enabled) {
- const auto language =
- MessageHelper::MobileLanguageToString(application->ui_language());
+ const auto language = EnumToString(application->ui_language());
const auto warning_message =
policy_handler_->LockScreenDismissalWarningMessage(language);
@@ -4482,7 +4569,7 @@ void ApplicationManagerImpl::SendDriverDistractionState(
void ApplicationManagerImpl::SendGetIconUrlNotifications(
const uint32_t connection_key, ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<std::string> enabled_apps;
GetPolicyHandler().GetEnabledCloudApps(enabled_apps);
std::vector<std::string>::iterator enabled_it = enabled_apps.begin();
@@ -4491,26 +4578,25 @@ void ApplicationManagerImpl::SendGetIconUrlNotifications(
for (; enabled_it != enabled_end; ++enabled_it) {
auto app_icon_it = app_icon_map_.find(*enabled_it);
if (app_icon_it == app_icon_map_.end()) {
- LOG4CXX_WARN(logger_, "Could not find cloud app in icon map");
+ SDL_LOG_WARN("Could not find cloud app in icon map");
continue;
}
- std::string endpoint = app_icon_it->second.endpoint;
bool pending_request = app_icon_it->second.pending_request;
if (pending_request) {
- LOG4CXX_DEBUG(logger_, "Cloud app has already sent request");
+ SDL_LOG_DEBUG("Cloud app has already sent request");
continue;
}
std::string url = GetPolicyHandler().GetIconUrl(*enabled_it);
if (url.empty()) {
- LOG4CXX_DEBUG(logger_, "No Icon Url for cloud app");
+ SDL_LOG_DEBUG("No Icon Url for cloud app");
continue;
}
- LOG4CXX_DEBUG(logger_, "Creating Get Icon Request");
+ SDL_LOG_DEBUG("Creating Get Icon Request");
smart_objects::SmartObjectSPtr message =
std::make_shared<smart_objects::SmartObject>(
@@ -4534,24 +4620,23 @@ void ApplicationManagerImpl::SendGetIconUrlNotifications(
protocol_handler::MajorProtocolVersion
ApplicationManagerImpl::SupportedSDLVersion() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return static_cast<protocol_handler::MajorProtocolVersion>(
get_settings().max_supported_protocol_version());
}
void ApplicationManagerImpl::AddAppToRegisteredAppList(
const ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(application);
sync_primitives::AutoLock lock(applications_list_lock_ptr_);
// Add application to registered app list and set appropriate mark.
application->MarkRegistered();
applications_.insert(application);
- LOG4CXX_DEBUG(
- logger_,
- "App with app_id: " << application->app_id()
- << " has been added to registered applications list");
+ SDL_LOG_DEBUG("App with app_id: "
+ << application->app_id()
+ << " has been added to registered applications list");
if (application_list_update_timer_.is_running() &&
!registered_during_timer_execution_) {
GetPolicyHandler().OnAddedNewApplicationToAppList(
@@ -4563,7 +4648,7 @@ void ApplicationManagerImpl::AddAppToRegisteredAppList(
void ApplicationManagerImpl::ApplyFunctorForEachPlugin(
std::function<void(plugin_manager::RPCPlugin&)> functor) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
plugin_manager_->ForEachPlugin(functor);
}
@@ -4588,16 +4673,14 @@ bool ApplicationManagerImpl::InitDirectory(
const std::string& path, ApplicationManagerImpl::DirectoryType type) const {
const std::string directory_type = DirectoryTypeToString(type);
if (!file_system::DirectoryExists(path)) {
- LOG4CXX_WARN(logger_, directory_type << " directory doesn't exist.");
+ SDL_LOG_WARN(directory_type << " directory doesn't exist.");
// if storage directory doesn't exist try to create it
if (!file_system::CreateDirectoryRecursively(path)) {
- LOG4CXX_ERROR(
- logger_,
- "Unable to create " << directory_type << " directory " << path);
+ SDL_LOG_ERROR("Unable to create " << directory_type << " directory "
+ << path);
return false;
}
- LOG4CXX_DEBUG(logger_,
- directory_type << " directory has been created: " << path);
+ SDL_LOG_DEBUG(directory_type << " directory has been created: " << path);
}
return true;
@@ -4608,72 +4691,95 @@ bool ApplicationManagerImpl::IsReadWriteAllowed(const std::string& path,
const std::string directory_type = DirectoryTypeToString(type);
if (!(file_system::IsWritingAllowed(path) &&
file_system::IsReadingAllowed(path))) {
- LOG4CXX_ERROR(
- logger_,
- directory_type << " directory doesn't have read/write permissions.");
+ SDL_LOG_ERROR(directory_type
+ << " directory doesn't have read/write permissions.");
return false;
}
- LOG4CXX_DEBUG(logger_,
- directory_type << " directory has read/write permissions.");
+ SDL_LOG_DEBUG(directory_type << " directory has read/write permissions.");
return true;
}
void ApplicationManagerImpl::ClearTTSGlobalPropertiesList() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(tts_global_properties_app_list_lock_);
tts_global_properties_app_list_.clear();
}
bool ApplicationManagerImpl::IsAppSubscribedForWayPoints(
- ApplicationSharedPtr app) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ uint32_t app_id) const {
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(subscribed_way_points_apps_lock_);
- LOG4CXX_DEBUG(logger_,
- "There are applications subscribed: "
- << subscribed_way_points_apps_list_.size());
- if (subscribed_way_points_apps_list_.find(app->app_id()) ==
+ SDL_LOG_DEBUG("There are applications subscribed: "
+ << subscribed_way_points_apps_list_.size());
+ if (subscribed_way_points_apps_list_.find(app_id) ==
subscribed_way_points_apps_list_.end()) {
return false;
}
return true;
}
+bool ApplicationManagerImpl::IsAppSubscribedForWayPoints(
+ Application& app) const {
+ return IsAppSubscribedForWayPoints(app.app_id());
+}
+
+void ApplicationManagerImpl::SubscribeAppForWayPoints(uint32_t app_id) {
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(subscribed_way_points_apps_lock_);
+ SDL_LOG_DEBUG("Subscribing " << app_id);
+ subscribed_way_points_apps_list_.insert(app_id);
+ SDL_LOG_DEBUG("There are applications subscribed: "
+ << subscribed_way_points_apps_list_.size());
+ if (way_points_data_) {
+ smart_objects::SmartObjectSPtr way_point_notification_ =
+ std::make_shared<smart_objects::SmartObject>(*way_points_data_);
+ (*way_point_notification_)[strings::params][strings::connection_key] =
+ app_id;
+ GetRPCService().SendMessageToMobile(way_point_notification_);
+ }
+}
+
void ApplicationManagerImpl::SubscribeAppForWayPoints(
ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SubscribeAppForWayPoints(app->app_id());
+}
+
+void ApplicationManagerImpl::UnsubscribeAppFromWayPoints(uint32_t app_id) {
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(subscribed_way_points_apps_lock_);
- LOG4CXX_DEBUG(logger_, "Subscribing " << app->app_id());
- subscribed_way_points_apps_list_.insert(app->app_id());
- LOG4CXX_DEBUG(logger_,
- "There are applications subscribed: "
- << subscribed_way_points_apps_list_.size());
+ SDL_LOG_DEBUG("Unsubscribing " << app_id);
+ subscribed_way_points_apps_list_.erase(app_id);
+ SDL_LOG_DEBUG("There are applications subscribed: "
+ << subscribed_way_points_apps_list_.size());
+ if (subscribed_way_points_apps_list_.empty()) {
+ way_points_data_.reset();
+ }
}
void ApplicationManagerImpl::UnsubscribeAppFromWayPoints(
ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoLock lock(subscribed_way_points_apps_lock_);
- LOG4CXX_DEBUG(logger_, "Unsubscribing " << app->app_id());
- subscribed_way_points_apps_list_.erase(app->app_id());
- LOG4CXX_DEBUG(logger_,
- "There are applications subscribed: "
- << subscribed_way_points_apps_list_.size());
+ UnsubscribeAppFromWayPoints(app->app_id());
}
bool ApplicationManagerImpl::IsAnyAppSubscribedForWayPoints() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(subscribed_way_points_apps_lock_);
- LOG4CXX_DEBUG(logger_,
- "There are applications subscribed: "
- << subscribed_way_points_apps_list_.size());
+ SDL_LOG_DEBUG("There are applications subscribed: "
+ << subscribed_way_points_apps_list_.size());
return !subscribed_way_points_apps_list_.empty();
}
+void ApplicationManagerImpl::SaveWayPointsMessage(
+ std::shared_ptr<smart_objects::SmartObject> way_points_message) {
+ sync_primitives::AutoLock lock(subscribed_way_points_apps_lock_);
+ way_points_data_ = way_points_message;
+}
+
const std::set<uint32_t> ApplicationManagerImpl::GetAppsSubscribedForWayPoints()
const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(subscribed_way_points_apps_lock_);
return subscribed_way_points_apps_list_;
}
@@ -4681,7 +4787,7 @@ const std::set<uint32_t> ApplicationManagerImpl::GetAppsSubscribedForWayPoints()
// retrieve transport type string used in .ini file, e.g. "TCP_WIFI"
const std::string ApplicationManagerImpl::GetTransportTypeProfileString(
connection_handler::DeviceHandle device_handle) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return connection_handler()
.get_session_observer()
@@ -4780,7 +4886,7 @@ bool ApplicationManagerImpl::IsSOStructValid(
return display_capabilities_so.isValid();
}
- LOG4CXX_ERROR(logger_, "Could not find struct id: " << struct_id);
+ SDL_LOG_ERROR("Could not find struct id: " << struct_id);
return false;
}
@@ -4806,7 +4912,7 @@ void ApplicationManagerImpl::SetMockMediaManager(
#endif // BUILD_TESTS
struct MobileAppIdPredicate {
std::string policy_app_id_;
- MobileAppIdPredicate(const std::string& policy_app_id)
+ explicit MobileAppIdPredicate(const std::string& policy_app_id)
: policy_app_id_(policy_app_id) {}
bool operator()(const ApplicationSharedPtr app) const {
return app ? policy_app_id_ == app->policy_app_id() : false;
@@ -4815,7 +4921,8 @@ struct MobileAppIdPredicate {
struct TakeDeviceHandle {
public:
- TakeDeviceHandle(const ApplicationManager& app_mngr) : app_mngr_(app_mngr) {}
+ explicit TakeDeviceHandle(const ApplicationManager& app_mngr)
+ : app_mngr_(app_mngr) {}
std::string operator()(ApplicationSharedPtr& app) {
DCHECK_OR_RETURN(app, "");
return MessageHelper::GetDeviceMacAddressForHandle(app->device(),
@@ -4830,7 +4937,7 @@ ApplicationSharedPtr ApplicationManagerImpl::application(
const std::string& device_id, const std::string& policy_app_id) const {
connection_handler::DeviceHandle device_handle;
if (!connection_handler().GetDeviceID(device_id, &device_handle)) {
- LOG4CXX_DEBUG(logger_, "No such device : " << device_id);
+ SDL_LOG_DEBUG("No such device : " << device_id);
return ApplicationSharedPtr();
}
@@ -4838,8 +4945,7 @@ ApplicationSharedPtr ApplicationManagerImpl::application(
ApplicationSharedPtr app =
FindApp(accessor, IsApplication(device_handle, policy_app_id));
- LOG4CXX_DEBUG(logger_,
- " policy_app_id << " << policy_app_id << "Found = " << app);
+ SDL_LOG_DEBUG(" policy_app_id << " << policy_app_id << "Found = " << app);
return app;
}
@@ -4857,11 +4963,11 @@ std::vector<std::string> ApplicationManagerImpl::devices(
void ApplicationManagerImpl::ChangeAppsHMILevel(
uint32_t app_id, mobile_apis::HMILevel::eType level) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "AppID to change: " << app_id << " -> " << level);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("AppID to change: " << app_id << " -> " << level);
ApplicationSharedPtr app = application(app_id);
if (!app) {
- LOG4CXX_ERROR(logger_, "There is no app with id: " << app_id);
+ SDL_LOG_ERROR("There is no app with id: " << app_id);
return;
}
@@ -4878,7 +4984,7 @@ void ApplicationManagerImpl::ChangeAppsHMILevel(
old_hmi_state->system_context());
OnHMIStateChanged(app_id, old_hmi_state, new_hmi_state);
} else {
- LOG4CXX_WARN(logger_, "Redundant changing HMI level: " << level);
+ SDL_LOG_WARN("Redundant changing HMI level: " << level);
}
}
diff --git a/src/components/application_manager/src/application_state.cc b/src/components/application_manager/src/application_state.cc
index 6ed784424a..1ec4abaed7 100644
--- a/src/components/application_manager/src/application_state.cc
+++ b/src/components/application_manager/src/application_state.cc
@@ -42,7 +42,7 @@ namespace {
struct StateIDComparator {
application_manager::HmiState::StateID state_id_;
- StateIDComparator(application_manager::HmiState::StateID state_id)
+ explicit StateIDComparator(application_manager::HmiState::StateID state_id)
: state_id_(state_id) {}
bool operator()(const application_manager::HmiStatePtr cur) const {
return cur->state_id() == state_id_;
@@ -52,17 +52,16 @@ struct StateIDComparator {
namespace application_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationManager")
+SDL_CREATE_LOG_VARIABLE("ApplicationManager")
ApplicationState::ApplicationState() {}
void ApplicationState::InitState(const WindowID window_id,
const std::string& window_name,
HmiStatePtr state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(state);
- LOG4CXX_DEBUG(logger_,
- "Initing state " << state << " for window " << window_id
+ SDL_LOG_DEBUG("Initing state " << state << " for window " << window_id
<< " with name " << window_name);
{
sync_primitives::AutoLock auto_lock(hmi_states_map_lock_);
@@ -72,7 +71,7 @@ void ApplicationState::InitState(const WindowID window_id,
}
void ApplicationState::AddState(const WindowID window_id, HmiStatePtr state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(state);
switch (state->state_id()) {
case HmiState::StateID::STATE_ID_REGULAR:
@@ -82,8 +81,7 @@ void ApplicationState::AddState(const WindowID window_id, HmiStatePtr state) {
SetPostponedState(window_id, state);
return;
case HmiState::StateID::STATE_ID_CURRENT:
- LOG4CXX_ERROR(logger_,
- "State of type '" << state << "' can't be added for window "
+ SDL_LOG_ERROR("State of type '" << state << "' can't be added for window "
<< window_id);
return;
default:
@@ -96,14 +94,13 @@ void ApplicationState::AddState(const WindowID window_id, HmiStatePtr state) {
void ApplicationState::RemoveState(const WindowID window_id,
HmiState::StateID state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(state);
switch (state) {
case HmiState::StateID::STATE_ID_CURRENT:
case HmiState::StateID::STATE_ID_REGULAR:
if (mobile_apis::PredefinedWindows::DEFAULT_WINDOW == window_id) {
- LOG4CXX_ERROR(logger_,
- "State of type '" << state
+ SDL_LOG_ERROR("State of type '" << state
<< "' can't be removed for window "
<< window_id);
return;
@@ -124,20 +121,19 @@ HmiStatePtr ApplicationState::GetState(const WindowID window_id,
HmiState::StateID state_id) const {
switch (state_id) {
case HmiState::StateID::STATE_ID_REGULAR:
- LOG4CXX_DEBUG(logger_, "Getting regular state for window " << window_id);
+ SDL_LOG_DEBUG("Getting regular state for window " << window_id);
return RegularHmiState(window_id);
case HmiState::StateID::STATE_ID_POSTPONED:
- LOG4CXX_DEBUG(logger_,
- "Getting postponed state for window " << window_id);
+ SDL_LOG_DEBUG("Getting postponed state for window " << window_id);
return PostponedHmiState(window_id);
default:
- LOG4CXX_DEBUG(logger_, "Getting current state for window " << window_id);
+ SDL_LOG_DEBUG("Getting current state for window " << window_id);
return CurrentHmiState(window_id);
}
}
HmiStates ApplicationState::GetStates(const HmiState::StateID state_id) const {
- LOG4CXX_DEBUG(logger_, "Collecting all states of type " << state_id);
+ SDL_LOG_DEBUG("Collecting all states of type " << state_id);
HmiStates hmi_states;
sync_primitives::AutoLock auto_lock(hmi_states_map_lock_);
@@ -149,7 +145,7 @@ HmiStates ApplicationState::GetStates(const HmiState::StateID state_id) const {
}
WindowIds ApplicationState::GetWindowIds() const {
- LOG4CXX_DEBUG(logger_, "Collecting available window ID's");
+ SDL_LOG_DEBUG("Collecting available window ID's");
WindowIds window_ids;
std::string stringified_window_ids;
@@ -161,14 +157,13 @@ WindowIds ApplicationState::GetWindowIds() const {
std::to_string(hmi_state_pair.first);
}
- LOG4CXX_DEBUG(logger_,
- "Existing window IDs: [" + stringified_window_ids + "]");
+ SDL_LOG_DEBUG("Existing window IDs: [" + stringified_window_ids + "]");
return window_ids;
}
void ApplicationState::AddHMIState(const WindowID window_id,
HmiStatePtr state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(state);
sync_primitives::AutoLock auto_lock(hmi_states_map_lock_);
HmiStates& hmi_states = hmi_states_map_[window_id];
@@ -176,54 +171,63 @@ void ApplicationState::AddHMIState(const WindowID window_id,
hmi_states.end(),
StateIDComparator(state->state_id()));
if (hmi_states.end() != it) {
- LOG4CXX_WARN(logger_,
- "Hmi state with ID " << state->state_id()
- << "has been already applied for window "
- << window_id
- << " of this application. Ignoring");
- return;
+ SDL_LOG_WARN("Hmi state with ID "
+ << state->state_id() << "has been already applied for window "
+ << window_id << " of this application. Overwriting");
+ EraseHMIState(hmi_states, it);
}
+ if (!hmi_states.empty()) {
+ HmiStatePtr back_state = hmi_states.back();
+ state->set_parent(back_state);
+ }
hmi_states.push_back(state);
}
void ApplicationState::RemoveHMIState(const WindowID window_id,
HmiState::StateID state_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(hmi_states_map_lock_);
HmiStates& hmi_states = hmi_states_map_[window_id];
+ // unable to remove regular state
+ DCHECK_OR_RETURN_VOID(state_id != HmiState::StateID::STATE_ID_REGULAR);
HmiStates::iterator it = std::find_if(
hmi_states.begin(), hmi_states.end(), StateIDComparator(state_id));
if (hmi_states.end() == it) {
- LOG4CXX_ERROR(logger_,
- "Unsuccesful remove HmiState: " << state_id << " for window "
+ SDL_LOG_ERROR("Unsuccesful remove HmiState: " << state_id << " for window "
<< window_id);
return;
}
- // unable to remove regular state
- DCHECK_OR_RETURN_VOID(hmi_states.begin() != it);
- HmiStates::iterator next = it;
- HmiStates::iterator prev = it;
- next++;
- prev--;
-
- if (next != hmi_states.end()) {
- HmiStatePtr next_state = *next;
- HmiStatePtr prev_state = *prev;
- next_state->set_parent(prev_state);
+ EraseHMIState(hmi_states, it);
+}
+
+void ApplicationState::EraseHMIState(HmiStates& hmi_states,
+ HmiStates::iterator it) {
+ if (hmi_states.begin() == it) {
+ (*it)->set_parent(nullptr);
+ } else {
+ HmiStates::iterator next = it;
+ HmiStates::iterator prev = it;
+ ++next;
+ --prev;
+
+ if (hmi_states.end() != next) {
+ HmiStatePtr next_state = *next;
+ HmiStatePtr prev_state = *prev;
+ next_state->set_parent(prev_state);
+ }
}
hmi_states.erase(it);
}
void ApplicationState::RemoveWindowHMIStates(const WindowID window_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(mobile_apis::PredefinedWindows::DEFAULT_WINDOW !=
window_id);
- LOG4CXX_DEBUG(logger_,
- "Removing HMI states for window with id #" << window_id);
+ SDL_LOG_DEBUG("Removing HMI states for window with id #" << window_id);
{
sync_primitives::AutoLock auto_lock(hmi_states_map_lock_);
hmi_states_map_.erase(window_id);
@@ -231,28 +235,17 @@ void ApplicationState::RemoveWindowHMIStates(const WindowID window_id) {
}
void ApplicationState::RemovePostponedState(const WindowID window_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoLock auto_lock(hmi_states_map_lock_);
- HmiStates& hmi_states = hmi_states_map_[window_id];
- DCHECK_OR_RETURN_VOID(!hmi_states.empty());
-
- StateIDComparator finder(HmiState::StateID::STATE_ID_POSTPONED);
-
- HmiStates::iterator postponed_state =
- std::find_if(hmi_states.begin(), hmi_states.end(), finder);
-
- if (hmi_states.end() == postponed_state) {
- LOG4CXX_ERROR(logger_,
- "No postponed state is set for window " << window_id);
- return;
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock auto_lock(postponed_states_map_lock_);
+ size_t deleted_elements = postponed_states_map_.erase(window_id);
+ if (0 == deleted_elements) {
+ SDL_LOG_ERROR("No postponed state is set for window " << window_id);
}
-
- hmi_states.erase(postponed_state);
}
void ApplicationState::SetRegularState(const WindowID window_id,
HmiStatePtr state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(state);
DCHECK_OR_RETURN_VOID(state->state_id() ==
HmiState::StateID::STATE_ID_REGULAR);
@@ -260,45 +253,32 @@ void ApplicationState::SetRegularState(const WindowID window_id,
HmiStates& hmi_states = hmi_states_map_[window_id];
DCHECK_OR_RETURN_VOID(!hmi_states.empty());
- HmiStatePtr front_state = hmi_states.front();
- HmiState::StateID front_state_id = front_state->state_id();
- if (HmiState::StateID::STATE_ID_POSTPONED == front_state_id) {
- // Drop postponed state
- hmi_states.erase(hmi_states.begin());
- }
-
// Drop regular state
- hmi_states.erase(hmi_states.begin());
+ HmiStates::iterator it =
+ std::find_if(hmi_states.begin(),
+ hmi_states.end(),
+ StateIDComparator(HmiState::StateID::STATE_ID_REGULAR));
+ DCHECK_OR_RETURN_VOID(hmi_states.end() != it);
+ EraseHMIState(hmi_states, it);
if (!hmi_states.empty()) {
- HmiStatePtr front_state = hmi_states.front();
- front_state->set_parent(state);
+ HmiStatePtr back_state = hmi_states.back();
+ state->set_parent(back_state);
}
// Insert new regular state
- hmi_states.insert(hmi_states.begin(), state);
- if (HmiState::StateID::STATE_ID_POSTPONED == front_state_id) {
- // Restore postponed state if it was before
- hmi_states.insert(hmi_states.begin(), front_state);
- }
+ hmi_states.push_back(state);
}
void ApplicationState::SetPostponedState(const WindowID window_id,
HmiStatePtr state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(state);
DCHECK_OR_RETURN_VOID(state->state_id() ==
HmiState::StateID::STATE_ID_POSTPONED);
- sync_primitives::AutoLock auto_lock(hmi_states_map_lock_);
- HmiStates& hmi_states = hmi_states_map_[window_id];
- DCHECK_OR_RETURN_VOID(!hmi_states.empty());
- HmiStatePtr front_state = hmi_states.front();
- if (front_state->state_id() == HmiState::StateID::STATE_ID_POSTPONED) {
- hmi_states.erase(hmi_states.begin());
- }
-
- hmi_states.insert(hmi_states.begin(), state);
+ sync_primitives::AutoLock auto_lock(postponed_states_map_lock_);
+ postponed_states_map_[window_id] = state;
}
HmiStatePtr ApplicationState::CurrentHmiState(const WindowID window_id) const {
@@ -310,9 +290,6 @@ HmiStatePtr ApplicationState::CurrentHmiState(const WindowID window_id) const {
DCHECK_OR_RETURN(!hmi_states.empty(), HmiStatePtr());
HmiStatePtr back_state = hmi_states.back();
- DCHECK_OR_RETURN(
- back_state->state_id() != HmiState::StateID::STATE_ID_POSTPONED,
- HmiStatePtr());
return back_state;
}
@@ -324,28 +301,21 @@ HmiStatePtr ApplicationState::RegularHmiState(const WindowID window_id) const {
const HmiStates& hmi_states = it_states->second;
DCHECK_OR_RETURN(!hmi_states.empty(), HmiStatePtr());
+ auto it =
+ std::find_if(hmi_states.begin(),
+ hmi_states.end(),
+ StateIDComparator(HmiState::StateID::STATE_ID_REGULAR));
+ DCHECK_OR_RETURN(hmi_states.end() != it, HmiStatePtr());
- HmiStates::const_iterator front_itr = hmi_states.begin();
- if ((*front_itr)->state_id() == HmiState::StateID::STATE_ID_POSTPONED) {
- ++front_itr;
- }
-
- return *front_itr;
+ return *it;
}
HmiStatePtr ApplicationState::PostponedHmiState(
const WindowID window_id) const {
- sync_primitives::AutoLock auto_lock(hmi_states_map_lock_);
- auto it_states = hmi_states_map_.find(window_id);
- DCHECK_OR_RETURN(it_states != hmi_states_map_.end(), HmiStatePtr());
-
- const HmiStates& hmi_states = it_states->second;
- DCHECK_OR_RETURN(!hmi_states.empty(), HmiStatePtr());
+ sync_primitives::AutoLock auto_lock(postponed_states_map_lock_);
- HmiStatePtr front_state = hmi_states.front();
- return front_state->state_id() == HmiState::StateID::STATE_ID_POSTPONED
- ? front_state
- : HmiStatePtr();
+ auto it = postponed_states_map_.find(window_id);
+ return it != postponed_states_map_.end() ? it->second : HmiStatePtr();
}
} // namespace application_manager
diff --git a/src/components/application_manager/src/command_holder_impl.cc b/src/components/application_manager/src/command_holder_impl.cc
index 1c336ac64f..cfd782a80b 100644
--- a/src/components/application_manager/src/command_holder_impl.cc
+++ b/src/components/application_manager/src/command_holder_impl.cc
@@ -35,7 +35,7 @@
#include "application_manager/commands/command.h"
namespace application_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationManager")
+SDL_CREATE_LOG_VARIABLE("ApplicationManager")
CommandHolderImpl::CommandHolderImpl(ApplicationManager& app_manager)
: app_manager_(app_manager) {}
@@ -45,33 +45,29 @@ void CommandHolderImpl::Suspend(
CommandType type,
commands::Command::CommandSource source,
std::shared_ptr<smart_objects::SmartObject> command) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(application);
- LOG4CXX_DEBUG(logger_,
- "Suspending command(s) for application: "
- << application->policy_app_id());
+ SDL_LOG_DEBUG("Suspending command(s) for application: "
+ << application->policy_app_id());
AppCommandInfo info = {command, source};
sync_primitives::AutoLock lock(commands_lock_);
if (CommandType::kHmiCommand == type) {
app_hmi_commands_[application].push_back(info);
- LOG4CXX_DEBUG(logger_,
- "Suspended HMI command(s): " << app_hmi_commands_.size());
+ SDL_LOG_DEBUG("Suspended HMI command(s): " << app_hmi_commands_.size());
} else {
app_mobile_commands_[application].push_back(info);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Suspended mobile command(s): " << app_mobile_commands_.size());
}
}
void CommandHolderImpl::Resume(ApplicationSharedPtr application,
CommandType type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(application);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Resuming command(s) for application: " << application->policy_app_id());
if (CommandType::kHmiCommand == type) {
ResumeHmiCommand(application);
@@ -81,24 +77,21 @@ void CommandHolderImpl::Resume(ApplicationSharedPtr application,
}
void CommandHolderImpl::Clear(ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(application);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Clearing command(s) for application: " << application->policy_app_id());
sync_primitives::AutoLock lock(commands_lock_);
auto app_hmi_commands = app_hmi_commands_.find(application);
if (app_hmi_commands_.end() != app_hmi_commands) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Clearing HMI command(s): " << app_hmi_commands->second.size());
app_hmi_commands_.erase(app_hmi_commands);
}
auto app_mobile_commands = app_mobile_commands_.find(application);
if (app_mobile_commands_.end() != app_mobile_commands) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Clearing mobile command(s): " << app_mobile_commands->second.size());
app_mobile_commands_.erase(app_mobile_commands);
}
@@ -112,8 +105,7 @@ void CommandHolderImpl::ResumeHmiCommand(ApplicationSharedPtr application) {
return;
}
- LOG4CXX_DEBUG(logger_,
- "Resuming HMI command(s): " << app_hmi_commands_.size());
+ SDL_LOG_DEBUG("Resuming HMI command(s): " << app_hmi_commands_.size());
for (auto cmd : app_commands->second) {
(*cmd.command_ptr_)[strings::msg_params][strings::app_id] =
@@ -133,8 +125,7 @@ void CommandHolderImpl::ResumeMobileCommand(ApplicationSharedPtr application) {
return;
}
- LOG4CXX_DEBUG(logger_,
- "Resuming mobile command(s): " << app_mobile_commands_.size());
+ SDL_LOG_DEBUG("Resuming mobile command(s): " << app_mobile_commands_.size());
for (auto cmd : app_commands->second) {
(*cmd.command_ptr_)[strings::params][strings::connection_key] =
diff --git a/src/components/application_manager/src/commands/command_impl.cc b/src/components/application_manager/src/commands/command_impl.cc
index 8fa9cbe919..47659e52ca 100644
--- a/src/components/application_manager/src/commands/command_impl.cc
+++ b/src/components/application_manager/src/commands/command_impl.cc
@@ -49,7 +49,7 @@ struct AppExtensionPredicate {
namespace commands {
-CREATE_LOGGERPTR_LOCAL(CommandImpl::logger_, "Commands")
+SDL_CREATE_LOG_VARIABLE("Commands")
const int32_t CommandImpl::hmi_protocol_type_ = 1;
const int32_t CommandImpl::mobile_protocol_type_ = 0;
@@ -111,6 +111,14 @@ uint32_t CommandImpl::connection_key() const {
return (*message_)[strings::params][strings::connection_key].asUInt();
}
+void CommandImpl::set_warning_info(const std::string info) {
+ warning_info_ = info;
+}
+
+std::string CommandImpl::warning_info() const {
+ return warning_info_;
+}
+
void CommandImpl::onTimeOut() {}
bool CommandImpl::AllowedToTerminate() {
@@ -122,15 +130,15 @@ void CommandImpl::SetAllowedToTerminate(const bool allowed) {
}
bool CommandImpl::CheckAllowedParameters(const Command::CommandSource source) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const ApplicationSharedPtr app =
application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_,
- "There is no registered application with "
- "connection key '"
- << connection_key() << "'");
+ SDL_LOG_ERROR(
+ "There is no registered application with "
+ "connection key '"
+ << connection_key() << "'");
return false;
}
@@ -141,7 +149,7 @@ bool CommandImpl::CheckAllowedParameters(const Command::CommandSource source) {
smart_objects::SmartMap::const_iterator iter_end = s_map.map_end();
for (; iter != iter_end; ++iter) {
- LOG4CXX_DEBUG(logger_, "Request's param: " << iter->first);
+ SDL_LOG_DEBUG("Request's param: " << iter->first);
params.insert(iter->first);
}
@@ -191,7 +199,7 @@ bool CommandImpl::CheckAllowedParameters(const Command::CommandSource source) {
}
void CommandImpl::RemoveDisallowedParameters() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject& params = (*message_)[strings::msg_params];
@@ -201,8 +209,7 @@ void CommandImpl::RemoveDisallowedParameters() {
// Remove from request all disallowed parameters
params.erase(key);
removed_parameters_permissions_.disallowed_params.insert(key);
- LOG4CXX_INFO(logger_,
- "Following parameter is disallowed by user: " << key);
+ SDL_LOG_INFO("Following parameter is disallowed by user: " << key);
}
else if (removed_parameters_permissions_.undefined_params.end() !=
@@ -210,8 +217,7 @@ void CommandImpl::RemoveDisallowedParameters() {
// Remove from request all undefined yet parameters
params.erase(key);
removed_parameters_permissions_.undefined_params.insert(key);
- LOG4CXX_INFO(logger_,
- "Following parameter is disallowed by policy: " << key);
+ SDL_LOG_INFO("Following parameter is disallowed by policy: " << key);
}
else if (parameters_permissions_.allowed_params.end() ==
@@ -219,27 +225,25 @@ void CommandImpl::RemoveDisallowedParameters() {
// Remove from request all parameters missed in allowed
params.erase(key);
removed_parameters_permissions_.undefined_params.insert(key);
- LOG4CXX_INFO(logger_,
- "Following parameter is not found among allowed parameters '"
- << key << "' and will be treated as disallowed.");
+ SDL_LOG_INFO("Following parameter is not found among allowed parameters '"
+ << key << "' and will be treated as disallowed.");
}
}
}
bool CommandImpl::ReplaceMobileWithHMIAppId(
ns_smart_device_link::ns_smart_objects::SmartObject& message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (message.keyExists(strings::app_id)) {
ApplicationSharedPtr application =
application_manager_.application(message[strings::app_id].asUInt());
if (!application) {
- LOG4CXX_ERROR(logger_, "Substitution mobile --> HMI id is failed.");
+ SDL_LOG_ERROR("Substitution mobile --> HMI id is failed.");
return false;
}
- LOG4CXX_DEBUG(logger_,
- "ReplaceMobileWithHMIAppId from "
- << message[strings::app_id].asInt() << " to "
- << application->hmi_app_id());
+ SDL_LOG_DEBUG("ReplaceMobileWithHMIAppId from "
+ << message[strings::app_id].asInt() << " to "
+ << application->hmi_app_id());
message[strings::app_id] = application->hmi_app_id();
} else {
switch (message.getType()) {
@@ -279,13 +283,12 @@ bool CommandImpl::ReplaceHMIWithMobileAppId(
message[strings::app_id].asUInt());
if (!application) {
- LOG4CXX_ERROR(logger_, "Substitution HMI --> mobile id is failed.");
+ SDL_LOG_ERROR("Substitution HMI --> mobile id is failed.");
return false;
}
- LOG4CXX_DEBUG(logger_,
- "ReplaceHMIWithMobileAppId from "
- << message[strings::app_id].asInt() << " to "
- << application->app_id());
+ SDL_LOG_DEBUG("ReplaceHMIWithMobileAppId from "
+ << message[strings::app_id].asInt() << " to "
+ << application->app_id());
message[strings::app_id] = application->app_id();
} else {
switch (message.getType()) {
@@ -318,7 +321,7 @@ bool CommandImpl::ReplaceHMIWithMobileAppId(
uint32_t CommandImpl::CalcCommandInternalConsecutiveNumber(
ApplicationConstSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const DataAccessor<CommandsMap> accessor = app->commands_map();
const CommandsMap& commands = accessor.GetData();
@@ -330,5 +333,24 @@ uint32_t CommandImpl::CalcCommandInternalConsecutiveNumber(
return last_command_number + 1;
}
+bool CommandImpl::CheckSyntax(const std::string& str,
+ bool allow_empty_line) const {
+ if (std::string::npos != str.find_first_of("\t\n")) {
+ SDL_LOG_ERROR("CheckSyntax failed! :" << str);
+ return false;
+ }
+ if (std::string::npos != str.find("\\n") ||
+ std::string::npos != str.find("\\t")) {
+ SDL_LOG_ERROR("CheckSyntax failed! :" << str);
+ return false;
+ }
+ if (!allow_empty_line) {
+ if ((std::string::npos == str.find_first_not_of(' '))) {
+ return false;
+ }
+ }
+ return true;
+}
+
} // namespace commands
} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/command_notification_from_mobile_impl.cc b/src/components/application_manager/src/commands/command_notification_from_mobile_impl.cc
index 46c1c87699..e978a49635 100644
--- a/src/components/application_manager/src/commands/command_notification_from_mobile_impl.cc
+++ b/src/components/application_manager/src/commands/command_notification_from_mobile_impl.cc
@@ -39,6 +39,8 @@ namespace application_manager {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
CommandNotificationFromMobileImpl::CommandNotificationFromMobileImpl(
const MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -73,7 +75,7 @@ void CommandNotificationFromMobileImpl::SendNotification() {
(*message_)[strings::params][strings::message_type] =
static_cast<int32_t>(application_manager::MessageType::kNotification);
- LOG4CXX_INFO(logger_, "SendNotification");
+ SDL_LOG_INFO("SendNotification");
MessageHelper::PrintSmartObject(*message_);
rpc_service_.SendMessageToMobile(message_);
diff --git a/src/components/application_manager/src/commands/command_notification_impl.cc b/src/components/application_manager/src/commands/command_notification_impl.cc
index cc2606ab6f..13020828b1 100644
--- a/src/components/application_manager/src/commands/command_notification_impl.cc
+++ b/src/components/application_manager/src/commands/command_notification_impl.cc
@@ -39,6 +39,8 @@ namespace application_manager {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
CommandNotificationImpl::CommandNotificationImpl(
const MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -63,16 +65,17 @@ bool CommandNotificationImpl::CleanUp() {
void CommandNotificationImpl::Run() {}
-void CommandNotificationImpl::SendNotification() {
+void CommandNotificationImpl::SendNotification(const bool final_message) {
(*message_)[strings::params][strings::protocol_type] = mobile_protocol_type_;
(*message_)[strings::params][strings::protocol_version] = protocol_version_;
(*message_)[strings::params][strings::message_type] =
static_cast<int32_t>(application_manager::MessageType::kNotification);
- LOG4CXX_INFO(logger_, "SendNotification");
+ SDL_LOG_INFO("SendNotification: final_message = " << std::boolalpha
+ << final_message);
MessageHelper::PrintSmartObject(*message_);
- rpc_service_.SendMessageToMobile(message_);
+ rpc_service_.SendMessageToMobile(message_, final_message);
}
} // namespace commands
diff --git a/src/components/application_manager/src/commands/command_request_impl.cc b/src/components/application_manager/src/commands/command_request_impl.cc
index f4a352fdc4..08bf25de54 100644
--- a/src/components/application_manager/src/commands/command_request_impl.cc
+++ b/src/components/application_manager/src/commands/command_request_impl.cc
@@ -49,6 +49,8 @@ namespace application_manager {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands");
+
std::string MergeInfos(const ResponseInfo& first_info,
const std::string& first_str,
const ResponseInfo& second_info,
@@ -92,22 +94,19 @@ const std::string CreateInfoForUnsupportedResult(
return "UI is not supported by system";
}
case (HmiInterfaces::InterfaceID::HMI_INTERFACE_Navigation): {
- return "Navi is not supported by system";
+ return "Navigation is not supported by system";
}
case (HmiInterfaces::InterfaceID::HMI_INTERFACE_VehicleInfo): {
return "VehicleInfo is not supported by system";
}
case (HmiInterfaces::InterfaceID::HMI_INTERFACE_RC): {
- return "Remote control is not supported by system";
+ return "RC is not supported by system";
}
default:
-#ifdef ENABLE_LOG
- CREATE_LOGGERPTR_LOCAL(logger, "Commands");
- LOG4CXX_WARN(logger,
- "Could not create info because"
- " interface isn't valid. Interface is:"
- << static_cast<int32_t>(interface));
-#endif // ENABLE_LOG
+ SDL_LOG_WARN(
+ "Could not create info because"
+ " interface isn't valid. Interface is:"
+ << static_cast<int32_t>(interface));
return "";
}
}
@@ -232,7 +231,7 @@ bool CommandRequestImpl::CleanUp() {
void CommandRequestImpl::Run() {}
void CommandRequestImpl::onTimeOut() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
unsubscribe_from_all_hmi_events();
unsubscribe_from_all_mobile_events();
@@ -240,7 +239,7 @@ void CommandRequestImpl::onTimeOut() {
// FIXME (dchmerev@luxoft.com): atomic_xchg fits better
sync_primitives::AutoLock auto_lock(state_lock_);
if (kCompleted == current_state_) {
- LOG4CXX_DEBUG(logger_, "current_state_ = kCompleted");
+ SDL_LOG_DEBUG("current_state_ = kCompleted");
// don't send timeout if request completed
return;
}
@@ -267,7 +266,7 @@ void CommandRequestImpl::SendResponse(
const char* info,
const smart_objects::SmartObject* response_params,
const std::vector<uint8_t> binary_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
{
sync_primitives::AutoLock auto_lock(state_lock_);
if (kTimedOut == current_state_) {
@@ -298,7 +297,7 @@ void CommandRequestImpl::SendResponse(
response[strings::msg_params] = *response_params;
}
- if (info) {
+ if (info && *info != '\0') {
response[strings::msg_params][strings::info] = std::string(info);
}
@@ -318,32 +317,23 @@ void CommandRequestImpl::SendResponse(
}
response[strings::msg_params][strings::success] = success;
- response[strings::msg_params][strings::result_code] = result_code;
+ if ((result_code == mobile_apis::Result::SUCCESS ||
+ result_code == mobile_apis::Result::WARNINGS) &&
+ !warning_info().empty()) {
+ response[strings::msg_params][strings::info] =
+ (info && *info != '\0') ? std::string(info) + "\n" + warning_info()
+ : warning_info();
+ response[strings::msg_params][strings::result_code] =
+ mobile_apis::Result::WARNINGS;
+ } else {
+ response[strings::msg_params][strings::result_code] = result_code;
+ }
is_success_result_ = success;
rpc_service_.ManageMobileCommand(result, SOURCE_SDL);
}
-bool CommandRequestImpl::CheckSyntax(const std::string& str,
- bool allow_empty_line) {
- if (std::string::npos != str.find_first_of("\t\n")) {
- LOG4CXX_ERROR(logger_, "CheckSyntax failed! :" << str);
- return false;
- }
- if (std::string::npos != str.find("\\n") ||
- std::string::npos != str.find("\\t")) {
- LOG4CXX_ERROR(logger_, "CheckSyntax failed! :" << str);
- return false;
- }
- if (!allow_empty_line) {
- if ((std::string::npos == str.find_first_not_of(' '))) {
- return false;
- }
- }
- return true;
-}
-
smart_objects::SmartObject CreateUnsupportedResourceResponse(
const hmi_apis::FunctionID::eType function_id,
const uint32_t hmi_correlation_id,
@@ -364,7 +354,7 @@ smart_objects::SmartObject CreateUnsupportedResourceResponse(
bool CommandRequestImpl::ProcessHMIInterfacesAvailability(
const uint32_t hmi_correlation_id,
const hmi_apis::FunctionID::eType& function_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
HmiInterfaces::InterfaceID interface =
hmi_interfaces.GetInterfaceFromFunction(function_id);
@@ -382,41 +372,38 @@ bool CommandRequestImpl::ProcessHMIInterfacesAvailability(
}
void CommandRequestImpl::UpdateHash() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (hash_update_mode_ == kSkipHashUpdate) {
- LOG4CXX_DEBUG(logger_, "Hash update is disabled for " << function_id());
+ SDL_LOG_DEBUG("Hash update is disabled for " << function_id());
return;
}
if (HmiInterfaces::InterfaceState::STATE_NOT_RESPONSE ==
application_manager_.hmi_interfaces().GetInterfaceState(
HmiInterfaces::InterfaceID::HMI_INTERFACE_UI)) {
- LOG4CXX_ERROR(logger_,
- "UI interface has not responded. Hash won't be updated.");
+ SDL_LOG_ERROR("UI interface has not responded. Hash won't be updated.");
return;
}
if (!is_success_result_) {
- LOG4CXX_WARN(logger_, "Command is not succeeded. Hash won't be updated.");
+ SDL_LOG_WARN("Command is not succeeded. Hash won't be updated.");
return;
}
ApplicationSharedPtr application =
application_manager_.application(connection_key());
if (!application) {
- LOG4CXX_ERROR(logger_,
- "Application with connection key "
- << connection_key()
- << " not found. Not able to update hash.");
+ SDL_LOG_ERROR("Application with connection key "
+ << connection_key()
+ << " not found. Not able to update hash.");
return;
}
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Updating hash for application with connection key "
- << connection_key() << " while processing function id "
- << MessageHelper::StringifiedFunctionID(
- static_cast<mobile_api::FunctionID::eType>(function_id())));
+ << connection_key() << " while processing function id "
+ << MessageHelper::StringifiedFunctionID(
+ static_cast<mobile_api::FunctionID::eType>(function_id())));
application->UpdateHash();
}
@@ -426,7 +413,7 @@ void CommandRequestImpl::SendProviderRequest(
const hmi_apis::FunctionID::eType& hmi_function_id,
const smart_objects::SmartObject* msg,
bool use_events) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool hmi_destination = false;
ApplicationSharedPtr app;
// Default error code and error message
@@ -453,7 +440,7 @@ void CommandRequestImpl::SendProviderRequest(
}
if (hmi_destination) {
- LOG4CXX_DEBUG(logger_, "Sending Request to HMI Provider");
+ SDL_LOG_DEBUG("Sending Request to HMI Provider");
application_manager_.IncreaseForwardedRequestTimeout(connection_key(),
correlation_id());
SendHMIRequest(hmi_function_id, &(*msg)[strings::msg_params], use_events);
@@ -461,7 +448,7 @@ void CommandRequestImpl::SendProviderRequest(
}
if (!app) {
- LOG4CXX_DEBUG(logger_, "Invalid App Provider pointer");
+ SDL_LOG_DEBUG("Invalid App Provider pointer");
SendResponse(false, error_code, error_msg.c_str());
return;
}
@@ -498,14 +485,13 @@ void CommandRequestImpl::SendMobileRequest(
request[strings::params][strings::correlation_id] = mobile_correlation_id;
request[strings::params][strings::message_type] = MessageType::kRequest;
if (use_events) {
- LOG4CXX_DEBUG(logger_,
- "SendMobileRequest subscribe_on_event "
- << function_id << " " << mobile_correlation_id);
+ SDL_LOG_DEBUG("SendMobileRequest subscribe_on_event "
+ << function_id << " " << mobile_correlation_id);
subscribe_on_event(function_id, mobile_correlation_id);
}
if (!rpc_service_.ManageMobileCommand(msg, SOURCE_SDL)) {
- LOG4CXX_ERROR(logger_, "Unable to send request to mobile");
+ SDL_LOG_ERROR("Unable to send request to mobile");
}
}
@@ -533,18 +519,17 @@ uint32_t CommandRequestImpl::SendHMIRequest(
}
if (use_events) {
- LOG4CXX_DEBUG(logger_,
- "SendHMIRequest subscribe_on_event " << function_id << " "
+ SDL_LOG_DEBUG("SendHMIRequest subscribe_on_event " << function_id << " "
<< hmi_correlation_id);
subscribe_on_event(function_id, hmi_correlation_id);
}
if (ProcessHMIInterfacesAvailability(hmi_correlation_id, function_id)) {
if (!rpc_service_.ManageHMICommand(result, SOURCE_SDL_TO_HMI)) {
- LOG4CXX_ERROR(logger_, "Unable to send request");
+ SDL_LOG_ERROR("Unable to send request");
SendResponse(false, mobile_apis::Result::OUT_OF_MEMORY);
}
} else {
- LOG4CXX_DEBUG(logger_, "Interface is not available");
+ SDL_LOG_DEBUG("Interface is not available");
}
return hmi_correlation_id;
}
@@ -555,7 +540,7 @@ void CommandRequestImpl::CreateHMINotification(
smart_objects::SmartObjectSPtr result =
std::make_shared<smart_objects::SmartObject>();
if (!result) {
- LOG4CXX_ERROR(logger_, "Memory allocation failed.");
+ SDL_LOG_ERROR("Memory allocation failed.");
return;
}
smart_objects::SmartObject& notify = *result;
@@ -570,7 +555,7 @@ void CommandRequestImpl::CreateHMINotification(
notify[strings::msg_params] = msg_params;
if (!rpc_service_.ManageHMICommand(result, SOURCE_SDL_TO_HMI)) {
- LOG4CXX_ERROR(logger_, "Unable to send HMI notification");
+ SDL_LOG_ERROR("Unable to send HMI notification");
}
}
@@ -683,7 +668,7 @@ mobile_apis::Result::eType CommandRequestImpl::GetMobileResultCode(
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Unknown HMI result code " << hmi_code);
+ SDL_LOG_ERROR("Unknown HMI result code " << hmi_code);
break;
}
}
@@ -693,7 +678,7 @@ mobile_apis::Result::eType CommandRequestImpl::GetMobileResultCode(
bool CommandRequestImpl::CheckAllowedParameters(
const Command::CommandSource source) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// RegisterAppInterface should always be allowed
if (mobile_apis::FunctionID::RegisterAppInterfaceID ==
@@ -706,19 +691,19 @@ bool CommandRequestImpl::CheckAllowedParameters(
bool CommandRequestImpl::CheckHMICapabilities(
const mobile_apis::ButtonName::eType button) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace smart_objects;
using namespace mobile_apis;
if (!hmi_capabilities_.is_ui_cooperating()) {
- LOG4CXX_ERROR(logger_, "UI is not supported by HMI");
+ SDL_LOG_ERROR("UI is not supported by HMI");
return false;
}
auto button_capabilities = hmi_capabilities_.button_capabilities();
if (!button_capabilities) {
- LOG4CXX_ERROR(logger_, "Invalid button capabilities object");
+ SDL_LOG_ERROR("Invalid button capabilities object");
return false;
}
@@ -727,18 +712,16 @@ bool CommandRequestImpl::CheckHMICapabilities(
const ButtonName::eType current_button = static_cast<ButtonName::eType>(
capabilities.getElement(hmi_response::button_name).asInt());
if (current_button == button) {
- LOG4CXX_DEBUG(logger_,
- "Button capabilities for " << button << " was found");
+ SDL_LOG_DEBUG("Button capabilities for " << button << " was found");
return true;
}
}
- LOG4CXX_DEBUG(logger_,
- "Button capabilities for " << button << " was not found");
+ SDL_LOG_DEBUG("Button capabilities for " << button << " was not found");
return false;
}
-void CommandRequestImpl::AddDissalowedParameterToInfoString(
+void CommandRequestImpl::AddDisallowedParameterToInfoString(
std::string& info, const std::string& param) const {
// prepare disallowed params enumeration for response info string
if (info.empty()) {
@@ -755,12 +738,12 @@ void CommandRequestImpl::AddDisallowedParametersToInfo(
RPCParams::const_iterator it =
removed_parameters_permissions_.disallowed_params.begin();
for (; it != removed_parameters_permissions_.disallowed_params.end(); ++it) {
- AddDissalowedParameterToInfoString(info, (*it));
+ AddDisallowedParameterToInfoString(info, (*it));
}
it = removed_parameters_permissions_.undefined_params.begin();
for (; it != removed_parameters_permissions_.undefined_params.end(); ++it) {
- AddDissalowedParameterToInfoString(info, (*it));
+ AddDisallowedParameterToInfoString(info, (*it));
}
if (!info.empty()) {
@@ -798,7 +781,7 @@ bool CommandRequestImpl::HasDisallowedParams() const {
bool CommandRequestImpl::IsMobileResultSuccess(
const mobile_apis::Result::eType result_code) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
return Compare<mobile_apis::Result::eType, EQ, ONE>(
result_code,
@@ -812,7 +795,7 @@ bool CommandRequestImpl::IsMobileResultSuccess(
bool CommandRequestImpl::IsHMIResultSuccess(
const hmi_apis::Common_Result::eType result_code) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
return Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
result_code,
@@ -827,7 +810,7 @@ bool CommandRequestImpl::IsHMIResultSuccess(
bool CommandRequestImpl::PrepareResultForMobileResponse(
hmi_apis::Common_Result::eType result_code,
HmiInterfaces::InterfaceID interface) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (IsHMIResultSuccess(result_code)) {
return true;
}
@@ -843,7 +826,7 @@ bool CommandRequestImpl::PrepareResultForMobileResponse(
bool CommandRequestImpl::PrepareResultForMobileResponse(
ResponseInfo& out_first, ResponseInfo& out_second) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool result =
CheckResult(out_first, out_second) || CheckResult(out_second, out_first);
return result;
@@ -862,8 +845,7 @@ void CommandRequestImpl::GetInfo(
mobile_apis::Result::eType CommandRequestImpl::PrepareResultCodeForResponse(
const ResponseInfo& first, const ResponseInfo& second) {
- LOG4CXX_AUTO_TRACE(logger_);
- mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
+ SDL_LOG_AUTO_TRACE();
if (IsResultCodeUnsupported(first, second) ||
IsResultCodeUnsupported(second, first)) {
return mobile_apis::Result::UNSUPPORTED_RESOURCE;
@@ -884,7 +866,7 @@ mobile_apis::Result::eType CommandRequestImpl::PrepareResultCodeForResponse(
if (!second.is_unsupported_resource) {
second_result = second.result_code;
}
- result_code =
+ mobile_apis::Result::eType result_code =
MessageHelper::HMIToMobileResult(std::max(first_result, second_result));
return result_code;
}
@@ -916,10 +898,10 @@ void CommandRequestImpl::EndAwaitForInterface(
if (it != awaiting_response_interfaces_.end()) {
awaiting_response_interfaces_.erase(it);
} else {
- LOG4CXX_WARN(logger_,
- "EndAwaitForInterface called on interface \
+ SDL_LOG_WARN(
+ "EndAwaitForInterface called on interface \
which was not put into await state: "
- << interface_id);
+ << interface_id);
}
}
@@ -936,21 +918,25 @@ std::string GetComponentNameFromInterface(
const HmiInterfaces::InterfaceID& interface) {
switch (interface) {
case HmiInterfaces::HMI_INTERFACE_Buttons:
- return "Buttons";
+ return hmi_interface::buttons;
case HmiInterfaces::HMI_INTERFACE_BasicCommunication:
- return "BasicCommunication";
+ return hmi_interface::basic_communication;
case HmiInterfaces::HMI_INTERFACE_VR:
- return "VR";
+ return hmi_interface::vr;
case HmiInterfaces::HMI_INTERFACE_TTS:
- return "TTS";
+ return hmi_interface::tts;
case HmiInterfaces::HMI_INTERFACE_UI:
- return "UI";
+ return hmi_interface::ui;
case HmiInterfaces::HMI_INTERFACE_Navigation:
- return "Navigation";
+ return hmi_interface::navigation;
case HmiInterfaces::HMI_INTERFACE_VehicleInfo:
- return "VehicleInfo";
+ return hmi_interface::vehicle_info;
case HmiInterfaces::HMI_INTERFACE_SDL:
- return "SDL";
+ return hmi_interface::sdl;
+ case HmiInterfaces::HMI_INTERFACE_RC:
+ return hmi_interface::rc;
+ case HmiInterfaces::HMI_INTERFACE_AppService:
+ return hmi_interface::app_service;
default:
return "Unknown type";
}
@@ -966,10 +952,10 @@ const std::string InfoInterfaceSeparator(
void CommandRequestImpl::AddTimeOutComponentInfoToMessage(
smart_objects::SmartObject& response) const {
using ns_smart_device_link::ns_smart_objects::SmartObject;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(awaiting_response_interfaces_lock_);
if (awaiting_response_interfaces_.empty()) {
- LOG4CXX_ERROR(logger_, "No interfaces awaiting, info param is empty");
+ SDL_LOG_ERROR("No interfaces awaiting, info param is empty");
return;
}
@@ -978,8 +964,7 @@ void CommandRequestImpl::AddTimeOutComponentInfoToMessage(
awaiting_response_interfaces_.end(),
std::string(""),
InfoInterfaceSeparator);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Not responding interfaces string: " << not_responding_interfaces_string);
if (!not_responding_interfaces_string.empty()) {
const std::string component_info =
diff --git a/src/components/application_manager/src/commands/command_response_impl.cc b/src/components/application_manager/src/commands/command_response_impl.cc
index b956a4c7a5..b86a719aae 100644
--- a/src/components/application_manager/src/commands/command_response_impl.cc
+++ b/src/components/application_manager/src/commands/command_response_impl.cc
@@ -38,6 +38,8 @@ namespace application_manager {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands");
+
CommandResponseImpl::CommandResponseImpl(
const MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -66,7 +68,7 @@ void CommandResponseImpl::SendResponse(
bool success,
const mobile_apis::Result::eType& result_code,
bool final_message) {
- LOG4CXX_INFO(logger_, "Trying to send response");
+ SDL_LOG_INFO("Trying to send response");
(*message_)[strings::params][strings::protocol_type] = mobile_protocol_type_;
(*message_)[strings::params][strings::protocol_version] = protocol_version_;
diff --git a/src/components/application_manager/src/commands/notification_from_hmi.cc b/src/components/application_manager/src/commands/notification_from_hmi.cc
index 5e1314bad3..ef3755ebfd 100644
--- a/src/components/application_manager/src/commands/notification_from_hmi.cc
+++ b/src/components/application_manager/src/commands/notification_from_hmi.cc
@@ -39,6 +39,8 @@ namespace application_manager {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
NotificationFromHMI::NotificationFromHMI(
const MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -93,7 +95,7 @@ void NotificationFromHMI::CreateHMIRequest(
smart_objects::SmartObjectSPtr result =
std::make_shared<smart_objects::SmartObject>();
if (!result) {
- LOG4CXX_ERROR(logger_, "Memory allocation failed.");
+ SDL_LOG_ERROR("Memory allocation failed.");
return;
}
@@ -115,7 +117,7 @@ void NotificationFromHMI::CreateHMIRequest(
request[strings::msg_params] = msg_params;
if (!rpc_service_.ManageHMICommand(result)) {
- LOG4CXX_ERROR(logger_, "Unable to send request");
+ SDL_LOG_ERROR("Unable to send request");
return;
}
}
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 1cf5c50cdd..835df70202 100644
--- a/src/components/application_manager/src/commands/request_from_hmi.cc
+++ b/src/components/application_manager/src/commands/request_from_hmi.cc
@@ -46,6 +46,8 @@ namespace application_manager {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
RequestFromHMI::RequestFromHMI(const MessageSharedPtr& message,
ApplicationManager& application_manager,
rpc_service::RPCService& rpc_service,
@@ -96,7 +98,19 @@ void RequestFromHMI::SendResponse(
}
(*message)[strings::msg_params][strings::success] = success;
- (*message)[strings::msg_params][strings::result_code] = result_code;
+ if ((result_code == hmi_apis::Common_Result::SUCCESS ||
+ result_code == hmi_apis::Common_Result::WARNINGS) &&
+ !warning_info().empty()) {
+ bool has_info = (*message)[strings::params].keyExists(strings::error_msg);
+ (*message)[strings::params][strings::error_msg] =
+ has_info ? (*message)[strings::params][strings::error_msg].asString() +
+ "\n" + warning_info()
+ : warning_info();
+ (*message)[strings::msg_params][strings::result_code] =
+ mobile_apis::Result::WARNINGS;
+ } else {
+ (*message)[strings::msg_params][strings::result_code] = result_code;
+ }
rpc_service_.ManageHMICommand(message, source);
}
@@ -131,7 +145,7 @@ void RequestFromHMI::FillCommonParametersOfSO(
bool RequestFromHMI::IsMobileResultSuccess(
mobile_apis::Result::eType result_code) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
return Compare<mobile_apis::Result::eType, EQ, ONE>(
result_code,
@@ -145,7 +159,7 @@ bool RequestFromHMI::IsMobileResultSuccess(
bool RequestFromHMI::IsHMIResultSuccess(
hmi_apis::Common_Result::eType result_code,
HmiInterfaces::InterfaceID interface) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
if (Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
result_code,
@@ -171,7 +185,7 @@ void RequestFromHMI::SendProviderRequest(
const hmi_apis::FunctionID::eType& hmi_function_id,
const smart_objects::SmartObject* msg,
bool use_events) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool hmi_destination = false;
ApplicationSharedPtr app;
// Default error code and error message
@@ -198,7 +212,7 @@ void RequestFromHMI::SendProviderRequest(
}
if (hmi_destination) {
- LOG4CXX_DEBUG(logger_, "Sending Request to HMI Provider");
+ SDL_LOG_DEBUG("Sending Request to HMI Provider");
application_manager_.IncreaseForwardedRequestTimeout(
application_manager::request_controller::RequestInfo::HmiConnectionKey,
correlation_id());
@@ -207,7 +221,7 @@ void RequestFromHMI::SendProviderRequest(
}
if (!app) {
- LOG4CXX_DEBUG(logger_, "Invalid App Provider pointer");
+ SDL_LOG_DEBUG("Invalid App Provider pointer");
SendErrorResponse(correlation_id(),
static_cast<hmi_apis::FunctionID::eType>(function_id()),
error_code,
@@ -216,7 +230,7 @@ void RequestFromHMI::SendProviderRequest(
return;
}
- LOG4CXX_DEBUG(logger_, "Sending Request to Mobile Provider");
+ SDL_LOG_DEBUG("Sending Request to Mobile Provider");
application_manager_.IncreaseForwardedRequestTimeout(
application_manager::request_controller::RequestInfo::HmiConnectionKey,
correlation_id());
@@ -251,14 +265,13 @@ void RequestFromHMI::SendMobileRequest(
}
if (use_events) {
- LOG4CXX_DEBUG(logger_,
- "RequestFromHMI subscribe_on_event "
- << function_id << " " << mobile_correlation_id);
+ SDL_LOG_DEBUG("RequestFromHMI subscribe_on_event "
+ << function_id << " " << mobile_correlation_id);
subscribe_on_event(function_id, mobile_correlation_id);
}
if (!rpc_service_.ManageMobileCommand(
result, commands::Command::CommandSource::SOURCE_SDL)) {
- LOG4CXX_ERROR(logger_, "Unable to send request to mobile");
+ SDL_LOG_ERROR("Unable to send request to mobile");
}
}
@@ -284,25 +297,24 @@ void RequestFromHMI::SendHMIRequest(
}
if (use_events) {
- LOG4CXX_DEBUG(logger_,
- "RequestFromHMI subscribe_on_event " << function_id << " "
+ SDL_LOG_DEBUG("RequestFromHMI subscribe_on_event " << function_id << " "
<< hmi_correlation_id);
subscribe_on_event(function_id, hmi_correlation_id);
}
if (ProcessHMIInterfacesAvailability(hmi_correlation_id, function_id)) {
if (!rpc_service_.ManageHMICommand(
result, commands::Command::CommandSource::SOURCE_SDL_TO_HMI)) {
- LOG4CXX_ERROR(logger_, "Unable to send request");
+ SDL_LOG_ERROR("Unable to send request");
}
} else {
- LOG4CXX_DEBUG(logger_, "Interface is not available");
+ SDL_LOG_DEBUG("Interface is not available");
}
}
bool RequestFromHMI::ProcessHMIInterfacesAvailability(
const uint32_t hmi_correlation_id,
const hmi_apis::FunctionID::eType& function_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
HmiInterfaces::InterfaceID interface =
hmi_interfaces.GetInterfaceFromFunction(function_id);
diff --git a/src/components/application_manager/src/commands/request_to_hmi.cc b/src/components/application_manager/src/commands/request_to_hmi.cc
index 1acbc9ace7..35ac71c8bd 100644
--- a/src/components/application_manager/src/commands/request_to_hmi.cc
+++ b/src/components/application_manager/src/commands/request_to_hmi.cc
@@ -31,12 +31,48 @@
*/
#include "application_manager/commands/request_to_hmi.h"
+#include "application_manager/message_helper.h"
#include "application_manager/rpc_service.h"
+#include "utils/helpers.h"
namespace application_manager {
+namespace {
+static const std::set<hmi_apis::FunctionID::eType> tts_request_ids{
+ hmi_apis::FunctionID::TTS_GetLanguage,
+ hmi_apis::FunctionID::TTS_GetCapabilities,
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages};
+
+static const std::set<hmi_apis::FunctionID::eType> vr_request_ids{
+ hmi_apis::FunctionID::VR_GetLanguage,
+ hmi_apis::FunctionID::VR_GetCapabilities,
+ hmi_apis::FunctionID::VR_GetSupportedLanguages};
+
+static const std::set<hmi_apis::FunctionID::eType> ui_request_ids{
+ hmi_apis::FunctionID::UI_GetLanguage,
+ hmi_apis::FunctionID::UI_GetCapabilities,
+ hmi_apis::FunctionID::UI_GetSupportedLanguages};
+
+static const std::set<hmi_apis::FunctionID::eType> rc_request_ids{
+ hmi_apis::FunctionID::RC_GetCapabilities};
+
+static const std::set<hmi_apis::FunctionID::eType> vehicle_info_request_ids{
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType};
+
+static std::map<std::string, std::set<hmi_apis::FunctionID::eType> >
+ interface_requests{
+ {std::string(hmi_interface::ui), ui_request_ids},
+ {std::string(hmi_interface::vr), vr_request_ids},
+ {std::string(hmi_interface::tts), tts_request_ids},
+ {std::string(hmi_interface::rc), rc_request_ids},
+ {std::string(hmi_interface::vehicle_info), vehicle_info_request_ids}};
+
+} // namespace
+
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
bool CheckAvailabilityHMIInterfaces(ApplicationManager& application_manager,
HmiInterfaces::InterfaceID interface) {
const HmiInterfaces::InterfaceState state =
@@ -44,19 +80,59 @@ bool CheckAvailabilityHMIInterfaces(ApplicationManager& application_manager,
return HmiInterfaces::STATE_NOT_AVAILABLE != state;
}
+bool IsResponseCodeSuccess(
+ const smart_objects::SmartObject& response_from_hmi) {
+ auto response_code = static_cast<hmi_apis::Common_Result::eType>(
+ response_from_hmi[strings::params][hmi_response::code].asInt());
+
+ using helpers::Compare;
+ using helpers::EQ;
+ using helpers::ONE;
+
+ const bool is_result_success =
+ Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
+ response_code,
+ hmi_apis::Common_Result::SUCCESS,
+ hmi_apis::Common_Result::WARNINGS,
+ hmi_apis::Common_Result::WRONG_LANGUAGE,
+ hmi_apis::Common_Result::RETRY,
+ hmi_apis::Common_Result::SAVED);
+ return is_result_success;
+}
+
bool ChangeInterfaceState(ApplicationManager& application_manager,
const smart_objects::SmartObject& response_from_hmi,
HmiInterfaces::InterfaceID interface) {
if (response_from_hmi[strings::msg_params].keyExists(strings::available)) {
const bool is_available =
response_from_hmi[strings::msg_params][strings::available].asBool();
- const HmiInterfaces::InterfaceState interface_state =
- is_available ? HmiInterfaces::STATE_AVAILABLE
- : HmiInterfaces::STATE_NOT_AVAILABLE;
- application_manager.hmi_interfaces().SetInterfaceState(interface,
- interface_state);
- return is_available;
+
+ if (!is_available) {
+ application_manager.hmi_interfaces().SetInterfaceState(
+ interface, HmiInterfaces::STATE_NOT_AVAILABLE);
+ return false;
+ }
+
+ // Process response with result
+ if (response_from_hmi[strings::params].keyExists(hmi_response::code) &&
+ !IsResponseCodeSuccess(response_from_hmi)) {
+ application_manager.hmi_interfaces().SetInterfaceState(
+ interface, HmiInterfaces::STATE_NOT_AVAILABLE);
+ return false;
+ }
+
+ application_manager.hmi_interfaces().SetInterfaceState(
+ interface, HmiInterfaces::STATE_AVAILABLE);
+ return true;
+ }
+
+ // Process response with error
+ if (response_from_hmi[strings::params].keyExists(strings::error_msg)) {
+ application_manager.hmi_interfaces().SetInterfaceState(
+ interface, HmiInterfaces::STATE_NOT_AVAILABLE);
+ return false;
}
+
return false;
}
@@ -92,6 +168,54 @@ void RequestToHMI::SendRequest() {
rpc_service_.SendMessageToHMI(message_);
}
+void RequestToHMI::RequestInterfaceCapabilities(const char* interface_name) {
+ SDL_LOG_DEBUG("Request capabilities for the " << interface_name
+ << " interface");
+
+ const auto& request_ids = interface_requests[std::string(interface_name)];
+ RequestCapabilities(request_ids);
+}
+
+void RequestToHMI::UpdateRequestsRequiredForCapabilities(
+ const std::set<hmi_apis::FunctionID::eType>& requests_to_send_to_hmi) {
+ for (auto request_id : requests_to_send_to_hmi) {
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(request_id);
+ }
+}
+
+void RequestToHMI::UpdateRequiredInterfaceCapabilitiesRequests(
+ const std::string& interface_name) {
+ SDL_LOG_DEBUG("Update requests required for the " << interface_name
+ << " interface");
+
+ const auto& request_ids = interface_requests[std::string(interface_name)];
+ UpdateRequestsRequiredForCapabilities(request_ids);
+}
+
+void RequestToHMI::RequestCapabilities(
+ const std::set<hmi_apis::FunctionID::eType>& requests_to_send_to_hmi) {
+ SDL_LOG_DEBUG("There are " << requests_to_send_to_hmi.size()
+ << " requests to send to the HMI");
+
+ for (const auto& function_id : requests_to_send_to_hmi) {
+ if (hmi_capabilities_.IsRequestsRequiredForCapabilities(function_id)) {
+ std::shared_ptr<smart_objects::SmartObject> request_so(
+ MessageHelper::CreateModuleInfoSO(function_id, application_manager_));
+
+ switch (function_id) {
+ case hmi_apis::FunctionID::UI_GetLanguage:
+ case hmi_apis::FunctionID::VR_GetLanguage:
+ case hmi_apis::FunctionID::TTS_GetLanguage:
+ hmi_capabilities_.set_handle_response_for(*request_so);
+ break;
+ default:
+ break;
+ }
+ rpc_service_.ManageHMICommand(request_so);
+ }
+ }
+}
+
} // namespace commands
} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/response_from_hmi.cc b/src/components/application_manager/src/commands/response_from_hmi.cc
index c88b14bf9c..f37028d53e 100644
--- a/src/components/application_manager/src/commands/response_from_hmi.cc
+++ b/src/components/application_manager/src/commands/response_from_hmi.cc
@@ -38,6 +38,8 @@ namespace application_manager {
namespace commands {
+SDL_CREATE_LOG_VARIABLE("Commands")
+
ResponseFromHMI::ResponseFromHMI(const MessageSharedPtr& message,
ApplicationManager& application_manager,
rpc_service::RPCService& rpc_service,
@@ -84,7 +86,7 @@ void ResponseFromHMI::CreateHMIRequest(
std::make_shared<smart_objects::SmartObject>();
if (!result) {
- LOG4CXX_ERROR(logger_, "Memory allocation failed.");
+ SDL_LOG_ERROR("Memory allocation failed.");
return;
}
@@ -104,7 +106,7 @@ void ResponseFromHMI::CreateHMIRequest(
request[strings::msg_params] = msg_params;
if (!rpc_service_.ManageHMICommand(result)) {
- LOG4CXX_ERROR(logger_, "Unable to send request");
+ SDL_LOG_ERROR("Unable to send request");
return;
}
}
diff --git a/src/components/application_manager/src/display_capabilities_builder.cc b/src/components/application_manager/src/display_capabilities_builder.cc
index 8234128280..e0d486ab14 100644
--- a/src/components/application_manager/src/display_capabilities_builder.cc
+++ b/src/components/application_manager/src/display_capabilities_builder.cc
@@ -29,39 +29,42 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-
#include "application_manager/display_capabilities_builder.h"
+
+#include <algorithm>
+
#include "application_manager/message_helper.h"
#include "application_manager/smart_object_keys.h"
namespace application_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "DisplayCapabilitiesBuilder")
+SDL_CREATE_LOG_VARIABLE("DisplayCapabilitiesBuilder")
const WindowID kDefaultWindowID = 0;
DisplayCapabilitiesBuilder::DisplayCapabilitiesBuilder(Application& application)
- : owner_(application) {
- LOG4CXX_AUTO_TRACE(logger_);
+ : owner_(application), is_widget_windows_resumption_(false) {
+ SDL_LOG_AUTO_TRACE();
}
void DisplayCapabilitiesBuilder::InitBuilder(
DisplayCapabilitiesBuilder::ResumeCallback resume_callback,
const smart_objects::SmartObject& windows_info) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(display_capabilities_lock_);
resume_callback_ = resume_callback;
window_ids_to_resume_.insert(kDefaultWindowID);
+ is_widget_windows_resumption_ = !windows_info.empty();
+
for (size_t i = 0; i < windows_info.length(); ++i) {
auto window_id = windows_info[i][strings::window_id].asInt();
- LOG4CXX_DEBUG(logger_,
- "Inserting " << window_id << " to waiting container");
+ SDL_LOG_DEBUG("Inserting " << window_id << " to waiting container");
window_ids_to_resume_.insert(window_id);
}
}
void DisplayCapabilitiesBuilder::UpdateDisplayCapabilities(
const smart_objects::SmartObject& incoming_display_capabilities) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace smart_objects;
sync_primitives::AutoLock lock(display_capabilities_lock_);
@@ -83,7 +86,7 @@ void DisplayCapabilitiesBuilder::UpdateDisplayCapabilities(
: kDefaultWindowID;
if (window_ids_to_resume_.end() != window_ids_to_resume_.find(window_id)) {
cur_window_caps[cur_window_caps.length()] = inc_window_caps[i];
- LOG4CXX_DEBUG(logger_, "Stop waiting for: " << window_id);
+ SDL_LOG_DEBUG("Stop waiting for: " << window_id);
window_ids_to_resume_.erase(window_id);
}
}
@@ -91,38 +94,100 @@ void DisplayCapabilitiesBuilder::UpdateDisplayCapabilities(
*display_capabilities_ = incoming_display_capabilities;
(*display_capabilities_)[0][strings::window_capabilities] = cur_window_caps;
- if (window_ids_to_resume_.empty()) {
- LOG4CXX_TRACE(logger_, "Invoking resume callback");
- resume_callback_(owner_, *display_capabilities_);
- display_capabilities_.reset();
- }
-} // namespace application_manager
+ InvokeResumeCallback();
+}
const smart_objects::SmartObjectSPtr
DisplayCapabilitiesBuilder::display_capabilities() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return display_capabilities_;
}
+bool DisplayCapabilitiesBuilder::IsWindowResumptionNeeded() const {
+ return is_widget_windows_resumption_;
+}
+
+void DisplayCapabilitiesBuilder::InvokeResumeCallback() {
+ SDL_LOG_AUTO_TRACE();
+
+ if (!window_ids_to_resume_.empty()) {
+ SDL_LOG_DEBUG("Still waiting for another windows capabilities");
+ return;
+ }
+
+ if (!display_capabilities_) {
+ SDL_LOG_DEBUG("Cached display capabilities are not available");
+ return;
+ }
+
+ if (owner_.hmi_level(kDefaultWindowID) ==
+ mobile_apis::HMILevel::INVALID_ENUM) {
+ SDL_LOG_DEBUG("Main window HMI level is not set yet");
+ return;
+ }
+
+ SDL_LOG_TRACE("Invoking resume callback");
+ resume_callback_(owner_, *display_capabilities_);
+ display_capabilities_.reset();
+}
+
+bool DisplayCapabilitiesBuilder::IsWaitingForWindowCapabilities(
+ const smart_objects::SmartObject& incoming_display_capabilities) const {
+ const auto& inc_window_caps =
+ incoming_display_capabilities[0][strings::window_capabilities];
+
+ sync_primitives::AutoLock lock(display_capabilities_lock_);
+ for (size_t i = 0; i < inc_window_caps.length(); ++i) {
+ const WindowID window_id =
+ inc_window_caps[i].keyExists(strings::window_id)
+ ? inc_window_caps[i][strings::window_id].asInt()
+ : kDefaultWindowID;
+ if (helpers::in_range(window_ids_to_resume_, window_id)) {
+ SDL_LOG_TRACE("Application is waiting for capabilities for window "
+ << window_id);
+ return true;
+ }
+ }
+
+ SDL_LOG_TRACE(
+ "Application is not waiting for any of these windows capabilities");
+ return false;
+}
+
void DisplayCapabilitiesBuilder::ResetDisplayCapabilities() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(display_capabilities_lock_);
- display_capabilities_.reset();
+ for (auto& window_id : window_ids_to_resume_) {
+ if (kDefaultWindowID != window_id) {
+ window_ids_to_resume_.erase(window_id);
+ }
+ }
+
+ if (display_capabilities_) {
+ auto* cur_window_caps_ptr =
+ (*display_capabilities_)[0][strings::window_capabilities].asArray();
+ if (cur_window_caps_ptr) {
+ for (auto it = cur_window_caps_ptr->begin();
+ it != cur_window_caps_ptr->end();) {
+ if ((*it).keyExists(strings::window_id) &&
+ (*it)[strings::window_id].asInt() != kDefaultWindowID) {
+ it = cur_window_caps_ptr->erase(it);
+ } else {
+ ++it;
+ }
+ }
+ }
+ }
}
void DisplayCapabilitiesBuilder::StopWaitingForWindow(
const WindowID window_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(display_capabilities_lock_);
- LOG4CXX_DEBUG(logger_,
- "Window id " << window_id << " will be erased due to failure");
+ SDL_LOG_DEBUG("Window id " << window_id << " will be erased");
window_ids_to_resume_.erase(window_id);
- if (window_ids_to_resume_.empty()) {
- LOG4CXX_TRACE(logger_,
- window_id << " was the last window pending resumption. "
- "Invoking resume callback");
- resume_callback_(owner_, *display_capabilities_);
- display_capabilities_.reset();
- }
+
+ InvokeResumeCallback();
}
+
} // namespace application_manager
diff --git a/src/components/application_manager/src/event_engine/event_dispatcher_impl.cc b/src/components/application_manager/src/event_engine/event_dispatcher_impl.cc
index 30b1b83e79..7392731d70 100644
--- a/src/components/application_manager/src/event_engine/event_dispatcher_impl.cc
+++ b/src/components/application_manager/src/event_engine/event_dispatcher_impl.cc
@@ -44,6 +44,7 @@ EventDispatcherImpl::EventDispatcherImpl() : observers_event_() {}
EventDispatcherImpl::~EventDispatcherImpl() {}
void EventDispatcherImpl::raise_event(const Event& event) {
+ ObserverVector observers;
AutoLock observer_lock(observer_lock_);
{
AutoLock state_lock(state_lock_);
@@ -51,20 +52,19 @@ void EventDispatcherImpl::raise_event(const Event& event) {
// check if event is notification
if (hmi_apis::messageType::notification == event.smart_object_type()) {
const uint32_t notification_correlation_id = 0;
- observers_ = observers_event_[event.id()][notification_correlation_id];
+ observers = observers_event_[event.id()][notification_correlation_id];
}
if (hmi_apis::messageType::response == event.smart_object_type() ||
hmi_apis::messageType::error_response == event.smart_object_type()) {
- observers_ =
+ observers =
observers_event_[event.id()][event.smart_object_correlation_id()];
}
}
- // Call observers
- while (!observers_.empty()) {
- EventObserver* temp = *observers_.begin();
- observers_.erase(observers_.begin());
+ while (!observers.empty()) {
+ EventObserver* temp = *observers.begin();
+ observers.erase(observers.begin());
AutoUnlock unlock_observer(observer_lock);
temp->on_event(event);
}
@@ -78,7 +78,7 @@ void EventDispatcherImpl::add_observer(const Event::EventID& event_id,
}
struct IdCheckFunctor {
- IdCheckFunctor(const unsigned long id) : target_id(id) {}
+ explicit IdCheckFunctor(const unsigned long id) : target_id(id) {}
bool operator()(const EventObserver* obs) const {
return (obs->id() == target_id);
diff --git a/src/components/application_manager/src/help_prompt_manager_impl.cc b/src/components/application_manager/src/help_prompt_manager_impl.cc
index ec883e5fc2..8d43ff2d9f 100644
--- a/src/components/application_manager/src/help_prompt_manager_impl.cc
+++ b/src/components/application_manager/src/help_prompt_manager_impl.cc
@@ -43,7 +43,7 @@
#include "smart_objects/smart_object.h"
#include "utils/logger.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "HelpPromptManagerImpl")
+SDL_CREATE_LOG_VARIABLE("HelpPromptManagerImpl")
namespace {
const size_t kLimitCommand = 30;
@@ -60,19 +60,19 @@ HelpPromptManagerImpl::HelpPromptManagerImpl(Application& app,
, is_ui_send_(false) {}
HelpPromptManagerImpl::~HelpPromptManagerImpl() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
bool HelpPromptManagerImpl::AddCommand(
const uint32_t cmd_id, const smart_objects::SmartObject& command) {
if (!command.keyExists(strings::vr_commands)) {
- LOG4CXX_DEBUG(logger_, "vr_commands does`t present");
+ SDL_LOG_DEBUG("vr_commands does`t present");
return false;
}
const smart_objects::SmartObject& commands = command[strings::vr_commands];
if (commands.empty()) {
- LOG4CXX_DEBUG(logger_, "vr_commands array is empty");
+ SDL_LOG_DEBUG("vr_commands array is empty");
return false;
}
@@ -83,23 +83,21 @@ bool HelpPromptManagerImpl::AddCommand(
[cmd_id](const VRCommandPair& pair) { return pair.first == cmd_id; });
if (vr_commands_.end() != it) {
- LOG4CXX_DEBUG(logger_, "Command with id:" << cmd_id << " already exists");
+ SDL_LOG_DEBUG("Command with id:" << cmd_id << " already exists");
return false;
}
const bool limit_exceeded =
kLimitCommand <= GetCommandsCount(vr_commands_.end());
- LOG4CXX_DEBUG(
- logger_,
- "Will be added first command from array " << strings::vr_commands);
+ SDL_LOG_DEBUG("Will be added first command from array "
+ << strings::vr_commands);
smart_objects::SmartObjectSPtr vr_item =
std::make_shared<smart_objects::SmartObject>(commands.asArray()->front());
vr_commands_.push_back(std::make_pair(cmd_id, vr_item));
- LOG4CXX_DEBUG(logger_,
- "VR command with id: " << cmd_id << " added for appID: "
+ SDL_LOG_DEBUG("VR command with id: " << cmd_id << " added for appID: "
<< app_.app_id() << ". Total "
<< vr_commands_.size() << " in cache");
@@ -107,7 +105,7 @@ bool HelpPromptManagerImpl::AddCommand(
}
bool HelpPromptManagerImpl::DeleteCommand(const uint32_t cmd_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(vr_commands_lock_);
@@ -117,17 +115,16 @@ bool HelpPromptManagerImpl::DeleteCommand(const uint32_t cmd_id) {
[cmd_id](const VRCommandPair& pair) { return pair.first == cmd_id; });
if (vr_commands_.end() == it) {
- LOG4CXX_WARN(logger_, "VR command with id: " << cmd_id << " not found");
+ SDL_LOG_WARN("VR command with id: " << cmd_id << " not found");
return false;
}
const size_t commands_before_current = GetCommandsCount(it);
vr_commands_.erase(it);
- LOG4CXX_DEBUG(logger_,
- "VR command with id: "
- << cmd_id << " found after " << commands_before_current
- << " commands was deleted for appID: " << app_.app_id()
- << " Cache size after deleting: " << vr_commands_.size());
+ SDL_LOG_DEBUG("VR command with id: "
+ << cmd_id << " found after " << commands_before_current
+ << " commands was deleted for appID: " << app_.app_id()
+ << " Cache size after deleting: " << vr_commands_.size());
return commands_before_current < kLimitCommand;
}
@@ -136,12 +133,10 @@ void HelpPromptManagerImpl::OnVrCommandAdded(
const uint32_t cmd_id,
const smart_objects::SmartObject& command,
const bool is_resumption) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (SendingType::kNoneSend == sending_type_) {
- LOG4CXX_DEBUG(logger_,
- "SendingType::kNoneSend"
- << " commands with id:" << cmd_id
- << " will not be added");
+ SDL_LOG_DEBUG("SendingType::kNoneSend"
+ << " commands with id:" << cmd_id << " will not be added");
return;
}
if (AddCommand(cmd_id, command) && !is_resumption) {
@@ -151,12 +146,10 @@ void HelpPromptManagerImpl::OnVrCommandAdded(
void HelpPromptManagerImpl::OnVrCommandDeleted(const uint32_t cmd_id,
const bool is_resumption) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (SendingType::kNoneSend == sending_type_) {
- LOG4CXX_DEBUG(logger_,
- "SendingType::kNoneSend"
- << " commands with id:" << cmd_id
- << " will not be deleted");
+ SDL_LOG_DEBUG("SendingType::kNoneSend"
+ << " commands with id:" << cmd_id << " will not be deleted");
return;
}
if (DeleteCommand(cmd_id) && !is_resumption) {
@@ -166,11 +159,11 @@ void HelpPromptManagerImpl::OnVrCommandDeleted(const uint32_t cmd_id,
void HelpPromptManagerImpl::OnSetGlobalPropertiesReceived(
const smart_objects::SmartObject& msg, const bool is_response) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (SendingType::kNoneSend == sending_type_) {
- LOG4CXX_DEBUG(logger_,
- "SendingType::kNoneSend"
- " do not track SetGlobalProperties");
+ SDL_LOG_DEBUG(
+ "SendingType::kNoneSend"
+ " do not track SetGlobalProperties");
return;
}
@@ -182,8 +175,8 @@ void HelpPromptManagerImpl::OnSetGlobalPropertiesReceived(
is_ui_send_ = true;
}
- LOG4CXX_DEBUG(logger_, "is_tts_send_:" << is_tts_send_);
- LOG4CXX_DEBUG(logger_, "is_ui_send_:" << is_ui_send_);
+ SDL_LOG_DEBUG("is_tts_send_:" << is_tts_send_);
+ SDL_LOG_DEBUG("is_ui_send_:" << is_ui_send_);
return;
}
@@ -222,8 +215,8 @@ void HelpPromptManagerImpl::GenerateVrItems(
}
void HelpPromptManagerImpl::SendTTSRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "TTS request for appID:" << app_.app_id());
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("TTS request for appID:" << app_.app_id());
smart_objects::SmartObjectSPtr tts_global_properties =
std::make_shared<smart_objects::SmartObject>(
smart_objects::SmartType_Map);
@@ -256,8 +249,8 @@ void HelpPromptManagerImpl::SendTTSRequest() {
}
void HelpPromptManagerImpl::SendUIRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "UI request for appID:" << app_.app_id());
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("UI request for appID:" << app_.app_id());
smart_objects::SmartObjectSPtr ui_global_properties =
std::make_shared<smart_objects::SmartObject>(
smart_objects::SmartType_Map);
@@ -290,13 +283,13 @@ void HelpPromptManagerImpl::SendUIRequest() {
}
void HelpPromptManagerImpl::SendBothRequests() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SendTTSRequest();
SendUIRequest();
}
void HelpPromptManagerImpl::SendRequests() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(vr_commands_lock_);
switch (sending_type_) {
@@ -312,21 +305,20 @@ void HelpPromptManagerImpl::SendRequests() {
case SendingType::kNoneSend:
break;
}
- LOG4CXX_DEBUG(logger_,
- "SendingType:" << static_cast<uint32_t>(sending_type_)
+ SDL_LOG_DEBUG("SendingType:" << static_cast<uint32_t>(sending_type_)
<< " request not sending");
}
void HelpPromptManagerImpl::CreatePromptMsg(
smart_objects::SmartObject& out_msg_params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
GenerateVrItems(out_msg_params, strings::help_prompt);
app_.set_help_prompt(out_msg_params[strings::help_prompt]);
}
void HelpPromptManagerImpl::CreateVRMsg(
smart_objects::SmartObject& out_msg_params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (false == out_msg_params.keyExists(strings::vr_help_title)) {
if (app_.vr_help_title()) {
out_msg_params[strings::vr_help_title] = (*app_.vr_help_title());
@@ -347,17 +339,17 @@ void HelpPromptManagerImpl::CreateVRMsg(
void HelpPromptManagerImpl::SetSendingType(
const smart_objects::SmartObject& msg) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
hmi_apis::Common_Result::eType result =
static_cast<hmi_apis::Common_Result::eType>(
msg[strings::params][hmi_response::code].asInt());
- LOG4CXX_DEBUG(logger_, "HMI response result:" << result);
+ SDL_LOG_DEBUG("HMI response result:" << result);
if (hmi_apis::Common_Result::eType::SUCCESS == result) {
hmi_apis::FunctionID::eType function_id =
static_cast<hmi_apis::FunctionID::eType>(
msg[strings::params][strings::function_id].asUInt());
- LOG4CXX_DEBUG(logger_, "Function id:" << function_id);
+ SDL_LOG_DEBUG("Function id:" << function_id);
switch (function_id) {
case hmi_apis::FunctionID::TTS_SetGlobalProperties: {
if (is_tts_send_) {
@@ -379,8 +371,7 @@ void HelpPromptManagerImpl::SetSendingType(
}
default: { break; }
}
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Sending type set to:" << static_cast<uint32_t>(sending_type_));
}
}
diff --git a/src/components/application_manager/src/helpers/application_helper.cc b/src/components/application_manager/src/helpers/application_helper.cc
index fc86eb5e62..488ee4aca0 100644
--- a/src/components/application_manager/src/helpers/application_helper.cc
+++ b/src/components/application_manager/src/helpers/application_helper.cc
@@ -11,24 +11,35 @@ void DeleteWayPoints(ApplicationSharedPtr app,
ApplicationManager& app_manager) {
app_manager.UnsubscribeAppFromWayPoints(app);
if (!app_manager.IsAnyAppSubscribedForWayPoints()) {
- MessageHelper::SendUnsubscribedWayPoints(app_manager);
+ auto request = MessageHelper::CreateUnsubscribeWayPointsRequest(
+ app_manager.GetNextHMICorrelationID());
+ app_manager.GetRPCService().ManageHMICommand(request);
}
}
void DeleteCommands(ApplicationSharedPtr app, ApplicationManager& app_manager) {
- CommandsMap cmap = app->commands_map().GetData();
+ auto accessor = app->commands_map();
+ const auto& commands_map = accessor.GetData();
+
+ for (const auto& cmd : commands_map) {
+ auto delete_UI_msg = MessageHelper::CreateDeleteUICommandRequest(
+ cmd.second, app->app_id(), app_manager.GetNextHMICorrelationID());
+ app_manager.GetRPCService().ManageHMICommand(delete_UI_msg);
+
+ auto delete_VR_msg = MessageHelper::CreateDeleteVRCommandRequest(
+ cmd.second, app, app_manager.GetNextHMICorrelationID());
+ app_manager.GetRPCService().ManageHMICommand(delete_VR_msg);
- for (auto cmd : cmap) {
- MessageHelper::SendDeleteCommandRequest(cmd.second, app, app_manager);
app->RemoveCommand(cmd.first);
app->help_prompt_manager().OnVrCommandDeleted(cmd.first, true);
}
}
void DeleteSubmenus(ApplicationSharedPtr app, ApplicationManager& app_manager) {
- SubMenuMap smap = app->sub_menu_map().GetData();
+ auto accessor = app->sub_menu_map();
+ const auto& sub_menu_map = accessor.GetData();
- for (auto smenu : smap) {
+ for (const auto& smenu : sub_menu_map) {
MessageHelper::SendDeleteSubmenuRequest(smenu.second, app, app_manager);
app->RemoveSubMenu(smenu.first);
}
@@ -36,9 +47,10 @@ void DeleteSubmenus(ApplicationSharedPtr app, ApplicationManager& app_manager) {
void DeleteChoiceSets(ApplicationSharedPtr app,
ApplicationManager& app_manager) {
- ChoiceSetMap csmap = app->choice_set_map().GetData();
+ auto accessor = app->choice_set_map();
+ const auto& choices = accessor.GetData();
- for (auto choice : csmap) {
+ for (const auto& choice : choices) {
MessageHelper::SendDeleteChoiceSetRequest(choice.second, app, app_manager);
app->RemoveChoiceSet(choice.first);
}
@@ -105,11 +117,11 @@ void CleanupAppFiles(ApplicationSharedPtr app) {
namespace application_manager {
-CREATE_LOGGERPTR_GLOBAL(logger, "ApplicationManager")
+SDL_CREATE_LOG_VARIABLE("ApplicationManager")
void DeleteApplicationData(ApplicationSharedPtr app,
ApplicationManager& app_manager) {
- LOG4CXX_AUTO_TRACE(logger);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
DeleteWayPoints(app, app_manager);
diff --git a/src/components/application_manager/src/hmi_capabilities_impl.cc b/src/components/application_manager/src/hmi_capabilities_impl.cc
index 6a0fbf78e3..1390a3ae2c 100644
--- a/src/components/application_manager/src/hmi_capabilities_impl.cc
+++ b/src/components/application_manager/src/hmi_capabilities_impl.cc
@@ -30,391 +30,55 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "application_manager/hmi_capabilities_impl.h"
+
#include <map>
#include "application_manager/application_manager.h"
-#include "application_manager/hmi_capabilities_impl.h"
#include "application_manager/message_helper.h"
+#include "application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h"
#include "application_manager/smart_object_keys.h"
#include "config_profile/profile.h"
#include "formatters/CFormatterJsonBase.h"
#include "interfaces/HMI_API.h"
+#include "smart_objects/enum_schema_item.h"
#include "smart_objects/smart_object.h"
#include "utils/file_system.h"
+#include "utils/helpers.h"
+#include "utils/jsoncpp_reader_wrapper.h"
#include "utils/logger.h"
namespace application_manager {
namespace formatters = ns_smart_device_link::ns_json_handler::formatters;
-CREATE_LOGGERPTR_GLOBAL(logger_, "HMICapabilities")
+SDL_CREATE_LOG_VARIABLE("HMICapabilities")
namespace {
-std::map<std::string, hmi_apis::Common_VrCapabilities::eType>
- vr_enum_capabilities;
-std::map<std::string, hmi_apis::Common_SpeechCapabilities::eType>
- tts_enum_capabilities;
-std::map<std::string, hmi_apis::Common_ButtonName::eType> button_enum_name;
-std::map<std::string, hmi_apis::Common_TextFieldName::eType>
- text_fields_enum_name;
-std::map<std::string, hmi_apis::Common_MediaClockFormat::eType>
- media_clock_enum_name;
-std::map<std::string, hmi_apis::Common_ImageType::eType> image_type_enum;
-std::map<std::string, hmi_apis::Common_SamplingRate::eType> sampling_rate_enum;
-std::map<std::string, hmi_apis::Common_BitsPerSample::eType>
- bit_per_sample_enum;
-std::map<std::string, hmi_apis::Common_AudioType::eType> audio_type_enum;
-std::map<std::string, hmi_apis::Common_HmiZoneCapabilities::eType>
- hmi_zone_enum;
-std::map<std::string, hmi_apis::Common_ImageFieldName::eType>
- image_field_name_enum;
-std::map<std::string, hmi_apis::Common_FileType::eType> file_type_enum;
-std::map<std::string, hmi_apis::Common_DisplayType::eType> display_type_enum;
-std::map<std::string, hmi_apis::Common_CharacterSet::eType> character_set_enum;
-std::map<std::string, hmi_apis::Common_VideoStreamingProtocol::eType>
- video_streaming_protocol_enum;
-std::map<std::string, hmi_apis::Common_VideoStreamingCodec::eType>
- video_streaming_codec_enum;
-
-void InitCapabilities() {
- vr_enum_capabilities.insert(std::make_pair(
- std::string("TEXT"), hmi_apis::Common_VrCapabilities::VR_TEXT));
-
- tts_enum_capabilities.insert(std::make_pair(
- std::string("TEXT"), hmi_apis::Common_SpeechCapabilities::SC_TEXT));
- tts_enum_capabilities.insert(
- std::make_pair(std::string("SAPI_PHONEMES"),
- hmi_apis::Common_SpeechCapabilities::SAPI_PHONEMES));
- tts_enum_capabilities.insert(
- std::make_pair(std::string("LHPLUS_PHONEMES"),
- hmi_apis::Common_SpeechCapabilities::LHPLUS_PHONEMES));
- tts_enum_capabilities.insert(
- std::make_pair(std::string("SAPI_PHONEMES"),
- hmi_apis::Common_SpeechCapabilities::SAPI_PHONEMES));
- tts_enum_capabilities.insert(
- std::make_pair(std::string("PRE_RECORDED"),
- hmi_apis::Common_SpeechCapabilities::PRE_RECORDED));
- tts_enum_capabilities.insert(std::make_pair(
- std::string("SILENCE"), hmi_apis::Common_SpeechCapabilities::SILENCE));
- tts_enum_capabilities.insert(std::make_pair(
- std::string("FILE"), hmi_apis::Common_SpeechCapabilities::FILE));
-
- button_enum_name.insert(
- std::make_pair(std::string("OK"), hmi_apis::Common_ButtonName::OK));
- button_enum_name.insert(std::make_pair(
- std::string("PLAY_PAUSE"), hmi_apis::Common_ButtonName::PLAY_PAUSE));
- button_enum_name.insert(std::make_pair(
- std::string("SEEKLEFT"), hmi_apis::Common_ButtonName::SEEKLEFT));
- button_enum_name.insert(std::make_pair(
- std::string("SEEKRIGHT"), hmi_apis::Common_ButtonName::SEEKRIGHT));
- button_enum_name.insert(std::make_pair(std::string("TUNEUP"),
- hmi_apis::Common_ButtonName::TUNEUP));
- button_enum_name.insert(std::make_pair(
- std::string("TUNEDOWN"), hmi_apis::Common_ButtonName::TUNEDOWN));
- button_enum_name.insert(std::make_pair(
- std::string("PRESET_0"), hmi_apis::Common_ButtonName::PRESET_0));
- button_enum_name.insert(std::make_pair(
- std::string("PRESET_1"), hmi_apis::Common_ButtonName::PRESET_1));
- button_enum_name.insert(std::make_pair(
- std::string("PRESET_2"), hmi_apis::Common_ButtonName::PRESET_2));
- button_enum_name.insert(std::make_pair(
- std::string("PRESET_3"), hmi_apis::Common_ButtonName::PRESET_3));
- button_enum_name.insert(std::make_pair(
- std::string("PRESET_4"), hmi_apis::Common_ButtonName::PRESET_4));
- button_enum_name.insert(std::make_pair(
- std::string("PRESET_5"), hmi_apis::Common_ButtonName::PRESET_5));
- button_enum_name.insert(std::make_pair(
- std::string("PRESET_6"), hmi_apis::Common_ButtonName::PRESET_6));
- button_enum_name.insert(std::make_pair(
- std::string("PRESET_7"), hmi_apis::Common_ButtonName::PRESET_7));
- button_enum_name.insert(std::make_pair(
- std::string("PRESET_8"), hmi_apis::Common_ButtonName::PRESET_8));
- button_enum_name.insert(std::make_pair(
- std::string("PRESET_9"), hmi_apis::Common_ButtonName::PRESET_9));
- button_enum_name.insert(
- std::make_pair(std::string("CUSTOM_BUTTON"),
- hmi_apis::Common_ButtonName::CUSTOM_BUTTON));
- button_enum_name.insert(std::make_pair(std::string("SEARCH"),
- hmi_apis::Common_ButtonName::SEARCH));
- button_enum_name.insert(
- std::make_pair(std::string("NAV_CENTER_LOCATION"),
- hmi_apis::Common_ButtonName::NAV_CENTER_LOCATION));
- button_enum_name.insert(std::make_pair(
- std::string("NAV_ZOOM_IN"), hmi_apis::Common_ButtonName::NAV_ZOOM_IN));
- button_enum_name.insert(std::make_pair(
- std::string("NAV_ZOOM_OUT"), hmi_apis::Common_ButtonName::NAV_ZOOM_OUT));
- button_enum_name.insert(std::make_pair(
- std::string("NAV_PAN_UP"), hmi_apis::Common_ButtonName::NAV_PAN_UP));
- button_enum_name.insert(
- std::make_pair(std::string("NAV_PAN_UP_RIGHT"),
- hmi_apis::Common_ButtonName::NAV_PAN_UP_RIGHT));
- button_enum_name.insert(
- std::make_pair(std::string("NAV_PAN_RIGHT"),
- hmi_apis::Common_ButtonName::NAV_PAN_RIGHT));
- button_enum_name.insert(
- std::make_pair(std::string("NAV_PAN_DOWN_RIGHT"),
- hmi_apis::Common_ButtonName::NAV_PAN_DOWN_RIGHT));
- button_enum_name.insert(std::make_pair(
- std::string("NAV_PAN_DOWN"), hmi_apis::Common_ButtonName::NAV_PAN_DOWN));
- button_enum_name.insert(
- std::make_pair(std::string("NAV_PAN_DOWN_LEFT"),
- hmi_apis::Common_ButtonName::NAV_PAN_DOWN_LEFT));
- button_enum_name.insert(std::make_pair(
- std::string("NAV_PAN_LEFT"), hmi_apis::Common_ButtonName::NAV_PAN_LEFT));
- button_enum_name.insert(
- std::make_pair(std::string("NAV_PAN_UP_LEFT"),
- hmi_apis::Common_ButtonName::NAV_PAN_UP_LEFT));
- button_enum_name.insert(
- std::make_pair(std::string("NAV_TILT_TOGGLE"),
- hmi_apis::Common_ButtonName::NAV_TILT_TOGGLE));
- button_enum_name.insert(
- std::make_pair(std::string("NAV_ROTATE_CLOCKWISE"),
- hmi_apis::Common_ButtonName::NAV_ROTATE_CLOCKWISE));
- button_enum_name.insert(
- std::make_pair(std::string("NAV_ROTATE_COUNTERCLOCKWISE"),
- hmi_apis::Common_ButtonName::NAV_ROTATE_COUNTERCLOCKWISE));
- button_enum_name.insert(
- std::make_pair(std::string("NAV_HEADING_TOGGLE"),
- hmi_apis::Common_ButtonName::NAV_HEADING_TOGGLE));
-
- text_fields_enum_name.insert(std::make_pair(
- std::string("mainField1"), hmi_apis::Common_TextFieldName::mainField1));
- text_fields_enum_name.insert(std::make_pair(
- std::string("mainField2"), hmi_apis::Common_TextFieldName::mainField2));
- text_fields_enum_name.insert(std::make_pair(
- std::string("mainField3"), hmi_apis::Common_TextFieldName::mainField3));
- text_fields_enum_name.insert(std::make_pair(
- std::string("mainField4"), hmi_apis::Common_TextFieldName::mainField4));
- text_fields_enum_name.insert(std::make_pair(
- std::string("statusBar"), hmi_apis::Common_TextFieldName::statusBar));
- text_fields_enum_name.insert(std::make_pair(
- std::string("mediaClock"), hmi_apis::Common_TextFieldName::mediaClock));
- text_fields_enum_name.insert(std::make_pair(
- std::string("mediaTrack"), hmi_apis::Common_TextFieldName::mediaTrack));
- text_fields_enum_name.insert(std::make_pair(
- std::string("alertText1"), hmi_apis::Common_TextFieldName::alertText1));
- text_fields_enum_name.insert(std::make_pair(
- std::string("alertText2"), hmi_apis::Common_TextFieldName::alertText2));
- text_fields_enum_name.insert(std::make_pair(
- std::string("alertText3"), hmi_apis::Common_TextFieldName::alertText3));
- text_fields_enum_name.insert(
- std::make_pair(std::string("scrollableMessageBody"),
- hmi_apis::Common_TextFieldName::scrollableMessageBody));
- text_fields_enum_name.insert(
- std::make_pair(std::string("initialInteractionText"),
- hmi_apis::Common_TextFieldName::initialInteractionText));
- text_fields_enum_name.insert(
- std::make_pair(std::string("navigationText1"),
- hmi_apis::Common_TextFieldName::navigationText1));
- text_fields_enum_name.insert(
- std::make_pair(std::string("navigationText2"),
- hmi_apis::Common_TextFieldName::navigationText2));
- text_fields_enum_name.insert(
- std::make_pair(std::string("ETA"), hmi_apis::Common_TextFieldName::ETA));
- text_fields_enum_name.insert(
- std::make_pair(std::string("totalDistance"),
- hmi_apis::Common_TextFieldName::totalDistance));
- text_fields_enum_name.insert(std::make_pair(
- std::string("audioPassThruDisplayText1"),
- hmi_apis::Common_TextFieldName::audioPassThruDisplayText1));
- text_fields_enum_name.insert(std::make_pair(
- std::string("audioPassThruDisplayText2"),
- hmi_apis::Common_TextFieldName::audioPassThruDisplayText2));
- text_fields_enum_name.insert(
- std::make_pair(std::string("sliderHeader"),
- hmi_apis::Common_TextFieldName::sliderHeader));
- text_fields_enum_name.insert(
- std::make_pair(std::string("sliderFooter"),
- hmi_apis::Common_TextFieldName::sliderFooter));
- text_fields_enum_name.insert(
- std::make_pair(std::string("navigationText"),
- hmi_apis::Common_TextFieldName::navigationText));
- text_fields_enum_name.insert(
- std::make_pair(std::string("notificationText"),
- hmi_apis::Common_TextFieldName::notificationText));
- text_fields_enum_name.insert(std::make_pair(
- std::string("menuName"), hmi_apis::Common_TextFieldName::menuName));
- text_fields_enum_name.insert(
- std::make_pair(std::string("secondaryText"),
- hmi_apis::Common_TextFieldName::secondaryText));
- text_fields_enum_name.insert(
- std::make_pair(std::string("tertiaryText"),
- hmi_apis::Common_TextFieldName::tertiaryText));
- text_fields_enum_name.insert(
- std::make_pair(std::string("timeToDestination"),
- hmi_apis::Common_TextFieldName::timeToDestination));
- text_fields_enum_name.insert(
- std::make_pair(std::string("locationName"),
- hmi_apis::Common_TextFieldName::locationName));
- text_fields_enum_name.insert(
- std::make_pair(std::string("locationDescription"),
- hmi_apis::Common_TextFieldName::locationDescription));
- text_fields_enum_name.insert(std::make_pair(
- std::string("turnText"), hmi_apis::Common_TextFieldName::turnText));
- text_fields_enum_name.insert(
- std::make_pair(std::string("addressLines"),
- hmi_apis::Common_TextFieldName::addressLines));
- text_fields_enum_name.insert(std::make_pair(
- std::string("phoneNumber"), hmi_apis::Common_TextFieldName::phoneNumber));
- text_fields_enum_name.insert(std::make_pair(
- std::string("turnText"), hmi_apis::Common_TextFieldName::turnText));
- text_fields_enum_name.insert(std::make_pair(
- std::string("menuTitle"), hmi_apis::Common_TextFieldName::menuTitle));
-
- media_clock_enum_name.insert(std::make_pair(
- std::string("CLOCK1"), hmi_apis::Common_MediaClockFormat::CLOCK1));
- media_clock_enum_name.insert(std::make_pair(
- std::string("CLOCK2"), hmi_apis::Common_MediaClockFormat::CLOCK2));
- media_clock_enum_name.insert(std::make_pair(
- std::string("CLOCK3"), hmi_apis::Common_MediaClockFormat::CLOCK3));
- media_clock_enum_name.insert(
- std::make_pair(std::string("CLOCKTEXT1"),
- hmi_apis::Common_MediaClockFormat::CLOCKTEXT1));
- media_clock_enum_name.insert(
- std::make_pair(std::string("CLOCKTEXT2"),
- hmi_apis::Common_MediaClockFormat::CLOCKTEXT2));
- media_clock_enum_name.insert(
- std::make_pair(std::string("CLOCKTEXT3"),
- hmi_apis::Common_MediaClockFormat::CLOCKTEXT3));
- media_clock_enum_name.insert(
- std::make_pair(std::string("CLOCKTEXT4"),
- hmi_apis::Common_MediaClockFormat::CLOCKTEXT4));
-
- image_type_enum.insert(std::make_pair(std::string("STATIC"),
- hmi_apis::Common_ImageType::STATIC));
- image_type_enum.insert(std::make_pair(std::string("DYNAMIC"),
- hmi_apis::Common_ImageType::DYNAMIC));
-
- sampling_rate_enum.insert(std::make_pair(
- std::string("8KHZ"), hmi_apis::Common_SamplingRate::RATE_8KHZ));
- sampling_rate_enum.insert(std::make_pair(
- std::string("16KHZ"), hmi_apis::Common_SamplingRate::RATE_16KHZ));
- sampling_rate_enum.insert(std::make_pair(
- std::string("22KHZ"), hmi_apis::Common_SamplingRate::RATE_22KHZ));
- sampling_rate_enum.insert(std::make_pair(
- std::string("44KHZ"), hmi_apis::Common_SamplingRate::RATE_44KHZ));
-
- bit_per_sample_enum.insert(std::make_pair(
- std::string("RATE_8_BIT"), hmi_apis::Common_BitsPerSample::RATE_8_BIT));
- bit_per_sample_enum.insert(std::make_pair(
- std::string("RATE_16_BIT"), hmi_apis::Common_BitsPerSample::RATE_16_BIT));
-
- audio_type_enum.insert(
- std::make_pair(std::string("PCM"), hmi_apis::Common_AudioType::PCM));
-
- hmi_zone_enum.insert(std::make_pair(
- std::string("FRONT"), hmi_apis::Common_HmiZoneCapabilities::FRONT));
- hmi_zone_enum.insert(std::make_pair(
- std::string("BACK"), hmi_apis::Common_HmiZoneCapabilities::BACK));
-
- image_field_name_enum.insert(
- std::make_pair(std::string("softButtonImage"),
- hmi_apis::Common_ImageFieldName::softButtonImage));
- image_field_name_enum.insert(
- std::make_pair(std::string("choiceImage"),
- hmi_apis::Common_ImageFieldName::choiceImage));
- image_field_name_enum.insert(
- std::make_pair(std::string("choiceSecondaryImage"),
- hmi_apis::Common_ImageFieldName::choiceSecondaryImage));
- image_field_name_enum.insert(std::make_pair(
- std::string("vrHelpItem"), hmi_apis::Common_ImageFieldName::vrHelpItem));
- image_field_name_enum.insert(std::make_pair(
- std::string("turnIcon"), hmi_apis::Common_ImageFieldName::turnIcon));
- image_field_name_enum.insert(std::make_pair(
- std::string("menuIcon"), hmi_apis::Common_ImageFieldName::menuIcon));
- image_field_name_enum.insert(std::make_pair(
- std::string("cmdIcon"), hmi_apis::Common_ImageFieldName::cmdIcon));
- image_field_name_enum.insert(std::make_pair(
- std::string("appIcon"), hmi_apis::Common_ImageFieldName::appIcon));
- image_field_name_enum.insert(std::make_pair(
- std::string("graphic"), hmi_apis::Common_ImageFieldName::graphic));
- image_field_name_enum.insert(
- std::make_pair(std::string("secondaryGraphic"),
- hmi_apis::Common_ImageFieldName::secondaryGraphic));
- image_field_name_enum.insert(
- std::make_pair(std::string("showConstantTBTIcon"),
- hmi_apis::Common_ImageFieldName::showConstantTBTIcon));
- image_field_name_enum.insert(std::make_pair(
- std::string("showConstantTBTNextTurnIcon"),
- hmi_apis::Common_ImageFieldName::showConstantTBTNextTurnIcon));
- image_field_name_enum.insert(
- std::make_pair(std::string("locationImage"),
- hmi_apis::Common_ImageFieldName::locationImage));
- image_field_name_enum.insert(std::make_pair(
- std::string("alertIcon"), hmi_apis::Common_ImageFieldName::alertIcon));
-
- file_type_enum.insert(std::make_pair(std::string("GRAPHIC_BMP"),
- hmi_apis::Common_FileType::GRAPHIC_BMP));
- file_type_enum.insert(std::make_pair(
- std::string("GRAPHIC_JPEG"), hmi_apis::Common_FileType::GRAPHIC_JPEG));
- file_type_enum.insert(std::make_pair(std::string("GRAPHIC_PNG"),
- hmi_apis::Common_FileType::GRAPHIC_PNG));
- file_type_enum.insert(std::make_pair(std::string("AUDIO_WAVE"),
- hmi_apis::Common_FileType::AUDIO_WAVE));
- file_type_enum.insert(std::make_pair(std::string("AUDIO_MP3"),
- hmi_apis::Common_FileType::AUDIO_MP3));
- file_type_enum.insert(std::make_pair(std::string("AUDIO_AAC"),
- hmi_apis::Common_FileType::AUDIO_AAC));
- file_type_enum.insert(
- std::make_pair(std::string("BINARY"), hmi_apis::Common_FileType::BINARY));
- file_type_enum.insert(
- std::make_pair(std::string("JSON"), hmi_apis::Common_FileType::JSON));
-
- display_type_enum.insert(
- std::make_pair(std::string("CID"), hmi_apis::Common_DisplayType::CID));
- display_type_enum.insert(std::make_pair(std::string("TYPE2"),
- hmi_apis::Common_DisplayType::TYPE2));
- display_type_enum.insert(std::make_pair(std::string("TYPE5"),
- hmi_apis::Common_DisplayType::TYPE5));
- display_type_enum.insert(
- std::make_pair(std::string("NGN"), hmi_apis::Common_DisplayType::NGN));
- display_type_enum.insert(std::make_pair(
- std::string("GEN2_8_DMA"), hmi_apis::Common_DisplayType::GEN2_8_DMA));
- display_type_enum.insert(std::make_pair(
- std::string("GEN2_6_DMA"), hmi_apis::Common_DisplayType::GEN2_6_DMA));
- display_type_enum.insert(
- std::make_pair(std::string("MFD3"), hmi_apis::Common_DisplayType::MFD3));
- display_type_enum.insert(
- std::make_pair(std::string("MFD4"), hmi_apis::Common_DisplayType::MFD4));
- display_type_enum.insert(
- std::make_pair(std::string("MFD5"), hmi_apis::Common_DisplayType::MFD5));
- display_type_enum.insert(std::make_pair(
- std::string("GEN3_8_INCH"), hmi_apis::Common_DisplayType::GEN3_8_INCH));
- display_type_enum.insert(std::make_pair(
- std::string("SDL_GENERIC"), hmi_apis::Common_DisplayType::SDL_GENERIC));
-
- character_set_enum.insert(std::make_pair(
- std::string("TYPE2SET"), hmi_apis::Common_CharacterSet::TYPE2SET));
- character_set_enum.insert(std::make_pair(
- std::string("TYPE5SET"), hmi_apis::Common_CharacterSet::TYPE5SET));
- character_set_enum.insert(std::make_pair(
- std::string("CID1SET"), hmi_apis::Common_CharacterSet::CID1SET));
- character_set_enum.insert(std::make_pair(
- std::string("CID2SET"), hmi_apis::Common_CharacterSet::CID2SET));
-
- video_streaming_protocol_enum.insert(std::make_pair(
- std::string("RAW"), hmi_apis::Common_VideoStreamingProtocol::RAW));
- video_streaming_protocol_enum.insert(std::make_pair(
- std::string("RTP"), hmi_apis::Common_VideoStreamingProtocol::RTP));
- video_streaming_protocol_enum.insert(std::make_pair(
- std::string("RTSP"), hmi_apis::Common_VideoStreamingProtocol::RTSP));
- video_streaming_protocol_enum.insert(std::make_pair(
- std::string("RTMP"), hmi_apis::Common_VideoStreamingProtocol::RTMP));
- video_streaming_protocol_enum.insert(std::make_pair(
- std::string("WEBM"), hmi_apis::Common_VideoStreamingProtocol::WEBM));
-
- video_streaming_codec_enum.insert(std::make_pair(
- std::string("H264"), hmi_apis::Common_VideoStreamingCodec::H264));
- video_streaming_codec_enum.insert(std::make_pair(
- std::string("H265"), hmi_apis::Common_VideoStreamingCodec::H265));
- video_streaming_codec_enum.insert(std::make_pair(
- std::string("Theora"), hmi_apis::Common_VideoStreamingCodec::Theora));
- video_streaming_codec_enum.insert(std::make_pair(
- std::string("VP8"), hmi_apis::Common_VideoStreamingCodec::VP8));
- video_streaming_codec_enum.insert(std::make_pair(
- std::string("VP9"), hmi_apis::Common_VideoStreamingCodec::VP9));
-}
-
-} // namespace
+/**
+ * @brief Saves smart object content into the JSON node
+ * @param field_name name of the field to save
+ * @param schema reference to schema to unapply
+ * @param object_to_save pointer to object to save
+ * @param out_json_node JSON node for the output result
+ */
+void save_hmi_capability_field_to_json(
+ const std::string& field_name,
+ smart_objects::CSmartSchema schema,
+ smart_objects::SmartObjectSPtr object_to_save,
+ Json::Value& out_json_node) {
+ if (!object_to_save) {
+ return;
+ }
+ namespace Formatters = ns_smart_device_link::ns_json_handler::formatters;
+ smart_objects::SmartObject formatted_object(smart_objects::SmartType_Map);
+ formatted_object[strings::msg_params][field_name] = *object_to_save;
+ schema.unapplySchema(formatted_object); // converts enums back to strings
+ Json::Value temp_value;
+ Formatters::CFormatterJsonBase::objToJsonValue(formatted_object, temp_value);
+ out_json_node[field_name] = temp_value[strings::msg_params][field_name];
+}
+
+} // namespace
HMICapabilitiesImpl::HMICapabilitiesImpl(ApplicationManager& app_mngr)
: is_vr_cooperating_(false)
@@ -445,14 +109,15 @@ HMICapabilitiesImpl::HMICapabilitiesImpl(ApplicationManager& app_mngr)
, is_phone_call_supported_(false)
, is_video_streaming_supported_(false)
, is_rc_supported_(false)
+ , is_driver_distraction_supported_(false)
, navigation_capability_(NULL)
, phone_capability_(NULL)
, video_streaming_capability_(NULL)
, rc_capability_(NULL)
+ , driver_distraction_capability_(NULL)
, seat_location_capability_(NULL)
, app_mngr_(app_mngr)
, hmi_language_handler_(app_mngr) {
- InitCapabilities();
if (false == app_mngr_.get_settings().launch_hmi()) {
is_vr_cooperating_ = true;
is_tts_cooperating_ = true;
@@ -463,17 +128,10 @@ HMICapabilitiesImpl::HMICapabilitiesImpl(ApplicationManager& app_mngr)
}
}
-HMICapabilitiesImpl::~HMICapabilitiesImpl() {
- delete ui_supported_languages_;
- delete tts_supported_languages_;
- delete vr_supported_languages_;
- delete navigation_capability_;
- delete phone_capability_;
- delete video_streaming_capability_;
- delete rc_capability_;
-}
+HMICapabilitiesImpl::~HMICapabilitiesImpl() {}
bool HMICapabilitiesImpl::VerifyImageType(const int32_t image_type) const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
auto capabilities = display_capabilities();
if (!capabilities) {
return false;
@@ -567,27 +225,26 @@ HMICapabilitiesImpl::active_tts_language() const {
void HMICapabilitiesImpl::set_ui_supported_languages(
const smart_objects::SmartObject& supported_languages) {
- if (ui_supported_languages_) {
- delete ui_supported_languages_;
- }
- ui_supported_languages_ = new smart_objects::SmartObject(supported_languages);
+ auto new_value =
+ std::make_shared<smart_objects::SmartObject>(supported_languages);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
+ ui_supported_languages_.swap(new_value);
}
void HMICapabilitiesImpl::set_tts_supported_languages(
const smart_objects::SmartObject& supported_languages) {
- if (tts_supported_languages_) {
- delete tts_supported_languages_;
- }
- tts_supported_languages_ =
- new smart_objects::SmartObject(supported_languages);
+ auto new_value =
+ std::make_shared<smart_objects::SmartObject>(supported_languages);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
+ tts_supported_languages_.swap(new_value);
}
void HMICapabilitiesImpl::set_vr_supported_languages(
const smart_objects::SmartObject& supported_languages) {
- if (vr_supported_languages_) {
- delete vr_supported_languages_;
- }
- vr_supported_languages_ = new smart_objects::SmartObject(supported_languages);
+ auto new_value =
+ std::make_shared<smart_objects::SmartObject>(supported_languages);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
+ vr_supported_languages_.swap(new_value);
}
void HMICapabilitiesImpl::set_display_capabilities(
@@ -595,86 +252,96 @@ void HMICapabilitiesImpl::set_display_capabilities(
if (app_mngr_.IsSOStructValid(
hmi_apis::StructIdentifiers::Common_DisplayCapabilities,
display_capabilities)) {
- smart_objects::SmartObjectSPtr new_value =
+ auto new_value =
std::make_shared<smart_objects::SmartObject>(display_capabilities);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
display_capabilities_.swap(new_value);
}
}
void HMICapabilitiesImpl::set_system_display_capabilities(
const smart_objects::SmartObject& display_capabilities) {
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
system_display_capabilities_.reset(
new smart_objects::SmartObject(display_capabilities));
}
void HMICapabilitiesImpl::set_hmi_zone_capabilities(
const smart_objects::SmartObject& hmi_zone_capabilities) {
- smart_objects::SmartObjectSPtr new_value =
+ auto new_value =
std::make_shared<smart_objects::SmartObject>(hmi_zone_capabilities);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
hmi_zone_capabilities_.swap(new_value);
}
void HMICapabilitiesImpl::set_soft_button_capabilities(
const smart_objects::SmartObject& soft_button_capabilities) {
- smart_objects::SmartObjectSPtr new_value =
+ auto new_value =
std::make_shared<smart_objects::SmartObject>(soft_button_capabilities);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
soft_buttons_capabilities_.swap(new_value);
}
void HMICapabilitiesImpl::set_button_capabilities(
const smart_objects::SmartObject& button_capabilities) {
- smart_objects::SmartObjectSPtr new_value =
+ auto new_value =
std::make_shared<smart_objects::SmartObject>(button_capabilities);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
button_capabilities_.swap(new_value);
}
void HMICapabilitiesImpl::set_vr_capabilities(
const smart_objects::SmartObject& vr_capabilities) {
- smart_objects::SmartObjectSPtr new_value =
+ auto new_value =
std::make_shared<smart_objects::SmartObject>(vr_capabilities);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
vr_capabilities_.swap(new_value);
}
void HMICapabilitiesImpl::set_speech_capabilities(
const smart_objects::SmartObject& speech_capabilities) {
- smart_objects::SmartObjectSPtr new_value =
+ auto new_value =
std::make_shared<smart_objects::SmartObject>(speech_capabilities);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
speech_capabilities_.swap(new_value);
}
void HMICapabilitiesImpl::set_audio_pass_thru_capabilities(
const smart_objects::SmartObject& audio_pass_thru_capabilities) {
- smart_objects::SmartObjectSPtr new_value =
- std::make_shared<smart_objects::SmartObject>(
- audio_pass_thru_capabilities);
+ auto new_value = std::make_shared<smart_objects::SmartObject>(
+ audio_pass_thru_capabilities);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
audio_pass_thru_capabilities_.swap(new_value);
}
void HMICapabilitiesImpl::set_pcm_stream_capabilities(
const smart_objects::SmartObject& pcm_stream_capabilities) {
- smart_objects::SmartObjectSPtr new_value =
+ auto new_value =
std::make_shared<smart_objects::SmartObject>(pcm_stream_capabilities);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
pcm_stream_capabilities_.swap(new_value);
}
void HMICapabilitiesImpl::set_preset_bank_capabilities(
const smart_objects::SmartObject& preset_bank_capabilities) {
- smart_objects::SmartObjectSPtr new_value =
+ auto new_value =
std::make_shared<smart_objects::SmartObject>(preset_bank_capabilities);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
preset_bank_capabilities_.swap(new_value);
}
void HMICapabilitiesImpl::set_vehicle_type(
const smart_objects::SmartObject& vehicle_type) {
- smart_objects::SmartObjectSPtr new_value =
- std::make_shared<smart_objects::SmartObject>(vehicle_type);
+ auto new_value = std::make_shared<smart_objects::SmartObject>(vehicle_type);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
vehicle_type_.swap(new_value);
}
void HMICapabilitiesImpl::set_prerecorded_speech(
const smart_objects::SmartObject& prerecorded_speech) {
- smart_objects::SmartObjectSPtr new_value =
+ auto new_value =
std::make_shared<smart_objects::SmartObject>(prerecorded_speech);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
prerecorded_speech_.swap(new_value);
}
@@ -693,56 +360,65 @@ void HMICapabilitiesImpl::set_rc_supported(const bool supported) {
is_rc_supported_ = supported;
}
+void HMICapabilitiesImpl::set_driver_distraction_supported(
+ const bool supported) {
+ is_driver_distraction_supported_ = supported;
+}
+
void HMICapabilitiesImpl::set_navigation_capability(
const smart_objects::SmartObject& navigation_capability) {
- if (navigation_capability_) {
- delete navigation_capability_;
- }
- navigation_capability_ =
- new smart_objects::SmartObject(navigation_capability);
+ auto new_value =
+ std::make_shared<smart_objects::SmartObject>(navigation_capability);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
+ navigation_capability_.swap(new_value);
}
void HMICapabilitiesImpl::set_phone_capability(
const smart_objects::SmartObject& phone_capability) {
- if (phone_capability_) {
- delete phone_capability_;
- }
- phone_capability_ = new smart_objects::SmartObject(phone_capability);
+ auto new_value =
+ std::make_shared<smart_objects::SmartObject>(phone_capability);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
+ phone_capability_.swap(new_value);
}
void HMICapabilitiesImpl::set_video_streaming_capability(
const smart_objects::SmartObject& video_streaming_capability) {
- if (video_streaming_capability_) {
- delete video_streaming_capability_;
- }
- video_streaming_capability_ =
- new smart_objects::SmartObject(video_streaming_capability);
+ auto new_value =
+ std::make_shared<smart_objects::SmartObject>(video_streaming_capability);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
+ video_streaming_capability_.swap(new_value);
}
void HMICapabilitiesImpl::set_rc_capability(
const smart_objects::SmartObject& rc_capability) {
- if (rc_capability_) {
- delete rc_capability_;
- }
- rc_capability_ = new smart_objects::SmartObject(rc_capability);
+ auto new_value = std::make_shared<smart_objects::SmartObject>(rc_capability);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
+ rc_capability_.swap(new_value);
+}
+
+void HMICapabilitiesImpl::set_driver_distraction_capability(
+ const smart_objects::SmartObject& driver_distraction_capability) {
+ auto new_value = std::make_shared<smart_objects::SmartObject>(
+ driver_distraction_capability);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
+ driver_distraction_capability_.swap(new_value);
}
void HMICapabilitiesImpl::set_seat_location_capability(
const smart_objects::SmartObject& seat_location_capability) {
- if (seat_location_capability_) {
- delete seat_location_capability_;
- }
- seat_location_capability_ =
- new smart_objects::SmartObject(seat_location_capability);
+ auto new_value =
+ std::make_shared<smart_objects::SmartObject>(seat_location_capability);
+ sync_primitives::AutoWriteLock lock(hmi_capabilities_lock_);
+ seat_location_capability_.swap(new_value);
}
void HMICapabilitiesImpl::Init(
resumption::LastStateWrapperPtr last_state_wrapper) {
hmi_language_handler_.Init(last_state_wrapper);
- if (false == load_capabilities_from_file()) {
- LOG4CXX_ERROR(logger_, "file hmi_capabilities.json was not loaded");
+ if (!LoadCapabilitiesFromFile()) {
+ SDL_LOG_ERROR("file hmi_capabilities.json was not loaded");
} else {
- LOG4CXX_INFO(logger_, "file hmi_capabilities.json was loaded");
+ SDL_LOG_INFO("file hmi_capabilities.json was loaded");
}
hmi_language_handler_.set_default_capabilities_languages(
ui_language_, vr_language_, tts_language_);
@@ -774,81 +450,97 @@ bool HMICapabilitiesImpl::is_rc_cooperating() const {
return is_rc_cooperating_;
}
-const smart_objects::SmartObject* HMICapabilitiesImpl::ui_supported_languages()
- const {
+const smart_objects::SmartObjectSPtr
+HMICapabilitiesImpl::ui_supported_languages() const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return ui_supported_languages_;
}
-const smart_objects::SmartObject* HMICapabilitiesImpl::vr_supported_languages()
- const {
+const smart_objects::SmartObjectSPtr
+HMICapabilitiesImpl::vr_supported_languages() const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return vr_supported_languages_;
}
-const smart_objects::SmartObject* HMICapabilitiesImpl::tts_supported_languages()
- const {
+const smart_objects::SmartObjectSPtr
+HMICapabilitiesImpl::tts_supported_languages() const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return tts_supported_languages_;
}
const smart_objects::SmartObjectSPtr HMICapabilitiesImpl::display_capabilities()
const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return display_capabilities_;
}
const smart_objects::SmartObjectSPtr
HMICapabilitiesImpl::system_display_capabilities() const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return system_display_capabilities_;
}
const smart_objects::SmartObjectSPtr
HMICapabilitiesImpl::hmi_zone_capabilities() const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return hmi_zone_capabilities_;
}
const smart_objects::SmartObjectSPtr
HMICapabilitiesImpl::soft_button_capabilities() const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return soft_buttons_capabilities_;
}
const smart_objects::SmartObjectSPtr HMICapabilitiesImpl::button_capabilities()
const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return button_capabilities_;
}
const smart_objects::SmartObjectSPtr HMICapabilitiesImpl::speech_capabilities()
const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return speech_capabilities_;
}
const smart_objects::SmartObjectSPtr HMICapabilitiesImpl::vr_capabilities()
const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return vr_capabilities_;
}
const smart_objects::SmartObjectSPtr
HMICapabilitiesImpl::audio_pass_thru_capabilities() const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return audio_pass_thru_capabilities_;
}
const smart_objects::SmartObjectSPtr
HMICapabilitiesImpl::pcm_stream_capabilities() const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return pcm_stream_capabilities_;
}
const smart_objects::SmartObjectSPtr
HMICapabilitiesImpl::preset_bank_capabilities() const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return preset_bank_capabilities_;
}
bool HMICapabilitiesImpl::attenuated_supported() const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return attenuated_supported_;
}
const smart_objects::SmartObjectSPtr HMICapabilitiesImpl::vehicle_type() const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return vehicle_type_;
}
const smart_objects::SmartObjectSPtr HMICapabilitiesImpl::prerecorded_speech()
const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return prerecorded_speech_;
}
@@ -868,33 +560,188 @@ bool HMICapabilitiesImpl::rc_supported() const {
return is_rc_supported_;
}
-const smart_objects::SmartObject* HMICapabilitiesImpl::navigation_capability()
- const {
+bool HMICapabilitiesImpl::driver_distraction_supported() const {
+ return is_driver_distraction_supported_;
+}
+
+const smart_objects::SmartObjectSPtr
+HMICapabilitiesImpl::navigation_capability() const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return navigation_capability_;
}
-const smart_objects::SmartObject* HMICapabilitiesImpl::phone_capability()
+const smart_objects::SmartObjectSPtr HMICapabilitiesImpl::phone_capability()
const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return phone_capability_;
}
-const smart_objects::SmartObject*
+const smart_objects::SmartObjectSPtr
HMICapabilitiesImpl::video_streaming_capability() const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return video_streaming_capability_;
}
-const smart_objects::SmartObject* HMICapabilitiesImpl::rc_capability() const {
+const smart_objects::SmartObjectSPtr HMICapabilitiesImpl::rc_capability()
+ const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return rc_capability_;
}
-const smart_objects::SmartObject*
+const smart_objects::SmartObjectSPtr
+HMICapabilitiesImpl::driver_distraction_capability() const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
+ return driver_distraction_capability_;
+}
+
+const smart_objects::SmartObjectSPtr
HMICapabilitiesImpl::seat_location_capability() const {
+ sync_primitives::AutoReadLock lock(hmi_capabilities_lock_);
return seat_location_capability_;
}
-bool HMICapabilitiesImpl::load_capabilities_from_file() {
+/**
+ * @brief Checks if JSON member exists
+ * @param json_member reference to JSON structure to check
+ * @param name_of_member name which we should be checked
+ * @returns true if member exists, otherwise returns false
+ */
+bool JsonIsMemberSafe(const Json::Value& json_member,
+ const char* name_of_member) {
+ return !json_member.isNull() && json_member.isMember(name_of_member);
+}
+
+/**
+ * @brief Converts specified string to appropriate enum value
+ * according to schema
+ * @return converted enum value
+ */
+template <typename EnumType>
+EnumType ConvertStringToEnum(const std::string& str) {
+ using ns_smart_device_link::ns_smart_objects::EnumConversionHelper;
+ EnumType value;
+ if (EnumConversionHelper<EnumType>::StringToEnum(str, &value)) {
+ return value;
+ }
+
+ return EnumType::INVALID_ENUM;
+}
+
+/**
+ * @brief Converts the JSON array of string type into the SmartArray of enums
+ * @param json_array JSON value containing array
+ * @param out_so_array output SmartArray
+ */
+template <typename EnumType>
+void ConvertJsonArrayToSoArray(const Json::Value& json_array,
+ smart_objects::SmartObject& out_so_array) {
+ out_so_array =
+ smart_objects::SmartObject(smart_objects::SmartType::SmartType_Array);
+ for (uint32_t i = 0; i < json_array.size(); ++i) {
+ out_so_array[i] = ConvertStringToEnum<EnumType>(json_array[i].asString());
+ }
+}
+
+/**
+ * @brief Helper class for obtaining proper capabilities JSON value considering
+ * case if it were overriden by cache
+ */
+struct JsonCapabilitiesGetter {
+ public:
+ /**
+ * @brief JsonCapabilitiesGetter constructor
+ * @param json_default_node reference to the main JSON capabilities node
+ * @param json_cache_node reference to cached JSON capabilities node
+ */
+ JsonCapabilitiesGetter(Json::Value& json_default_node,
+ const Json::Value& json_cache_node)
+ : json_default_node_(json_default_node)
+ , json_cache_node_(json_cache_node) {}
+
+ JsonCapabilitiesGetter(JsonCapabilitiesGetter&& other) {
+ std::swap(json_default_node_, other.json_default_node_);
+ std::swap(json_cache_node_, other.json_cache_node_);
+ }
+
+ bool IsInterfaceJsonMemberExists(const char* interface_name) {
+ return JsonIsMemberSafe(json_cache_node_, interface_name) ||
+ JsonIsMemberSafe(json_default_node_, interface_name);
+ }
+
+ /**
+ * @brief GetJsonMember gets JSON value for a specified JSON member from
+ * cached JSON node if member exists, otherwise main JSON node will be
+ * taken
+ * @param member_name name of the JSON member to get
+ * @return JSON value for specified member or Value::null if not found
+ */
+ Json::Value GetJsonMember(
+ const char* member_name,
+ hmi_apis::FunctionID::eType request_id,
+ std::set<hmi_apis::FunctionID::eType>& default_initialized_capabilities) {
+ if (JsonIsMemberSafe(json_cache_node_, member_name)) {
+ return GetCachedJsonMember(member_name);
+ }
+
+ SDL_LOG_DEBUG("Add request ID: " << request_id
+ << " for the interface: " << member_name);
+ default_initialized_capabilities.insert(request_id);
+
+ if (JsonIsMemberSafe(json_default_node_, member_name)) {
+ return GetMainJsonMember(member_name);
+ }
+
+ return Json::Value::null;
+ }
+
+ /**
+ * @brief GetMainJsonMember gets JSON value for a specified JSON member from
+ * the main JSON node
+ * @param member_name name of the JSON member to get
+ * @return JSON value for specified member or Value::null if not found
+ */
+ Json::Value GetMainJsonMember(const char* member_name) {
+ return json_default_node_.get(member_name, Json::Value::null);
+ }
+
+ /**
+ * @brief GetCachedJsonMember gets JSON value for a specified JSON member
+ * from the cached JSON node
+ * @param member_name name of the JSON member to get
+ * @return JSON value for specified member or Value::null if not found
+ */
+ Json::Value GetCachedJsonMember(const char* member_name) {
+ return json_cache_node_.get(member_name, Json::Value::null);
+ }
+
+ private:
+ Json::Value json_default_node_;
+ Json::Value json_cache_node_;
+};
+
+/**
+ * @brief Gets the JSON node related to the specified interface name.
+ * @param interface_name Interface name which JSON node should be retreive from
+ * the main JSON node
+ * @return JsonCapabilitiesGetter instance initialized by default JSON node and
+ * cache JSON node for the specified interface
+ */
+
+JsonCapabilitiesGetter GetInterfaceGetter(
+ const char* interface_name, JsonCapabilitiesGetter& json_root_getter) {
+ auto interface_default_node =
+ json_root_getter.GetMainJsonMember(interface_name);
+ auto interface_cache_node =
+ json_root_getter.GetCachedJsonMember(interface_name);
+
+ JsonCapabilitiesGetter getter(interface_default_node, interface_cache_node);
+ return getter;
+}
+
+bool HMICapabilitiesImpl::LoadCapabilitiesFromFile() {
std::string json_string;
- std::string file_name = app_mngr_.get_settings().hmi_capabilities_file_name();
+ const std::string file_name =
+ app_mngr_.get_settings().hmi_capabilities_file_name();
if (!file_system::FileExists(file_name)) {
return false;
@@ -904,55 +751,87 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
return false;
}
+ const std::string cache_file_name =
+ app_mngr_.get_settings().hmi_capabilities_cache_file_name();
+ Json::Value root_json_override;
+
+ if (file_system::FileExists(cache_file_name)) {
+ SDL_LOG_DEBUG("HMI capabilities cache was found: " << cache_file_name);
+
+ std::string cache_json_string;
+ if (!file_system::ReadFile(cache_file_name, cache_json_string)) {
+ SDL_LOG_DEBUG(
+ "Failed to read data from cache file. Cache will be ignored");
+ }
+
+ try {
+ utils::JsonReader reader;
+ std::string json(cache_json_string.begin(), cache_json_string.end());
+ if (!reader.parse(json, &root_json_override)) {
+ SDL_LOG_ERROR("Cached JSON file is invalid. Deleting the file");
+ file_system::DeleteFile(cache_file_name);
+ root_json_override =
+ Json::Value::null; // Just to clear intermediate state of value
+ }
+ } catch (...) {
+ return false;
+ }
+ }
+
try {
- Json::CharReaderBuilder reader_builder;
- const std::unique_ptr<Json::CharReader> reader_(
- reader_builder.newCharReader());
- JSONCPP_STRING err;
Json::Value root_json;
- const size_t json_len = json_string.length();
-
- const bool result = reader_->parse(
- json_string.c_str(), json_string.c_str() + json_len, &root_json, &err);
- if (!result) {
- LOG4CXX_DEBUG(logger_, "Json parsing fails: " << err);
+ utils::JsonReader reader;
+ std::string json(json_string.begin(), json_string.end());
+ if (!reader.parse(json, &root_json)) {
+ SDL_LOG_DEBUG("Default JSON parsing fails");
return false;
}
+
+ JsonCapabilitiesGetter json_root_getter(root_json, root_json_override);
// UI
- if (check_existing_json_member(root_json, "UI")) {
- Json::Value ui = root_json.get("UI", Json::Value::null);
+ if (json_root_getter.IsInterfaceJsonMemberExists(hmi_interface::ui)) {
+ auto json_ui_getter =
+ GetInterfaceGetter(hmi_interface::ui, json_root_getter);
+
+ auto ui_language_node =
+ json_ui_getter.GetJsonMember(hmi_response::language,
+ hmi_apis::FunctionID::UI_GetLanguage,
+ requests_required_for_capabilities_);
- if (check_existing_json_member(ui, "language")) {
- const std::string lang = ui.get("language", "EN-US").asString();
- set_active_ui_language(MessageHelper::CommonLanguageFromString(lang));
- } else {
+ if (!ui_language_node.isNull()) {
+ const std::string lang = ui_language_node.asString();
set_active_ui_language(
- MessageHelper::CommonLanguageFromString("EN-US"));
+ StringToEnum<hmi_apis::Common_Language::eType>(lang));
}
- if (check_existing_json_member(ui, "languages")) {
+ auto ui_languages_node = json_ui_getter.GetJsonMember(
+ hmi_response::languages,
+ hmi_apis::FunctionID::UI_GetSupportedLanguages,
+ requests_required_for_capabilities_);
+ if (!ui_languages_node.isNull()) {
smart_objects::SmartObject ui_languages_so(
smart_objects::SmartType_Array);
- Json::Value languages_ui = ui.get("languages", "");
- convert_json_languages_to_obj(languages_ui, ui_languages_so);
+ ConvertJsonArrayToSoArray<hmi_apis::Common_Language::eType>(
+ ui_languages_node, ui_languages_so);
set_ui_supported_languages(ui_languages_so);
}
- if (check_existing_json_member(ui, "displayCapabilities")) {
+ auto ui_display_capabilities_node =
+ json_ui_getter.GetJsonMember(hmi_response::display_capabilities,
+ hmi_apis::FunctionID::UI_GetCapabilities,
+ requests_required_for_capabilities_);
+ if (!ui_display_capabilities_node.isNull()) {
smart_objects::SmartObject display_capabilities_so;
- Json::Value display_capabilities = ui.get("displayCapabilities", "");
- formatters::CFormatterJsonBase::jsonValueToObj(display_capabilities,
- display_capabilities_so);
+ formatters::CFormatterJsonBase::jsonValueToObj(
+ ui_display_capabilities_node, display_capabilities_so);
if (display_capabilities_so.keyExists(hmi_response::display_type)) {
- std::map<std::string,
- hmi_apis::Common_DisplayType::eType>::const_iterator it =
- display_type_enum.find(
+ auto enum_value =
+ ConvertStringToEnum<hmi_apis::Common_DisplayType::eType>(
(display_capabilities_so[hmi_response::display_type])
.asString());
- display_capabilities_so.erase(hmi_response::display_type);
- if (display_type_enum.end() != it) {
- display_capabilities_so[hmi_response::display_type] = it->second;
+ if (hmi_apis::Common_DisplayType::INVALID_ENUM != enum_value) {
+ display_capabilities_so[hmi_response::display_type] = enum_value;
}
}
@@ -963,34 +842,34 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
for (uint32_t i = 0; i < kLen; ++i) {
if ((display_capabilities_so[hmi_response::text_fields][i])
.keyExists(strings::name)) {
- std::map<std::string,
- hmi_apis::Common_TextFieldName::eType>::const_iterator
- it_text_field_name = text_fields_enum_name.find(
+ auto enum_value =
+ ConvertStringToEnum<hmi_apis::Common_TextFieldName::eType>(
display_capabilities_so[hmi_response::text_fields][i]
[strings::name]
.asString());
+
display_capabilities_so[hmi_response::text_fields][i].erase(
strings::name);
- if (text_fields_enum_name.end() != it_text_field_name) {
+
+ if (hmi_apis::Common_TextFieldName::INVALID_ENUM != enum_value) {
display_capabilities_so[hmi_response::text_fields][i]
- [strings::name] =
- it_text_field_name->second;
+ [strings::name] = enum_value;
}
}
if ((display_capabilities_so[hmi_response::text_fields][i])
.keyExists(strings::character_set)) {
- std::map<std::string,
- hmi_apis::Common_CharacterSet::eType>::const_iterator
- it_characte_set = character_set_enum.find(
+ auto enum_value =
+ ConvertStringToEnum<hmi_apis::Common_CharacterSet::eType>(
display_capabilities_so[hmi_response::text_fields][i]
[strings::character_set]
.asString());
+
display_capabilities_so[hmi_response::text_fields][i].erase(
strings::character_set);
- if (character_set_enum.end() != it_characte_set) {
+
+ if (hmi_apis::Common_CharacterSet::INVALID_ENUM != enum_value) {
display_capabilities_so[hmi_response::text_fields][i]
- [strings::character_set] =
- it_characte_set->second;
+ [strings::character_set] = enum_value;
}
}
}
@@ -1001,13 +880,12 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
display_capabilities_so[hmi_response::image_fields];
for (uint32_t i = 0; i < array_image_fields.length(); ++i) {
if (array_image_fields[i].keyExists(strings::name)) {
- std::map<std::string,
- hmi_apis::Common_ImageFieldName::eType>::const_iterator
- it = image_field_name_enum.find(
+ auto enum_value =
+ ConvertStringToEnum<hmi_apis::Common_ImageFieldName::eType>(
(array_image_fields[i][strings::name]).asString());
array_image_fields[i].erase(strings::name);
- if (image_field_name_enum.end() != it) {
- array_image_fields[i][strings::name] = it->second;
+ if (hmi_apis::Common_ImageFieldName::INVALID_ENUM != enum_value) {
+ array_image_fields[i][strings::name] = enum_value;
}
}
if (array_image_fields[i].keyExists(
@@ -1019,12 +897,11 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
for (uint32_t k = 0, j = 0;
k < image_type_supported_array.length();
++k) {
- std::map<std::string,
- hmi_apis::Common_FileType::eType>::const_iterator it =
- file_type_enum.find(
+ auto enum_value =
+ ConvertStringToEnum<hmi_apis::Common_FileType::eType>(
(image_type_supported_array[k]).asString());
- if (file_type_enum.end() != it) {
- image_type_supported_enum[j++] = it->second;
+ if (hmi_apis::Common_FileType::INVALID_ENUM != enum_value) {
+ image_type_supported_enum[j++] = enum_value;
}
}
array_image_fields[i].erase(strings::image_type_supported);
@@ -1041,12 +918,11 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
smart_objects::SmartType_Array);
for (uint32_t i = 0, j = 0; i < media_clock_formats_array.length();
++i) {
- std::map<std::string,
- hmi_apis::Common_MediaClockFormat::eType>::const_iterator
- it = media_clock_enum_name.find(
+ auto enum_value =
+ ConvertStringToEnum<hmi_apis::Common_MediaClockFormat::eType>(
(media_clock_formats_array[i]).asString());
- if (media_clock_enum_name.end() != it) {
- media_clock_formats_enum[j++] = it->second;
+ if (hmi_apis::Common_MediaClockFormat::INVALID_ENUM != enum_value) {
+ media_clock_formats_enum[j++] = enum_value;
}
}
display_capabilities_so.erase(hmi_response::media_clock_formats);
@@ -1062,11 +938,11 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
smart_objects::SmartType_Array);
for (uint32_t i = 0, j = 0; i < image_capabilities_array.length();
++i) {
- std::map<std::string,
- hmi_apis::Common_ImageType::eType>::const_iterator it =
- image_type_enum.find((image_capabilities_array[i]).asString());
- if (image_type_enum.end() != it) {
- image_capabilities_enum[j++] = it->second;
+ auto enum_value =
+ ConvertStringToEnum<hmi_apis::Common_ImageType::eType>(
+ (image_capabilities_array[i]).asString());
+ if (hmi_apis::Common_ImageType::INVALID_ENUM != enum_value) {
+ image_capabilities_enum[j++] = enum_value;
}
}
display_capabilities_so.erase(hmi_response::image_capabilities);
@@ -1076,55 +952,75 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
set_display_capabilities(display_capabilities_so);
}
- if (check_existing_json_member(ui, "audioPassThruCapabilities")) {
- Json::Value audio_capabilities =
- ui.get("audioPassThruCapabilities", "");
+ auto ui_audio_pass_thru_capabilities_node =
+ json_ui_getter.GetJsonMember(strings::audio_pass_thru_capabilities,
+ hmi_apis::FunctionID::UI_GetCapabilities,
+ requests_required_for_capabilities_);
+ if (!ui_audio_pass_thru_capabilities_node.isNull()) {
smart_objects::SmartObject audio_capabilities_so(
smart_objects::SmartType_Array);
- if (audio_capabilities.type() == Json::arrayValue) {
- for (uint32_t i = 0; i < audio_capabilities.size(); i++) {
- convert_audio_capability_to_obj(audio_capabilities[i],
- audio_capabilities_so[i]);
+ if (ui_audio_pass_thru_capabilities_node.type() == Json::arrayValue) {
+ for (uint32_t i = 0; i < ui_audio_pass_thru_capabilities_node.size();
+ i++) {
+ convert_audio_capability_to_obj(
+ ui_audio_pass_thru_capabilities_node[i],
+ audio_capabilities_so[i]);
}
- } else if (audio_capabilities.type() == Json::objectValue) {
- convert_audio_capability_to_obj(audio_capabilities,
+ } else if (ui_audio_pass_thru_capabilities_node.type() ==
+ Json::objectValue) {
+ convert_audio_capability_to_obj(ui_audio_pass_thru_capabilities_node,
audio_capabilities_so[0]);
}
set_audio_pass_thru_capabilities(audio_capabilities_so);
}
- if (check_existing_json_member(ui, "pcmStreamCapabilities")) {
- Json::Value pcm_capabilities = ui.get("pcmStreamCapabilities", "");
+ auto ui_pcm_stream_capabilities_node =
+ json_ui_getter.GetJsonMember(strings::pcm_stream_capabilities,
+ hmi_apis::FunctionID::UI_GetCapabilities,
+ requests_required_for_capabilities_);
+ if (!ui_pcm_stream_capabilities_node.isNull()) {
smart_objects::SmartObject pcm_capabilities_so =
smart_objects::SmartObject(smart_objects::SmartType_Map);
- convert_audio_capability_to_obj(pcm_capabilities, pcm_capabilities_so);
+ convert_audio_capability_to_obj(ui_pcm_stream_capabilities_node,
+ pcm_capabilities_so);
set_pcm_stream_capabilities(pcm_capabilities_so);
}
-
- if (check_existing_json_member(ui, "hmiZoneCapabilities")) {
- smart_objects::SmartObject hmi_zone_capabilities_so =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- hmi_zone_capabilities_so =
- hmi_zone_enum.find(ui.get("hmiZoneCapabilities", "").asString())
- ->second;
- set_hmi_zone_capabilities(hmi_zone_capabilities_so);
+ auto ui_hmi_zone_capabilities_node =
+ json_ui_getter.GetJsonMember(hmi_response::hmi_zone_capabilities,
+ hmi_apis::FunctionID::UI_GetCapabilities,
+ requests_required_for_capabilities_);
+ if (!ui_hmi_zone_capabilities_node.isNull()) {
+ auto enum_value =
+ ConvertStringToEnum<hmi_apis::Common_HmiZoneCapabilities::eType>(
+ ui_hmi_zone_capabilities_node.asString());
+ if (hmi_apis::Common_HmiZoneCapabilities::INVALID_ENUM != enum_value) {
+ smart_objects::SmartObject hmi_zone_capabilities_so(
+ smart_objects::SmartType_Array);
+ hmi_zone_capabilities_so = enum_value;
+ set_hmi_zone_capabilities(hmi_zone_capabilities_so);
+ }
}
- if (check_existing_json_member(ui, "softButtonCapabilities")) {
- Json::Value soft_button_capabilities =
- ui.get("softButtonCapabilities", "");
+ auto ui_soft_button_capabilities_node =
+ json_ui_getter.GetJsonMember(hmi_response::soft_button_capabilities,
+ hmi_apis::FunctionID::UI_GetCapabilities,
+ requests_required_for_capabilities_);
+ if (!ui_soft_button_capabilities_node.isNull()) {
smart_objects::SmartObject soft_button_capabilities_so;
formatters::CFormatterJsonBase::jsonValueToObj(
- soft_button_capabilities, soft_button_capabilities_so);
+ ui_soft_button_capabilities_node, soft_button_capabilities_so);
set_soft_button_capabilities(soft_button_capabilities_so);
}
- if (check_existing_json_member(ui, "systemCapabilities")) {
- Json::Value system_capabilities = ui.get("systemCapabilities", "");
- if (check_existing_json_member(system_capabilities,
- "navigationCapability")) {
- Json::Value navigation_capability =
- system_capabilities.get("navigationCapability", "");
+ auto ui_system_capabilities_node =
+ json_ui_getter.GetJsonMember(strings::system_capabilities,
+ hmi_apis::FunctionID::UI_GetCapabilities,
+ requests_required_for_capabilities_);
+ if (!ui_system_capabilities_node.isNull()) {
+ if (JsonIsMemberSafe(ui_system_capabilities_node,
+ strings::navigation_capability)) {
+ Json::Value navigation_capability = ui_system_capabilities_node.get(
+ strings::navigation_capability, "");
smart_objects::SmartObject navigation_capability_so;
formatters::CFormatterJsonBase::jsonValueToObj(
navigation_capability, navigation_capability_so);
@@ -1133,10 +1029,10 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
set_navigation_supported(true);
}
}
- if (check_existing_json_member(system_capabilities,
- "phoneCapability")) {
+ if (JsonIsMemberSafe(ui_system_capabilities_node,
+ strings::phone_capability)) {
Json::Value phone_capability =
- system_capabilities.get("phoneCapability", "");
+ ui_system_capabilities_node.get(strings::phone_capability, "");
smart_objects::SmartObject phone_capability_so;
formatters::CFormatterJsonBase::jsonValueToObj(phone_capability,
phone_capability_so);
@@ -1145,201 +1041,815 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
set_phone_call_supported(true);
}
}
- if (check_existing_json_member(system_capabilities,
- "videoStreamingCapability")) {
- Json::Value vs_capability =
- system_capabilities.get("videoStreamingCapability", "");
+ if (JsonIsMemberSafe(ui_system_capabilities_node,
+ strings::video_streaming_capability)) {
+ Json::Value vs_capability = ui_system_capabilities_node.get(
+ strings::video_streaming_capability, "");
smart_objects::SmartObject vs_capability_so;
formatters::CFormatterJsonBase::jsonValueToObj(vs_capability,
vs_capability_so);
- if (vs_capability_so.keyExists("supportedFormats")) {
+ if (vs_capability_so.keyExists(strings::supported_formats)) {
smart_objects::SmartObject& supported_format_array =
- vs_capability_so["supportedFormats"];
+ vs_capability_so[strings::supported_formats];
smart_objects::SmartObject converted_array(
smart_objects::SmartType_Array);
for (uint32_t i = 0, j = 0; i < supported_format_array.length();
i++) {
- if (!supported_format_array[i].keyExists("protocol") ||
- !supported_format_array[i].keyExists("codec")) {
+ if (!supported_format_array[i].keyExists(strings::protocol) ||
+ !supported_format_array[i].keyExists(strings::codec)) {
continue;
}
- std::map<std::string,
- hmi_apis::Common_VideoStreamingProtocol::eType>::
- const_iterator it_protocol =
- video_streaming_protocol_enum.find(
- supported_format_array[i]["protocol"].asString());
-
- std::map<std::string,
- hmi_apis::Common_VideoStreamingCodec::eType>::
- const_iterator it_codec = video_streaming_codec_enum.find(
- supported_format_array[i]["codec"].asString());
+ auto enum_value_protocol = ConvertStringToEnum<
+ hmi_apis::Common_VideoStreamingProtocol::eType>(
+ supported_format_array[i][strings::protocol].asString());
+ auto enum_value_codec = ConvertStringToEnum<
+ hmi_apis::Common_VideoStreamingCodec::eType>(
+ supported_format_array[i][strings::codec].asString());
// format is valid only if both protocol and codec are converted
// to enum values successfully
- if (it_protocol != video_streaming_protocol_enum.end() &&
- it_codec != video_streaming_codec_enum.end()) {
+ if (hmi_apis::Common_VideoStreamingProtocol::INVALID_ENUM !=
+ enum_value_protocol &&
+ hmi_apis::Common_VideoStreamingCodec::INVALID_ENUM !=
+ enum_value_codec) {
smart_objects::SmartObject format_so =
smart_objects::SmartObject(smart_objects::SmartType_Map);
- format_so["protocol"] = it_protocol->second;
- format_so["codec"] = it_codec->second;
+ format_so[strings::protocol] = enum_value_protocol;
+ format_so[strings::codec] = enum_value_codec;
converted_array[j++] = format_so;
}
}
- vs_capability_so.erase("supportedFormats");
- vs_capability_so["supportedFormats"] = converted_array;
+ vs_capability_so.erase(strings::supported_formats);
+ vs_capability_so[strings::supported_formats] = converted_array;
}
set_video_streaming_capability(vs_capability_so);
if (!vs_capability_so.empty()) {
set_video_streaming_supported(true);
}
}
- if (check_existing_json_member(system_capabilities,
- "remoteControlCapability")) {
- Json::Value rc_capability =
- system_capabilities.get("remoteControlCapability", "");
- smart_objects::SmartObject rc_capability_so;
- formatters::CFormatterJsonBase::jsonValueToObj(rc_capability,
- rc_capability_so);
- if (rc_capability_so.keyExists("lightControlCapabilities")) {
- if (rc_capability_so["lightControlCapabilities"].keyExists(
- "supportedLights")) {
- auto& lights = rc_capability_so["lightControlCapabilities"]
- ["supportedLights"];
- auto it = lights.asArray()->begin();
- for (; it != lights.asArray()->end(); ++it) {
- smart_objects::SmartObject& light_name_so = (*it)["name"];
- auto light_name = MessageHelper::CommonLightNameFromString(
- light_name_so.asString());
- light_name_so = light_name;
- }
+
+ if (JsonIsMemberSafe(ui_system_capabilities_node,
+ strings::driver_distraction_capability)) {
+ Json::Value dd_capability = ui_system_capabilities_node.get(
+ strings::driver_distraction_capability, "");
+ smart_objects::SmartObject dd_capability_so;
+ formatters::CFormatterJsonBase::jsonValueToObj(dd_capability,
+ dd_capability_so);
+ set_driver_distraction_capability(dd_capability_so);
+ if (!dd_capability_so.empty()) {
+ set_driver_distraction_supported(true);
+ }
+ }
+ }
+ } else {
+ AddRequiredRequestsForCapabilities(hmi_interface::ui);
+ } // UI end
+
+ // RC
+ if (json_root_getter.IsInterfaceJsonMemberExists(hmi_interface::rc)) {
+ auto rc_json_getter =
+ GetInterfaceGetter(hmi_interface::rc, json_root_getter);
+
+ auto rc_capabilitity_node =
+ rc_json_getter.GetJsonMember(strings::rc_capability,
+ hmi_apis::FunctionID::RC_GetCapabilities,
+ requests_required_for_capabilities_);
+ if (!rc_capabilitity_node.isNull()) {
+ smart_objects::SmartObject rc_capability_so;
+ formatters::CFormatterJsonBase::jsonValueToObj(rc_capabilitity_node,
+ rc_capability_so);
+ if (rc_capability_so.keyExists(
+ rc_rpc_plugin::strings::klightControlCapabilities)) {
+ if (rc_capability_so
+ [rc_rpc_plugin::strings::klightControlCapabilities]
+ .keyExists(rc_rpc_plugin::strings::kSupportedLights)) {
+ auto& lights = rc_capability_so
+ [rc_rpc_plugin::strings::klightControlCapabilities]
+ [rc_rpc_plugin::strings::kSupportedLights];
+ auto it = lights.asArray()->begin();
+ for (; it != lights.asArray()->end(); ++it) {
+ smart_objects::SmartObject& light_name_so = (*it)[strings::name];
+ auto light_name = StringToEnum<hmi_apis::Common_LightName::eType>(
+ light_name_so.asString());
+ light_name_so = light_name;
}
}
+ }
+ if (!rc_capability_so.empty()) {
+ set_rc_supported(true);
set_rc_capability(rc_capability_so);
- if (!rc_capability_so.empty()) {
- set_rc_supported(true);
- }
}
- if (check_existing_json_member(system_capabilities,
- "seatLocationCapability")) {
- Json::Value seat_location_capability =
- system_capabilities.get("seatLocationCapability", "");
- smart_objects::SmartObject seat_location_capability_so;
- formatters::CFormatterJsonBase::jsonValueToObj(
- seat_location_capability, seat_location_capability_so);
+ }
+
+ auto seat_location_capabilitiy_node =
+ rc_json_getter.GetJsonMember(strings::seat_location_capability,
+ hmi_apis::FunctionID::RC_GetCapabilities,
+ requests_required_for_capabilities_);
+
+ if (!seat_location_capabilitiy_node.isNull()) {
+ smart_objects::SmartObject seat_location_capability_so;
+ formatters::CFormatterJsonBase::jsonValueToObj(
+ seat_location_capabilitiy_node, seat_location_capability_so);
+
+ if (!seat_location_capability_so.empty()) {
+ set_rc_supported(true);
set_seat_location_capability(seat_location_capability_so);
}
}
- } // UI end
+ } else {
+ AddRequiredRequestsForCapabilities(hmi_interface::rc);
+ }
+ // RC end
// VR
- if (check_existing_json_member(root_json, "VR")) {
- Json::Value vr = root_json.get("VR", "");
- if (check_existing_json_member(vr, "language")) {
- const std::string lang = vr.get("language", "EN-US").asString();
- set_active_vr_language(MessageHelper::CommonLanguageFromString(lang));
- } else {
+ if (json_root_getter.IsInterfaceJsonMemberExists(hmi_interface::vr)) {
+ auto json_vr_getter =
+ GetInterfaceGetter(hmi_interface::vr, json_root_getter);
+
+ auto vr_language_node =
+ json_vr_getter.GetJsonMember(hmi_response::language,
+ hmi_apis::FunctionID::VR_GetLanguage,
+ requests_required_for_capabilities_);
+ if (!vr_language_node.isNull()) {
+ const std::string lang = vr_language_node.asString();
set_active_vr_language(
- MessageHelper::CommonLanguageFromString("EN-US"));
+ StringToEnum<hmi_apis::Common_Language::eType>(lang));
}
- if (check_existing_json_member(vr, "languages")) {
- Json::Value languages_vr = vr.get("languages", "");
+ auto vr_languages_node = json_vr_getter.GetJsonMember(
+ hmi_response::languages,
+ hmi_apis::FunctionID::VR_GetSupportedLanguages,
+ requests_required_for_capabilities_);
+ if (!vr_languages_node.isNull()) {
smart_objects::SmartObject vr_languages_so =
smart_objects::SmartObject(smart_objects::SmartType_Array);
- convert_json_languages_to_obj(languages_vr, vr_languages_so);
+ ConvertJsonArrayToSoArray<hmi_apis::Common_Language::eType>(
+ vr_languages_node, vr_languages_so);
set_vr_supported_languages(vr_languages_so);
}
- if (check_existing_json_member(vr, "capabilities")) {
- Json::Value capabilities = vr.get("capabilities", "");
+ auto vr_capabilities_node =
+ json_vr_getter.GetJsonMember(strings::vr_capabilities,
+ hmi_apis::FunctionID::VR_GetCapabilities,
+ requests_required_for_capabilities_);
+ if (!vr_capabilities_node.isNull()) {
smart_objects::SmartObject vr_capabilities_so =
smart_objects::SmartObject(smart_objects::SmartType_Array);
- for (uint32_t i = 0; i < capabilities.size(); ++i) {
- vr_capabilities_so[i] =
- vr_enum_capabilities.find(capabilities[i].asString())->second;
- }
+ ConvertJsonArrayToSoArray<hmi_apis::Common_VrCapabilities::eType>(
+ vr_capabilities_node, vr_capabilities_so);
set_vr_capabilities(vr_capabilities_so);
}
+ } else {
+ AddRequiredRequestsForCapabilities(hmi_interface::vr);
} // VR end
// TTS
- if (check_existing_json_member(root_json, "TTS")) {
- Json::Value tts = root_json.get("TTS", "");
-
- if (check_existing_json_member(tts, "language")) {
- const std::string lang = tts.get("language", "EN-US").asString();
- set_active_tts_language(MessageHelper::CommonLanguageFromString(lang));
- } else {
+ if (json_root_getter.IsInterfaceJsonMemberExists(hmi_interface::tts)) {
+ auto json_tts_getter =
+ GetInterfaceGetter(hmi_interface::tts, json_root_getter);
+
+ auto tts_language_node =
+ json_tts_getter.GetJsonMember(hmi_response::language,
+ hmi_apis::FunctionID::TTS_GetLanguage,
+ requests_required_for_capabilities_);
+ if (!tts_language_node.isNull()) {
+ const std::string lang = tts_language_node.asString();
set_active_tts_language(
- MessageHelper::CommonLanguageFromString("EN-US"));
+ StringToEnum<hmi_apis::Common_Language::eType>(lang));
}
- if (check_existing_json_member(tts, "languages")) {
- Json::Value languages_tts = tts.get("languages", "");
+ auto tts_languages_node = json_tts_getter.GetJsonMember(
+ hmi_response::languages,
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages,
+ requests_required_for_capabilities_);
+ if (!tts_languages_node.isNull()) {
smart_objects::SmartObject tts_languages_so =
smart_objects::SmartObject(smart_objects::SmartType_Array);
- convert_json_languages_to_obj(languages_tts, tts_languages_so);
+ ConvertJsonArrayToSoArray<hmi_apis::Common_Language::eType>(
+ tts_languages_node, tts_languages_so);
set_tts_supported_languages(tts_languages_so);
}
- if (check_existing_json_member(tts, "capabilities")) {
- Json::Value capabilities = tts.get("capabilities", "");
+ auto tts_speech_capabilities_node = json_tts_getter.GetJsonMember(
+ hmi_response::speech_capabilities,
+ hmi_apis::FunctionID::TTS_GetCapabilities,
+ requests_required_for_capabilities_);
+ if (!tts_speech_capabilities_node.isNull()) {
smart_objects::SmartObject tts_capabilities_so =
smart_objects::SmartObject(smart_objects::SmartType_Array);
- for (uint32_t i = 0; i < capabilities.size(); ++i) {
- tts_capabilities_so[i] =
- tts_enum_capabilities.find(capabilities[i].asString())->second;
- }
+ ConvertJsonArrayToSoArray<hmi_apis::Common_SpeechCapabilities::eType>(
+ tts_speech_capabilities_node, tts_capabilities_so);
set_speech_capabilities(tts_capabilities_so);
}
+
+ auto tts_prerecorded_speech_capabilities_node =
+ json_tts_getter.GetJsonMember(
+ hmi_response::prerecorded_speech_capabilities,
+ hmi_apis::FunctionID::TTS_GetCapabilities,
+ requests_required_for_capabilities_);
+ if (!tts_prerecorded_speech_capabilities_node.isNull()) {
+ smart_objects::SmartObject tts_capabilities_so =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+ ConvertJsonArrayToSoArray<hmi_apis::Common_PrerecordedSpeech::eType>(
+ tts_prerecorded_speech_capabilities_node, tts_capabilities_so);
+ set_prerecorded_speech(tts_capabilities_so);
+ }
+ } else {
+ AddRequiredRequestsForCapabilities(hmi_interface::tts);
} // TTS end
// Buttons
- if (check_existing_json_member(root_json, "Buttons")) {
- Json::Value buttons = root_json.get("Buttons", "");
- if (check_existing_json_member(buttons, "capabilities")) {
- Json::Value bt_capabilities = buttons.get("capabilities", "");
+ if (json_root_getter.IsInterfaceJsonMemberExists(hmi_interface::buttons)) {
+ auto json_buttons_getter =
+ GetInterfaceGetter(hmi_interface::buttons, json_root_getter);
+
+ auto buttons_capabilities_node = json_buttons_getter.GetJsonMember(
+ hmi_response::capabilities,
+ hmi_apis::FunctionID::Buttons_GetCapabilities,
+ requests_required_for_capabilities_);
+ if (!buttons_capabilities_node.isNull()) {
smart_objects::SmartObject buttons_capabilities_so;
- formatters::CFormatterJsonBase::jsonValueToObj(bt_capabilities,
- buttons_capabilities_so);
+ formatters::CFormatterJsonBase::jsonValueToObj(
+ buttons_capabilities_node, buttons_capabilities_so);
for (uint32_t i = 0; i < buttons_capabilities_so.length(); ++i) {
if ((buttons_capabilities_so[i]).keyExists(strings::name)) {
- std::map<std::string,
- hmi_apis::Common_ButtonName::eType>::const_iterator it =
- button_enum_name.find(
+ auto enum_value =
+ ConvertStringToEnum<hmi_apis::Common_ButtonName::eType>(
(buttons_capabilities_so[i][strings::name]).asString());
- buttons_capabilities_so[i].erase(strings::name);
- if (button_enum_name.end() != it) {
- buttons_capabilities_so[i][strings::name] = it->second;
+ if (hmi_apis::Common_ButtonName::INVALID_ENUM != enum_value) {
+ buttons_capabilities_so[i][strings::name] = enum_value;
}
}
}
set_button_capabilities(buttons_capabilities_so);
}
- if (check_existing_json_member(buttons, "presetBankCapabilities")) {
- Json::Value presetBank = buttons.get("presetBankCapabilities", "");
+
+ auto buttons_preset_bank_capabilities_node =
+ json_buttons_getter.GetMainJsonMember(
+ hmi_response::preset_bank_capabilities);
+ if (!buttons_preset_bank_capabilities_node.isNull()) {
smart_objects::SmartObject preset_bank_so;
- formatters::CFormatterJsonBase::jsonValueToObj(presetBank,
- preset_bank_so);
+ formatters::CFormatterJsonBase::jsonValueToObj(
+ buttons_preset_bank_capabilities_node, preset_bank_so);
set_preset_bank_capabilities(preset_bank_so);
}
+ } else {
+ AddRequiredRequestsForCapabilities(hmi_interface::buttons);
} // Buttons end
// VehicleType
- if (check_existing_json_member(root_json, "VehicleInfo")) {
- Json::Value vehicle_info = root_json.get("VehicleInfo", "");
- smart_objects::SmartObject vehicle_type_so;
- formatters::CFormatterJsonBase::jsonValueToObj(vehicle_info,
- vehicle_type_so);
- set_vehicle_type(vehicle_type_so);
+
+ if (json_root_getter.IsInterfaceJsonMemberExists(
+ hmi_interface::vehicle_info)) {
+ auto json_vehicle_info_getter =
+ GetInterfaceGetter(hmi_interface::vehicle_info, json_root_getter);
+
+ auto vehicle_type_node = json_vehicle_info_getter.GetJsonMember(
+ hmi_response::vehicle_type,
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType,
+ requests_required_for_capabilities_);
+ if (!vehicle_type_node.isNull()) {
+ smart_objects::SmartObject vehicle_type_so;
+ formatters::CFormatterJsonBase::jsonValueToObj(vehicle_type_node,
+ vehicle_type_so);
+ set_vehicle_type(vehicle_type_so);
+ }
+ } else {
+ AddRequiredRequestsForCapabilities(hmi_interface::vehicle_info);
} // VehicleType end
} catch (...) {
return false;
}
return true;
+} // namespace application_manager
+
+hmi_apis::Common_Language::eType
+HMICapabilitiesImpl::GetActiveLanguageForInterface(
+ const std::string& interface_name) const {
+ SDL_LOG_AUTO_TRACE();
+ if (hmi_interface::ui == interface_name) {
+ return active_ui_language();
+ }
+ if (hmi_interface::vr == interface_name) {
+ return active_vr_language();
+ }
+ if (hmi_interface::tts == interface_name) {
+ return active_tts_language();
+ }
+ return hmi_apis::Common_Language::INVALID_ENUM;
+}
+
+void HMICapabilitiesImpl::UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::eType requested_interface) {
+ SDL_LOG_AUTO_TRACE();
+ if (app_mngr_.IsHMICooperating()) {
+ SDL_LOG_DEBUG(
+ "Remove from default initialized capabilities skipped, "
+ "because hmi_cooperating equal true already");
+ return;
+ }
+
+ RemoveFromRequestsRequiredForCapabilities(requested_interface);
+ if (requests_required_for_capabilities_.empty()) {
+ app_mngr_.SetHMICooperating(true);
+ }
+}
+
+void HMICapabilitiesImpl::OnSoftwareVersionReceived(
+ const std::string& ccpu_version) {
+ SDL_LOG_AUTO_TRACE();
+
+ if (ccpu_version == ccpu_version_) {
+ SDL_LOG_DEBUG("Software version not changed");
+ if (requests_required_for_capabilities_.empty()) {
+ app_mngr_.SetHMICooperating(true);
+ }
+ app_mngr_.RequestForInterfacesAvailability();
+ return;
+ }
+
+ SDL_LOG_DEBUG("Software version changed");
+ set_ccpu_version(ccpu_version);
+ UpdateCachedCapabilities();
+}
+
+void HMICapabilitiesImpl::UpdateCachedCapabilities() {
+ SDL_LOG_AUTO_TRACE();
+
+ DeleteCachedCapabilitiesFile();
+
+ if (!LoadCapabilitiesFromFile()) {
+ SDL_LOG_ERROR("file hmi_capabilities.json was not loaded");
+ }
+
+ app_mngr_.RequestForInterfacesAvailability();
+}
+
+bool HMICapabilitiesImpl::AllFieldsSaved(
+ const Json::Value& root_node,
+ const std::string& interface_name,
+ const std::vector<std::string>& sections_to_check) const {
+ SDL_LOG_AUTO_TRACE();
+ if (!JsonIsMemberSafe(root_node, interface_name.c_str())) {
+ SDL_LOG_DEBUG(interface_name
+ << " interface is not found. All fields should be saved");
+ return false;
+ }
+
+ const auto& interface_node = root_node.get(interface_name, Json::Value::null);
+ for (auto it = sections_to_check.begin(); it != sections_to_check.end();
+ ++it) {
+ const std::string section = (*it).c_str();
+ if (!JsonIsMemberSafe(interface_node, section.c_str())) {
+ SDL_LOG_DEBUG("Field " << *it << " should be saved into the file");
+ return false;
+ }
+
+ if (hmi_response::language == section) {
+ const auto active_language =
+ GetActiveLanguageForInterface(interface_name);
+ const auto json_language = interface_node[hmi_response::language];
+
+ if (active_language != StringToEnum<hmi_apis::Common_Language::eType>(
+ json_language.asString())) {
+ SDL_LOG_DEBUG("Active " << interface_name
+ << " language is not the same as the persisted "
+ "one. Field should be overwritten");
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+void HMICapabilitiesImpl::RemoveFromRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::eType requested_interface) {
+ SDL_LOG_AUTO_TRACE();
+
+ auto it = find(requests_required_for_capabilities_.begin(),
+ requests_required_for_capabilities_.end(),
+ requested_interface);
+ if (it != requests_required_for_capabilities_.end()) {
+ requests_required_for_capabilities_.erase(it);
+ SDL_LOG_DEBUG("Wait for " << requests_required_for_capabilities_.size()
+ << " responses");
+ }
+}
+
+void HMICapabilitiesImpl::PrepareUiJsonValueForSaving(
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema,
+ Json::Value& out_node) const {
+ SDL_LOG_AUTO_TRACE();
+
+ smart_objects::SmartObject capability(smart_objects::SmartType_Map);
+ auto system_capabilities = std::make_shared<smart_objects::SmartObject>(
+ capability[strings::system_capabilities]);
+
+ for (const auto& section_to_update : sections_to_update) {
+ if (section_to_update == hmi_response::hmi_zone_capabilities) {
+ save_hmi_capability_field_to_json(hmi_response::hmi_zone_capabilities,
+ schema,
+ hmi_zone_capabilities(),
+ out_node);
+ }
+
+ else if (section_to_update == hmi_response::soft_button_capabilities) {
+ save_hmi_capability_field_to_json(hmi_response::soft_button_capabilities,
+ schema,
+ soft_button_capabilities(),
+ out_node);
+ }
+
+ else if (section_to_update == strings::audio_pass_thru_capabilities) {
+ smart_objects::SmartObjectSPtr audio_pass_thru_capabilities_so =
+ audio_pass_thru_capabilities();
+
+ for (size_t i = 0; i < audio_pass_thru_capabilities_so->length(); ++i) {
+ const smart_objects::SmartObject& element =
+ (*audio_pass_thru_capabilities_so)[i];
+ const auto audio_pass_thru_capabilities =
+ std::make_shared<smart_objects::SmartObject>(element);
+ Json::Value out_audio_pass_thru;
+ save_hmi_capability_field_to_json(strings::audio_pass_thru_capabilities,
+ schema,
+ audio_pass_thru_capabilities,
+ out_audio_pass_thru);
+ out_node[strings::audio_pass_thru_capabilities][Json::ArrayIndex(i)] =
+ out_audio_pass_thru[strings::audio_pass_thru_capabilities];
+ }
+ }
+
+ else if (section_to_update == strings::navigation) {
+ out_node[strings::hmi_capabilities][strings::navigation] =
+ navigation_supported();
+ }
+
+ else if (section_to_update == strings::phone_call) {
+ out_node[strings::hmi_capabilities][strings::phone_call] =
+ phone_call_supported();
+ }
+
+ else if (section_to_update == strings::video_streaming) {
+ out_node[strings::hmi_capabilities][strings::video_streaming] =
+ video_streaming_supported();
+ }
+
+ else if (section_to_update == strings::navigation_capability) {
+ const auto navigation_capability_so = navigation_capability();
+ if (navigation_capability_so) {
+ (*system_capabilities)[strings::navigation_capability] =
+ *navigation_capability_so;
+ }
+ }
+
+ else if (section_to_update == strings::phone_capability) {
+ const auto phone_capability_so = phone_capability();
+ if (phone_capability_so) {
+ (*system_capabilities)[strings::phone_capability] =
+ *phone_capability_so;
+ }
+ }
+
+ else if (section_to_update == strings::video_streaming_capability) {
+ const auto video_streaming_capability_so = video_streaming_capability();
+
+ if (video_streaming_capability_so) {
+ (*system_capabilities)[strings::video_streaming_capability] =
+ *video_streaming_capability_so;
+ }
+ }
+
+ else if (section_to_update == strings::driver_distraction_capability) {
+ const auto driver_distraction_capability_so =
+ driver_distraction_capability();
+
+ if (driver_distraction_capability_so) {
+ (*system_capabilities)[strings::driver_distraction_capability] =
+ *driver_distraction_capability_so;
+ }
+ }
+
+ else if (section_to_update == strings::display_capabilities) {
+ const auto display_capabilities_so = display_capabilities();
+
+ if (display_capabilities_so) {
+ save_hmi_capability_field_to_json(strings::display_capabilities,
+ schema,
+ display_capabilities_so,
+ out_node);
+ }
+ }
+
+ else if (section_to_update == strings::pcm_stream_capabilities) {
+ save_hmi_capability_field_to_json(strings::pcm_stream_capabilities,
+ schema,
+ pcm_stream_capabilities(),
+ out_node);
+ }
+
+ else if (section_to_update == hmi_response::language) {
+ out_node[hmi_response::language] = EnumToString(active_ui_language());
+ }
+
+ else if (section_to_update == hmi_response::languages) {
+ save_hmi_capability_field_to_json(
+ hmi_response::languages, schema, ui_supported_languages(), out_node);
+ }
+ }
+
+ if (!system_capabilities->empty()) {
+ save_hmi_capability_field_to_json(
+ strings::system_capabilities, schema, system_capabilities, out_node);
+ }
+}
+
+void HMICapabilitiesImpl::PrepareVrJsonValueForSaving(
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema,
+ Json::Value& out_node) const {
+ SDL_LOG_AUTO_TRACE();
+
+ for (const auto& section_to_update : sections_to_update) {
+ if (section_to_update == hmi_response::language) {
+ out_node[hmi_response::language] = EnumToString(active_vr_language());
+ }
+
+ if (section_to_update == hmi_response::languages) {
+ save_hmi_capability_field_to_json(
+ hmi_response::languages, schema, vr_supported_languages(), out_node);
+ }
+
+ if (section_to_update == strings::vr_capabilities) {
+ save_hmi_capability_field_to_json(
+ strings::vr_capabilities, schema, vr_capabilities(), out_node);
+ }
+ }
+}
+
+void HMICapabilitiesImpl::PrepareTtsJsonValueForSaving(
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema,
+ Json::Value& out_node) const {
+ SDL_LOG_AUTO_TRACE();
+
+ for (const auto& section_to_update : sections_to_update) {
+ if (section_to_update == hmi_response::language) {
+ out_node[hmi_response::language] = EnumToString(active_tts_language());
+ }
+
+ if (section_to_update == hmi_response::languages) {
+ save_hmi_capability_field_to_json(
+ hmi_response::languages, schema, tts_supported_languages(), out_node);
+ }
+
+ if (section_to_update == hmi_response::speech_capabilities) {
+ save_hmi_capability_field_to_json(hmi_response::speech_capabilities,
+ schema,
+ speech_capabilities(),
+ out_node);
+ }
+
+ if (section_to_update == hmi_response::prerecorded_speech_capabilities) {
+ save_hmi_capability_field_to_json(
+ hmi_response::prerecorded_speech_capabilities,
+ schema,
+ prerecorded_speech(),
+ out_node);
+ }
+ }
+}
+
+void HMICapabilitiesImpl::PrepareButtonsJsonValueForSaving(
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema,
+ Json::Value& out_node) const {
+ SDL_LOG_AUTO_TRACE();
+
+ for (const auto& section_to_update : sections_to_update) {
+ if (section_to_update == hmi_response::button_capabilities) {
+ save_hmi_capability_field_to_json(
+ hmi_response::capabilities, schema, button_capabilities(), out_node);
+ }
+
+ if (section_to_update == hmi_response::preset_bank_capabilities) {
+ save_hmi_capability_field_to_json(hmi_response::preset_bank_capabilities,
+ schema,
+ preset_bank_capabilities(),
+ out_node);
+ }
+ }
+}
+
+void HMICapabilitiesImpl::PrepareVehicleInfoJsonValueForSaving(
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema,
+ Json::Value& out_node) const {
+ SDL_LOG_AUTO_TRACE();
+ if (helpers::in_range(sections_to_update, hmi_response::vehicle_type)) {
+ save_hmi_capability_field_to_json(
+ hmi_response::vehicle_type, schema, vehicle_type(), out_node);
+ }
+}
+
+void HMICapabilitiesImpl::PrepareRCJsonValueForSaving(
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema,
+ Json::Value& out_node) const {
+ SDL_LOG_AUTO_TRACE();
+
+ for (const auto& section_to_update : sections_to_update) {
+ if (section_to_update == strings::rc_capability) {
+ save_hmi_capability_field_to_json(
+ strings::rc_capability, schema, rc_capability(), out_node);
+ }
+
+ if (section_to_update == strings::seat_location_capability) {
+ save_hmi_capability_field_to_json(strings::seat_location_capability,
+ schema,
+ seat_location_capability(),
+ out_node);
+ }
+ }
+}
+
+void HMICapabilitiesImpl::AddRequiredRequestsForCapabilities(
+ const std::string& interface_name) {
+ SDL_LOG_DEBUG("Add request IDs for interface: " << interface_name);
+
+ if (interface_name == hmi_interface::ui) {
+ requests_required_for_capabilities_.insert(
+ hmi_apis::FunctionID::UI_GetLanguage);
+ requests_required_for_capabilities_.insert(
+ hmi_apis::FunctionID::UI_GetSupportedLanguages);
+ requests_required_for_capabilities_.insert(
+ hmi_apis::FunctionID::UI_GetCapabilities);
+ }
+
+ else if (interface_name == hmi_interface::rc) {
+ requests_required_for_capabilities_.insert(
+ hmi_apis::FunctionID::RC_GetCapabilities);
+ }
+
+ else if (interface_name == hmi_interface::vr) {
+ requests_required_for_capabilities_.insert(
+ hmi_apis::FunctionID::VR_GetLanguage);
+ requests_required_for_capabilities_.insert(
+ hmi_apis::FunctionID::VR_GetSupportedLanguages);
+ requests_required_for_capabilities_.insert(
+ hmi_apis::FunctionID::VR_GetCapabilities);
+ }
+
+ else if (interface_name == hmi_interface::tts) {
+ requests_required_for_capabilities_.insert(
+ hmi_apis::FunctionID::TTS_GetLanguage);
+ requests_required_for_capabilities_.insert(
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages);
+ requests_required_for_capabilities_.insert(
+ hmi_apis::FunctionID::TTS_GetCapabilities);
+ }
+
+ else if (interface_name == hmi_interface::buttons) {
+ requests_required_for_capabilities_.insert(
+ hmi_apis::FunctionID::Buttons_GetCapabilities);
+ }
+
+ else if (interface_name == hmi_interface::vehicle_info) {
+ requests_required_for_capabilities_.insert(
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType);
+ }
+}
+
+void HMICapabilitiesImpl::PrepareJsonValueForSaving(
+ const char* interface_name,
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema,
+ Json::Value& out_root_node) const {
+ SDL_LOG_DEBUG("Prepare " << interface_name << " sections for saving");
+
+ if (out_root_node.isNull()) {
+ out_root_node = Json::Value(Json::objectValue);
+ }
+
+ if (!out_root_node.isMember(interface_name)) {
+ out_root_node[interface_name] = Json::Value(Json::objectValue);
+ }
+
+ Json::Value& interface_node = out_root_node[interface_name];
+ if (strcmp(interface_name, hmi_interface::ui) == 0) {
+ PrepareUiJsonValueForSaving(sections_to_update, schema, interface_node);
+ }
+
+ else if (strcmp(interface_name, hmi_interface::vr) == 0) {
+ PrepareVrJsonValueForSaving(sections_to_update, schema, interface_node);
+ }
+
+ else if (strcmp(interface_name, hmi_interface::tts) == 0) {
+ PrepareTtsJsonValueForSaving(sections_to_update, schema, interface_node);
+ }
+
+ else if (strcmp(interface_name, hmi_interface::buttons) == 0) {
+ PrepareButtonsJsonValueForSaving(
+ sections_to_update, schema, interface_node);
+ }
+
+ else if (strcmp(interface_name, hmi_interface::vehicle_info) == 0) {
+ PrepareVehicleInfoJsonValueForSaving(
+ sections_to_update, schema, interface_node);
+ }
+
+ else if (strcmp(interface_name, hmi_interface::rc) == 0) {
+ PrepareRCJsonValueForSaving(sections_to_update, schema, interface_node);
+ }
+}
+
+bool HMICapabilitiesImpl::SaveCachedCapabilitiesToFile(
+ const std::string& interface_name,
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema) {
+ SDL_LOG_AUTO_TRACE();
+
+ if (sections_to_update.empty()) {
+ SDL_LOG_DEBUG("There is no one section to update in the cache file");
+ return true;
+ }
+
+ const std::string cache_file_name =
+ app_mngr_.get_settings().hmi_capabilities_cache_file_name();
+ if (cache_file_name.empty()) {
+ SDL_LOG_DEBUG("Cache file name is not specified. No need to save cache");
+ return true;
+ }
+
+ Json::Value root_node;
+ if (file_system::FileExists(cache_file_name)) {
+ SDL_LOG_DEBUG("Cache file exists. Check for it's content");
+
+ std::string file_content;
+ if (!file_system::ReadFile(cache_file_name, file_content)) {
+ SDL_LOG_ERROR("Failed to read file content");
+ return false;
+ }
+
+ Json::CharReaderBuilder builder;
+ const std::unique_ptr<Json::CharReader> reader(builder.newCharReader());
+ if (!reader->parse(file_content.c_str(),
+ file_content.c_str() + file_content.length(),
+ &root_node,
+ NULL)) {
+ SDL_LOG_ERROR("Can't parse the file. Skipping");
+ return false;
+ }
+
+ if (AllFieldsSaved(root_node, interface_name, sections_to_update)) {
+ SDL_LOG_DEBUG(
+ "All " << interface_name
+ << " fields are present in the file. No need to update");
+ return true;
+ }
+
+ SDL_LOG_DEBUG("Some fields in the cache file should be updated");
+ }
+
+ PrepareJsonValueForSaving(
+ interface_name.c_str(), sections_to_update, schema, root_node);
+
+ SDL_LOG_DEBUG("Saving cache to file: " << cache_file_name);
+ const std::string content_to_save = root_node.toStyledString();
+ const std::vector<uint8_t> binary_data_to_save(content_to_save.begin(),
+ content_to_save.end());
+
+ return file_system::Write(cache_file_name, binary_data_to_save);
+}
+
+bool HMICapabilitiesImpl::DeleteCachedCapabilitiesFile() const {
+ SDL_LOG_AUTO_TRACE();
+ const std::string cache_file_name =
+ app_mngr_.get_settings().hmi_capabilities_cache_file_name();
+ if (cache_file_name.empty()) {
+ SDL_LOG_DEBUG("Cache file name is not specified. Nothing to delete");
+ return false;
+ }
+
+ if (!file_system::FileExists(cache_file_name)) {
+ SDL_LOG_DEBUG("Cache file does not exist");
+ return false;
+ }
+
+ if (!file_system::DeleteFile(cache_file_name)) {
+ SDL_LOG_ERROR("Failed to delete cache file");
+ return false;
+ }
+ return true;
+}
+
+bool HMICapabilitiesImpl::IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::eType function_id) const {
+ return helpers::in_range(requests_required_for_capabilities_, function_id);
}
void HMICapabilitiesImpl::set_ccpu_version(const std::string& ccpu_version) {
@@ -1350,38 +1860,32 @@ const std::string& HMICapabilitiesImpl::ccpu_version() const {
return ccpu_version_;
}
-bool HMICapabilitiesImpl::check_existing_json_member(
- const Json::Value& json_member, const char* name_of_member) const {
- return json_member.isMember(name_of_member);
-}
-
void HMICapabilitiesImpl::convert_json_languages_to_obj(
const Json::Value& json_languages,
smart_objects::SmartObject& languages) const {
for (uint32_t i = 0, j = 0; i < json_languages.size(); ++i) {
- languages[j++] =
- MessageHelper::CommonLanguageFromString(json_languages[i].asString());
+ languages[j++] = StringToEnum<hmi_apis::Common_Language::eType>(
+ json_languages[i].asString());
}
}
void HMICapabilitiesImpl::convert_audio_capability_to_obj(
const Json::Value& capability,
smart_objects::SmartObject& output_so) const {
- if (check_existing_json_member(capability, "samplingRate")) {
+ if (JsonIsMemberSafe(capability, "samplingRate")) {
output_so[strings::sampling_rate] =
- sampling_rate_enum.find(capability.get("samplingRate", "").asString())
- ->second;
+ ConvertStringToEnum<hmi_apis::Common_SamplingRate::eType>(
+ capability.get("samplingRate", "").asString());
}
- if (check_existing_json_member(capability, "bitsPerSample")) {
+ if (JsonIsMemberSafe(capability, "bitsPerSample")) {
output_so[strings::bits_per_sample] =
- bit_per_sample_enum
- .find(capability.get("bitsPerSample", "").asString())
- ->second;
+ ConvertStringToEnum<hmi_apis::Common_BitsPerSample::eType>(
+ capability.get("bitsPerSample", "").asString());
}
- if (check_existing_json_member(capability, "audioType")) {
+ if (JsonIsMemberSafe(capability, "audioType")) {
output_so[strings::audio_type] =
- audio_type_enum.find(capability.get("audioType", "").asString())
- ->second;
+ ConvertStringToEnum<hmi_apis::Common_AudioType::eType>(
+ capability.get("audioType", "").asString());
}
}
diff --git a/src/components/application_manager/src/hmi_interfaces_impl.cc b/src/components/application_manager/src/hmi_interfaces_impl.cc
index 0c33ea4b11..e4fa4c936c 100644
--- a/src/components/application_manager/src/hmi_interfaces_impl.cc
+++ b/src/components/application_manager/src/hmi_interfaces_impl.cc
@@ -134,6 +134,7 @@ generate_function_to_interface_convert_map() {
convert_map[TTS_SetGlobalProperties] = HmiInterfaces::HMI_INTERFACE_TTS;
convert_map[TTS_OnResetTimeout] = HmiInterfaces::HMI_INTERFACE_TTS;
convert_map[UI_Alert] = HmiInterfaces::HMI_INTERFACE_UI;
+ convert_map[UI_SubtleAlert] = HmiInterfaces::HMI_INTERFACE_UI;
convert_map[UI_Show] = HmiInterfaces::HMI_INTERFACE_UI;
convert_map[UI_AddCommand] = HmiInterfaces::HMI_INTERFACE_UI;
convert_map[UI_DeleteCommand] = HmiInterfaces::HMI_INTERFACE_UI;
diff --git a/src/components/application_manager/src/hmi_language_handler.cc b/src/components/application_manager/src/hmi_language_handler.cc
index 46231c4596..750755478e 100644
--- a/src/components/application_manager/src/hmi_language_handler.cc
+++ b/src/components/application_manager/src/hmi_language_handler.cc
@@ -44,7 +44,7 @@ static const std::string UIKey = "UI";
static const std::string VRKey = "VR";
static const std::string TTSKey = "TTS";
-CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationManager")
+SDL_CREATE_LOG_VARIABLE("ApplicationManager")
namespace application_manager {
HMILanguageHandler::HMILanguageHandler(ApplicationManager& application_manager)
@@ -62,7 +62,7 @@ HMILanguageHandler::HMILanguageHandler(ApplicationManager& application_manager)
void HMILanguageHandler::set_language_for(
HMILanguageHandler::Interface interface,
hmi_apis::Common_Language::eType language) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::string key = "UNKNOWN";
switch (interface) {
case INTERFACE_UI:
@@ -75,12 +75,11 @@ void HMILanguageHandler::set_language_for(
key = TTSKey;
break;
default:
- LOG4CXX_WARN(logger_, "Unknown interface has been passed " << interface);
+ SDL_LOG_WARN("Unknown interface has been passed " << interface);
return;
}
- LOG4CXX_DEBUG(
- logger_,
- "Setting language " << language << " for interface " << interface);
+ SDL_LOG_DEBUG("Setting language " << language << " for interface "
+ << interface);
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
Json::Value dictionary = accessor.GetData().dictionary();
dictionary[LanguagesKey][key] = static_cast<int32_t>(language);
@@ -89,7 +88,7 @@ void HMILanguageHandler::set_language_for(
hmi_apis::Common_Language::eType HMILanguageHandler::get_language_for(
HMILanguageHandler::Interface interface) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace resumption;
using namespace hmi_apis;
std::string key = "UNKNOWN";
@@ -104,7 +103,7 @@ hmi_apis::Common_Language::eType HMILanguageHandler::get_language_for(
key = TTSKey;
break;
default:
- LOG4CXX_WARN(logger_, "Unknown interfcase has been passed " << interface);
+ SDL_LOG_WARN("Unknown interfcase has been passed " << interface);
return Common_Language::INVALID_ENUM;
}
@@ -121,24 +120,24 @@ hmi_apis::Common_Language::eType HMILanguageHandler::get_language_for(
}
void HMILanguageHandler::on_event(const event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject msg = event.smart_object();
switch (event.id()) {
case hmi_apis::FunctionID::UI_GetLanguage:
- LOG4CXX_DEBUG(logger_, "Got UI language response.");
+ SDL_LOG_DEBUG("Got UI language response.");
is_ui_language_received_ = true;
break;
case hmi_apis::FunctionID::VR_GetLanguage:
- LOG4CXX_DEBUG(logger_, "Got VR language response.");
+ SDL_LOG_DEBUG("Got VR language response.");
is_vr_language_received_ = true;
break;
case hmi_apis::FunctionID::TTS_GetLanguage:
- LOG4CXX_DEBUG(logger_, "Got TTS language response.");
+ SDL_LOG_DEBUG("Got TTS language response.");
is_tts_language_received_ = true;
break;
case hmi_apis::FunctionID::BasicCommunication_OnAppRegistered:
if (!(msg[strings::params].keyExists(strings::app_id))) {
- LOG4CXX_ERROR(logger_, "Message doesn't contain parameter app_id");
+ SDL_LOG_ERROR("Message doesn't contain parameter app_id");
return;
}
CheckApplication(
@@ -150,30 +149,28 @@ void HMILanguageHandler::on_event(const event_engine::Event& event) {
if (is_ui_language_received_ && is_vr_language_received_ &&
is_tts_language_received_) {
- LOG4CXX_DEBUG(logger_, "All GetLanguages responses gotten.");
+ SDL_LOG_DEBUG("All GetLanguages responses gotten.");
VerifyWithPersistedLanguages();
}
}
void HMILanguageHandler::set_handle_response_for(
const smart_objects::SmartObject& request) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
if (!request.keyExists(strings::params)) {
- LOG4CXX_ERROR(logger_,
- "Object does not have " << strings::params << " key.");
+ SDL_LOG_ERROR("Object does not have " << strings::params << " key.");
return;
}
if (!request[strings::params].keyExists(strings::function_id)) {
- LOG4CXX_ERROR(logger_,
- "Object does not have " << strings::function_id << " key.");
+ SDL_LOG_ERROR("Object does not have " << strings::function_id << " key.");
return;
}
if (!request[strings::params].keyExists(strings::correlation_id)) {
- LOG4CXX_ERROR(
- logger_, "Object does not have " << strings::correlation_id << " key.");
+ SDL_LOG_ERROR("Object does not have " << strings::correlation_id
+ << " key.");
return;
}
@@ -186,8 +183,7 @@ void HMILanguageHandler::set_handle_response_for(
hmi_apis::FunctionID::UI_GetLanguage,
hmi_apis::FunctionID::VR_GetLanguage,
hmi_apis::FunctionID::TTS_GetLanguage)) {
- LOG4CXX_ERROR(logger_,
- "Only *GetLanguage request are allowed to be subscribed.");
+ SDL_LOG_ERROR("Only *GetLanguage request are allowed to be subscribed.");
return;
}
@@ -196,9 +192,8 @@ void HMILanguageHandler::set_handle_response_for(
subscribe_on_event(function_id, correlation_id);
- LOG4CXX_DEBUG(logger_,
- "Subscribed for function_id "
- << function_id << " and correlation_id " << correlation_id);
+ SDL_LOG_DEBUG("Subscribed for function_id "
+ << function_id << " and correlation_id " << correlation_id);
}
void HMILanguageHandler::set_default_capabilities_languages(
@@ -223,7 +218,7 @@ void HMILanguageHandler::set_default_capabilities_languages(
void HMILanguageHandler::SendOnLanguageChangeToMobile(
const uint32_t connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr notification =
std::make_shared<smart_objects::SmartObject>();
@@ -242,14 +237,14 @@ void HMILanguageHandler::SendOnLanguageChangeToMobile(
hmi_capabilities.active_vr_language();
if (application_manager_.GetRPCService().ManageMobileCommand(
notification, commands::Command::SOURCE_SDL)) {
- LOG4CXX_INFO(logger_, "Mobile command sent");
+ SDL_LOG_INFO("Mobile command sent");
} else {
- LOG4CXX_WARN(logger_, "Cannot send mobile command");
+ SDL_LOG_WARN("Cannot send mobile command");
}
}
void HMILanguageHandler::VerifyWithPersistedLanguages() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace helpers;
const HMICapabilities& hmi_capabilities =
application_manager_.hmi_capabilities();
@@ -258,14 +253,13 @@ void HMILanguageHandler::VerifyWithPersistedLanguages() {
if (hmi_capabilities.active_ui_language() == persisted_ui_language_ &&
hmi_capabilities.active_vr_language() == persisted_vr_language_ &&
hmi_capabilities.active_tts_language() == persisted_tts_language_) {
- LOG4CXX_INFO(logger_,
- "All languages gotten from HMI match to persisted values.");
+ SDL_LOG_INFO("All languages gotten from HMI match to persisted values.");
return;
}
- LOG4CXX_INFO(logger_,
- "Some languages gotten from HMI have "
- "mismatch with persisted values.");
+ SDL_LOG_INFO(
+ "Some languages gotten from HMI have "
+ "mismatch with persisted values.");
const ApplicationSet& accessor =
application_manager_.applications().GetData();
@@ -273,40 +267,37 @@ void HMILanguageHandler::VerifyWithPersistedLanguages() {
for (; accessor.end() != it;) {
ApplicationConstSharedPtr app = *it++;
- LOG4CXX_INFO(logger_,
- "Application with app_id "
- << app->app_id()
- << " will be unregistered because of "
- "HMI language(s) mismatch.");
+ SDL_LOG_INFO("Application with app_id "
+ << app->app_id()
+ << " will be unregistered because of "
+ "HMI language(s) mismatch.");
CheckApplication(std::make_pair(app->app_id(), false));
}
sync_primitives::AutoLock lock(apps_lock_);
if (0 == apps_.size()) {
- LOG4CXX_DEBUG(logger_,
- "No registered apps found. HMILanguageHandler unsubscribed "
- "from all events.");
+ SDL_LOG_DEBUG(
+ "No registered apps found. HMILanguageHandler unsubscribed "
+ "from all events.");
unsubscribe_from_all_hmi_events();
}
}
void HMILanguageHandler::HandleWrongLanguageApp(const Apps::value_type& app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
{
sync_primitives::AutoLock lock(apps_lock_);
Apps::iterator it = apps_.find(app.first);
if (apps_.end() == it) {
- LOG4CXX_DEBUG(logger_,
- "Application id "
- << app.first
- << " is not found within apps with wrong language.");
+ SDL_LOG_DEBUG("Application id "
+ << app.first
+ << " is not found within apps with wrong language.");
return;
}
apps_.erase(it);
if (0 == apps_.size()) {
- LOG4CXX_DEBUG(logger_,
- "HMILanguageHandler unsubscribed from all events.");
+ SDL_LOG_DEBUG("HMILanguageHandler unsubscribed from all events.");
unsubscribe_from_all_hmi_events();
}
}
@@ -318,22 +309,19 @@ void HMILanguageHandler::HandleWrongLanguageApp(const Apps::value_type& app) {
commands::Command::SOURCE_SDL);
application_manager_.UnregisterApplication(
app.first, mobile_apis::Result::SUCCESS, false);
- LOG4CXX_INFO(logger_,
- "Unregistering application with app_id "
- << app.first << " because of HMI language(s) mismatch.");
+ SDL_LOG_INFO("Unregistering application with app_id "
+ << app.first << " because of HMI language(s) mismatch.");
}
void HMILanguageHandler::CheckApplication(const Apps::value_type app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool is_need_handle_wrong_language = false;
{
sync_primitives::AutoLock lock(apps_lock_);
Apps::iterator it = apps_.find(app.first);
if (apps_.end() == it) {
- LOG4CXX_INFO(logger_,
- "Adding application id "
- << app.first
- << " Application registered: " << app.second);
+ SDL_LOG_INFO("Adding application id "
+ << app.first << " Application registered: " << app.second);
apps_.insert(app);
return;
}
@@ -352,7 +340,7 @@ void HMILanguageHandler::Init(resumption::LastStateWrapperPtr value) {
}
void HMILanguageHandler::OnUnregisterApplication(uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(apps_lock_);
apps_.erase(app_id);
}
diff --git a/src/components/application_manager/src/hmi_state.cc b/src/components/application_manager/src/hmi_state.cc
index 844d0254cf..3487116baf 100644
--- a/src/components/application_manager/src/hmi_state.cc
+++ b/src/components/application_manager/src/hmi_state.cc
@@ -32,15 +32,17 @@
*/
#include "application_manager/hmi_state.h"
+
#include <boost/assign.hpp>
#include <boost/bimap.hpp>
#include <ostream>
+
#include "application_manager/application_manager.h"
#include "utils/helpers.h"
namespace application_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "HmiState")
+SDL_CREATE_LOG_VARIABLE("HmiState")
HmiState::HmiState(std::shared_ptr<Application> app,
const ApplicationManager& app_mngr,
@@ -53,7 +55,7 @@ HmiState::HmiState(std::shared_ptr<Application> app,
, audio_streaming_state_(mobile_apis::AudioStreamingState::INVALID_ENUM)
, video_streaming_state_(mobile_apis::VideoStreamingState::INVALID_ENUM)
, system_context_(mobile_apis::SystemContext::INVALID_ENUM) {
- LOG4CXX_DEBUG(logger_, *this);
+ SDL_LOG_DEBUG(*this);
}
HmiState::HmiState(std::shared_ptr<Application> app,
@@ -66,11 +68,10 @@ HmiState::HmiState(std::shared_ptr<Application> app,
, audio_streaming_state_(mobile_apis::AudioStreamingState::INVALID_ENUM)
, video_streaming_state_(mobile_apis::VideoStreamingState::INVALID_ENUM)
, system_context_(mobile_apis::SystemContext::INVALID_ENUM) {
- LOG4CXX_DEBUG(logger_, *this);
+ SDL_LOG_DEBUG(*this);
}
void HmiState::set_parent(HmiStatePtr parent) {
- DCHECK_OR_RETURN_VOID(parent);
parent_ = parent;
}
@@ -80,6 +81,12 @@ bool HmiState::is_navi_app() const {
return app ? app->is_navi() : false;
}
+bool HmiState::is_projection_app() const {
+ const ApplicationSharedPtr app =
+ app_mngr_.application_by_hmi_app(hmi_app_id_);
+ return app ? app->mobile_projection_enabled() : false;
+}
+
bool HmiState::is_media_app() const {
const ApplicationSharedPtr app =
app_mngr_.application_by_hmi_app(hmi_app_id_);
@@ -98,6 +105,42 @@ bool HmiState::is_mobile_projection_app() const {
return app ? app->mobile_projection_enabled() : false;
}
+mobile_apis::HMILevel::eType HmiState::parent_hmi_level() const {
+ using namespace mobile_apis;
+ return parent() ? parent()->hmi_level() : HMILevel::HMI_NONE;
+}
+
+mobile_apis::HMILevel::eType HmiState::parent_max_hmi_level() const {
+ using namespace mobile_apis;
+ return parent() ? parent()->max_hmi_level() : HMILevel::HMI_FULL;
+}
+
+mobile_apis::AudioStreamingState::eType HmiState::parent_audio_state() const {
+ using namespace mobile_apis;
+ return parent() ? parent()->audio_streaming_state()
+ : AudioStreamingState::NOT_AUDIBLE;
+}
+
+mobile_apis::AudioStreamingState::eType HmiState::parent_max_audio_state()
+ const {
+ using namespace mobile_apis;
+ return parent() ? parent()->max_audio_streaming_state()
+ : AudioStreamingState::AUDIBLE;
+}
+
+mobile_apis::VideoStreamingState::eType HmiState::parent_video_state() const {
+ using namespace mobile_apis;
+ return parent() ? parent()->video_streaming_state()
+ : VideoStreamingState::NOT_STREAMABLE;
+}
+
+mobile_apis::VideoStreamingState::eType HmiState::parent_max_video_state()
+ const {
+ using namespace mobile_apis;
+ return parent() ? parent()->max_video_streaming_state()
+ : VideoStreamingState::STREAMABLE;
+}
+
mobile_apis::WindowType::eType HmiState::window_type() const {
return window_type_;
}
@@ -113,6 +156,12 @@ mobile_apis::AudioStreamingState::eType VRHmiState::audio_streaming_state()
return AudioStreamingState::NOT_AUDIBLE;
}
+mobile_apis::AudioStreamingState::eType VRHmiState::max_audio_streaming_state()
+ const {
+ using namespace mobile_apis;
+ return AudioStreamingState::NOT_AUDIBLE;
+}
+
VRHmiState::VRHmiState(std::shared_ptr<Application> app,
const ApplicationManager& app_mngr)
: HmiState(app, app_mngr, STATE_ID_VR_SESSION) {}
@@ -126,14 +175,21 @@ mobile_apis::AudioStreamingState::eType TTSHmiState::audio_streaming_state()
using namespace helpers;
using namespace mobile_apis;
- AudioStreamingState::eType expected_state = AudioStreamingState::NOT_AUDIBLE;
- if (app_mngr_.is_attenuated_supported() &&
- AudioStreamingState::NOT_AUDIBLE != parent()->audio_streaming_state() &&
- Compare<HMILevel::eType, EQ, ONE>(
+ if (Compare<HMILevel::eType, EQ, ONE>(
hmi_level(), HMILevel::HMI_FULL, HMILevel::HMI_LIMITED)) {
- expected_state = AudioStreamingState::ATTENUATED;
+ return std::max(parent_audio_state(), max_audio_streaming_state());
+ }
+ return AudioStreamingState::NOT_AUDIBLE;
+}
+
+mobile_apis::AudioStreamingState::eType TTSHmiState::max_audio_streaming_state()
+ const {
+ using namespace mobile_apis;
+
+ if (app_mngr_.is_attenuated_supported()) {
+ return std::max(parent_max_audio_state(), AudioStreamingState::ATTENUATED);
}
- return expected_state;
+ return AudioStreamingState::NOT_AUDIBLE;
}
VideoStreamingHmiState::VideoStreamingHmiState(
@@ -142,13 +198,19 @@ VideoStreamingHmiState::VideoStreamingHmiState(
mobile_apis::VideoStreamingState::eType
VideoStreamingHmiState::video_streaming_state() const {
+ return std::max(parent_video_state(), max_video_streaming_state());
+}
+
+mobile_apis::VideoStreamingState::eType
+VideoStreamingHmiState::max_video_streaming_state() const {
+ using namespace mobile_apis;
const ApplicationSharedPtr app =
app_mngr_.application_by_hmi_app(hmi_app_id_);
if (app && app->IsVideoApplication()) {
- return parent()->video_streaming_state();
+ return std::max(parent_max_video_state(), VideoStreamingState::STREAMABLE);
}
- return mobile_apis::VideoStreamingState::NOT_STREAMABLE;
+ return VideoStreamingState::NOT_STREAMABLE;
}
NaviStreamingHmiState::NaviStreamingHmiState(std::shared_ptr<Application> app,
@@ -159,22 +221,20 @@ NaviStreamingHmiState::NaviStreamingHmiState(std::shared_ptr<Application> app,
mobile_apis::AudioStreamingState::eType
NaviStreamingHmiState::audio_streaming_state() const {
- using namespace helpers;
- using namespace mobile_apis;
+ return std::max(parent_audio_state(), max_audio_streaming_state());
+}
- AudioStreamingState::eType expected_state = parent()->audio_streaming_state();
- if (!is_navi_app() && Compare<AudioStreamingState::eType, EQ, ONE>(
- expected_state,
- AudioStreamingState::AUDIBLE,
- AudioStreamingState::ATTENUATED)) {
- if (app_mngr_.is_attenuated_supported()) {
- expected_state = AudioStreamingState::ATTENUATED;
- } else {
- expected_state = AudioStreamingState::NOT_AUDIBLE;
- }
+mobile_apis::AudioStreamingState::eType
+NaviStreamingHmiState::max_audio_streaming_state() const {
+ using namespace mobile_apis;
+ auto expected = AudioStreamingState::AUDIBLE;
+ if (!is_navi_app()) {
+ expected = app_mngr_.is_attenuated_supported()
+ ? AudioStreamingState::ATTENUATED
+ : AudioStreamingState::NOT_AUDIBLE;
}
- return expected_state;
+ return std::max(expected, parent_max_audio_state());
}
PhoneCallHmiState::PhoneCallHmiState(std::shared_ptr<Application> app,
@@ -182,28 +242,29 @@ PhoneCallHmiState::PhoneCallHmiState(std::shared_ptr<Application> app,
: HmiState(app, app_mngr, STATE_ID_PHONE_CALL) {}
mobile_apis::HMILevel::eType PhoneCallHmiState::hmi_level() const {
+ using namespace mobile_apis;
+ if (HMILevel::INVALID_ENUM == parent_hmi_level()) {
+ return parent_hmi_level();
+ }
+ return std::max(parent_hmi_level(), max_hmi_level());
+}
+
+mobile_apis::HMILevel::eType PhoneCallHmiState::max_hmi_level() const {
using namespace helpers;
using namespace mobile_apis;
if (WindowType::WIDGET == window_type()) {
- return parent()->hmi_level();
- }
-
- if (Compare<HMILevel::eType, EQ, ONE>(parent()->hmi_level(),
- HMILevel::HMI_BACKGROUND,
- HMILevel::HMI_NONE)) {
- return parent()->hmi_level();
+ return std::max(HMILevel::HMI_FULL, parent_max_hmi_level());
}
+ auto expected = HMILevel::HMI_FULL;
if (is_navi_app() || is_mobile_projection_app()) {
- return HMILevel::HMI_LIMITED;
+ expected = HMILevel::HMI_LIMITED;
+ } else if (is_media_app()) {
+ expected = HMILevel::HMI_BACKGROUND;
}
- if (!is_media_app()) {
- return parent()->hmi_level();
- }
-
- return HMILevel::HMI_BACKGROUND;
+ return std::max(expected, parent_max_hmi_level());
}
SafetyModeHmiState::SafetyModeHmiState(std::shared_ptr<Application> app,
@@ -215,20 +276,22 @@ DeactivateHMI::DeactivateHMI(std::shared_ptr<Application> app,
: HmiState(app, app_mngr, STATE_ID_DEACTIVATE_HMI) {}
mobile_apis::HMILevel::eType DeactivateHMI::hmi_level() const {
+ using namespace mobile_apis;
+ if (HMILevel::INVALID_ENUM == parent_hmi_level()) {
+ return parent_hmi_level();
+ }
+ return std::max(parent_hmi_level(), max_hmi_level());
+}
+
+mobile_apis::HMILevel::eType DeactivateHMI::max_hmi_level() const {
using namespace helpers;
using namespace mobile_apis;
if (WindowType::WIDGET == window_type()) {
- return parent()->hmi_level();
- }
-
- if (Compare<HMILevel::eType, EQ, ONE>(parent()->hmi_level(),
- HMILevel::HMI_BACKGROUND,
- HMILevel::HMI_NONE)) {
- return parent()->hmi_level();
+ return std::max(HMILevel::HMI_FULL, parent_max_hmi_level());
}
- return HMILevel::HMI_BACKGROUND;
+ return std::max(HMILevel::HMI_BACKGROUND, parent_max_hmi_level());
}
AudioSource::AudioSource(std::shared_ptr<Application> app,
@@ -241,38 +304,124 @@ AudioSource::AudioSource(std::shared_ptr<Application> app,
mobile_apis::HMILevel::eType AudioSource::hmi_level() const {
using namespace mobile_apis;
+ if (HMILevel::INVALID_ENUM == parent_hmi_level()) {
+ return parent_hmi_level();
+ }
+
+ if (WindowType::WIDGET == window_type() || keep_context_) {
+ return std::max(parent_hmi_level(), max_hmi_level());
+ }
+
+ auto expected = HMILevel::HMI_BACKGROUND;
+ if (is_navi_app() || is_projection_app() || is_voice_communication_app()) {
+ expected = HMILevel::HMI_LIMITED;
+ }
+
+ return std::max(std::max(expected, max_hmi_level()), parent_hmi_level());
+}
+
+mobile_apis::AudioStreamingState::eType AudioSource::audio_streaming_state()
+ const {
+ return is_media_app() && !is_navi_app()
+ ? mobile_apis::AudioStreamingState::NOT_AUDIBLE
+ : parent_audio_state();
+}
+
+mobile_apis::VideoStreamingState::eType AudioSource::video_streaming_state()
+ const {
+ return parent_video_state();
+}
+
+mobile_apis::HMILevel::eType AudioSource::max_hmi_level() const {
+ using namespace mobile_apis;
+
if (WindowType::WIDGET == window_type()) {
- return parent()->hmi_level();
+ return std::max(HMILevel::HMI_FULL, parent_max_hmi_level());
}
- // Checking for NONE is necessary to avoid issue during
- // calculation of HMI level during setting default HMI level
- if (keep_context_ || HMILevel::HMI_NONE == parent()->hmi_level()) {
- return parent()->hmi_level();
+ auto expected = HMILevel::HMI_FULL;
+ if (!keep_context_ && is_media_app() && !is_navi_app() &&
+ !is_projection_app()) {
+ expected = HMILevel::HMI_BACKGROUND;
}
- return HMILevel::HMI_BACKGROUND;
+ return std::max(expected, parent_max_hmi_level());
+}
+
+mobile_apis::AudioStreamingState::eType AudioSource::max_audio_streaming_state()
+ const {
+ return is_media_app() && !is_navi_app()
+ ? mobile_apis::AudioStreamingState::NOT_AUDIBLE
+ : parent_max_audio_state();
+}
+
+mobile_apis::VideoStreamingState::eType AudioSource::max_video_streaming_state()
+ const {
+ return parent() ? parent()->max_video_streaming_state()
+ : mobile_apis::VideoStreamingState::STREAMABLE;
}
EmbeddedNavi::EmbeddedNavi(std::shared_ptr<Application> app,
const ApplicationManager& app_mngr)
: HmiState(app, app_mngr, STATE_ID_EMBEDDED_NAVI) {}
+mobile_apis::AudioStreamingState::eType EmbeddedNavi::audio_streaming_state()
+ const {
+ return is_navi_app() ? mobile_apis::AudioStreamingState::NOT_AUDIBLE
+ : parent_audio_state();
+}
+
+mobile_apis::VideoStreamingState::eType EmbeddedNavi::video_streaming_state()
+ const {
+ return mobile_apis::VideoStreamingState::NOT_STREAMABLE;
+}
+
mobile_apis::HMILevel::eType EmbeddedNavi::hmi_level() const {
using namespace mobile_apis;
using namespace helpers;
+ if (HMILevel::INVALID_ENUM == parent_hmi_level()) {
+ return parent_hmi_level();
+ }
+
+ if (WindowType::WIDGET == window_type()) {
+ return std::max(parent_hmi_level(), max_hmi_level());
+ }
+
+ auto expected = HMILevel::HMI_BACKGROUND;
+ if ((is_media_app() || is_voice_communication_app()) && !is_navi_app()) {
+ expected = HMILevel::HMI_LIMITED;
+ }
+
+ return std::max(std::max(expected, max_hmi_level()), parent_hmi_level());
+}
+
+mobile_apis::AudioStreamingState::eType
+EmbeddedNavi::max_audio_streaming_state() const {
+ return is_navi_app() ? mobile_apis::AudioStreamingState::NOT_AUDIBLE
+ : parent_max_audio_state();
+}
+
+mobile_apis::VideoStreamingState::eType
+EmbeddedNavi::max_video_streaming_state() const {
+ return is_navi_app() ? mobile_apis::VideoStreamingState::NOT_STREAMABLE
+ : parent_max_video_state();
+}
+
+mobile_apis::HMILevel::eType EmbeddedNavi::max_hmi_level() const {
+ using namespace mobile_apis;
+ using namespace helpers;
+
if (WindowType::WIDGET == window_type()) {
- return parent()->hmi_level();
+ return std::max(HMILevel::HMI_FULL, parent_max_hmi_level());
}
- if (Compare<HMILevel::eType, EQ, ONE>(parent()->hmi_level(),
- HMILevel::HMI_BACKGROUND,
- HMILevel::HMI_NONE)) {
- return parent()->hmi_level();
+ auto expected = HMILevel::HMI_FULL;
+ if (is_navi_app()) {
+ expected = HMILevel::HMI_BACKGROUND;
}
- return HMILevel::HMI_BACKGROUND;
+ return std::max(expected, parent_max_hmi_level());
}
namespace {
@@ -293,6 +442,8 @@ const StateID2StrMap kStateID2StrMap =
HmiState::StateID::STATE_ID_EMBEDDED_NAVI, "EMBEDDED_NAVI");
} // anonymous namespace
+// cppcheck-suppress unusedFunction //Used in the next
+// overload of operator<<
std::ostream& operator<<(std::ostream& os, const HmiState::StateID src) {
try {
os << kStateID2StrMap.left.at(src);
diff --git a/src/components/application_manager/src/message_helper/message_helper.cc b/src/components/application_manager/src/message_helper/message_helper.cc
index 4a64fdb128..ba1c726415 100644
--- a/src/components/application_manager/src/message_helper/message_helper.cc
+++ b/src/components/application_manager/src/message_helper/message_helper.cc
@@ -68,7 +68,7 @@
#include "formatters/formatter_json_rpc.h"
#include "json/json.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationManager")
+SDL_CREATE_LOG_VARIABLE("ApplicationManager")
namespace application_manager {
@@ -107,7 +107,7 @@ bool ValidateSoftButtons(smart_objects::SmartObject& soft_buttons) {
struct GroupsAppender
: std::unary_function<void, const PermissionsList::value_type&> {
- GroupsAppender(smart_objects::SmartObject& groups)
+ explicit GroupsAppender(smart_objects::SmartObject& groups)
: groups_(groups), index_(0) {}
void operator()(const PermissionsList::value_type& item) {
@@ -135,7 +135,7 @@ struct GroupsAppender
struct ExternalConsentStatusAppender
: std::unary_function<void,
const policy::ExternalConsentStatus::value_type&> {
- ExternalConsentStatusAppender(smart_objects::SmartObject& status)
+ explicit ExternalConsentStatusAppender(smart_objects::SmartObject& status)
: status_(status), index_(0) {}
void operator()(const policy::ExternalConsentStatus::value_type& item) {
@@ -189,6 +189,8 @@ std::pair<std::string, mobile_apis::VehicleDataType::eType>
mobile_apis::VehicleDataType::VEHICLEDATA_TURNSIGNAL),
std::make_pair(strings::vin,
mobile_apis::VehicleDataType::VEHICLEDATA_VIN),
+ std::make_pair(strings::gearStatus,
+ mobile_apis::VehicleDataType::VEHICLEDATA_GEARSTATUS),
std::make_pair(strings::prndl,
mobile_apis::VehicleDataType::VEHICLEDATA_PRNDL),
std::make_pair(strings::tire_pressure,
@@ -211,6 +213,9 @@ std::pair<std::string, mobile_apis::VehicleDataType::eType>
std::make_pair(
strings::head_lamp_status,
mobile_apis::VehicleDataType::VEHICLEDATA_HEADLAMPSTATUS),
+ std::make_pair(
+ strings::stability_controls_status,
+ mobile_apis::VehicleDataType::VEHICLEDATA_STABILITYCONTROLSSTATUS),
std::make_pair(strings::e_call_info,
mobile_apis::VehicleDataType::VEHICLEDATA_ECALLINFO),
std::make_pair(strings::airbag_status,
@@ -237,9 +242,13 @@ std::pair<std::string, mobile_apis::VehicleDataType::eType>
mobile_apis::VehicleDataType::VEHICLEDATA_ACCPEDAL),
std::make_pair(strings::steering_wheel_angle,
mobile_apis::VehicleDataType::VEHICLEDATA_STEERINGWHEEL),
+ std::make_pair(strings::engine_oil_life,
+ mobile_apis::VehicleDataType::VEHICLEDATA_ENGINEOILLIFE),
+ std::make_pair(strings::window_status,
+ mobile_apis::VehicleDataType::VEHICLEDATA_WINDOWSTATUS),
std::make_pair(
- strings::engine_oil_life,
- mobile_apis::VehicleDataType::VEHICLEDATA_ENGINEOILLIFE)};
+ strings::hands_off_steering,
+ mobile_apis::VehicleDataType::VEHICLEDATA_HANDSOFFSTEERING)};
const VehicleData MessageHelper::vehicle_data_(
kVehicleDataInitializer,
@@ -248,7 +257,7 @@ const VehicleData MessageHelper::vehicle_data_(
smart_objects::SmartObjectSPtr MessageHelper::CreateNotification(
mobile_apis::FunctionID::eType function_id, uint32_t app_id) {
using smart_objects::SmartObject;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr object(
new SmartObject(smart_objects::SmartType_Map));
(*object)[strings::params][strings::message_type] =
@@ -269,7 +278,7 @@ MessageHelper::CreateHMINotification(hmi_apis::FunctionID::eType function_id) {
using smart_objects::SmartObject;
using smart_objects::SmartObjectSPtr;
using smart_objects::SmartType_Map;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SmartObjectSPtr notification_ptr =
std::make_shared<SmartObject>(SmartType_Map);
SmartObject& notification = *notification_ptr;
@@ -292,66 +301,42 @@ const uint32_t MessageHelper::GetPriorityCode(const std::string& priority) {
return static_cast<uint32_t>(hmi_apis::Common_AppPriority::INVALID_ENUM);
}
-hmi_apis::Common_Language::eType MessageHelper::CommonLanguageFromString(
- const std::string& language) {
- using namespace ns_smart_device_link::ns_smart_objects;
- hmi_apis::Common_Language::eType value;
- if (EnumConversionHelper<hmi_apis::Common_Language::eType>::StringToEnum(
- language, &value)) {
- return value;
- }
- return hmi_apis::Common_Language::INVALID_ENUM;
-}
-
-hmi_apis::Common_LightName::eType MessageHelper::CommonLightNameFromString(
- const std::string& lightName) {
- using namespace ns_smart_device_link::ns_smart_objects;
- hmi_apis::Common_LightName::eType value;
- if (EnumConversionHelper<hmi_apis::Common_LightName::eType>::StringToEnum(
- lightName, &value)) {
- return value;
- }
- return hmi_apis::Common_LightName::INVALID_ENUM;
-}
-
std::string MessageHelper::GetDeviceMacAddressForHandle(
const transport_manager::DeviceHandle device_handle,
const ApplicationManager& app_mngr) {
std::string device_mac_address = "";
app_mngr.connection_handler().get_session_observer().GetDataOnDeviceID(
device_handle, NULL, NULL, &device_mac_address);
- LOG4CXX_DEBUG(logger_, "result : " << device_handle);
+ SDL_LOG_DEBUG("result : " << device_handle);
return device_mac_address;
}
-std::string MessageHelper::CommonLanguageToString(
- hmi_apis::Common_Language::eType language) {
- using namespace ns_smart_device_link::ns_smart_objects;
- const char* str = 0;
- if (EnumConversionHelper<hmi_apis::Common_Language::eType>::EnumToCString(
- language, &str)) {
- return str ? str : "";
- }
- return std::string();
-}
+smart_objects::SmartObjectSPtr MessageHelper::CreateMessageForHMI(
+ const hmi_apis::messageType::eType message_type,
+ const uint32_t correlation_id) {
+ using namespace smart_objects;
-std::string MessageHelper::MobileLanguageToString(
- mobile_apis::Language::eType language) {
- using namespace ns_smart_device_link::ns_smart_objects;
- const char* str = 0;
- EnumConversionHelper<mobile_apis::Language::eType>::EnumToCString(language,
- &str);
- return str ? str : std::string();
+ SmartObjectSPtr message = std::make_shared<SmartObject>(SmartType_Map);
+ SmartObject& ref = *message;
+
+ ref[strings::params][strings::message_type] = static_cast<int>(message_type);
+ ref[strings::params][strings::protocol_version] =
+ commands::CommandImpl::protocol_version_;
+ ref[strings::params][strings::protocol_type] =
+ commands::CommandImpl::hmi_protocol_type_;
+ ref[strings::params][strings::correlation_id] = correlation_id;
+ return message;
}
smart_objects::SmartObjectSPtr MessageHelper::CreateMessageForHMI(
- hmi_apis::messageType::eType message_type, const uint32_t correlation_id) {
+ const hmi_apis::FunctionID::eType function_id,
+ const uint32_t correlation_id) {
using namespace smart_objects;
SmartObjectSPtr message = std::make_shared<SmartObject>(SmartType_Map);
SmartObject& ref = *message;
- ref[strings::params][strings::message_type] = static_cast<int>(message_type);
+ ref[strings::params][strings::function_id] = static_cast<int>(function_id);
ref[strings::params][strings::protocol_version] =
commands::CommandImpl::protocol_version_;
ref[strings::params][strings::protocol_type] =
@@ -361,9 +346,75 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateMessageForHMI(
}
smart_objects::SmartObjectSPtr
+MessageHelper::CreateTTSResetGlobalPropertiesRequest(
+ const ResetGlobalPropertiesResult& reset_result,
+ const ApplicationSharedPtr application) {
+ smart_objects::SmartObjectSPtr tts_reset_global_prop_request =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+
+ if (reset_result.help_prompt) {
+ (*tts_reset_global_prop_request)[strings::help_prompt] =
+ *(application->help_prompt());
+ }
+
+ if (reset_result.timeout_prompt) {
+ (*tts_reset_global_prop_request)[strings::timeout_prompt] =
+ *(application->timeout_prompt());
+ }
+
+ (*tts_reset_global_prop_request)[strings::app_id] = application->app_id();
+
+ return tts_reset_global_prop_request;
+}
+
+smart_objects::SmartObjectSPtr
+MessageHelper::CreateUIResetGlobalPropertiesRequest(
+ const ResetGlobalPropertiesResult& reset_result,
+ const ApplicationSharedPtr application) {
+ smart_objects::SmartObjectSPtr ui_reset_global_prop_request =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+
+ if (reset_result.vr_help_title_items) {
+ smart_objects::SmartObjectSPtr vr_help = CreateAppVrHelp(application);
+ if (!vr_help.get()) {
+ SDL_LOG_WARN("Failed to create vr_help");
+ return smart_objects::SmartObjectSPtr();
+ } else {
+ ui_reset_global_prop_request = vr_help;
+ }
+ }
+ if (reset_result.menu_name) {
+ (*ui_reset_global_prop_request)[hmi_request::menu_title] = "";
+ application->set_menu_title(
+ (*ui_reset_global_prop_request)[hmi_request::menu_title]);
+ }
+
+ if (reset_result.keyboard_properties) {
+ smart_objects::SmartObject key_board_properties =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ key_board_properties[strings::language] =
+ static_cast<int32_t>(hmi_apis::Common_Language::EN_US);
+ key_board_properties[hmi_request::keyboard_layout] =
+ static_cast<int32_t>(hmi_apis::Common_KeyboardLayout::QWERTY);
+ key_board_properties[hmi_request::auto_complete_list] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ key_board_properties[strings::auto_complete_text] = "";
+ (*ui_reset_global_prop_request)[hmi_request::keyboard_properties] =
+ key_board_properties;
+ }
+
+ (*ui_reset_global_prop_request)[strings::app_id] = application->app_id();
+
+ return ui_reset_global_prop_request;
+}
+
+smart_objects::SmartObjectSPtr
MessageHelper::CreateDisplayCapabilityUpdateToMobile(
const smart_objects::SmartObject& display_capabilities, Application& app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto message = std::make_shared<smart_objects::SmartObject>(
smart_objects::SmartType_Map);
@@ -389,7 +440,7 @@ MessageHelper::CreateDisplayCapabilityUpdateToMobile(
void MessageHelper::BroadcastCapabilityUpdate(
smart_objects::SmartObject& msg_params, ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject message(smart_objects::SmartType_Map);
message[strings::params][strings::message_type] = MessageType::kNotification;
@@ -435,7 +486,7 @@ smart_objects::SmartObject MessageHelper::CreateAppServiceCapabilities(
smart_objects::SmartObjectSPtr MessageHelper::CreateHashUpdateNotification(
const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr message =
std::make_shared<smart_objects::SmartObject>(
smart_objects::SmartType_Map);
@@ -482,17 +533,17 @@ void MessageHelper::SendGetSystemTimeRequest(const uint32_t correlation_id,
void MessageHelper::SendHashUpdateNotification(const uint32_t app_id,
ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = app_mngr.application(app_id);
if (!app) {
- LOG4CXX_ERROR(logger_, "Application not found by appID");
+ SDL_LOG_ERROR("Application not found by appID");
return;
}
smart_objects::SmartObjectSPtr so = CreateHashUpdateNotification(app_id);
PrintSmartObject(*so);
if (!app_mngr.GetRPCService().ManageMobileCommand(
so, commands::Command::SOURCE_SDL)) {
- LOG4CXX_ERROR(logger_, "Failed to send HashUpdate notification.");
+ SDL_LOG_ERROR("Failed to send HashUpdate notification.");
return;
}
app_mngr.resume_controller().ApplicationsDataUpdated();
@@ -502,7 +553,7 @@ smart_objects::SmartObjectSPtr
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
int32_t connection_key,
mobile_api::AppInterfaceUnregisteredReason::eType reason) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr notification =
std::make_shared<smart_objects::SmartObject>();
@@ -521,20 +572,23 @@ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
return notification;
}
-void MessageHelper::SendDeleteCommandRequest(smart_objects::SmartObject* cmd,
- ApplicationSharedPtr application,
- ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK_OR_RETURN_VOID(cmd);
+smart_objects::SmartObjectSPtr MessageHelper::CreateDeleteUICommandRequest(
+ smart_objects::SmartObject* cmd,
+ const uint32_t app_id,
+ const uint32_t corr_id) {
+ SDL_LOG_AUTO_TRACE();
+
using namespace smart_objects;
+ DCHECK_OR_RETURN(cmd, nullptr);
+
SmartObject msg_params = SmartObject(smart_objects::SmartType_Map);
msg_params[strings::cmd_id] = (*cmd)[strings::cmd_id];
- msg_params[strings::app_id] = application->app_id();
+ msg_params[strings::app_id] = app_id;
if ((*cmd).keyExists(strings::menu_params)) {
- SmartObjectSPtr message = CreateMessageForHMI(
- hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
+ SmartObjectSPtr message =
+ CreateMessageForHMI(hmi_apis::messageType::request, corr_id);
DCHECK(message);
SmartObject& object = *message;
@@ -542,16 +596,31 @@ void MessageHelper::SendDeleteCommandRequest(smart_objects::SmartObject* cmd,
hmi_apis::FunctionID::UI_DeleteCommand;
object[strings::msg_params] = msg_params;
-
- app_mngr.GetRPCService().ManageHMICommand(message);
+ return message;
}
+ return nullptr;
+}
+
+smart_objects::SmartObjectSPtr MessageHelper::CreateDeleteVRCommandRequest(
+ smart_objects::SmartObject* cmd,
+ ApplicationSharedPtr application,
+ const uint32_t corr_id) {
+ SDL_LOG_AUTO_TRACE();
+
+ using namespace smart_objects;
+ DCHECK_OR_RETURN(cmd, nullptr);
+
+ SmartObject msg_params = SmartObject(smart_objects::SmartType_Map);
+
+ msg_params[strings::cmd_id] = (*cmd)[strings::cmd_id];
+ msg_params[strings::app_id] = application->app_id();
if ((*cmd).keyExists(strings::vr_commands)) {
msg_params[strings::grammar_id] = application->get_grammar_id();
msg_params[strings::type] = hmi_apis::Common_VRCommandType::Command;
- SmartObjectSPtr message = CreateMessageForHMI(
- hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
+ SmartObjectSPtr message =
+ CreateMessageForHMI(hmi_apis::messageType::request, corr_id);
DCHECK(message);
SmartObject& object = *message;
@@ -559,15 +628,15 @@ void MessageHelper::SendDeleteCommandRequest(smart_objects::SmartObject* cmd,
hmi_apis::FunctionID::VR_DeleteCommand;
object[strings::msg_params] = msg_params;
-
- app_mngr.GetRPCService().ManageHMICommand(message);
+ return message;
}
+ return nullptr;
}
void MessageHelper::SendDeleteSubmenuRequest(smart_objects::SmartObject* cmd,
ApplicationSharedPtr application,
ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(cmd);
using namespace smart_objects;
@@ -599,23 +668,23 @@ void MessageHelper::SendDeleteSubmenuRequest(smart_objects::SmartObject* cmd,
if ((*cmd)[strings::menu_id].asInt() ==
(*it->second)[strings::menu_params][hmi_request::parent_id].asInt()) {
- SmartObject msg_params = SmartObject(smart_objects::SmartType_Map);
- msg_params[strings::cmd_id] = (*it->second)[strings::cmd_id].asInt();
- msg_params[strings::app_id] = application->app_id();
- msg_params[strings::grammar_id] = application->get_grammar_id();
- msg_params[strings::type] = hmi_apis::Common_VRCommandType::Command;
+ SmartObject params = SmartObject(smart_objects::SmartType_Map);
+ params[strings::cmd_id] = (*it->second)[strings::cmd_id].asInt();
+ params[strings::app_id] = application->app_id();
+ params[strings::grammar_id] = application->get_grammar_id();
+ params[strings::type] = hmi_apis::Common_VRCommandType::Command;
- SmartObjectSPtr message = CreateMessageForHMI(
+ SmartObjectSPtr hmi_message = CreateMessageForHMI(
hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
- DCHECK(message);
+ DCHECK(hmi_message);
- SmartObject& object = *message;
- object[strings::params][strings::function_id] =
+ SmartObject& smart_object = *hmi_message;
+ smart_object[strings::params][strings::function_id] =
hmi_apis::FunctionID::VR_DeleteCommand;
- object[strings::msg_params] = msg_params;
+ smart_object[strings::msg_params] = params;
- app_mngr.GetRPCService().ManageHMICommand(message);
+ app_mngr.GetRPCService().ManageHMICommand(hmi_message);
}
}
}
@@ -623,12 +692,10 @@ void MessageHelper::SendDeleteSubmenuRequest(smart_objects::SmartObject* cmd,
void MessageHelper::SendDeleteChoiceSetRequest(smart_objects::SmartObject* cmd,
ApplicationSharedPtr application,
ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(cmd);
using namespace smart_objects;
- // Same is deleted with SendDeleteCommandRequest?
-
SmartObject msg_params = SmartObject(smart_objects::SmartType_Map);
msg_params[strings::app_id] = application->app_id();
@@ -654,13 +721,11 @@ void MessageHelper::SendDeleteChoiceSetRequest(smart_objects::SmartObject* cmd,
void MessageHelper::SendResetPropertiesRequest(ApplicationSharedPtr application,
ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace smart_objects;
{
- SmartObject msg_params = SmartObject(smart_objects::SmartType_Map);
-
- msg_params = *MessageHelper::CreateAppVrHelp(application);
+ SmartObject msg_params = *MessageHelper::CreateAppVrHelp(application);
msg_params[hmi_request::menu_title] = "";
smart_objects::SmartObject keyboard_properties =
@@ -739,78 +804,32 @@ const VehicleData& MessageHelper::vehicle_data() {
return vehicle_data_;
}
-std::string MessageHelper::HMIResultToString(
- hmi_apis::Common_Result::eType hmi_result) {
- using namespace ns_smart_device_link::ns_smart_objects;
- const char* str = 0;
- if (EnumConversionHelper<hmi_apis::Common_Result::eType>::EnumToCString(
- hmi_result, &str)) {
- return str;
- }
- return std::string();
-}
-
-hmi_apis::Common_Result::eType MessageHelper::HMIResultFromString(
- const std::string& hmi_result) {
- using namespace ns_smart_device_link::ns_smart_objects;
- hmi_apis::Common_Result::eType value;
- if (EnumConversionHelper<hmi_apis::Common_Result::eType>::StringToEnum(
- hmi_result, &value)) {
- return value;
- }
- return hmi_apis::Common_Result::INVALID_ENUM;
-}
-
-std::string MessageHelper::MobileResultToString(
- mobile_apis::Result::eType mobile_result) {
- using namespace ns_smart_device_link::ns_smart_objects;
- const char* str = 0;
- if (EnumConversionHelper<mobile_apis::Result::eType>::EnumToCString(
- mobile_result, &str)) {
- return str;
- }
- return std::string();
-}
-
-mobile_apis::Result::eType MessageHelper::MobileResultFromString(
- const std::string& mobile_result) {
- using namespace ns_smart_device_link::ns_smart_objects;
- mobile_apis::Result::eType value;
- if (EnumConversionHelper<mobile_apis::Result::eType>::StringToEnum(
- mobile_result, &value)) {
- return value;
- }
- return mobile_apis::Result::INVALID_ENUM;
-}
-
mobile_apis::Result::eType MessageHelper::HMIToMobileResult(
const hmi_apis::Common_Result::eType hmi_result) {
- const std::string result = HMIResultToString(hmi_result);
+ const std::string result = EnumToString(hmi_result);
if (result.empty()) {
return mobile_api::Result::INVALID_ENUM;
}
- return MobileResultFromString(result);
+ return StringToEnum<mobile_apis::Result::eType>(result);
}
hmi_apis::Common_Result::eType MessageHelper::MobileToHMIResult(
const mobile_apis::Result::eType mobile_result) {
- const std::string result = MobileResultToString(mobile_result);
+ const std::string result = EnumToString(mobile_result);
if (result.empty()) {
return hmi_apis::Common_Result::INVALID_ENUM;
}
- return HMIResultFromString(result);
+ return StringToEnum<hmi_apis::Common_Result::eType>(result);
}
-void MessageHelper::SendHMIStatusNotification(
- ApplicationSharedPtr application,
- const WindowID window_id,
- ApplicationManager& application_manager) {
- LOG4CXX_AUTO_TRACE(logger_);
+smart_objects::SmartObjectSPtr MessageHelper::CreateHMIStatusNotification(
+ ApplicationSharedPtr application, const WindowID window_id) {
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr notification =
std::make_shared<smart_objects::SmartObject>();
if (!notification) {
- LOG4CXX_ERROR(logger_, "Failed to create smart object");
- return;
+ SDL_LOG_ERROR("Failed to create smart object");
+ return notification;
}
smart_objects::SmartObject& message = *notification;
@@ -836,9 +855,7 @@ void MessageHelper::SendHMIStatusNotification(
message[strings::msg_params][strings::system_context] =
static_cast<int32_t>(application->system_context(window_id));
-
- application_manager.GetRPCService().ManageMobileCommand(
- notification, commands::Command::SOURCE_SDL);
+ return notification;
}
void MessageHelper::SendActivateAppToHMI(
@@ -849,7 +866,7 @@ void MessageHelper::SendActivateAppToHMI(
application_manager::ApplicationConstSharedPtr app =
application_manager.application(app_id);
if (!app) {
- LOG4CXX_WARN(logger_, "Invalid app_id: " << app_id);
+ SDL_LOG_WARN("Invalid app_id: " << app_id);
return;
}
@@ -896,31 +913,9 @@ void MessageHelper::SendActivateAppToHMI(
application_manager.GetRPCService().ManageHMICommand(message);
}
-mobile_apis::HMILevel::eType MessageHelper::StringToHMILevel(
- const std::string& hmi_level) {
- using namespace ns_smart_device_link::ns_smart_objects;
- mobile_apis::HMILevel::eType value;
- if (EnumConversionHelper<mobile_apis::HMILevel::eType>::StringToEnum(
- hmi_level, &value)) {
- return value;
- }
- return mobile_apis::HMILevel::INVALID_ENUM;
-}
-
-std::string MessageHelper::StringifiedHMILevel(
- const mobile_apis::HMILevel::eType hmi_level) {
- using namespace ns_smart_device_link::ns_smart_objects;
- const char* str = 0;
- if (EnumConversionHelper<mobile_apis::HMILevel::eType>::EnumToCString(
- hmi_level, &str)) {
- return str;
- }
- return std::string();
-}
-
std::string MessageHelper::StringifiedFunctionID(
mobile_apis::FunctionID::eType function_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace ns_smart_device_link::ns_smart_objects;
const char* str = 0;
if (EnumConversionHelper<mobile_apis::FunctionID::eType>::EnumToCString(
@@ -938,7 +933,7 @@ void MessageHelper::CreateGetVehicleDataRequest(
const uint32_t correlation_id,
const std::vector<std::string>& params,
ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr request =
std::make_shared<smart_objects::SmartObject>();
@@ -955,7 +950,7 @@ void MessageHelper::CreateGetVehicleDataRequest(
smart_objects::SmartObject(smart_objects::SmartType_Map);
for (std::vector<std::string>::const_iterator it = params.begin();
it != params.end();
- it++) {
+ ++it) {
(*request)[strings::msg_params][*it] = true;
}
app_mngr.GetRPCService().ManageHMICommand(request);
@@ -966,7 +961,7 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateBlockedByPoliciesResponse(
mobile_apis::Result::eType result,
const uint32_t correlation_id,
uint32_t connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr response =
std::make_shared<smart_objects::SmartObject>();
@@ -990,7 +985,7 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateDeviceListSO(
const connection_handler::DeviceMap& devices,
const policy::PolicyHandlerInterface& policy_handler,
ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr device_list_so =
std::make_shared<smart_objects::SmartObject>(
smart_objects::SmartType_Map);
@@ -1024,7 +1019,7 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateDeviceListSO(
smart_objects::SmartObjectSPtr MessageHelper::CreateModuleInfoSO(
uint32_t function_id, ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr module_info =
std::make_shared<smart_objects::SmartObject>(
smart_objects::SmartType_Map);
@@ -1040,7 +1035,7 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateModuleInfoSO(
smart_objects::SmartObjectSPtr MessageHelper::CreateSetAppIcon(
const std::string& path_to_icon, uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr set_icon =
std::make_shared<smart_objects::SmartObject>(
smart_objects::SmartType_Map);
@@ -1066,12 +1061,12 @@ void MessageHelper::SendOnButtonSubscriptionNotification(
ApplicationManager& app_mngr) {
using namespace smart_objects;
using namespace hmi_apis;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SmartObjectSPtr notification_ptr =
std::make_shared<SmartObject>(SmartType_Map);
if (!notification_ptr) {
- LOG4CXX_ERROR(logger_, "Memory allocation failed.");
+ SDL_LOG_ERROR("Memory allocation failed.");
return;
}
SmartObject& notification = *notification_ptr;
@@ -1092,7 +1087,7 @@ void MessageHelper::SendOnButtonSubscriptionNotification(
notification[strings::msg_params] = msg_params;
if (!app_mngr.GetRPCService().ManageHMICommand(notification_ptr)) {
- LOG4CXX_ERROR(logger_, "Unable to send HMI notification");
+ SDL_LOG_ERROR("Unable to send HMI notification");
}
}
@@ -1101,15 +1096,14 @@ void MessageHelper::SendAllOnButtonSubscriptionNotificationsForApp(
using namespace smart_objects;
using namespace hmi_apis;
using namespace mobile_apis;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (app.use_count() == 0) {
- LOG4CXX_ERROR(logger_, "Invalid application pointer ");
+ SDL_LOG_ERROR("Invalid application pointer ");
return;
}
- DataAccessor<ButtonSubscriptions> button_accessor = app->SubscribedButtons();
- ButtonSubscriptions subscriptions = button_accessor.GetData();
+ const ButtonSubscriptions subscriptions = app->SubscribedButtons().GetData();
ButtonSubscriptions::iterator it = subscriptions.begin();
for (; subscriptions.end() != it; ++it) {
SendOnButtonSubscriptionNotification(
@@ -1120,6 +1114,61 @@ void MessageHelper::SendAllOnButtonSubscriptionNotificationsForApp(
}
}
+smart_objects::SmartObjectSPtr
+MessageHelper::CreateOnButtonSubscriptionNotification(
+ uint32_t app_id,
+ hmi_apis::Common_ButtonName::eType button,
+ bool is_subscribed) {
+ using namespace smart_objects;
+ using namespace hmi_apis;
+ SDL_LOG_AUTO_TRACE();
+ SmartObjectSPtr notification_ptr =
+ std::make_shared<SmartObject>(SmartType_Map);
+ SmartObject& notification = *notification_ptr;
+ SmartObject msg_params = SmartObject(SmartType_Map);
+ msg_params[strings::app_id] = app_id;
+ msg_params[strings::name] = button;
+ msg_params[strings::is_suscribed] = is_subscribed;
+ notification[strings::params][strings::message_type] =
+ static_cast<int32_t>(application_manager::MessageType::kNotification);
+ notification[strings::params][strings::protocol_version] =
+ commands::CommandImpl::protocol_version_;
+ notification[strings::params][strings::protocol_type] =
+ commands::CommandImpl::hmi_protocol_type_;
+ notification[strings::params][strings::function_id] =
+ hmi_apis::FunctionID::Buttons_OnButtonSubscription;
+ notification[strings::msg_params] = msg_params;
+ return notification_ptr;
+}
+
+smart_objects::SmartObjectList
+MessageHelper::CreateOnButtonSubscriptionNotificationsForApp(
+ ApplicationConstSharedPtr app,
+ ApplicationManager& app_mngr,
+ const ButtonSubscriptions& button_subscriptions) {
+ using namespace smart_objects;
+ using namespace hmi_apis;
+ using namespace mobile_apis;
+ SDL_LOG_AUTO_TRACE();
+
+ SmartObjectList button_subscription_requests;
+
+ if (app.use_count() == 0) {
+ SDL_LOG_ERROR("Invalid application pointer ");
+ return button_subscription_requests;
+ }
+
+ for (auto& it : button_subscriptions) {
+ const Common_ButtonName::eType btn =
+ static_cast<Common_ButtonName::eType>(it);
+
+ button_subscription_requests.push_back(
+ CreateOnButtonSubscriptionNotification(app->hmi_app_id(), btn, true));
+ }
+
+ return button_subscription_requests;
+}
+
void MessageHelper::SendSetAppIcon(
const uint32_t app_id,
const std::string& icon_path,
@@ -1149,7 +1198,7 @@ void MessageHelper::SendSetAppIcon(
void MessageHelper::SendAppDataToHMI(ApplicationConstSharedPtr app,
ApplicationManager& app_man) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (app) {
SendSetAppIcon(app->app_id(), app->app_icon_path(), app_man);
SendGlobalPropertiesToHMI(app, app_man);
@@ -1160,12 +1209,12 @@ void MessageHelper::SendAppDataToHMI(ApplicationConstSharedPtr app,
void MessageHelper::SendGlobalPropertiesToHMI(ApplicationConstSharedPtr app,
ApplicationManager& app_mngr) {
if (app.use_count() == 0) {
- LOG4CXX_ERROR(logger_, "Invalid application");
+ SDL_LOG_ERROR("Invalid application");
return;
}
- smart_objects::SmartObjectList requests = CreateGlobalPropertiesRequestsToHMI(
- app, app_mngr.GetNextHMICorrelationID());
+ smart_objects::SmartObjectList requests =
+ CreateGlobalPropertiesRequestsToHMI(app, app_mngr);
for (smart_objects::SmartObjectList::const_iterator it = requests.begin();
it != requests.end();
++it) {
@@ -1175,12 +1224,12 @@ void MessageHelper::SendGlobalPropertiesToHMI(ApplicationConstSharedPtr app,
smart_objects::SmartObjectList
MessageHelper::CreateGlobalPropertiesRequestsToHMI(
- ApplicationConstSharedPtr app, const uint32_t correlation_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ ApplicationConstSharedPtr app, ApplicationManager& app_mngr) {
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectList requests;
if (app.use_count() == 0) {
- LOG4CXX_ERROR(logger_, "Invalid application");
+ SDL_LOG_ERROR("Invalid application");
return requests;
}
@@ -1196,8 +1245,8 @@ MessageHelper::CreateGlobalPropertiesRequestsToHMI(
// UI global properties
if (can_send_ui && (app->vr_help_title() || app->vr_help())) {
- smart_objects::SmartObjectSPtr ui_global_properties =
- CreateMessageForHMI(hmi_apis::messageType::request, correlation_id);
+ smart_objects::SmartObjectSPtr ui_global_properties = CreateMessageForHMI(
+ hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
if (!ui_global_properties) {
return requests;
}
@@ -1237,6 +1286,7 @@ MessageHelper::CreateGlobalPropertiesRequestsToHMI(
// TTS global properties
if (can_send_vr && (app->help_prompt() || app->timeout_prompt())) {
+ uint32_t correlation_id = app_mngr.GetNextHMICorrelationID();
smart_objects::SmartObjectSPtr tts_global_properties =
CreateMessageForHMI(hmi_apis::messageType::request, correlation_id);
if (!tts_global_properties) {
@@ -1266,7 +1316,7 @@ MessageHelper::CreateGlobalPropertiesRequestsToHMI(
void MessageHelper::SendTTSGlobalProperties(ApplicationSharedPtr app,
bool default_help_prompt,
ApplicationManager& app_man) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!app) {
return;
}
@@ -1316,9 +1366,18 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateAppVrHelp(
return NULL;
}
smart_objects::SmartObject& vr_help = *result;
- vr_help[strings::vr_help_title] = app->name();
+ const smart_objects::SmartObject* vr_help_title = app->vr_help_title();
+ if (vr_help_title) {
+ vr_help[strings::vr_help_title] = vr_help_title->asString();
+ }
int32_t index = 0;
+
+ smart_objects::SmartObject so_vr_help(smart_objects::SmartType_Map);
+ so_vr_help[strings::position] = index + 1;
+ so_vr_help[strings::text] = app->name();
+ vr_help[strings::vr_help][index++] = so_vr_help;
+
if (app->vr_synonyms()) {
smart_objects::SmartObject item(smart_objects::SmartType_Map);
item[strings::text] = (*(app->vr_synonyms())).getElement(0);
@@ -1344,7 +1403,7 @@ smart_objects::SmartObjectList MessageHelper::CreateShowRequestToHMI(
ApplicationConstSharedPtr app, const uint32_t correlation_id) {
smart_objects::SmartObjectList requests;
if (!app) {
- LOG4CXX_ERROR(logger_, "Invalid application");
+ SDL_LOG_ERROR("Invalid application");
return requests;
}
@@ -1395,25 +1454,11 @@ void MessageHelper::SendShowConstantTBTRequestToHMI(
}
}
-void MessageHelper::SendAddCommandRequestToHMI(ApplicationConstSharedPtr app,
- ApplicationManager& app_man) {
- if (!app) {
- return;
- }
- smart_objects::SmartObjectList requests =
- CreateAddCommandRequestToHMI(app, app_man);
- for (smart_objects::SmartObjectList::iterator it = requests.begin();
- it != requests.end();
- ++it) {
- DCHECK(app_man.GetRPCService().ManageHMICommand(*it));
- }
-}
-
smart_objects::SmartObjectList MessageHelper::CreateAddCommandRequestToHMI(
ApplicationConstSharedPtr app, ApplicationManager& app_mngr) {
smart_objects::SmartObjectList requests;
if (!app) {
- LOG4CXX_ERROR(logger_, "Invalid application");
+ SDL_LOG_ERROR("Invalid application");
return requests;
}
@@ -1425,42 +1470,44 @@ smart_objects::SmartObjectList MessageHelper::CreateAddCommandRequestToHMI(
if ((*i->second).keyExists(strings::menu_params)) {
smart_objects::SmartObjectSPtr ui_command = CreateMessageForHMI(
hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
- if (!ui_command) {
- return requests;
- }
+ if (ui_command) {
+ (*ui_command)[strings::params][strings::function_id] =
+ static_cast<int>(hmi_apis::FunctionID::UI_AddCommand);
- (*ui_command)[strings::params][strings::function_id] =
- static_cast<int>(hmi_apis::FunctionID::UI_AddCommand);
+ smart_objects::SmartObject msg_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
- smart_objects::SmartObject msg_params =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
-
- if ((*i->second).keyExists(strings::cmd_id)) {
- msg_params[strings::cmd_id] = (*i->second)[strings::cmd_id].asUInt();
- } else {
- LOG4CXX_ERROR(logger_, "Command ID is missing.");
- continue;
- }
- msg_params[strings::menu_params] = (*i->second)[strings::menu_params];
- msg_params[strings::app_id] = app->app_id();
-
- if (((*i->second).keyExists(strings::cmd_icon)) &&
- (0 < (*i->second)[strings::cmd_icon][strings::value].length())) {
- msg_params[strings::cmd_icon] = (*i->second)[strings::cmd_icon];
- msg_params[strings::cmd_icon][strings::value] =
- (*i->second)[strings::cmd_icon][strings::value].asString();
+ if ((*i->second).keyExists(strings::cmd_id)) {
+ msg_params[strings::cmd_id] = (*i->second)[strings::cmd_id].asUInt();
+ } else {
+ SDL_LOG_ERROR("Command ID is missing.");
+ continue;
+ }
+ msg_params[strings::menu_params] = (*i->second)[strings::menu_params];
+ msg_params[strings::app_id] = app->app_id();
+
+ if (((*i->second).keyExists(strings::cmd_icon)) &&
+ (0 < (*i->second)[strings::cmd_icon][strings::value].length())) {
+ msg_params[strings::cmd_icon] = (*i->second)[strings::cmd_icon];
+ msg_params[strings::cmd_icon][strings::value] =
+ (*i->second)[strings::cmd_icon][strings::value].asString();
+ }
+ (*ui_command)[strings::msg_params] = msg_params;
+ requests.push_back(ui_command);
}
- (*ui_command)[strings::msg_params] = msg_params;
- requests.push_back(ui_command);
}
// VR Interface
if ((*i->second).keyExists(strings::vr_commands) &&
(*i->second).keyExists(strings::cmd_id)) {
- SendAddVRCommandToHMI((*i->second)[strings::cmd_id].asUInt(),
- (*i->second)[strings::vr_commands],
- app->app_id(),
- app_mngr);
+ auto vr_command =
+ CreateAddVRCommandToHMI((*i->second)[strings::cmd_id].asUInt(),
+ (*i->second)[strings::vr_commands],
+ app->app_id(),
+ app_mngr);
+ if (vr_command) {
+ requests.push_back(vr_command);
+ }
}
}
return requests;
@@ -1471,7 +1518,7 @@ MessageHelper::CreateAddVRCommandRequestFromChoiceToHMI(
ApplicationConstSharedPtr app, ApplicationManager& app_mngr) {
smart_objects::SmartObjectList requests;
if (!app) {
- LOG4CXX_ERROR(logger_, "Invalid application");
+ SDL_LOG_ERROR("Invalid application");
return requests;
}
@@ -1498,8 +1545,6 @@ MessageHelper::CreateAddVRCommandRequestFromChoiceToHMI(
msg_params[strings::cmd_id] =
(*(it->second))[strings::choice_set][j][strings::choice_id];
msg_params[strings::vr_commands] =
- smart_objects::SmartObject(smart_objects::SmartType_Array);
- msg_params[strings::vr_commands] =
(*(it->second))[strings::choice_set][j][strings::vr_commands];
msg_params[strings::type] = hmi_apis::Common_VRCommandType::Choice;
msg_params[strings::grammar_id] = choice_grammar_id;
@@ -1541,7 +1586,7 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateChangeRegistration(
void MessageHelper::SendUIChangeRegistrationRequestToHMI(
ApplicationConstSharedPtr app, ApplicationManager& app_mngr) {
if (app.use_count() == 0) {
- LOG4CXX_ERROR(logger_, "Application is not valid");
+ SDL_LOG_ERROR("Application is not valid");
return;
}
@@ -1559,16 +1604,6 @@ void MessageHelper::SendUIChangeRegistrationRequestToHMI(
}
}
-void MessageHelper::SendAddVRCommandToHMI(
- const uint32_t cmd_id,
- const smart_objects::SmartObject& vr_commands,
- const uint32_t app_id,
- ApplicationManager& app_mngr) {
- smart_objects::SmartObjectSPtr request =
- CreateAddVRCommandToHMI(cmd_id, vr_commands, app_id, app_mngr);
- DCHECK(app_mngr.GetRPCService().ManageHMICommand(request));
-}
-
smart_objects::SmartObjectSPtr MessageHelper::CreateAddVRCommandToHMI(
const uint32_t cmd_id,
const smart_objects::SmartObject& vr_commands,
@@ -1605,7 +1640,7 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateUICreateWindowRequestToHMI(
ApplicationSharedPtr application,
ApplicationManager& app_mngr,
const smart_objects::SmartObject& window_info) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto ui_request = CreateMessageForHMI(hmi_apis::messageType::request,
app_mngr.GetNextHMICorrelationID());
@@ -1634,7 +1669,34 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateUICreateWindowRequestToHMI(
window_info[strings::duplicate_updates_from_window_id].asInt();
}
- msg_params[strings::app_id] = application->hmi_app_id();
+ msg_params[strings::app_id] = application->app_id();
+
+ (*ui_request)[strings::msg_params] = msg_params;
+
+ return ui_request;
+}
+
+smart_objects::SmartObjectSPtr MessageHelper::CreateUIDeleteWindowRequestToHMI(
+ ApplicationSharedPtr application,
+ ApplicationManager& app_mngr,
+ const WindowID window_id) {
+ SDL_LOG_AUTO_TRACE();
+ auto ui_request = CreateMessageForHMI(hmi_apis::messageType::request,
+ app_mngr.GetNextHMICorrelationID());
+
+ (*ui_request)[strings::params][strings::function_id] =
+ static_cast<int>(hmi_apis::FunctionID::UI_DeleteWindow);
+
+ (*ui_request)[strings::correlation_id] =
+ (*ui_request)[strings::params][strings::correlation_id];
+ (*ui_request)[strings::function_id] =
+ (*ui_request)[strings::params][strings::function_id];
+
+ smart_objects::SmartObject msg_params(
+ smart_objects::SmartObject(smart_objects::SmartType_Map));
+
+ msg_params[strings::window_id] = window_id;
+ msg_params[strings::app_id] = application->app_id();
(*ui_request)[strings::msg_params] = msg_params;
@@ -1676,8 +1738,7 @@ bool MessageHelper::CreateDeviceInfo(
if (-1 ==
session_observer.GetDataOnDeviceID(
device_handle, &device_name, NULL, &mac_address, &transport_type)) {
- LOG4CXX_ERROR(logger_,
- "Failed to extract information for device " << device_handle);
+ SDL_LOG_ERROR("Failed to extract information for device " << device_handle);
}
smart_objects::SmartObject& device_info_map = *output;
@@ -1707,7 +1768,7 @@ bool MessageHelper::CreateHMIApplicationStruct(
SmartObject& message = *output;
if (!app) {
- LOG4CXX_WARN(logger_, "Application is not valid");
+ SDL_LOG_WARN("Application is not valid");
return false;
}
@@ -1831,12 +1892,12 @@ bool MessageHelper::CreateHMIApplicationStruct(
void MessageHelper::SendAddSubMenuRequestToHMI(ApplicationConstSharedPtr app,
ApplicationManager& app_mngr) {
if (app.use_count() == 0) {
- LOG4CXX_ERROR(logger_, "Invalid application");
+ SDL_LOG_ERROR("Invalid application");
return;
}
smart_objects::SmartObjectList requests =
- CreateAddSubMenuRequestToHMI(app, app_mngr.GetNextHMICorrelationID());
+ CreateAddSubMenuRequestsToHMI(app, app_mngr);
for (smart_objects::SmartObjectList::iterator it = requests.begin();
it != requests.end();
++it) {
@@ -1844,15 +1905,15 @@ void MessageHelper::SendAddSubMenuRequestToHMI(ApplicationConstSharedPtr app,
}
}
-smart_objects::SmartObjectList MessageHelper::CreateAddSubMenuRequestToHMI(
- ApplicationConstSharedPtr app, const uint32_t correlation_id) {
+smart_objects::SmartObjectList MessageHelper::CreateAddSubMenuRequestsToHMI(
+ ApplicationConstSharedPtr app, ApplicationManager& app_mngr) {
smart_objects::SmartObjectList requsets;
const DataAccessor<SubMenuMap> accessor = app->sub_menu_map();
const SubMenuMap& sub_menu = accessor.GetData();
SubMenuMap::const_iterator i = sub_menu.begin();
for (; sub_menu.end() != i; ++i) {
- smart_objects::SmartObjectSPtr ui_sub_menu =
- CreateMessageForHMI(hmi_apis::messageType::request, correlation_id);
+ smart_objects::SmartObjectSPtr ui_sub_menu = CreateMessageForHMI(
+ hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
if (!ui_sub_menu) {
return requsets;
}
@@ -1868,6 +1929,10 @@ smart_objects::SmartObjectList MessageHelper::CreateAddSubMenuRequestToHMI(
(*i->second)[strings::position];
msg_params[strings::menu_params][strings::menu_name] =
(*i->second)[strings::menu_name];
+ if ((*i->second).keyExists(strings::parent_id)) {
+ msg_params[strings::menu_params][strings::parent_id] =
+ (*i->second)[strings::parent_id];
+ }
msg_params[strings::app_id] = app->app_id();
(*ui_sub_menu)[strings::msg_params] = msg_params;
if (((*i->second).keyExists(strings::menu_icon)) &&
@@ -1908,7 +1973,7 @@ void MessageHelper::SendOnAppUnregNotificationToHMI(
smart_objects::SmartObjectSPtr
MessageHelper::CreateOnAppPropertiesChangeNotification(
const std::string& policy_app_id, ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr notification =
std::make_shared<smart_objects::SmartObject>(
smart_objects::SmartType_Map);
@@ -1964,8 +2029,7 @@ smart_objects::SmartObjectSPtr MessageHelper::GetBCActivateAppRequestToHMI(
ApplicationManager& app_mngr) {
DCHECK_OR_RETURN(app, smart_objects::SmartObjectSPtr());
if (hmi_apis::Common_HMILevel::NONE == level) {
- LOG4CXX_WARN(logger_,
- "BC.ActivateApp cannot be used to deactivate an application");
+ SDL_LOG_WARN("BC.ActivateApp cannot be used to deactivate an application");
return NULL;
}
@@ -2023,11 +2087,11 @@ smart_objects::SmartObjectSPtr MessageHelper::GetBCCloseApplicationRequestToHMI(
void MessageHelper::SendOnResumeAudioSourceToHMI(const uint32_t app_id,
ApplicationManager& app_mngr) {
- LOG4CXX_WARN(logger_, "SendOnResumeAudioSourceToHMI app_id: " << app_id);
+ SDL_LOG_WARN("SendOnResumeAudioSourceToHMI app_id: " << app_id);
application_manager::ApplicationConstSharedPtr app =
app_mngr.application(app_id);
if (!app) {
- LOG4CXX_WARN(logger_, "Invalid app_id: " << app_id);
+ SDL_LOG_WARN("Invalid app_id: " << app_id);
return;
}
@@ -2138,7 +2202,7 @@ void MessageHelper::SendGetUserFriendlyMessageResponse(
const std::vector<policy::UserFriendlyMessage>& msg,
const uint32_t correlation_id,
ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr message =
std::make_shared<smart_objects::SmartObject>(
smart_objects::SmartType_Map);
@@ -2297,13 +2361,58 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateNegativeResponse(
return std::make_shared<smart_objects::SmartObject>(response_data);
}
+smart_objects::SmartObjectSPtr MessageHelper::CreateNegativeResponseFromHmi(
+ const int32_t function_id,
+ const uint32_t correlation_id,
+ const int32_t result_code,
+ const std::string& info) {
+ smart_objects::SmartObjectSPtr message =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+
+ (*message)[strings::params][strings::function_id] = function_id;
+ (*message)[strings::params][strings::protocol_type] =
+ commands::CommandImpl::hmi_protocol_type_;
+ (*message)[strings::params][strings::protocol_version] =
+ commands::CommandImpl::protocol_version_;
+ (*message)[strings::params][strings::correlation_id] = correlation_id;
+
+ (*message)[strings::params][strings::message_type] =
+ MessageType::kErrorResponse;
+ (*message)[strings::params][hmi_response::code] = result_code;
+ (*message)[strings::params][strings::error_msg] = info;
+
+ return message;
+}
+
+smart_objects::SmartObjectSPtr MessageHelper::CreateResponseMessageFromHmi(
+ const int32_t function_id,
+ const uint32_t correlation_id,
+ const int32_t result_code) {
+ smart_objects::SmartObject params(smart_objects::SmartType_Map);
+ params[strings::function_id] = function_id;
+ params[strings::message_type] = MessageType::kResponse;
+ params[strings::correlation_id] = correlation_id;
+ params[strings::protocol_type] = commands::CommandImpl::hmi_protocol_type_;
+ params[hmi_response::code] = result_code;
+
+ smart_objects::SmartObjectSPtr response =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+ auto& message = *response;
+ message[strings::params] = params;
+ message[strings::msg_params] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ return response;
+}
+
smart_objects::SmartObjectSPtr MessageHelper::CreateOnServiceUpdateNotification(
const hmi_apis::Common_ServiceType::eType service_type,
const hmi_apis::Common_ServiceEvent::eType service_event,
const hmi_apis::Common_ServiceStatusUpdateReason::eType
service_update_reason,
const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto notification = MessageHelper::CreateHMINotification(
hmi_apis::FunctionID::BasicCommunication_OnServiceUpdate);
@@ -2329,7 +2438,7 @@ void MessageHelper::SendNaviSetVideoConfig(
int32_t app_id,
ApplicationManager& app_mngr,
const smart_objects::SmartObject& video_params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr request = CreateMessageForHMI(
hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
if (!request) {
@@ -2347,7 +2456,7 @@ void MessageHelper::SendNaviSetVideoConfig(
void MessageHelper::SendNaviStartStream(const int32_t app_id,
ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr start_stream = CreateMessageForHMI(
hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
if (!start_stream) {
@@ -2357,25 +2466,20 @@ void MessageHelper::SendNaviStartStream(const int32_t app_id,
(*start_stream)[strings::params][strings::function_id] =
hmi_apis::FunctionID::Navigation_StartStream;
- char url[100] = {'\0'};
+ std::string url;
if ("socket" == app_mngr.get_settings().video_server_type()) {
- snprintf(url,
- sizeof(url) / sizeof(url[0]),
- "http://%s:%d",
- app_mngr.get_settings().server_address().c_str(),
- app_mngr.get_settings().video_streaming_port());
+ auto const port = app_mngr.get_settings().video_streaming_port();
+ url = "http://";
+ url += app_mngr.get_settings().server_address();
+ url += ":";
+ url += std::to_string(port);
} else if ("pipe" == app_mngr.get_settings().video_server_type()) {
- snprintf(url,
- sizeof(url) / sizeof(url[0]),
- "%s",
- app_mngr.get_settings().named_video_pipe_path().c_str());
+ url.reserve(PATH_MAX);
+ url.insert(
+ 0, app_mngr.get_settings().named_video_pipe_path(), 0, PATH_MAX - 1);
} else {
- int snprintf_result =
- snprintf(url,
- sizeof(url) / sizeof(url[0]),
- "%s",
- app_mngr.get_settings().video_stream_file().c_str());
- DCHECK(snprintf_result);
+ url.reserve(PATH_MAX);
+ url.insert(0, app_mngr.get_settings().video_stream_file(), 0, PATH_MAX - 1);
}
(*start_stream)[strings::msg_params][strings::app_id] = app_id;
@@ -2386,7 +2490,7 @@ void MessageHelper::SendNaviStartStream(const int32_t app_id,
void MessageHelper::SendNaviStopStream(const int32_t app_id,
ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr stop_stream = CreateMessageForHMI(
hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
if (!stop_stream) {
@@ -2403,7 +2507,7 @@ void MessageHelper::SendNaviStopStream(const int32_t app_id,
void MessageHelper::SendAudioStartStream(const int32_t app_id,
ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr start_stream = CreateMessageForHMI(
hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
@@ -2414,25 +2518,20 @@ void MessageHelper::SendAudioStartStream(const int32_t app_id,
(*start_stream)[strings::params][strings::function_id] =
hmi_apis::FunctionID::Navigation_StartAudioStream;
- char url[100] = {'\0'};
+ std::string url;
if ("socket" == app_mngr.get_settings().audio_server_type()) {
- snprintf(url,
- sizeof(url) / sizeof(url[0]),
- "http://%s:%d",
- app_mngr.get_settings().server_address().c_str(),
- app_mngr.get_settings().audio_streaming_port());
+ auto const port = app_mngr.get_settings().audio_streaming_port();
+ url = "http://";
+ url += app_mngr.get_settings().server_address();
+ url += ":";
+ url += std::to_string(port);
} else if ("pipe" == app_mngr.get_settings().audio_server_type()) {
- snprintf(url,
- sizeof(url) / sizeof(url[0]),
- "%s",
- app_mngr.get_settings().named_audio_pipe_path().c_str());
+ url.reserve(PATH_MAX);
+ url.insert(
+ 0, app_mngr.get_settings().named_audio_pipe_path(), 0, PATH_MAX - 1);
} else {
- int snprintf_result =
- snprintf(url,
- sizeof(url) / sizeof(url[0]),
- "%s",
- app_mngr.get_settings().audio_stream_file().c_str());
- DCHECK(snprintf_result);
+ url.reserve(PATH_MAX);
+ url.insert(0, app_mngr.get_settings().audio_stream_file(), 0, PATH_MAX - 1);
}
(*start_stream)[strings::msg_params][strings::app_id] = app_id;
@@ -2443,7 +2542,7 @@ void MessageHelper::SendAudioStartStream(const int32_t app_id,
void MessageHelper::SendAudioStopStream(const int32_t app_id,
ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr stop_stream = CreateMessageForHMI(
hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
@@ -2492,7 +2591,7 @@ void MessageHelper::SendOnDataStreaming(
}
bool MessageHelper::SendStopAudioPathThru(ApplicationManager& app_mngr) {
- LOG4CXX_INFO(logger_, "MessageHelper::SendAudioStopAudioPathThru");
+ SDL_LOG_INFO("MessageHelper::SendAudioStopAudioPathThru");
smart_objects::SmartObjectSPtr result = CreateMessageForHMI(
hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
@@ -2503,16 +2602,43 @@ bool MessageHelper::SendStopAudioPathThru(ApplicationManager& app_mngr) {
return app_mngr.GetRPCService().ManageHMICommand(result);
}
-bool MessageHelper::SendUnsubscribedWayPoints(ApplicationManager& app_mngr) {
- LOG4CXX_INFO(logger_, "MessageHelper::SendUnsubscribedWayPoints");
+smart_objects::SmartObjectSPtr MessageHelper::CreateUnsubscribeWayPointsRequest(
+ const uint32_t correlation_id) {
+ SDL_LOG_INFO("MessageHelper::CreateUnsubscribeWayPointsRequest");
- smart_objects::SmartObjectSPtr result = CreateMessageForHMI(
- hmi_apis::messageType::request, app_mngr.GetNextHMICorrelationID());
+ smart_objects::SmartObjectSPtr result =
+ CreateMessageForHMI(hmi_apis::messageType::request, correlation_id);
(*result)[strings::params][strings::function_id] =
hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints;
+ return result;
+}
- return app_mngr.GetRPCService().ManageHMICommand(result);
+void MessageHelper::SendPolicySnapshotNotification(
+ uint32_t connection_key,
+ const std::string& snapshot_file_path,
+ const std::string& url,
+ ApplicationManager& app_mngr) {
+ SDL_LOG_AUTO_TRACE();
+ smart_objects::SmartObject content(smart_objects::SmartType_Map);
+ const auto request_type =
+#if defined(PROPRIETARY_MODE) || defined(EXTERNAL_PROPRIETARY_MODE)
+ mobile_apis::RequestType::PROPRIETARY;
+#else
+ mobile_apis::RequestType::HTTP;
+#endif // PROPRIETARY || EXTERNAL_PROPRIETARY_MODE
+
+ content[strings::msg_params][strings::request_type] = request_type;
+
+ if (!url.empty()) {
+ content[strings::msg_params][strings::url] = url;
+ } else {
+ SDL_LOG_WARN("No service URLs");
+ }
+
+ content[strings::msg_params][strings::file_name] = snapshot_file_path;
+
+ SendSystemRequestNotification(connection_key, content, app_mngr);
}
void MessageHelper::SendPolicySnapshotNotification(
@@ -2534,7 +2660,7 @@ void MessageHelper::SendPolicySnapshotNotification(
content[strings::msg_params][strings::url] =
url; // Doesn't work with mobile_notification::syncp_url ("URL")
} else {
- LOG4CXX_WARN(logger_, "No service URLs");
+ SDL_LOG_WARN("No service URLs");
}
content[strings::params][strings::binary_data] =
@@ -2558,9 +2684,9 @@ void MessageHelper::SendSystemRequestNotification(
content[strings::params][strings::connection_key] = connection_key;
PrintSmartObject(content);
- DCHECK(app_mngr.GetRPCService().ManageMobileCommand(
+ app_mngr.GetRPCService().ManageMobileCommand(
std::make_shared<smart_objects::SmartObject>(content),
- commands::Command::SOURCE_SDL));
+ commands::Command::SOURCE_SDL);
}
void MessageHelper::SendLaunchApp(const uint32_t connection_key,
@@ -2622,7 +2748,7 @@ void MessageHelper::SendOnPermissionsChangeNotification(
const policy::Permissions& permissions,
ApplicationManager& app_mngr,
const policy::EncryptionRequired encryprion_required) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject content(smart_objects::SmartType_Map);
content[strings::params][strings::function_id] =
@@ -2900,7 +3026,7 @@ void MessageHelper::SendUpdateSDLResponse(const std::string& result,
void MessageHelper::SendOnStatusUpdate(const std::string& status,
ApplicationManager& app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr message =
std::make_shared<smart_objects::SmartObject>(
smart_objects::SmartType_Map);
@@ -2913,7 +3039,7 @@ void MessageHelper::SendOnStatusUpdate(const std::string& status,
(*message)[strings::params][strings::message_type] =
MessageType::kNotification;
- LOG4CXX_DEBUG(logger_, "Sending new status:" << status);
+ SDL_LOG_DEBUG("Sending new status:" << status);
(*message)[strings::msg_params]["status"] = status;
app_mngr.GetRPCService().ManageHMICommand(message);
@@ -2942,7 +3068,7 @@ mobile_apis::Result::eType MessageHelper::VerifyImageFiles(
mobile_apis::Result::eType res =
VerifyImageFiles(message[i], app, app_mngr);
if (mobile_apis::Result::SUCCESS != res) {
- LOG4CXX_DEBUG(logger_, "VerifyImageFiles result:" << res);
+ SDL_LOG_DEBUG("VerifyImageFiles result:" << res);
return res;
}
}
@@ -2953,8 +3079,7 @@ mobile_apis::Result::eType MessageHelper::VerifyImageFiles(
VerifyImage(message, app, app_mngr);
if (mobile_apis::Result::SUCCESS != verification_result) {
- LOG4CXX_DEBUG(logger_,
- "VerifyImageFiles result:" << verification_result);
+ SDL_LOG_DEBUG("VerifyImageFiles result:" << verification_result);
return verification_result; // exit point
}
} else {
@@ -2967,7 +3092,7 @@ mobile_apis::Result::eType MessageHelper::VerifyImageFiles(
mobile_apis::Result::eType res =
VerifyImageFiles(message[*key], app, app_mngr);
if (mobile_apis::Result::SUCCESS != res) {
- LOG4CXX_DEBUG(logger_, "VerifyImageFiles result:" << res);
+ SDL_LOG_DEBUG("VerifyImageFiles result:" << res);
return res;
}
}
@@ -3127,9 +3252,9 @@ bool MessageHelper::VerifyString(const std::string& str) {
(std::string::npos != str.find("\\n")) ||
(std::string::npos != str.find("\\t")) ||
(std::string::npos == str.find_first_not_of(' '))) {
- LOG4CXX_ERROR(logger_,
- "MessageHelper::VerifyString"
- "string contains incorrect character");
+ SDL_LOG_ERROR(
+ "MessageHelper::VerifyString"
+ "string contains incorrect character");
return false;
}
return true;
@@ -3221,10 +3346,7 @@ mobile_apis::Result::eType MessageHelper::ProcessSoftButtons(
}
break;
}
- default: {
- continue;
- break;
- }
+ default: { continue; }
}
soft_buttons[j++] = request_soft_buttons[i];
@@ -3259,7 +3381,7 @@ void MessageHelper::SubscribeApplicationToSoftButton(
smart_objects::SmartObject& message_params,
ApplicationSharedPtr app,
int32_t function_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SubscribeApplicationToSoftButton(
message_params,
app,
@@ -3272,7 +3394,7 @@ bool MessageHelper::PrintSmartObject(const smart_objects::SmartObject& object) {
Json::Value tmp;
namespace Formatters = ns_smart_device_link::ns_json_handler::formatters;
Formatters::CFormatterJsonBase::objToJsonValue(object, tmp);
- LOG4CXX_DEBUG(logger_, "SMART OBJECT: " << tmp.toStyledString());
+ SDL_LOG_DEBUG("SMART OBJECT: " << tmp.toStyledString());
#endif
return true;
}
diff --git a/src/components/application_manager/src/mobile_message_handler.cc b/src/components/application_manager/src/mobile_message_handler.cc
index d3e7c782f7..a9c0a362be 100644
--- a/src/components/application_manager/src/mobile_message_handler.cc
+++ b/src/components/application_manager/src/mobile_message_handler.cc
@@ -59,7 +59,7 @@ MessageTypeMap message_types = {std::make_pair(kRequest, "Request"),
std::make_pair(kResponse, "Response"),
std::make_pair(kNotification, "Notification")};
} // namespace
-CREATE_LOGGERPTR_GLOBAL(logger_, "ApplicationManager")
+SDL_CREATE_LOG_VARIABLE("ApplicationManager")
application_manager::Message*
MobileMessageHandler::HandleIncomingMessageProtocol(
@@ -68,41 +68,40 @@ MobileMessageHandler::HandleIncomingMessageProtocol(
application_manager::Message* out_message = NULL;
switch (message->protocol_version()) {
case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_1:
- LOG4CXX_DEBUG(logger_, "Protocol version - V1");
+ SDL_LOG_DEBUG("Protocol version - V1");
out_message =
MobileMessageHandler::HandleIncomingMessageProtocolV1(message);
break;
case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_2:
- LOG4CXX_DEBUG(logger_, "Protocol version - V2");
+ SDL_LOG_DEBUG("Protocol version - V2");
out_message =
MobileMessageHandler::HandleIncomingMessageProtocolV2(message);
break;
case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_3:
- LOG4CXX_DEBUG(logger_, "Protocol version - V3");
+ SDL_LOG_DEBUG("Protocol version - V3");
out_message =
MobileMessageHandler::HandleIncomingMessageProtocolV2(message);
break;
case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_4:
- LOG4CXX_DEBUG(logger_, "Protocol version - V4");
+ SDL_LOG_DEBUG("Protocol version - V4");
out_message =
MobileMessageHandler::HandleIncomingMessageProtocolV2(message);
break;
case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5:
- LOG4CXX_DEBUG(logger_, "Protocol version - V5");
+ SDL_LOG_DEBUG("Protocol version - V5");
out_message =
MobileMessageHandler::HandleIncomingMessageProtocolV2(message);
break;
default:
- LOG4CXX_WARN(logger_, "Can't recognise protocol version");
+ SDL_LOG_WARN("Can't recognise protocol version");
out_message = NULL;
break;
}
if (out_message == NULL) {
- LOG4CXX_WARN(logger_, "Message is NULL");
+ SDL_LOG_WARN("Message is NULL");
return NULL;
}
- LOG4CXX_DEBUG(logger_,
- "Incoming RPC_INFO: " << (out_message->connection_key() >> 16)
+ SDL_LOG_DEBUG("Incoming RPC_INFO: " << (out_message->connection_key() >> 16)
<< ", "
<< message_types[out_message->type()]
<< ", " << out_message->function_id()
@@ -114,8 +113,7 @@ MobileMessageHandler::HandleIncomingMessageProtocol(
protocol_handler::RawMessage*
MobileMessageHandler::HandleOutgoingMessageProtocol(
const MobileMessage& message) {
- LOG4CXX_DEBUG(logger_,
- "Outgoing RPC_INFO: " << (message->connection_key() >> 16)
+ SDL_LOG_DEBUG("Outgoing RPC_INFO: " << (message->connection_key() >> 16)
<< ", " << message_types[message->type()]
<< ", " << message->function_id() << ", "
<< message->correlation_id() << ", "
@@ -136,7 +134,7 @@ MobileMessageHandler::HandleOutgoingMessageProtocol(
application_manager::Message*
MobileMessageHandler::HandleIncomingMessageProtocolV1(
const ::protocol_handler::RawMessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
application_manager::Message* outgoing_message =
new application_manager::Message(
protocol_handler::MessagePriority::FromServiceType(
@@ -165,7 +163,7 @@ MobileMessageHandler::HandleIncomingMessageProtocolV1(
application_manager::Message*
MobileMessageHandler::HandleIncomingMessageProtocolV2(
const ::protocol_handler::RawMessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::BitStream message_bytestream(message->data(), message->data_size());
protocol_handler::ProtocolPayloadV2 payload;
protocol_handler::Extract(
@@ -173,8 +171,7 @@ MobileMessageHandler::HandleIncomingMessageProtocolV2(
// Silently drop message if it wasn't parsed correctly
if (message_bytestream.IsBad()) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Drop ill-formed message from mobile, partially parsed: " << payload);
return NULL;
}
@@ -207,10 +204,10 @@ MobileMessageHandler::HandleIncomingMessageProtocolV2(
protocol_handler::RawMessage*
MobileMessageHandler::HandleOutgoingMessageProtocolV1(
const MobileMessage& message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::string message_string = message->json_message();
if (message_string.length() == 0) {
- LOG4CXX_WARN(logger_, "Drop ill-formed message from mobile");
+ SDL_LOG_WARN("Drop ill-formed message from mobile");
return NULL;
}
@@ -230,9 +227,9 @@ MobileMessageHandler::HandleOutgoingMessageProtocolV1(
protocol_handler::RawMessage*
MobileMessageHandler::HandleOutgoingMessageProtocolV2(
const MobileMessage& message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (message->json_message().length() == 0) {
- LOG4CXX_ERROR(logger_, "json string is empty.");
+ SDL_LOG_ERROR("json string is empty.");
}
uint32_t json_size = message->json_message().length();
uint32_t binary_size = 0;
diff --git a/src/components/application_manager/src/plugin_manager/rpc_plugin_manager_impl.cc b/src/components/application_manager/src/plugin_manager/rpc_plugin_manager_impl.cc
index 9214a30513..0276e59b7d 100644
--- a/src/components/application_manager/src/plugin_manager/rpc_plugin_manager_impl.cc
+++ b/src/components/application_manager/src/plugin_manager/rpc_plugin_manager_impl.cc
@@ -2,11 +2,12 @@
#include "application_manager/plugin_manager/rpc_plugin_manager_impl.h"
#include "utils/file_system.h"
+#include "utils/ilogger.h"
namespace application_manager {
namespace plugin_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "PluginManager")
+SDL_CREATE_LOG_VARIABLE("PluginManager")
RPCPluginManagerImpl::RPCPluginManagerImpl(
ApplicationManager& app_manager,
@@ -37,7 +38,7 @@ T GetFuncFromLib(void* dl_handle, const std::string& function_name) {
reinterpret_cast<T>(dlsym(dl_handle, function_name.c_str()));
char* error_string = dlerror();
if (nullptr != error_string) {
- LOG4CXX_ERROR(logger_, "Failed to export symbols : " << error_string);
+ SDL_LOG_ERROR("Failed to export symbols : " << error_string);
return nullptr;
}
return exported_func;
@@ -46,22 +47,21 @@ T GetFuncFromLib(void* dl_handle, const std::string& function_name) {
RPCPluginManagerImpl::RPCPluginPtr RPCPluginManagerImpl::LoadPlugin(
const std::string& full_plugin_path) const {
if (!IsLibraryFile(full_plugin_path)) {
- LOG4CXX_DEBUG(logger_, "Skip loading " << full_plugin_path);
+ SDL_LOG_DEBUG("Skip loading " << full_plugin_path);
return RPCPluginPtr(nullptr, [](RPCPlugin*) {});
}
void* plugin_dll = dlopen(full_plugin_path.c_str(), RTLD_LAZY);
if (nullptr == plugin_dll) {
- LOG4CXX_ERROR(
- logger_,
- "Failed to open dll " << full_plugin_path << " : " << dlerror());
+ SDL_LOG_ERROR("Failed to open dll " << full_plugin_path << " : "
+ << dlerror());
return RPCPluginPtr(nullptr, [](RPCPlugin*) {});
}
- typedef RPCPlugin* (*Create)();
+ typedef RPCPlugin* (*Create)(logger::Logger*);
Create create_plugin = GetFuncFromLib<Create>(plugin_dll, "Create");
if (!create_plugin) {
- LOG4CXX_ERROR(logger_, "No Create function in " << full_plugin_path);
+ SDL_LOG_ERROR("No Create function in " << full_plugin_path);
dlclose(plugin_dll);
return RPCPluginPtr(nullptr, [](RPCPlugin*) {});
}
@@ -69,23 +69,23 @@ RPCPluginManagerImpl::RPCPluginPtr RPCPluginManagerImpl::LoadPlugin(
typedef void (*Delete)(RPCPlugin*);
Delete delete_plugin = GetFuncFromLib<Delete>(plugin_dll, "Delete");
if (!delete_plugin) {
- LOG4CXX_ERROR(logger_, "No Delete function in " << full_plugin_path);
+ SDL_LOG_ERROR("No Delete function in " << full_plugin_path);
dlclose(plugin_dll);
return RPCPluginPtr(nullptr, [](RPCPlugin*) {});
}
auto plugin_destroyer = [delete_plugin, plugin_dll](RPCPlugin* plugin) {
- LOG4CXX_DEBUG(logger_, "Delete plugin " << plugin->PluginName());
+ SDL_LOG_DEBUG("Delete plugin " << plugin->PluginName());
delete_plugin(plugin);
dlclose(plugin_dll);
return RPCPluginPtr(nullptr, [](RPCPlugin*) {});
};
- RPCPlugin* plugin = create_plugin();
+ RPCPlugin* plugin = create_plugin(&logger::Logger::instance());
return RPCPluginPtr(plugin, plugin_destroyer);
}
uint32_t RPCPluginManagerImpl::LoadPlugins(const std::string& plugins_path) {
- LOG4CXX_INFO(logger_, "Loading plugins from " << plugins_path);
+ SDL_LOG_INFO("Loading plugins from " << plugins_path);
std::vector<std::string> plugin_files = file_system::ListFiles(plugins_path);
for (auto& plugin_file : plugin_files) {
std::string full_name = plugins_path + '/' + plugin_file;
@@ -93,9 +93,8 @@ uint32_t RPCPluginManagerImpl::LoadPlugins(const std::string& plugins_path) {
if (!plugin) {
continue;
}
- LOG4CXX_DEBUG(
- logger_,
- "Loaded " << plugin->PluginName() << " plugin from " << full_name);
+ SDL_LOG_DEBUG("Loaded " << plugin->PluginName() << " plugin from "
+ << full_name);
if (plugin->Init(app_manager_,
rpc_service_,
hmi_capabilities_,
@@ -103,8 +102,7 @@ uint32_t RPCPluginManagerImpl::LoadPlugins(const std::string& plugins_path) {
last_state_)) {
loaded_plugins_.push_back(std::move(plugin));
} else {
- LOG4CXX_ERROR(logger_,
- "Initialisation of " << plugin->PluginName()
+ SDL_LOG_ERROR("Initialisation of " << plugin->PluginName()
<< " plugin from " << full_name
<< " failed");
}
diff --git a/src/components/application_manager/src/policies/delegates/app_permission_delegate.cc b/src/components/application_manager/src/policies/delegates/app_permission_delegate.cc
index 871e96442a..b5c329fdd2 100644
--- a/src/components/application_manager/src/policies/delegates/app_permission_delegate.cc
+++ b/src/components/application_manager/src/policies/delegates/app_permission_delegate.cc
@@ -34,7 +34,7 @@
#include "application_manager/application_manager.h"
namespace policy {
-CREATE_LOGGERPTR_GLOBAL(logger_, "PolicyHandler")
+SDL_CREATE_LOG_VARIABLE("PolicyHandler")
#ifdef EXTERNAL_PROPRIETARY_MODE
AppPermissionDelegate::AppPermissionDelegate(
@@ -57,7 +57,7 @@ AppPermissionDelegate::AppPermissionDelegate(
#endif
void AppPermissionDelegate::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
#ifdef EXTERNAL_PROPRIETARY_MODE
policy_handler_.OnAppPermissionConsentInternal(
diff --git a/src/components/application_manager/src/policies/delegates/statistics_delegate.cc b/src/components/application_manager/src/policies/delegates/statistics_delegate.cc
index e668be4ed1..3b662ed201 100644
--- a/src/components/application_manager/src/policies/delegates/statistics_delegate.cc
+++ b/src/components/application_manager/src/policies/delegates/statistics_delegate.cc
@@ -33,7 +33,7 @@
#include "application_manager/policies/delegates/statistics_delegate.h"
#include "application_manager/policies/policy_handler.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "PolicyHandler")
+SDL_CREATE_LOG_VARIABLE("PolicyHandler")
namespace policy {
StatisticsDelegate::StatisticsDelegate(PolicyHandler& policy_handler,
usage_statistics::GlobalCounterId type)
@@ -89,7 +89,7 @@ StatisticsDelegate::StatisticsDelegate(PolicyHandler& policy_handler,
, policy_handler_(policy_handler) {}
void StatisticsDelegate::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
switch (type_) {
case INCREMENT_GLOBAL:
policy_handler_.Increment(global_counter_);
@@ -104,7 +104,7 @@ void StatisticsDelegate::threadMain() {
policy_handler_.Add(app_id_, stop_watch_, timespan_seconds_);
break;
default:
- LOG4CXX_ERROR(logger_, "Unknown statistics operator");
+ SDL_LOG_ERROR("Unknown statistics operator");
break;
}
}
diff --git a/src/components/application_manager/src/policies/policy_event_observer.cc b/src/components/application_manager/src/policies/policy_event_observer.cc
index 7ca4d7b5b8..af44fd033f 100644
--- a/src/components/application_manager/src/policies/policy_event_observer.cc
+++ b/src/components/application_manager/src/policies/policy_event_observer.cc
@@ -40,7 +40,7 @@ namespace policy {
using namespace application_manager;
class PolicyHandler;
-CREATE_LOGGERPTR_GLOBAL(logger_, "PolicyHandler")
+SDL_CREATE_LOG_VARIABLE("PolicyHandler")
PolicyEventObserver::PolicyEventObserver(
policy::PolicyHandlerInterface* const policy_handler,
@@ -49,9 +49,9 @@ PolicyEventObserver::PolicyEventObserver(
void PolicyEventObserver::set_policy_handler(
PolicyHandlerInterface* const policy_handler) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(policy_handler_lock_);
- LOG4CXX_DEBUG(logger_, "Set policy handler " << policy_handler);
+ SDL_LOG_DEBUG("Set policy handler " << policy_handler);
policy_handler_ = policy_handler;
}
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc
index 11decf45c3..b61a75d7de 100644
--- a/src/components/application_manager/src/policies/policy_handler.cc
+++ b/src/components/application_manager/src/policies/policy_handler.cc
@@ -30,12 +30,14 @@
POSSIBILITY OF SUCH DAMAGE.
*/
#include "application_manager/policies/policy_handler.h"
+
#include <dlfcn.h>
#include <unistd.h>
#include <algorithm>
#include <functional>
#include <utility>
#include <vector>
+
#include "application_manager/application_manager.h"
#include "application_manager/message_helper.h"
#include "application_manager/policies/delegates/app_permission_delegate.h"
@@ -66,7 +68,7 @@ namespace policy {
using namespace application_manager;
-CREATE_LOGGERPTR_GLOBAL(logger_, "PolicyHandler")
+SDL_CREATE_LOG_VARIABLE("PolicyHandler")
namespace {
using namespace mobile_apis;
@@ -108,7 +110,6 @@ const std::string RequestTypeToString(mobile_apis::RequestType::eType type) {
const policy::DeviceParams GetDeviceParams(
connection_handler::DeviceHandle device_handle,
const protocol_handler::SessionObserver& session_observer) {
- CREATE_LOGGERPTR_LOCAL(logger_, "PolicyHandler");
policy::DeviceParams device_params;
if (-1 == session_observer.GetDataOnDeviceID(
device_handle,
@@ -116,8 +117,7 @@ const policy::DeviceParams GetDeviceParams(
NULL,
&device_params.device_mac_address,
&device_params.device_connection_type)) {
- LOG4CXX_ERROR(logger_,
- "Failed to extract information for device " << device_handle);
+ SDL_LOG_ERROR("Failed to extract information for device " << device_handle);
}
device_params.device_handle = device_handle;
return device_params;
@@ -139,24 +139,27 @@ struct HMILevelPredicate
mobile_api::HMILevel::eType level_;
};
+constexpr char kLibraryNotLoadedMessage[] =
+ "The shared library of policy is not loaded";
+
} // namespace
-#define POLICY_LIB_CHECK_OR_RETURN(return_value) \
- { \
- sync_primitives::AutoReadLock lock(policy_manager_lock_); \
- if (!policy_manager_) { \
- LOG4CXX_DEBUG(logger_, "The shared library of policy is not loaded"); \
- return return_value; \
- } \
+#define POLICY_LIB_CHECK_OR_RETURN(policy_manager, return_value) \
+ { \
+ sync_primitives::AutoReadLock lock(policy_manager_lock_); \
+ if (!policy_manager) { \
+ SDL_LOG_DEBUG("The shared library of policy is not loaded"); \
+ return return_value; \
+ } \
}
-#define POLICY_LIB_CHECK_VOID() \
- { \
- sync_primitives::AutoReadLock lock(policy_manager_lock_); \
- if (!policy_manager_) { \
- LOG4CXX_DEBUG(logger_, "The shared library of policy is not loaded"); \
- return; \
- } \
+#define POLICY_LIB_CHECK_VOID(policy_manager) \
+ { \
+ sync_primitives::AutoReadLock lock(policy_manager_lock_); \
+ if (!policy_manager) { \
+ SDL_LOG_DEBUG("The shared library of policy is not loaded"); \
+ return; \
+ } \
}
static const std::string kCerficateFileName = "certificate";
@@ -198,9 +201,9 @@ struct LinksCollector {
void operator()(const ApplicationSharedPtr& app) {
if (app.use_count() == 0) {
- LOG4CXX_WARN(logger_,
- "Invalid pointer to application was passed."
- "Skip current application.");
+ SDL_LOG_WARN(
+ "Invalid pointer to application was passed."
+ "Skip current application.");
return;
}
DeviceParams device_params = GetDeviceParams(
@@ -208,8 +211,7 @@ struct LinksCollector {
application_manager_.connection_handler().get_session_observer());
const std::string app_id = app->policy_app_id();
if (device_params.device_mac_address.empty()) {
- LOG4CXX_WARN(logger_,
- "Couldn't find device, which hosts application " << app_id);
+ SDL_LOG_WARN("Couldn't find device, which hosts application " << app_id);
return;
}
out_app_to_device_link_.insert(
@@ -232,9 +234,9 @@ struct LinkAppToDevice {
void operator()(const ApplicationSharedPtr& app) {
if (app.use_count() == 0) {
- LOG4CXX_WARN(logger_,
- "Invalid pointer to application was passed."
- "Skip current application.");
+ SDL_LOG_WARN(
+ "Invalid pointer to application was passed."
+ "Skip current application.");
return;
}
DeviceParams device_params = GetDeviceParams(
@@ -242,8 +244,7 @@ struct LinkAppToDevice {
application_manager_.connection_handler().get_session_observer());
const std::string app_id = app->policy_app_id();
if (device_params.device_mac_address.empty()) {
- LOG4CXX_WARN(logger_,
- "Couldn't find device, which hosts application " << app_id);
+ SDL_LOG_WARN("Couldn't find device, which hosts application " << app_id);
return;
}
app_to_device_link_[app_id] = device_params.device_mac_address;
@@ -312,7 +313,7 @@ PolicyHandler::~PolicyHandler() {}
PolicyEncryptionFlagGetterInterfaceSPtr
PolicyHandler::PolicyEncryptionFlagGetter() const {
- return policy_manager_;
+ return LoadPolicyManager();
}
bool PolicyHandler::PolicyEnabled() const {
@@ -320,57 +321,72 @@ bool PolicyHandler::PolicyEnabled() const {
}
bool PolicyHandler::LoadPolicyLibrary() {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoWriteLock lock(policy_manager_lock_);
- if (!PolicyEnabled()) {
- LOG4CXX_WARN(logger_,
- "System is configured to work without policy "
- "functionality.");
- policy_manager_.reset();
- return false;
- }
+ SDL_LOG_AUTO_TRACE();
- if (CreateManager()) {
- policy_manager_->set_listener(this);
- event_observer_ = std::shared_ptr<PolicyEventObserver>(
- new PolicyEventObserver(this, application_manager_.event_dispatcher()));
- }
+ auto create_policy_manager_instance = [this]() {
+ if (!PolicyEnabled()) {
+ SDL_LOG_WARN(
+ "System is configured to work without policy "
+ "functionality.");
+ return std::shared_ptr<PolicyManager>();
+ }
- return (policy_manager_.use_count() != 0);
-}
+ ExchangePolicyManager(nullptr);
+ sync_primitives::AutoWriteLock lock(policy_manager_lock_);
+ void* const dl_policy_handle = dlopen(kLibrary.c_str(), RTLD_LAZY);
-bool PolicyHandler::CreateManager() {
- void* policy_handle = dlopen(kLibrary.c_str(), RTLD_LAZY);
- const char* error = dlerror();
- if (!policy_handle) {
- LOG4CXX_ERROR(
- logger_,
- (error == NULL ? "Unknown error in dlopen while loading policy table"
- : error));
- return false;
- }
+ if (!dl_policy_handle) {
+ SDL_LOG_ERROR("An error occurs while calling dlopen");
+ return std::shared_ptr<PolicyManager>();
+ }
+
+ typedef PolicyManager* (*CreateManager)(logger::Logger*);
+ typedef void (*DeleteManager)(PolicyManager*);
+
+ CreateManager create_manager = reinterpret_cast<CreateManager>(
+ dlsym(dl_policy_handle, "CreateManager"));
+ char* error_string = dlerror();
+ if (NULL != error_string) {
+ SDL_LOG_WARN(error_string);
+ dlclose(dl_policy_handle);
+ return std::shared_ptr<PolicyManager>();
+ }
- typedef PolicyManager* (*CreateManager)();
- typedef void (*DeleteManager)(PolicyManager*);
- CreateManager create_manager =
- reinterpret_cast<CreateManager>(dlsym(policy_handle, "CreateManager"));
- DeleteManager delete_manager =
- reinterpret_cast<DeleteManager>(dlsym(policy_handle, "DeleteManager"));
- auto policy_destroyer = [delete_manager,
- policy_handle](PolicyManager* policy_manager) {
- LOG4CXX_DEBUG(logger_, "Delete Policy Manager");
- delete_manager(policy_manager);
- dlclose(policy_handle);
+ DeleteManager delete_manager = reinterpret_cast<DeleteManager>(
+ dlsym(dl_policy_handle, "DeleteManager"));
+
+ error_string = dlerror();
+ if (NULL != error_string) {
+ SDL_LOG_WARN(error_string);
+ dlclose(dl_policy_handle);
+ return std::shared_ptr<PolicyManager>();
+ }
+
+ auto policy_destroyer = [delete_manager,
+ dl_policy_handle](PolicyManager* policy_manager) {
+ SDL_LOG_DEBUG("Delete Policy Manager");
+ delete_manager(policy_manager);
+ dlclose(dl_policy_handle);
+ };
+
+ auto policy_manager = std::shared_ptr<PolicyManager>(
+ create_manager(&logger::Logger::instance()), policy_destroyer);
+
+ policy_manager->set_listener(this);
+
+ return policy_manager;
};
- char* error_string = dlerror();
- if (NULL == error_string) {
- policy_manager_ =
- std::shared_ptr<PolicyManager>(create_manager(), policy_destroyer);
- } else {
- LOG4CXX_WARN(logger_, error_string);
- dlclose(policy_handle);
+
+ auto policy_manager = create_policy_manager_instance();
+
+ if (!policy_manager) {
+ return false;
}
- return (policy_manager_.use_count() != 0);
+
+ ExchangePolicyManager(policy_manager);
+ event_observer_ = std::make_shared<PolicyEventObserver>(
+ this, application_manager_.event_dispatcher());
+ return true;
}
const PolicySettings& PolicyHandler::get_settings() const {
@@ -378,21 +394,23 @@ const PolicySettings& PolicyHandler::get_settings() const {
}
bool PolicyHandler::InitPolicyTable() {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_OR_RETURN(false);
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false)
+
std::string preloaded_file = get_settings().preloaded_pt_file();
if (file_system::FileExists(preloaded_file)) {
const bool pt_inited =
- policy_manager_->InitPT(preloaded_file, &get_settings());
+ policy_manager->InitPT(preloaded_file, &get_settings());
OnPTInited();
return pt_inited;
}
- LOG4CXX_FATAL(logger_, "The file which contains preloaded PT is not exist");
+ SDL_LOG_FATAL("The file which contains preloaded PT is not exist");
return false;
}
void PolicyHandler::OnPTInited() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(listeners_lock_);
@@ -402,36 +420,39 @@ void PolicyHandler::OnPTInited() {
}
void PolicyHandler::StopRetrySequence() {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
#ifndef EXTERNAL_PROPRIETARY_MODE
// Clear cached PTU app
last_ptu_app_id_ = 0;
#endif // EXTERNAL_PROPRIETARY_MODE
- policy_manager_->StopRetrySequence();
+ policy_manager->StopRetrySequence();
}
bool PolicyHandler::ResetPolicyTable() {
- LOG4CXX_TRACE(logger_, "Reset policy table.");
- POLICY_LIB_CHECK_OR_RETURN(false);
+ SDL_LOG_TRACE("Reset policy table.");
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false)
std::string preloaded_file = get_settings().preloaded_pt_file();
if (file_system::FileExists(preloaded_file)) {
- return policy_manager_->ResetPT(preloaded_file);
+ return policy_manager->ResetPT(preloaded_file);
}
- LOG4CXX_WARN(logger_, "The file which contains preloaded PT is not exist");
+ SDL_LOG_WARN("The file which contains preloaded PT is not exist");
return false;
}
bool PolicyHandler::ClearUserConsent() {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_OR_RETURN(false);
- return policy_manager_->ResetUserConsent();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false)
+ return policy_manager->ResetUserConsent();
}
#ifndef EXTERNAL_PROPRIETARY_MODE
uint32_t PolicyHandler::ChoosePTUApplication(
const PTUIterationType iteration_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Return the previous app chosen if this is a retry for a PTU in progress
if (iteration_type == PTUIterationType::RetryIteration &&
@@ -439,7 +460,7 @@ uint32_t PolicyHandler::ChoosePTUApplication(
ApplicationSharedPtr app =
application_manager_.application(last_ptu_app_id_);
if (app && app->IsRegistered()) {
- LOG4CXX_INFO(logger_, "Previously chosen application exists, returning");
+ SDL_LOG_INFO("Previously chosen application exists, returning");
return last_ptu_app_id_;
}
}
@@ -449,15 +470,16 @@ uint32_t PolicyHandler::ChoosePTUApplication(
}
void PolicyHandler::CacheRetryInfo(const uint32_t app_id,
- const std::string url) {
+ const std::string url,
+ const std::string snapshot_path) {
last_ptu_app_id_ = app_id;
retry_update_url_ = url;
+ policy_snapshot_path_ = snapshot_path;
}
#endif // EXTERNAL_PROPRIETARY_MODE
uint32_t PolicyHandler::GetAppIdForSending() const {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_OR_RETURN(0);
+ SDL_LOG_AUTO_TRACE();
// fix ApplicationSet access crash
const ApplicationSet accessor = application_manager_.applications().GetData();
@@ -469,9 +491,8 @@ uint32_t PolicyHandler::GetAppIdForSending() const {
std::back_inserter(apps_without_none_level),
std::not1(has_none_level));
- LOG4CXX_DEBUG(logger_,
- "Number of apps with different from NONE level: "
- << apps_without_none_level.size());
+ SDL_LOG_DEBUG("Number of apps with different from NONE level: "
+ << apps_without_none_level.size());
uint32_t app_id = ChooseRandomAppForPolicyUpdate(apps_without_none_level);
@@ -485,12 +506,11 @@ uint32_t PolicyHandler::GetAppIdForSending() const {
std::back_inserter(apps_with_none_level),
has_none_level);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Number of apps with NONE level: " << apps_with_none_level.size());
if (apps_with_none_level.empty()) {
- LOG4CXX_WARN(logger_, "There is no registered application");
+ SDL_LOG_WARN("There is no registered application");
return 0;
}
@@ -498,43 +518,45 @@ uint32_t PolicyHandler::GetAppIdForSending() const {
}
void PolicyHandler::PushAppIdToPTUQueue(const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
sync_primitives::AutoLock lock(app_id_queue_lock_);
const auto result = applications_ptu_queue_.insert(app_id);
if (result.second) {
- policy_manager_->UpdatePTUReadyAppsCount(applications_ptu_queue_.size());
+ policy_manager->UpdatePTUReadyAppsCount(applications_ptu_queue_.size());
}
}
void PolicyHandler::PopAppIdFromPTUQueue() {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
sync_primitives::AutoLock lock(app_id_queue_lock_);
if (applications_ptu_queue_.size() > 0) {
applications_ptu_queue_.erase(applications_ptu_queue_.begin());
- policy_manager_->UpdatePTUReadyAppsCount(applications_ptu_queue_.size());
+ policy_manager->UpdatePTUReadyAppsCount(applications_ptu_queue_.size());
}
}
#ifdef EXTERNAL_PROPRIETARY_MODE
PTURetryHandler& PolicyHandler::ptu_retry_handler() const {
- LOG4CXX_AUTO_TRACE(logger_);
- return *policy_manager_;
+ SDL_LOG_AUTO_TRACE();
+ return *atomic_policy_manager_;
}
void PolicyHandler::OnAppPermissionConsent(
const uint32_t connection_key,
const PermissionConsent& permissions,
const ExternalConsentStatus& external_consent_status) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
AsyncRun(new AppPermissionDelegate(
connection_key, permissions, external_consent_status, *this));
}
#else
void PolicyHandler::OnAppPermissionConsent(
const uint32_t connection_key, const PermissionConsent& permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
AsyncRun(new AppPermissionDelegate(connection_key, permissions, *this));
}
@@ -542,13 +564,13 @@ void PolicyHandler::OnAppPermissionConsent(
void PolicyHandler::OnDeviceConsentChanged(const std::string& device_id,
const bool is_allowed) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
connection_handler::DeviceHandle device_handle;
if (!application_manager_.connection_handler().GetDeviceID(device_id,
&device_handle)) {
- LOG4CXX_ERROR(logger_,
- "Unable to get device handle for device_id: " << device_id);
+ SDL_LOG_ERROR("Unable to get device handle for device_id: " << device_id);
return;
}
// In case of changed consent for device, related applications will be
@@ -569,15 +591,15 @@ void PolicyHandler::OnDeviceConsentChanged(const std::string& device_id,
// with negative data consent, there no necessity to change smth and
// send
// notification for such app in case of device consent is not allowed
- if (policy_manager_->IsPredataPolicy(policy_app_id) && !is_allowed) {
+ if (policy_manager->IsPredataPolicy(policy_app_id) && !is_allowed) {
continue;
}
- policy_manager_->ReactOnUserDevConsentForApp(
+ policy_manager->ReactOnUserDevConsentForApp(
device_handle, policy_app_id, is_allowed);
- policy_manager_->SendNotificationOnPermissionsUpdated(device_id,
- policy_app_id);
+ policy_manager->SendNotificationOnPermissionsUpdated(device_id,
+ policy_app_id);
}
}
}
@@ -586,14 +608,13 @@ void PolicyHandler::SendOnAppPermissionsChanged(
const AppPermissions& permissions,
const std::string& device_id,
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(
- logger_,
- "PolicyHandler::SendOnAppPermissionsChanged for " << policy_app_id);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("PolicyHandler::SendOnAppPermissionsChanged for "
+ << policy_app_id);
ApplicationSharedPtr app =
application_manager_.application(device_id, policy_app_id);
if (app.use_count() == 0) {
- LOG4CXX_WARN(logger_, "No app found for policy app id = " << policy_app_id);
+ SDL_LOG_WARN("No app found for policy app id = " << policy_app_id);
return;
}
MessageHelper::SendOnAppPermissionsChangedNotification(
@@ -602,7 +623,7 @@ void PolicyHandler::SendOnAppPermissionsChanged(
void PolicyHandler::SendOnAppPropertiesChangeNotification(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto notification =
MessageHelper::CreateOnAppPropertiesChangeNotification(
policy_app_id, application_manager_);
@@ -610,19 +631,20 @@ void PolicyHandler::SendOnAppPropertiesChangeNotification(
}
void PolicyHandler::OnPTExchangeNeeded() {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
- policy_manager_->ForcePTExchange();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->ForcePTExchange();
}
void PolicyHandler::GetAvailableApps(std::queue<std::string>& apps) {
- LOG4CXX_INFO(logger_, "GetAvailable apps");
+ SDL_LOG_INFO("GetAvailable apps");
const ApplicationSet& app_list =
application_manager_.applications().GetData();
ApplicationSetConstIt iter = app_list.begin();
for (; app_list.end() != iter; ++iter) {
- LOG4CXX_INFO(logger_, "one more app");
+ SDL_LOG_INFO("one more app");
apps.push((*iter)->policy_app_id());
}
}
@@ -637,22 +659,26 @@ StatusNotifier PolicyHandler::AddApplication(
const std::string& device_id,
const std::string& application_id,
const rpc::policy_table_interface_base::AppHmiTypes& hmi_types) {
- POLICY_LIB_CHECK_OR_RETURN(std::make_shared<utils::CallNothing>());
- return policy_manager_->AddApplication(device_id, application_id, hmi_types);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager,
+ std::make_shared<utils::CallNothing>());
+ return policy_manager->AddApplication(device_id, application_id, hmi_types);
}
void PolicyHandler::AddDevice(const std::string& device_id,
const std::string& connection_type) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
- policy_manager_->AddDevice(device_id, connection_type);
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->AddDevice(device_id, connection_type);
}
void PolicyHandler::SetDeviceInfo(const std::string& device_id,
const DeviceInfo& device_info) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
- policy_manager_->SetDeviceInfo(device_id, device_info);
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->SetDeviceInfo(device_id, device_info);
}
#ifdef EXTERNAL_PROPRIETARY_MODE
@@ -660,7 +686,7 @@ void PolicyHandler::OnAppPermissionConsentInternal(
const uint32_t connection_key,
const ExternalConsentStatus& external_consent_status,
PermissionConsent& out_permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const PolicyManager::NotificationMode mode =
external_consent_status.empty() ? PolicyManager::kNotifyApplicationMode
: PolicyManager::kSilentMode;
@@ -668,7 +694,8 @@ void PolicyHandler::OnAppPermissionConsentInternal(
void PolicyHandler::OnAppPermissionConsentInternal(
const uint32_t connection_key, PermissionConsent& out_permissions) {
#endif
- POLICY_LIB_CHECK_VOID();
+ const std::shared_ptr<PolicyManager> policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
if (connection_key) {
ApplicationSharedPtr app = application_manager_.application(connection_key);
@@ -684,9 +711,9 @@ void PolicyHandler::OnAppPermissionConsentInternal(
if (!out_permissions.policy_app_id.empty()) {
#ifdef EXTERNAL_PROPRIETARY_MODE
- policy_manager_->SetUserConsentForApp(out_permissions, mode);
+ policy_manager->SetUserConsentForApp(out_permissions, mode);
#else
- policy_manager_->SetUserConsentForApp(out_permissions);
+ policy_manager->SetUserConsentForApp(out_permissions);
#endif
}
} else if (!app_to_device_link_.empty()) {
@@ -697,15 +724,14 @@ void PolicyHandler::OnAppPermissionConsentInternal(
// current,
// permissions should be set only for coincident to registered apps
if (app.use_count() == 0) {
- LOG4CXX_WARN(logger_,
- "Invalid pointer to application was passed."
- "Permissions setting skipped.");
+ SDL_LOG_WARN(
+ "Invalid pointer to application was passed. "
+ "Permissions setting skipped.");
continue;
}
if (!app->IsRegistered()) {
- LOG4CXX_DEBUG(logger_,
- "Application " << app->policy_app_id()
+ SDL_LOG_DEBUG("Application " << app->policy_app_id()
<< " is not marked as registered.");
continue;
}
@@ -715,35 +741,35 @@ void PolicyHandler::OnAppPermissionConsentInternal(
application_manager_.connection_handler().get_session_observer());
if (device_params.device_mac_address != app->mac_address()) {
- LOG4CXX_WARN(logger_,
- "Device_id of application is changed."
- "Permissions setting skipped.");
+ SDL_LOG_WARN(
+ "Device_id of application is changed. "
+ "Permissions setting skipped.");
continue;
}
out_permissions.policy_app_id = app->policy_app_id();
out_permissions.device_id = app->mac_address();
#ifdef EXTERNAL_PROPRIETARY_MODE
- policy_manager_->SetUserConsentForApp(out_permissions, mode);
+ policy_manager->SetUserConsentForApp(out_permissions, mode);
#else
- policy_manager_->SetUserConsentForApp(out_permissions);
+ policy_manager->SetUserConsentForApp(out_permissions);
#endif
}
} else {
- LOG4CXX_WARN(logger_,
- "There are no applications previously stored for "
- "setting common permissions.");
+ SDL_LOG_WARN(
+ "There are no applications previously stored for "
+ "setting common permissions.");
}
#ifdef EXTERNAL_PROPRIETARY_MODE
- if (!policy_manager_->SetExternalConsentStatus(external_consent_status)) {
- LOG4CXX_WARN(logger_,
- "External User Consent Settings status has not been set!");
+ if (!policy_manager->SetExternalConsentStatus(external_consent_status)) {
+ SDL_LOG_WARN("External User Consent Settings status has not been set!");
}
#endif
}
void policy::PolicyHandler::SetDaysAfterEpoch() {
- POLICY_LIB_CHECK_VOID();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
date_time::TimeDuration current_time = date_time::getCurrentTime();
const int kSecondsInDay = 60 * 60 * 24;
int days_after_epoch = date_time::getSecs(current_time) / kSecondsInDay;
@@ -752,8 +778,9 @@ void policy::PolicyHandler::SetDaysAfterEpoch() {
#ifdef ENABLE_SECURITY
std::string PolicyHandler::RetrieveCertificate() const {
- POLICY_LIB_CHECK_OR_RETURN(std::string(""));
- return policy_manager_->RetrieveCertificate();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, std::string());
+ return policy_manager->RetrieveCertificate();
}
#endif // ENABLE_SECURITY
@@ -761,19 +788,19 @@ void PolicyHandler::OnGetUserFriendlyMessage(
const std::vector<std::string>& message_codes,
const std::string& language,
uint32_t correlation_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
#ifdef EXTERNAL_PROPRIETARY_MODE
- const std::string active_hmi_language =
- application_manager::MessageHelper::CommonLanguageToString(
- application_manager_.hmi_capabilities().active_ui_language());
+ const std::string active_hmi_language = application_manager::EnumToString(
+ application_manager_.hmi_capabilities().active_ui_language());
const std::vector<UserFriendlyMessage> result =
- policy_manager_->GetUserFriendlyMessages(
+ policy_manager->GetUserFriendlyMessages(
message_codes, language, active_hmi_language);
#else
const std::vector<UserFriendlyMessage> result =
- policy_manager_->GetUserFriendlyMessages(message_codes, language);
+ policy_manager->GetUserFriendlyMessages(message_codes, language);
#endif // EXTERNAL_PROPRIETARY_MODE
// Send response to HMI with gathered data
MessageHelper::SendGetUserFriendlyMessageResponse(
@@ -784,7 +811,17 @@ void PolicyHandler::OnSystemRequestReceived() const {
#ifdef EXTERNAL_PROPRIETARY_MODE
ptu_retry_handler().OnSystemRequestReceived();
#endif
- policy_manager_->ResetTimeout();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->ResetTimeout();
+}
+
+void PolicyHandler::TriggerPTUOnStartupIfRequired() {
+#ifdef PROPRIETARY_MODE
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->TriggerPTUOnStartupIfRequired();
+#endif
}
void PolicyHandler::GetRegisteredLinks(
@@ -797,10 +834,23 @@ void PolicyHandler::GetRegisteredLinks(
std::for_each(it_app, it_app_end, linker);
}
+std::shared_ptr<PolicyManager> PolicyHandler::LoadPolicyManager() const {
+ sync_primitives::AutoReadLock lock{policy_manager_lock_};
+ return atomic_policy_manager_;
+}
+
+void PolicyHandler::ExchangePolicyManager(
+ std::shared_ptr<PolicyManager> policy_manager) {
+ sync_primitives::AutoWriteLock lock{policy_manager_lock_};
+ atomic_policy_manager_.swap(policy_manager);
+}
+
std::vector<policy::FunctionalGroupPermission>
PolicyHandler::CollectRegisteredAppsPermissions() {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_OR_RETURN(std::vector<policy::FunctionalGroupPermission>());
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager,
+ std::vector<policy::FunctionalGroupPermission>());
// If no specific app was passed, get permissions for all currently registered
// applications
sync_primitives::AutoLock lock(app_to_device_link_lock_);
@@ -812,7 +862,7 @@ PolicyHandler::CollectRegisteredAppsPermissions() {
std::map<std::string, std::string>::const_iterator it =
app_to_device_link_.begin();
for (; it != app_to_device_link_.end(); ++it) {
- policy_manager_->GetUserConsentForApp(
+ policy_manager->GetUserConsentForApp(
it->first, it->second, group_permissions);
consolidator.Consolidate(group_permissions);
}
@@ -822,17 +872,17 @@ PolicyHandler::CollectRegisteredAppsPermissions() {
std::vector<FunctionalGroupPermission> PolicyHandler::CollectAppPermissions(
const uint32_t connection_key) {
std::vector<FunctionalGroupPermission> group_permissions;
- POLICY_LIB_CHECK_OR_RETURN(group_permissions);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, group_permissions);
// Single app only
ApplicationSharedPtr app = application_manager_.application(connection_key);
if (NULL == app.get() || app.use_count() == 0) {
- LOG4CXX_WARN(logger_,
- "Connection key '"
- << connection_key
- << "' "
- "not found within registered applications.");
+ SDL_LOG_WARN("Connection key '"
+ << connection_key
+ << "' "
+ "not found within registered applications.");
return group_permissions;
}
@@ -842,21 +892,22 @@ std::vector<FunctionalGroupPermission> PolicyHandler::CollectAppPermissions(
application_manager_.connection_handler().get_session_observer());
if (device_params.device_mac_address.empty()) {
- LOG4CXX_WARN(logger_, "Couldn't find device, which hosts application.");
+ SDL_LOG_WARN("Couldn't find device, which hosts application.");
return group_permissions;
}
- policy_manager_->GetUserConsentForApp(device_params.device_mac_address,
- app->policy_app_id(),
- group_permissions);
+ policy_manager->GetUserConsentForApp(device_params.device_mac_address,
+ app->policy_app_id(),
+ group_permissions);
return group_permissions;
}
void PolicyHandler::OnGetListOfPermissions(const uint32_t connection_key,
const uint32_t correlation_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
application_manager::ApplicationSharedPtr app =
application_manager_.application(connection_key);
@@ -868,16 +919,15 @@ void PolicyHandler::OnGetListOfPermissions(const uint32_t connection_key,
: CollectRegisteredAppsPermissions();
if (permissions.empty() && is_connection_key_valid) {
- LOG4CXX_ERROR(logger_,
- "No permissions found for application with connection key:"
- << connection_key);
+ SDL_LOG_ERROR("No permissions found for application with connection key:"
+ << connection_key);
return;
}
MessageHelper::SendGetListOfPermissionsResponse(
permissions,
#ifdef EXTERNAL_PROPRIETARY_MODE
- policy_manager_->GetExternalConsentStatus(),
+ policy_manager->GetExternalConsentStatus(),
#endif // EXTERNAL_PROPRIETARY_MODE
correlation_id,
application_manager_);
@@ -886,13 +936,12 @@ void PolicyHandler::OnGetListOfPermissions(const uint32_t connection_key,
void PolicyHandler::LinkAppsToDevice() {
sync_primitives::AutoLock lock(app_to_device_link_lock_);
LinkAppToDevice linker(app_to_device_link_, application_manager_);
- LOG4CXX_DEBUG(logger_, "add links to app. no specific app was passed");
+ SDL_LOG_DEBUG("add links to app. no specific app was passed");
{
const ApplicationSet& accessor =
application_manager_.applications().GetData();
if (accessor.empty()) {
- LOG4CXX_WARN(logger_,
- "application_manager doesn't have any applications");
+ SDL_LOG_WARN("application_manager doesn't have any applications");
} else {
// Add all currently registered applications
std::for_each(accessor.begin(), accessor.end(), linker);
@@ -902,18 +951,17 @@ void PolicyHandler::LinkAppsToDevice() {
bool PolicyHandler::IsAppSuitableForPolicyUpdate(
const Applications::value_type value) const {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_OR_RETURN(false);
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
if (!value->IsRegistered()) {
- LOG4CXX_DEBUG(
- logger_,
- "Application " << value->app_id() << " is not marked as registered.");
+ SDL_LOG_DEBUG("Application " << value->app_id()
+ << " is not marked as registered.");
return false;
}
- LOG4CXX_DEBUG(logger_,
- "Application " << value->app_id()
+ SDL_LOG_DEBUG("Application " << value->app_id()
<< " marked as registered."
"Checking its parameters.");
@@ -922,18 +970,17 @@ bool PolicyHandler::IsAppSuitableForPolicyUpdate(
application_manager_.connection_handler().get_session_observer());
const bool is_device_allowed =
- (kDeviceAllowed == policy_manager_->GetUserConsentForDevice(
+ (kDeviceAllowed == policy_manager->GetUserConsentForDevice(
device_params.device_mac_address));
- LOG4CXX_DEBUG(logger_,
- "Is device " << device_params.device_mac_address << " allowed "
+ SDL_LOG_DEBUG("Is device " << device_params.device_mac_address << " allowed "
<< std::boolalpha << is_device_allowed);
return is_device_allowed;
}
uint32_t PolicyHandler::ChooseRandomAppForPolicyUpdate(
Applications& app_list) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::random_shuffle(app_list.begin(), app_list.end());
Applications::const_iterator choosen_app = std::find_if(
@@ -951,13 +998,14 @@ uint32_t PolicyHandler::ChooseRandomAppForPolicyUpdate(
void PolicyHandler::OnDeviceSwitching(const std::string& device_id_from,
const std::string& device_id_to) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
- policy_manager_->OnDeviceSwitching(device_id_from, device_id_to);
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->OnDeviceSwitching(device_id_from, device_id_to);
}
void PolicyHandler::OnLockScreenDismissalStateChanged() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto accessor = application_manager_.applications();
const auto apps = accessor.GetData();
for (auto& app : apps) {
@@ -966,25 +1014,27 @@ void PolicyHandler::OnLockScreenDismissalStateChanged() {
}
void PolicyHandler::OnGetStatusUpdate(const uint32_t correlation_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
MessageHelper::SendGetStatusUpdateResponse(
- policy_manager_->GetPolicyTableStatus(),
+ policy_manager->GetPolicyTableStatus(),
correlation_id,
application_manager_);
}
void PolicyHandler::OnUpdateStatusChanged(const std::string& status) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
- policy_manager_->SaveUpdateStatusRequired(policy::kUpToDate != status);
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->SaveUpdateStatusRequired(policy::kUpToDate != status);
MessageHelper::SendOnStatusUpdate(status, application_manager_);
}
std::string PolicyHandler::OnCurrentDeviceIdUpdateRequired(
const transport_manager::DeviceHandle& device_handle,
const std::string& policy_app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DeviceParams device_params = GetDeviceParams(
device_handle,
application_manager_.connection_handler().get_session_observer());
@@ -993,11 +1043,10 @@ std::string PolicyHandler::OnCurrentDeviceIdUpdateRequired(
device_params.device_mac_address, policy_app_id);
if (app.use_count() == 0) {
- LOG4CXX_WARN(logger_,
- "Application with id '"
- << policy_app_id
- << "' "
- "not found within registered applications.");
+ SDL_LOG_WARN("Application with id '"
+ << policy_app_id
+ << "' "
+ "not found within registered applications.");
return std::string();
}
@@ -1005,21 +1054,37 @@ std::string PolicyHandler::OnCurrentDeviceIdUpdateRequired(
}
void PolicyHandler::OnSystemInfoChanged(const std::string& language) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
- policy_manager_->SetSystemLanguage(language);
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->SetSystemLanguage(language);
+}
+
+void PolicyHandler::SetPreloadedPtFlag(const bool is_preloaded) {
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->SetPreloadedPtFlag(is_preloaded);
}
void PolicyHandler::OnGetSystemInfo(const std::string& ccpu_version,
const std::string& wers_country_code,
const std::string& language) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
- policy_manager_->SetSystemInfo(ccpu_version, wers_country_code, language);
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->SetSystemInfo(ccpu_version, wers_country_code, language);
+}
+
+std::string PolicyHandler::GetCCPUVersionFromPT() const {
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, std::string());
+ return policy_manager->GetCCPUVersionFromPT();
}
void PolicyHandler::OnVIIsReady() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const uint32_t correlation_id =
application_manager_.GetNextHMICorrelationID();
@@ -1032,41 +1097,39 @@ void PolicyHandler::OnVIIsReady() {
void PolicyHandler::OnVehicleDataUpdated(
const smart_objects::SmartObject& message) {
- POLICY_LIB_CHECK_VOID();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
#ifdef EXTERNAL_PROPRIETARY_MODE
if (!message.keyExists(strings::msg_params)) {
- LOG4CXX_ERROR(
- logger_,
- "Message does not contains mandatory section " << strings::msg_params);
+ SDL_LOG_ERROR("Message does not contains mandatory section "
+ << strings::msg_params);
return;
}
if (message[strings::msg_params].keyExists(strings::vin)) {
- policy_manager_->SetVINValue(
+ policy_manager->SetVINValue(
message[strings::msg_params][strings::vin].asString());
}
#else
- LOG4CXX_DEBUG(logger_,
- "This functionality is not available for not external policy");
+ SDL_LOG_DEBUG("This functionality is not available for not external policy");
#endif
}
void PolicyHandler::OnPendingPermissionChange(
const std::string& device_id, const std::string& policy_app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(
- logger_,
- "PolicyHandler::OnPendingPermissionChange for " << policy_app_id);
- POLICY_LIB_CHECK_VOID();
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("PolicyHandler::OnPendingPermissionChange for "
+ << policy_app_id);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
ApplicationSharedPtr app =
application_manager_.application(device_id, policy_app_id);
if (app.use_count() == 0) {
- LOG4CXX_WARN(logger_,
- "No app found for " << policy_app_id << " policy app id.");
+ SDL_LOG_WARN("No app found for " << policy_app_id << " policy app id.");
return;
}
AppPermissions permissions =
- policy_manager_->GetAppPermissionsChanges(device_id, policy_app_id);
+ policy_manager->GetAppPermissionsChanges(device_id, policy_app_id);
const uint32_t app_id = app->app_id();
@@ -1080,7 +1143,7 @@ void PolicyHandler::OnPendingPermissionChange(
mobile_apis::AudioStreamingState::NOT_AUDIBLE,
mobile_apis::VideoStreamingState::NOT_STREAMABLE,
true);
- policy_manager_->RemovePendingPermissionChanges(policy_app_id);
+ policy_manager->RemovePendingPermissionChanges(policy_app_id);
return;
}
@@ -1129,7 +1192,7 @@ void PolicyHandler::OnPendingPermissionChange(
app->app_id(), permissions, application_manager_);
}
- policy_manager_->RemovePendingPermissionChanges(policy_app_id);
+ policy_manager->RemovePendingPermissionChanges(policy_app_id);
}
bool PolicyHandler::SendMessageToSDK(const BinaryMessage& pt_string,
@@ -1141,31 +1204,29 @@ bool PolicyHandler::SendMessageToSDK(const BinaryMessage& pt_string,
bool PolicyHandler::SendMessageToSDK(const BinaryMessage& pt_string,
const std::string& url,
const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_OR_RETURN(false);
+ SDL_LOG_AUTO_TRACE();
+ POLICY_LIB_CHECK_OR_RETURN(atomic_policy_manager_, false);
ApplicationSharedPtr app = application_manager_.application(app_id);
if (!app) {
- LOG4CXX_WARN(logger_,
- "There is no registered application with "
- "connection key '"
- << app_id << "'");
+ SDL_LOG_WARN(
+ "There is no registered application with "
+ "connection key '"
+ << app_id << "'");
return false;
}
const std::string& mobile_app_id = app->policy_app_id();
if (mobile_app_id.empty()) {
- LOG4CXX_WARN(logger_,
- "Application with connection key '"
- << app_id
- << "'"
- " has no application id.");
+ SDL_LOG_WARN("Application with connection key '"
+ << app_id
+ << "'"
+ " has no application id.");
return false;
}
- LOG4CXX_DEBUG(logger_,
- "Update url is " << url
+ SDL_LOG_DEBUG("Update url is " << url
<< " for application "
"with connection key "
<< app_id);
@@ -1178,21 +1239,22 @@ bool PolicyHandler::SendMessageToSDK(const BinaryMessage& pt_string,
bool PolicyHandler::ReceiveMessageFromSDK(const std::string& file,
const BinaryMessage& pt_string) {
- POLICY_LIB_CHECK_OR_RETURN(false);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
- const auto load_pt_result = policy_manager_->LoadPT(file, pt_string);
+ const auto load_pt_result = policy_manager->LoadPT(file, pt_string);
- LOG4CXX_INFO(logger_, "Load policy table result code: " << load_pt_result);
+ SDL_LOG_INFO("Load policy table result code: " << load_pt_result);
const bool is_ptu_successful =
load_pt_result == PolicyManager::PtProcessingResult::kSuccess;
OnPTUFinished(is_ptu_successful);
if (is_ptu_successful) {
- LOG4CXX_INFO(logger_, "PTU was successful.");
- policy_manager_->CleanupUnpairedDevices();
+ SDL_LOG_INFO("PTU was successful.");
+ policy_manager->CleanupUnpairedDevices();
SetDaysAfterEpoch();
- policy_manager_->OnPTUFinished(load_pt_result);
+ policy_manager->OnPTUFinished(load_pt_result);
#ifndef EXTERNAL_PROPRIETARY_MODE
// Clean up retry information
last_ptu_app_id_ = 0;
@@ -1206,37 +1268,33 @@ bool PolicyHandler::ReceiveMessageFromSDK(const std::string& file,
MessageHelper::CreateGetVehicleDataRequest(
correlation_id, vehicle_data_args, application_manager_);
} else {
- LOG4CXX_WARN(logger_, "Exchange wasn't successful");
- policy_manager_->OnPTUFinished(load_pt_result);
+ SDL_LOG_WARN("Exchange wasn't successful");
+ policy_manager->OnPTUFinished(load_pt_result);
}
return is_ptu_successful;
}
bool PolicyHandler::UnloadPolicyLibrary() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "policy_manager_ = " << policy_manager_);
- bool ret = true;
+ SDL_LOG_AUTO_TRACE();
AsyncRunner::Stop();
- sync_primitives::AutoWriteLock lock(policy_manager_lock_);
- if (policy_manager_) {
- policy_manager_.reset();
- }
- LOG4CXX_TRACE(logger_, "exit");
- return ret;
+ ExchangePolicyManager(nullptr);
+ return !atomic_policy_manager_;
}
#ifdef EXTERNAL_PROPRIETARY_MODE
struct SDLAlowedNotification {
- SDLAlowedNotification(const connection_handler::DeviceHandle& device_id,
+ SDLAlowedNotification(sync_primitives::RWLock& policy_manager_lock,
+ const connection_handler::DeviceHandle& device_id,
PolicyManager* policy_manager,
StateController& state_controller)
- : device_id_(device_id)
+ : policy_manager_lock_(policy_manager_lock)
+ , device_id_(device_id)
, policy_manager_(policy_manager)
, state_controller_(state_controller) {}
void operator()(const ApplicationSharedPtr& app) {
- DCHECK_OR_RETURN_VOID(policy_manager_);
+ POLICY_LIB_CHECK_VOID(policy_manager_);
if (app->device() == device_id_) {
std::string hmi_level;
mobile_apis::HMILevel::eType default_mobile_hmi;
@@ -1262,6 +1320,7 @@ struct SDLAlowedNotification {
}
private:
+ sync_primitives::RWLock& policy_manager_lock_;
connection_handler::DeviceHandle device_id_;
PolicyManager* policy_manager_;
StateController& state_controller_;
@@ -1270,8 +1329,9 @@ struct SDLAlowedNotification {
void PolicyHandler::OnAllowSDLFunctionalityNotification(
bool is_allowed, const std::string& device_mac) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
using namespace mobile_apis;
const bool device_specific = !device_mac.empty();
// Common devices consents change
@@ -1288,34 +1348,37 @@ void PolicyHandler::OnAllowSDLFunctionalityNotification(
const std::string device_id = *it_ids;
if (kDefaultDeviceMacAddress == device_id) {
- LOG4CXX_WARN(logger_,
- "Device with id " << device_id << " wasn't found.");
+ SDL_LOG_WARN("Device with id " << device_id << " wasn't found.");
continue;
}
- policy_manager_->SetUserConsentForDevice(device_id, is_allowed);
+ policy_manager->SetUserConsentForDevice(device_id, is_allowed);
connection_handler::DeviceHandle device_handle = 0;
if (!connection_handler.GetDeviceID(device_id, &device_handle)) {
- LOG4CXX_WARN(
- logger_,
- "Device handle with mac " << device_id << " wasn't found.");
+ SDL_LOG_WARN("Device handle with mac " << device_id
+ << " wasn't found.");
}
#ifdef EXTERNAL_PROPRIETARY_MODE
- DataAccessor<ApplicationSet> accessor =
- application_manager_.applications();
+ ApplicationSet applications;
+ {
+ DataAccessor<ApplicationSet> accessor =
+ application_manager_.applications();
+ applications = accessor.GetData();
+ }
if (!is_allowed) {
std::for_each(
- accessor.GetData().begin(),
- accessor.GetData().end(),
+ applications.begin(),
+ applications.end(),
DeactivateApplication(device_handle,
application_manager_.state_controller()));
} else {
std::for_each(
- accessor.GetData().begin(),
- accessor.GetData().end(),
- SDLAlowedNotification(device_handle,
- policy_manager_.get(),
+ applications.begin(),
+ applications.end(),
+ SDLAlowedNotification(policy_manager_lock_,
+ device_handle,
+ policy_manager.get(),
application_manager_.state_controller()));
}
#endif // EXTERNAL_PROPRIETARY_MODE
@@ -1325,17 +1388,16 @@ void PolicyHandler::OnAllowSDLFunctionalityNotification(
// Case, when specific device was changed
connection_handler::DeviceHandle device_handle = 0u;
if (device_specific) {
- policy_manager_->SetUserConsentForDevice(device_mac, is_allowed);
+ policy_manager->SetUserConsentForDevice(device_mac, is_allowed);
if (!connection_handler.GetDeviceID(device_mac, &device_handle)) {
- LOG4CXX_WARN(logger_,
- "Device hadle with mac " << device_mac << " wasn't found.");
+ SDL_LOG_WARN("Device hadle with mac " << device_mac << " wasn't found.");
}
DeviceHandles::iterator it = std::find(pending_device_handles_.begin(),
pending_device_handles_.end(),
device_handle);
// If consent done from HMI menu
if (it == pending_device_handles_.end()) {
- LOG4CXX_WARN(logger_, "No pendining application activation");
+ SDL_LOG_WARN("No pendining application activation");
return;
}
@@ -1349,10 +1411,9 @@ void PolicyHandler::OnAllowSDLFunctionalityNotification(
application_manager_.application(last_activated_app_id_);
if (!app) {
- LOG4CXX_WARN(logger_,
- "Application with id '"
- << last_activated_app_id_
- << "' not found among registered applications.");
+ SDL_LOG_WARN("Application with id '"
+ << last_activated_app_id_
+ << "' not found among registered applications.");
return;
}
if (is_allowed) {
@@ -1383,32 +1444,33 @@ void PolicyHandler::OnAllowSDLFunctionalityNotification(
}
void PolicyHandler::OnIgnitionCycleOver() {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
- policy_manager_->IncrementIgnitionCycles();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->IncrementIgnitionCycles();
}
void PolicyHandler::OnActivateApp(uint32_t connection_key,
uint32_t correlation_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key);
if (app.use_count() == 0) {
- LOG4CXX_WARN(logger_, "Activated App failed: no app found.");
+ SDL_LOG_WARN("Activated App failed: no app found.");
return;
}
std::string policy_app_id = app->policy_app_id();
AppPermissions permissions(policy_app_id);
- sync_primitives::AutoReadLock lock(policy_manager_lock_);
- if (!policy_manager_) {
- LOG4CXX_DEBUG(logger_, "The shared library of policy is not loaded");
+ const auto policy_manager = LoadPolicyManager();
+ if (!policy_manager) {
+ SDL_LOG_DEBUG("The shared library of policy is not loaded");
if (!PolicyEnabled()) {
permissions.isSDLAllowed = true;
}
} else {
- permissions = policy_manager_->GetAppPermissionsChanges(app->mac_address(),
- policy_app_id);
+ permissions = policy_manager->GetAppPermissionsChanges(app->mac_address(),
+ policy_app_id);
#ifdef EXTERNAL_PROPRIETARY_MODE
UsageStatistics& usage = app->usage_report();
@@ -1418,7 +1480,7 @@ void PolicyHandler::OnActivateApp(uint32_t connection_key,
application_manager_.connection_handler().get_session_observer());
permissions.deviceInfo = device_params;
- DeviceConsent consent = policy_manager_->GetUserConsentForDevice(
+ DeviceConsent consent = policy_manager->GetUserConsentForDevice(
permissions.deviceInfo.device_mac_address);
permissions.isSDLAllowed = kDeviceAllowed == consent;
@@ -1447,17 +1509,17 @@ void PolicyHandler::OnActivateApp(uint32_t connection_key,
#else // EXTERNAL_PROPRIETARY_MODE
permissions.isSDLAllowed = true;
#endif // EXTERNAL_PROPRIETARY_MODE
- policy_manager_->RemovePendingPermissionChanges(policy_app_id);
+ policy_manager->RemovePendingPermissionChanges(policy_app_id);
}
// If application is revoked it should not be activated
// In this case we need to activate application
if (false == permissions.appRevoked && true == permissions.isSDLAllowed) {
- LOG4CXX_INFO(logger_, "Application will be activated");
+ SDL_LOG_INFO("Application will be activated");
if (application_manager_.ActivateApplication(app)) {
last_activated_app_id_ = 0;
}
} else {
- LOG4CXX_WARN(logger_, "Application should not be activated");
+ SDL_LOG_WARN("Application should not be activated");
}
MessageHelper::SendSDLActivateAppResponse(
@@ -1465,16 +1527,17 @@ void PolicyHandler::OnActivateApp(uint32_t connection_key,
}
void PolicyHandler::KmsChanged(int kilometers) {
- LOG4CXX_DEBUG(logger_,
- "PolicyHandler::KmsChanged " << kilometers << " kilometers");
- POLICY_LIB_CHECK_VOID();
- policy_manager_->KmsChanged(kilometers);
+ SDL_LOG_DEBUG("PolicyHandler::KmsChanged " << kilometers << " kilometers");
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->KmsChanged(kilometers);
}
void PolicyHandler::PTExchangeAtUserRequest(uint32_t correlation_id) {
- LOG4CXX_TRACE(logger_, "PT exchange at user request");
- POLICY_LIB_CHECK_VOID();
- std::string update_status = policy_manager_->ForcePTExchangeAtUserRequest();
+ SDL_LOG_TRACE("PT exchange at user request");
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ std::string update_status = policy_manager->ForcePTExchangeAtUserRequest();
MessageHelper::SendUpdateSDLResponse(
update_status, correlation_id, application_manager_);
}
@@ -1483,14 +1546,13 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& device_id,
const std::string& policy_app_id,
const Permissions& permissions,
const HMILevel& default_hmi) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
OnPermissionsUpdated(device_id, policy_app_id, permissions);
ApplicationSharedPtr app =
application_manager_.application(device_id, policy_app_id);
if (app.use_count() == 0) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Connection_key not found for application_id: " << policy_app_id);
return;
}
@@ -1499,25 +1561,21 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& device_id,
// level to default
mobile_apis::HMILevel::eType current_hmi_level =
app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
- mobile_apis::HMILevel::eType hmi_level =
- MessageHelper::StringToHMILevel(default_hmi);
+ auto hmi_level = StringToEnum<mobile_apis::HMILevel::eType>(default_hmi);
if (mobile_apis::HMILevel::INVALID_ENUM == hmi_level) {
- LOG4CXX_WARN(
- logger_,
- "Couldn't convert default hmi level " << default_hmi << " to enum.");
+ SDL_LOG_WARN("Couldn't convert default hmi level " << default_hmi
+ << " to enum.");
return;
}
if (current_hmi_level == hmi_level) {
- LOG4CXX_DEBUG(logger_, "Application already in default hmi state.");
+ SDL_LOG_DEBUG("Application already in default hmi state.");
return;
}
switch (current_hmi_level) {
case mobile_apis::HMILevel::HMI_NONE: {
- LOG4CXX_INFO(logger_,
- "Changing hmi level of application "
- << policy_app_id << " to default hmi level "
- << default_hmi);
+ SDL_LOG_INFO("Changing hmi level of application "
+ << policy_app_id << " to default hmi level " << default_hmi);
if (hmi_level == mobile_apis::HMILevel::HMI_FULL) {
application_manager_.state_controller().SetRegularState(
@@ -1535,8 +1593,7 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& device_id,
break;
}
default:
- LOG4CXX_WARN(logger_,
- "Application " << policy_app_id
+ SDL_LOG_WARN("Application " << policy_app_id
<< " is running."
"HMI level won't be changed.");
break;
@@ -1546,28 +1603,26 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& device_id,
void PolicyHandler::OnPermissionsUpdated(const std::string& device_id,
const std::string& policy_app_id,
const Permissions& permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
ApplicationSharedPtr app =
application_manager_.application(device_id, policy_app_id);
if (app.use_count() == 0) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Connection_key not found for application_id: " << policy_app_id);
return;
}
const auto require_encryption =
- policy_manager_->GetAppEncryptionRequired(policy_app_id);
+ policy_manager->GetAppEncryptionRequired(policy_app_id);
MessageHelper::SendOnPermissionsChangeNotification(
app->app_id(), permissions, application_manager_, require_encryption);
- LOG4CXX_DEBUG(logger_,
- "Notification sent for application_id: "
- << policy_app_id << " and connection_key "
- << app->app_id());
+ SDL_LOG_DEBUG("Notification sent for application_id: "
+ << policy_app_id << " and connection_key " << app->app_id());
}
void PolicyHandler::OnPTUTimeOut() {
@@ -1590,7 +1645,7 @@ bool PolicyHandler::SaveSnapshot(const BinaryMessage& pt_string,
}
if (!result) {
- LOG4CXX_ERROR(logger_, "Failed to write snapshot file to " << snap_path);
+ SDL_LOG_ERROR("Failed to write snapshot file to " << snap_path);
}
return result;
@@ -1614,33 +1669,33 @@ void PolicyHandler::OnSnapshotCreated(
#else // EXTERNAL_PROPRIETARY_MODE
void PolicyHandler::OnSnapshotCreated(const BinaryMessage& pt_string,
const PTUIterationType iteration_type) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
#ifdef PROPRIETARY_MODE
if (PTUIterationType::RetryIteration == iteration_type) {
uint32_t app_id_for_sending = 0;
const std::string& url =
GetNextUpdateUrl(PTUIterationType::RetryIteration, app_id_for_sending);
- if (0 != url.length()) {
+ if (0 != url.length() && !policy_snapshot_path_.empty()) {
MessageHelper::SendPolicySnapshotNotification(
- app_id_for_sending, pt_string, url, application_manager_);
+ app_id_for_sending, policy_snapshot_path_, url, application_manager_);
}
-
} else {
std::string policy_snapshot_full_path;
if (!SaveSnapshot(pt_string, policy_snapshot_full_path)) {
- LOG4CXX_ERROR(logger_, "Snapshot processing skipped.");
+ SDL_LOG_ERROR("Snapshot processing skipped.");
return;
}
MessageHelper::SendPolicyUpdate(
policy_snapshot_full_path,
TimeoutExchangeSec(),
- policy_manager_->RetrySequenceDelaysSeconds(),
+ policy_manager->RetrySequenceDelaysSeconds(),
application_manager_);
}
#else // PROPRIETARY_MODE
- LOG4CXX_INFO(logger_, "HTTP policy");
+ SDL_LOG_INFO("HTTP policy");
uint32_t app_id_for_sending = 0;
const std::string& url = GetNextUpdateUrl(iteration_type, app_id_for_sending);
@@ -1652,8 +1707,9 @@ void PolicyHandler::OnSnapshotCreated(const BinaryMessage& pt_string,
std::string PolicyHandler::GetNextUpdateUrl(
const PTUIterationType iteration_type, uint32_t& app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_OR_RETURN(std::string());
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, std::string());
app_id = ChoosePTUApplication(iteration_type);
if (0 == app_id) {
@@ -1667,10 +1723,10 @@ std::string PolicyHandler::GetNextUpdateUrl(
}
EndpointUrls endpoint_urls;
- policy_manager_->GetUpdateUrls("0x07", endpoint_urls);
+ policy_manager->GetUpdateUrls("0x07", endpoint_urls);
if (endpoint_urls.empty()) {
- LOG4CXX_ERROR(logger_, "Service URLs are empty!");
+ SDL_LOG_ERROR("Service URLs are empty!");
return std::string();
}
@@ -1685,18 +1741,18 @@ std::string PolicyHandler::GetNextUpdateUrl(
return application_manager_.application(app_id);
};
- AppIdURL app_url = policy_manager_->GetNextUpdateUrl(endpoint_urls);
+ AppIdURL app_url = policy_manager->GetNextUpdateUrl(endpoint_urls);
ApplicationSharedPtr app = get_ptu_app(app_url, app_id);
if (!app) {
- LOG4CXX_ERROR(logger_, "No available applications for PTU!");
+ SDL_LOG_ERROR("No available applications for PTU!");
return std::string();
}
EndpointData& data = endpoint_urls[app_url.first];
while (!IsUrlAppIdValid(app->policy_app_id(), data)) {
- app_url = policy_manager_->GetNextUpdateUrl(endpoint_urls);
+ app_url = policy_manager->GetNextUpdateUrl(endpoint_urls);
app = get_ptu_app(app_url, app_id);
if (!app) {
- LOG4CXX_ERROR(logger_, "No available applications for PTU!");
+ SDL_LOG_ERROR("No available applications for PTU!");
return std::string();
}
data = endpoint_urls[app_url.first];
@@ -1708,8 +1764,9 @@ std::string PolicyHandler::GetNextUpdateUrl(
bool PolicyHandler::GetPriority(const std::string& policy_app_id,
std::string* priority) const {
- POLICY_LIB_CHECK_OR_RETURN(false);
- return policy_manager_->GetPriority(policy_app_id, priority);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
+ return policy_manager->GetPriority(policy_app_id, priority);
}
void PolicyHandler::CheckPermissions(
@@ -1718,77 +1775,84 @@ void PolicyHandler::CheckPermissions(
const PTString& rpc,
const RPCParams& rpc_params,
CheckPermissionResult& result) {
- POLICY_LIB_CHECK_VOID();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
const std::string hmi_level =
- MessageHelper::StringifiedHMILevel(app->hmi_level(window_id));
+ application_manager::EnumToString(app->hmi_level(window_id));
if (hmi_level.empty()) {
- LOG4CXX_WARN(logger_,
- "HMI level for " << app->policy_app_id() << " is invalid, rpc "
+ SDL_LOG_WARN("HMI level for " << app->policy_app_id() << " is invalid, rpc "
<< rpc << " is not allowed.");
result.hmi_level_permitted = policy::kRpcDisallowed;
return;
}
const std::string device_id = MessageHelper::GetDeviceMacAddressForHandle(
app->device(), application_manager_);
- LOG4CXX_INFO(logger_,
- "Checking permissions for " << app->policy_app_id() << " in "
+ SDL_LOG_INFO("Checking permissions for " << app->policy_app_id() << " in "
<< hmi_level << " on device "
<< device_id << " rpc " << rpc);
- policy_manager_->CheckPermissions(
+ policy_manager->CheckPermissions(
device_id, app->policy_app_id(), hmi_level, rpc, rpc_params, result);
}
-uint32_t PolicyHandler::GetNotificationsNumber(
- const std::string& priority) const {
- POLICY_LIB_CHECK_OR_RETURN(0);
- return policy_manager_->GetNotificationsNumber(priority);
+uint32_t PolicyHandler::GetNotificationsNumber(const std::string& priority,
+ const bool is_subtle) const {
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, 0);
+ return policy_manager->GetNotificationsNumber(priority, is_subtle);
}
DeviceConsent PolicyHandler::GetUserConsentForDevice(
const std::string& device_id) const {
- POLICY_LIB_CHECK_OR_RETURN(kDeviceDisallowed);
- return policy_manager_->GetUserConsentForDevice(device_id);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, kDeviceDisallowed);
+ return policy_manager->GetUserConsentForDevice(device_id);
}
Json::Value PolicyHandler::GetPolicyTableData() const {
- POLICY_LIB_CHECK_OR_RETURN(Json::Value());
- return policy_manager_->GetPolicyTableData();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, Json::Value());
+ return policy_manager->GetPolicyTableData();
}
bool PolicyHandler::GetDefaultHmi(const std::string& device_id,
const std::string& policy_app_id,
std::string* default_hmi) const {
- POLICY_LIB_CHECK_OR_RETURN(false);
- return policy_manager_->GetDefaultHmi(device_id, policy_app_id, default_hmi);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
+ return policy_manager->GetDefaultHmi(device_id, policy_app_id, default_hmi);
}
bool PolicyHandler::GetInitialAppData(const std::string& application_id,
StringArray* nicknames,
StringArray* app_hmi_types) {
- POLICY_LIB_CHECK_OR_RETURN(false);
- return policy_manager_->GetInitialAppData(
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
+ return policy_manager->GetInitialAppData(
application_id, nicknames, app_hmi_types);
}
void PolicyHandler::GetUpdateUrls(const std::string& service_type,
EndpointUrls& out_end_points) const {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->GetUpdateUrls(service_type, out_end_points);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->GetUpdateUrls(service_type, out_end_points);
}
void PolicyHandler::GetUpdateUrls(const uint32_t service_type,
EndpointUrls& out_end_points) const {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->GetUpdateUrls(service_type, out_end_points);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->GetUpdateUrls(service_type, out_end_points);
}
std::string PolicyHandler::GetLockScreenIconUrl(
const std::string& policy_app_id) const {
const std::string default_url;
- POLICY_LIB_CHECK_OR_RETURN(default_url);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, default_url);
EndpointUrls endpoints;
- policy_manager_->GetUpdateUrls("lock_screen_icon_url", endpoints);
+ policy_manager->GetUpdateUrls("lock_screen_icon_url", endpoints);
auto it_specific =
std::find_if(endpoints.begin(),
@@ -1798,8 +1862,7 @@ std::string PolicyHandler::GetLockScreenIconUrl(
});
if (endpoints.end() != it_specific && !it_specific->url.empty()) {
- LOG4CXX_DEBUG(logger_,
- "Specific app URL will be used for " << policy_app_id);
+ SDL_LOG_DEBUG("Specific app URL will be used for " << policy_app_id);
return it_specific->url.front();
}
@@ -1809,23 +1872,25 @@ std::string PolicyHandler::GetLockScreenIconUrl(
});
if (endpoints.end() != it_default && !it_default->url.empty()) {
- LOG4CXX_DEBUG(logger_, "Default URL will be used for " << policy_app_id);
+ SDL_LOG_DEBUG("Default URL will be used for " << policy_app_id);
return it_default->url.front();
}
- LOG4CXX_ERROR(logger_, "Can't find URL for " << policy_app_id);
+ SDL_LOG_ERROR("Can't find URL for " << policy_app_id);
return std::string();
}
std::string PolicyHandler::GetIconUrl(const std::string& policy_app_id) const {
- POLICY_LIB_CHECK_OR_RETURN(std::string(""));
- return policy_manager_->GetIconUrl(policy_app_id);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, std::string());
+ return policy_manager->GetIconUrl(policy_app_id);
}
uint32_t PolicyHandler::NextRetryTimeout() {
- POLICY_LIB_CHECK_OR_RETURN(0);
- LOG4CXX_AUTO_TRACE(logger_);
- return policy_manager_->NextRetryTimeout();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, 0);
+ SDL_LOG_AUTO_TRACE();
+ return policy_manager->NextRetryTimeout();
}
uint32_t PolicyHandler::TimeoutExchangeSec() const {
@@ -1833,37 +1898,42 @@ uint32_t PolicyHandler::TimeoutExchangeSec() const {
}
uint32_t PolicyHandler::TimeoutExchangeMSec() const {
- POLICY_LIB_CHECK_OR_RETURN(0);
- return policy_manager_->TimeoutExchangeMSec();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, 0);
+ return policy_manager->TimeoutExchangeMSec();
}
void PolicyHandler::OnExceededTimeout() {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
std::for_each(listeners_.begin(),
listeners_.end(),
std::mem_fn(&PolicyHandlerObserver::OnPTUTimeoutExceeded));
- policy_manager_->OnExceededTimeout();
+ policy_manager->OnExceededTimeout();
}
const boost::optional<bool> PolicyHandler::LockScreenDismissalEnabledState()
const {
- POLICY_LIB_CHECK_OR_RETURN(boost::optional<bool>());
- return policy_manager_->LockScreenDismissalEnabledState();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, boost::optional<bool>());
+ return policy_manager->LockScreenDismissalEnabledState();
}
const boost::optional<std::string>
PolicyHandler::LockScreenDismissalWarningMessage(
const std::string& language) const {
- POLICY_LIB_CHECK_OR_RETURN(boost::optional<std::string>());
- return policy_manager_->LockScreenDismissalWarningMessage(language);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, boost::optional<std::string>());
+ return policy_manager->LockScreenDismissalWarningMessage(language);
}
void PolicyHandler::PTUpdatedAt(Counters counter, int value) {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->PTUpdatedAt(counter, value);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->PTUpdatedAt(counter, value);
}
void PolicyHandler::add_listener(PolicyHandlerObserver* listener) {
@@ -1888,7 +1958,7 @@ PolicyHandler::GetStatisticManager() const {
}
void PolicyHandler::AddStatisticsInfo(int type) {
- POLICY_LIB_CHECK_VOID();
+ POLICY_LIB_CHECK_VOID(atomic_policy_manager_);
switch (static_cast<hmi_apis::Common_StatisticsType::eType>(type)) {
case hmi_apis::Common_StatisticsType::iAPP_BUFFER_FULL: {
usage_statistics::GlobalCounter count_of_iap_buffer_full(
@@ -1896,12 +1966,12 @@ void PolicyHandler::AddStatisticsInfo(int type) {
++count_of_iap_buffer_full;
break;
}
- default: { LOG4CXX_WARN(logger_, "Type of statistics is unknown"); }
+ default: { SDL_LOG_WARN("Type of statistics is unknown"); }
}
}
void PolicyHandler::OnSystemError(int code) {
- POLICY_LIB_CHECK_VOID();
+ POLICY_LIB_CHECK_VOID(atomic_policy_manager_);
switch (static_cast<hmi_apis::Common_SystemError::eType>(code)) {
case hmi_apis::Common_SystemError::SYNC_REBOOTED: {
usage_statistics::GlobalCounter count_of_sync_reboots(
@@ -1915,7 +1985,7 @@ void PolicyHandler::OnSystemError(int code) {
++count_sync_out_of_memory;
break;
}
- default: { LOG4CXX_WARN(logger_, "System error is unknown"); }
+ default: { SDL_LOG_WARN("System error is unknown"); }
}
}
@@ -1925,8 +1995,7 @@ custom_str::CustomString PolicyHandler::GetAppName(
application_manager_.application_by_policy_id(policy_app_id);
if (app.use_count() == 0) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Connection_key not found for application_id: " << policy_app_id);
return custom_str::CustomString("");
}
@@ -1935,7 +2004,7 @@ custom_str::CustomString PolicyHandler::GetAppName(
void PolicyHandler::OnUpdateHMIAppType(
std::map<std::string, StringArray> app_hmi_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(listeners_lock_);
HandlersCollection::const_iterator it = listeners_.begin();
for (; it != listeners_.end(); ++it) {
@@ -1945,7 +2014,7 @@ void PolicyHandler::OnUpdateHMIAppType(
#ifdef EXTERNAL_PROPRIETARY_MODE
void PolicyHandler::OnCertificateUpdated(const std::string& certificate_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (certificate_data.empty()) {
OnEmptyCertificateArrived();
return;
@@ -1957,21 +2026,19 @@ void PolicyHandler::OnCertificateUpdated(const std::string& certificate_data) {
const bool is_written = file_system::Write(
file_name,
std::vector<uint8_t>(certificate_data.begin(), certificate_data.end()));
- LOG4CXX_DEBUG(
- logger_,
- "Saving encrypted certificate data: \"" << certificate_data << '"');
+ SDL_LOG_DEBUG("Saving encrypted certificate data: \"" << certificate_data
+ << '"');
if (!is_written) {
- LOG4CXX_ERROR(logger_,
- "Unable to save encrypted certificate to file " << file_name);
+ SDL_LOG_ERROR("Unable to save encrypted certificate to file " << file_name);
return;
}
- LOG4CXX_DEBUG(logger_, "Saved encrypted certificate data" << file_name);
+ SDL_LOG_DEBUG("Saved encrypted certificate data" << file_name);
MessageHelper::SendDecryptCertificateToHMI(file_name, application_manager_);
}
void PolicyHandler::OnEmptyCertificateArrived() const {
- LOG4CXX_DEBUG(logger_, "Empty certificate arrived");
+ SDL_LOG_DEBUG("Empty certificate arrived");
const std::string empty_certificate;
sync_primitives::AutoLock lock(listeners_lock_);
std::for_each(
@@ -1982,36 +2049,35 @@ void PolicyHandler::OnEmptyCertificateArrived() const {
}
void PolicyHandler::OnCertificateDecrypted(bool is_succeeded) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
const std::string file_name =
file_system::GetAbsolutePath(get_settings().app_storage_folder()) + +"/" +
kCerficateFileName;
- LOG4CXX_DEBUG(logger_, "Loading certificate data from file " << file_name);
+ SDL_LOG_DEBUG("Loading certificate data from file " << file_name);
utils::ScopeGuard file_deleter =
utils::MakeGuard(file_system::DeleteFile, file_name);
UNUSED(file_deleter);
if (!is_succeeded) {
- LOG4CXX_ERROR(logger_, "Couldn't delete file " << file_name);
+ SDL_LOG_ERROR("Couldn't delete file " << file_name);
ProcessCertDecryptFailed();
return;
}
std::string certificate_data;
if (!file_system::ReadFile(file_name, certificate_data)) {
- LOG4CXX_ERROR(logger_,
- "Unable to read certificate from file " << file_name);
+ SDL_LOG_ERROR("Unable to read certificate from file " << file_name);
return;
}
- LOG4CXX_DEBUG(
- logger_,
- "Loaded decrypted certificate data: \"" << certificate_data << '"');
+ SDL_LOG_DEBUG("Loaded decrypted certificate data: \"" << certificate_data
+ << '"');
- policy_manager_->SetDecryptedCertificate(certificate_data);
+ policy_manager->SetDecryptedCertificate(certificate_data);
sync_primitives::AutoLock lock(listeners_lock_);
std::for_each(
@@ -2022,7 +2088,7 @@ void PolicyHandler::OnCertificateDecrypted(bool is_succeeded) {
}
void PolicyHandler::ProcessCertDecryptFailed() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(listeners_lock_);
std::for_each(
@@ -2034,7 +2100,7 @@ void PolicyHandler::ProcessCertDecryptFailed() {
#else // EXTERNAL_PROPRIETARY_MODE
void PolicyHandler::OnCertificateUpdated(const std::string& certificate_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(listeners_lock_);
HandlersCollection::const_iterator it = listeners_.begin();
for (; it != listeners_.end(); ++it) {
@@ -2046,7 +2112,7 @@ void PolicyHandler::OnCertificateUpdated(const std::string& certificate_data) {
void PolicyHandler::OnAuthTokenUpdated(const std::string& policy_app_id,
const std::string& auth_token) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(listeners_lock_);
HandlersCollection::const_iterator it = listeners_.begin();
for (; it != listeners_.end(); ++it) {
@@ -2056,7 +2122,7 @@ void PolicyHandler::OnAuthTokenUpdated(const std::string& policy_app_id,
}
void PolicyHandler::OnPTUFinished(const bool ptu_result) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(listeners_lock_);
PopAppIdFromPTUQueue();
@@ -2073,10 +2139,11 @@ bool PolicyHandler::CanUpdate() {
}
void PolicyHandler::RemoveDevice(const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
- policy_manager_->MarkUnpairedDevice(device_id);
+ policy_manager->MarkUnpairedDevice(device_id);
#ifdef EXTERNAL_PROPRIETARY_MODE
connection_handler::DeviceHandle device_uid;
if (application_manager_.connection_handler().GetDeviceID(device_id,
@@ -2091,33 +2158,37 @@ void PolicyHandler::RemoveDevice(const std::string& device_id) {
}
bool PolicyHandler::IsApplicationRevoked(const std::string& app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_OR_RETURN(false);
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
- return policy_manager_->IsApplicationRevoked(app_id);
+ return policy_manager->IsApplicationRevoked(app_id);
}
void PolicyHandler::OnUpdateRequestSentToMobile() {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
- policy_manager_->OnUpdateStarted();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->OnUpdateStarted();
}
bool PolicyHandler::CheckKeepContext(const std::string& policy_app_id) const {
- POLICY_LIB_CHECK_OR_RETURN(false);
- return policy_manager_->CanAppKeepContext(policy_app_id);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
+ return policy_manager->CanAppKeepContext(policy_app_id);
}
bool PolicyHandler::CheckStealFocus(const std::string& policy_app_id) const {
- POLICY_LIB_CHECK_OR_RETURN(false);
- return policy_manager_->CanAppStealFocus(policy_app_id);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
+ return policy_manager->CanAppStealFocus(policy_app_id);
}
bool PolicyHandler::CheckSystemAction(
mobile_apis::SystemAction::eType system_action,
const std::string& policy_app_id) const {
using namespace mobile_apis;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
switch (system_action) {
case SystemAction::STEAL_FOCUS:
return CheckStealFocus(policy_app_id);
@@ -2128,13 +2199,14 @@ bool PolicyHandler::CheckSystemAction(
default:
break;
}
- LOG4CXX_DEBUG(logger_, "Unknown system action");
+ SDL_LOG_DEBUG("Unknown system action");
return false;
}
std::vector<std::string> PolicyHandler::GetApplicationPolicyIDs() const {
- POLICY_LIB_CHECK_OR_RETURN(std::vector<std::string>());
- const auto all_policy_ids = policy_manager_->GetApplicationPolicyIDs();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, std::vector<std::string>());
+ const auto all_policy_ids = policy_manager->GetApplicationPolicyIDs();
std::vector<std::string> policy_app_ids;
std::copy_if(
@@ -2151,84 +2223,84 @@ std::vector<std::string> PolicyHandler::GetApplicationPolicyIDs() const {
void PolicyHandler::GetEnabledCloudApps(
std::vector<std::string>& enabled_apps) const {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->GetEnabledCloudApps(enabled_apps);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->GetEnabledCloudApps(enabled_apps);
}
bool PolicyHandler::GetAppProperties(const std::string& policy_app_id,
AppProperties& out_app_properties) const {
- POLICY_LIB_CHECK_OR_RETURN(false);
- return policy_manager_->GetAppProperties(policy_app_id, out_app_properties);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
+ return policy_manager->GetAppProperties(policy_app_id, out_app_properties);
}
std::vector<std::string> PolicyHandler::GetEnabledLocalApps() const {
- POLICY_LIB_CHECK_OR_RETURN(std::vector<std::string>());
- return policy_manager_->GetEnabledLocalApps();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, std::vector<std::string>());
+ return policy_manager->GetEnabledLocalApps();
}
const bool PolicyHandler::CheckCloudAppEnabled(
const std::string& policy_app_id) const {
- POLICY_LIB_CHECK_OR_RETURN(false);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
AppProperties out_app_properties;
- policy_manager_->GetAppProperties(policy_app_id, out_app_properties);
+ policy_manager->GetAppProperties(policy_app_id, out_app_properties);
return out_app_properties.enabled;
}
PolicyHandler::AppPropertiesState PolicyHandler::GetAppPropertiesStatus(
const smart_objects::SmartObject& properties,
const std::string& app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_OR_RETURN(AppPropertiesState::NO_CHANGES);
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, AppPropertiesState::NO_CHANGES);
AppProperties app_properties;
- policy_manager_->GetAppProperties(app_id, app_properties);
+ policy_manager->GetAppProperties(app_id, app_properties);
policy::StringArray nicknames;
policy::StringArray app_hmi_types;
- policy_manager_->GetInitialAppData(app_id, &nicknames, &app_hmi_types);
+ policy_manager->GetInitialAppData(app_id, &nicknames, &app_hmi_types);
if (properties.keyExists(strings::enabled) &&
app_properties.enabled != properties[strings::enabled].asBool()) {
- LOG4CXX_DEBUG(logger_,
- "\"enabled\" was changed from: "
- << app_properties.enabled
- << " to: " << properties[strings::enabled].asBool());
+ SDL_LOG_DEBUG("\"enabled\" was changed from: "
+ << app_properties.enabled
+ << " to: " << properties[strings::enabled].asBool());
return AppPropertiesState::ENABLED_FLAG_SWITCH;
}
if (properties.keyExists(strings::auth_token) &&
app_properties.auth_token != properties[strings::auth_token].asString()) {
- LOG4CXX_DEBUG(logger_,
- "\"auth_token\" was changed from: "
- << app_properties.auth_token
- << " to: " << properties[strings::auth_token].asString());
+ SDL_LOG_DEBUG("\"auth_token\" was changed from: "
+ << app_properties.auth_token
+ << " to: " << properties[strings::auth_token].asString());
return AppPropertiesState::AUTH_TOKEN_CHANGED;
}
if (properties.keyExists(strings::transport_type) &&
app_properties.transport_type !=
properties[strings::transport_type].asString()) {
- LOG4CXX_DEBUG(logger_,
- "\"transport_type\" was changed from: "
- << app_properties.transport_type << " to: "
- << properties[strings::transport_type].asString());
+ SDL_LOG_DEBUG("\"transport_type\" was changed from: "
+ << app_properties.transport_type
+ << " to: " << properties[strings::transport_type].asString());
return AppPropertiesState::TRANSPORT_TYPE_CHANGED;
}
if (properties.keyExists(strings::cloud_transport_type) &&
app_properties.transport_type !=
properties[strings::cloud_transport_type].asString()) {
- LOG4CXX_DEBUG(logger_,
- "\"transport_type\" was changed from: "
- << app_properties.transport_type << " to: "
- << properties[strings::cloud_transport_type].asString());
+ SDL_LOG_DEBUG("\"transport_type\" was changed from: "
+ << app_properties.transport_type << " to: "
+ << properties[strings::cloud_transport_type].asString());
return AppPropertiesState::TRANSPORT_TYPE_CHANGED;
}
if (properties.keyExists(strings::endpoint) &&
app_properties.endpoint != properties[strings::endpoint].asString()) {
- LOG4CXX_DEBUG(logger_,
- "\"endpoint\" was changed from: "
- << app_properties.endpoint
- << " to: " << properties[strings::endpoint].asString());
+ SDL_LOG_DEBUG("\"endpoint\" was changed from: "
+ << app_properties.endpoint
+ << " to: " << properties[strings::endpoint].asString());
return AppPropertiesState::ENDPOINT_CHANGED;
}
if (properties.keyExists(strings::nicknames)) {
@@ -2246,9 +2318,8 @@ PolicyHandler::AppPropertiesState PolicyHandler::GetAppPropertiesStatus(
const auto result =
std::find(nicknames.begin(), nicknames.end(), (*it_begin).asString());
if (nicknames.end() == result) {
- LOG4CXX_DEBUG(logger_,
- "\"nicknames\" were changed, new value: "
- << (*it_begin).asString());
+ SDL_LOG_DEBUG("\"nicknames\" were changed, new value: "
+ << (*it_begin).asString());
return AppPropertiesState::NICKNAMES_CHANGED;
}
}
@@ -2261,11 +2332,9 @@ PolicyHandler::AppPropertiesState PolicyHandler::GetAppPropertiesStatus(
mobile_apis::HybridAppPreference::eType>::
EnumToString(value, &hybrid_app_preference_str);
if (app_properties.hybrid_app_preference != hybrid_app_preference_str) {
- LOG4CXX_DEBUG(
- logger_,
- "\"hybrid_app_preference\" was changed from: "
- << app_properties.hybrid_app_preference << " to: "
- << properties[strings::hybrid_app_preference].asString());
+ SDL_LOG_DEBUG("\"hybrid_app_preference\" was changed from: "
+ << app_properties.hybrid_app_preference << " to: "
+ << properties[strings::hybrid_app_preference].asString());
return AppPropertiesState::HYBRYD_APP_PROPERTIES_CHANGED;
}
}
@@ -2273,34 +2342,36 @@ PolicyHandler::AppPropertiesState PolicyHandler::GetAppPropertiesStatus(
}
bool PolicyHandler::IsNewApplication(const std::string& policy_app_id) const {
- POLICY_LIB_CHECK_OR_RETURN(false);
- return policy_manager_->IsNewApplication(policy_app_id);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
+ return policy_manager->IsNewApplication(policy_app_id);
}
void PolicyHandler::OnSetAppProperties(
const smart_objects::SmartObject& properties) {
- POLICY_LIB_CHECK_VOID();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
const auto policy_app_id(properties[strings::policy_app_id].asString());
- policy_manager_->InitCloudApp(policy_app_id);
+ policy_manager->InitCloudApp(policy_app_id);
bool auth_token_update = false;
if (properties.keyExists(strings::enabled)) {
const bool enabled = properties[strings::enabled].asBool();
- policy_manager_->SetCloudAppEnabled(policy_app_id, enabled);
+ policy_manager->SetCloudAppEnabled(policy_app_id, enabled);
}
if (properties.keyExists(strings::auth_token)) {
const std::string auth_token = properties[strings::auth_token].asString();
- policy_manager_->SetAppAuthToken(policy_app_id, auth_token);
+ policy_manager->SetAppAuthToken(policy_app_id, auth_token);
auth_token_update = true;
}
if (properties.keyExists(strings::transport_type)) {
- policy_manager_->SetAppCloudTransportType(
+ policy_manager->SetAppCloudTransportType(
policy_app_id, properties[strings::transport_type].asString());
}
if (properties.keyExists(strings::endpoint)) {
- policy_manager_->SetAppEndpoint(policy_app_id,
- properties[strings::endpoint].asString());
+ policy_manager->SetAppEndpoint(policy_app_id,
+ properties[strings::endpoint].asString());
}
if (properties.keyExists(strings::nicknames)) {
StringArray nicknames;
@@ -2309,7 +2380,7 @@ void PolicyHandler::OnSetAppProperties(
for (size_t i = 0; i < nicknames_array.length(); ++i) {
nicknames.push_back(nicknames_array[i].asString());
}
- policy_manager_->SetAppNicknames(policy_app_id, nicknames);
+ policy_manager->SetAppNicknames(policy_app_id, nicknames);
}
if (properties.keyExists(strings::hybrid_app_preference)) {
std::string hybrid_app_preference;
@@ -2319,70 +2390,63 @@ void PolicyHandler::OnSetAppProperties(
smart_objects::EnumConversionHelper<
mobile_apis::HybridAppPreference::eType>::
EnumToString(value, &hybrid_app_preference);
- policy_manager_->SetHybridAppPreference(policy_app_id,
- hybrid_app_preference);
+ policy_manager->SetHybridAppPreference(policy_app_id,
+ hybrid_app_preference);
}
if (auth_token_update) {
AppProperties app_properties;
- if (policy_manager_->GetAppProperties(policy_app_id, app_properties)) {
+ if (policy_manager->GetAppProperties(policy_app_id, app_properties)) {
OnAuthTokenUpdated(policy_app_id, app_properties.auth_token);
}
}
}
void PolicyHandler::OnLocalAppAdded() {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->OnLocalAppAdded();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->OnLocalAppAdded();
}
void PolicyHandler::OnSetCloudAppProperties(
const smart_objects::SmartObject& message) {
- POLICY_LIB_CHECK_VOID();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
if (!message.keyExists(strings::msg_params)) {
- LOG4CXX_ERROR(
- logger_,
- "Message does not contain mandatory section " << strings::msg_params);
+ SDL_LOG_ERROR("Message does not contain mandatory section "
+ << strings::msg_params);
return;
}
if (!message[strings::msg_params].keyExists(strings::properties)) {
- LOG4CXX_ERROR(
- logger_,
- "Message does not contain app properties " << strings::msg_params);
+ SDL_LOG_ERROR("Message does not contain app properties "
+ << strings::msg_params);
return;
}
const smart_objects::SmartObject& properties =
message[strings::msg_params][strings::properties];
if (!properties.keyExists(strings::app_id)) {
- LOG4CXX_ERROR(
- logger_,
- "Message does not contain mandatory parameter " << strings::app_id);
+ SDL_LOG_ERROR("Message does not contain mandatory parameter "
+ << strings::app_id);
return;
}
std::string policy_app_id(properties[strings::app_id].asString());
- policy_manager_->InitCloudApp(policy_app_id);
+ policy_manager->InitCloudApp(policy_app_id);
bool auth_token_update = false;
- if (properties.keyExists(strings::enabled)) {
- bool enabled = properties[strings::enabled].asBool();
- policy_manager_->SetCloudAppEnabled(policy_app_id, enabled);
- auth_token_update = enabled;
- application_manager_.RefreshCloudAppInformation();
- }
if (properties.keyExists(strings::auth_token)) {
std::string auth_token = properties[strings::auth_token].asString();
- policy_manager_->SetAppAuthToken(policy_app_id, auth_token);
+ policy_manager->SetAppAuthToken(policy_app_id, auth_token);
auth_token_update = true;
}
if (properties.keyExists(strings::cloud_transport_type)) {
- policy_manager_->SetAppCloudTransportType(
+ policy_manager->SetAppCloudTransportType(
policy_app_id, properties[strings::cloud_transport_type].asString());
}
if (properties.keyExists(strings::endpoint)) {
- policy_manager_->SetAppEndpoint(policy_app_id,
- properties[strings::endpoint].asString());
+ policy_manager->SetAppEndpoint(policy_app_id,
+ properties[strings::endpoint].asString());
}
if (properties.keyExists(strings::nicknames)) {
StringArray nicknames;
@@ -2391,7 +2455,7 @@ void PolicyHandler::OnSetCloudAppProperties(
for (size_t i = 0; i < nicknames_array.length(); ++i) {
nicknames.push_back(nicknames_array[i].asString());
}
- policy_manager_->SetAppNicknames(policy_app_id, nicknames);
+ policy_manager->SetAppNicknames(policy_app_id, nicknames);
}
if (properties.keyExists(strings::hybrid_app_preference)) {
std::string hybrid_app_preference;
@@ -2401,14 +2465,22 @@ void PolicyHandler::OnSetCloudAppProperties(
smart_objects::EnumConversionHelper<
mobile_apis::HybridAppPreference::eType>::
EnumToString(value, &hybrid_app_preference);
- policy_manager_->SetHybridAppPreference(policy_app_id,
- hybrid_app_preference);
+ policy_manager->SetHybridAppPreference(policy_app_id,
+ hybrid_app_preference);
+ }
+ if (properties.keyExists(strings::enabled)) {
+ bool enabled = properties[strings::enabled].asBool();
+ policy_manager->SetCloudAppEnabled(policy_app_id, enabled);
+ if (!auth_token_update) {
+ auth_token_update = enabled;
+ }
+ application_manager_.RefreshCloudAppInformation();
}
if (auth_token_update) {
AppProperties app_properties;
- policy_manager_->GetAppProperties(policy_app_id, app_properties);
+ policy_manager->GetAppProperties(policy_app_id, app_properties);
OnAuthTokenUpdated(policy_app_id, app_properties.auth_token);
}
}
@@ -2416,9 +2488,10 @@ void PolicyHandler::OnSetCloudAppProperties(
void PolicyHandler::GetAppServiceParameters(
const std::string& policy_app_id,
policy_table::AppServiceParameters* app_service_parameters) const {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->GetAppServiceParameters(policy_app_id,
- app_service_parameters);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->GetAppServiceParameters(policy_app_id,
+ app_service_parameters);
}
bool PolicyHandler::CheckAppServiceParameters(
@@ -2426,8 +2499,6 @@ bool PolicyHandler::CheckAppServiceParameters(
const std::string& requested_service_name,
const std::string& requested_service_type,
smart_objects::SmartArray* requested_handled_rpcs) const {
- std::string service_name = std::string();
- std::string service_type = std::string();
std::vector<int32_t> handled_rpcs = {};
policy_table::AppServiceParameters app_service_parameters =
@@ -2436,24 +2507,21 @@ bool PolicyHandler::CheckAppServiceParameters(
if (app_service_parameters.find(requested_service_type) ==
app_service_parameters.end()) {
- LOG4CXX_DEBUG(logger_,
- "Disallowed service type: " << requested_service_type);
+ SDL_LOG_DEBUG("Disallowed service type: " << requested_service_type);
return false;
}
auto service_names =
*(app_service_parameters[requested_service_type].service_names);
if (!service_names.is_initialized()) {
- LOG4CXX_DEBUG(logger_,
- "Pt Service Name is Null, All service names accepted");
+ SDL_LOG_DEBUG("Pt Service Name is Null, All service names accepted");
} else if (!requested_service_name.empty()) {
auto find_name_result =
std::find(service_names.begin(),
service_names.end(),
rpc::String<0, 255>(requested_service_name));
if (find_name_result == service_names.end()) {
- LOG4CXX_DEBUG(logger_,
- "Disallowed service name: " << requested_service_name);
+ SDL_LOG_DEBUG("Disallowed service name: " << requested_service_name);
return false;
}
}
@@ -2472,8 +2540,7 @@ bool PolicyHandler::CheckAppServiceParameters(
auto find_result = std::find(
handled_rpcs.begin(), handled_rpcs.end(), requested_it->asInt());
if (find_result == handled_rpcs.end()) {
- LOG4CXX_DEBUG(logger_,
- "Disallowed by handled rpc: " << requested_it->asInt());
+ SDL_LOG_DEBUG("Disallowed by handled rpc: " << requested_it->asInt());
return false;
}
}
@@ -2483,21 +2550,24 @@ bool PolicyHandler::CheckAppServiceParameters(
bool PolicyHandler::UnknownRPCPassthroughAllowed(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_OR_RETURN(false);
- return policy_manager_->UnknownRPCPassthroughAllowed(policy_app_id);
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
+ return policy_manager->UnknownRPCPassthroughAllowed(policy_app_id);
}
uint32_t PolicyHandler::HeartBeatTimeout(const std::string& app_id) const {
- POLICY_LIB_CHECK_OR_RETURN(0);
- return policy_manager_->HeartBeatTimeout(app_id);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, 0);
+ return policy_manager->HeartBeatTimeout(app_id);
}
const std::string PolicyHandler::RemoteAppsUrl() const {
const std::string default_url;
- POLICY_LIB_CHECK_OR_RETURN(default_url);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, default_url);
EndpointUrls endpoints;
- policy_manager_->GetUpdateUrls("queryAppsUrl", endpoints);
+ policy_manager->GetUpdateUrls("queryAppsUrl", endpoints);
if (endpoints.empty() || endpoints[0].url.empty()) {
return default_url;
}
@@ -2506,18 +2576,20 @@ const std::string PolicyHandler::RemoteAppsUrl() const {
}
void PolicyHandler::OnAppsSearchStarted() {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->OnAppsSearchStarted();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->OnAppsSearchStarted();
}
void PolicyHandler::OnAppsSearchCompleted(const bool trigger_ptu) {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->OnAppsSearchCompleted(trigger_ptu);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->OnAppsSearchCompleted(trigger_ptu);
}
void PolicyHandler::OnAddedNewApplicationToAppList(
const uint32_t new_app_id, const std::string& policy_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (policy_id == last_registered_policy_app_id_) {
return;
}
@@ -2527,56 +2599,61 @@ void PolicyHandler::OnAddedNewApplicationToAppList(
void PolicyHandler::OnAppRegisteredOnMobile(const std::string& device_id,
const std::string& application_id) {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->OnAppRegisteredOnMobile(device_id, application_id);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->OnAppRegisteredOnMobile(device_id, application_id);
}
RequestType::State PolicyHandler::GetAppRequestTypeState(
const std::string& policy_app_id) const {
- POLICY_LIB_CHECK_OR_RETURN(RequestType::State::UNAVAILABLE);
- return policy_manager_->GetAppRequestTypesState(policy_app_id);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, RequestType::State::UNAVAILABLE);
+ return policy_manager->GetAppRequestTypesState(policy_app_id);
}
RequestSubType::State PolicyHandler::GetAppRequestSubTypeState(
const std::string& policy_app_id) const {
- POLICY_LIB_CHECK_OR_RETURN(RequestSubType::State::UNAVAILABLE);
- return policy_manager_->GetAppRequestSubTypesState(policy_app_id);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager,
+ RequestSubType::State::UNAVAILABLE);
+ return policy_manager->GetAppRequestSubTypesState(policy_app_id);
}
bool PolicyHandler::IsRequestTypeAllowed(
const transport_manager::DeviceHandle& device_id,
const std::string& policy_app_id,
mobile_apis::RequestType::eType type) const {
- POLICY_LIB_CHECK_OR_RETURN(false);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
using namespace mobile_apis;
const std::string stringified_type = RequestTypeToString(type);
if (stringified_type.empty()) {
- LOG4CXX_ERROR(logger_, "Unknown request type.");
+ SDL_LOG_ERROR("Unknown request type.");
return false;
}
const RequestType::State request_type_state =
- policy_manager_->GetAppRequestTypesState(policy_app_id);
+ policy_manager->GetAppRequestTypesState(policy_app_id);
switch (request_type_state) {
case RequestType::State::EMPTY: {
// If empty array of request types is assigned to app - any is allowed
- LOG4CXX_TRACE(logger_, "Any Request Type is allowed by policies.");
+ SDL_LOG_TRACE("Any Request Type is allowed by policies.");
return true;
}
case RequestType::State::OMITTED: {
// If RequestType parameter omitted for app - any is disallowed
- LOG4CXX_TRACE(logger_, "All Request Types are disallowed by policies.");
+ SDL_LOG_TRACE("All Request Types are disallowed by policies.");
return false;
}
case RequestType::State::AVAILABLE: {
// If any of request types is available for current application - get them
const auto request_types =
#ifdef EXTERNAL_PROPRIETARY_MODE
- policy_manager_->GetAppRequestTypes(device_id, policy_app_id);
+ policy_manager->GetAppRequestTypes(device_id, policy_app_id);
#else
- policy_manager_->GetAppRequestTypes(policy_app_id);
+ policy_manager->GetAppRequestTypes(policy_app_id);
#endif
return helpers::in_range(request_types, stringified_type);
}
@@ -2588,33 +2665,33 @@ bool PolicyHandler::IsRequestTypeAllowed(
bool PolicyHandler::IsRequestSubTypeAllowed(
const std::string& policy_app_id,
const std::string& request_subtype) const {
- POLICY_LIB_CHECK_OR_RETURN(false);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
using namespace mobile_apis;
if (request_subtype.empty()) {
- LOG4CXX_ERROR(logger_, "Request subtype to check is empty.");
+ SDL_LOG_ERROR("Request subtype to check is empty.");
return false;
}
const RequestSubType::State request_subtype_state =
- policy_manager_->GetAppRequestSubTypesState(policy_app_id);
+ policy_manager->GetAppRequestSubTypesState(policy_app_id);
switch (request_subtype_state) {
case RequestSubType::State::EMPTY: {
// If empty array of request subtypes is assigned to app - any is allowed
- LOG4CXX_TRACE(logger_, "Any Request SubType is allowed by policies.");
+ SDL_LOG_TRACE("Any Request SubType is allowed by policies.");
return true;
}
case RequestSubType::State::OMITTED: {
// If RequestSubType parameter omitted for app - any is disallowed
- LOG4CXX_TRACE(logger_,
- "All Request SubTypes are disallowed by policies.");
+ SDL_LOG_TRACE("All Request SubTypes are disallowed by policies.");
return false;
}
case RequestSubType::State::AVAILABLE: {
// If any of request subtypes is available for current application
// get them all
const auto request_subtypes =
- policy_manager_->GetAppRequestSubTypes(policy_app_id);
+ policy_manager->GetAppRequestSubTypes(policy_app_id);
return helpers::in_range(request_subtypes, request_subtype);
}
default:
@@ -2625,62 +2702,73 @@ bool PolicyHandler::IsRequestSubTypeAllowed(
const std::vector<std::string> PolicyHandler::GetAppRequestTypes(
const transport_manager::DeviceHandle& device_handle,
const std::string& policy_app_id) const {
- POLICY_LIB_CHECK_OR_RETURN(std::vector<std::string>());
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, std::vector<std::string>());
#ifdef EXTERNAL_PROPRIETARY_MODE
- return policy_manager_->GetAppRequestTypes(device_handle, policy_app_id);
+ return policy_manager->GetAppRequestTypes(device_handle, policy_app_id);
#else
- return policy_manager_->GetAppRequestTypes(policy_app_id);
+ return policy_manager->GetAppRequestTypes(policy_app_id);
#endif
}
const std::vector<std::string> PolicyHandler::GetAppRequestSubTypes(
const std::string& policy_app_id) const {
- POLICY_LIB_CHECK_OR_RETURN(std::vector<std::string>());
- return policy_manager_->GetAppRequestSubTypes(policy_app_id);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, std::vector<std::string>());
+ return policy_manager->GetAppRequestSubTypes(policy_app_id);
}
const std::vector<policy_table::VehicleDataItem>
policy::PolicyHandler::GetVehicleDataItems() const {
- POLICY_LIB_CHECK_OR_RETURN(std::vector<policy_table::VehicleDataItem>());
- return policy_manager_->GetVehicleDataItems();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager,
+ std::vector<policy_table::VehicleDataItem>());
+ return policy_manager->GetVehicleDataItems();
}
std::vector<rpc::policy_table_interface_base::VehicleDataItem>
policy::PolicyHandler::GetRemovedVehicleDataItems() const {
- POLICY_LIB_CHECK_OR_RETURN(std::vector<policy_table::VehicleDataItem>());
- return policy_manager_->GetRemovedVehicleDataItems();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager,
+ std::vector<policy_table::VehicleDataItem>());
+ return policy_manager->GetRemovedVehicleDataItems();
}
#ifdef EXTERNAL_PROPRIETARY_MODE
const MetaInfo PolicyHandler::GetMetaInfo() const {
- POLICY_LIB_CHECK_OR_RETURN(MetaInfo());
- return policy_manager_->GetMetaInfo();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, MetaInfo());
+ return policy_manager->GetMetaInfo();
}
#endif // EXTERNAL_PROPRIETARY_MODE
void PolicyHandler::Increment(usage_statistics::GlobalCounterId type) {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->Increment(type);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->Increment(type);
}
void PolicyHandler::Increment(const std::string& app_id,
usage_statistics::AppCounterId type) {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->Increment(app_id, type);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->Increment(app_id, type);
}
void PolicyHandler::Set(const std::string& app_id,
usage_statistics::AppInfoId type,
const std::string& value) {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->Set(app_id, type, value);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->Set(app_id, type, value);
}
void PolicyHandler::Add(const std::string& app_id,
usage_statistics::AppStopwatchId type,
int32_t timespan_seconds) {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->Add(app_id, type, timespan_seconds);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->Add(app_id, type, timespan_seconds);
}
bool PolicyHandler::IsUrlAppIdValid(const std::string app_id,
@@ -2695,9 +2783,8 @@ bool PolicyHandler::IsUrlAppIdValid(const std::string app_id,
}
const auto devices_ids = GetDevicesIds(app_id);
- LOG4CXX_TRACE(
- logger_,
- "Count devices: " << devices_ids.size() << " for app_id: " << app_id);
+ SDL_LOG_TRACE("Count devices: " << devices_ids.size()
+ << " for app_id: " << app_id);
for (const auto& device_id : devices_ids) {
const ApplicationSharedPtr app =
application_manager_.application(device_id, app_id);
@@ -2716,8 +2803,8 @@ std::vector<std::string> PolicyHandler::GetDevicesIds(
void PolicyHandler::UpdateHMILevel(ApplicationSharedPtr app,
mobile_apis::HMILevel::eType level) {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK_OR_RETURN_VOID(app);
+ SDL_LOG_AUTO_TRACE();
+ POLICY_LIB_CHECK_VOID(app);
if (app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW) ==
mobile_apis::HMILevel::HMI_NONE) {
// If default is FULL, send request to HMI. Notification to mobile will be
@@ -2725,77 +2812,76 @@ void PolicyHandler::UpdateHMILevel(ApplicationSharedPtr app,
if (mobile_apis::HMILevel::HMI_FULL == level) {
MessageHelper::SendActivateAppToHMI(app->app_id(), application_manager_);
} else {
- LOG4CXX_INFO(logger_,
- "Changing hmi level of application "
- << app->app_id() << " to default hmi level " << level);
+ SDL_LOG_INFO("Changing hmi level of application "
+ << app->app_id() << " to default hmi level " << level);
// Set application hmi level
application_manager_.ChangeAppsHMILevel(app->app_id(), level);
// If hmi Level is full, it will be seted after ActivateApp response
- MessageHelper::SendHMIStatusNotification(
- app,
- mobile_apis::PredefinedWindows::DEFAULT_WINDOW,
- application_manager_);
+ auto notification = MessageHelper::CreateHMIStatusNotification(
+ app, mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
+ application_manager_.GetRPCService().ManageMobileCommand(
+ notification, commands::Command::SOURCE_SDL);
}
}
}
bool PolicyHandler::CheckModule(const PTString& app_id,
const PTString& module) {
- POLICY_LIB_CHECK_OR_RETURN(false);
- return policy_manager_->CheckModule(app_id, module);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
+ return policy_manager->CheckModule(app_id, module);
}
void PolicyHandler::OnRemoteAppPermissionsChanged(
const std::string& device_id, const std::string& application_id) {
- POLICY_LIB_CHECK_VOID();
- policy_manager_->SendAppPermissionsChanged(device_id, application_id);
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
+ policy_manager->SendAppPermissionsChanged(device_id, application_id);
}
void PolicyHandler::OnUpdateHMIStatus(const std::string& device_id,
const std::string& policy_app_id,
const std::string& hmi_level) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app =
application_manager_.application(device_id, policy_app_id);
if (!app) {
- LOG4CXX_WARN(
- logger_,
- "Could not find application: " << device_id << " - " << policy_app_id);
+ SDL_LOG_WARN("Could not find application: " << device_id << " - "
+ << policy_app_id);
return;
}
- mobile_apis::HMILevel::eType level =
- MessageHelper::StringToHMILevel(hmi_level);
+ auto level = StringToEnum<mobile_apis::HMILevel::eType>(hmi_level);
if (mobile_apis::HMILevel::INVALID_ENUM == level) {
- LOG4CXX_WARN(
- logger_,
- "Couldn't convert default hmi level " << hmi_level << " to enum.");
+ SDL_LOG_WARN("Couldn't convert default hmi level " << hmi_level
+ << " to enum.");
return;
}
- LOG4CXX_INFO(logger_,
- "Changing hmi level of application "
- << app->app_id() << " to default hmi level " << level);
+ SDL_LOG_INFO("Changing hmi level of application "
+ << app->app_id() << " to default hmi level " << level);
// Set application hmi level
application_manager_.ChangeAppsHMILevel(app->app_id(), level);
- MessageHelper::SendHMIStatusNotification(
- app,
- mobile_apis::PredefinedWindows::DEFAULT_WINDOW,
- application_manager_);
+ auto notification = MessageHelper::CreateHMIStatusNotification(
+ app, mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
+ application_manager_.GetRPCService().ManageMobileCommand(
+ notification, commands::Command::SOURCE_SDL);
}
bool PolicyHandler::GetModuleTypes(const std::string& policy_app_id,
std::vector<std::string>* modules) const {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_OR_RETURN(false);
- return policy_manager_->GetModuleTypes(policy_app_id, modules);
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
+ return policy_manager->GetModuleTypes(policy_app_id, modules);
}
void PolicyHandler::SetDefaultHmiTypes(
const transport_manager::DeviceHandle& device_handle,
const std::string& application_id,
const smart_objects::SmartObject* app_types) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_VOID();
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_VOID(policy_manager);
std::vector<int> hmi_types;
if (app_types && app_types->asArray()) {
smart_objects::SmartArray* hmi_list = app_types->asArray();
@@ -2804,16 +2890,17 @@ void PolicyHandler::SetDefaultHmiTypes(
std::back_inserter(hmi_types),
SmartObjectToInt());
}
- policy_manager_->SetDefaultHmiTypes(device_handle, application_id, hmi_types);
+ policy_manager->SetDefaultHmiTypes(device_handle, application_id, hmi_types);
}
bool PolicyHandler::CheckHMIType(const std::string& application_id,
mobile_apis::AppHMIType::eType hmi,
const smart_objects::SmartObject* app_types) {
- LOG4CXX_AUTO_TRACE(logger_);
- POLICY_LIB_CHECK_OR_RETURN(false);
+ SDL_LOG_AUTO_TRACE();
+ const auto policy_manager = LoadPolicyManager();
+ POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
std::vector<int> policy_hmi_types;
- bool ret = policy_manager_->GetHMITypes(application_id, &policy_hmi_types);
+ bool ret = policy_manager->GetHMITypes(application_id, &policy_hmi_types);
std::vector<int> additional_hmi_types;
if (app_types && app_types->asArray()) {
@@ -2831,21 +2918,18 @@ bool PolicyHandler::CheckHMIType(const std::string& application_id,
void PolicyHandler::OnUpdateHMILevel(const std::string& device_id,
const std::string& policy_app_id,
const std::string& hmi_level) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app =
application_manager_.application(device_id, policy_app_id);
if (!app) {
- LOG4CXX_WARN(
- logger_,
- "Could not find application: " << device_id << " - " << policy_app_id);
+ SDL_LOG_WARN("Could not find application: " << device_id << " - "
+ << policy_app_id);
return;
}
- mobile_apis::HMILevel::eType level =
- MessageHelper::StringToHMILevel(hmi_level);
+ auto level = StringToEnum<mobile_apis::HMILevel::eType>(hmi_level);
if (mobile_apis::HMILevel::INVALID_ENUM == level) {
- LOG4CXX_WARN(
- logger_,
- "Couldn't convert default hmi level " << hmi_level << " to enum.");
+ SDL_LOG_WARN("Couldn't convert default hmi level " << hmi_level
+ << " to enum.");
return;
}
UpdateHMILevel(app, level);
diff --git a/src/components/application_manager/src/policies/policy_retry_sequence.cc b/src/components/application_manager/src/policies/policy_retry_sequence.cc
index 7d24d0b35c..abb2926c9e 100644
--- a/src/components/application_manager/src/policies/policy_retry_sequence.cc
+++ b/src/components/application_manager/src/policies/policy_retry_sequence.cc
@@ -38,7 +38,7 @@
namespace policy {
-CREATE_LOGGERPTR_GLOBAL(logger_, "PolicyHandler")
+SDL_CREATE_LOG_VARIABLE("PolicyHandler")
RetrySequence::RetrySequence(PolicyHandler* const policy_handler)
// TODO (Risk copy of PolicyHandler Pointer)
@@ -49,7 +49,7 @@ void RetrySequence::threadMain() {
}
void RetrySequence::StartNextRetry() {
- LOG4CXX_TRACE(logger_, "Start next retry of exchanging PT");
+ SDL_LOG_TRACE("Start next retry of exchanging PT");
DCHECK(policy_handler_);
// TODO(Ezamakhov): inverstigate StartNextRetry on unload policy lib
@@ -59,8 +59,7 @@ void RetrySequence::StartNextRetry() {
const uint32_t timeout = policy_handler_->TimeoutExchangeSec();
const int seconds = policy_handler_->NextRetryTimeout();
- LOG4CXX_DEBUG(logger_,
- "Timeout response: " << timeout << " Next try: " << seconds);
+ SDL_LOG_DEBUG("Timeout response: " << timeout << " Next try: " << seconds);
if (timeout > 0) {
sleep(timeout);
policy_handler_->OnExceededTimeout();
@@ -69,7 +68,7 @@ void RetrySequence::StartNextRetry() {
sleep(seconds);
StartNextRetry();
} else {
- LOG4CXX_INFO(logger_, "End retry sequence. Update PT was not received");
+ SDL_LOG_INFO("End retry sequence. Update PT was not received");
policy_handler_->OnPTUFinished(false);
}
}
diff --git a/src/components/utils/src/logger.cc b/src/components/application_manager/src/postponed_activation_controller.cc
index 5a7922afc4..59ee3d05e2 100644
--- a/src/components/utils/src/logger.cc
+++ b/src/components/application_manager/src/postponed_activation_controller.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Ford Motor Company
+ * Copyright (c) 2020, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,29 +30,37 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "utils/logger.h"
-#include <apr_time.h>
-#include "utils/log_message_loop_thread.h"
-#include "utils/logger_status.h"
-
-void deinit_logger() {
- CREATE_LOGGERPTR_LOCAL(logger_, "Utils")
- LOG4CXX_DEBUG(logger_, "Logger deinitialization");
- logger::set_logs_enabled(false);
- log4cxx::LoggerPtr rootLogger = log4cxx::Logger::getRootLogger();
- logger::delete_log_message_loop_thread(rootLogger);
- log4cxx::spi::LoggerRepositoryPtr repository =
- rootLogger->getLoggerRepository();
- log4cxx::LoggerList loggers = repository->getCurrentLoggers();
- for (log4cxx::LoggerList::iterator i = loggers.begin(); i != loggers.end();
- ++i) {
- log4cxx::LoggerPtr logger = *i;
- logger->removeAllAppenders();
+#include "application_manager/postponed_activation_controller.h"
+
+namespace application_manager {
+
+SDL_CREATE_LOG_VARIABLE("StateControllerImpl")
+
+PostponedActivationController::PostponedActivationController()
+ : activate_app_list_lock_ptr_(std::make_shared<sync_primitives::Lock>()) {}
+
+void PostponedActivationController::AddAppToActivate(uint32_t app_id,
+ uint32_t corr_id) {
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(activate_app_list_lock_ptr_);
+ app_to_activate_.insert(std::pair<uint32_t, uint32_t>(app_id, corr_id));
+}
+
+uint32_t PostponedActivationController::GetPendingActivationCorrId(
+ uint32_t app_id) const {
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(activate_app_list_lock_ptr_);
+ auto it = app_to_activate_.find(app_id);
+ if (app_to_activate_.end() == it) {
+ return 0;
}
- rootLogger->removeAllAppenders();
- logger::logger_status = logger::LoggerThreadNotCreated;
+ return it->second;
}
-log4cxx_time_t time_now() {
- return apr_time_now();
+void PostponedActivationController::RemoveAppToActivate(uint32_t app_id) {
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(activate_app_list_lock_ptr_);
+ app_to_activate_.erase(app_id);
}
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/request_controller.cc b/src/components/application_manager/src/request_controller.cc
index eaebaf4861..a34457ff66 100644
--- a/src/components/application_manager/src/request_controller.cc
+++ b/src/components/application_manager/src/request_controller.cc
@@ -44,7 +44,7 @@ namespace request_controller {
using namespace sync_primitives;
-CREATE_LOGGERPTR_GLOBAL(logger_, "RequestController")
+SDL_CREATE_LOG_VARIABLE("RequestController")
RequestController::RequestController(const RequestControlerSettings& settings)
: pool_state_(UNDEFINED)
@@ -57,13 +57,13 @@ RequestController::RequestController(const RequestControlerSettings& settings)
, timer_stop_flag_(false)
, is_low_voltage_(false)
, settings_(settings) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
InitializeThreadpool();
timer_.Start(0, timer::kSingleShot);
}
RequestController::~RequestController() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
{
sync_primitives::AutoLock auto_lock(timer_lock);
timer_stop_flag_ = true;
@@ -76,30 +76,30 @@ RequestController::~RequestController() {
}
void RequestController::InitializeThreadpool() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// TODO(DK): Consider lazy loading threads instead of creating all at once
pool_state_ = TPoolState::STARTED;
char name[50];
for (uint32_t i = 0; i < pool_size_; i++) {
- snprintf(name, sizeof(name) / sizeof(name[0]), "AM Pool %d", i);
+ snprintf(name, sizeof(name) / sizeof(name[0]), "AM Pool %u", i);
pool_.push_back(threads::CreateThread(name, new Worker(this)));
- pool_[i]->start();
- LOG4CXX_DEBUG(logger_, "Request thread initialized: " << name);
+ pool_[i]->Start();
+ SDL_LOG_DEBUG("Request thread initialized: " << name);
}
}
void RequestController::DestroyThreadpool() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
{
AutoLock auto_lock(mobile_request_list_lock_);
pool_state_ = TPoolState::STOPPED;
- LOG4CXX_DEBUG(logger_, "Broadcasting STOP signal to all threads...");
+ SDL_LOG_DEBUG("Broadcasting STOP signal to all threads...");
cond_var_.Broadcast(); // notify all threads we are shutting down
}
for (size_t i = 0; i < pool_.size(); i++) {
threads::Thread* thread = pool_[i];
- thread->join();
- delete thread->delegate();
+ thread->Stop(threads::Thread::kThreadSoftStop);
+ delete thread->GetDelegate();
threads::DeleteThread(thread);
}
pool_.clear();
@@ -107,9 +107,9 @@ void RequestController::DestroyThreadpool() {
RequestController::TResult RequestController::CheckPosibilitytoAdd(
const RequestPtr request, const mobile_apis::HMILevel::eType level) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!CheckPendingRequestsAmount(settings_.pending_requests_amount())) {
- LOG4CXX_ERROR(logger_, "Too many pending request");
+ SDL_LOG_ERROR("Too many pending request");
return RequestController::TOO_MANY_PENDING_REQUESTS;
}
@@ -117,18 +117,17 @@ RequestController::TResult RequestController::CheckPosibilitytoAdd(
request_tracker_.Track(request->connection_key(), level);
if (TrackResult::kNoneLevelMaxRequestsExceeded == track_result) {
- LOG4CXX_ERROR(logger_, "Too many application requests in hmi level NONE");
+ SDL_LOG_ERROR("Too many application requests in hmi level NONE");
return RequestController::NONE_HMI_LEVEL_MANY_REQUESTS;
}
if (TrackResult::kMaxRequestsExceeded == track_result) {
- LOG4CXX_ERROR(logger_, "Too many application requests");
+ SDL_LOG_ERROR("Too many application requests");
return RequestController::TOO_MANY_REQUESTS;
}
if (IsLowVoltage()) {
- LOG4CXX_ERROR(logger_,
- "Impossible to add request due to Low Voltage is active");
+ SDL_LOG_ERROR("Impossible to add request due to Low Voltage is active");
return RequestController::INVALID_DATA;
}
@@ -137,41 +136,38 @@ RequestController::TResult RequestController::CheckPosibilitytoAdd(
bool RequestController::CheckPendingRequestsAmount(
const uint32_t& pending_requests_amount) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (pending_requests_amount > 0) {
const size_t pending_requests_size = mobile_request_list_.size();
const bool available_to_add =
pending_requests_amount > pending_requests_size;
if (!available_to_add) {
- LOG4CXX_WARN(logger_,
- "Pending requests count " << pending_requests_size
+ SDL_LOG_WARN("Pending requests count " << pending_requests_size
<< " exceed application limit "
<< pending_requests_amount);
}
return available_to_add;
}
- LOG4CXX_DEBUG(logger_, "CheckPendingRequestsAmount disabled");
+ SDL_LOG_DEBUG("CheckPendingRequestsAmount disabled");
return true;
}
RequestController::TResult RequestController::addMobileRequest(
const RequestPtr request, const mobile_apis::HMILevel::eType& hmi_level) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!request) {
- LOG4CXX_ERROR(logger_, "Null Pointer request");
+ SDL_LOG_ERROR("Null Pointer request");
cond_var_.NotifyOne();
return INVALID_DATA;
}
- LOG4CXX_DEBUG(
- logger_,
- "correlation_id : " << request->correlation_id()
- << "connection_key : " << request->connection_key());
+ SDL_LOG_DEBUG("correlation_id : " << request->correlation_id()
+ << "connection_key : "
+ << request->connection_key());
RequestController::TResult result = CheckPosibilitytoAdd(request, hmi_level);
if (SUCCESS == result) {
AutoLock auto_lock_list(mobile_request_list_lock_);
mobile_request_list_.push_back(request);
- LOG4CXX_DEBUG(logger_,
- "Waiting for execution: " << mobile_request_list_.size());
+ SDL_LOG_DEBUG("Waiting for execution: " << mobile_request_list_.size());
// wake up one thread that is waiting for a task to be available
}
cond_var_.NotifyOne();
@@ -180,13 +176,13 @@ RequestController::TResult RequestController::addMobileRequest(
RequestController::TResult RequestController::addHMIRequest(
const RequestPtr request) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (request.use_count() == 0) {
- LOG4CXX_ERROR(logger_, "HMI request pointer is invalid");
+ SDL_LOG_ERROR("HMI request pointer is invalid");
return RequestController::INVALID_DATA;
}
- LOG4CXX_DEBUG(logger_, " correlation_id : " << request->correlation_id());
+ SDL_LOG_DEBUG(" correlation_id : " << request->correlation_id());
const uint64_t timeout_in_mseconds =
static_cast<uint64_t>(request->default_timeout());
@@ -194,30 +190,28 @@ RequestController::TResult RequestController::addHMIRequest(
std::make_shared<HMIRequestInfo>(request, timeout_in_mseconds);
if (0 == timeout_in_mseconds) {
- LOG4CXX_DEBUG(logger_,
- "Default timeout was set to 0."
- "RequestController will not track timeout of this request.");
+ SDL_LOG_DEBUG(
+ "Default timeout was set to 0."
+ "RequestController will not track timeout of this request.");
}
if (IsLowVoltage()) {
- LOG4CXX_ERROR(logger_,
- "Impossible to add request due to Low Voltage is active");
+ SDL_LOG_ERROR("Impossible to add request due to Low Voltage is active");
return RequestController::INVALID_DATA;
}
waiting_for_response_.Add(request_info_ptr);
- LOG4CXX_DEBUG(logger_,
- "Waiting for response count:" << waiting_for_response_.Size());
+ SDL_LOG_DEBUG("Waiting for response count:" << waiting_for_response_.Size());
NotifyTimer();
return RequestController::SUCCESS;
}
void RequestController::addNotification(const RequestPtr ptr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (IsLowVoltage()) {
- LOG4CXX_ERROR(
- logger_, "Impossible to add notification due to Low Voltage is active");
+ SDL_LOG_ERROR(
+ "Impossible to add notification due to Low Voltage is active");
return;
}
notification_list_.push_back(ptr);
@@ -225,30 +219,29 @@ void RequestController::addNotification(const RequestPtr ptr) {
void RequestController::removeNotification(
const commands::Command* notification) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::list<RequestPtr>::iterator it = notification_list_.begin();
for (; notification_list_.end() != it;) {
if (it->get() == notification) {
notification_list_.erase(it++);
- LOG4CXX_DEBUG(logger_, "Notification removed");
+ SDL_LOG_DEBUG("Notification removed");
return;
} else {
++it;
}
}
- LOG4CXX_DEBUG(logger_, "Cannot find notification");
+ SDL_LOG_DEBUG("Cannot find notification");
}
void RequestController::TerminateRequest(const uint32_t correlation_id,
const uint32_t connection_key,
const int32_t function_id,
bool force_terminate) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "correlation_id = "
- << correlation_id << " connection_key = " << connection_key
- << " function_id = " << function_id
- << " force_terminate = " << force_terminate);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("correlation_id = "
+ << correlation_id << " connection_key = " << connection_key
+ << " function_id = " << function_id
+ << " force_terminate = " << force_terminate);
{
AutoLock auto_lock(duplicate_message_count_lock_);
auto dup_it = duplicate_message_count_.find(correlation_id);
@@ -257,9 +250,9 @@ void RequestController::TerminateRequest(const uint32_t correlation_id,
if (0 == duplicate_message_count_[correlation_id]) {
duplicate_message_count_.erase(dup_it);
}
- LOG4CXX_DEBUG(logger_,
- "Ignoring termination request due to duplicate correlation "
- "ID being sent");
+ SDL_LOG_DEBUG(
+ "Ignoring termination request due to duplicate correlation "
+ "ID being sent");
return;
}
}
@@ -267,17 +260,17 @@ void RequestController::TerminateRequest(const uint32_t correlation_id,
RequestInfoPtr request =
waiting_for_response_.Find(connection_key, correlation_id);
if (!request) {
- LOG4CXX_WARN(logger_, "Request was not found in waiting_for_response");
+ SDL_LOG_WARN("Request was not found in waiting_for_response");
return;
}
if (request->request()->function_id() != function_id) {
- LOG4CXX_ERROR(logger_, "Request and response function_id's don't match");
+ SDL_LOG_ERROR("Request and response function_id's don't match");
return;
}
if (force_terminate || request->request()->AllowedToTerminate()) {
waiting_for_response_.RemoveRequest(request);
} else {
- LOG4CXX_WARN(logger_, "Request was not terminated");
+ SDL_LOG_WARN("Request was not terminated");
}
NotifyTimer();
}
@@ -285,21 +278,20 @@ void RequestController::TerminateRequest(const uint32_t correlation_id,
void RequestController::OnMobileResponse(const uint32_t mobile_correlation_id,
const uint32_t connection_key,
const int32_t function_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
TerminateRequest(mobile_correlation_id, connection_key, function_id);
}
void RequestController::OnHMIResponse(const uint32_t correlation_id,
const int32_t function_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
TerminateRequest(correlation_id, RequestInfo::HmiConnectionKey, function_id);
}
void RequestController::terminateWaitingForExecutionAppRequests(
const uint32_t& app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "app_id: " << app_id << "Waiting for execution"
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("app_id: " << app_id << "Waiting for execution"
<< mobile_request_list_.size());
AutoLock auto_lock(mobile_request_list_lock_);
std::list<RequestPtr>::iterator request_it = mobile_request_list_.begin();
@@ -311,22 +303,20 @@ void RequestController::terminateWaitingForExecutionAppRequests(
++request_it;
}
}
- LOG4CXX_DEBUG(logger_,
- "Waiting for execution " << mobile_request_list_.size());
+ SDL_LOG_DEBUG("Waiting for execution " << mobile_request_list_.size());
}
void RequestController::terminateWaitingForResponseAppRequests(
const uint32_t& app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
waiting_for_response_.RemoveByConnectionKey(app_id);
- LOG4CXX_DEBUG(
- logger_, "Waiting for response count : " << waiting_for_response_.Size());
+ SDL_LOG_DEBUG(
+ "Waiting for response count : " << waiting_for_response_.Size());
}
void RequestController::terminateAppRequests(const uint32_t& app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "app_id : " << app_id
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("app_id : " << app_id
<< "Requests waiting for execution count : "
<< mobile_request_list_.size()
<< "Requests waiting for response count : "
@@ -338,32 +328,31 @@ void RequestController::terminateAppRequests(const uint32_t& app_id) {
}
void RequestController::terminateAllHMIRequests() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
terminateWaitingForResponseAppRequests(RequestInfo::HmiConnectionKey);
}
void RequestController::terminateAllMobileRequests() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
waiting_for_response_.RemoveMobileRequests();
- LOG4CXX_DEBUG(logger_, "Mobile Requests waiting for response cleared");
+ SDL_LOG_DEBUG("Mobile Requests waiting for response cleared");
AutoLock waiting_execution_auto_lock(mobile_request_list_lock_);
mobile_request_list_.clear();
- LOG4CXX_DEBUG(logger_, "Mobile Requests waiting for execution cleared");
+ SDL_LOG_DEBUG("Mobile Requests waiting for execution cleared");
NotifyTimer();
}
void RequestController::updateRequestTimeout(const uint32_t& app_id,
const uint32_t& correlation_id,
const uint32_t& new_timeout) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- LOG4CXX_DEBUG(logger_,
- "app_id : " << app_id
+ SDL_LOG_DEBUG("app_id : " << app_id
<< " mobile_correlation_id : " << correlation_id
<< " new_timeout : " << new_timeout);
- LOG4CXX_DEBUG(logger_,
- "New_timeout is NULL. RequestCtrl will "
- "not manage this request any more");
+ SDL_LOG_DEBUG(
+ "New_timeout is NULL. RequestCtrl will "
+ "not manage this request any more");
RequestInfoPtr request_info =
waiting_for_response_.Find(app_id, correlation_id);
@@ -372,40 +361,37 @@ void RequestController::updateRequestTimeout(const uint32_t& app_id,
request_info->updateTimeOut(new_timeout);
waiting_for_response_.Add(request_info);
NotifyTimer();
- LOG4CXX_INFO(logger_,
- "Timeout updated for "
- << " app_id: " << app_id << " correlation_id: "
- << correlation_id << " new_timeout (ms): " << new_timeout);
+ SDL_LOG_INFO("Timeout updated for "
+ << " app_id: " << app_id << " correlation_id: "
+ << correlation_id << " new_timeout (ms): " << new_timeout);
} else {
- LOG4CXX_ERROR(logger_,
- "Can't find request with "
- << " app_id: " << app_id
- << " correlation_id: " << correlation_id);
+ SDL_LOG_ERROR("Can't find request with "
+ << " app_id: " << app_id
+ << " correlation_id: " << correlation_id);
}
}
void RequestController::OnLowVoltage() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
is_low_voltage_ = true;
}
void RequestController::OnWakeUp() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
terminateAllHMIRequests();
terminateAllMobileRequests();
is_low_voltage_ = false;
- LOG4CXX_DEBUG(logger_, "Terminate old requests done");
+ SDL_LOG_DEBUG("Terminate old requests done");
}
bool RequestController::IsLowVoltage() {
- LOG4CXX_TRACE(logger_, "result: " << is_low_voltage_);
+ SDL_LOG_TRACE("result: " << is_low_voltage_);
return is_low_voltage_;
}
void RequestController::TimeoutThread() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG(
"ENTER Waiting fore response count: " << waiting_for_response_.Size());
sync_primitives::AutoLock auto_lock(timer_lock);
while (!timer_stop_flag_) {
@@ -416,54 +402,49 @@ void RequestController::TimeoutThread() {
continue;
}
if (!probably_expired->isExpired()) {
- LOG4CXX_DEBUG(logger_,
- "Timeout for "
- << (RequestInfo::HMIRequest ==
- probably_expired->request_type()
- ? "HMI"
- : "Mobile")
- << " request id: " << probably_expired->requestId()
- << " connection_key: " << probably_expired->app_id()
- << " NOT expired");
+ SDL_LOG_DEBUG("Timeout for "
+ << (RequestInfo::HMIRequest ==
+ probably_expired->request_type()
+ ? "HMI"
+ : "Mobile")
+ << " request id: " << probably_expired->requestId()
+ << " connection_key: " << probably_expired->app_id()
+ << " NOT expired");
const date_time::TimeDuration current_time = date_time::getCurrentTime();
const date_time::TimeDuration end_time = probably_expired->end_time();
if (current_time < end_time) {
const uint32_t msecs =
static_cast<uint32_t>(date_time::getmSecs(end_time - current_time));
- LOG4CXX_DEBUG(logger_, "Sleep for " << msecs << " millisecs");
+ SDL_LOG_DEBUG("Sleep for " << msecs << " millisecs");
timer_condition_.WaitFor(auto_lock, msecs);
}
continue;
}
- LOG4CXX_INFO(logger_,
- "Timeout for "
- << (RequestInfo::HMIRequest ==
- probably_expired->request_type()
- ? "HMI"
- : "Mobile")
- << " request id: " << probably_expired->requestId()
- << " connection_key: " << probably_expired->app_id()
- << " is expired");
+ SDL_LOG_INFO("Timeout for "
+ << (RequestInfo::HMIRequest == probably_expired->request_type()
+ ? "HMI"
+ : "Mobile")
+ << " request id: " << probably_expired->requestId()
+ << " connection_key: " << probably_expired->app_id()
+ << " is expired");
const uint32_t experied_request_id = probably_expired->requestId();
const uint32_t experied_app_id = probably_expired->app_id();
probably_expired->request()->onTimeOut();
if (RequestInfo::HmiConnectionKey == probably_expired->app_id()) {
- LOG4CXX_DEBUG(logger_,
- "Erase HMI request: " << probably_expired->requestId());
+ SDL_LOG_DEBUG("Erase HMI request: " << probably_expired->requestId());
waiting_for_response_.RemoveRequest(probably_expired);
}
probably_expired = waiting_for_response_.FrontWithNotNullTimeout();
if (probably_expired) {
if (experied_request_id == probably_expired->requestId() &&
experied_app_id == probably_expired->app_id()) {
- LOG4CXX_DEBUG(logger_, "Expired request wasn't removed");
+ SDL_LOG_DEBUG("Expired request wasn't removed");
break;
}
}
}
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"EXIT Waiting for response count : " << waiting_for_response_.Size());
}
@@ -473,7 +454,7 @@ RequestController::Worker::Worker(RequestController* requestController)
RequestController::Worker::~Worker() {}
void RequestController::Worker::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
AutoLock auto_lock(thread_lock_);
while (!stop_flag_) {
// Try to pick a request
@@ -483,9 +464,9 @@ void RequestController::Worker::threadMain() {
(request_controller_->mobile_request_list_.empty())) {
// Wait until there is a task in the queue
// Unlock mutex while wait, then lock it back when signaled
- LOG4CXX_INFO(logger_, "Unlocking and waiting");
+ SDL_LOG_INFO("Unlocking and waiting");
request_controller_->cond_var_.Wait(auto_lock);
- LOG4CXX_INFO(logger_, "Signaled and locking");
+ SDL_LOG_INFO("Signaled and locking");
}
// If the thread was shutdown, return from here
@@ -494,7 +475,7 @@ void RequestController::Worker::threadMain() {
}
if (request_controller_->mobile_request_list_.empty()) {
- LOG4CXX_WARN(logger_, "Mobile request list is empty");
+ SDL_LOG_WARN("Mobile request list is empty");
break;
}
@@ -526,15 +507,15 @@ void RequestController::Worker::threadMain() {
}
continue;
}
- LOG4CXX_DEBUG(logger_, "timeout_in_mseconds " << timeout_in_mseconds);
+ SDL_LOG_DEBUG("timeout_in_mseconds " << timeout_in_mseconds);
if (0 != timeout_in_mseconds) {
request_controller_->NotifyTimer();
} else {
- LOG4CXX_DEBUG(logger_,
- "Default timeout was set to 0. "
- "RequestController will not track timeout "
- "of this request.");
+ SDL_LOG_DEBUG(
+ "Default timeout was set to 0. "
+ "RequestController will not track timeout "
+ "of this request.");
}
AutoUnlock unlock(auto_lock);
@@ -542,10 +523,9 @@ void RequestController::Worker::threadMain() {
// execute
if ((false == request_controller_->IsLowVoltage()) &&
request_ptr->CheckPermissions() && init_res) {
- LOG4CXX_DEBUG(logger_,
- "Execute MobileRequest corr_id = "
- << request_info_ptr->requestId()
- << " with timeout: " << timeout_in_mseconds);
+ SDL_LOG_DEBUG("Execute MobileRequest corr_id = "
+ << request_info_ptr->requestId()
+ << " with timeout: " << timeout_in_mseconds);
request_ptr->Run();
}
}
@@ -558,7 +538,7 @@ void RequestController::Worker::exitThreadMain() {
}
void RequestController::NotifyTimer() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
timer_condition_.NotifyOne();
}
diff --git a/src/components/application_manager/src/request_info.cc b/src/components/application_manager/src/request_info.cc
index 4f1e0a8f07..e1fffdf6fe 100644
--- a/src/components/application_manager/src/request_info.cc
+++ b/src/components/application_manager/src/request_info.cc
@@ -40,7 +40,7 @@ namespace application_manager {
namespace request_controller {
-CREATE_LOGGERPTR_GLOBAL(logger_, "RequestController")
+SDL_CREATE_LOG_VARIABLE("RequestController")
uint32_t RequestInfo::HmiConnectionKey = 0;
@@ -116,12 +116,20 @@ FakeRequestInfo::FakeRequestInfo(uint32_t app_id, uint32_t correaltion_id) {
correlation_id_ = correaltion_id;
}
+RequestInfoSet::~RequestInfoSet() {
+ sync_primitives::AutoLock lock(pending_requests_lock_);
+ auto it = time_sorted_pending_requests_.begin();
+ while (!time_sorted_pending_requests_.empty()) {
+ Erase(*it);
+ it = time_sorted_pending_requests_.begin();
+ }
+}
+
bool RequestInfoSet::Add(RequestInfoPtr request_info) {
DCHECK_OR_RETURN(request_info, false);
- LOG4CXX_DEBUG(
- logger_,
- "Add request app_id = " << request_info->app_id()
- << "; corr_id = " << request_info->requestId());
+ SDL_LOG_DEBUG("Add request app_id = " << request_info->app_id()
+ << "; corr_id = "
+ << request_info->requestId());
sync_primitives::AutoLock lock(pending_requests_lock_);
CheckSetSizes();
const std::pair<HashSortedRequestInfoSet::iterator, bool>& insert_resilt =
@@ -136,10 +144,9 @@ bool RequestInfoSet::Add(RequestInfoPtr request_info) {
CheckSetSizes();
return true;
} else {
- LOG4CXX_ERROR(logger_,
- "Request with app_id = "
- << request_info->app_id() << "; corr_id "
- << request_info->requestId() << " Already exist ");
+ SDL_LOG_ERROR("Request with app_id = "
+ << request_info->app_id() << "; corr_id "
+ << request_info->requestId() << " Already exist ");
}
CheckSetSizes();
return false;
@@ -174,7 +181,7 @@ RequestInfoPtr RequestInfoSet::Front() {
}
RequestInfoPtr RequestInfoSet::FrontWithNotNullTimeout() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(pending_requests_lock_);
RequestInfoPtr result;
TimeSortedRequestInfoSet::iterator it = time_sorted_pending_requests_.begin();
@@ -193,7 +200,7 @@ RequestInfoPtr RequestInfoSet::FrontWithNotNullTimeout() {
bool RequestInfoSet::Erase(const RequestInfoPtr request_info) {
DCHECK(request_info);
if (!request_info) {
- LOG4CXX_ERROR(logger_, "NULL ponter request_info");
+ SDL_LOG_ERROR("NULL ponter request_info");
return false;
}
CheckSetSizes();
@@ -205,14 +212,14 @@ bool RequestInfoSet::Erase(const RequestInfoPtr request_info) {
time_sorted_pending_requests_.find(request_info);
DCHECK(it != time_sorted_pending_requests_.end());
if (it == time_sorted_pending_requests_.end()) {
- LOG4CXX_ERROR(logger_, "Can't find request in time_sorted_requests_");
+ SDL_LOG_ERROR("Can't find request in time_sorted_requests_");
return false;
}
const RequestInfoPtr found = *it;
DCHECK(request_info == found);
time_sorted_pending_requests_.erase(it);
CheckSetSizes();
- return 1 == erased_count;
+ return true;
}
CheckSetSizes();
return false;
@@ -225,7 +232,7 @@ bool RequestInfoSet::RemoveRequest(const RequestInfoPtr request_info) {
uint32_t RequestInfoSet::RemoveRequests(
const RequestInfoSet::AppIdCompararator& filter) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t erased = 0;
sync_primitives::AutoLock lock(pending_requests_lock_);
@@ -244,13 +251,13 @@ uint32_t RequestInfoSet::RemoveRequests(
}
uint32_t RequestInfoSet::RemoveByConnectionKey(uint32_t connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return RemoveRequests(
AppIdCompararator(AppIdCompararator::Equal, connection_key));
}
uint32_t RequestInfoSet::RemoveMobileRequests() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return RemoveRequests(AppIdCompararator(AppIdCompararator::NotEqual,
RequestInfo::HmiConnectionKey));
}
diff --git a/src/components/application_manager/src/request_tracker.cc b/src/components/application_manager/src/request_tracker.cc
index 052667dc3f..2ad504aadf 100644
--- a/src/components/application_manager/src/request_tracker.cc
+++ b/src/components/application_manager/src/request_tracker.cc
@@ -39,19 +39,17 @@ namespace application_manager {
namespace request_controller {
-CREATE_LOGGERPTR_GLOBAL(logger_, "RequestController")
+SDL_CREATE_LOG_VARIABLE("RequestController")
RequestTracker::RequestTracker(const RequestControlerSettings& settings)
: settings_(settings) {}
TrackResult RequestTracker::Track(const ApplicationID& app_id,
const mobile_apis::HMILevel::eType level) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool track_result = false;
- LOG4CXX_DEBUG(logger_,
- "Tracking request for level: "
- << MessageHelper::StringifiedHMILevel(level));
+ SDL_LOG_DEBUG("Tracking request for level: " << EnumToString(level));
if (mobile_apis::HMILevel::HMI_NONE == level) {
track_result = Track(app_id,
@@ -76,44 +74,41 @@ bool RequestTracker::Track(const ApplicationID& app_id,
const uint32_t time_scale,
const uint32_t max_requests,
ApplicationsRequestsTracker& tracker) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace date_time;
if (!time_scale || !max_requests) {
- LOG4CXX_INFO(logger_, "Time scale request tracking is disabled.");
+ SDL_LOG_INFO("Time scale request tracking is disabled.");
return true;
}
- LOG4CXX_DEBUG(logger_,
- "Time scale is: " << time_scale << ". Max requests number is: "
+ SDL_LOG_DEBUG("Time scale is: " << time_scale << ". Max requests number is: "
<< max_requests);
- LOG4CXX_DEBUG(logger_, "Tracking app id: " << app_id);
+ SDL_LOG_DEBUG("Tracking app id: " << app_id);
ApplicationsRequestsTracker::iterator it_app = tracker.find(app_id);
if (tracker.end() == it_app) {
- LOG4CXX_DEBUG(logger_, "Adding new application into tracking.");
+ SDL_LOG_DEBUG("Adding new application into tracking.");
tracker[app_id].push_back(getCurrentTime());
return true;
}
- LOG4CXX_DEBUG(logger_,
- "Amount of known requests is: " << it_app->second.size());
+ SDL_LOG_DEBUG("Amount of known requests is: " << it_app->second.size());
if (it_app->second.size() < max_requests) {
- LOG4CXX_DEBUG(logger_, "Adding new request into tracking.");
+ SDL_LOG_DEBUG("Adding new request into tracking.");
tracker[app_id].push_back(getCurrentTime());
return true;
}
- LOG4CXX_DEBUG(logger_,
- "Oldest request is added at: "
- << getmSecs(it_app->second.front())
- << ". Current time is: " << getmSecs(getCurrentTime())
- << ". Time scale is: " << time_scale);
+ SDL_LOG_DEBUG("Oldest request is added at: "
+ << getmSecs(it_app->second.front())
+ << ". Current time is: " << getmSecs(getCurrentTime())
+ << ". Time scale is: " << time_scale);
if (calculateTimeSpan(it_app->second.front()) > time_scale) {
- LOG4CXX_DEBUG(logger_, "Dropping oldest request, adding new one.");
+ SDL_LOG_DEBUG("Dropping oldest request, adding new one.");
ApplicationsRequestsTracker::mapped_type& times = tracker[app_id];
DCHECK_OR_RETURN(!times.empty(), false);
@@ -123,7 +118,7 @@ bool RequestTracker::Track(const ApplicationID& app_id,
return true;
}
- LOG4CXX_DEBUG(logger_, "Requests amount per time scale is exceeded.");
+ SDL_LOG_DEBUG("Requests amount per time scale is exceeded.");
return false;
}
diff --git a/src/components/application_manager/src/resumption/pending_resumption_handler.cc b/src/components/application_manager/src/resumption/pending_resumption_handler.cc
new file mode 100644
index 0000000000..9547cba5a6
--- /dev/null
+++ b/src/components/application_manager/src/resumption/pending_resumption_handler.cc
@@ -0,0 +1,66 @@
+/*
+ Copyright (c) 2020, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "application_manager/resumption/pending_resumption_handler.h"
+#include "application_manager/resumption/resumption_data_processor.h"
+#include "smart_objects/smart_object.h"
+
+namespace resumption {
+
+namespace app_mngr = application_manager;
+
+SDL_CREATE_LOG_VARIABLE("PendingResumptionHandler")
+
+PendingResumptionHandler::PendingResumptionHandler(
+ app_mngr::ApplicationManager& application_manager)
+ : application_manager::event_engine::EventObserver(
+ application_manager.event_dispatcher())
+ , application_manager_(application_manager) {}
+
+resumption::ResumptionDataProcessor&
+PendingResumptionHandler::resumption_data_processor() {
+ return application_manager_.resume_controller().resumption_data_processor();
+}
+
+ResumptionRequest PendingResumptionHandler::MakeResumptionRequest(
+ const uint32_t corr_id,
+ const hmi_apis::FunctionID::eType function_id,
+ const smart_objects::SmartObject& message) {
+ SDL_LOG_AUTO_TRACE();
+ resumption::ResumptionRequest resumption_request;
+ resumption_request.request_id.correlation_id = corr_id;
+ resumption_request.request_id.function_id = function_id;
+ resumption_request.message = message;
+ return resumption_request;
+}
+
+} // namespace resumption
diff --git a/src/components/application_manager/src/resumption/resume_ctrl_impl.cc b/src/components/application_manager/src/resumption/resume_ctrl_impl.cc
index 486cb76369..6a045fda03 100644
--- a/src/components/application_manager/src/resumption/resume_ctrl_impl.cc
+++ b/src/components/application_manager/src/resumption/resume_ctrl_impl.cc
@@ -43,6 +43,7 @@
#include "application_manager/policies/policy_handler.h"
#include "application_manager/resumption/resumption_data_db.h"
#include "application_manager/resumption/resumption_data_json.h"
+#include "application_manager/resumption/resumption_data_processor_impl.h"
#include "application_manager/state_controller.h"
#include "connection_handler/connection.h"
#include "connection_handler/connection_handler_impl.h"
@@ -59,13 +60,13 @@ static mobile_api::HMILevel::eType PickHigherHmiLevel(
mobile_api::HMILevel::eType val1, mobile_api::HMILevel::eType val2);
static mobile_api::HMILevel::eType PickLowerHmiLevel(
mobile_api::HMILevel::eType val1, mobile_api::HMILevel::eType val2);
-static mobile_api::HMILevel::eType ConvertHmiLevelString(const std::string str);
+static mobile_api::HMILevel::eType ConvertHmiLevelString(
+ const std::string& str);
-CREATE_LOGGERPTR_GLOBAL(logger_, "Resumption")
+SDL_CREATE_LOG_VARIABLE("Resumption")
ResumeCtrlImpl::ResumeCtrlImpl(ApplicationManager& application_manager)
- : event_engine::EventObserver(application_manager.event_dispatcher())
- , restore_hmi_level_timer_(
+ : restore_hmi_level_timer_(
"RsmCtrlRstore",
new timer::TimerTaskImpl<ResumeCtrlImpl>(
this, &ResumeCtrlImpl::ApplicationResumptiOnTimer))
@@ -78,7 +79,9 @@ ResumeCtrlImpl::ResumeCtrlImpl(ApplicationManager& application_manager)
, launch_time_(time(nullptr))
, low_voltage_time_(0)
, wake_up_time_(0)
- , application_manager_(application_manager) {}
+ , application_manager_(application_manager)
+ , resumption_data_processor_(
+ new ResumptionDataProcessorImpl(application_manager)) {}
#ifdef BUILD_TESTS
void ResumeCtrlImpl::set_resumption_storage(
std::shared_ptr<ResumptionData> mock_storage) {
@@ -104,9 +107,9 @@ bool ResumeCtrlImpl::Init(resumption::LastStateWrapperPtr last_state_wrapper) {
dynamic_cast<ResumptionDataDB*>(resumption_storage_.get());
if (!db->IsDBVersionActual()) {
- LOG4CXX_INFO(logger_,
- "DB version had been changed. "
- "Rebuilding resumption DB.");
+ SDL_LOG_INFO(
+ "DB version had been changed. "
+ "Rebuilding resumption DB.");
smart_objects::SmartObject data;
db->GetAllData(data);
@@ -122,7 +125,7 @@ bool ResumeCtrlImpl::Init(resumption::LastStateWrapperPtr last_state_wrapper) {
resumption_storage_.reset(
new ResumptionDataJson(last_state_wrapper, application_manager_));
if (!resumption_storage_->Init()) {
- LOG4CXX_DEBUG(logger_, "Resumption storage initialisation failed");
+ SDL_LOG_DEBUG("Resumption storage initialisation failed");
return false;
}
}
@@ -147,54 +150,40 @@ void ResumeCtrlImpl::SaveAllApplications() {
}
void ResumeCtrlImpl::SaveApplication(ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(application);
if (application_manager_.IsLowVoltage()) {
- LOG4CXX_DEBUG(logger_, "Low Voltage state is active");
+ SDL_LOG_DEBUG("Low Voltage state is active");
return;
}
- LOG4CXX_DEBUG(
- logger_,
- "application with appID " << application->app_id() << " will be saved");
+ SDL_LOG_DEBUG("application with appID " << application->app_id()
+ << " will be saved");
resumption_storage_->SaveApplication(application);
}
-void ResumeCtrlImpl::on_event(const event_engine::Event& event) {
- LOG4CXX_DEBUG(logger_, "Event received: " << event.id());
-
- if (hmi_apis::FunctionID::UI_CreateWindow == event.id()) {
- LOG4CXX_INFO(logger_, "Received UI_CreateWindow event");
- const auto& response_message = event.smart_object();
- RestoreWidgetsHMIState(response_message);
- }
-}
-
-bool ResumeCtrlImpl::RestoreAppHMIState(ApplicationSharedPtr application) {
+void ResumeCtrlImpl::RestoreAppHMIState(ApplicationSharedPtr application) {
using namespace mobile_apis;
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK_OR_RETURN(application, false);
- LOG4CXX_DEBUG(logger_,
- "app_id : " << application->app_id() << "; policy_app_id : "
+ SDL_LOG_AUTO_TRACE();
+ DCHECK(application);
+ SDL_LOG_DEBUG("app_id : " << application->app_id() << "; policy_app_id : "
<< application->policy_app_id());
const std::string& device_mac = application->mac_address();
smart_objects::SmartObject saved_app(smart_objects::SmartType_Map);
bool result = resumption_storage_->GetSavedApplication(
application->policy_app_id(), device_mac, saved_app);
if (result) {
- DCHECK_OR_RETURN(application, false);
if (saved_app.keyExists(strings::hmi_level)) {
HMILevel::eType saved_hmi_level;
if (HMILevel::eType::INVALID_ENUM !=
application->deferred_resumption_hmi_level()) {
saved_hmi_level = application->deferred_resumption_hmi_level();
- LOG4CXX_INFO(logger_,
- "Retry resuming into HMI level : " << saved_hmi_level);
+ SDL_LOG_INFO("Retry resuming into HMI level : " << saved_hmi_level);
application->set_deferred_resumption_hmi_level(
HMILevel::eType::INVALID_ENUM);
} else {
saved_hmi_level = static_cast<mobile_apis::HMILevel::eType>(
saved_app[strings::hmi_level].asInt());
- LOG4CXX_DEBUG(logger_, "Saved HMI Level is : " << saved_hmi_level);
+ SDL_LOG_DEBUG("Saved HMI Level is : " << saved_hmi_level);
}
// Check one of the high-bandwidth transports (configured through
@@ -209,120 +198,39 @@ bool ResumeCtrlImpl::RestoreAppHMIState(ApplicationSharedPtr application) {
saved_hmi_level =
PickLowerHmiLevel(saved_hmi_level, low_bandwidth_level);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"High-bandwidth transport not available, app will resume into : "
- << saved_hmi_level);
+ << saved_hmi_level);
}
const bool app_exists_in_full_or_limited =
application_manager_.get_full_or_limited_application().use_count() !=
0;
- const bool app_hmi_state_is_set =
- SetAppHMIState(application, saved_hmi_level, true);
- size_t restored_widgets = 0;
- if (app_hmi_state_is_set &&
- application->is_app_data_resumption_allowed()) {
- restored_widgets = RestoreAppWidgets(application, saved_app);
- }
- if (0 == restored_widgets && app_exists_in_full_or_limited) {
- LOG4CXX_DEBUG(logger_, "App exists in full or limited. Do not resume");
- return false;
+ SetAppHMIState(application, saved_hmi_level, true);
+ if (app_exists_in_full_or_limited) {
+ SDL_LOG_DEBUG("App exists in full or limited. Do not resume");
+ return;
}
} else {
- result = false;
- LOG4CXX_ERROR(logger_, "saved app data corrupted");
+ SDL_LOG_ERROR("saved app data corrupted");
}
} else {
- LOG4CXX_ERROR(logger_, "Application not saved");
- }
- return result;
-}
-
-void ResumeCtrlImpl::RestoreWidgetsHMIState(
- const smart_objects::SmartObject& response_message) {
- LOG4CXX_AUTO_TRACE(logger_);
- const auto correlation_id =
- response_message[strings::params][strings::correlation_id].asInt();
- const auto& request = requests_msg_.find(correlation_id);
- if (requests_msg_.end() == request) {
- LOG4CXX_ERROR(logger_,
- "Request UI_CreateWindow for correlation id: "
- << correlation_id << " not found");
- return;
- }
-
- const auto& msg_params = (*request->second)[strings::msg_params];
- const auto hmi_app_id = msg_params[strings::app_id].asInt();
- auto application = application_manager_.application_by_hmi_app(hmi_app_id);
- if (!application) {
- LOG4CXX_ERROR(logger_,
- "Application is not registered by hmi id: " << hmi_app_id);
- requests_msg_.erase(request);
- return;
- }
- const WindowID window_id = msg_params[strings::window_id].asInt();
-
- const auto result_code = static_cast<hmi_apis::Common_Result::eType>(
- response_message[strings::params][hmi_response::code].asInt());
- if (hmi_apis::Common_Result::SUCCESS != result_code) {
- LOG4CXX_ERROR(logger_,
- "UI_CreateWindow for correlation id: "
- << correlation_id
- << " failed with code: " << result_code);
- requests_msg_.erase(request);
- auto& builder = application->display_capabilities_builder();
- builder.StopWaitingForWindow(window_id);
- return;
+ SDL_LOG_ERROR("Application not saved");
}
-
- smart_objects::SmartObject window_info(smart_objects::SmartType_Map);
- auto fill_optional_param = [&window_info,
- &msg_params](const std::string& key) {
- if (msg_params.keyExists(key)) {
- window_info[key] = msg_params[key].asString();
- }
- };
- fill_optional_param(strings::associated_service_type);
- fill_optional_param(strings::duplicate_updates_from_window_id);
-
- const auto window_name = msg_params[strings::window_name].asString();
- window_info[strings::window_name] = window_name;
- application->SetWindowInfo(window_id, window_info);
-
- const auto window_type = static_cast<mobile_apis::WindowType::eType>(
- msg_params[strings::window_type].asInt());
- // State should be initialized with INVALID_ENUM value to let state controller
- // trigger OnHmiStatus notifiation sending
- auto initial_state = application_manager_.CreateRegularState(
- application,
- window_type,
- mobile_apis::HMILevel::INVALID_ENUM,
- mobile_apis::AudioStreamingState::INVALID_ENUM,
- mobile_apis::VideoStreamingState::INVALID_ENUM,
- mobile_api::SystemContext::INVALID_ENUM);
- application->SetInitialState(window_id, window_name, initial_state);
-
- // Default HMI level for all windows except the main one is always NONE
- application_manager_.state_controller().OnAppWindowAdded(
- application, window_id, window_type, mobile_apis::HMILevel::HMI_NONE);
-
- requests_msg_.erase(request);
}
void ResumeCtrlImpl::ProcessSystemCapabilityUpdated(
Application& app, const smart_objects::SmartObject& display_capabilities) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto notification = MessageHelper::CreateDisplayCapabilityUpdateToMobile(
display_capabilities, app);
application_manager_.GetRPCService().ManageMobileCommand(
notification, commands::Command::SOURCE_SDL);
- app.set_is_resuming(false);
}
bool ResumeCtrlImpl::SetupDefaultHMILevel(ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN(application, false);
mobile_apis::HMILevel::eType hmi_level =
application_manager_.GetDefaultHmiLevel(application);
@@ -335,28 +243,26 @@ bool ResumeCtrlImpl::SetupDefaultHMILevel(ApplicationSharedPtr application) {
mobile_apis::HMILevel::eType low_bandwidth_level =
GetHmiLevelOnLowBandwidthTransport(application);
hmi_level = PickLowerHmiLevel(hmi_level, low_bandwidth_level);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"High-bandwidth transport not available, default HMI level is set to : "
- << hmi_level);
+ << hmi_level);
}
return SetAppHMIState(application, hmi_level, false);
}
void ResumeCtrlImpl::ApplicationResumptiOnTimer() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(queue_lock_);
WaitingForTimerList::iterator it = waiting_for_timer_.begin();
for (; it != waiting_for_timer_.end(); ++it) {
ApplicationSharedPtr app = application_manager_.application(*it);
if (!app) {
- LOG4CXX_ERROR(logger_, "Invalid app_id = " << *it);
+ SDL_LOG_ERROR("Invalid app_id = " << *it);
continue;
}
- if (!StartAppHmiStateResumption(app)) {
- app->set_is_resuming(false);
- }
+ StartAppHmiStateResumption(app);
+ app->set_is_resuming(false);
}
is_resumption_active_ = false;
waiting_for_timer_.clear();
@@ -371,7 +277,7 @@ void ResumeCtrlImpl::OnAppActivated(ApplicationSharedPtr application) {
}
void ResumeCtrlImpl::RemoveFromResumption(uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
queue_lock_.Acquire();
waiting_for_timer_.remove(app_id);
queue_lock_.Release();
@@ -386,55 +292,30 @@ bool ResumeCtrlImpl::SetAppHMIState(
const mobile_apis::HMILevel::eType hmi_level,
bool check_policy) {
using namespace mobile_apis;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN(application, false);
- LOG4CXX_TRACE(logger_,
- " app_id : " << application->app_id()
+ SDL_LOG_TRACE(" app_id : " << application->app_id()
<< ", hmi_level : " << hmi_level
<< ", check_policy : " << check_policy);
const std::string& device_mac = application->mac_address();
if (check_policy &&
application_manager_.GetUserConsentForDevice(device_mac) !=
policy::DeviceConsent::kDeviceAllowed) {
- LOG4CXX_ERROR(logger_, "Resumption abort. Data consent wasn't allowed.");
+ SDL_LOG_ERROR("Resumption abort. Data consent wasn't allowed.");
SetupDefaultHMILevel(application);
return false;
}
application_manager_.state_controller().SetRegularState(
application, mobile_apis::PredefinedWindows::DEFAULT_WINDOW, hmi_level);
- LOG4CXX_INFO(logger_,
- "Application with policy id " << application->policy_app_id()
+ SDL_LOG_INFO("Application with policy id " << application->policy_app_id()
<< " got HMI level " << hmi_level);
return true;
}
-size_t ResumeCtrlImpl::RestoreAppWidgets(
- application_manager::ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app) {
- using namespace mobile_apis;
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK(application);
- if (!saved_app.keyExists(strings::windows_info)) {
- LOG4CXX_ERROR(logger_, "windows_info section does not exist");
- return 0;
- }
- const auto& windows_info = saved_app[strings::windows_info];
- auto request_list = MessageHelper::CreateUICreateWindowRequestsToHMI(
- application, application_manager_, windows_info);
-
- requests_msg_.clear();
- for (auto& request : request_list) {
- requests_msg_.insert(std::make_pair(
- (*request)[strings::params][strings::correlation_id].asInt(), request));
- }
- ProcessHMIRequests(request_list);
- return request_list.size();
-}
-
bool ResumeCtrlImpl::IsHMIApplicationIdExist(uint32_t hmi_app_id) {
- LOG4CXX_DEBUG(logger_, "hmi_app_id :" << hmi_app_id);
+ SDL_LOG_DEBUG("hmi_app_id :" << hmi_app_id);
return resumption_storage_->IsHMIApplicationIdExist(hmi_app_id);
}
@@ -452,7 +333,7 @@ uint32_t ResumeCtrlImpl::GetHMIApplicationID(
bool ResumeCtrlImpl::RemoveApplicationFromSaved(
ApplicationConstSharedPtr application) {
if (application_manager_.IsLowVoltage()) {
- LOG4CXX_DEBUG(logger_, "Low Voltage state is active");
+ SDL_LOG_DEBUG("Low Voltage state is active");
return false;
}
const std::string& device_mac = application->mac_address();
@@ -461,13 +342,14 @@ bool ResumeCtrlImpl::RemoveApplicationFromSaved(
}
void ResumeCtrlImpl::OnSuspend() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
is_suspended_ = true;
FinalPersistData();
}
void ResumeCtrlImpl::OnIgnitionOff() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
+ DCHECK_OR_RETURN_VOID(resumption_storage_);
if (!application_manager_.IsLowVoltage()) {
resumption_storage_->IncrementIgnOffCount();
resumption_storage_->ResetGlobalIgnOnCount();
@@ -476,7 +358,7 @@ void ResumeCtrlImpl::OnIgnitionOff() {
}
void ResumeCtrlImpl::OnAwake() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
is_suspended_ = false;
ResetLaunchTime();
StartSavePersistentDataTimer();
@@ -484,13 +366,12 @@ void ResumeCtrlImpl::OnAwake() {
void ResumeCtrlImpl::SaveLowVoltageTime() {
low_voltage_time_ = time(nullptr);
- LOG4CXX_DEBUG(logger_,
- "Low Voltage timestamp : " << low_voltage_time_ << " saved");
+ SDL_LOG_DEBUG("Low Voltage timestamp : " << low_voltage_time_ << " saved");
}
void ResumeCtrlImpl::SaveWakeUpTime() {
wake_up_time_ = std::time(nullptr);
- LOG4CXX_DEBUG(logger_, "Wake Up timestamp : " << wake_up_time_ << " saved");
+ SDL_LOG_DEBUG("Wake Up timestamp : " << wake_up_time_ << " saved");
}
time_t ResumeCtrlImpl::LowVoltageTime() const {
@@ -506,7 +387,7 @@ bool ResumeCtrlImpl::is_suspended() const {
}
void ResumeCtrlImpl::StartSavePersistentDataTimer() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!save_persistent_data_timer_.is_running()) {
save_persistent_data_timer_.Start(
application_manager_.get_settings()
@@ -515,59 +396,60 @@ void ResumeCtrlImpl::StartSavePersistentDataTimer() {
}
}
+ResumptionDataProcessor& ResumeCtrlImpl::resumption_data_processor() {
+ return *resumption_data_processor_;
+}
+
void ResumeCtrlImpl::StopSavePersistentDataTimer() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (save_persistent_data_timer_.is_running()) {
save_persistent_data_timer_.Stop();
}
}
bool ResumeCtrlImpl::StartResumption(ApplicationSharedPtr application,
- const std::string& hash) {
- LOG4CXX_AUTO_TRACE(logger_);
+ const std::string& hash,
+ ResumptionCallBack callback) {
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN(application, false);
- LOG4CXX_DEBUG(
- logger_,
- " Resume app_id = " << application->app_id()
- << " hmi_app_id = " << application->hmi_app_id()
- << " policy_id = " << application->policy_app_id()
- << " received hash = " << hash);
+ SDL_LOG_DEBUG(" Resume app_id = "
+ << application->app_id()
+ << " hmi_app_id = " << application->hmi_app_id()
+ << " policy_id = " << application->policy_app_id()
+ << " received hash = " << hash);
application->set_is_resuming(true);
- if (!application->is_cloud_app()) {
- // Default HMI Level is already set before resumption in
- // ApplicationManager::OnApplicationRegistered, and handling low bandwidth
- // transports doesn't apply to cloud apps, so this step can be skipped for
- // such apps
- SetupDefaultHMILevel(application);
- }
smart_objects::SmartObject saved_app;
const std::string& device_mac = application->mac_address();
bool result = resumption_storage_->GetSavedApplication(
application->policy_app_id(), device_mac, saved_app);
if (result) {
const std::string& saved_hash = saved_app[strings::hash_id].asString();
- result = saved_hash == hash ? RestoreApplicationData(application) : false;
- application->UpdateHash();
- AddToResumptionTimerQueue(application->app_id());
+ result = saved_hash == hash ? RestoreApplicationData(application, callback)
+ : false;
}
return result;
}
+void ResumeCtrlImpl::HandleOnTimeOut(
+ const uint32_t cor_id, const hmi_apis::FunctionID::eType function_id) {
+ SDL_LOG_AUTO_TRACE();
+ resumption_data_processor_->HandleOnTimeOut(cor_id, function_id);
+}
+
bool ResumeCtrlImpl::StartResumptionOnlyHMILevel(
ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!application) {
- LOG4CXX_WARN(logger_, "Application does not exist.");
+ SDL_LOG_WARN("Application does not exist.");
return false;
}
application->set_is_resuming(true);
- LOG4CXX_DEBUG(logger_,
- "HMI level resumption requested for application id: "
- << application->app_id()
- << " with hmi_app_id: " << application->hmi_app_id()
- << ", policy_app_id " << application->policy_app_id());
+ SDL_LOG_DEBUG("HMI level resumption requested for application id: "
+ << application->app_id()
+ << " with hmi_app_id: " << application->hmi_app_id()
+ << ", policy_app_id " << application->policy_app_id());
if (!application->is_cloud_app()) {
// Default HMI Level is already set before resumption in
// ApplicationManager::OnApplicationRegistered, and handling low bandwidth
@@ -582,16 +464,16 @@ bool ResumeCtrlImpl::StartResumptionOnlyHMILevel(
if (result) {
AddToResumptionTimerQueue(application->app_id());
}
- LOG4CXX_INFO(logger_, "StartResumptionOnlyHMILevel::Result = " << result);
+ SDL_LOG_INFO("StartResumptionOnlyHMILevel::Result = " << result);
return result;
}
void ResumeCtrlImpl::RetryResumption(const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(app_id);
if (!app) {
- LOG4CXX_WARN(logger_, "Invalid app_id = " << app_id);
+ SDL_LOG_WARN("Invalid app_id = " << app_id);
return;
}
@@ -600,7 +482,7 @@ void ResumeCtrlImpl::RetryResumption(const uint32_t app_id) {
// check and update resumption deferred flag in queue_lock_
if (mobile_api::HMILevel::eType::INVALID_ENUM ==
app->deferred_resumption_hmi_level()) {
- LOG4CXX_DEBUG(logger_, "No need to retry resumption for app: " << app_id);
+ SDL_LOG_DEBUG("No need to retry resumption for app: " << app_id);
return;
}
}
@@ -608,67 +490,66 @@ void ResumeCtrlImpl::RetryResumption(const uint32_t app_id) {
AddToResumptionTimerQueue(app_id);
}
-bool ResumeCtrlImpl::StartAppHmiStateResumption(
+void ResumeCtrlImpl::StartAppHmiStateResumption(
ApplicationSharedPtr application) {
using namespace date_time;
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK_OR_RETURN(application, false);
+ SDL_LOG_AUTO_TRACE();
+ DCHECK(application);
smart_objects::SmartObject saved_app;
const std::string& device_mac = application->mac_address();
const bool get_saved_app_result = resumption_storage_->GetSavedApplication(
application->policy_app_id(), device_mac, saved_app);
if (!get_saved_app_result) {
- LOG4CXX_ERROR(logger_, "Application was not saved");
- return false;
+ SDL_LOG_ERROR("Application was not saved");
+ return;
}
const bool is_hmi_level_applicable_to_resume =
CheckAppRestrictions(application, saved_app);
if (!is_hmi_level_applicable_to_resume) {
- LOG4CXX_DEBUG(logger_, "No applicable HMI level found for resuming");
- return false;
+ SDL_LOG_DEBUG("No applicable HMI level found for resuming");
+ return;
}
-
const bool is_resume_allowed_by_low_voltage =
CheckLowVoltageRestrictions(saved_app);
const bool is_hmi_level_allowed_by_ign_cycle =
CheckIgnCycleRestrictions(saved_app);
- const bool restore_hmi_level_allowed =
- is_resume_allowed_by_low_voltage && is_hmi_level_allowed_by_ign_cycle;
+ const bool is_app_revoked =
+ application_manager_.GetPolicyHandler().IsApplicationRevoked(
+ application->policy_app_id());
+
+ const bool restore_hmi_level_allowed = is_resume_allowed_by_low_voltage &&
+ is_hmi_level_allowed_by_ign_cycle &&
+ !is_app_revoked;
if (restore_hmi_level_allowed) {
- LOG4CXX_INFO(logger_,
- "Resume application " << application->policy_app_id());
- const bool hmi_state_restore_result = RestoreAppHMIState(application);
+ SDL_LOG_INFO("Resume application " << application->policy_app_id());
+ RestoreAppHMIState(application);
if (mobile_apis::HMILevel::eType::INVALID_ENUM !=
application->deferred_resumption_hmi_level()) {
// the application has not been fully resumed
- return false;
+ return;
}
RemoveApplicationFromSaved(application);
- return hmi_state_restore_result;
} else {
- LOG4CXX_INFO(
- logger_,
- "Do not need to resume application " << application->policy_app_id());
+ SDL_LOG_INFO("Do not need to resume application "
+ << application->policy_app_id());
}
- return true;
}
void ResumeCtrlImpl::ResetLaunchTime() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
launch_time_ = time(NULL);
}
bool ResumeCtrlImpl::CheckPersistenceFilesForResumption(
ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN(application, false);
- LOG4CXX_DEBUG(logger_,
- " Resume app_id = " << application->app_id() << " policy_id = "
+ SDL_LOG_DEBUG(" Resume app_id = " << application->app_id() << " policy_id = "
<< application->policy_app_id());
smart_objects::SmartObject saved_app;
const std::string& device_mac = application->mac_address();
@@ -692,10 +573,9 @@ bool ResumeCtrlImpl::CheckPersistenceFilesForResumption(
bool ResumeCtrlImpl::CheckApplicationHash(ApplicationSharedPtr application,
const std::string& hash) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN(application, false);
- LOG4CXX_DEBUG(logger_,
- "app_id : " << application->app_id() << " hash : " << hash);
+ SDL_LOG_DEBUG("app_id : " << application->app_id() << " hash : " << hash);
smart_objects::SmartObject saved_app;
const std::string& device_mac = application->mac_address();
const bool get_app_result = resumption_storage_->GetSavedApplication(
@@ -709,9 +589,9 @@ bool ResumeCtrlImpl::CheckApplicationHash(ApplicationSharedPtr application,
}
void ResumeCtrlImpl::SaveDataOnTimer() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (is_resumption_active_) {
- LOG4CXX_WARN(logger_, "Resumption timer is active skip saving");
+ SDL_LOG_WARN("Resumption timer is active skip saving");
return;
}
@@ -725,7 +605,8 @@ void ResumeCtrlImpl::SaveDataOnTimer() {
}
void ResumeCtrlImpl::FinalPersistData() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
+ DCHECK_OR_RETURN_VOID(resumption_storage_);
StopSavePersistentDataTimer();
SaveAllApplications();
resumption_storage_->Persist();
@@ -733,15 +614,16 @@ void ResumeCtrlImpl::FinalPersistData() {
bool ResumeCtrlImpl::IsDeviceMacAddressEqual(
ApplicationSharedPtr application, const std::string& saved_device_mac) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::string device_mac = application->mac_address();
return device_mac == saved_device_mac;
}
-bool ResumeCtrlImpl::RestoreApplicationData(ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
+bool ResumeCtrlImpl::RestoreApplicationData(ApplicationSharedPtr application,
+ ResumptionCallBack callback) {
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN(application, false);
- LOG4CXX_DEBUG(logger_, "app_id : " << application->app_id());
+ SDL_LOG_DEBUG("app_id : " << application->app_id());
smart_objects::SmartObject saved_app(smart_objects::SmartType_Map);
const std::string& device_mac = application->mac_address();
@@ -751,205 +633,50 @@ bool ResumeCtrlImpl::RestoreApplicationData(ApplicationSharedPtr application) {
if (saved_app.keyExists(strings::grammar_id)) {
const uint32_t app_grammar_id = saved_app[strings::grammar_id].asUInt();
application->set_grammar_id(app_grammar_id);
- AddFiles(application, saved_app);
- AddSubmenues(application, saved_app);
- AddCommands(application, saved_app);
- AddChoicesets(application, saved_app);
- SetGlobalProperties(application, saved_app);
- AddSubscriptions(application, saved_app);
- AddWayPointsSubscription(application, saved_app);
+ resumption_data_processor_->Restore(application, saved_app, callback);
result = true;
} else {
- LOG4CXX_WARN(logger_,
- "Saved data of application does not contain grammar_id");
+ SDL_LOG_WARN("Saved data of application does not contain grammar_id");
result = false;
}
} else {
- LOG4CXX_WARN(logger_, "Application not saved");
+ SDL_LOG_WARN("Application not saved");
}
return result;
}
void ResumeCtrlImpl::StartWaitingForDisplayCapabilitiesUpdate(
- app_mngr::ApplicationSharedPtr application) {
- LOG4CXX_AUTO_TRACE(logger_);
+ app_mngr::ApplicationSharedPtr application, const bool is_resume_app) {
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject saved_app(smart_objects::SmartType_Map);
resumption_storage_->GetSavedApplication(
application->policy_app_id(), application->mac_address(), saved_app);
auto resume_callback =
[this](Application& app,
const smart_objects::SmartObject& display_capabilities) -> void {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProcessSystemCapabilityUpdated(app, display_capabilities);
};
auto& builder = application->display_capabilities_builder();
smart_objects::SmartObject windows_info(smart_objects::SmartType_Null);
- if (saved_app.keyExists(strings::windows_info)) {
+ if (is_resume_app && saved_app.keyExists(strings::windows_info)) {
windows_info = saved_app[strings::windows_info];
}
builder.InitBuilder(resume_callback, windows_info);
}
-void ResumeCtrlImpl::AddFiles(ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (saved_app.keyExists(strings::application_files)) {
- const smart_objects::SmartObject& application_files =
- saved_app[strings::application_files];
- for (size_t i = 0; i < application_files.length(); ++i) {
- const smart_objects::SmartObject& file_data = application_files[i];
- const bool is_persistent =
- file_data.keyExists(strings::persistent_file) &&
- file_data[strings::persistent_file].asBool();
- if (is_persistent) {
- AppFile file;
- file.is_persistent = is_persistent;
- file.is_download_complete =
- file_data[strings::is_download_complete].asBool();
- file.file_name = file_data[strings::sync_file_name].asString();
- file.file_type = static_cast<mobile_apis::FileType::eType>(
- file_data[strings::file_type].asInt());
- application->AddFile(file);
- }
- }
- } else {
- LOG4CXX_FATAL(logger_, "application_files section is not exists");
- }
-}
-
-void ResumeCtrlImpl::AddSubmenues(ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (saved_app.keyExists(strings::application_submenus)) {
- const smart_objects::SmartObject& app_submenus =
- saved_app[strings::application_submenus];
- for (size_t i = 0; i < app_submenus.length(); ++i) {
- const smart_objects::SmartObject& submenu = app_submenus[i];
- application->AddSubMenu(submenu[strings::menu_id].asUInt(), submenu);
- }
- ProcessHMIRequests(MessageHelper::CreateAddSubMenuRequestToHMI(
- application, application_manager_.GetNextHMICorrelationID()));
- } else {
- LOG4CXX_FATAL(logger_, "application_submenus section is not exists");
- }
-}
-
-void ResumeCtrlImpl::AddCommands(ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (saved_app.keyExists(strings::application_commands)) {
- const smart_objects::SmartObject& app_commands =
- saved_app[strings::application_commands];
-
- for (size_t cmd_num = 0; cmd_num < app_commands.length(); ++cmd_num) {
- const smart_objects::SmartObject& command = app_commands[cmd_num];
- const uint32_t cmd_id = command[strings::cmd_id].asUInt();
- const bool is_resumption = true;
- application->AddCommand(
- commands::CommandImpl::CalcCommandInternalConsecutiveNumber(
- application),
- command);
- application->help_prompt_manager().OnVrCommandAdded(
- cmd_id, command, is_resumption);
- }
-
- ProcessHMIRequests(MessageHelper::CreateAddCommandRequestToHMI(
- application, application_manager_));
- } else {
- LOG4CXX_FATAL(logger_, "application_commands section is not exists");
- }
-}
-
-void ResumeCtrlImpl::AddChoicesets(
- ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (saved_app.keyExists(strings::application_choice_sets)) {
- const smart_objects::SmartObject& app_choice_sets =
- saved_app[strings::application_choice_sets];
- for (size_t i = 0; i < app_choice_sets.length(); ++i) {
- const smart_objects::SmartObject& choice_set = app_choice_sets[i];
- const int32_t choice_set_id =
- choice_set[strings::interaction_choice_set_id].asInt();
- application->AddChoiceSet(choice_set_id, choice_set);
- }
- ProcessHMIRequests(MessageHelper::CreateAddVRCommandRequestFromChoiceToHMI(
- application, application_manager_));
- } else {
- LOG4CXX_FATAL(logger_, "There is no any choicesets");
- }
-}
-
-void ResumeCtrlImpl::SetGlobalProperties(
- ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (saved_app.keyExists(strings::application_global_properties)) {
- const smart_objects::SmartObject& properties_so =
- saved_app[strings::application_global_properties];
- application->load_global_properties(properties_so);
- MessageHelper::SendGlobalPropertiesToHMI(application, application_manager_);
- }
-}
-
-void ResumeCtrlImpl::AddWayPointsSubscription(
- app_mngr::ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- if (saved_app.keyExists(strings::subscribed_for_way_points)) {
- const smart_objects::SmartObject& subscribed_for_way_points_so =
- saved_app[strings::subscribed_for_way_points];
- if (true == subscribed_for_way_points_so.asBool()) {
- application_manager_.SubscribeAppForWayPoints(application);
- }
- }
-}
-
-void ResumeCtrlImpl::AddSubscriptions(
- ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (saved_app.keyExists(strings::application_subscriptions)) {
- const smart_objects::SmartObject& subscriptions =
- saved_app[strings::application_subscriptions];
-
- if (subscriptions.keyExists(strings::application_buttons)) {
- const smart_objects::SmartObject& subscriptions_buttons =
- subscriptions[strings::application_buttons];
- mobile_apis::ButtonName::eType btn;
- for (size_t i = 0; i < subscriptions_buttons.length(); ++i) {
- btn = static_cast<mobile_apis::ButtonName::eType>(
- (subscriptions_buttons[i]).asInt());
- application->SubscribeToButton(btn);
- }
- }
- MessageHelper::SendAllOnButtonSubscriptionNotificationsForApp(
- application, application_manager_);
-
- for (auto& extension : application->Extensions()) {
- extension->ProcessResumption(subscriptions);
- }
- }
-}
-
bool ResumeCtrlImpl::CheckIgnCycleRestrictions(
const smart_objects::SmartObject& saved_app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!CheckDelayAfterIgnOn()) {
- LOG4CXX_DEBUG(logger_, "Application was connected long after ign on");
+ SDL_LOG_DEBUG("Application was connected long after ign on");
return false;
}
if (!CheckDelayBeforeIgnOff(saved_app)) {
- LOG4CXX_DEBUG(logger_, "Application was disconnected long before ign off");
+ SDL_LOG_DEBUG("Application was disconnected long before ign off");
return false;
}
return true;
@@ -957,27 +684,26 @@ bool ResumeCtrlImpl::CheckIgnCycleRestrictions(
bool ResumeCtrlImpl::CheckLowVoltageRestrictions(
const smart_objects::SmartObject& saved_app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!CheckDelayBeforeLowVoltage(saved_app)) {
- LOG4CXX_DEBUG(logger_,
- "Application was disconnected long before low voltage");
+ SDL_LOG_DEBUG("Application was disconnected long before low voltage");
return false;
}
if (!CheckDelayAfterWakeUp()) {
- LOG4CXX_DEBUG(logger_, "Application was connected long after wake up");
+ SDL_LOG_DEBUG("Application was connected long after wake up");
return false;
}
- LOG4CXX_DEBUG(logger_, "HMI Level resuming in not restricted by Low Voltage");
+ SDL_LOG_DEBUG("HMI Level resuming in not restricted by Low Voltage");
return true;
}
bool ResumeCtrlImpl::CheckDelayBeforeIgnOff(
const smart_objects::SmartObject& saved_app) const {
using namespace date_time;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN(saved_app.keyExists(strings::time_stamp), false);
const time_t time_stamp =
@@ -986,26 +712,25 @@ bool ResumeCtrlImpl::CheckDelayBeforeIgnOff(
static_cast<time_t>(resumption_storage_->GetIgnOffTime());
if (CheckIgnCyclesData() && 0 == ign_off_time) {
- LOG4CXX_DEBUG(
- logger_, "No IGNITION OFF records found: This is first Ignition cycle");
+ SDL_LOG_DEBUG(
+ "No IGNITION OFF records found: This is first Ignition cycle");
return true;
}
// This means that ignition off timestamp was not saved
// Possible reasons: Low Voltage event, core crash etc.
if (ign_off_time < time_stamp) {
- LOG4CXX_DEBUG(logger_, "Last IGNITION OFF record missed");
+ SDL_LOG_DEBUG("Last IGNITION OFF record missed");
return true;
}
const uint32_t sec_spent_before_ign = labs(ign_off_time - time_stamp);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"ign_off_time "
- << ign_off_time << "; app_disconnect_time " << time_stamp
- << "; sec_spent_before_ign " << sec_spent_before_ign
- << "; resumption_delay_before_ign "
- << application_manager_.get_settings().resumption_delay_before_ign());
+ << ign_off_time << "; app_disconnect_time " << time_stamp
+ << "; sec_spent_before_ign " << sec_spent_before_ign
+ << "; resumption_delay_before_ign "
+ << application_manager_.get_settings().resumption_delay_before_ign());
return sec_spent_before_ign <=
application_manager_.get_settings().resumption_delay_before_ign();
}
@@ -1013,11 +738,11 @@ bool ResumeCtrlImpl::CheckDelayBeforeIgnOff(
bool ResumeCtrlImpl::CheckDelayBeforeLowVoltage(
const smart_objects::SmartObject& saved_app) const {
using namespace date_time;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN(saved_app.keyExists(strings::time_stamp), false);
if (0 == LowVoltageTime()) {
- LOG4CXX_DEBUG(logger_, "No Low Voltage signal timestamp saved");
+ SDL_LOG_DEBUG("No Low Voltage signal timestamp saved");
return true;
}
@@ -1027,12 +752,11 @@ bool ResumeCtrlImpl::CheckDelayBeforeLowVoltage(
const int32_t sec_spent_before_low_voltage =
(low_voltage_timestamp - unregistration_time_stamp);
if (0 > sec_spent_before_low_voltage) {
- LOG4CXX_DEBUG(logger_,
- "Low Voltage time: "
- << low_voltage_timestamp
- << "; App disconnect time: " << unregistration_time_stamp
- << "; Secs between app disconnect and low voltage event "
- << sec_spent_before_low_voltage);
+ SDL_LOG_DEBUG("Low Voltage time: "
+ << low_voltage_timestamp
+ << "; App disconnect time: " << unregistration_time_stamp
+ << "; Secs between app disconnect and low voltage event "
+ << sec_spent_before_low_voltage);
return true;
}
@@ -1040,22 +764,21 @@ bool ResumeCtrlImpl::CheckDelayBeforeLowVoltage(
static_cast<uint32_t>(sec_spent_before_low_voltage);
const uint32_t wait_time =
application_manager_.get_settings().resumption_delay_before_ign();
- LOG4CXX_DEBUG(logger_,
- "Low Voltage time: "
- << low_voltage_timestamp
- << "; App disconnect time: " << unregistration_time_stamp
- << "; Secs between app disconnect and low voltage event "
- << secs_between_app_disconnect_and_low_voltage
- << "; Timeout for HMI level resuming: " << wait_time);
+ SDL_LOG_DEBUG("Low Voltage time: "
+ << low_voltage_timestamp
+ << "; App disconnect time: " << unregistration_time_stamp
+ << "; Secs between app disconnect and low voltage event "
+ << secs_between_app_disconnect_and_low_voltage
+ << "; Timeout for HMI level resuming: " << wait_time);
return secs_between_app_disconnect_and_low_voltage <= wait_time;
}
bool ResumeCtrlImpl::CheckDelayAfterWakeUp() const {
using namespace date_time;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (0 == WakeUpTime()) {
- LOG4CXX_DEBUG(logger_, "No WakeUp signal timestamp saved");
+ SDL_LOG_DEBUG("No WakeUp signal timestamp saved");
return true;
}
@@ -1066,12 +789,11 @@ bool ResumeCtrlImpl::CheckDelayAfterWakeUp() const {
labs(current_time - wake_up_timestamp);
const uint32_t wait_time =
application_manager_.get_settings().resumption_delay_after_ign();
- LOG4CXX_DEBUG(
- logger_,
- "Current time: " << current_time << "; WakeUp Signal time: "
- << wake_up_timestamp << "; Seconds passed from wake up: "
- << seconds_from_wake_up_signal
- << "; Timeout for HMI level resuming: " << wait_time);
+ SDL_LOG_DEBUG("Current time: "
+ << current_time << "; WakeUp Signal time: " << wake_up_timestamp
+ << "; Seconds passed from wake up: "
+ << seconds_from_wake_up_signal
+ << "; Timeout for HMI level resuming: " << wait_time);
return seconds_from_wake_up_signal <= wait_time;
}
@@ -1080,7 +802,7 @@ bool ResumeCtrlImpl::CheckAppRestrictions(
const smart_objects::SmartObject& saved_app) {
using namespace mobile_apis;
using namespace helpers;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN(saved_app.keyExists(strings::hmi_level), false);
HMILevel::eType hmi_level;
@@ -1095,8 +817,7 @@ bool ResumeCtrlImpl::CheckAppRestrictions(
hmi_level, HMILevel::HMI_FULL, HMILevel::HMI_LIMITED)
? true
: false;
- LOG4CXX_DEBUG(logger_,
- "is_media_app: " << application->is_media_application()
+ SDL_LOG_DEBUG("is_media_app: " << application->is_media_application()
<< "; hmi_level: " << hmi_level << "; result: "
<< (result ? "Applicable for resume"
: "Non-applicable for resume"));
@@ -1106,14 +827,14 @@ bool ResumeCtrlImpl::CheckAppRestrictions(
bool ResumeCtrlImpl::CheckIcons(ApplicationSharedPtr application,
smart_objects::SmartObject& obj) {
using namespace smart_objects;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const mobile_apis::Result::eType verify_images =
MessageHelper::VerifyImageFiles(obj, application, application_manager_);
return mobile_apis::Result::INVALID_DATA != verify_images;
}
bool ResumeCtrlImpl::CheckIgnCyclesData() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const uint32_t global_ign_on_count =
resumption_storage_->GetGlobalIgnOnCounter();
const uint32_t the_first_ignition = 1;
@@ -1123,8 +844,7 @@ bool ResumeCtrlImpl::CheckIgnCyclesData() const {
// global_ign_on_count is incrementing at ignition on
// global_ign_on_count > 1 means that correct ignition off was not present.
if (is_emergency_ign_off_occurred) {
- LOG4CXX_WARN(logger_,
- "Emergency IGN OFF occurred. Possibly after Low Voltage");
+ SDL_LOG_WARN("Emergency IGN OFF occurred. Possibly after Low Voltage");
return false;
}
return true;
@@ -1132,11 +852,11 @@ bool ResumeCtrlImpl::CheckIgnCyclesData() const {
bool ResumeCtrlImpl::CheckDelayAfterIgnOn() const {
using namespace date_time;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const time_t ign_off_time = GetIgnOffTime();
if (CheckIgnCyclesData() && 0 == ign_off_time) {
- LOG4CXX_DEBUG(logger_, "This is first Ignition cycle");
+ SDL_LOG_DEBUG("This is first Ignition cycle");
return true;
}
const time_t curr_time = time(nullptr);
@@ -1145,8 +865,7 @@ bool ResumeCtrlImpl::CheckDelayAfterIgnOn() const {
const uint32_t seconds_from_sdl_start = labs(curr_time - sdl_launch_time);
const uint32_t wait_time =
application_manager_.get_settings().resumption_delay_after_ign();
- LOG4CXX_DEBUG(logger_,
- "curr_time " << curr_time << "; sdl_launch_time "
+ SDL_LOG_DEBUG("curr_time " << curr_time << "; sdl_launch_time "
<< sdl_launch_time << "; seconds_from_sdl_start "
<< seconds_from_sdl_start << "; wait_time "
<< wait_time);
@@ -1161,38 +880,8 @@ time_t ResumeCtrlImpl::GetIgnOffTime() const {
return resumption_storage_->GetIgnOffTime();
}
-bool ResumeCtrlImpl::ProcessHMIRequest(smart_objects::SmartObjectSPtr request,
- bool use_events) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (use_events) {
- const hmi_apis::FunctionID::eType function_id =
- static_cast<hmi_apis::FunctionID::eType>(
- (*request)[strings::function_id].asInt());
-
- const int32_t hmi_correlation_id =
- (*request)[strings::correlation_id].asInt();
- subscribe_on_event(function_id, hmi_correlation_id);
- }
- if (!application_manager_.GetRPCService().ManageHMICommand(
- request, commands::Command::SOURCE_SDL_TO_HMI)) {
- LOG4CXX_ERROR(logger_, "Unable to send request");
- return false;
- }
- return true;
-}
-
-void ResumeCtrlImpl::ProcessHMIRequests(
- const smart_objects::SmartObjectList& requests) {
- for (smart_objects::SmartObjectList::const_iterator it = requests.begin(),
- total = requests.end();
- it != total;
- ++it) {
- ProcessHMIRequest(*it, true);
- }
-}
-
void ResumeCtrlImpl::AddToResumptionTimerQueue(const uint32_t app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool run_resumption = false;
queue_lock_.Acquire();
waiting_for_timer_.push_back(app_id);
@@ -1202,13 +891,11 @@ void ResumeCtrlImpl::AddToResumptionTimerQueue(const uint32_t app_id) {
run_resumption = true;
}
queue_lock_.Release();
- LOG4CXX_DEBUG(logger_,
- "Application ID " << app_id
+ SDL_LOG_DEBUG("Application ID " << app_id
<< " have been added"
" to resumption queue.");
if (run_resumption) {
- LOG4CXX_DEBUG(logger_,
- "Application ID " << app_id << " will be restored by timer");
+ SDL_LOG_DEBUG("Application ID " << app_id << " will be restored by timer");
restore_hmi_level_timer_.Start(
application_manager_.get_settings().app_resuming_timeout(),
timer::kSingleShot);
@@ -1216,7 +903,7 @@ void ResumeCtrlImpl::AddToResumptionTimerQueue(const uint32_t app_id) {
}
void ResumeCtrlImpl::LoadResumeData() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject so_applications_data;
resumption_storage_->GetDataForLoadResumeData(so_applications_data);
size_t length = so_applications_data.length();
@@ -1225,11 +912,10 @@ void ResumeCtrlImpl::LoadResumeData() {
if (IsAppDataResumptionExpired(application)) {
const std::string device_id = application[strings::device_id].asString();
const std::string app_id = application[strings::app_id].asString();
- LOG4CXX_INFO(logger_, "Data resumption is expired.");
- LOG4CXX_DEBUG(logger_,
- "Resumption data for application "
- << app_id << " and device id " << device_id
- << " will be dropped.");
+ SDL_LOG_INFO("Data resumption is expired.");
+ SDL_LOG_DEBUG("Resumption data for application "
+ << app_id << " and device id " << device_id
+ << " will be dropped.");
resumption_storage_->RemoveApplicationFromSaved(app_id, device_id);
continue;
}
@@ -1238,10 +924,9 @@ void ResumeCtrlImpl::LoadResumeData() {
void ResumeCtrlImpl::OnAppRegistrationStart(const std::string& policy_app_id,
const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (IsApplicationSaved(policy_app_id, device_id)) {
- LOG4CXX_INFO(
- logger_,
+ SDL_LOG_INFO(
"Application is found in resumption "
"data and will try to resume. Stopping resume data persistent timer");
StopSavePersistentDataTimer();
@@ -1249,7 +934,7 @@ void ResumeCtrlImpl::OnAppRegistrationStart(const std::string& policy_app_id,
}
void ResumeCtrlImpl::OnAppRegistrationEnd() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
StartSavePersistentDataTimer();
}
@@ -1276,7 +961,7 @@ bool ResumeCtrlImpl::IsAppDataResumptionExpired(
mobile_apis::HMILevel::eType ResumeCtrlImpl::GetHmiLevelOnLowBandwidthTransport(
ApplicationConstSharedPtr application) const {
using namespace mobile_apis;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const ApplicationManagerSettings& settings =
application_manager_.get_settings();
@@ -1295,26 +980,23 @@ mobile_apis::HMILevel::eType ResumeCtrlImpl::GetHmiLevelOnLowBandwidthTransport(
// AppHMIType, then the highest level will be applied.
if (application->is_navi()) {
level = ConvertHmiLevelString(level_for_navi_app);
- LOG4CXX_DEBUG(logger_,
- "NAVIGATION apps may have level "
- << level
- << " while high-bandwidth transport is not available.");
+ SDL_LOG_DEBUG("NAVIGATION apps may have level "
+ << level
+ << " while high-bandwidth transport is not available.");
result_level = PickHigherHmiLevel(level, result_level);
}
if (application->mobile_projection_enabled()) {
level = ConvertHmiLevelString(level_for_projection_app);
- LOG4CXX_DEBUG(logger_,
- "PROJECTION apps may have level "
- << level
- << " while high-bandwidth transport is not available.");
+ SDL_LOG_DEBUG("PROJECTION apps may have level "
+ << level
+ << " while high-bandwidth transport is not available.");
result_level = PickHigherHmiLevel(level, result_level);
}
if (application->is_media_application()) {
level = ConvertHmiLevelString(level_for_media_app);
- LOG4CXX_DEBUG(logger_,
- "media apps may have level "
- << level
- << " while high-bandwidth transport is not available.");
+ SDL_LOG_DEBUG("media apps may have level "
+ << level
+ << " while high-bandwidth transport is not available.");
result_level = PickHigherHmiLevel(level, result_level);
}
@@ -1350,7 +1032,7 @@ static mobile_api::HMILevel::eType PickLowerHmiLevel(
}
static mobile_api::HMILevel::eType ConvertHmiLevelString(
- const std::string str) {
+ const std::string& str) {
using namespace mobile_apis;
if ("BACKGROUND" == str) {
@@ -1359,8 +1041,6 @@ static mobile_api::HMILevel::eType ConvertHmiLevelString(
return HMILevel::HMI_FULL;
} else if ("LIMITED" == str) {
return HMILevel::HMI_LIMITED;
- } else if ("NONE" == str) {
- return HMILevel::HMI_NONE;
} else {
return HMILevel::HMI_NONE;
}
diff --git a/src/components/application_manager/src/resumption/resumption_data.cc b/src/components/application_manager/src/resumption/resumption_data.cc
index 9046fe35ad..95dd331b88 100644
--- a/src/components/application_manager/src/resumption/resumption_data.cc
+++ b/src/components/application_manager/src/resumption/resumption_data.cc
@@ -37,7 +37,7 @@
namespace resumption {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Resumption")
+SDL_CREATE_LOG_VARIABLE("Resumption")
ResumptionData::ResumptionData(
const application_manager::ApplicationManager& application_manager)
@@ -46,11 +46,11 @@ ResumptionData::ResumptionData(
smart_objects::SmartObject ResumptionData::GetApplicationCommands(
app_mngr::ApplicationConstSharedPtr application) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject commands_array(smart_objects::SmartType_Array);
DCHECK_OR_RETURN(application, commands_array);
if (!application) {
- LOG4CXX_ERROR(logger_, "NULL Pointer App");
+ SDL_LOG_ERROR("NULL Pointer App");
return commands_array;
}
const DataAccessor<CommandsMap> accessor = application->commands_map();
@@ -65,14 +65,14 @@ smart_objects::SmartObject ResumptionData::GetApplicationCommands(
smart_objects::SmartObject ResumptionData::GetApplicationSubMenus(
app_mngr::ApplicationConstSharedPtr application) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(application.get());
smart_objects::SmartObject submenues_array =
smart_objects::SmartObject(smart_objects::SmartType_Array);
if (!application) {
- LOG4CXX_ERROR(logger_, "NULL Pointer App");
+ SDL_LOG_ERROR("NULL Pointer App");
return submenues_array;
}
const DataAccessor<SubMenuMap> accessor = application->sub_menu_map();
@@ -87,13 +87,13 @@ smart_objects::SmartObject ResumptionData::GetApplicationSubMenus(
smart_objects::SmartObject ResumptionData::GetApplicationInteractionChoiseSets(
app_mngr::ApplicationConstSharedPtr application) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(application.get());
smart_objects::SmartObject interaction_choice_set_array =
smart_objects::SmartObject(smart_objects::SmartType_Array);
if (!application) {
- LOG4CXX_ERROR(logger_, "NULL Pointer App");
+ SDL_LOG_ERROR("NULL Pointer App");
return interaction_choice_set_array;
}
const DataAccessor<ChoiceSetMap> accessor = application->choice_set_map();
@@ -108,13 +108,13 @@ smart_objects::SmartObject ResumptionData::GetApplicationInteractionChoiseSets(
smart_objects::SmartObject ResumptionData::GetApplicationGlobalProperties(
app_mngr::ApplicationConstSharedPtr application) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(application.get());
smart_objects::SmartObject global_properties =
smart_objects::SmartObject(smart_objects::SmartType_Map);
if (!application) {
- LOG4CXX_ERROR(logger_, "NULL Pointer App");
+ SDL_LOG_ERROR("NULL Pointer App");
return global_properties;
}
@@ -138,44 +138,47 @@ smart_objects::SmartObject ResumptionData::GetApplicationGlobalProperties(
smart_objects::SmartObject ResumptionData::GetApplicationSubscriptions(
app_mngr::ApplicationConstSharedPtr application) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(application.get());
smart_objects::SmartObject subscriptions =
smart_objects::SmartObject(smart_objects::SmartType_Map);
if (!application) {
- LOG4CXX_ERROR(logger_, "NULL Pointer App");
+ SDL_LOG_ERROR("NULL Pointer App");
return subscriptions;
}
- LOG4CXX_DEBUG(logger_, "app_id:" << application->app_id());
+ SDL_LOG_DEBUG("app_id:" << application->app_id());
- DataAccessor<ButtonSubscriptions> button_accessor =
- application->SubscribedButtons();
+ {
+ DataAccessor<ButtonSubscriptions> button_accessor =
+ application->SubscribedButtons();
- const ButtonSubscriptions& button_subscriptions = button_accessor.GetData();
+ const ButtonSubscriptions& button_subscriptions = button_accessor.GetData();
- LOG4CXX_DEBUG(logger_, "SubscribedButtons:" << button_subscriptions.size());
- Append(button_subscriptions.begin(),
- button_subscriptions.end(),
- strings::application_buttons,
- subscriptions);
+ SDL_LOG_DEBUG("SubscribedButtons:" << button_subscriptions.size());
+ Append(button_subscriptions.begin(),
+ button_subscriptions.end(),
+ strings::application_buttons,
+ subscriptions);
+ }
for (auto extension : application->Extensions()) {
extension->SaveResumptionData(subscriptions);
}
+
return subscriptions;
}
smart_objects::SmartObject ResumptionData::GetApplicationFiles(
app_mngr::ApplicationConstSharedPtr application) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(application.get());
- LOG4CXX_TRACE(logger_, "ENTER app_id:" << application->app_id());
+ SDL_LOG_TRACE("ENTER app_id:" << application->app_id());
smart_objects::SmartObject files =
smart_objects::SmartObject(smart_objects::SmartType_Array);
if (!application) {
- LOG4CXX_ERROR(logger_, "NULL Pointer App");
+ SDL_LOG_ERROR("NULL Pointer App");
return files;
}
@@ -183,7 +186,7 @@ smart_objects::SmartObject ResumptionData::GetApplicationFiles(
int i = 0;
for (AppFilesMap::const_iterator file_it = app_files.begin();
file_it != app_files.end();
- file_it++) {
+ ++file_it) {
const AppFile& file = file_it->second;
if (file.is_persistent) {
smart_objects::SmartObject file_data =
@@ -201,7 +204,7 @@ smart_objects::SmartObject ResumptionData::GetApplicationFiles(
smart_objects::SmartObject ResumptionData::GetApplicationWidgetsInfo(
app_mngr::ApplicationConstSharedPtr application) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject windows_info =
smart_objects::SmartObject(smart_objects::SmartType_Array);
DCHECK_OR_RETURN(application, windows_info);
@@ -226,7 +229,7 @@ smart_objects::SmartObject ResumptionData::CreateWindowInfoSO(
const mobile_apis::WindowType::eType window_type,
const app_mngr::WindowParamsMap& window_optional_params_map) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto window_info = smart_objects::SmartObject(smart_objects::SmartType_Map);
window_info[strings::window_id] = window_id;
@@ -246,7 +249,7 @@ smart_objects::SmartObject ResumptionData::CreateWindowInfoSO(
smart_objects::SmartObject ResumptionData::PointerToSmartObj(
const smart_objects::SmartObject* ptr) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject temp;
if (ptr != NULL) {
temp = *ptr;
diff --git a/src/components/application_manager/src/resumption/resumption_data_db.cc b/src/components/application_manager/src/resumption/resumption_data_db.cc
index 9188a47bf9..f00b100913 100644
--- a/src/components/application_manager/src/resumption/resumption_data_db.cc
+++ b/src/components/application_manager/src/resumption/resumption_data_db.cc
@@ -47,7 +47,7 @@ const std::string kDatabaseName = "resumption";
}
namespace resumption {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Resumption")
+SDL_CREATE_LOG_VARIABLE("Resumption")
ResumptionDataDB::ResumptionDataDB(
DbStorage db_storage,
@@ -64,8 +64,8 @@ ResumptionDataDB::ResumptionDataDB(
db_ = new utils::dbms::SQLDatabase();
#endif // __QNX__
} else {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_ERROR(logger_, "Get not existed type of database storage");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_ERROR("Get not existed type of database storage");
}
}
@@ -75,67 +75,61 @@ ResumptionDataDB::~ResumptionDataDB() {
}
bool ResumptionDataDB::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!db_->Open()) {
- LOG4CXX_ERROR(logger_, "Failed opening database.");
- LOG4CXX_INFO(logger_, "Starting opening retries.");
+ SDL_LOG_ERROR("Failed opening database.");
+ SDL_LOG_INFO("Starting opening retries.");
const uint16_t attempts =
application_manager_.get_settings().attempts_to_open_resumption_db();
- LOG4CXX_DEBUG(logger_, "Total attempts number is: " << attempts);
+ SDL_LOG_DEBUG("Total attempts number is: " << attempts);
bool is_opened = false;
const uint16_t open_attempt_timeout_ms =
application_manager_.get_settings()
.open_attempt_timeout_ms_resumption_db();
const useconds_t sleep_interval_mcsec = open_attempt_timeout_ms * 1000;
- LOG4CXX_DEBUG(logger_,
- "Open attempt timeout(ms) is: " << open_attempt_timeout_ms);
+ SDL_LOG_DEBUG("Open attempt timeout(ms) is: " << open_attempt_timeout_ms);
for (int i = 0; i < attempts; ++i) {
usleep(sleep_interval_mcsec);
- LOG4CXX_INFO(logger_, "Attempt: " << i + 1);
+ SDL_LOG_INFO("Attempt: " << i + 1);
if (db_->Open()) {
- LOG4CXX_INFO(logger_, "Database opened.");
+ SDL_LOG_INFO("Database opened.");
is_opened = true;
break;
}
}
if (!is_opened) {
- LOG4CXX_ERROR(logger_,
- "Open retry sequence failed. Tried "
- << attempts << " attempts with "
- << open_attempt_timeout_ms
- << " open timeout(ms) for each.");
+ SDL_LOG_ERROR("Open retry sequence failed. Tried "
+ << attempts << " attempts with " << open_attempt_timeout_ms
+ << " open timeout(ms) for each.");
return false;
}
}
#ifndef __QNX__
if (!db_->IsReadWrite()) {
- LOG4CXX_ERROR(logger_, "There are no read/write permissions for database");
+ SDL_LOG_ERROR("There are no read/write permissions for database");
return false;
}
#endif // __QNX__
utils::dbms::SQLQuery query(db());
if (!query.Exec(kCreateSchema)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed creating schema of database: " << query.LastError().text());
return false;
}
utils::dbms::SQLQuery query_checks_resumption(db());
if (!query_checks_resumption.Prepare(kChecksResumptionData) ||
!query_checks_resumption.Exec()) {
- LOG4CXX_ERROR(logger_,
- "Failed verification or execution query kChecksResumptionData"
- << query_checks_resumption.LastError().text());
+ SDL_LOG_ERROR("Failed verification or execution query kChecksResumptionData"
+ << query_checks_resumption.LastError().text());
return false;
}
if (0 == query_checks_resumption.GetInteger(0)) {
utils::dbms::SQLQuery query_insert_resumption(db());
if (!query_insert_resumption.Prepare(kInsertInitData) ||
!query_insert_resumption.Exec()) {
- LOG4CXX_ERROR(logger_,
- "Failed insert init data to database: "
- << query_insert_resumption.LastError().text());
+ SDL_LOG_ERROR("Failed insert init data to database: "
+ << query_insert_resumption.LastError().text());
return false;
}
}
@@ -147,56 +141,55 @@ void ResumptionDataDB::SaveApplication(
using namespace app_mngr;
using namespace mobile_api;
using namespace helpers;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(application);
bool application_exist = false;
const std::string& policy_app_id = application->policy_app_id();
const std::string& device_mac = application->mac_address();
- LOG4CXX_INFO(logger_,
- "app_id : " << application->app_id() << " policy_app_id : "
+ SDL_LOG_INFO("app_id : " << application->app_id() << " policy_app_id : "
<< policy_app_id << " device_id : " << device_mac);
if (!CheckExistenceApplication(
policy_app_id, device_mac, application_exist)) {
- LOG4CXX_ERROR(logger_, "Problem with access to DB");
+ SDL_LOG_ERROR("Problem with access to DB");
return;
}
if (application->is_application_data_changed()) {
if (application_exist &&
!DeleteSavedApplication(policy_app_id, device_mac)) {
- LOG4CXX_ERROR(logger_, "Deleting of application data is not finished");
+ SDL_LOG_ERROR("Deleting of application data is not finished");
return;
}
if (!SaveApplicationToDB(application, policy_app_id, device_mac)) {
- LOG4CXX_ERROR(logger_, "Saving of application data is not finished");
+ SDL_LOG_ERROR("Saving of application data is not finished");
return;
}
- LOG4CXX_INFO(logger_, "All data from application were saved successfully");
+ SDL_LOG_INFO("All data from application were saved successfully");
application->set_is_application_data_changed(false);
} else if (application_exist) {
if (!UpdateApplicationData(application, policy_app_id, device_mac)) {
- LOG4CXX_ERROR(logger_, "Updating application data is failed");
+ SDL_LOG_ERROR("Updating application data is failed");
return;
}
- LOG4CXX_INFO(logger_, "Application data were updated successfully");
+ SDL_LOG_INFO("Application data were updated successfully");
} else if (!InsertApplicationData(application, policy_app_id, device_mac)) {
- LOG4CXX_ERROR(logger_, "Saving data of application is failed");
+ SDL_LOG_ERROR("Saving data of application is failed");
return;
}
WriteDb();
}
bool ResumptionDataDB::IsHMIApplicationIdExist(uint32_t hmi_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return CheckExistenceHMIId(hmi_app_id);
}
uint32_t ResumptionDataDB::GetHMIApplicationID(
const std::string& policy_app_id, const std::string& device_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t hmi_app_id = 0;
SelectHMIId(policy_app_id, device_id, hmi_app_id);
@@ -204,7 +197,7 @@ uint32_t ResumptionDataDB::GetHMIApplicationID(
}
void ResumptionDataDB::IncrementIgnOffCount() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query_update_suspend_data(db());
utils::dbms::SQLQuery query_update_last_ign_off_time(db());
@@ -215,45 +208,43 @@ void ResumptionDataDB::IncrementIgnOffCount() {
const int application_lifes = 3;
if (DeleteAppWithIgnCount(application_lifes)) {
- LOG4CXX_INFO(logger_,
- "Saved application with ign_off_count = " << application_lifes
+ SDL_LOG_INFO("Saved application with ign_off_count = " << application_lifes
<< " was deleted");
} else {
- LOG4CXX_WARN(logger_, "Problem with removing applications");
+ SDL_LOG_WARN("Problem with removing applications");
}
if (query_update_suspend_data.Prepare(kUpdateSuspendData)) {
if (query_update_suspend_data.Exec()) {
- LOG4CXX_INFO(logger_,
- "Data ign_off_count and suspend_count were updated");
+ SDL_LOG_INFO("Data ign_off_count and suspend_count were updated");
}
}
if (query_update_last_ign_off_time.Prepare(kUpdateLastIgnOffTime)) {
query_update_last_ign_off_time.Bind(0, static_cast<int64_t>(time(NULL)));
if (query_update_last_ign_off_time.Exec()) {
- LOG4CXX_INFO(logger_, "Data last_ign_off_time was updated");
+ SDL_LOG_INFO("Data last_ign_off_time was updated");
}
}
}
bool ResumptionDataDB::DeleteAppWithIgnCount(const int application_lifes) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery select_apps_for_removing(db());
utils::dbms::SQLQuery count_app(db());
if (!select_apps_for_removing.Prepare(kSelectApplicationsIgnOffCount) ||
!count_app.Prepare(kCountApplicationsIgnOff)) {
- LOG4CXX_WARN(logger_,
- "Problem with verification query select_apps_for_removing or"
- " query count_app");
+ SDL_LOG_WARN(
+ "Problem with verification query select_apps_for_removing or"
+ " query count_app");
return false;
}
/* Positions of binding data for "query count_app" :
field "ign_off_count" from table "application" = 0*/
count_app.Bind(0, application_lifes);
if (!count_app.Exec() || !count_app.GetInteger(0)) {
- LOG4CXX_WARN(logger_, "Problem with execution or count app=0");
+ SDL_LOG_WARN("Problem with execution or count app=0");
return false;
}
std::string policy_app_id;
@@ -265,11 +256,11 @@ bool ResumptionDataDB::DeleteAppWithIgnCount(const int application_lifes) {
device_id = select_apps_for_removing.GetString(0);
policy_app_id = select_apps_for_removing.GetString(1);
if (!DeleteSavedApplication(policy_app_id, device_id)) {
- LOG4CXX_WARN(logger_, "Problem with removing application data");
+ SDL_LOG_WARN("Problem with removing application data");
return false;
}
}
- LOG4CXX_WARN(logger_, "Applications data were removed successfully");
+ SDL_LOG_WARN("Applications data were removed successfully");
WriteDb();
return true;
}
@@ -277,13 +268,13 @@ bool ResumptionDataDB::DeleteAppWithIgnCount(const int application_lifes) {
bool ResumptionDataDB::GetHashId(const std::string& policy_app_id,
const std::string& device_id,
std::string& hash_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return SelectHashId(policy_app_id, device_id, hash_id);
}
void ResumptionDataDB::DecrementIgnOffCount() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
UpdateDataOnAwake();
}
@@ -292,65 +283,62 @@ bool ResumptionDataDB::GetSavedApplication(
const std::string& policy_app_id,
const std::string& device_id,
smart_objects::SmartObject& saved_app) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool application_exist = false;
if (!CheckExistenceApplication(policy_app_id, device_id, application_exist) ||
!application_exist) {
- LOG4CXX_ERROR(logger_,
- "Problem with access to DB or application does not exists");
+ SDL_LOG_ERROR("Problem with access to DB or application does not exists");
return false;
}
if (!SelectDataFromAppTable(policy_app_id, device_id, saved_app)) {
- LOG4CXX_ERROR(logger_,
- "Problem with restoring of data from application table");
+ SDL_LOG_ERROR("Problem with restoring of data from application table");
return false;
}
if (!SelectFilesData(policy_app_id, device_id, saved_app)) {
- LOG4CXX_ERROR(logger_, "Problem with restoring of files data");
+ SDL_LOG_ERROR("Problem with restoring of files data");
return false;
}
if (!SelectSubmenuData(policy_app_id, device_id, saved_app)) {
- LOG4CXX_ERROR(logger_, "Problem with restoring of submenu data");
+ SDL_LOG_ERROR("Problem with restoring of submenu data");
return false;
}
if (!SelectCommandData(policy_app_id, device_id, saved_app)) {
- LOG4CXX_ERROR(logger_, "Problem with restoring of command data");
+ SDL_LOG_ERROR("Problem with restoring of command data");
return false;
}
if (!SelectSubscriptionsData(policy_app_id, device_id, saved_app)) {
- LOG4CXX_ERROR(logger_, "Problem with restoring of subscriptions data");
+ SDL_LOG_ERROR("Problem with restoring of subscriptions data");
return false;
}
if (!SelectChoiceSetData(policy_app_id, device_id, saved_app)) {
- LOG4CXX_ERROR(logger_, "Problem with restoring of choice set data");
+ SDL_LOG_ERROR("Problem with restoring of choice set data");
return false;
}
if (!SelectGlobalPropertiesData(policy_app_id, device_id, saved_app)) {
- LOG4CXX_ERROR(logger_, "Problem with restoring of global properties data");
+ SDL_LOG_ERROR("Problem with restoring of global properties data");
return false;
}
- LOG4CXX_INFO(logger_,
- "Application data were successfully fetched from data base");
+ SDL_LOG_INFO("Application data were successfully fetched from data base");
return true;
}
bool ResumptionDataDB::RemoveApplicationFromSaved(
const std::string& policy_app_id, const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool application_exist = false;
if (!CheckExistenceApplication(policy_app_id, device_id, application_exist) ||
!application_exist) {
- LOG4CXX_ERROR(logger_,
- "Problem with access to DB or application does not"
- " exist");
+ SDL_LOG_ERROR(
+ "Problem with access to DB or application does not"
+ " exist");
return false;
}
bool result = false;
@@ -362,42 +350,39 @@ bool ResumptionDataDB::RemoveApplicationFromSaved(
}
uint32_t ResumptionDataDB::GetIgnOffTime() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return SelectIgnOffTime();
}
uint32_t ResumptionDataDB::GetGlobalIgnOnCounter() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock autolock(resumption_lock_);
utils::dbms::SQLQuery query(db());
if (!query.Prepare(kSelectGlobalIgnOnCounter)) {
- LOG4CXX_ERROR(logger_,
- "Problem with prepare query : " << kSelectGlobalIgnOnCounter);
+ SDL_LOG_ERROR("Problem with prepare query : " << kSelectGlobalIgnOnCounter);
return 1;
}
if (!query.Exec()) {
- LOG4CXX_ERROR(logger_,
- "Problem with exec query : " << kSelectGlobalIgnOnCounter);
+ SDL_LOG_ERROR("Problem with exec query : " << kSelectGlobalIgnOnCounter);
return 1;
}
const auto global_ign_on_counter = query.GetUInteger(0);
- LOG4CXX_DEBUG(logger_, "Global Ign On Counter = " << global_ign_on_counter);
+ SDL_LOG_DEBUG("Global Ign On Counter = " << global_ign_on_counter);
return global_ign_on_counter;
}
void ResumptionDataDB::IncrementGlobalIgnOnCounter() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock autolock(resumption_lock_);
db_->BeginTransaction();
utils::dbms::SQLQuery query_update_global_ign_on_count(db());
if (query_update_global_ign_on_count.Prepare(kUpdateGlobalIgnOnCount)) {
if (query_update_global_ign_on_count.Exec()) {
- LOG4CXX_DEBUG(logger_,
- "Data query_update_global_ign_on_count was updated");
+ SDL_LOG_DEBUG("Data query_update_global_ign_on_count was updated");
}
}
db_->CommitTransaction();
@@ -405,26 +390,26 @@ void ResumptionDataDB::IncrementGlobalIgnOnCounter() {
}
void ResumptionDataDB::ResetGlobalIgnOnCount() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock autolock(resumption_lock_);
- LOG4CXX_DEBUG(logger_, "Global IGN ON counter resetting");
+ SDL_LOG_DEBUG("Global IGN ON counter resetting");
utils::dbms::SQLQuery query_update_global_ign_on_count(db());
if (query_update_global_ign_on_count.Prepare(kResetGlobalIgnOnCount)) {
if (query_update_global_ign_on_count.Exec()) {
- LOG4CXX_DEBUG(logger_, "Data was updated");
+ SDL_LOG_DEBUG("Data was updated");
}
}
}
ssize_t ResumptionDataDB::IsApplicationSaved(
const std::string& policy_app_id, const std::string& device_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool application_exist = false;
if (CheckExistenceApplication(policy_app_id, device_id, application_exist) &&
application_exist) {
- LOG4CXX_INFO(logger_, "Application exists in stored data");
+ SDL_LOG_INFO("Application exists in stored data");
return 0;
}
return -1;
@@ -432,14 +417,14 @@ ssize_t ResumptionDataDB::IsApplicationSaved(
void ResumptionDataDB::GetDataForLoadResumeData(
smart_objects::SmartObject& saved_data) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SelectDataForLoadResumeData(saved_data);
}
bool ResumptionDataDB::SelectHMILevel(const std::string& policy_app_id,
const std::string& device_id,
int& hmi_level) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query_count(db());
utils::dbms::SQLQuery query_select(db());
if (query_count.Prepare(kSelectCountHMILevel) &&
@@ -463,25 +448,24 @@ bool ResumptionDataDB::SelectHMILevel(const std::string& policy_app_id,
}
bool ResumptionDataDB::CheckExistenceHMIId(uint32_t hmi_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (query.Prepare(kCheckHMIId)) {
query.Bind(0, static_cast<int64_t>(hmi_app_id));
if (query.Exec() && (query.GetInteger(0))) {
- LOG4CXX_INFO(logger_, "Saved data has HMI appID = " << hmi_app_id);
+ SDL_LOG_INFO("Saved data has HMI appID = " << hmi_app_id);
return true;
}
}
- LOG4CXX_FATAL(logger_,
- "HMI appID = " << hmi_app_id << " doesn't exist in saved data");
+ SDL_LOG_FATAL("HMI appID = " << hmi_app_id << " doesn't exist in saved data");
return false;
}
void ResumptionDataDB::SelectHMIId(const std::string& policy_app_id,
const std::string& device_id,
uint32_t& hmi_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query_select(db());
utils::dbms::SQLQuery query_check(db());
@@ -499,26 +483,26 @@ void ResumptionDataDB::SelectHMIId(const std::string& policy_app_id,
if (query_check.Exec() && query_check.GetInteger(0) &&
query_select.Exec()) {
hmi_id = query_select.GetUInteger(0);
- LOG4CXX_INFO(logger_, "HMI appID = " << hmi_id);
+ SDL_LOG_INFO("HMI appID = " << hmi_id);
return;
}
}
- LOG4CXX_FATAL(logger_,
- "Saved data doesn't have application with "
- "device id = "
- << device_id << " and policy appID = " << policy_app_id);
+ SDL_LOG_FATAL(
+ "Saved data doesn't have application with "
+ "device id = "
+ << device_id << " and policy appID = " << policy_app_id);
}
bool ResumptionDataDB::SelectHashId(const std::string& policy_app_id,
const std::string& device_id,
std::string& hash_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery count(db());
utils::dbms::SQLQuery select_hash(db());
if (!select_hash.Prepare(kSelectHashId) || !count.Prepare(kCountHashId)) {
- LOG4CXX_WARN(logger_,
- "Problem with verification count query or"
- " select_hash query");
+ SDL_LOG_WARN(
+ "Problem with verification count query or"
+ " select_hash query");
return false;
}
/* Positions of binding data for "count" and "select_hash" :
@@ -532,30 +516,29 @@ bool ResumptionDataDB::SelectHashId(const std::string& policy_app_id,
field "hashID" from table "application" = 0 */
if (count.Exec() && count.GetInteger(0) && select_hash.Exec()) {
hash_id = select_hash.GetString(0);
- LOG4CXX_INFO(logger_, "Saved hash ID = " << hash_id);
+ SDL_LOG_INFO("Saved hash ID = " << hash_id);
return true;
}
- LOG4CXX_WARN(logger_,
- "Saved data doesn't have application with "
- "device id = "
- << device_id << " and policy appID = " << policy_app_id
- << "or hashID");
+ SDL_LOG_WARN(
+ "Saved data doesn't have application with "
+ "device id = "
+ << device_id << " and policy appID = " << policy_app_id << "or hashID");
return false;
}
uint32_t ResumptionDataDB::SelectIgnOffTime() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t ignOffTime = 0;
utils::dbms::SQLQuery query(db());
if (query.Prepare(kSelectIgnOffTime)) {
if (query.Exec()) {
ignOffTime = query.GetUInteger(0);
- LOG4CXX_INFO(logger_, "Last ign off time = " << ignOffTime);
+ SDL_LOG_INFO("Last ign off time = " << ignOffTime);
return ignOffTime;
}
}
- LOG4CXX_ERROR(logger_, "Problem with prepare query");
+ SDL_LOG_ERROR("Problem with prepare query");
return ignOffTime;
}
@@ -563,7 +546,7 @@ bool ResumptionDataDB::CheckExistenceApplication(
const std::string& policy_app_id,
const std::string& device_id,
bool& application_exist) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool result = false;
utils::dbms::SQLQuery query(db());
/* Positions of binding data for "query":
@@ -577,15 +560,14 @@ bool ResumptionDataDB::CheckExistenceApplication(
/* Position of data in "query" :
amount of application = 0 */
if (result && query.GetInteger(0)) {
- LOG4CXX_INFO(logger_,
- "Saved data has application with policy appID = "
- << policy_app_id << " and deviceID = " << device_id);
+ SDL_LOG_INFO("Saved data has application with policy appID = "
+ << policy_app_id << " and deviceID = " << device_id);
application_exist = true;
} else if (result) {
- LOG4CXX_INFO(logger_, "Saved data does not contain application");
+ SDL_LOG_INFO("Saved data does not contain application");
application_exist = false;
} else {
- LOG4CXX_ERROR(logger_, "Problem with access DB");
+ SDL_LOG_ERROR("Problem with access DB");
}
return result;
}
@@ -594,21 +576,21 @@ void ResumptionDataDB::SelectDataForLoadResumeData(
smart_objects::SmartObject& saved_data) const {
using namespace app_mngr;
using namespace smart_objects;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery select_data(db());
utils::dbms::SQLQuery count_application(db());
if (!select_data.Prepare(kSelectDataForLoadResumeData) ||
!count_application.Prepare(kCountApplications)) {
- LOG4CXX_WARN(logger_,
- "Problem with verification select_data query"
- " or count application");
+ SDL_LOG_WARN(
+ "Problem with verification select_data query"
+ " or count application");
return;
}
if (!count_application.Exec() || !count_application.GetInteger(0)) {
- LOG4CXX_WARN(logger_,
- "Problem with execution count_application query"
- " or appliction table does not contain data");
+ SDL_LOG_WARN(
+ "Problem with execution count_application query"
+ " or appliction table does not contain data");
return;
}
SmartObject so_array_data(SmartType_Array);
@@ -634,7 +616,7 @@ void ResumptionDataDB::SelectDataForLoadResumeData(
void ResumptionDataDB::UpdateHmiLevel(const std::string& policy_app_id,
const std::string& device_id,
mobile_apis::HMILevel::eType hmi_level) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
/* Positions of binding data for "query":
@@ -646,10 +628,9 @@ void ResumptionDataDB::UpdateHmiLevel(const std::string& policy_app_id,
query.Bind(1, device_id);
query.Bind(2, policy_app_id);
if (query.Exec()) {
- LOG4CXX_INFO(logger_,
- "Saved data has application with policy appID = "
- << policy_app_id << " and deviceID = " << device_id
- << " has new HMI level = " << hmi_level);
+ SDL_LOG_INFO("Saved data has application with policy appID = "
+ << policy_app_id << " and deviceID = " << device_id
+ << " has new HMI level = " << hmi_level);
WriteDb();
}
}
@@ -662,19 +643,16 @@ void ResumptionDataDB::Persist() {
bool ResumptionDataDB::RefreshDB() const {
utils::dbms::SQLQuery query(db());
if (!query.Exec(resumption::kDropSchema)) {
- LOG4CXX_WARN(logger_,
- "Failed dropping database: " << query.LastError().text());
+ SDL_LOG_WARN("Failed dropping database: " << query.LastError().text());
return false;
}
if (!query.Exec(resumption::kCreateSchema)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed creating schema of database: " << query.LastError().text());
return false;
}
if (!query.Exec(resumption::kInsertInitData)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed insert init data to database: " << query.LastError().text());
return false;
}
@@ -682,10 +660,10 @@ bool ResumptionDataDB::RefreshDB() const {
}
bool ResumptionDataDB::GetAllData(smart_objects::SmartObject& data) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(resumption::kSelectAllApps)) {
- LOG4CXX_ERROR(logger_, "Can't get applications data from DB.");
+ SDL_LOG_ERROR("Can't get applications data from DB.");
return false;
}
@@ -705,9 +683,9 @@ bool ResumptionDataDB::GetAllData(smart_objects::SmartObject& data) const {
}
bool ResumptionDataDB::SaveAllData(const smart_objects::SmartObject& data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (smart_objects::SmartType_Array != data.getType()) {
- LOG4CXX_ERROR(logger_, "Unexpected type for resumption data.");
+ SDL_LOG_ERROR("Unexpected type for resumption data.");
return false;
}
const smart_objects::SmartArray* apps = data.asArray();
@@ -723,18 +701,16 @@ bool ResumptionDataDB::SaveAllData(const smart_objects::SmartObject& data) {
}
bool ResumptionDataDB::IsDBVersionActual() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(resumption::kSelectDBVersion) || !query.Exec()) {
- LOG4CXX_ERROR(logger_,
- "Failed to get DB version: " << query.LastError().text());
+ SDL_LOG_ERROR("Failed to get DB version: " << query.LastError().text());
return false;
}
const int32_t saved_db_version = query.GetInteger(0);
const int32_t current_db_version = GetDBVersion();
- LOG4CXX_DEBUG(logger_,
- "Saved DB version is: " << saved_db_version
+ SDL_LOG_DEBUG("Saved DB version is: " << saved_db_version
<< ". Current DB vesion is: "
<< current_db_version);
@@ -742,11 +718,10 @@ bool ResumptionDataDB::IsDBVersionActual() const {
}
bool ResumptionDataDB::UpdateDBVersion() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(resumption::kUpdateDBVersion)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Incorrect DB version update query: " << query.LastError().text());
return false;
}
@@ -754,8 +729,7 @@ bool ResumptionDataDB::UpdateDBVersion() const {
query.Bind(0, GetDBVersion());
if (!query.Exec()) {
- LOG4CXX_ERROR(logger_,
- "DB version update failed: " << query.LastError().text());
+ SDL_LOG_ERROR("DB version update failed: " << query.LastError().text());
return false;
}
@@ -764,7 +738,7 @@ bool ResumptionDataDB::UpdateDBVersion() const {
bool ResumptionDataDB::DropAppDataResumption(const std::string& device_id,
const std::string& app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::ScopeGuard guard =
utils::MakeObjGuard(*db_, &utils::dbms::SQLDatabase::RollbackTransaction);
@@ -805,7 +779,7 @@ bool ResumptionDataDB::SelectFilesData(
const std::string& policy_app_id,
const std::string& device_id,
smart_objects::SmartObject& saved_app) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
using namespace smart_objects;
uint32_t count_item = 0;
@@ -817,13 +791,13 @@ bool ResumptionDataDB::SelectFilesData(
saved_app[strings::application_files] = SmartObject(SmartType_Array);
if (0 == count_item) {
- LOG4CXX_INFO(logger_, "Application does not contain files data");
+ SDL_LOG_INFO("Application does not contain files data");
return true;
}
utils::dbms::SQLQuery select_files(db());
if (!PrepareSelectQuery(
select_files, policy_app_id, device_id, kSelectFiles)) {
- LOG4CXX_WARN(logger_, "Problem with verification select_files");
+ SDL_LOG_WARN("Problem with verification select_files");
return false;
}
saved_app[strings::application_files] = SmartObject(SmartType_Array);
@@ -841,7 +815,7 @@ bool ResumptionDataDB::SelectFilesData(
array_item[strings::sync_file_name] = select_files.GetString(3);
saved_app[strings::application_files][i++] = array_item;
}
- LOG4CXX_INFO(logger_, "File data was restored successfully");
+ SDL_LOG_INFO("File data was restored successfully");
return true;
}
@@ -849,7 +823,7 @@ bool ResumptionDataDB::SelectSubmenuData(
const std::string& policy_app_id,
const std::string& device_id,
smart_objects::SmartObject& saved_app) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
using namespace smart_objects;
uint32_t count_item = 0;
@@ -861,13 +835,13 @@ bool ResumptionDataDB::SelectSubmenuData(
saved_app[strings::application_submenus] = SmartObject(SmartType_Array);
if (0 == count_item) {
- LOG4CXX_INFO(logger_, "Application does not contain submenu data");
+ SDL_LOG_INFO("Application does not contain submenu data");
return true;
}
utils::dbms::SQLQuery select_sub_menu(db());
if (!PrepareSelectQuery(
select_sub_menu, policy_app_id, device_id, kSelectSubMenu)) {
- LOG4CXX_WARN(logger_, "Problem with verification select_sub_menu");
+ SDL_LOG_WARN("Problem with verification select_sub_menu");
return false;
}
saved_app[strings::application_submenus] = SmartObject(SmartType_Array);
@@ -885,7 +859,7 @@ bool ResumptionDataDB::SelectSubmenuData(
}
saved_app[strings::application_submenus][i++] = array_item;
}
- LOG4CXX_INFO(logger_, "Sub menu data was restored successfully");
+ SDL_LOG_INFO("Sub menu data was restored successfully");
return true;
}
@@ -893,7 +867,7 @@ bool ResumptionDataDB::SelectCommandData(
const std::string& policy_app_id,
const std::string& device_id,
smart_objects::SmartObject& saved_app) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
using namespace smart_objects;
uint32_t count_item = 0;
@@ -905,7 +879,7 @@ bool ResumptionDataDB::SelectCommandData(
saved_app[strings::application_commands] = SmartObject(SmartType_Array);
if (0 == count_item) {
- LOG4CXX_INFO(logger_, "Application does not contain commands data");
+ SDL_LOG_INFO("Application does not contain commands data");
return true;
}
@@ -973,7 +947,7 @@ bool ResumptionDataDB::SelectCommandData(
select_commands.GetString(7);
}
}
- LOG4CXX_INFO(logger_, "Commands were restored from DB successfully");
+ SDL_LOG_INFO("Commands were restored from DB successfully");
return true;
}
@@ -981,7 +955,7 @@ bool ResumptionDataDB::SelectSubscriptionsData(
const std::string& policy_app_id,
const std::string& device_id,
smart_objects::SmartObject& saved_app) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
using namespace smart_objects;
uint32_t count_item = 0;
@@ -993,7 +967,7 @@ bool ResumptionDataDB::SelectSubscriptionsData(
saved_app[strings::application_subscriptions] = SmartObject(SmartType_Map);
if (0 == count_item) {
- LOG4CXX_INFO(logger_, "Application does not contain subscriptions data");
+ SDL_LOG_INFO("Application does not contain subscriptions data");
return true;
}
utils::dbms::SQLQuery select_subscriptions(db());
@@ -1001,7 +975,7 @@ bool ResumptionDataDB::SelectSubscriptionsData(
policy_app_id,
device_id,
kSelectSubscriptions)) {
- LOG4CXX_WARN(logger_, "Problem with verification select_subscriptions");
+ SDL_LOG_WARN("Problem with verification select_subscriptions");
return false;
}
SmartObject application_buttons(SmartType_Array);
@@ -1028,7 +1002,7 @@ bool ResumptionDataDB::SelectSubscriptionsData(
saved_app[strings::application_subscriptions]
[strings::application_vehicle_info] = application_vehicle_info;
}
- LOG4CXX_INFO(logger_, "Subscriptions were restored from DB successfully");
+ SDL_LOG_INFO("Subscriptions were restored from DB successfully");
return true;
}
@@ -1036,7 +1010,7 @@ bool ResumptionDataDB::SelectChoiceSetData(
const std::string& policy_app_id,
const std::string& device_id,
smart_objects::SmartObject& saved_app) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
using namespace smart_objects;
uint32_t count_item = 0;
@@ -1048,13 +1022,13 @@ bool ResumptionDataDB::SelectChoiceSetData(
saved_app[strings::application_choice_sets] = SmartObject(SmartType_Array);
if (0 == count_item) {
- LOG4CXX_INFO(logger_, "Application does not contain choice set data");
+ SDL_LOG_INFO("Application does not contain choice set data");
return true;
}
utils::dbms::SQLQuery select_choice_set(db());
if (!PrepareSelectQuery(
select_choice_set, policy_app_id, device_id, kSelectChoiceSets)) {
- LOG4CXX_WARN(logger_, "Problem with verification select_choice_set");
+ SDL_LOG_WARN("Problem with verification select_choice_set");
return false;
}
@@ -1130,7 +1104,7 @@ bool ResumptionDataDB::SelectChoiceSetData(
[vr_cmd_idx++] = select_choice_set.GetString(10);
}
- LOG4CXX_INFO(logger_, "Choice sets were restored from DB successfully");
+ SDL_LOG_INFO("Choice sets were restored from DB successfully");
return true;
}
@@ -1138,7 +1112,7 @@ bool ResumptionDataDB::SelectGlobalPropertiesData(
const std::string& policy_app_id,
const std::string& device_id,
smart_objects::SmartObject& saved_app) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
using namespace smart_objects;
uint32_t count_item = 0;
@@ -1151,8 +1125,7 @@ bool ResumptionDataDB::SelectGlobalPropertiesData(
SmartObject(SmartType_Map);
if (0 == count_item) {
- LOG4CXX_INFO(logger_,
- "Application does not contain global properties data");
+ SDL_LOG_INFO("Application does not contain global properties data");
return true;
}
utils::dbms::SQLQuery select_globalproperties(db());
@@ -1160,7 +1133,7 @@ bool ResumptionDataDB::SelectGlobalPropertiesData(
policy_app_id,
device_id,
kSelectGlobalProperties)) {
- LOG4CXX_WARN(logger_, "Problem with verification select_globalproperties");
+ SDL_LOG_WARN("Problem with verification select_globalproperties");
return false;
}
saved_app[strings::application_global_properties] =
@@ -1259,26 +1232,26 @@ bool ResumptionDataDB::SelectGlobalPropertiesData(
bool ResumptionDataDB::SelectVrHelpItemsData(
int64_t global_properties_key,
smart_objects::SmartObject& global_properties) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
using namespace smart_objects;
utils::dbms::SQLQuery checks_vrhelp_item(db());
if (!checks_vrhelp_item.Prepare(kChecksVrHelpItem)) {
- LOG4CXX_WARN(logger_, "Problem with verification checks_vrhelp_item query");
+ SDL_LOG_WARN("Problem with verification checks_vrhelp_item query");
return false;
}
checks_vrhelp_item.Bind(0, global_properties_key);
if (!checks_vrhelp_item.Exec()) {
- LOG4CXX_WARN(logger_, "Problem with execution checks_vrhelp_item query");
+ SDL_LOG_WARN("Problem with execution checks_vrhelp_item query");
return false;
}
if (0 == checks_vrhelp_item.GetInteger(0)) {
- LOG4CXX_INFO(logger_, "Global properties doesn't contain vr help item");
+ SDL_LOG_INFO("Global properties doesn't contain vr help item");
return true;
}
utils::dbms::SQLQuery select_vrhelp_item(db());
if (!select_vrhelp_item.Prepare(kSelectVrHelpItem)) {
- LOG4CXX_WARN(logger_, "Problem with verification select_vrhelp_item query");
+ SDL_LOG_WARN("Problem with verification select_vrhelp_item query");
return false;
}
global_properties[strings::vr_help] = SmartObject(SmartType_Array);
@@ -1302,35 +1275,34 @@ bool ResumptionDataDB::SelectVrHelpItemsData(
}
vr_help_items[vr_help_item_idx++] = item;
}
- LOG4CXX_INFO(logger_, "VR Help items were restored successfully");
+ SDL_LOG_INFO("VR Help items were restored successfully");
return true;
}
bool ResumptionDataDB::SelectCharactersData(
int64_t global_properties_key,
smart_objects::SmartObject& keyboard_properties) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
using namespace smart_objects;
utils::dbms::SQLQuery checks_characters(db());
if (!checks_characters.Prepare(kChecksCharacter)) {
- LOG4CXX_WARN(logger_, "Problem with verification checks_characters query");
+ SDL_LOG_WARN("Problem with verification checks_characters query");
return false;
}
checks_characters.Bind(0, global_properties_key);
if (!checks_characters.Exec()) {
- LOG4CXX_WARN(logger_, "Problem with execution checks_characters query");
+ SDL_LOG_WARN("Problem with execution checks_characters query");
return false;
}
if (0 == checks_characters.GetInteger(0)) {
- LOG4CXX_INFO(
- logger_,
+ SDL_LOG_INFO(
"Keyboard properties doesn't contain table limited character list");
return true;
}
utils::dbms::SQLQuery select_characters(db());
if (!select_characters.Prepare(kSelectCharacter)) {
- LOG4CXX_WARN(logger_, "Problem with verification select_characters query");
+ SDL_LOG_WARN("Problem with verification select_characters query");
return false;
}
@@ -1350,17 +1322,17 @@ bool ResumptionDataDB::SelectCharactersData(
bool ResumptionDataDB::SelectImageData(
int64_t image_key, smart_objects::SmartObject& image) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
utils::dbms::SQLQuery select_image(db());
if (!select_image.Prepare(kSelectImage)) {
- LOG4CXX_WARN(logger_, "Problem with verification select_image query");
+ SDL_LOG_WARN("Problem with verification select_image query");
return false;
}
select_image.Bind(0, image_key);
if (!select_image.Exec()) {
- LOG4CXX_WARN(logger_, "Problem with execution select_image query");
+ SDL_LOG_WARN("Problem with execution select_image query");
return false;
}
/* Position of data in "select_image" :
@@ -1373,17 +1345,17 @@ bool ResumptionDataDB::SelectImageData(
bool ResumptionDataDB::SelectTTSChunkData(
int64_t tts_chunk_key, smart_objects::SmartObject& tts_chunk) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
utils::dbms::SQLQuery select_tts_chunk(db());
if (!select_tts_chunk.Prepare(kSelectTTSChunk)) {
- LOG4CXX_WARN(logger_, "Problem with verification select_tts_chunk query");
+ SDL_LOG_WARN("Problem with verification select_tts_chunk query");
return false;
}
select_tts_chunk.Bind(0, tts_chunk_key);
if (!select_tts_chunk.Exec()) {
- LOG4CXX_WARN(logger_, "Problem with execution select_tts_chunk query");
+ SDL_LOG_WARN("Problem with execution select_tts_chunk query");
return false;
}
/* Position of data in "select_tts_chunk" :
@@ -1398,17 +1370,17 @@ bool ResumptionDataDB::SelectDataFromAppTable(
const std::string& policy_app_id,
const std::string& device_id,
smart_objects::SmartObject& saved_app) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
utils::dbms::SQLQuery query(db());
if (!query.Prepare(kSelectAppTable)) {
- LOG4CXX_WARN(logger_, "Problem with verification kSelectAppTable query");
+ SDL_LOG_WARN("Problem with verification kSelectAppTable query");
return false;
}
query.Bind(0, policy_app_id);
query.Bind(1, device_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Problem with execution kSelectAppTable query");
+ SDL_LOG_WARN("Problem with execution kSelectAppTable query");
return false;
}
@@ -1441,8 +1413,7 @@ bool ResumptionDataDB::SelectDataFromAppTable(
saved_app[strings::is_media_application] = query.GetBoolean(9);
saved_app[strings::subscribed_for_way_points] = query.GetBoolean(10);
- LOG4CXX_INFO(logger_,
- "Data from application table was restored successfully");
+ SDL_LOG_INFO("Data from application table was restored successfully");
return true;
}
@@ -1451,26 +1422,26 @@ bool ResumptionDataDB::SelectCountFromArray(
const std::string& text_query,
const std::string& policy_app_id,
const std::string& device_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(text_query)) {
- LOG4CXX_WARN(logger_, "Problem with verification query");
+ SDL_LOG_WARN("Problem with verification query");
return false;
}
query.Bind(0, policy_app_id);
query.Bind(1, device_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Problem with execution query");
+ SDL_LOG_WARN("Problem with execution query");
return false;
}
count_item = query.GetInteger(0);
- LOG4CXX_INFO(logger_, "count_item=" << count_item);
+ SDL_LOG_INFO("count_item=" << count_item);
return true;
}
bool ResumptionDataDB::DeleteSavedApplication(const std::string& policy_app_id,
const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::ScopeGuard guard =
utils::MakeObjGuard(*db_, &utils::dbms::SQLDatabase::RollbackTransaction);
@@ -1505,15 +1476,15 @@ bool ResumptionDataDB::DeleteSavedApplication(const std::string& policy_app_id,
bool ResumptionDataDB::DeleteSavedFiles(const std::string& policy_app_id,
const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!ExecQueryToDeleteData(policy_app_id, device_id, kDeleteFile)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from file.");
+ SDL_LOG_WARN("Incorrect delete from file.");
return false;
}
if (!ExecQueryToDeleteData(
policy_app_id, device_id, kDeleteApplicationFilesArray)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from applicationFilesArray.");
+ SDL_LOG_WARN("Incorrect delete from applicationFilesArray.");
return false;
}
return true;
@@ -1521,16 +1492,16 @@ bool ResumptionDataDB::DeleteSavedFiles(const std::string& policy_app_id,
bool ResumptionDataDB::DeleteSavedSubMenu(const std::string& policy_app_id,
const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!ExecQueryToDeleteData(policy_app_id, device_id, kDeleteSubMenu)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from subMenu.");
+ SDL_LOG_WARN("Incorrect delete from subMenu.");
return false;
}
if (!ExecQueryToDeleteData(
policy_app_id, device_id, kDeleteApplicationSubMenuArray)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from applicationSubMenuArray.");
+ SDL_LOG_WARN("Incorrect delete from applicationSubMenuArray.");
return false;
}
return true;
@@ -1538,12 +1509,11 @@ bool ResumptionDataDB::DeleteSavedSubMenu(const std::string& policy_app_id,
bool ResumptionDataDB::DeleteSavedSubscriptions(
const std::string& policy_app_id, const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!ExecQueryToDeleteData(
policy_app_id, device_id, kDeleteApplicationSubscriptionsArray)) {
- LOG4CXX_WARN(logger_,
- "Incorrect delete from applicationSubscriptionsArray.");
+ SDL_LOG_WARN("Incorrect delete from applicationSubscriptionsArray.");
return false;
}
return true;
@@ -1551,27 +1521,27 @@ bool ResumptionDataDB::DeleteSavedSubscriptions(
bool ResumptionDataDB::DeleteSavedCommands(const std::string& policy_app_id,
const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!ExecQueryToDeleteData(
policy_app_id, device_id, kDeleteImageFromCommands)) {
- LOG4CXX_WARN(logger_, "Incorrect delete image from commands.");
+ SDL_LOG_WARN("Incorrect delete image from commands.");
return false;
}
if (!ExecQueryToDeleteData(policy_app_id, device_id, kDeleteVrCommands)) {
- LOG4CXX_WARN(logger_, "Incorrect delete vrcommands from commands.");
+ SDL_LOG_WARN("Incorrect delete vrcommands from commands.");
return false;
}
if (!ExecQueryToDeleteData(policy_app_id, device_id, kDeleteCommands)) {
- LOG4CXX_WARN(logger_, "Incorrect delete commands.");
+ SDL_LOG_WARN("Incorrect delete commands.");
return false;
}
if (!ExecQueryToDeleteData(
policy_app_id, device_id, kDeleteApplicationCommandsArray)) {
- LOG4CXX_WARN(logger_, "Incorrect delete applicationCommandsArray.");
+ SDL_LOG_WARN("Incorrect delete applicationCommandsArray.");
return false;
}
@@ -1580,39 +1550,39 @@ bool ResumptionDataDB::DeleteSavedCommands(const std::string& policy_app_id,
bool ResumptionDataDB::DeleteSavedChoiceSet(const std::string& policy_app_id,
const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!ExecUnionQueryToDeleteData(
policy_app_id, device_id, kDeleteImageFromChoiceSet)) {
- LOG4CXX_WARN(logger_, "Incorrect delete image from choice set");
+ SDL_LOG_WARN("Incorrect delete image from choice set");
return false;
}
if (!ExecQueryToDeleteData(
policy_app_id, device_id, kDeleteVrCommandsFromChoiceSet)) {
- LOG4CXX_WARN(logger_, "Incorrect delete vrCommands from choice set");
+ SDL_LOG_WARN("Incorrect delete vrCommands from choice set");
return false;
}
if (!ExecQueryToDeleteData(policy_app_id, device_id, kDeleteChoice)) {
- LOG4CXX_WARN(logger_, "Incorrect delete choiceSet");
+ SDL_LOG_WARN("Incorrect delete choiceSet");
return false;
}
if (!ExecQueryToDeleteData(policy_app_id, device_id, kDeleteChoiceArray)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from choiceArray");
+ SDL_LOG_WARN("Incorrect delete from choiceArray");
return false;
}
if (!ExecQueryToDeleteData(
policy_app_id, device_id, kDeleteApplicationChoiceSet)) {
- LOG4CXX_WARN(logger_, "Incorrect delete applicationChoiceSet");
+ SDL_LOG_WARN("Incorrect delete applicationChoiceSet");
return false;
}
if (!ExecQueryToDeleteData(
policy_app_id, device_id, kDeleteApplicationChoiceSetArray)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from ApplicationChoiceSetArray");
+ SDL_LOG_WARN("Incorrect delete from ApplicationChoiceSetArray");
return false;
}
@@ -1621,50 +1591,50 @@ bool ResumptionDataDB::DeleteSavedChoiceSet(const std::string& policy_app_id,
bool ResumptionDataDB::DeleteSavedGlobalProperties(
const std::string& policy_app_id, const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!ExecUnionQueryToDeleteData(
policy_app_id, device_id, kDeleteImageFromGlobalProperties)) {
- LOG4CXX_WARN(logger_, "Incorrect delete image from globalProperties");
+ SDL_LOG_WARN("Incorrect delete image from globalProperties");
return false;
}
if (!ExecQueryToDeleteData(policy_app_id, device_id, kDeletevrHelpItem)) {
- LOG4CXX_WARN(logger_, "Incorrect delete vrHelpItem");
+ SDL_LOG_WARN("Incorrect delete vrHelpItem");
return false;
}
if (!ExecQueryToDeleteData(
policy_app_id, device_id, kDeletevrHelpItemArray)) {
- LOG4CXX_WARN(logger_, "Incorrect delete vrHelpItemArray");
+ SDL_LOG_WARN("Incorrect delete vrHelpItemArray");
return false;
}
if (!ExecQueryToDeleteData(
policy_app_id, device_id, kDeleteTableLimitedCharacterList)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from tableLimitedCharacterList");
+ SDL_LOG_WARN("Incorrect delete from tableLimitedCharacterList");
return false;
}
if (!ExecQueryToDeleteData(policy_app_id, device_id, kDeleteCharacterArray)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from characterArray");
+ SDL_LOG_WARN("Incorrect delete from characterArray");
return false;
}
if (!ExecUnionQueryToDeleteData(policy_app_id, device_id, kDeleteTTSChunk)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from TTSChunk");
+ SDL_LOG_WARN("Incorrect delete from TTSChunk");
return false;
}
if (!ExecQueryToDeleteData(
policy_app_id, device_id, kDeleteHelpTimeoutPromptArray)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from HelpTimeoutPromptArray");
+ SDL_LOG_WARN("Incorrect delete from HelpTimeoutPromptArray");
return false;
}
if (!ExecQueryToDeleteData(
policy_app_id, device_id, kDeleteGlobalProperties)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from GlobalProperties");
+ SDL_LOG_WARN("Incorrect delete from GlobalProperties");
return false;
}
@@ -1673,11 +1643,11 @@ bool ResumptionDataDB::DeleteSavedGlobalProperties(
bool ResumptionDataDB::DeleteDataFromApplicationTable(
const std::string& policy_app_id, const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!ExecQueryToDeleteData(
policy_app_id, device_id, kDeleteFromApplicationTable)) {
- LOG4CXX_WARN(logger_, "Incorrect delete data from application table");
+ SDL_LOG_WARN("Incorrect delete data from application table");
return false;
}
@@ -1687,7 +1657,7 @@ bool ResumptionDataDB::DeleteDataFromApplicationTable(
bool ResumptionDataDB::ExecQueryToDeleteData(const std::string& policy_app_id,
const std::string& device_id,
const std::string& text_query) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
bool result = query.Prepare(text_query);
if (result) {
@@ -1702,7 +1672,7 @@ bool ResumptionDataDB::ExecUnionQueryToDeleteData(
const std::string& policy_app_id,
const std::string& device_id,
const std::string& text_query) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
bool result = query.Prepare(text_query);
if (result) {
@@ -1717,7 +1687,7 @@ bool ResumptionDataDB::ExecUnionQueryToDeleteData(
bool ResumptionDataDB::ExecInsertImage(
int64_t& image_primary_key, const smart_objects::SmartObject& image) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
utils::dbms::SQLQuery count_image_query(db());
utils::dbms::SQLQuery query(db());
@@ -1731,8 +1701,7 @@ bool ResumptionDataDB::ExecInsertImage(
}
}
if (!result) {
- LOG4CXX_WARN(logger_,
- "Problem with preparing or execution count_image_query.");
+ SDL_LOG_WARN("Problem with preparing or execution count_image_query.");
return false;
}
if (count_image) {
@@ -1745,9 +1714,9 @@ bool ResumptionDataDB::ExecInsertImage(
}
}
if (!result) {
- LOG4CXX_WARN(logger_,
- "Problem with preparing or execution "
- "query for select primary key of image");
+ SDL_LOG_WARN(
+ "Problem with preparing or execution "
+ "query for select primary key of image");
}
} else {
result = query.Prepare(kInsertImage);
@@ -1760,9 +1729,9 @@ bool ResumptionDataDB::ExecInsertImage(
}
}
if (!result) {
- LOG4CXX_WARN(logger_,
- "Problem with preparing or execution "
- "query for insert image to image table");
+ SDL_LOG_WARN(
+ "Problem with preparing or execution "
+ "query for insert image to image table");
}
}
return result;
@@ -1771,12 +1740,12 @@ bool ResumptionDataDB::ExecInsertImage(
bool ResumptionDataDB::ExecInsertChoice(
int64_t choice_set_key,
const smart_objects::SmartObject& choice_array) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
utils::dbms::SQLQuery insert_choice(db());
if (!insert_choice.Prepare(kInsertChoice)) {
- LOG4CXX_WARN(logger_, "Incorrect preparation insert_choice query");
+ SDL_LOG_WARN("Incorrect preparation insert_choice query");
return false;
}
/* Positions of binding data for "insert_choice":
@@ -1787,7 +1756,6 @@ bool ResumptionDataDB::ExecInsertChoice(
field "idimage" from table "choice" = 4
field "idsecondaryImage" from table "choice" = 5*/
int64_t image_primary_key = 0;
- int64_t choice_primary_key = 0;
size_t length_choice_array = choice_array.length();
for (size_t i = 0; i < length_choice_array; ++i) {
insert_choice.Bind(0, (choice_array[i][strings::choice_id]).asInt());
@@ -1799,7 +1767,7 @@ bool ResumptionDataDB::ExecInsertChoice(
if (choice_array[i].keyExists(strings::image)) {
if (!ExecInsertImage(image_primary_key,
choice_array[i][strings::image])) {
- LOG4CXX_WARN(logger_, "Problem with insert image to choice");
+ SDL_LOG_WARN("Problem with insert image to choice");
return false;
}
insert_choice.Bind(4, image_primary_key);
@@ -1809,7 +1777,7 @@ bool ResumptionDataDB::ExecInsertChoice(
if (choice_array[i].keyExists(strings::secondary_image)) {
if (!ExecInsertImage(image_primary_key,
choice_array[i][strings::secondary_image])) {
- LOG4CXX_WARN(logger_, "Problem with insert secondary_image to choice");
+ SDL_LOG_WARN("Problem with insert secondary_image to choice");
return false;
}
insert_choice.Bind(5, image_primary_key);
@@ -1817,26 +1785,26 @@ bool ResumptionDataDB::ExecInsertChoice(
insert_choice.Bind(5);
}
if (!insert_choice.Exec()) {
- LOG4CXX_WARN(logger_, "Problem with execution insert_choice query");
+ SDL_LOG_WARN("Problem with execution insert_choice query");
return false;
}
- choice_primary_key = insert_choice.LastInsertId();
+ int64_t choice_primary_key = insert_choice.LastInsertId();
if ((!ExecInsertVrCommands(choice_primary_key,
choice_array[i][strings::vr_commands],
kVRCommandFromChoice)) ||
!insert_choice.Reset()) {
- LOG4CXX_WARN(logger_, "problemm with add vr commands to choice");
+ SDL_LOG_WARN("problemm with add vr commands to choice");
return false;
}
if (!ExecInsertDataToArray(
choice_set_key, choice_primary_key, kInsertChoiceArray)) {
- LOG4CXX_INFO(logger_, "Problem with insertion data to choiceArray table");
+ SDL_LOG_INFO("Problem with insertion data to choiceArray table");
return false;
}
}
- LOG4CXX_INFO(logger_, "Choice data were saved to DB successfully");
+ SDL_LOG_INFO("Choice data were saved to DB successfully");
return true;
}
@@ -1844,11 +1812,11 @@ bool ResumptionDataDB::ExecInsertVrCommands(
const int64_t primary_key,
const smart_objects::SmartObject& vr_commands_array,
AccessoryVRCommand value) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery insert_vr_command(db());
if (!insert_vr_command.Prepare(kInsertVrCommand)) {
- LOG4CXX_WARN(logger_, "Incorrect preparation insert_vr_command query");
+ SDL_LOG_WARN("Incorrect preparation insert_vr_command query");
return false;
}
size_t length_vr_commands = vr_commands_array.length();
@@ -1867,11 +1835,11 @@ bool ResumptionDataDB::ExecInsertVrCommands(
insert_vr_command.Bind(2, primary_key);
}
if (!insert_vr_command.Exec() || !insert_vr_command.Reset()) {
- LOG4CXX_WARN(logger_, "Problem with insert vr_command to DB");
+ SDL_LOG_WARN("Problem with insert vr_command to DB");
return false;
}
}
- LOG4CXX_INFO(logger_, "Insertion of Vr command were executed successfully");
+ SDL_LOG_INFO("Insertion of Vr command were executed successfully");
return true;
}
@@ -1879,7 +1847,7 @@ bool ResumptionDataDB::ExecInsertDataToArray(
int64_t first_primary_key,
int64_t second_primary_key,
const std::string& text_query) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool result;
utils::dbms::SQLQuery query_insert_array(db());
result = query_insert_array.Prepare(text_query);
@@ -1895,13 +1863,13 @@ bool ResumptionDataDB::SaveApplicationToDB(
app_mngr::ApplicationSharedPtr application,
const std::string& policy_app_id,
const std::string& device_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
int64_t application_primary_key = 0;
int64_t global_properties_key = 0;
db_->BeginTransaction();
if (!InsertGlobalPropertiesData(GetApplicationGlobalProperties(application),
global_properties_key)) {
- LOG4CXX_WARN(logger_, "Incorrect insert globalProperties data to DB.");
+ SDL_LOG_WARN("Incorrect insert globalProperties data to DB.");
db_->RollbackTransaction();
return false;
}
@@ -1911,38 +1879,38 @@ bool ResumptionDataDB::SaveApplicationToDB(
device_id,
&application_primary_key,
global_properties_key)) {
- LOG4CXX_WARN(logger_, "Incorrect insert application data to DB.");
+ SDL_LOG_WARN("Incorrect insert application data to DB.");
db_->RollbackTransaction();
return false;
}
if (!InsertFilesData(GetApplicationFiles(application),
application_primary_key)) {
- LOG4CXX_WARN(logger_, "Incorrect insert file data to DB.");
+ SDL_LOG_WARN("Incorrect insert file data to DB.");
db_->RollbackTransaction();
return false;
}
if (!InsertSubMenuData(GetApplicationSubMenus(application),
application_primary_key)) {
- LOG4CXX_WARN(logger_, "Incorrect insert submenu data to DB.");
+ SDL_LOG_WARN("Incorrect insert submenu data to DB.");
db_->RollbackTransaction();
return false;
}
if (!InsertCommandsData(GetApplicationCommands(application),
application_primary_key)) {
- LOG4CXX_WARN(logger_, "Incorrect insert commands data to DB.");
+ SDL_LOG_WARN("Incorrect insert commands data to DB.");
db_->RollbackTransaction();
return false;
}
if (!InsertSubscriptionsData(GetApplicationSubscriptions(application),
application_primary_key)) {
- LOG4CXX_WARN(logger_, "Incorrect insert subscriptions data to DB.");
+ SDL_LOG_WARN("Incorrect insert subscriptions data to DB.");
db_->RollbackTransaction();
return false;
}
if (!InsertChoiceSetData(GetApplicationInteractionChoiseSets(application),
application_primary_key)) {
- LOG4CXX_WARN(logger_, "Incorrect insert choiceset data to DB.");
+ SDL_LOG_WARN("Incorrect insert choiceset data to DB.");
db_->RollbackTransaction();
return false;
}
@@ -1954,14 +1922,14 @@ bool ResumptionDataDB::SaveApplicationToDB(
const smart_objects::SmartObject& application,
const std::string& policy_app_id,
const std::string& device_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
int64_t application_primary_key = 0;
int64_t global_properties_key = 0;
db_->BeginTransaction();
if (!InsertGlobalPropertiesData(application["globalProperties"],
global_properties_key)) {
- LOG4CXX_WARN(logger_, "Incorrect insert globalProperties data to DB.");
+ SDL_LOG_WARN("Incorrect insert globalProperties data to DB.");
db_->RollbackTransaction();
return false;
}
@@ -1970,38 +1938,38 @@ bool ResumptionDataDB::SaveApplicationToDB(
device_id,
&application_primary_key,
global_properties_key)) {
- LOG4CXX_WARN(logger_, "Incorrect insert application data to DB.");
+ SDL_LOG_WARN("Incorrect insert application data to DB.");
db_->RollbackTransaction();
return false;
}
if (!InsertFilesData(application["applicationFiles"],
application_primary_key)) {
- LOG4CXX_WARN(logger_, "Incorrect insert file data to DB.");
+ SDL_LOG_WARN("Incorrect insert file data to DB.");
db_->RollbackTransaction();
return false;
}
if (!InsertSubMenuData(application["applicationSubMenus"],
application_primary_key)) {
- LOG4CXX_WARN(logger_, "Incorrect insert submenu data to DB.");
+ SDL_LOG_WARN("Incorrect insert submenu data to DB.");
db_->RollbackTransaction();
return false;
}
if (!InsertCommandsData(application["applicationCommands"],
application_primary_key)) {
- LOG4CXX_WARN(logger_, "Incorrect insert commands data to DB.");
+ SDL_LOG_WARN("Incorrect insert commands data to DB.");
db_->RollbackTransaction();
return false;
}
if (!InsertSubscriptionsData(application["subscriptions"],
application_primary_key)) {
- LOG4CXX_WARN(logger_, "Incorrect insert subscriptions data to DB.");
+ SDL_LOG_WARN("Incorrect insert subscriptions data to DB.");
db_->RollbackTransaction();
return false;
}
if (!InsertChoiceSetData(application["applicationChoiceSets"],
application_primary_key)) {
- LOG4CXX_WARN(logger_, "Incorrect insert choiceset data to DB.");
+ SDL_LOG_WARN("Incorrect insert choiceset data to DB.");
db_->RollbackTransaction();
return false;
}
@@ -2011,20 +1979,19 @@ bool ResumptionDataDB::SaveApplicationToDB(
bool ResumptionDataDB::InsertFilesData(const smart_objects::SmartObject& files,
int64_t application_primary_key) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
using namespace smart_objects;
const size_t length_files_array = files.length();
if (0 == length_files_array) {
- LOG4CXX_INFO(logger_, "Application doesn't contain files");
+ SDL_LOG_INFO("Application doesn't contain files");
return true;
}
utils::dbms::SQLQuery query_insert_file(db());
if (!query_insert_file.Prepare(kInsertToFile)) {
- LOG4CXX_WARN(logger_,
- "Problem with verification queries for insertion files");
+ SDL_LOG_WARN("Problem with verification queries for insertion files");
return false;
}
/* Positions of binding data for "query_insert_file":
@@ -2040,7 +2007,7 @@ bool ResumptionDataDB::InsertFilesData(const smart_objects::SmartObject& files,
query_insert_file.Bind(3, (files[i][strings::sync_file_name]).asString());
if (!query_insert_file.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect insertion of files data");
+ SDL_LOG_WARN("Incorrect insertion of files data");
return false;
}
@@ -2048,31 +2015,30 @@ bool ResumptionDataDB::InsertFilesData(const smart_objects::SmartObject& files,
query_insert_file.LastInsertId(),
kInsertToApplicationFilesArray)) ||
!query_insert_file.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insertion to application files array");
+ SDL_LOG_WARN("Incorrect insertion to application files array");
return false;
}
}
- LOG4CXX_INFO(logger_, "Files data were inserted successfully to DB");
+ SDL_LOG_INFO("Files data were inserted successfully to DB");
return true;
}
bool ResumptionDataDB::InsertSubMenuData(
const smart_objects::SmartObject& submenus,
int64_t application_primary_key) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
using namespace smart_objects;
const size_t length_submenu_array = submenus.length();
if (0 == length_submenu_array) {
- LOG4CXX_INFO(logger_, "Application doesn't contain submenu");
+ SDL_LOG_INFO("Application doesn't contain submenu");
return true;
}
utils::dbms::SQLQuery query_insert_submenu(db());
if (!query_insert_submenu.Prepare(kInsertToSubMenu)) {
- LOG4CXX_WARN(logger_,
- "Problem with verification queries for insertion submenu");
+ SDL_LOG_WARN("Problem with verification queries for insertion submenu");
return false;
}
/* Positions of binding data for "query_insert_submenu":
@@ -2085,7 +2051,7 @@ bool ResumptionDataDB::InsertSubMenuData(
CustomBind(strings::position, submenus[i], query_insert_submenu, 2);
if (!query_insert_submenu.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect insertion of submenu data");
+ SDL_LOG_WARN("Incorrect insertion of submenu data");
return false;
}
@@ -2093,33 +2059,31 @@ bool ResumptionDataDB::InsertSubMenuData(
query_insert_submenu.LastInsertId(),
kInsertToApplicationSubMenuArray)) ||
!query_insert_submenu.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insertion to application submenu array");
+ SDL_LOG_WARN("Incorrect insertion to application submenu array");
return false;
}
}
- LOG4CXX_INFO(logger_, "Data about submenu were inserted successfully to DB");
+ SDL_LOG_INFO("Data about submenu were inserted successfully to DB");
return true;
}
bool ResumptionDataDB::InsertCommandsData(
const smart_objects::SmartObject& commands,
int64_t application_primary_key) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
using namespace smart_objects;
const size_t length_command_array = commands.length();
if (0 == length_command_array) {
- LOG4CXX_INFO(logger_, "Application doesn't contain command");
+ SDL_LOG_INFO("Application doesn't contain command");
return true;
}
utils::dbms::SQLQuery query_insert_command(db());
int64_t image_primary_key = 0;
- int64_t command_primary_key = 0;
if (!query_insert_command.Prepare(kInsertToCommand)) {
- LOG4CXX_WARN(logger_,
- "Problem with verification queries for insertion commands");
+ SDL_LOG_WARN("Problem with verification queries for insertion commands");
return false;
}
/* Positions of binding data for "query_insert_command":
@@ -2132,7 +2096,7 @@ bool ResumptionDataDB::InsertCommandsData(
query_insert_command.Bind(0, commands[i][strings::cmd_id].asInt());
if (commands[i].keyExists(strings::cmd_icon)) {
if (!ExecInsertImage(image_primary_key, commands[i][strings::cmd_icon])) {
- LOG4CXX_WARN(logger_, "Problem with insert command image to DB");
+ SDL_LOG_WARN("Problem with insert command image to DB");
return false;
}
query_insert_command.Bind(1, image_primary_key);
@@ -2152,10 +2116,10 @@ bool ResumptionDataDB::InsertCommandsData(
query_insert_command.Bind(4);
}
if (!query_insert_command.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect insertion of command data to DB");
+ SDL_LOG_WARN("Incorrect insertion of command data to DB");
return false;
}
- command_primary_key = query_insert_command.LastInsertId();
+ int64_t command_primary_key = query_insert_command.LastInsertId();
if (commands[i].keyExists(strings::vr_commands)) {
if (!ExecInsertVrCommands(command_primary_key,
commands[i][strings::vr_commands],
@@ -2167,8 +2131,7 @@ bool ResumptionDataDB::InsertCommandsData(
command_primary_key,
kInsertApplicationCommandArray)) ||
!query_insert_command.Reset()) {
- LOG4CXX_WARN(logger_,
- "Incorrect insertion to application commands array");
+ SDL_LOG_WARN("Incorrect insertion to application commands array");
return false;
}
}
@@ -2178,12 +2141,12 @@ bool ResumptionDataDB::InsertCommandsData(
bool ResumptionDataDB::InsertSubscriptionsData(
const smart_objects::SmartObject& subscriptions,
int64_t application_primary_key) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
using namespace smart_objects;
if (subscriptions.empty()) {
- LOG4CXX_INFO(logger_, "Application doesn't contain subscriptions");
+ SDL_LOG_INFO("Application doesn't contain subscriptions");
return true;
}
const SmartObject& btn_sub = subscriptions[strings::application_buttons];
@@ -2195,8 +2158,7 @@ bool ResumptionDataDB::InsertSubscriptionsData(
utils::dbms::SQLQuery insert_subscriptions(db());
if (!insert_subscriptions.Prepare(kInsertSubscriptions)) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Problem with verification queries for insertion subscriptions");
return false;
}
@@ -2217,23 +2179,23 @@ bool ResumptionDataDB::InsertSubscriptionsData(
insert_subscriptions.Bind(2);
}
if (!insert_subscriptions.Exec() || !insert_subscriptions.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insertion of buttons to subscriptions");
+ SDL_LOG_WARN("Incorrect insertion of buttons to subscriptions");
return false;
}
}
- LOG4CXX_INFO(logger_, "Subscriptions data were saved successfully");
+ SDL_LOG_INFO("Subscriptions data were saved successfully");
return true;
}
bool ResumptionDataDB::InsertChoiceSetData(
const smart_objects::SmartObject& choicesets,
int64_t application_primary_key) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
using namespace smart_objects;
if (choicesets.empty()) {
- LOG4CXX_INFO(logger_, "Application doesn't contain choiceSet");
+ SDL_LOG_INFO("Application doesn't contain choiceSet");
return true;
}
int64_t choice_set_key = 0;
@@ -2250,27 +2212,27 @@ bool ResumptionDataDB::InsertChoiceSetData(
if (!ExecInsertDataToArray(choice_set_key,
application_primary_key,
kInsertApplicationChoiceSetArray)) {
- LOG4CXX_WARN(logger_,
- "Problem with insertion data to"
- " applicationChoiceSetArray table");
+ SDL_LOG_WARN(
+ "Problem with insertion data to"
+ " applicationChoiceSetArray table");
return false;
}
}
- LOG4CXX_INFO(logger_, "Choice set data were saved to DB successfully");
+ SDL_LOG_INFO("Choice set data were saved to DB successfully");
return true;
}
bool ResumptionDataDB::ExecInsertApplicationChoiceSet(
int64_t& choice_set_primary_key,
const smart_objects::SmartObject& choiceset) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
utils::dbms::SQLQuery insert_application_choice_set(db());
if (!insert_application_choice_set.Prepare(kInsertApplicationChoiceSet)) {
- LOG4CXX_WARN(logger_,
- "Problem with preparation insert "
- "application choice set query");
+ SDL_LOG_WARN(
+ "Problem with preparation insert "
+ "application choice set query");
return false;
}
/* Positions of binding data for "insert_application_choice_set":
@@ -2282,19 +2244,18 @@ bool ResumptionDataDB::ExecInsertApplicationChoiceSet(
1, choiceset[strings::interaction_choice_set_id].asInt());
if (!insert_application_choice_set.Exec()) {
- LOG4CXX_WARN(logger_,
- "Problem with execution insert application choice set query");
+ SDL_LOG_WARN("Problem with execution insert application choice set query");
return false;
}
choice_set_primary_key = insert_application_choice_set.LastInsertId();
- LOG4CXX_INFO(logger_, "Application choice data were saved successfully");
+ SDL_LOG_INFO("Application choice data were saved successfully");
return true;
}
bool ResumptionDataDB::InsertGlobalPropertiesData(
const smart_objects::SmartObject& global_properties,
int64_t& global_properties_key) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
using namespace smart_objects;
SmartMap::iterator it_begin = global_properties.map_begin();
@@ -2302,22 +2263,22 @@ bool ResumptionDataDB::InsertGlobalPropertiesData(
bool data_exists = false;
while (it_begin != it_end) {
if (SmartType::SmartType_Null != ((it_begin->second).getType())) {
- LOG4CXX_INFO(logger_, "Global properties contains - " << it_begin->first);
+ SDL_LOG_INFO("Global properties contains - " << it_begin->first);
data_exists = true;
break;
}
++it_begin;
}
if (!data_exists) {
- LOG4CXX_INFO(logger_, "Application doesn't contain global properties");
+ SDL_LOG_INFO("Application doesn't contain global properties");
return true;
}
utils::dbms::SQLQuery insert_global_properties(db());
if (!insert_global_properties.Prepare(kInsertGlobalProperties)) {
- LOG4CXX_WARN(logger_,
- "Problem with preparation query "
- "insert_global_properties");
+ SDL_LOG_WARN(
+ "Problem with preparation query "
+ "insert_global_properties");
return false;
}
/* Positions of binding data for "insert_global_properties":
@@ -2342,7 +2303,7 @@ bool ResumptionDataDB::InsertGlobalPropertiesData(
if (ExecInsertImage(image_key, global_properties[strings::menu_icon])) {
insert_global_properties.Bind(2, image_key);
} else {
- LOG4CXX_WARN(logger_, "Problem with insert image to global properties");
+ SDL_LOG_WARN("Problem with insert image to global properties");
return false;
}
}
@@ -2365,8 +2326,7 @@ bool ResumptionDataDB::InsertGlobalPropertiesData(
strings::auto_complete_text, kb_prop, insert_global_properties, 6);
}
if (!insert_global_properties.Exec()) {
- LOG4CXX_WARN(logger_,
- "Problem with insert data to global properties table");
+ SDL_LOG_WARN("Problem with insert data to global properties table");
return false;
}
@@ -2379,8 +2339,7 @@ bool ResumptionDataDB::InsertGlobalPropertiesData(
global_properties_key,
global_properties[strings::keyboard_properties]
[strings::limited_character_list])) {
- LOG4CXX_WARN(logger_,
- "Problem with insert data to limited_character table");
+ SDL_LOG_WARN("Problem with insert data to limited_character table");
return false;
}
}
@@ -2389,25 +2348,24 @@ bool ResumptionDataDB::InsertGlobalPropertiesData(
global_properties[strings::vr_help].getType()) {
if (!ExecInsertVRHelpItem(global_properties_key,
global_properties[strings::vr_help])) {
- LOG4CXX_WARN(logger_, "Problem with insert data to vrHelpItem table");
+ SDL_LOG_WARN("Problem with insert data to vrHelpItem table");
return false;
}
}
if (!ExecInsertHelpTimeoutArray(global_properties, global_properties_key)) {
- LOG4CXX_WARN(logger_,
- "Problem with insert data to HelpTimeoutPromptArray table");
+ SDL_LOG_WARN("Problem with insert data to HelpTimeoutPromptArray table");
return false;
}
- LOG4CXX_INFO(logger_, "Global properties data were saved successfully");
+ SDL_LOG_INFO("Global properties data were saved successfully");
return true;
}
bool ResumptionDataDB::ExecInsertHelpTimeoutArray(
const smart_objects::SmartObject& global_properties,
int64_t global_properties_key) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
using namespace smart_objects;
size_t timeout_prompt_length = 0;
@@ -2423,16 +2381,14 @@ bool ResumptionDataDB::ExecInsertHelpTimeoutArray(
timeout_prompt_length = global_properties[strings::timeout_prompt].length();
}
if (0 == timeout_prompt_length && 0 == help_prompt_length) {
- LOG4CXX_INFO(logger_,
- "Application doesn't HelpPrompt and timoutPrompt data");
+ SDL_LOG_INFO("Application doesn't HelpPrompt and timoutPrompt data");
return true;
}
utils::dbms::SQLQuery insert_help_prompt_array(db());
if (!insert_help_prompt_array.Prepare(kInsertHelpTimeoutPromptArray)) {
- LOG4CXX_WARN(logger_,
- "Problem with verification query insert_help_prompt_array");
+ SDL_LOG_WARN("Problem with verification query insert_help_prompt_array");
return false;
}
int64_t tts_chunk_key = 0;
@@ -2449,8 +2405,7 @@ bool ResumptionDataDB::ExecInsertHelpTimeoutArray(
if (i < timeout_prompt_length) {
if (!ExecInsertTTSChunks(global_properties[strings::timeout_prompt][i],
tts_chunk_key)) {
- LOG4CXX_WARN(logger_,
- "Problem with insertion timeoutPrompt's ttsChunk");
+ SDL_LOG_WARN("Problem with insertion timeoutPrompt's ttsChunk");
return false;
}
insert_help_prompt_array.Bind(1, tts_chunk_key);
@@ -2461,7 +2416,7 @@ bool ResumptionDataDB::ExecInsertHelpTimeoutArray(
if (i < help_prompt_length) {
if (!ExecInsertTTSChunks(global_properties[strings::help_prompt][i],
tts_chunk_key)) {
- LOG4CXX_WARN(logger_, "Problem with insertion helpPrompt's ttsChunk");
+ SDL_LOG_WARN("Problem with insertion helpPrompt's ttsChunk");
return false;
}
insert_help_prompt_array.Bind(2, tts_chunk_key);
@@ -2469,23 +2424,22 @@ bool ResumptionDataDB::ExecInsertHelpTimeoutArray(
insert_help_prompt_array.Bind(2);
}
if (!insert_help_prompt_array.Exec() || !insert_help_prompt_array.Reset()) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Problem with execution or resetting insert_help_prompt_array query");
return false;
}
}
- LOG4CXX_INFO(logger_, "Data were saved to helpTimeoutPromptArray table");
+ SDL_LOG_INFO("Data were saved to helpTimeoutPromptArray table");
return true;
}
bool ResumptionDataDB::ExecInsertTTSChunks(
const smart_objects::SmartObject& tts_chunk, int64_t& tts_chunk_key) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
utils::dbms::SQLQuery insert_tts_chunk(db());
if (!insert_tts_chunk.Prepare(kInsertTTSChunk)) {
- LOG4CXX_WARN(logger_, "Problem with verification insert_tts_chunk query");
+ SDL_LOG_WARN("Problem with verification insert_tts_chunk query");
return false;
}
/* Positions of binding data for "insert_tts_chunk":
@@ -2494,24 +2448,24 @@ bool ResumptionDataDB::ExecInsertTTSChunks(
insert_tts_chunk.Bind(0, tts_chunk[strings::type].asInt());
insert_tts_chunk.Bind(1, tts_chunk[strings::text].asString());
if (!insert_tts_chunk.Exec()) {
- LOG4CXX_WARN(logger_, "Problem with execution insert_tts_chunk query");
+ SDL_LOG_WARN("Problem with execution insert_tts_chunk query");
return false;
}
tts_chunk_key = insert_tts_chunk.LastInsertId();
- LOG4CXX_WARN(logger_, "TTSChunk was saved successfully");
+ SDL_LOG_WARN("TTSChunk was saved successfully");
return true;
}
bool ResumptionDataDB::ExecInsertLimitedCharacters(
int64_t global_properties_key,
const smart_objects::SmartObject& characters_array) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
utils::dbms::SQLQuery insert_characters(db());
if (!insert_characters.Prepare(kInsertTableLimitedCharacter)) {
- LOG4CXX_WARN(logger_,
- "Problem with preparation query "
- "insert_characters");
+ SDL_LOG_WARN(
+ "Problem with preparation query "
+ "insert_characters");
return false;
}
size_t length_characters_array = characters_array.length();
@@ -2521,31 +2475,29 @@ bool ResumptionDataDB::ExecInsertLimitedCharacters(
insert_characters.Bind(0, characters_array[i].asString());
if (!insert_characters.Exec()) {
- LOG4CXX_WARN(logger_,
- "Problem with insert data to limited_character table");
+ SDL_LOG_WARN("Problem with insert data to limited_character table");
return false;
}
if ((!ExecInsertDataToArray(global_properties_key,
insert_characters.LastInsertId(),
kInsertCharacterArray)) ||
(!insert_characters.Reset())) {
- LOG4CXX_WARN(logger_, "Problem with insert data to characterArray table");
+ SDL_LOG_WARN("Problem with insert data to characterArray table");
return false;
}
}
- LOG4CXX_INFO(logger_,
- "Data were saved successfully to limited_character table");
+ SDL_LOG_INFO("Data were saved successfully to limited_character table");
return true;
}
bool ResumptionDataDB::ExecInsertVRHelpItem(
int64_t global_properties_key,
const smart_objects::SmartObject& vrhelp_array) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
utils::dbms::SQLQuery insert_vrhelp_item(db());
if (!insert_vrhelp_item.Prepare(kInsertVRHelpItem)) {
- LOG4CXX_WARN(logger_, "Problem with preparation query insert_vrhelp_item");
+ SDL_LOG_WARN("Problem with preparation query insert_vrhelp_item");
return false;
}
int64_t image_primary_key = 0;
@@ -2560,7 +2512,7 @@ bool ResumptionDataDB::ExecInsertVRHelpItem(
if (vrhelp_array[i].keyExists(strings::image)) {
if (!ExecInsertImage(image_primary_key,
vrhelp_array[i][strings::image])) {
- LOG4CXX_INFO(logger_, "Problem with insert image to vrHelpItem table");
+ SDL_LOG_INFO("Problem with insert image to vrHelpItem table");
return false;
}
insert_vrhelp_item.Bind(2, image_primary_key);
@@ -2569,7 +2521,7 @@ bool ResumptionDataDB::ExecInsertVRHelpItem(
}
if (!insert_vrhelp_item.Exec()) {
- LOG4CXX_INFO(logger_, "Problem with insert data vrHelpItem table");
+ SDL_LOG_INFO("Problem with insert data vrHelpItem table");
return false;
}
@@ -2577,13 +2529,11 @@ bool ResumptionDataDB::ExecInsertVRHelpItem(
insert_vrhelp_item.LastInsertId(),
kInsertVRHelpItemArray)) ||
(!insert_vrhelp_item.Reset())) {
- LOG4CXX_WARN(logger_,
- "Problem with insert data to vrHelpItemArray table");
+ SDL_LOG_WARN("Problem with insert data to vrHelpItemArray table");
return false;
}
}
- LOG4CXX_INFO(logger_,
- "Data were saved successfully to vrHelpItem array table");
+ SDL_LOG_INFO("Data were saved successfully to vrHelpItem array table");
return true;
}
@@ -2591,7 +2541,7 @@ bool ResumptionDataDB::InsertApplicationData(
app_mngr::ApplicationSharedPtr application,
const std::string& policy_app_id,
const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationParams app(application);
return InsertApplicationData(app, policy_app_id, device_id, NULL, 0);
}
@@ -2602,12 +2552,12 @@ bool ResumptionDataDB::InsertApplicationData(
const std::string& device_id,
int64_t* application_primary_key,
int64_t global_properties_key) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
utils::dbms::SQLQuery query(db());
if (!application.m_is_valid) {
- LOG4CXX_ERROR(logger_, "Invalid application params passed.");
+ SDL_LOG_ERROR("Invalid application params passed.");
return false;
}
@@ -2619,12 +2569,12 @@ bool ResumptionDataDB::InsertApplicationData(
const mobile_apis::HMILevel::eType hmi_level = application.m_hmi_level;
bool is_media_application = application.m_is_media_application;
bool is_subscribed_for_way_points =
- application_manager_.IsAppSubscribedForWayPoints(application.app_ptr);
+ application_manager_.IsAppSubscribedForWayPoints(*(application.app_ptr));
if (!query.Prepare(kInsertApplication)) {
- LOG4CXX_WARN(logger_,
- "Problem with verification query "
- "for insert to table application");
+ SDL_LOG_WARN(
+ "Problem with verification query "
+ "for insert to table application");
return false;
}
@@ -2659,13 +2609,13 @@ bool ResumptionDataDB::InsertApplicationData(
query.Bind(11, is_subscribed_for_way_points);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Problem with execution query");
+ SDL_LOG_WARN("Problem with execution query");
return false;
}
if (NULL != application_primary_key) {
*application_primary_key = query.LastInsertId();
}
- LOG4CXX_INFO(logger_, "Data were saved successfully to application table");
+ SDL_LOG_INFO("Data were saved successfully to application table");
return true;
}
@@ -2673,7 +2623,7 @@ void ResumptionDataDB::CustomBind(const std::string& key,
const smart_objects::SmartObject& so,
utils::dbms::SQLQuery& query,
const int pos) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace smart_objects;
if (so.keyExists(key) && SmartType::SmartType_Null != so[key].getType()) {
switch (so[key].getType()) {
@@ -2686,7 +2636,7 @@ void ResumptionDataDB::CustomBind(const std::string& key,
break;
}
default: {
- LOG4CXX_WARN(logger_, "Incorrect type");
+ SDL_LOG_WARN("Incorrect type");
break;
}
}
@@ -2699,9 +2649,9 @@ bool ResumptionDataDB::PrepareSelectQuery(utils::dbms::SQLQuery& query,
const std::string& policy_app_id,
const std::string& device_id,
const std::string& text_query) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!query.Prepare(text_query)) {
- LOG4CXX_WARN(logger_, "Problem with verification query");
+ SDL_LOG_WARN("Problem with verification query");
return false;
}
query.Bind(0, policy_app_id);
@@ -2710,13 +2660,12 @@ bool ResumptionDataDB::PrepareSelectQuery(utils::dbms::SQLQuery& query,
}
void ResumptionDataDB::UpdateDataOnAwake() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (query.Prepare(kUpdateIgnOffCount)) {
if (query.Exec()) {
- LOG4CXX_INFO(logger_,
- "Values of ignition off counts were updated successfully");
+ SDL_LOG_INFO("Values of ignition off counts were updated successfully");
WriteDb();
}
}
@@ -2726,7 +2675,7 @@ bool ResumptionDataDB::UpdateApplicationData(
app_mngr::ApplicationConstSharedPtr application,
const std::string& policy_app_id,
const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
utils::dbms::SQLQuery query(db());
@@ -2735,9 +2684,9 @@ bool ResumptionDataDB::UpdateApplicationData(
application->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
if (!query.Prepare(kUpdateApplicationData)) {
- LOG4CXX_WARN(logger_,
- "Problem with verification query "
- "for updating some application data");
+ SDL_LOG_WARN(
+ "Problem with verification query "
+ "for updating some application data");
return false;
}
@@ -2752,28 +2701,27 @@ bool ResumptionDataDB::UpdateApplicationData(
query.Bind(3, device_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Problem with execution query");
+ SDL_LOG_WARN("Problem with execution query");
return false;
}
- LOG4CXX_INFO(logger_, "Data were updated successfully in application table");
+ SDL_LOG_INFO("Data were updated successfully in application table");
return true;
}
void ResumptionDataDB::WriteDb() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
db_->Backup();
}
bool ResumptionDataDB::UpdateGrammarID(const std::string& policy_app_id,
const std::string& device_id,
const uint32_t grammar_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
utils::dbms::SQLQuery query(db());
if (!query.Prepare(kUpdateGrammarID)) {
- LOG4CXX_WARN(logger_,
- "Problem with verification query for updating grammar id.");
+ SDL_LOG_WARN("Problem with verification query for updating grammar id.");
return false;
}
@@ -2786,10 +2734,10 @@ bool ResumptionDataDB::UpdateGrammarID(const std::string& policy_app_id,
query.Bind(2, device_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Problem with execution query");
+ SDL_LOG_WARN("Problem with execution query");
return false;
}
- LOG4CXX_INFO(logger_, "Data were updated successfully in application table");
+ SDL_LOG_INFO("Data were updated successfully in application table");
return true;
}
diff --git a/src/components/application_manager/src/resumption/resumption_data_json.cc b/src/components/application_manager/src/resumption/resumption_data_json.cc
index 3623c18b90..f3d417d128 100644
--- a/src/components/application_manager/src/resumption/resumption_data_json.cc
+++ b/src/components/application_manager/src/resumption/resumption_data_json.cc
@@ -43,7 +43,7 @@ namespace resumption {
namespace formatters = ns_smart_device_link::ns_json_handler::formatters;
-CREATE_LOGGERPTR_GLOBAL(logger_, "Resumption")
+SDL_CREATE_LOG_VARIABLE("Resumption")
ResumptionDataJson::ResumptionDataJson(
resumption::LastStateWrapperPtr last_state_wrapper,
@@ -54,12 +54,11 @@ ResumptionDataJson::ResumptionDataJson(
void ResumptionDataJson::SaveApplication(
app_mngr::ApplicationSharedPtr application) {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(application);
const std::string& policy_app_id = application->policy_app_id();
- LOG4CXX_DEBUG(logger_,
- "app_id : " << application->app_id()
+ SDL_LOG_DEBUG("app_id : " << application->app_id()
<< " policy_app_id : " << policy_app_id);
const std::string hash = application->curHash();
const uint32_t grammar_id = application->get_grammar_id();
@@ -68,7 +67,7 @@ void ResumptionDataJson::SaveApplication(
const mobile_apis::HMILevel::eType hmi_level =
application->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
const bool is_subscribed_for_way_points =
- application_manager_.IsAppSubscribedForWayPoints(application);
+ application_manager_.IsAppSubscribedForWayPoints(*application);
Json::Value tmp;
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
@@ -110,12 +109,12 @@ void ResumptionDataJson::SaveApplication(
json_app[strings::subscribed_for_way_points] = is_subscribed_for_way_points;
accessor.GetMutableData().set_dictionary(dictionary);
- LOG4CXX_DEBUG(logger_, "SaveApplication : " << json_app.toStyledString());
+ SDL_LOG_DEBUG("SaveApplication : " << json_app.toStyledString());
}
bool ResumptionDataJson::IsHMIApplicationIdExist(uint32_t hmi_app_id) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
Json::Value dictionary = accessor.GetData().dictionary();
@@ -134,13 +133,13 @@ bool ResumptionDataJson::IsHMIApplicationIdExist(uint32_t hmi_app_id) const {
uint32_t ResumptionDataJson::GetHMIApplicationID(
const std::string& policy_app_id, const std::string& device_id) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t hmi_app_id = 0;
const int idx = GetObjectIndex(policy_app_id, device_id);
if (-1 == idx) {
- LOG4CXX_WARN(logger_, "Application not saved");
+ SDL_LOG_WARN("Application not saved");
return hmi_app_id;
}
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
@@ -150,13 +149,13 @@ uint32_t ResumptionDataJson::GetHMIApplicationID(
json_app.isMember(strings::device_id)) {
hmi_app_id = json_app[strings::hmi_app_id].asUInt();
}
- LOG4CXX_DEBUG(logger_, "hmi_app_id :" << hmi_app_id);
+ SDL_LOG_DEBUG("hmi_app_id :" << hmi_app_id);
return hmi_app_id;
}
void ResumptionDataJson::IncrementIgnOffCount() {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
Json::Value to_save = Json::arrayValue;
Json::Value dictionary;
@@ -169,7 +168,7 @@ void ResumptionDataJson::IncrementIgnOffCount() {
const uint32_t counter_value = ign_off_count.asUInt();
ign_off_count = counter_value + 1;
} else {
- LOG4CXX_WARN(logger_, "Unknown key among saved applications");
+ SDL_LOG_WARN("Unknown key among saved applications");
Json::Value& ign_off_count = json_app[strings::ign_off_count];
ign_off_count = 1;
}
@@ -178,12 +177,12 @@ void ResumptionDataJson::IncrementIgnOffCount() {
SetSavedApplication(to_save, dictionary);
SetLastIgnOffTime(time(nullptr), dictionary);
accessor.GetMutableData().set_dictionary(dictionary);
- LOG4CXX_DEBUG(logger_, GetResumptionData(dictionary).toStyledString());
+ SDL_LOG_DEBUG(GetResumptionData(dictionary).toStyledString());
}
void ResumptionDataJson::DecrementIgnOffCount() {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
Json::Value dictionary = accessor.GetData().dictionary();
@@ -192,12 +191,12 @@ void ResumptionDataJson::DecrementIgnOffCount() {
if (saved_app.isMember(strings::ign_off_count)) {
const uint32_t ign_off_count = saved_app[strings::ign_off_count].asUInt();
if (0 == ign_off_count) {
- LOG4CXX_WARN(logger_, "Application has not been suspended");
+ SDL_LOG_WARN("Application has not been suspended");
} else {
saved_app[strings::ign_off_count] = ign_off_count - 1;
}
} else {
- LOG4CXX_WARN(logger_, "Unknown key among saved applications");
+ SDL_LOG_WARN("Unknown key among saved applications");
saved_app[strings::ign_off_count] = 0;
}
}
@@ -208,25 +207,24 @@ bool ResumptionDataJson::GetHashId(const std::string& policy_app_id,
const std::string& device_id,
std::string& hash_id) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const int idx = GetObjectIndex(policy_app_id, device_id);
if (-1 == idx) {
- LOG4CXX_WARN(logger_, "Application not saved");
+ SDL_LOG_WARN("Application not saved");
return false;
}
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
Json::Value dictionary = accessor.GetData().dictionary();
const Json::Value& json_app = GetSavedApplications(dictionary)[idx];
- LOG4CXX_DEBUG(logger_,
- "Saved_application_data: " << json_app.toStyledString());
+ SDL_LOG_DEBUG("Saved_application_data: " << json_app.toStyledString());
if (json_app.isMember(strings::hash_id) &&
json_app.isMember(strings::time_stamp)) {
hash_id = json_app[strings::hash_id].asString();
return true;
}
- LOG4CXX_WARN(logger_, "There are some unknown keys in the dictionary.");
+ SDL_LOG_WARN("There are some unknown keys in the dictionary.");
return false;
}
@@ -235,7 +233,7 @@ bool ResumptionDataJson::GetSavedApplication(
const std::string& device_id,
smart_objects::SmartObject& saved_app) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const int idx = GetObjectIndex(policy_app_id, device_id);
if (-1 == idx) {
@@ -252,7 +250,7 @@ bool ResumptionDataJson::GetSavedApplication(
bool ResumptionDataJson::RemoveApplicationFromSaved(
const std::string& policy_app_id, const std::string& device_id) {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool result = false;
std::vector<Json::Value> temp;
@@ -273,7 +271,7 @@ bool ResumptionDataJson::RemoveApplicationFromSaved(
}
if (false == result) {
- LOG4CXX_TRACE(logger_, "EXIT result: " << (result ? "true" : "false"));
+ SDL_LOG_TRACE("EXIT result: " << (result ? "true" : "false"));
accessor.GetMutableData().set_dictionary(dictionary);
return result;
}
@@ -282,14 +280,14 @@ bool ResumptionDataJson::RemoveApplicationFromSaved(
for (auto& app : temp) {
GetSavedApplications(dictionary).append(app);
}
- LOG4CXX_TRACE(logger_, "EXIT result: " << (result ? "true" : "false"));
+ SDL_LOG_TRACE("EXIT result: " << (result ? "true" : "false"));
accessor.GetMutableData().set_dictionary(dictionary);
return result;
}
uint32_t ResumptionDataJson::GetIgnOffTime() const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
Json::Value dictionary = accessor.GetData().dictionary();
@@ -297,14 +295,14 @@ uint32_t ResumptionDataJson::GetIgnOffTime() const {
if (!resumption.isMember(strings::last_ign_off_time)) {
resumption[strings::last_ign_off_time] = 0;
accessor.GetMutableData().set_dictionary(dictionary);
- LOG4CXX_WARN(logger_, "last_save_time section is missed");
+ SDL_LOG_WARN("last_save_time section is missed");
}
return resumption[strings::last_ign_off_time].asUInt();
}
uint32_t ResumptionDataJson::GetGlobalIgnOnCounter() const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
Json::Value dictionary = accessor.GetData().dictionary();
@@ -312,7 +310,7 @@ uint32_t ResumptionDataJson::GetGlobalIgnOnCounter() const {
if (resumption.isMember(strings::global_ign_on_counter)) {
const uint32_t global_ign_on_counter =
resumption[strings::global_ign_on_counter].asUInt();
- LOG4CXX_DEBUG(logger_, "Global Ign On Counter = " << global_ign_on_counter);
+ SDL_LOG_DEBUG("Global Ign On Counter = " << global_ign_on_counter);
return global_ign_on_counter;
}
return 1;
@@ -320,7 +318,7 @@ uint32_t ResumptionDataJson::GetGlobalIgnOnCounter() const {
void ResumptionDataJson::IncrementGlobalIgnOnCounter() {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
Json::Value dictionary = accessor.GetData().dictionary();
@@ -328,13 +326,11 @@ void ResumptionDataJson::IncrementGlobalIgnOnCounter() {
if (resumption.isMember(strings::global_ign_on_counter)) {
const uint32_t global_ign_on_counter =
resumption[strings::global_ign_on_counter].asUInt();
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Global IGN ON counter in resumption data: " << global_ign_on_counter);
resumption[strings::global_ign_on_counter] = global_ign_on_counter + 1;
- LOG4CXX_DEBUG(logger_,
- "Global IGN ON counter new value: "
- << resumption[strings::global_ign_on_counter].asUInt());
+ SDL_LOG_DEBUG("Global IGN ON counter new value: "
+ << resumption[strings::global_ign_on_counter].asUInt());
} else {
resumption[strings::global_ign_on_counter] = 1;
}
@@ -344,7 +340,7 @@ void ResumptionDataJson::IncrementGlobalIgnOnCounter() {
void ResumptionDataJson::ResetGlobalIgnOnCount() {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
Json::Value dictionary = accessor.GetData().dictionary();
@@ -352,12 +348,12 @@ void ResumptionDataJson::ResetGlobalIgnOnCount() {
resumption[strings::global_ign_on_counter] = 0;
accessor.GetMutableData().set_dictionary(dictionary);
- LOG4CXX_DEBUG(logger_, "Global IGN ON counter resetting");
+ SDL_LOG_DEBUG("Global IGN ON counter resetting");
}
ssize_t ResumptionDataJson::IsApplicationSaved(
const std::string& policy_app_id, const std::string& device_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return GetObjectIndex(policy_app_id, device_id);
}
@@ -367,7 +363,7 @@ Json::Value& ResumptionDataJson::GetFromSavedOrAppend(
const std::string& device_id,
Json::Value& dictionary) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
Json::Value& saved_apps = GetSavedApplications(dictionary);
for (auto& saved_app : saved_apps) {
@@ -383,7 +379,7 @@ Json::Value& ResumptionDataJson::GetFromSavedOrAppend(
void ResumptionDataJson::GetDataForLoadResumeData(
smart_objects::SmartObject& saved_data) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObject so_array_data(smart_objects::SmartType_Array);
int i = 0;
@@ -417,14 +413,13 @@ void ResumptionDataJson::UpdateHmiLevel(
const std::string& policy_app_id,
const std::string& device_id,
mobile_apis::HMILevel::eType hmi_level) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
int idx = GetObjectIndex(policy_app_id, device_id);
if (-1 == idx) {
- LOG4CXX_WARN(logger_,
- "Application isn't saved with mobile_app_id = "
- << policy_app_id << " device_id = " << device_id);
+ SDL_LOG_WARN("Application isn't saved with mobile_app_id = "
+ << policy_app_id << " device_id = " << device_id);
return;
}
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
@@ -436,16 +431,16 @@ void ResumptionDataJson::UpdateHmiLevel(
Json::Value& ResumptionDataJson::GetSavedApplications(
Json::Value& dictionary) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
Json::Value& resumption = GetResumptionData(dictionary);
if (!resumption.isMember(strings::resume_app_list)) {
resumption[strings::resume_app_list] = Json::Value(Json::arrayValue);
- LOG4CXX_WARN(logger_, "app_list section is missed");
+ SDL_LOG_WARN("app_list section is missed");
}
Json::Value& resume_app_list = resumption[strings::resume_app_list];
if (!resume_app_list.isArray()) {
- LOG4CXX_ERROR(logger_, "resume_app_list type INVALID rewrite");
+ SDL_LOG_ERROR("resume_app_list type INVALID rewrite");
resume_app_list = Json::Value(Json::arrayValue);
}
return resume_app_list;
@@ -454,15 +449,15 @@ Json::Value& ResumptionDataJson::GetSavedApplications(
Json::Value& ResumptionDataJson::GetResumptionData(
Json::Value& dictionary) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!dictionary.isMember(strings::resumption)) {
dictionary[strings::resumption] = Json::Value(Json::objectValue);
- LOG4CXX_WARN(logger_, "resumption section is missed");
+ SDL_LOG_WARN("resumption section is missed");
}
Json::Value& resumption = dictionary[strings::resumption];
if (!resumption.isObject()) {
- LOG4CXX_ERROR(logger_, "resumption type INVALID rewrite");
+ SDL_LOG_ERROR("resumption type INVALID rewrite");
resumption = Json::Value(Json::objectValue);
}
return resumption;
@@ -471,7 +466,7 @@ Json::Value& ResumptionDataJson::GetResumptionData(
ssize_t ResumptionDataJson::GetObjectIndex(const std::string& policy_app_id,
const std::string& device_id) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
Json::Value dictionary = accessor.GetData().dictionary();
@@ -485,7 +480,7 @@ ssize_t ResumptionDataJson::GetObjectIndex(const std::string& policy_app_id,
const std::string& saved_device_id =
apps[idx][strings::device_id].asString();
if (device_id == saved_device_id && policy_app_id == saved_app_id) {
- LOG4CXX_DEBUG(logger_, "Found " << idx);
+ SDL_LOG_DEBUG("Found " << idx);
return idx;
}
}
@@ -495,7 +490,7 @@ ssize_t ResumptionDataJson::GetObjectIndex(const std::string& policy_app_id,
bool ResumptionDataJson::IsResumptionDataValid(uint32_t index) const {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
Json::Value dictionary = accessor.GetData().dictionary();
@@ -506,13 +501,13 @@ bool ResumptionDataJson::IsResumptionDataValid(uint32_t index) const {
!json_app.isMember(strings::hmi_app_id) ||
!json_app.isMember(strings::time_stamp) ||
!json_app.isMember(strings::device_id)) {
- LOG4CXX_ERROR(logger_, "Wrong resumption data");
+ SDL_LOG_ERROR("Wrong resumption data");
return false;
}
if (json_app.isMember(strings::hmi_app_id) &&
0 >= json_app[strings::hmi_app_id].asUInt()) {
- LOG4CXX_ERROR(logger_, "Wrong resumption hmi app ID");
+ SDL_LOG_ERROR("Wrong resumption hmi app ID");
return false;
}
@@ -521,7 +516,7 @@ bool ResumptionDataJson::IsResumptionDataValid(uint32_t index) const {
void ResumptionDataJson::SetSavedApplication(Json::Value& apps_json,
Json::Value& dictionary) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
Json::Value& app_list = GetSavedApplications(dictionary);
app_list = apps_json;
@@ -530,21 +525,21 @@ void ResumptionDataJson::SetSavedApplication(Json::Value& apps_json,
void ResumptionDataJson::SetLastIgnOffTime(time_t ign_off_time,
Json::Value& dictionary) {
using namespace app_mngr;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- LOG4CXX_WARN(logger_, "ign_off_time = " << ign_off_time);
+ SDL_LOG_WARN("ign_off_time = " << ign_off_time);
Json::Value& resumption = GetResumptionData(dictionary);
resumption[strings::last_ign_off_time] = static_cast<uint32_t>(ign_off_time);
}
bool ResumptionDataJson::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return true;
}
bool ResumptionDataJson::DropAppDataResumption(const std::string& device_id,
const std::string& app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace app_mngr;
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
@@ -552,8 +547,7 @@ bool ResumptionDataJson::DropAppDataResumption(const std::string& device_id,
Json::Value& application =
GetFromSavedOrAppend(app_id, device_id, dictionary);
if (application.isNull()) {
- LOG4CXX_DEBUG(logger_,
- "Application " << app_id << " with device_id " << device_id
+ SDL_LOG_DEBUG("Application " << app_id << " with device_id " << device_id
<< " hasn't been found in resumption data.");
return false;
}
@@ -565,10 +559,9 @@ bool ResumptionDataJson::DropAppDataResumption(const std::string& device_id,
application[strings::application_files].clear();
application.removeMember(strings::grammar_id);
accessor.GetMutableData().set_dictionary(dictionary);
- LOG4CXX_DEBUG(logger_,
- "Resumption data for application "
- << app_id << " with device_id " << device_id
- << " has been dropped.");
+ SDL_LOG_DEBUG("Resumption data for application "
+ << app_id << " with device_id " << device_id
+ << " has been dropped.");
return true;
}
diff --git a/src/components/application_manager/src/resumption/resumption_data_processor_impl.cc b/src/components/application_manager/src/resumption/resumption_data_processor_impl.cc
new file mode 100644
index 0000000000..792e7f97ea
--- /dev/null
+++ b/src/components/application_manager/src/resumption/resumption_data_processor_impl.cc
@@ -0,0 +1,1136 @@
+/*
+ Copyright (c) 2020, Ford Motor Company
+ All rights reserved.
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <algorithm>
+
+#include "application_manager/application_manager.h"
+#include "application_manager/commands/command_impl.h"
+#include "application_manager/display_capabilities_builder.h"
+#include "application_manager/event_engine/event_observer.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/resumption/resumption_data_processor_impl.h"
+#include "application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h"
+#include "application_manager/smart_object_keys.h"
+
+namespace resumption {
+
+using app_mngr::AppFile;
+using app_mngr::ApplicationSharedPtr;
+using app_mngr::ButtonSubscriptions;
+using app_mngr::ChoiceSetMap;
+using app_mngr::MessageHelper;
+namespace strings = app_mngr::strings;
+namespace event_engine = app_mngr::event_engine;
+namespace commands = app_mngr::commands;
+namespace message_params = rc_rpc_plugin::message_params;
+
+SDL_CREATE_LOG_VARIABLE("Resumption")
+
+bool ResumptionRequestID::operator<(const ResumptionRequestID& other) const {
+ return correlation_id < other.correlation_id ||
+ function_id < other.function_id;
+}
+
+ResumptionDataProcessorImpl::ResumptionDataProcessorImpl(
+ app_mngr::ApplicationManager& application_manager)
+ : event_engine::EventObserver(application_manager.event_dispatcher())
+ , application_manager_(application_manager)
+ , resumption_status_lock_()
+ , register_callbacks_lock_()
+ , request_app_ids_lock_() {}
+
+ResumptionDataProcessorImpl::~ResumptionDataProcessorImpl() {}
+
+void ResumptionDataProcessorImpl::Restore(
+ ApplicationSharedPtr application,
+ smart_objects::SmartObject& saved_app,
+ ResumeCtrl::ResumptionCallBack callback) {
+ SDL_LOG_AUTO_TRACE();
+
+ AddFiles(application, saved_app);
+ AddSubmenus(application, saved_app);
+ AddCommands(application, saved_app);
+ AddChoicesets(application, saved_app);
+ SetGlobalProperties(application, saved_app);
+ AddSubscriptions(application, saved_app);
+ AddWindows(application, saved_app);
+
+ const auto app_id = application->app_id();
+ if (!IsResumptionFinished(app_id)) {
+ sync_primitives::AutoWriteLock lock(register_callbacks_lock_);
+ register_callbacks_[app_id] = callback;
+ } else {
+ FinalizeResumption(callback, app_id);
+ }
+}
+
+utils::Optional<uint32_t>
+ResumptionDataProcessorImpl::GetAppIdWaitingForResponse(
+ const hmi_apis::FunctionID::eType function_id, const int32_t corr_id) {
+ SDL_LOG_AUTO_TRACE();
+
+ auto predicate =
+ [function_id,
+ corr_id](const std::pair<ResumptionRequestID, std::uint32_t>& item) {
+ return item.first.function_id == function_id &&
+ item.first.correlation_id == corr_id;
+ };
+
+ sync_primitives::AutoReadLock lock(request_app_ids_lock_);
+ auto app_id_ptr =
+ std::find_if(request_app_ids_.begin(), request_app_ids_.end(), predicate);
+
+ if (app_id_ptr == request_app_ids_.end()) {
+ return utils::Optional<uint32_t>::OptionalEmpty::EMPTY;
+ }
+ return utils::Optional<uint32_t>(app_id_ptr->second);
+}
+
+utils::Optional<ResumptionRequest> ResumptionDataProcessorImpl::GetRequest(
+ const uint32_t app_id,
+ const hmi_apis::FunctionID::eType function_id,
+ const int32_t corr_id) {
+ SDL_LOG_AUTO_TRACE();
+
+ sync_primitives::AutoReadLock lock(resumption_status_lock_);
+ std::vector<ResumptionRequest>& list_of_sent_requests =
+ resumption_status_[app_id].list_of_sent_requests;
+
+ if (resumption_status_.find(app_id) == resumption_status_.end()) {
+ SDL_LOG_ERROR("No resumption status info found for app_id: " << app_id);
+ return utils::Optional<ResumptionRequest>::OptionalEmpty::EMPTY;
+ }
+
+ auto request_iter =
+ std::find_if(list_of_sent_requests.begin(),
+ list_of_sent_requests.end(),
+ [function_id, corr_id](const ResumptionRequest& request) {
+ return request.request_id.correlation_id == corr_id &&
+ request.request_id.function_id == function_id;
+ });
+
+ if (list_of_sent_requests.end() == request_iter) {
+ return utils::Optional<ResumptionRequest>::OptionalEmpty::EMPTY;
+ }
+ return utils::Optional<ResumptionRequest>(*request_iter);
+}
+
+void ResumptionDataProcessorImpl::ProcessResumptionStatus(
+ const uint32_t app_id,
+ const smart_objects::SmartObject& response,
+ const ResumptionRequest& found_request) {
+ SDL_LOG_AUTO_TRACE();
+
+ sync_primitives::AutoWriteLock lock(resumption_status_lock_);
+ ApplicationResumptionStatus& status = resumption_status_[app_id];
+
+ if (IsResponseSuccessful(response)) {
+ status.successful_requests.push_back(found_request);
+ } else {
+ status.error_requests.push_back(found_request);
+ }
+
+ if (hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData ==
+ found_request.request_id.function_id) {
+ CheckVehicleDataResponse(found_request.message, response, status);
+ }
+
+ if (hmi_apis::FunctionID::UI_CreateWindow ==
+ found_request.request_id.function_id) {
+ CheckCreateWindowResponse(found_request.message, response);
+ }
+
+ if (hmi_apis::FunctionID::RC_GetInteriorVehicleData ==
+ found_request.request_id.function_id) {
+ CheckModuleDataSubscription(found_request.message, response, status);
+ }
+}
+
+void ResumptionDataProcessorImpl::EraseProcessedRequest(
+ const uint32_t app_id, const ResumptionRequest& found_request) {
+ SDL_LOG_AUTO_TRACE();
+
+ sync_primitives::AutoWriteLock lock(resumption_status_lock_);
+ auto& list_of_sent_requests =
+ resumption_status_[app_id].list_of_sent_requests;
+ auto request_iter =
+ std::find_if(list_of_sent_requests.begin(),
+ list_of_sent_requests.end(),
+ [found_request](const ResumptionRequest& request) {
+ return request.request_id.correlation_id ==
+ found_request.request_id.correlation_id &&
+ request.request_id.function_id ==
+ found_request.request_id.function_id;
+ });
+ list_of_sent_requests.erase(request_iter);
+}
+
+bool ResumptionDataProcessorImpl::IsResumptionFinished(
+ const uint32_t app_id) const {
+ SDL_LOG_AUTO_TRACE();
+
+ sync_primitives::AutoReadLock lock(resumption_status_lock_);
+ bool is_requests_list_empty = true;
+ const auto app_status = resumption_status_.find(app_id);
+ if (app_status != resumption_status_.end()) {
+ is_requests_list_empty = app_status->second.list_of_sent_requests.empty();
+ }
+ return is_requests_list_empty;
+}
+
+utils::Optional<ResumeCtrl::ResumptionCallBack>
+ResumptionDataProcessorImpl::GetResumptionCallback(const uint32_t app_id) {
+ SDL_LOG_AUTO_TRACE();
+
+ sync_primitives::AutoReadLock lock(register_callbacks_lock_);
+ auto it = register_callbacks_.find(app_id);
+ if (it == register_callbacks_.end()) {
+ return utils::Optional<
+ ResumeCtrl::ResumptionCallBack>::OptionalEmpty::EMPTY;
+ }
+ return utils::Optional<ResumeCtrl::ResumptionCallBack>(it->second);
+}
+
+bool ResumptionDataProcessorImpl::IsResumptionSuccessful(
+ const uint32_t app_id) {
+ sync_primitives::AutoReadLock lock(resumption_status_lock_);
+ auto it = resumption_status_.find(app_id);
+ if (resumption_status_.end() == it) {
+ return true;
+ }
+
+ const ApplicationResumptionStatus& status = it->second;
+ return status.error_requests.empty() &&
+ status.unsuccessful_vehicle_data_subscriptions_.empty() &&
+ status.unsuccessful_module_subscriptions_.empty();
+}
+
+void ResumptionDataProcessorImpl::EraseAppResumptionData(
+ const uint32_t app_id) {
+ SDL_LOG_AUTO_TRACE();
+
+ std::vector<ResumptionRequest> all_requests;
+
+ resumption_status_lock_.AcquireForWriting();
+ all_requests.insert(all_requests.end(),
+ resumption_status_[app_id].successful_requests.begin(),
+ resumption_status_[app_id].successful_requests.end());
+ all_requests.insert(all_requests.end(),
+ resumption_status_[app_id].error_requests.begin(),
+ resumption_status_[app_id].error_requests.end());
+
+ resumption_status_.erase(app_id);
+ resumption_status_lock_.Release();
+
+ request_app_ids_lock_.AcquireForWriting();
+ for (auto request : all_requests) {
+ request_app_ids_.erase(
+ {request.request_id.function_id, request.request_id.correlation_id});
+ }
+ request_app_ids_lock_.Release();
+
+ register_callbacks_lock_.AcquireForWriting();
+ register_callbacks_.erase(app_id);
+ register_callbacks_lock_.Release();
+}
+
+void ResumptionDataProcessorImpl::ProcessResponseFromHMI(
+ const smart_objects::SmartObject& response,
+ const hmi_apis::FunctionID::eType function_id,
+ const int32_t corr_id) {
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_TRACE("Now processing event with function id: "
+ << function_id << " correlation id: " << corr_id);
+
+ auto found_app_id = GetAppIdWaitingForResponse(function_id, corr_id);
+ if (!found_app_id) {
+ SDL_LOG_ERROR("Application id for correlation id "
+ << corr_id << " and function id: " << function_id
+ << " was not found, such response is not expected.");
+ return;
+ }
+ const uint32_t app_id = *found_app_id;
+ SDL_LOG_DEBUG("app_id is: " << app_id);
+
+ auto found_request = GetRequest(app_id, function_id, corr_id);
+ if (!found_request) {
+ SDL_LOG_ERROR("Request with function id " << function_id << " and corr id "
+ << corr_id << " not found");
+ return;
+ }
+ auto request = *found_request;
+
+ ProcessResumptionStatus(app_id, response, request);
+ EraseProcessedRequest(app_id, request);
+
+ if (!IsResumptionFinished(app_id)) {
+ SDL_LOG_DEBUG("Resumption app "
+ << app_id << " not finished. Some requests are still waited");
+ return;
+ }
+
+ auto found_callback = GetResumptionCallback(app_id);
+ if (!found_callback) {
+ SDL_LOG_ERROR("Callback for app_id: " << app_id << " not found");
+ return;
+ }
+ auto callback = *found_callback;
+ FinalizeResumption(callback, app_id);
+}
+
+void ResumptionDataProcessorImpl::FinalizeResumption(
+ const ResumeCtrl::ResumptionCallBack& callback, const uint32_t app_id) {
+ if (IsResumptionSuccessful(app_id)) {
+ SDL_LOG_DEBUG("Resumption for app " << app_id << " successful");
+ callback(mobile_apis::Result::SUCCESS, "Data resumption successful");
+ application_manager_.state_controller().ResumePostponedWindows(app_id);
+ } else {
+ SDL_LOG_ERROR("Resumption for app " << app_id << " failed");
+ callback(mobile_apis::Result::RESUME_FAILED, "Data resumption failed");
+ RevertRestoredData(application_manager_.application(app_id));
+ application_manager_.state_controller().DropPostponedWindows(app_id);
+ }
+ EraseAppResumptionData(app_id);
+}
+
+void ResumptionDataProcessorImpl::HandleOnTimeOut(
+ const uint32_t corr_id, const hmi_apis::FunctionID::eType function_id) {
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Handling timeout with corr id: "
+ << corr_id << " and function_id: " << function_id);
+
+ auto error_response = MessageHelper::CreateNegativeResponseFromHmi(
+ function_id,
+ corr_id,
+ hmi_apis::Common_Result::GENERIC_ERROR,
+ std::string());
+ ProcessResponseFromHMI(*error_response, function_id, corr_id);
+}
+
+void ResumptionDataProcessorImpl::on_event(const event_engine::Event& event) {
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG(
+ "Handling response message from HMI "
+ << event.id() << " "
+ << event.smart_object()[strings::params][strings::correlation_id]
+ .asInt());
+ ProcessResponseFromHMI(
+ event.smart_object(), event.id(), event.smart_object_correlation_id());
+}
+
+std::vector<ResumptionRequest> GetAllFailedRequests(
+ uint32_t app_id,
+ const std::map<std::int32_t, ApplicationResumptionStatus>&
+ resumption_status,
+ sync_primitives::RWLock& resumption_status_lock) {
+ resumption_status_lock.AcquireForReading();
+ std::vector<ResumptionRequest> failed_requests;
+ std::vector<ResumptionRequest> missed_requests;
+ auto it = resumption_status.find(app_id);
+ if (it != resumption_status.end()) {
+ failed_requests = it->second.error_requests;
+ missed_requests = it->second.list_of_sent_requests;
+ }
+ resumption_status_lock.Release();
+
+ failed_requests.insert(
+ failed_requests.end(), missed_requests.begin(), missed_requests.end());
+ return failed_requests;
+}
+
+void ResumptionDataProcessorImpl::RevertRestoredData(
+ ApplicationSharedPtr application) {
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Reverting for app: " << application->app_id());
+ DeleteSubmenus(application);
+ DeleteCommands(application);
+ DeleteChoicesets(application);
+ DeleteGlobalProperties(application);
+ DeleteSubscriptions(application);
+ DeleteWindowsSubscriptions(application);
+
+ resumption_status_lock_.AcquireForWriting();
+ resumption_status_.erase(application->app_id());
+ resumption_status_lock_.Release();
+
+ register_callbacks_lock_.AcquireForWriting();
+ register_callbacks_.erase(application->app_id());
+ register_callbacks_lock_.Release();
+}
+
+void ResumptionDataProcessorImpl::SubscribeToResponse(
+ const int32_t app_id, const ResumptionRequest& request) {
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("App " << app_id << " subscribe on "
+ << request.request_id.function_id << " "
+ << request.request_id.correlation_id);
+ subscribe_on_event(request.request_id.function_id,
+ request.request_id.correlation_id);
+
+ resumption_status_lock_.AcquireForWriting();
+ resumption_status_[app_id].list_of_sent_requests.push_back(request);
+ resumption_status_lock_.Release();
+
+ request_app_ids_lock_.AcquireForWriting();
+ request_app_ids_.insert(std::make_pair(request.request_id, app_id));
+ request_app_ids_lock_.Release();
+}
+
+void ResumptionDataProcessorImpl::ProcessMessageToHMI(
+ smart_objects::SmartObjectSPtr message, bool subscribe_on_response) {
+ SDL_LOG_AUTO_TRACE();
+ if (subscribe_on_response) {
+ auto function_id = static_cast<hmi_apis::FunctionID::eType>(
+ (*message)[strings::params][strings::function_id].asInt());
+
+ const int32_t hmi_correlation_id =
+ (*message)[strings::params][strings::correlation_id].asInt();
+
+ const int32_t app_id =
+ (*message)[strings::msg_params][strings::app_id].asInt();
+
+ ResumptionRequest wait_for_response;
+ wait_for_response.request_id.correlation_id = hmi_correlation_id;
+ wait_for_response.request_id.function_id = function_id;
+ wait_for_response.message = *message;
+
+ SubscribeToResponse(app_id, wait_for_response);
+ }
+ if (!application_manager_.GetRPCService().ManageHMICommand(message)) {
+ SDL_LOG_ERROR("Unable to send request");
+ }
+}
+
+void ResumptionDataProcessorImpl::ProcessMessagesToHMI(
+ const smart_objects::SmartObjectList& messages) {
+ SDL_LOG_AUTO_TRACE();
+ for (const auto& message : messages) {
+ const bool is_request_message =
+ application_manager::MessageType::kRequest ==
+ (*message)[strings::params][strings::message_type].asInt();
+
+ ProcessMessageToHMI(message, is_request_message);
+ }
+}
+
+void ResumptionDataProcessorImpl::AddFiles(
+ app_mngr::ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app) {
+ SDL_LOG_AUTO_TRACE();
+ if (!saved_app.keyExists(strings::application_files)) {
+ SDL_LOG_ERROR("application_files section is not exists");
+ return;
+ }
+
+ const auto application_files =
+ saved_app[strings::application_files].asArray();
+
+ for (const auto file_data : *application_files) {
+ const bool is_persistent = file_data.keyExists(strings::persistent_file) &&
+ file_data[strings::persistent_file].asBool();
+ if (is_persistent) {
+ AppFile file;
+ file.is_persistent = is_persistent;
+ file.is_download_complete =
+ file_data[strings::is_download_complete].asBool();
+ file.file_name = file_data[strings::sync_file_name].asString();
+ file.file_type = static_cast<mobile_apis::FileType::eType>(
+ file_data[strings::file_type].asInt());
+ application->AddFile(file);
+ }
+ }
+}
+
+void ResumptionDataProcessorImpl::AddWindows(
+ application_manager::ApplicationSharedPtr application,
+ const ns_smart_device_link::ns_smart_objects::SmartObject& saved_app) {
+ SDL_LOG_AUTO_TRACE();
+
+ if (!saved_app.keyExists(strings::windows_info)) {
+ SDL_LOG_ERROR("windows_info section does not exist");
+ return;
+ }
+
+ const auto& windows_info = saved_app[strings::windows_info];
+ auto request_list = MessageHelper::CreateUICreateWindowRequestsToHMI(
+ application, application_manager_, windows_info);
+
+ ProcessMessagesToHMI(request_list);
+}
+
+void ResumptionDataProcessorImpl::AddSubmenus(
+ ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app) {
+ SDL_LOG_AUTO_TRACE();
+
+ if (!saved_app.keyExists(strings::application_submenus)) {
+ SDL_LOG_ERROR("application_submenus section is not exists");
+ return;
+ }
+
+ const smart_objects::SmartObject& app_submenus =
+ saved_app[strings::application_submenus];
+
+ for (size_t i = 0; i < app_submenus.length(); ++i) {
+ const smart_objects::SmartObject& submenu = app_submenus[i];
+ application->AddSubMenu(submenu[strings::menu_id].asUInt(), submenu);
+ }
+
+ ProcessMessagesToHMI(MessageHelper::CreateAddSubMenuRequestsToHMI(
+ application, application_manager_));
+}
+
+utils::Optional<ResumptionRequest> FindResumptionSubmenuRequest(
+ uint32_t menu_id, std::vector<ResumptionRequest>& requests) {
+ using namespace utils;
+
+ auto request_it = std::find_if(
+ requests.begin(),
+ requests.end(),
+ [menu_id](const ResumptionRequest& request) {
+ auto& msg_params = request.message[strings::msg_params];
+ if (hmi_apis::FunctionID::UI_AddSubMenu ==
+ request.request_id.function_id) {
+ uint32_t failed_menu_id = msg_params[strings::menu_id].asUInt();
+ return failed_menu_id == menu_id;
+ }
+ return false;
+ });
+ if (requests.end() != request_it) {
+ return Optional<ResumptionRequest>(*request_it);
+ }
+ return Optional<ResumptionRequest>::OptionalEmpty::EMPTY;
+}
+
+void ResumptionDataProcessorImpl::DeleteSubmenus(
+ ApplicationSharedPtr application) {
+ SDL_LOG_AUTO_TRACE();
+
+ auto failed_requests = GetAllFailedRequests(
+ application->app_id(), resumption_status_, resumption_status_lock_);
+
+ auto accessor = application->sub_menu_map();
+ const auto& sub_menu_map = accessor.GetData();
+
+ for (const auto& smenu : sub_menu_map) {
+ auto failed_submenu_request =
+ FindResumptionSubmenuRequest(smenu.first, failed_requests);
+ if (!failed_submenu_request) {
+ MessageHelper::SendDeleteSubmenuRequest(
+ smenu.second, application, application_manager_);
+ }
+ application->RemoveSubMenu(smenu.first);
+ }
+}
+
+void ResumptionDataProcessorImpl::AddCommands(
+ ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app) {
+ SDL_LOG_AUTO_TRACE();
+ if (!saved_app.keyExists(strings::application_commands)) {
+ SDL_LOG_ERROR("application_commands section is not exists");
+ return;
+ }
+
+ const smart_objects::SmartObject& app_commands =
+ saved_app[strings::application_commands];
+
+ for (size_t cmd_num = 0; cmd_num < app_commands.length(); ++cmd_num) {
+ const smart_objects::SmartObject& command = app_commands[cmd_num];
+ const uint32_t cmd_id = command[strings::cmd_id].asUInt();
+ const uint32_t consecutive_num =
+ commands::CommandImpl::CalcCommandInternalConsecutiveNumber(
+ application);
+
+ application->AddCommand(consecutive_num, command);
+ application->help_prompt_manager().OnVrCommandAdded(
+ cmd_id, command, true); // is_resumption =true
+ }
+
+ ProcessMessagesToHMI(MessageHelper::CreateAddCommandRequestToHMI(
+ application, application_manager_));
+}
+
+utils::Optional<ResumptionRequest> FindCommandResumptionRequest(
+ uint32_t command_id, std::vector<ResumptionRequest>& requests) {
+ using namespace utils;
+
+ auto request_it = std::find_if(
+ requests.begin(),
+ requests.end(),
+ [command_id](const ResumptionRequest& request) {
+ auto& msg_params = request.message[strings::msg_params];
+ const bool is_vr_command = hmi_apis::FunctionID::VR_AddCommand ==
+ request.request_id.function_id &&
+ hmi_apis::Common_VRCommandType::Command ==
+ msg_params[strings::type].asInt();
+ const bool is_ui_command = hmi_apis::FunctionID::UI_AddCommand ==
+ request.request_id.function_id;
+
+ if (is_vr_command || is_ui_command) {
+ uint32_t cmd_id = msg_params[strings::cmd_id].asUInt();
+ return cmd_id == command_id;
+ }
+
+ return false;
+ });
+
+ if (requests.end() != request_it) {
+ return Optional<ResumptionRequest>(*request_it);
+ }
+ return Optional<ResumptionRequest>::OptionalEmpty::EMPTY;
+}
+
+void ResumptionDataProcessorImpl::DeleteCommands(
+ ApplicationSharedPtr application) {
+ SDL_LOG_AUTO_TRACE();
+
+ auto failed_requests = GetAllFailedRequests(
+ application->app_id(), resumption_status_, resumption_status_lock_);
+
+ auto is_vr_command_failed = [](const ResumptionRequest& failed_command) {
+ return failed_command.message[strings::msg_params].keyExists(
+ strings::vr_commands);
+ };
+
+ auto extract_cmd_id =
+ [](const smart_objects::SmartObject* const so_ptr) -> uint32_t {
+ if (so_ptr->keyExists(strings::cmd_id)) {
+ return so_ptr->getElement(strings::cmd_id).asUInt();
+ }
+
+ return 0;
+ };
+
+ auto accessor = application->commands_map();
+ const auto& commands_map = accessor.GetData();
+
+ for (const auto& cmd : commands_map) {
+ const auto cmd_id = extract_cmd_id(cmd.second);
+ if (0 == cmd_id) {
+ SDL_LOG_ERROR("Can't extract cmd_id for command with internal number: "
+ << cmd.first);
+ continue;
+ }
+
+ auto failed_command = FindCommandResumptionRequest(cmd_id, failed_requests);
+
+ SDL_LOG_DEBUG(std::boolalpha << "Command with internal ID: " << cmd.first
+ << " and cmdID: " << cmd_id << " was failed: "
+ << static_cast<bool>(failed_command));
+ if (!failed_command || (!is_vr_command_failed(*failed_command))) {
+ auto delete_VR_command_msg = MessageHelper::CreateDeleteVRCommandRequest(
+ cmd.second,
+ application,
+ application_manager_.GetNextHMICorrelationID());
+ application_manager_.GetRPCService().ManageHMICommand(
+ delete_VR_command_msg);
+ }
+
+ if (!failed_command || (is_vr_command_failed(*failed_command))) {
+ auto delete_UI_command_msg = MessageHelper::CreateDeleteUICommandRequest(
+ cmd.second,
+ application->app_id(),
+ application_manager_.GetNextHMICorrelationID());
+ application_manager_.GetRPCService().ManageHMICommand(
+ delete_UI_command_msg);
+ }
+
+ application->RemoveCommand(cmd_id);
+ application->help_prompt_manager().OnVrCommandDeleted(cmd_id, true);
+ }
+}
+
+void ResumptionDataProcessorImpl::AddChoicesets(
+ ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app) {
+ SDL_LOG_AUTO_TRACE();
+ if (!saved_app.keyExists(strings::application_choice_sets)) {
+ SDL_LOG_ERROR("There is no any choicesets");
+ return;
+ }
+
+ const smart_objects::SmartObject& app_choice_sets =
+ saved_app[strings::application_choice_sets];
+
+ for (size_t i = 0; i < app_choice_sets.length(); ++i) {
+ const smart_objects::SmartObject& choice_set = app_choice_sets[i];
+ const int32_t choice_set_id =
+ choice_set[strings::interaction_choice_set_id].asInt();
+ application->AddChoiceSet(choice_set_id, choice_set);
+ }
+
+ ProcessMessagesToHMI(MessageHelper::CreateAddVRCommandRequestFromChoiceToHMI(
+ application, application_manager_));
+}
+
+utils::Optional<ResumptionRequest> FindResumptionChoiceSetRequest(
+ uint32_t command_id, std::vector<ResumptionRequest>& requests) {
+ using namespace utils;
+
+ auto request_it =
+ std::find_if(requests.begin(),
+ requests.end(),
+ [command_id](const ResumptionRequest& request) {
+ auto& msg_params = request.message[strings::msg_params];
+ if (msg_params.keyExists(strings::cmd_id) &&
+ (msg_params[strings::type] ==
+ hmi_apis::Common_VRCommandType::Choice)) {
+ uint32_t cmd_id = msg_params[strings::cmd_id].asUInt();
+ return cmd_id == command_id;
+ }
+ return false;
+ });
+ if (requests.end() != request_it) {
+ return Optional<ResumptionRequest>(*request_it);
+ }
+ return Optional<ResumptionRequest>::OptionalEmpty::EMPTY;
+}
+
+void ResumptionDataProcessorImpl::DeleteChoicesets(
+ ApplicationSharedPtr application) {
+ SDL_LOG_AUTO_TRACE();
+
+ auto failed_requests = GetAllFailedRequests(
+ application->app_id(), resumption_status_, resumption_status_lock_);
+
+ auto accessor = application->choice_set_map();
+ const auto& choices = accessor.GetData();
+ for (const auto& choice : choices) {
+ auto failed_choice_set =
+ FindResumptionChoiceSetRequest(choice.first, failed_requests);
+ if (!failed_choice_set) {
+ MessageHelper::SendDeleteChoiceSetRequest(
+ choice.second, application, application_manager_);
+ }
+ application->RemoveChoiceSet(choice.first);
+ }
+}
+
+void ResumptionDataProcessorImpl::SetGlobalProperties(
+ ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app) {
+ SDL_LOG_AUTO_TRACE();
+ if (!saved_app.keyExists(strings::application_global_properties)) {
+ SDL_LOG_DEBUG("application_global_properties section is not exists");
+ return;
+ }
+
+ const smart_objects::SmartObject& properties_so =
+ saved_app[strings::application_global_properties];
+ application->load_global_properties(properties_so);
+
+ ProcessMessagesToHMI(MessageHelper::CreateGlobalPropertiesRequestsToHMI(
+ application, application_manager_));
+}
+
+void ResumptionDataProcessorImpl::DeleteGlobalProperties(
+ ApplicationSharedPtr application) {
+ SDL_LOG_AUTO_TRACE();
+ const uint32_t app_id = application->app_id();
+ const auto result =
+ application_manager_.ResetAllApplicationGlobalProperties(app_id);
+
+ resumption_status_lock_.AcquireForReading();
+ std::vector<ResumptionRequest> requests;
+ if (resumption_status_.find(app_id) != resumption_status_.end()) {
+ requests = resumption_status_[app_id].successful_requests;
+ }
+ resumption_status_lock_.Release();
+
+ auto check_if_successful =
+ [requests](hmi_apis::FunctionID::eType function_id) {
+ for (auto& resumption_request : requests) {
+ auto request_func =
+ resumption_request.message[strings::params][strings::function_id]
+ .asInt();
+ if (request_func == function_id) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ if (result.HasUIPropertiesReset() &&
+ check_if_successful(hmi_apis::FunctionID::UI_SetGlobalProperties)) {
+ smart_objects::SmartObjectSPtr msg_params =
+ MessageHelper::CreateUIResetGlobalPropertiesRequest(result,
+ application);
+ auto msg = MessageHelper::CreateMessageForHMI(
+ hmi_apis::messageType::request,
+ application_manager_.GetNextHMICorrelationID());
+ (*msg)[strings::params][strings::function_id] =
+ hmi_apis::FunctionID::UI_SetGlobalProperties;
+ (*msg)[strings::msg_params] = *msg_params;
+ ProcessMessageToHMI(msg, false);
+ }
+
+ if (result.HasTTSPropertiesReset() &&
+ check_if_successful(hmi_apis::FunctionID::TTS_SetGlobalProperties)) {
+ smart_objects::SmartObjectSPtr msg_params =
+ MessageHelper::CreateTTSResetGlobalPropertiesRequest(result,
+ application);
+ auto msg = MessageHelper::CreateMessageForHMI(
+ hmi_apis::messageType::request,
+ application_manager_.GetNextHMICorrelationID());
+ (*msg)[strings::params][strings::function_id] =
+ hmi_apis::FunctionID::TTS_SetGlobalProperties;
+
+ (*msg)[strings::msg_params] = *msg_params;
+ ProcessMessageToHMI(msg, false);
+ }
+}
+
+void ResumptionDataProcessorImpl::AddSubscriptions(
+ ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app) {
+ SDL_LOG_AUTO_TRACE();
+
+ AddButtonsSubscriptions(application, saved_app);
+ AddPluginsSubscriptions(application, saved_app);
+}
+
+void ResumptionDataProcessorImpl::AddButtonsSubscriptions(
+ ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app) {
+ SDL_LOG_AUTO_TRACE();
+
+ if (!saved_app.keyExists(strings::application_subscriptions)) {
+ SDL_LOG_DEBUG("application_subscriptions section is not exists");
+ return;
+ }
+
+ const smart_objects::SmartObject& subscriptions =
+ saved_app[strings::application_subscriptions];
+
+ if (subscriptions.keyExists(strings::application_buttons)) {
+ const smart_objects::SmartObject& subscriptions_buttons =
+ subscriptions[strings::application_buttons];
+ mobile_apis::ButtonName::eType btn;
+ for (size_t i = 0; i < subscriptions_buttons.length(); ++i) {
+ btn = static_cast<mobile_apis::ButtonName::eType>(
+ (subscriptions_buttons[i]).asInt());
+ application->SubscribeToButton(btn);
+ }
+
+ ButtonSubscriptions button_subscriptions =
+ GetButtonSubscriptionsToResume(application);
+
+ ProcessMessagesToHMI(
+ MessageHelper::CreateOnButtonSubscriptionNotificationsForApp(
+ application, application_manager_, button_subscriptions));
+ }
+}
+
+ButtonSubscriptions ResumptionDataProcessorImpl::GetButtonSubscriptionsToResume(
+ ApplicationSharedPtr application) const {
+ ButtonSubscriptions button_subscriptions =
+ application->SubscribedButtons().GetData();
+ auto it = button_subscriptions.find(mobile_apis::ButtonName::CUSTOM_BUTTON);
+
+ if (it != button_subscriptions.end()) {
+ button_subscriptions.erase(it);
+ }
+
+ return button_subscriptions;
+}
+
+void ResumptionDataProcessorImpl::AddPluginsSubscriptions(
+ ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app) {
+ SDL_LOG_AUTO_TRACE();
+
+ for (auto& extension : application->Extensions()) {
+ extension->ProcessResumption(saved_app);
+ }
+}
+
+void ResumptionDataProcessorImpl::DeleteSubscriptions(
+ ApplicationSharedPtr application) {
+ SDL_LOG_AUTO_TRACE();
+ DeleteButtonsSubscriptions(application);
+ DeletePluginsSubscriptions(application);
+}
+
+void ResumptionDataProcessorImpl::DeleteButtonsSubscriptions(
+ ApplicationSharedPtr application) {
+ SDL_LOG_AUTO_TRACE();
+ const ButtonSubscriptions button_subscriptions =
+ application->SubscribedButtons().GetData();
+ for (auto& btn : button_subscriptions) {
+ const auto hmi_btn = static_cast<hmi_apis::Common_ButtonName::eType>(btn);
+ if (hmi_apis::Common_ButtonName::CUSTOM_BUTTON == hmi_btn) {
+ continue;
+ }
+ auto notification = MessageHelper::CreateOnButtonSubscriptionNotification(
+ application->hmi_app_id(), hmi_btn, false);
+ // is_subscribed = false
+ ProcessMessageToHMI(notification, false);
+ application->UnsubscribeFromButton(btn);
+ }
+}
+
+void ResumptionDataProcessorImpl::DeleteWindowsSubscriptions(
+ ApplicationSharedPtr application) {
+ SDL_LOG_AUTO_TRACE();
+
+ const auto window_ids = application->GetWindowIds();
+ for (const auto& window_id : window_ids) {
+ const auto hmi_state = application->CurrentHmiState(window_id);
+ if (mobile_apis::WindowType::WIDGET != hmi_state->window_type()) {
+ continue;
+ }
+
+ SDL_LOG_DEBUG("Reverting CreateWindow for: " << window_id);
+
+ auto delete_request = MessageHelper::CreateUIDeleteWindowRequestToHMI(
+ application, application_manager_, window_id);
+ const bool subscribe_on_request_events = false;
+ ProcessMessageToHMI(delete_request, subscribe_on_request_events);
+
+ application->RemoveWindowInfo(window_id);
+ application->RemoveHMIState(window_id,
+ app_mngr::HmiState::StateID::STATE_ID_REGULAR);
+ application->remove_window_capability(window_id);
+ }
+}
+
+void ResumptionDataProcessorImpl::DeletePluginsSubscriptions(
+ application_manager::ApplicationSharedPtr application) {
+ SDL_LOG_AUTO_TRACE();
+
+ resumption_status_lock_.AcquireForReading();
+ auto it = resumption_status_.find(application->app_id());
+ if (it == resumption_status_.end()) {
+ resumption_status_lock_.Release();
+ return;
+ }
+
+ const ApplicationResumptionStatus& status = it->second;
+ smart_objects::SmartObject extension_vd_subscriptions;
+ for (auto ivi : status.successful_vehicle_data_subscriptions_) {
+ SDL_LOG_DEBUG("ivi " << ivi << " should be deleted");
+ extension_vd_subscriptions[ivi] = true;
+ }
+
+ smart_objects::SmartObject extension_modules_subscriptions(
+ smart_objects::SmartType_Map);
+
+ if (!status.successful_module_subscriptions_.empty()) {
+ extension_modules_subscriptions[message_params::kModuleData] =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ auto& module_data_so =
+ extension_modules_subscriptions[message_params::kModuleData];
+
+ uint32_t index = 0;
+ for (const auto& module : status.successful_module_subscriptions_) {
+ module_data_so[index] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ module_data_so[index][message_params::kModuleType] = module.first;
+ module_data_so[index][message_params::kModuleId] = module.second;
+ index++;
+ }
+ }
+
+ smart_objects::SmartObject resumption_data_to_revert(
+ smart_objects::SmartType_Map);
+ resumption_data_to_revert[application_manager::hmi_interface::vehicle_info] =
+ extension_vd_subscriptions;
+ resumption_data_to_revert[application_manager::hmi_interface::rc] =
+ extension_modules_subscriptions;
+
+ resumption_status_lock_.Release();
+
+ auto extensions = application->Extensions();
+ for (auto& extension : extensions) {
+ extension->RevertResumption(resumption_data_to_revert);
+ }
+}
+
+bool IsResponseSuccessful(const smart_objects::SmartObject& response) {
+ return !response[strings::params].keyExists(strings::error_msg);
+}
+
+void ResumptionDataProcessorImpl::CheckVehicleDataResponse(
+ const smart_objects::SmartObject& request,
+ const smart_objects::SmartObject& response,
+ ApplicationResumptionStatus& status) {
+ SDL_LOG_AUTO_TRACE();
+ const auto request_keys = request[strings::msg_params].enumerate();
+
+ if (!IsResponseSuccessful(response)) {
+ SDL_LOG_TRACE("Vehicle data request not successful");
+ for (const auto key : request_keys) {
+ status.unsuccessful_vehicle_data_subscriptions_.push_back(key);
+ }
+ return;
+ }
+
+ const auto& response_params = response[strings::msg_params];
+ const auto response_keys = response_params.enumerate();
+ for (auto& ivi : request_keys) {
+ const auto it = response_keys.find(ivi);
+ const auto kSuccess = hmi_apis::Common_VehicleDataResultCode::VDRC_SUCCESS;
+ const auto vd_result_code =
+ (response_keys.end() == it)
+ ? kSuccess
+ : response_params[ivi][strings::result_code].asInt();
+ if (kSuccess != vd_result_code) {
+ SDL_LOG_TRACE("ivi " << ivi << " was NOT successfuly subscribed");
+
+ status.unsuccessful_vehicle_data_subscriptions_.push_back(ivi);
+ } else {
+ SDL_LOG_TRACE("ivi " << ivi << " was successfuly subscribed");
+ status.successful_vehicle_data_subscriptions_.push_back(ivi);
+ }
+ }
+}
+
+void ResumptionDataProcessorImpl::CheckModuleDataSubscription(
+ const ns_smart_device_link::ns_smart_objects::SmartObject& request,
+ const ns_smart_device_link::ns_smart_objects::SmartObject& response,
+ ApplicationResumptionStatus& status) {
+ SDL_LOG_AUTO_TRACE();
+
+ const auto& msg_params_so = request[strings::msg_params];
+ const auto requested_module_type =
+ msg_params_so[message_params::kModuleType].asString();
+ const auto requested_module_id =
+ msg_params_so[message_params::kModuleId].asString();
+ const ModuleUid requested_module{requested_module_type, requested_module_id};
+
+ if (!IsResponseSuccessful(response)) {
+ SDL_LOG_TRACE("Module data subscription request NOT successful");
+ status.unsuccessful_module_subscriptions_.push_back(requested_module);
+ return;
+ }
+
+ const auto& response_module_data_so =
+ response[strings::msg_params][message_params::kModuleData];
+
+ if (0 == response_module_data_so.length()) {
+ SDL_LOG_TRACE("Module data subscription request not successful");
+ status.unsuccessful_module_subscriptions_.push_back(requested_module);
+ return;
+ }
+
+ const auto responsed_module_type_int =
+ static_cast<hmi_apis::Common_ModuleType::eType>(
+ response_module_data_so[message_params::kModuleType].asUInt());
+
+ const auto responsed_module_type_str =
+ application_manager::EnumToString(responsed_module_type_int);
+
+ const auto response_module_id =
+ response_module_data_so[message_params::kModuleId].asString();
+ const ModuleUid responsed_module{responsed_module_type_str,
+ response_module_id};
+
+ bool is_subscribe_success = false;
+ if (response[application_manager::strings::msg_params].keyExists(
+ rc_rpc_plugin::message_params::kIsSubscribed)) {
+ is_subscribe_success =
+ response[application_manager::strings::msg_params]
+ [rc_rpc_plugin::message_params::kIsSubscribed]
+ .asBool();
+ }
+
+ const bool is_the_same_module = requested_module == responsed_module;
+
+ if (is_the_same_module && is_subscribe_success) {
+ SDL_LOG_TRACE("Module [" << requested_module.first << ":"
+ << requested_module.second
+ << "] was successfuly subscribed");
+ status.successful_module_subscriptions_.push_back(requested_module);
+ } else {
+ SDL_LOG_TRACE("Module [" << requested_module.first << ":"
+ << requested_module.second
+ << "] was NOT successfuly subscribed");
+ status.unsuccessful_module_subscriptions_.push_back(requested_module);
+ }
+}
+
+void ResumptionDataProcessorImpl::CheckCreateWindowResponse(
+ const smart_objects::SmartObject& request,
+ const smart_objects::SmartObject& response) const {
+ SDL_LOG_AUTO_TRACE();
+ const auto correlation_id =
+ response[strings::params][strings::correlation_id].asInt();
+
+ const auto& msg_params = request[strings::msg_params];
+ const auto app_id = msg_params[strings::app_id].asInt();
+
+ auto application = application_manager_.application(app_id);
+ if (!application) {
+ SDL_LOG_ERROR("Application is not registered by hmi id: " << app_id);
+ return;
+ }
+
+ const auto window_id = msg_params[strings::window_id].asInt();
+ if (!IsResponseSuccessful(response)) {
+ SDL_LOG_ERROR("UI_CreateWindow for correlation id: " << correlation_id
+ << " has failed");
+ auto& builder = application->display_capabilities_builder();
+ builder.ResetDisplayCapabilities();
+ return;
+ }
+
+ smart_objects::SmartObject window_info(smart_objects::SmartType_Map);
+ auto fill_optional_param = [&window_info,
+ &msg_params](const std::string& key) {
+ if (msg_params.keyExists(key)) {
+ window_info[key] = msg_params[key].asString();
+ }
+ };
+ fill_optional_param(strings::associated_service_type);
+ fill_optional_param(strings::duplicate_updates_from_window_id);
+
+ const auto window_name = msg_params[strings::window_name].asString();
+ window_info[strings::window_name] = window_name;
+ application->SetWindowInfo(window_id, window_info);
+
+ const auto window_type = static_cast<mobile_apis::WindowType::eType>(
+ msg_params[strings::window_type].asInt());
+
+ // State should be initialized with INVALID_ENUM value to let state
+ // controller trigger OnHmiStatus notification sending
+ auto initial_state = application_manager_.CreateRegularState(
+ application,
+ window_type,
+ mobile_apis::HMILevel::INVALID_ENUM,
+ mobile_apis::AudioStreamingState::INVALID_ENUM,
+ mobile_apis::VideoStreamingState::INVALID_ENUM,
+ mobile_apis::SystemContext::INVALID_ENUM);
+ application->SetInitialState(window_id, window_name, initial_state);
+
+ // Default HMI level for all windows except the main one is always NONE
+ application_manager_.state_controller().OnAppWindowAdded(
+ application, window_id, window_type, mobile_apis::HMILevel::HMI_NONE);
+}
+
+} // namespace resumption
diff --git a/src/components/application_manager/src/rpc_handler_impl.cc b/src/components/application_manager/src/rpc_handler_impl.cc
index 0a62bc8498..4137ab93bb 100644
--- a/src/components/application_manager/src/rpc_handler_impl.cc
+++ b/src/components/application_manager/src/rpc_handler_impl.cc
@@ -37,7 +37,7 @@
namespace application_manager {
namespace rpc_handler {
-CREATE_LOGGERPTR_LOCAL(logger_, "RPCHandlerImpl")
+SDL_CREATE_LOG_VARIABLE("RPCHandlerImpl")
namespace formatters = ns_smart_device_link::ns_json_handler::formatters;
namespace jhs = ns_smart_device_link::ns_json_handler::strings;
namespace plugin_names = application_manager::plugin_manager::plugin_names;
@@ -60,7 +60,7 @@ RPCHandlerImpl::~RPCHandlerImpl() {}
void RPCHandlerImpl::ProcessMessageFromMobile(
const std::shared_ptr<Message> message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
#ifdef TELEMETRY_MONITOR
AMTelemetryObserver::MessageMetricSharedPtr metric(
new AMTelemetryObserver::MessageMetric());
@@ -71,13 +71,13 @@ void RPCHandlerImpl::ProcessMessageFromMobile(
bool allow_unknown_parameters = false;
DCHECK_OR_RETURN_VOID(so_from_mobile);
if (!so_from_mobile) {
- LOG4CXX_ERROR(logger_, "Null pointer");
+ SDL_LOG_ERROR("Null pointer");
return;
}
if (message->type() == application_manager::MessageType::kRequest &&
message->correlation_id() < 0) {
- LOG4CXX_ERROR(logger_, "Request correlation id < 0. Returning INVALID_ID");
+ SDL_LOG_ERROR("Request correlation id < 0. Returning INVALID_ID");
std::shared_ptr<smart_objects::SmartObject> response(
MessageHelper::CreateNegativeResponse(message->connection_key(),
message->function_id(),
@@ -102,15 +102,18 @@ void RPCHandlerImpl::ProcessMessageFromMobile(
if (app_manager_.GetRPCService().IsAppServiceRPC(
message->function_id(), commands::Command::SOURCE_MOBILE) ||
rpc_passing) {
- LOG4CXX_DEBUG(logger_,
- "Allowing unknown parameters for request function "
- << message->function_id());
+ SDL_LOG_DEBUG("Allowing unknown parameters for request function "
+ << message->function_id());
allow_unknown_parameters = true;
}
- if (!ConvertMessageToSO(
- *message, *so_from_mobile, allow_unknown_parameters, !rpc_passing)) {
- LOG4CXX_ERROR(logger_, "Cannot create smart object from message");
+ std::string warning_info;
+ if (!ConvertMessageToSO(*message,
+ *so_from_mobile,
+ warning_info,
+ allow_unknown_parameters,
+ !rpc_passing)) {
+ SDL_LOG_ERROR("Cannot create smart object from message");
return;
}
@@ -131,8 +134,8 @@ void RPCHandlerImpl::ProcessMessageFromMobile(
commands::Command::SOURCE_MOBILE,
message_type)) {
// Since PassThrough failed, refiltering the message
- if (!ConvertMessageToSO(*message, *so_from_mobile)) {
- LOG4CXX_ERROR(logger_, "Cannot create smart object from message");
+ if (!ConvertMessageToSO(*message, *so_from_mobile, warning_info)) {
+ SDL_LOG_ERROR("Cannot create smart object from message");
return;
}
}
@@ -143,8 +146,8 @@ void RPCHandlerImpl::ProcessMessageFromMobile(
#endif // TELEMETRY_MONITOR
if (!app_manager_.GetRPCService().ManageMobileCommand(
- so_from_mobile, commands::Command::SOURCE_MOBILE)) {
- LOG4CXX_ERROR(logger_, "Received command didn't run successfully");
+ so_from_mobile, commands::Command::SOURCE_MOBILE, warning_info)) {
+ SDL_LOG_ERROR("Received command didn't run successfully");
}
#ifdef TELEMETRY_MONITOR
metric->end = date_time::getCurrentTime();
@@ -156,7 +159,7 @@ void RPCHandlerImpl::ProcessMessageFromMobile(
void RPCHandlerImpl::ProcessMessageFromHMI(
const std::shared_ptr<Message> message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr smart_object =
std::make_shared<smart_objects::SmartObject>();
bool allow_unknown_parameters = false;
@@ -170,13 +173,14 @@ void RPCHandlerImpl::ProcessMessageFromHMI(
converted_result[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt());
if (app_manager_.GetRPCService().IsAppServiceRPC(
function_id, commands::Command::SOURCE_HMI)) {
- LOG4CXX_DEBUG(
- logger_,
- "Allowing unknown parameters for request function " << function_id);
+ SDL_LOG_DEBUG("Allowing unknown parameters for request function "
+ << function_id);
allow_unknown_parameters = true;
}
- if (!ConvertMessageToSO(*message, *smart_object, allow_unknown_parameters)) {
+ std::string warning_info;
+ if (!ConvertMessageToSO(
+ *message, *smart_object, warning_info, allow_unknown_parameters)) {
if (application_manager::MessageType::kResponse ==
(*smart_object)[strings::params][strings::message_type].asInt()) {
(*smart_object).erase(strings::msg_params);
@@ -185,30 +189,35 @@ void RPCHandlerImpl::ProcessMessageFromHMI(
(*smart_object)[strings::msg_params][strings::info] =
std::string("Invalid message received from vehicle");
} else {
- LOG4CXX_ERROR(logger_, "Cannot create smart object from message");
+ SDL_LOG_ERROR("Cannot create smart object from message");
return;
}
}
- LOG4CXX_DEBUG(logger_, "Converted message, trying to create hmi command");
- if (!app_manager_.GetRPCService().ManageHMICommand(smart_object)) {
- LOG4CXX_ERROR(logger_, "Received command didn't run successfully");
+ if (!warning_info.empty()) {
+ SDL_LOG_WARN("Warning while parsing HMI message: " << warning_info);
+ }
+
+ SDL_LOG_DEBUG("Converted message, trying to create hmi command");
+ if (!app_manager_.GetRPCService().ManageHMICommand(
+ smart_object, commands::Command::SOURCE_HMI, warning_info)) {
+ SDL_LOG_ERROR("Received command didn't run successfully");
}
}
void RPCHandlerImpl::Handle(const impl::MessageFromMobile message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!message) {
- LOG4CXX_ERROR(logger_, "Null-pointer message received.");
+ SDL_LOG_ERROR("Null-pointer message received.");
return;
}
if (app_manager_.is_stopping()) {
- LOG4CXX_INFO(logger_, "Application manager is stopping");
+ SDL_LOG_INFO("Application manager is stopping");
return;
}
if (app_manager_.IsLowVoltage()) {
- LOG4CXX_ERROR(logger_, "Low Voltage is active.");
+ SDL_LOG_ERROR("Low Voltage is active.");
return;
}
@@ -216,14 +225,14 @@ void RPCHandlerImpl::Handle(const impl::MessageFromMobile message) {
}
void RPCHandlerImpl::Handle(const impl::MessageFromHmi message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!message) {
- LOG4CXX_ERROR(logger_, "Null-pointer message received.");
+ SDL_LOG_ERROR("Null-pointer message received.");
return;
}
if (app_manager_.IsLowVoltage()) {
- LOG4CXX_ERROR(logger_, "Low Voltage is active.");
+ SDL_LOG_ERROR("Low Voltage is active.");
return;
}
@@ -232,15 +241,15 @@ void RPCHandlerImpl::Handle(const impl::MessageFromHmi message) {
void RPCHandlerImpl::OnMessageReceived(
const protocol_handler::RawMessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (app_manager_.IsLowVoltage()) {
- LOG4CXX_ERROR(logger_, "Low Voltage is active.");
+ SDL_LOG_ERROR("Low Voltage is active.");
return;
}
if (!message) {
- LOG4CXX_ERROR(logger_, "Null-pointer message received.");
+ SDL_LOG_ERROR("Null-pointer message received.");
NOTREACHED();
return;
}
@@ -248,7 +257,7 @@ void RPCHandlerImpl::OnMessageReceived(
std::shared_ptr<Message> outgoing_message = ConvertRawMsgToMessage(message);
if (outgoing_message) {
- LOG4CXX_DEBUG(logger_, "Posting new Message");
+ SDL_LOG_DEBUG("Posting new Message");
messages_from_mobile_.PostMessage(
impl::MessageFromMobile(outgoing_message));
}
@@ -256,15 +265,15 @@ void RPCHandlerImpl::OnMessageReceived(
void RPCHandlerImpl::OnMobileMessageSent(
const protocol_handler::RawMessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
void RPCHandlerImpl::OnMessageReceived(
hmi_message_handler::MessageSharedPointer message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!message) {
- LOG4CXX_ERROR(logger_, "Null-pointer message received.");
+ SDL_LOG_ERROR("Null-pointer message received.");
NOTREACHED();
return;
}
@@ -274,6 +283,26 @@ void RPCHandlerImpl::OnMessageReceived(
void RPCHandlerImpl::OnErrorSending(
hmi_message_handler::MessageSharedPointer message) {
+ SDL_LOG_AUTO_TRACE();
+ smart_objects::SmartObjectSPtr smart_object =
+ std::make_shared<smart_objects::SmartObject>();
+ std::string warning_info;
+ bool allow_unknown_parameters = true;
+ if (ConvertMessageToSO(
+ *message, *smart_object, warning_info, allow_unknown_parameters)) {
+ (*smart_object)[strings::params][strings::message_type] =
+ application_manager::MessageType::kResponse;
+ (*smart_object).erase(strings::msg_params);
+ (*smart_object)[strings::params][hmi_response::code] =
+ hmi_apis::Common_Result::GENERIC_ERROR;
+ (*smart_object)[strings::params][strings::error_msg] =
+ std::string("Error sending message, mb component not registered");
+
+ if (!app_manager_.GetRPCService().ManageHMICommand(
+ smart_object, commands::Command::SOURCE_HMI, warning_info)) {
+ SDL_LOG_ERROR("Received command didn't run successfully");
+ }
+ }
return;
}
@@ -320,13 +349,13 @@ void RPCHandlerImpl::GetMessageVersion(
bool RPCHandlerImpl::ConvertMessageToSO(
const Message& message,
ns_smart_device_link::ns_smart_objects::SmartObject& output,
+ std::string& out_warning_info,
const bool allow_unknown_parameters,
const bool validate_params) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "\t\t\tMessage to convert: protocol "
- << message.protocol_version() << "; json "
- << message.json_message());
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("\t\t\tMessage to convert: protocol "
+ << message.protocol_version() << "; json "
+ << message.json_message());
switch (message.protocol_version()) {
case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_5:
@@ -358,10 +387,9 @@ bool RPCHandlerImpl::ConvertMessageToSO(
(validate_params &&
!ValidateRpcSO(
output, msg_version, report, allow_unknown_parameters))) {
- LOG4CXX_WARN(logger_,
- "Failed to parse string to smart object with API version "
- << msg_version.toString() << " : "
- << message.json_message());
+ SDL_LOG_WARN("Failed to parse string to smart object with API version "
+ << msg_version.toString() << " : "
+ << message.json_message());
std::shared_ptr<smart_objects::SmartObject> response(
MessageHelper::CreateNegativeResponse(
@@ -378,9 +406,11 @@ bool RPCHandlerImpl::ConvertMessageToSO(
return false;
}
- LOG4CXX_DEBUG(logger_,
- "Convertion result for sdl object is true function_id "
- << output[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt());
+ SDL_LOG_DEBUG("Convertion result for sdl object is true function_id "
+ << output[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt());
+
+ // Populate any warning info generated during the validation process
+ out_warning_info = rpc::PrettyFormat(report);
output[strings::params][strings::connection_key] =
message.connection_key();
@@ -388,11 +418,9 @@ bool RPCHandlerImpl::ConvertMessageToSO(
message.protocol_version();
if (message.binary_data()) {
if (message.payload_size() < message.data_size()) {
- LOG4CXX_ERROR(logger_,
- "Incomplete binary"
- << " binary size should be " << message.data_size()
- << " payload data size is "
- << message.payload_size());
+ SDL_LOG_ERROR("Incomplete binary"
+ << " binary size should be " << message.data_size()
+ << " payload data size is " << message.payload_size());
std::shared_ptr<smart_objects::SmartObject> response(
MessageHelper::CreateNegativeResponse(
message.connection_key(),
@@ -415,12 +443,11 @@ bool RPCHandlerImpl::ConvertMessageToSO(
formatters::FormatterJsonRpc::FromString<
hmi_apis::FunctionID::eType,
hmi_apis::messageType::eType>(message.json_message(), output);
- LOG4CXX_DEBUG(logger_,
- "Convertion result: "
- << result << " function id "
- << output[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt());
+ SDL_LOG_DEBUG("Convertion result: "
+ << result << " function id "
+ << output[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt());
if (!hmi_so_factory().attachSchema(output, true)) {
- LOG4CXX_WARN(logger_, "Failed to attach schema to object.");
+ SDL_LOG_WARN("Failed to attach schema to object.");
return false;
}
@@ -431,9 +458,8 @@ bool RPCHandlerImpl::ConvertMessageToSO(
smart_objects::errors::OK !=
output.validate(
&report, empty_version, allow_unknown_parameters)) {
- LOG4CXX_ERROR(
- logger_,
- "Incorrect parameter from HMI - " << rpc::PrettyFormat(report));
+ SDL_LOG_ERROR("Incorrect parameter from HMI - "
+ << rpc::PrettyFormat(report));
return HandleWrongMessageType(output, report);
}
@@ -443,7 +469,7 @@ bool RPCHandlerImpl::ConvertMessageToSO(
static ns_smart_device_link_rpc::V1::v4_protocol_v1_2_no_extra v1_shema;
if (message.function_id() == 0 || message.type() == kUnknownType) {
- LOG4CXX_ERROR(logger_, "Message received: UNSUPPORTED_VERSION");
+ SDL_LOG_ERROR("Message received: UNSUPPORTED_VERSION");
int32_t conversation_result =
formatters::CFormatterJsonSDLRPCv1::fromString<
@@ -477,27 +503,26 @@ bool RPCHandlerImpl::ConvertMessageToSO(
break;
}
default:
- LOG4CXX_WARN(logger_,
- "Application used unsupported protocol :"
- << message.protocol_version() << ".");
+ SDL_LOG_WARN("Application used unsupported protocol :"
+ << message.protocol_version() << ".");
return false;
}
output[strings::params][strings::protection] = message.is_message_encrypted();
- LOG4CXX_DEBUG(logger_, "Successfully parsed message into smart object");
+ SDL_LOG_DEBUG("Successfully parsed message into smart object");
return true;
}
bool RPCHandlerImpl::HandleWrongMessageType(
smart_objects::SmartObject& output, rpc::ValidationReport report) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
switch (output[strings::params][strings::message_type].asInt()) {
case application_manager::MessageType::kNotification: {
- LOG4CXX_ERROR(logger_, "Ignore wrong HMI notification");
+ SDL_LOG_ERROR("Ignore wrong HMI notification");
return false;
}
case application_manager::MessageType::kRequest: {
- LOG4CXX_ERROR(logger_, "Received invalid data on HMI request");
+ SDL_LOG_ERROR("Received invalid data on HMI request");
output.erase(strings::msg_params);
output[strings::params].erase(hmi_response::message);
output[strings::params][hmi_response::code] =
@@ -508,15 +533,15 @@ bool RPCHandlerImpl::HandleWrongMessageType(
return true;
}
case application_manager::MessageType::kResponse: {
- LOG4CXX_ERROR(logger_, "Received invalid data on HMI response");
+ SDL_LOG_ERROR("Received invalid data on HMI response");
break;
}
case application_manager::MessageType::kUnknownType: {
- LOG4CXX_ERROR(logger_, "Received unknown type data on HMI");
+ SDL_LOG_ERROR("Received unknown type data on HMI");
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Received error response on HMI");
+ SDL_LOG_ERROR("Received error response on HMI");
break;
}
}
@@ -534,10 +559,10 @@ bool RPCHandlerImpl::ValidateRpcSO(smart_objects::SmartObject& message,
rpc::ValidationReport& report_out,
bool allow_unknown_parameters) {
if (!mobile_so_factory().attachSchema(
- message, !allow_unknown_parameters, msg_version) ||
+ message, !allow_unknown_parameters, msg_version, &report_out) ||
message.validate(&report_out, msg_version, allow_unknown_parameters) !=
smart_objects::errors::OK) {
- LOG4CXX_WARN(logger_, "Failed to parse string to smart object");
+ SDL_LOG_WARN("Failed to parse string to smart object");
return false;
}
return true;
@@ -545,15 +570,15 @@ bool RPCHandlerImpl::ValidateRpcSO(smart_objects::SmartObject& message,
std::shared_ptr<Message> RPCHandlerImpl::ConvertRawMsgToMessage(
const protocol_handler::RawMessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(message);
std::shared_ptr<Message> outgoing_message;
- LOG4CXX_DEBUG(logger_, "Service type." << message->service_type());
+ SDL_LOG_DEBUG("Service type." << message->service_type());
if (message->service_type() != protocol_handler::kRpc &&
message->service_type() != protocol_handler::kBulk) {
// skip this message, not under handling of ApplicationManager
- LOG4CXX_TRACE(logger_, "Skipping message; not the under AM handling.");
+ SDL_LOG_TRACE("Skipping message; not the under AM handling.");
return outgoing_message;
}
@@ -563,7 +588,7 @@ std::shared_ptr<Message> RPCHandlerImpl::ConvertRawMsgToMessage(
if (convertion_result) {
outgoing_message = std::shared_ptr<Message>(convertion_result);
} else {
- LOG4CXX_ERROR(logger_, "Received invalid message");
+ SDL_LOG_ERROR("Received invalid message");
}
return outgoing_message;
diff --git a/src/components/application_manager/src/rpc_passing_handler.cc b/src/components/application_manager/src/rpc_passing_handler.cc
index 7f72632bb1..74a865ff4f 100644
--- a/src/components/application_manager/src/rpc_passing_handler.cc
+++ b/src/components/application_manager/src/rpc_passing_handler.cc
@@ -52,7 +52,7 @@
#include "smart_objects/enum_schema_item.h"
#include "utils/timer_task_impl.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "RPCPassingHandler")
+SDL_CREATE_LOG_VARIABLE("RPCPassingHandler")
namespace application_manager {
@@ -98,12 +98,12 @@ bool RPCPassingHandler::ExtractRPCParams(
const smart_objects::SmartObject& s_map,
const ApplicationSharedPtr app,
const std::string& function_id_str) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
RPCParams params;
if (smart_objects::SmartType_Map == s_map.getType()) {
for (auto iter = s_map.map_begin(); iter != s_map.map_end(); ++iter) {
- LOG4CXX_DEBUG(logger_, "Request's param: " << iter->first);
+ SDL_LOG_DEBUG("Request's param: " << iter->first);
params.insert(iter->first);
}
}
@@ -131,7 +131,7 @@ bool RPCPassingHandler::ExtractRPCParams(
bool RPCPassingHandler::IsPassthroughAllowed(
smart_objects::SmartObject rpc_message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t connection_key =
rpc_message[strings::params][strings::connection_key].asUInt();
ApplicationSharedPtr app = app_manager_.application(connection_key);
@@ -162,31 +162,30 @@ bool RPCPassingHandler::IsPassthroughAllowed(
}
bool RPCPassingHandler::RPCPassThrough(smart_objects::SmartObject rpc_message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t correlation_id =
rpc_message[strings::params][strings::correlation_id].asUInt();
int32_t message_type =
rpc_message[strings::params][strings::message_type].asInt();
- LOG4CXX_DEBUG(logger_, "RPC_PASSING: ");
+ SDL_LOG_DEBUG("RPC_PASSING: ");
MessageHelper::PrintSmartObject(rpc_message);
// Clear timers for timed out requests
ClearCompletedTimers();
switch (message_type) {
case MessageType::kRequest: {
- LOG4CXX_DEBUG(logger_, "Handle request");
+ SDL_LOG_DEBUG("Handle request");
rpc_request_queue_lock_.Acquire();
if (rpc_request_queue.find(correlation_id) == rpc_request_queue.end()) {
rpc_request_queue_lock_.Release();
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Correlation id DOES NOT exist in map. Constructing request queue");
PopulateRPCRequestQueue(rpc_message);
} else {
rpc_request_queue_lock_.Release();
- LOG4CXX_DEBUG(logger_, "Correlation id DOES exist in map. Returning");
+ SDL_LOG_DEBUG("Correlation id DOES exist in map. Returning");
std::shared_ptr<smart_objects::SmartObject> response(
MessageHelper::CreateNegativeResponse(
rpc_message[strings::params][strings::connection_key].asUInt(),
@@ -204,8 +203,7 @@ bool RPCPassingHandler::RPCPassThrough(smart_objects::SmartObject rpc_message) {
rpc_request_queue_lock_.Acquire();
if (rpc_request_queue[correlation_id].second.empty()) {
- LOG4CXX_DEBUG(logger_,
- "No services left in map. Using core to handle request");
+ SDL_LOG_DEBUG("No services left in map. Using core to handle request");
rpc_request_queue.erase(correlation_id);
rpc_request_queue_lock_.Release();
return false;
@@ -219,7 +217,7 @@ bool RPCPassingHandler::RPCPassThrough(smart_objects::SmartObject rpc_message) {
}
case MessageType::kResponse: {
- LOG4CXX_DEBUG(logger_, "Handle response");
+ SDL_LOG_DEBUG("Handle response");
rpc_request_queue_lock_.Acquire();
if (rpc_request_queue.find(correlation_id) == rpc_request_queue.end()) {
rpc_request_queue_lock_.Release();
@@ -235,11 +233,11 @@ bool RPCPassingHandler::RPCPassThrough(smart_objects::SmartObject rpc_message) {
&result_code);
if (result_code == mobile_apis::Result::UNSUPPORTED_REQUEST) {
- LOG4CXX_DEBUG(logger_, "Service sent UNSUPPORTED_REQUEST");
+ SDL_LOG_DEBUG("Service sent UNSUPPORTED_REQUEST");
PerformNextRequest(correlation_id);
return true;
} else {
- LOG4CXX_DEBUG(logger_, "Valid RPC passing response");
+ SDL_LOG_DEBUG("Valid RPC passing response");
ForwardResponseToMobile(correlation_id, rpc_message);
return true;
}
@@ -285,16 +283,14 @@ void RPCPassingHandler::PopulateRPCRequestQueue(
sync_primitives::AutoLock lock(rpc_request_queue_lock_);
rpc_request_queue[correlation_id] = entry;
- LOG4CXX_DEBUG(logger_,
- "Added " << rpc_request_queue[correlation_id].second.size()
+ SDL_LOG_DEBUG("Added " << rpc_request_queue[correlation_id].second.size()
<< " requests to the queue");
}
void RPCPassingHandler::ForwardRequestToMobile(uint32_t correlation_id) {
rpc_request_queue_lock_.Acquire();
uint32_t connection_key =
rpc_request_queue[correlation_id].second.front().connection_key;
- LOG4CXX_DEBUG(logger_,
- "Forwarding request to service with app id " << connection_key);
+ SDL_LOG_DEBUG("Forwarding request to service with app id " << connection_key);
smart_objects::SmartObject message(rpc_request_queue[correlation_id].first);
message[strings::params][strings::connection_key] = connection_key;
@@ -306,8 +302,7 @@ void RPCPassingHandler::ForwardRequestToMobile(uint32_t correlation_id) {
}
void RPCPassingHandler::ForwardRequestToCore(uint32_t correlation_id) {
- LOG4CXX_DEBUG(logger_,
- "No services left in map. using core to handle request");
+ SDL_LOG_DEBUG("No services left in map. using core to handle request");
rpc_request_queue_lock_.Acquire();
smart_objects::SmartObject message(rpc_request_queue[correlation_id].first);
smart_objects::SmartObjectSPtr result =
@@ -354,8 +349,7 @@ void RPCPassingHandler::ForwardResponseToMobile(
.asUInt();
rpc_request_queue_lock_.Release();
- LOG4CXX_DEBUG(logger_,
- "Forwarding response to mobile app " << origin_connection_key);
+ SDL_LOG_DEBUG("Forwarding response to mobile app " << origin_connection_key);
smart_objects::SmartObject message(response_message);
message[strings::params][strings::connection_key] = origin_connection_key;
smart_objects::SmartObjectSPtr result =
@@ -364,10 +358,10 @@ void RPCPassingHandler::ForwardResponseToMobile(
}
bool RPCPassingHandler::PerformNextRequest(uint32_t correlation_id) {
- LOG4CXX_DEBUG(logger_, "Performing next request in queue");
+ SDL_LOG_DEBUG("Performing next request in queue");
rpc_request_queue_lock_.Acquire();
if (rpc_request_queue.find(correlation_id) == rpc_request_queue.end()) {
- LOG4CXX_ERROR(logger_, "Correlation id does NOT exist in map");
+ SDL_LOG_ERROR("Correlation id does NOT exist in map");
rpc_request_queue_lock_.Release();
return false;
}
@@ -386,7 +380,7 @@ bool RPCPassingHandler::PerformNextRequest(uint32_t correlation_id) {
void RPCPassingHandler::OnPassThroughRequestTimeout() {
timeout_queue_lock_.Acquire();
- LOG4CXX_DEBUG(logger_, "Request Timed out");
+ SDL_LOG_DEBUG("Request Timed out");
auto timeout_entry = timeout_queue_.front();
uint32_t correlation_id = timeout_entry.second;
timeout_queue_lock_.Release();
@@ -396,13 +390,12 @@ void RPCPassingHandler::OnPassThroughRequestTimeout() {
void RPCPassingHandler::ClearCompletedTimers() {
sync_primitives::AutoLock lock(timeout_queue_lock_);
- LOG4CXX_DEBUG(logger_, "Clearing Completed Timers");
+ SDL_LOG_DEBUG("Clearing Completed Timers");
for (auto it = timeout_queue_.begin(); it != timeout_queue_.end();) {
TimerSPtr timer = it->first;
if (timer->is_completed()) {
- LOG4CXX_DEBUG(
- logger_,
- "Removing completed timer for correlation id " << it->second);
+ SDL_LOG_DEBUG("Removing completed timer for correlation id "
+ << it->second);
it = timeout_queue_.erase(it);
} else {
++it;
@@ -418,9 +411,8 @@ void RPCPassingHandler::AddRequestTimer(uint32_t correlation_id) {
const uint32_t timeout_ms =
app_manager_.get_settings().rpc_pass_through_timeout();
rpc_passing_timer->Start(timeout_ms, timer::kSingleShot);
- LOG4CXX_DEBUG(
- logger_,
- "Adding and starting timer for correlation id " << correlation_id);
+ SDL_LOG_DEBUG("Adding and starting timer for correlation id "
+ << correlation_id);
sync_primitives::AutoLock lock(timeout_queue_lock_);
timeout_queue_.push_back(std::make_pair(rpc_passing_timer, correlation_id));
}
@@ -432,8 +424,7 @@ void RPCPassingHandler::RemoveRequestTimer(uint32_t correlation_id) {
TimerSPtr timer = it->first;
uint32_t cid = it->second;
if (cid == correlation_id) {
- LOG4CXX_DEBUG(logger_,
- "Removing timer for correlation id " << correlation_id);
+ SDL_LOG_DEBUG("Removing timer for correlation id " << correlation_id);
it = timeout_queue_.erase(it);
} else {
++it;
diff --git a/src/components/application_manager/src/rpc_protection_manager_impl.cc b/src/components/application_manager/src/rpc_protection_manager_impl.cc
index 4afceb9e5b..64b732ddb2 100644
--- a/src/components/application_manager/src/rpc_protection_manager_impl.cc
+++ b/src/components/application_manager/src/rpc_protection_manager_impl.cc
@@ -35,7 +35,7 @@
#include "application_manager/message_helper.h"
#include "utils/helpers.h"
-CREATE_LOGGERPTR_LOCAL(logger_, "RPCProtectionManagerImpl");
+SDL_CREATE_LOG_VARIABLE("RPCProtectionManagerImpl");
namespace application_manager {
@@ -51,33 +51,33 @@ std::vector<std::string> kExceptionRPCs = {"RegisterAppInterface",
RPCProtectionManagerImpl::RPCProtectionManagerImpl(
policy::PolicyHandlerInterface& policy_handler)
: policy_handler_(policy_handler) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
bool RPCProtectionManagerImpl::CheckPolicyEncryptionFlag(
const uint32_t function_id,
const ApplicationSharedPtr app,
const bool is_rpc_service_secure) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto& policy_encryption_flag_getter =
policy_handler_.PolicyEncryptionFlagGetter();
if (!policy_encryption_flag_getter) {
- LOG4CXX_ERROR(logger_, "Policy Encryption Flag getter is not inited");
+ SDL_LOG_ERROR("Policy Encryption Flag getter is not inited");
return false;
}
const std::string function_name =
policy_encryption_flag_getter->GetPolicyFunctionName(function_id);
- LOG4CXX_DEBUG(logger_, "Function for check is " << function_name);
+ SDL_LOG_DEBUG("Function for check is " << function_name);
if (!is_rpc_service_secure && IsExceptionRPC(function_id)) {
- LOG4CXX_WARN(logger_,
- "Exception RPC can be sent in an non secure service despite "
- "encryption required flag");
+ SDL_LOG_WARN(
+ "Exception RPC can be sent in an non secure service despite "
+ "encryption required flag");
return false;
}
if (!app) {
- LOG4CXX_WARN(logger_, "Received app nullptr");
+ SDL_LOG_WARN("Received app nullptr");
return false;
}
@@ -88,14 +88,13 @@ bool RPCProtectionManagerImpl::CheckPolicyEncryptionFlag(
bool RPCProtectionManagerImpl::IsEncryptionRequiredByPolicy(
const std::string& policy_app_id, const std::string& function_name) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto it = encrypted_rpcs_.find(policy_app_id);
if (encrypted_rpcs_.end() == it) {
- LOG4CXX_WARN(
- logger_,
- "App specific policies for app: " << policy_app_id << " not found");
+ SDL_LOG_WARN("App specific policies for app: " << policy_app_id
+ << " not found");
it = encrypted_rpcs_.find(policy_table::kDefaultApp);
return encrypted_rpcs_.end() != it
? (*it).second.find(function_name) != (*it).second.end()
@@ -107,8 +106,8 @@ bool RPCProtectionManagerImpl::IsEncryptionRequiredByPolicy(
bool RPCProtectionManagerImpl::IsInEncryptionNeededCache(
const uint32_t app_id, const uint32_t correlation_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "correlation_id is " << correlation_id);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("correlation_id is " << correlation_id);
return encryption_needed_cache_.find(std::make_pair(
app_id, correlation_id)) != encryption_needed_cache_.end();
@@ -124,44 +123,43 @@ bool RPCProtectionManagerImpl::IsExceptionRPC(
void RPCProtectionManagerImpl::AddToEncryptionNeededCache(
const uint32_t app_id, const uint32_t correlation_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(message_needed_encryption_lock_);
- LOG4CXX_DEBUG(logger_, "Adding rpc with correlation id: " << correlation_id);
+ SDL_LOG_DEBUG("Adding rpc with correlation id: " << correlation_id);
encryption_needed_cache_.insert(std::make_pair(app_id, correlation_id));
}
void RPCProtectionManagerImpl::RemoveFromEncryptionNeededCache(
const uint32_t app_id, const uint32_t correlation_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(message_needed_encryption_lock_);
- LOG4CXX_DEBUG(logger_,
- "Removing rpc with correlation id: " << correlation_id);
+ SDL_LOG_DEBUG("Removing rpc with correlation id: " << correlation_id);
encryption_needed_cache_.erase(std::make_pair(app_id, correlation_id));
}
void RPCProtectionManagerImpl::OnPTUFinished(const bool ptu_result) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(encrypted_rpcs_lock_);
if (ptu_result) {
- LOG4CXX_TRACE(logger_,
- "PTU finished successfully, commencing internal encrypted "
- "RPC cache update");
+ SDL_LOG_TRACE(
+ "PTU finished successfully, commencing internal encrypted "
+ "RPC cache update");
encrypted_rpcs_.clear();
SaveEncryptedRPC();
} else {
- LOG4CXX_WARN(logger_,
- "PTU was unsuccessful. Keeping internal RPC cache from "
- "current snapshot");
+ SDL_LOG_WARN(
+ "PTU was unsuccessful. Keeping internal RPC cache from "
+ "current snapshot");
}
}
void RPCProtectionManagerImpl::SaveEncryptedRPC() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto policy_encryption_flag_getter =
policy_handler_.PolicyEncryptionFlagGetter();
@@ -170,14 +168,14 @@ void RPCProtectionManagerImpl::SaveEncryptedRPC() {
policy_encryption_flag_getter->GetApplicationPolicyIDs();
for (const auto& app : policy_policy_app_ids) {
- LOG4CXX_DEBUG(logger_, "Processing app name: " << app);
+ SDL_LOG_DEBUG("Processing app name: " << app);
encrypted_rpcs_[app] = GetEncryptedRPCsForApp(app);
}
}
void RPCProtectionManagerImpl::OnPTInited() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
encrypted_rpcs_.clear();
@@ -187,7 +185,7 @@ void RPCProtectionManagerImpl::OnPTInited() {
RPCProtectionManagerImpl::FunctionNames
RPCProtectionManagerImpl::GetEncryptedRPCsForApp(
const std::string& policy_app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
FunctionNames encrypted_rpcs;
const auto policy_encryption_flag_getter =
@@ -200,11 +198,11 @@ RPCProtectionManagerImpl::GetEncryptedRPCsForApp(
const auto function_groups =
policy_encryption_flag_getter->GetFunctionalGroupsForApp(policy_app_id);
- auto fill_encrypted_rpcs = [&encrypted_rpcs](
- const std::string& function_name) {
- LOG4CXX_DEBUG(logger_, "Adding required encryprion rpc: " << function_name);
- encrypted_rpcs.insert(function_name);
- };
+ auto fill_encrypted_rpcs =
+ [&encrypted_rpcs](const std::string& function_name) {
+ SDL_LOG_DEBUG("Adding required encryprion rpc: " << function_name);
+ encrypted_rpcs.insert(function_name);
+ };
for (const auto& function_group : function_groups) {
if (policy_encryption_flag_getter->FunctionGroupNeedEncryption(
diff --git a/src/components/application_manager/src/rpc_service_impl.cc b/src/components/application_manager/src/rpc_service_impl.cc
index 0dc48385b2..34a0bed7af 100644
--- a/src/components/application_manager/src/rpc_service_impl.cc
+++ b/src/components/application_manager/src/rpc_service_impl.cc
@@ -41,7 +41,7 @@
namespace application_manager {
namespace rpc_service {
-CREATE_LOGGERPTR_LOCAL(logger_, "RPCServiceImpl")
+SDL_CREATE_LOG_VARIABLE("RPCServiceImpl")
namespace formatters = ns_smart_device_link::ns_json_handler::formatters;
namespace jhs = ns_smart_device_link::ns_json_handler::strings;
namespace plugin_names = application_manager::plugin_manager::plugin_names;
@@ -69,7 +69,7 @@ RPCServiceImpl::RPCServiceImpl(
RPCServiceImpl::~RPCServiceImpl() {}
void RPCServiceImpl::Stop() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
messages_to_mobile_.Shutdown();
messages_to_hmi_.Shutdown();
@@ -79,7 +79,7 @@ EncryptionFlagCheckResult RPCServiceImpl::IsEncryptionRequired(
const smart_objects::SmartObject& message,
std::shared_ptr<Application> app,
const bool is_rpc_service_secure) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto function_id =
message[strings::params][strings::function_id].asUInt();
const auto correlation_id =
@@ -112,19 +112,25 @@ EncryptionFlagCheckResult RPCServiceImpl::IsEncryptionRequired(
? EncryptionFlagCheckResult::kSuccess_Protected
: EncryptionFlagCheckResult::kSuccess_NotProtected;
}
-
bool RPCServiceImpl::ManageMobileCommand(
const commands::MessageSharedPtr message,
commands::Command::CommandSource source) {
- LOG4CXX_AUTO_TRACE(logger_);
+ return ManageMobileCommand(message, source, std::string());
+}
+
+bool RPCServiceImpl::ManageMobileCommand(
+ const commands::MessageSharedPtr message,
+ commands::Command::CommandSource source,
+ const std::string warning_info) {
+ SDL_LOG_AUTO_TRACE();
if (!message) {
- LOG4CXX_WARN(logger_, "Null-pointer message received.");
+ SDL_LOG_WARN("Null-pointer message received.");
return false;
}
if (app_manager_.IsLowVoltage()) {
- LOG4CXX_WARN(logger_, "Low Voltage is active");
+ SDL_LOG_WARN("Low Voltage is active");
return false;
}
@@ -159,7 +165,7 @@ bool RPCServiceImpl::ManageMobileCommand(
(mobile_apis::FunctionID::UnregisterAppInterfaceID != function_id)) {
app = app_manager_.application(connection_key);
if (!app) {
- LOG4CXX_ERROR(logger_, "RET APPLICATION_NOT_REGISTERED");
+ SDL_LOG_ERROR("RET APPLICATION_NOT_REGISTERED");
smart_objects::SmartObjectSPtr response =
MessageHelper::CreateNegativeResponse(
connection_key,
@@ -191,7 +197,7 @@ bool RPCServiceImpl::ManageMobileCommand(
auto plugin =
app_manager_.GetPluginManager().FindPluginToProcess(function_id, source);
if (!plugin) {
- LOG4CXX_WARN(logger_, "Failed to find plugin : " << plugin.error());
+ SDL_LOG_WARN("Failed to find plugin : " << plugin.error());
CheckSourceForUnsupportedRequest(message, source);
return false;
}
@@ -199,7 +205,7 @@ bool RPCServiceImpl::ManageMobileCommand(
auto command = factory.CreateCommand(message, source);
if (!command) {
- LOG4CXX_WARN(logger_, "Failed to create mobile command from smart object");
+ SDL_LOG_WARN("Failed to create mobile command from smart object");
return false;
}
@@ -237,7 +243,6 @@ bool RPCServiceImpl::ManageMobileCommand(
if (message_type == mobile_apis::messageType::request &&
source == commands::Command::CommandSource::SOURCE_MOBILE) {
- // commands will be launched from requesr_ctrl
mobile_apis::HMILevel::eType app_hmi_level =
mobile_apis::HMILevel::INVALID_ENUM;
if (app) {
@@ -245,18 +250,18 @@ bool RPCServiceImpl::ManageMobileCommand(
app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
}
- // commands will be launched from request_ctrl
+ command->set_warning_info(warning_info);
+ // commands will be launched from request_ctrl
const request_controller::RequestController::TResult result =
request_ctrl_.addMobileRequest(command, app_hmi_level);
if (result == request_controller::RequestController::SUCCESS) {
- LOG4CXX_DEBUG(logger_, "Perform request");
+ SDL_LOG_DEBUG("Perform request");
} else if (result == request_controller::RequestController::
TOO_MANY_PENDING_REQUESTS) {
- LOG4CXX_ERROR(logger_,
- "RET Unable top perform request: "
- << "TOO_MANY_PENDING_REQUESTS");
+ SDL_LOG_ERROR("RET Unable top perform request: "
+ << "TOO_MANY_PENDING_REQUESTS");
smart_objects::SmartObjectSPtr response =
MessageHelper::CreateNegativeResponse(
@@ -274,9 +279,8 @@ bool RPCServiceImpl::ManageMobileCommand(
return false;
} else if (result ==
request_controller::RequestController::TOO_MANY_REQUESTS) {
- LOG4CXX_ERROR(logger_,
- "RET Unable to perform request: "
- << "TOO_MANY_REQUESTS");
+ SDL_LOG_ERROR("RET Unable to perform request: "
+ << "TOO_MANY_REQUESTS");
ManageMobileCommand(
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
@@ -295,9 +299,8 @@ bool RPCServiceImpl::ManageMobileCommand(
return false;
} else if (result == request_controller::RequestController::
NONE_HMI_LEVEL_MANY_REQUESTS) {
- LOG4CXX_ERROR(logger_,
- "RET Unable to perform request: "
- << "REQUEST_WHILE_IN_NONE_HMI_LEVEL");
+ SDL_LOG_ERROR("RET Unable to perform request: "
+ << "REQUEST_WHILE_IN_NONE_HMI_LEVEL");
ManageMobileCommand(
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
@@ -314,27 +317,33 @@ bool RPCServiceImpl::ManageMobileCommand(
connection_key, mobile_apis::Result::INVALID_ENUM, false);
return false;
} else {
- LOG4CXX_ERROR(logger_, "RET Unable to perform request: Unknown case");
+ SDL_LOG_ERROR("RET Unable to perform request: Unknown case");
return false;
}
return true;
}
- LOG4CXX_ERROR(logger_, "RET UNKNOWN MESSAGE TYPE " << message_type);
+ SDL_LOG_ERROR("RET UNKNOWN MESSAGE TYPE " << message_type);
return false;
}
bool RPCServiceImpl::ManageHMICommand(const commands::MessageSharedPtr message,
commands::Command::CommandSource source) {
- LOG4CXX_AUTO_TRACE(logger_);
+ return ManageHMICommand(message, source, std::string());
+}
+
+bool RPCServiceImpl::ManageHMICommand(const commands::MessageSharedPtr message,
+ commands::Command::CommandSource source,
+ const std::string warning_info) {
+ SDL_LOG_AUTO_TRACE();
if (!message) {
- LOG4CXX_WARN(logger_, "Null-pointer message received.");
+ SDL_LOG_WARN("Null-pointer message received.");
return false;
}
if (app_manager_.IsLowVoltage()) {
- LOG4CXX_WARN(logger_, "Low Voltage is active");
+ SDL_LOG_WARN("Low Voltage is active");
return false;
}
@@ -344,7 +353,7 @@ bool RPCServiceImpl::ManageHMICommand(const commands::MessageSharedPtr message,
auto plugin =
app_manager_.GetPluginManager().FindPluginToProcess(function_id, source);
if (!plugin) {
- LOG4CXX_WARN(logger_, "Filed to find plugin : " << plugin.error());
+ SDL_LOG_WARN("Filed to find plugin : " << plugin.error());
return false;
}
@@ -352,7 +361,7 @@ bool RPCServiceImpl::ManageHMICommand(const commands::MessageSharedPtr message,
auto command = factory.CreateCommand(message, source);
if (!command) {
- LOG4CXX_WARN(logger_, "Failed to create command from smart object");
+ SDL_LOG_WARN("Failed to create command from smart object");
return false;
}
@@ -374,7 +383,8 @@ bool RPCServiceImpl::ManageHMICommand(const commands::MessageSharedPtr message,
(*(message.get()))[strings::params][strings::message_type].asInt();
if (kRequest == message_type) {
- LOG4CXX_DEBUG(logger_, "ManageHMICommand");
+ SDL_LOG_DEBUG("ManageHMICommand");
+ command->set_warning_info(warning_info);
request_ctrl_.addHMIRequest(command);
}
@@ -393,21 +403,20 @@ bool RPCServiceImpl::ManageHMICommand(const commands::MessageSharedPtr message,
}
void RPCServiceImpl::Handle(const impl::MessageToHmi message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!hmi_handler_) {
- LOG4CXX_ERROR(logger_, "Observer is not set for HMIMessageHandler");
+ SDL_LOG_ERROR("Observer is not set for HMIMessageHandler");
return;
}
hmi_handler_->SendMessageToHMI(message);
- LOG4CXX_INFO(logger_, "Message for HMI given away");
+ SDL_LOG_INFO("Message for HMI given away");
}
void RPCServiceImpl::Handle(const impl::MessageToMobile message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!protocol_handler_) {
- LOG4CXX_WARN(logger_,
- "Protocol Handler is not set; cannot send message to mobile.");
+ SDL_LOG_WARN("Protocol Handler is not set; cannot send message to mobile.");
return;
}
@@ -415,7 +424,7 @@ void RPCServiceImpl::Handle(const impl::MessageToMobile message) {
MobileMessageHandler::HandleOutgoingMessageProtocol(message));
if (!rawMessage) {
- LOG4CXX_ERROR(logger_, "Failed to create raw message.");
+ SDL_LOG_ERROR("Failed to create raw message.");
return;
}
@@ -445,9 +454,9 @@ void RPCServiceImpl::Handle(const impl::MessageToMobile message) {
correlation_id);
if (needs_encryption && !is_service_secure) {
- LOG4CXX_WARN(logger_,
- "Unable to send rpc that requires encryption without secure "
- "rpc service");
+ SDL_LOG_WARN(
+ "Unable to send rpc that requires encryption without secure "
+ "rpc service");
return;
};
@@ -455,27 +464,27 @@ void RPCServiceImpl::Handle(const impl::MessageToMobile message) {
rawMessage, needs_encryption, is_final);
rpc_protection_manager_->RemoveFromEncryptionNeededCache(app_id,
correlation_id);
- LOG4CXX_INFO(logger_, "Message for mobile given away");
+ SDL_LOG_INFO("Message for mobile given away");
if (close_session) {
- app_manager_.connection_handler().CloseSession(message->connection_key(),
- connection_handler::kCommon);
+ app_manager_.connection_handler().CloseSession(
+ message->connection_key(), connection_handler::kFinalMessage);
}
}
void RPCServiceImpl::SendMessageToMobile(
const application_manager::commands::MessageSharedPtr message,
bool final_message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!message) {
- LOG4CXX_ERROR(logger_, "Null-pointer message received.");
+ SDL_LOG_ERROR("Null-pointer message received.");
NOTREACHED();
return;
}
if (!protocol_handler_) {
- LOG4CXX_WARN(logger_, "No Protocol Handler set");
+ SDL_LOG_WARN("No Protocol Handler set");
return;
}
@@ -487,7 +496,7 @@ void RPCServiceImpl::SendMessageToMobile(
bool allow_unknown_parameters = false;
if (!app) {
- LOG4CXX_ERROR(logger_, "No application associated with connection key");
+ SDL_LOG_ERROR("No application associated with connection key");
if (is_result_code_exists &&
((*message)[strings::msg_params][strings::result_code] ==
ns_smart_device_link_rpc::V1::Result::UNSUPPORTED_VERSION)) {
@@ -519,9 +528,8 @@ void RPCServiceImpl::SendMessageToMobile(
if (IsAppServiceRPC(function_id,
commands::Command::CommandSource::SOURCE_SDL) ||
rpc_passing) {
- LOG4CXX_DEBUG(
- logger_,
- "Allowing unknown parameters for response function " << function_id);
+ SDL_LOG_DEBUG("Allowing unknown parameters for response function "
+ << function_id);
allow_unknown_parameters = true;
}
@@ -539,13 +547,12 @@ void RPCServiceImpl::SendMessageToMobile(
(*message)[strings::params][strings::function_id].asUInt());
mobile_so_factory().attachSchema(*message, false);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Attached schema to message, result if valid: " << message->isValid());
if (!ConvertSOtoMessage(
(*message), (*message_to_send), allow_unknown_parameters)) {
- LOG4CXX_WARN(logger_, "Can't send msg to Mobile: failed to create string");
+ SDL_LOG_WARN("Can't send msg to Mobile: failed to create string");
return;
}
@@ -569,7 +576,7 @@ void RPCServiceImpl::SendMessageToMobile(
for (; iter != iter_end; ++iter) {
if (true == iter->second.asBool()) {
- LOG4CXX_INFO(logger_, "Request's param: " << iter->first);
+ SDL_LOG_INFO("Request's param: " << iter->first);
params.insert(iter->first);
}
}
@@ -580,8 +587,7 @@ void RPCServiceImpl::SendMessageToMobile(
app_manager_.CheckPolicyPermissions(
app, window_id, string_functionID, params);
if (mobile_apis::Result::SUCCESS != check_result) {
- LOG4CXX_WARN(logger_,
- "Function \"" << string_functionID << "\" (#"
+ SDL_LOG_WARN("Function \"" << string_functionID << "\" (#"
<< api_function_id
<< ") not allowed by policy");
return;
@@ -599,8 +605,7 @@ void RPCServiceImpl::SendMessageToMobile(
}
if (message_to_send->binary_data()) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Binary data size: " << message_to_send->binary_data()->size());
}
messages_to_mobile_.PostMessage(
@@ -609,15 +614,15 @@ void RPCServiceImpl::SendMessageToMobile(
void RPCServiceImpl::SendMessageToHMI(
const commands::MessageSharedPtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!message) {
- LOG4CXX_WARN(logger_, "Null-pointer message received.");
+ SDL_LOG_WARN("Null-pointer message received.");
NOTREACHED();
return;
}
if (!hmi_handler_) {
- LOG4CXX_WARN(logger_, "No HMI Handler set");
+ SDL_LOG_WARN("No HMI Handler set");
return;
}
@@ -626,28 +631,25 @@ void RPCServiceImpl::SendMessageToHMI(
std::shared_ptr<Message> message_to_send(
new Message(protocol_handler::MessagePriority::kDefault));
if (!message_to_send) {
- LOG4CXX_ERROR(logger_, "Null pointer");
+ SDL_LOG_ERROR("Null pointer");
return;
}
hmi_so_factory().attachSchema(*message, false);
- LOG4CXX_INFO(
- logger_,
+ SDL_LOG_INFO(
"Attached schema to message, result if valid: " << message->isValid());
if (IsAppServiceRPC((*message)[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt(),
commands::Command::CommandSource::SOURCE_SDL_TO_HMI)) {
- LOG4CXX_DEBUG(logger_,
- "Allowing unknown parameters for response function "
- << (*message)[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt());
+ SDL_LOG_DEBUG("Allowing unknown parameters for response function "
+ << (*message)[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt());
allow_unknown_parameters = true;
}
if (!ConvertSOtoMessage(
*message, *message_to_send, allow_unknown_parameters)) {
- LOG4CXX_WARN(logger_,
- "Cannot send message to HMI: failed to create string");
+ SDL_LOG_WARN("Cannot send message to HMI: failed to create string");
return;
}
messages_to_hmi_.PostMessage(impl::MessageToHmi(message_to_send));
@@ -703,16 +705,15 @@ bool RPCServiceImpl::ConvertSOtoMessage(
const ns_smart_device_link::ns_smart_objects::SmartObject& message,
Message& output,
const bool allow_unknown_parameters) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (smart_objects::SmartType_Null == message.getType() ||
smart_objects::SmartType_Invalid == message.getType()) {
- LOG4CXX_WARN(logger_, "Invalid smart object received.");
+ SDL_LOG_WARN("Invalid smart object received.");
return false;
}
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Message with protocol: " << message.getElement(jhs::S_PARAMS)
.getElement(jhs::S_PROTOCOL_TYPE)
.asInt());
@@ -729,7 +730,7 @@ bool RPCServiceImpl::ConvertSOtoMessage(
if (protocol_version == 1) {
if (!formatters::CFormatterJsonSDLRPCv1::toString(
message, output_string, !allow_unknown_parameters)) {
- LOG4CXX_WARN(logger_, "Failed to serialize smart object");
+ SDL_LOG_WARN("Failed to serialize smart object");
return false;
}
output.set_protocol_version(
@@ -737,7 +738,7 @@ bool RPCServiceImpl::ConvertSOtoMessage(
} else {
if (!formatters::CFormatterJsonSDLRPCv2::toString(
message, output_string, !allow_unknown_parameters)) {
- LOG4CXX_WARN(logger_, "Failed to serialize smart object");
+ SDL_LOG_WARN("Failed to serialize smart object");
return false;
}
output.set_protocol_version(
@@ -750,7 +751,7 @@ bool RPCServiceImpl::ConvertSOtoMessage(
case 1: {
if (!formatters::FormatterJsonRpc::ToString(
message, output_string, !allow_unknown_parameters)) {
- LOG4CXX_WARN(logger_, "Failed to serialize smart object");
+ SDL_LOG_WARN("Failed to serialize smart object");
return false;
}
output.set_protocol_version(
@@ -762,7 +763,7 @@ bool RPCServiceImpl::ConvertSOtoMessage(
return false;
}
- LOG4CXX_DEBUG(logger_, "Conversion result: " << output_string);
+ SDL_LOG_DEBUG("Conversion result: " << output_string);
output.set_connection_key(message.getElement(jhs::S_PARAMS)
.getElement(strings::connection_key)
@@ -797,7 +798,7 @@ bool RPCServiceImpl::ConvertSOtoMessage(
output.set_binary_data(&binaryData);
}
- LOG4CXX_DEBUG(logger_, "Successfully parsed smart object into message");
+ SDL_LOG_DEBUG("Successfully parsed smart object into message");
return true;
}
diff --git a/src/components/application_manager/src/smart_object_keys.cc b/src/components/application_manager/src/smart_object_keys.cc
index fe0f878e6c..f95476b7a6 100644
--- a/src/components/application_manager/src/smart_object_keys.cc
+++ b/src/components/application_manager/src/smart_object_keys.cc
@@ -85,6 +85,7 @@ const char* user_location = "userLocation";
const char* num_ticks = "numTicks";
const char* slider_footer = "sliderFooter";
const char* menu_id = "menuID";
+const char* parent_id = "parentID";
const char* menu_name = "menuName";
const char* menu_layout = "menuLayout";
const char* menu_layouts_available = "menuLayoutsAvailable";
@@ -163,6 +164,8 @@ const char* system_capabilities = "systemCapabilities";
const char* navigation_capability = "navigationCapability";
const char* phone_capability = "phoneCapability";
const char* video_streaming_capability = "videoStreamingCapability";
+const char* driver_distraction_capability = "driverDistractionCapability";
+const char* driver_distraction = "driverDistraction";
const char* rc_capability = "remoteControlCapability";
const char* seat_location_capability = "seatLocationCapability";
const char* app_services_capabilities = "appServicesCapabilities";
@@ -263,6 +266,7 @@ const char* cloud_app_vehicle_id = "cloudAppVehicleID";
const char* external_temp = "externalTemperature";
const char* turn_signal = "turnSignal";
const char* vin = "vin";
+const char* gearStatus = "gearStatus";
const char* prndl = "prndl";
const char* tire_pressure = "tirePressure";
const char* odometer = "odometer";
@@ -276,6 +280,7 @@ const char* head_lamp_status = "headLampStatus";
const char* engine_torque = "engineTorque";
const char* acc_pedal_pos = "accPedalPosition";
const char* steering_wheel_angle = "steeringWheelAngle";
+const char* stability_controls_status = "stabilityControlsStatus";
const char* e_call_info = "eCallInfo";
const char* airbag_status = "airbagStatus";
const char* emergency_event = "emergencyEvent";
@@ -301,6 +306,8 @@ const char* system_software_version = "systemSoftwareVersion";
const char* priority = "priority";
const char* engine_oil_life = "engineOilLife";
const char* oem_custom_data_type = "oemCustomDataType";
+const char* window_status = "windowStatus";
+const char* hands_off_steering = "handsOffSteering";
// app services
const char* app_service_manifest = "appServiceManifest";
@@ -438,6 +445,19 @@ const char* const x = "x";
const char* const y = "y";
} // namespace strings
+namespace hmi_interface {
+const char* basic_communication = "BasicCommunication";
+const char* buttons = "Buttons";
+const char* navigation = "Navigation";
+const char* sdl = "SDL";
+const char* tts = "TTS";
+const char* ui = "UI";
+const char* vr = "VR";
+const char* rc = "RC";
+const char* vehicle_info = "VehicleInfo";
+const char* app_service = "AppService";
+} // namespace hmi_interface
+
namespace json {
const char* appId = "appId";
const char* name = "name";
@@ -547,6 +567,7 @@ const char* capabilities = "capabilities";
const char* speech_capabilities = "speechCapabilities";
const char* prerecorded_speech_capabilities = "prerecordedSpeechCapabilities";
const char* preset_bank_capabilities = "presetBankCapabilities";
+const char* on_screen_presets_available = "onScreenPresetsAvailable";
const char* allowed = "allowed";
const char* vehicle_type = "vehicleType";
const char* did_result = "didResult";
diff --git a/src/components/application_manager/src/state_controller_impl.cc b/src/components/application_manager/src/state_controller_impl.cc
index b07a5bcc13..89dac83165 100644
--- a/src/components/application_manager/src/state_controller_impl.cc
+++ b/src/components/application_manager/src/state_controller_impl.cc
@@ -40,7 +40,7 @@
namespace application_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "StateControllerImpl")
+SDL_CREATE_LOG_VARIABLE("StateControllerImpl")
namespace {
bool IsStateChanged(const HmiState& old_state, const HmiState& new_state) {
@@ -56,7 +56,9 @@ bool IsStateChanged(const HmiState& old_state, const HmiState& new_state) {
} // unnamed namespace
StateControllerImpl::StateControllerImpl(ApplicationManager& app_mngr)
- : EventObserver(app_mngr.event_dispatcher()), app_mngr_(app_mngr) {
+ : EventObserver(app_mngr.event_dispatcher())
+ , app_mngr_(app_mngr)
+ , postponed_activation_controller_() {
subscribe_on_event(hmi_apis::FunctionID::BasicCommunication_OnAppActivated);
subscribe_on_event(hmi_apis::FunctionID::BasicCommunication_OnAppDeactivated);
subscribe_on_event(hmi_apis::FunctionID::TTS_Started);
@@ -70,13 +72,12 @@ void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
const WindowID window_id,
HmiStatePtr state,
const bool request_hmi_state_change) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
DCHECK_OR_RETURN_VOID(state);
DCHECK_OR_RETURN_VOID(HmiState::STATE_ID_REGULAR == state->state_id());
- LOG4CXX_DEBUG(logger_,
- "Set window #" << window_id << " regular state " << *state);
+ SDL_LOG_DEBUG("Set window #" << window_id << " regular state " << *state);
if (state->hmi_level() == mobile_apis::HMILevel::INVALID_ENUM ||
state->audio_streaming_state() ==
@@ -84,11 +85,14 @@ void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
state->video_streaming_state() ==
mobile_apis::VideoStreamingState::INVALID_ENUM ||
state->system_context() == mobile_apis::SystemContext::INVALID_ENUM) {
- LOG4CXX_ERROR(logger_, "Got invalid state");
+ SDL_LOG_ERROR("Got invalid state");
return;
}
- if (app->is_resuming() && !IsResumptionAllowed(app, state)) {
+ const bool app_is_resuming = app->is_resuming();
+ const bool is_resumption_allowed = IsResumptionAllowed(app, state);
+
+ if (app_is_resuming && !is_resumption_allowed) {
return;
}
@@ -99,7 +103,7 @@ void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
return;
}
- LOG4CXX_DEBUG(logger_, "Resolved state: " << *resolved_state);
+ SDL_LOG_DEBUG("Resolved state: " << *resolved_state);
const hmi_apis::Common_HMILevel::eType hmi_level =
static_cast<hmi_apis::Common_HMILevel::eType>(
resolved_state->hmi_level());
@@ -117,7 +121,7 @@ void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
app_mngr_.set_application_id(corr_id, app->hmi_app_id());
return;
}
- LOG4CXX_ERROR(logger_, "Unable to send BC.ActivateApp");
+ SDL_LOG_ERROR("Unable to send BC.ActivateApp");
return;
}
ApplyRegularState(app, window_id, resolved_state);
@@ -130,7 +134,7 @@ void StateControllerImpl::SetRegularState(
const mobile_apis::AudioStreamingState::eType audio_state,
const mobile_apis::VideoStreamingState::eType video_state,
const bool request_hmi_state_change) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
HmiStatePtr prev_regular = app->RegularHmiState(window_id);
DCHECK_OR_RETURN_VOID(prev_regular);
@@ -151,7 +155,7 @@ void StateControllerImpl::SetRegularState(
const mobile_apis::HMILevel::eType hmi_level,
const bool request_hmi_state_change) {
using namespace mobile_apis;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
HmiStatePtr prev_regular = app->RegularHmiState(window_id);
@@ -177,7 +181,7 @@ void StateControllerImpl::SetRegularState(
const mobile_apis::VideoStreamingState::eType video_state,
const mobile_apis::SystemContext::eType system_context,
const bool request_hmi_state_change) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
HmiStatePtr prev_regular = app->RegularHmiState(window_id);
@@ -199,7 +203,7 @@ void StateControllerImpl::SetRegularState(
ApplicationSharedPtr app,
const WindowID window_id,
const mobile_apis::HMILevel::eType hmi_level) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
HmiStatePtr prev_state = app->RegularHmiState(window_id);
HmiStatePtr hmi_state =
@@ -218,7 +222,7 @@ void StateControllerImpl::SetRegularState(
ApplicationSharedPtr app,
const WindowID window_id,
const mobile_apis::SystemContext::eType system_context) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
HmiStatePtr prev_regular = app->RegularHmiState(window_id);
DCHECK_OR_RETURN_VOID(prev_regular);
@@ -240,7 +244,7 @@ void StateControllerImpl::SetRegularState(
const WindowID window_id,
const mobile_apis::AudioStreamingState::eType audio_state,
const mobile_apis::VideoStreamingState::eType video_state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
HmiStatePtr prev_state = app->RegularHmiState(window_id);
DCHECK_OR_RETURN_VOID(prev_state);
@@ -258,7 +262,7 @@ void StateControllerImpl::SetRegularState(
void StateControllerImpl::SetRegularState(ApplicationSharedPtr app,
const WindowID window_id,
HmiStatePtr state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
DCHECK_OR_RETURN_VOID(state);
@@ -333,27 +337,25 @@ void StateControllerImpl::HmiLevelConflictResolver::operator()(
DCHECK_OR_RETURN_VOID(state_to_resolve);
// If applied HMI state is FULL:
- // - all NOT audio/video applications becomes BACKGROUND
+ // - all NOT audio/video applications become BACKGROUND
// - all audio/video applications with other app type
- // (navi, vc, media, projection) in FULL becomes LIMMITED
- // - all audio/video applications with same app type becomes BACKGROUND
+ // (navi, vc, media, projection) in FULL become LIMITED
+ // - all audio/video applications with the same app type become BACKGROUND
//
// If applied HMI state is LIMITED:
- // - all NOT audio/video applications saves their's HMI states
- // - all applications with other app types saves their's HMI states
- // - all audio/video applications with same app type becomes BACKGROUND
+ // - all NOT audio/video applications saves their HMI states
+ // - all applications with the other app types saves their HMI states
+ // - all audio/video applications with the same app type become BACKGROUND
if (!IsStreamableHMILevel(state_->hmi_level())) {
- LOG4CXX_DEBUG(logger_,
- "Applied for app " << applied_->app_id() << " HMI level "
+ SDL_LOG_DEBUG("Applied for app " << applied_->app_id() << " HMI level "
<< state_->hmi_level()
<< " is NOT streamable. Exit.");
return;
}
if (!IsStreamableHMILevel(state_to_resolve->hmi_level())) {
- LOG4CXX_DEBUG(logger_,
- "To resolve app " << app_to_resolve->app_id() << " HMI level "
+ SDL_LOG_DEBUG("To resolve app " << app_to_resolve->app_id() << " HMI level "
<< state_to_resolve->hmi_level()
<< " is NOT streamable. Exit.");
return;
@@ -394,7 +396,7 @@ void StateControllerImpl::HmiLevelConflictResolver::operator()(
result_video_state = mobile_apis::VideoStreamingState::STREAMABLE;
}
- mobile_apis::HMILevel::eType result_hmi_level = state_to_resolve->hmi_level();
+ mobile_apis::HMILevel::eType result_hmi_level;
using namespace helpers;
if (mobile_apis::VideoStreamingState::STREAMABLE == result_video_state ||
@@ -402,9 +404,17 @@ void StateControllerImpl::HmiLevelConflictResolver::operator()(
result_audio_state,
mobile_apis::AudioStreamingState::AUDIBLE,
mobile_apis::AudioStreamingState::ATTENUATED)) {
- result_hmi_level = mobile_apis::HMILevel::HMI_LIMITED;
+ result_hmi_level =
+ mobile_apis::PredefinedWindows::DEFAULT_WINDOW == window_id_ &&
+ applied_->IsFullscreen()
+ ? mobile_apis::HMILevel::HMI_LIMITED
+ : to_resolve_hmi_level;
} else {
- result_hmi_level = mobile_apis::HMILevel::HMI_BACKGROUND;
+ result_hmi_level =
+ mobile_apis::HMILevel::HMI_FULL == to_resolve_hmi_level &&
+ mobile_apis::HMILevel::HMI_FULL != applied_hmi_level
+ ? to_resolve_hmi_level
+ : mobile_apis::HMILevel::HMI_BACKGROUND;
}
if (std::make_tuple(to_resolve_hmi_level,
@@ -412,8 +422,7 @@ void StateControllerImpl::HmiLevelConflictResolver::operator()(
state_to_resolve->video_streaming_state()) !=
std::make_tuple(
result_hmi_level, result_audio_state, result_video_state)) {
- LOG4CXX_DEBUG(logger_,
- "Application " << app_to_resolve->app_id() << " window "
+ SDL_LOG_DEBUG("Application " << app_to_resolve->app_id() << " window "
<< window_id_ << " will change state to: "
<< "HMI level " << to_resolve_hmi_level
<< " --> " << result_hmi_level << ", audio "
@@ -427,8 +436,7 @@ void StateControllerImpl::HmiLevelConflictResolver::operator()(
result_audio_state,
result_video_state);
} else {
- LOG4CXX_DEBUG(logger_,
- "Application " << app_to_resolve->app_id() << " window "
+ SDL_LOG_DEBUG("Application " << app_to_resolve->app_id() << " window "
<< window_id_ << " will NOT change HMI level");
}
}
@@ -436,8 +444,8 @@ void StateControllerImpl::HmiLevelConflictResolver::operator()(
HmiStatePtr StateControllerImpl::ResolveHmiState(ApplicationSharedPtr app,
HmiStatePtr state) const {
using namespace mobile_apis;
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "State to resolve: " << *state);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("State to resolve: " << *state);
HmiStatePtr available_state =
CreateHmiState(app, HmiState::StateID::STATE_ID_REGULAR);
@@ -463,26 +471,28 @@ HmiStatePtr StateControllerImpl::ResolveHmiState(ApplicationSharedPtr app,
bool StateControllerImpl::IsResumptionAllowed(ApplicationSharedPtr app,
HmiStatePtr state) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace mobile_apis;
if (!app->is_resuming() || !IsStreamableHMILevel(state->hmi_level())) {
- LOG4CXX_DEBUG(logger_, "Application is not in resuming mode.");
+ SDL_LOG_DEBUG("Application is not in resuming mode.");
return true;
}
if (IsTempStateActive(HmiState::StateID::STATE_ID_AUDIO_SOURCE) &&
app->is_media_application()) {
- LOG4CXX_DEBUG(logger_,
- "Resumption for media app is not allowed. "
- << "AUDIO_SOURCE event is active");
+ SDL_LOG_DEBUG("Resumption for media app is not allowed. "
+ << "AUDIO_SOURCE event is active");
return false;
}
+ const bool is_navi_app = app->is_navi();
+ const bool is_mob_projection_app = app->mobile_projection_enabled();
+ const bool is_wep_app = app->webengine_projection_enabled();
+
if (IsTempStateActive(HmiState::StateID::STATE_ID_EMBEDDED_NAVI) &&
- (app->is_navi() || app->mobile_projection_enabled())) {
- LOG4CXX_DEBUG(logger_,
- "Resumption for navi or projection app is not allowed. "
- << "EMBEDDED_NAVI event is active");
+ (is_navi_app || is_mob_projection_app || is_wep_app)) {
+ SDL_LOG_DEBUG("Resumption for navi and projection apps is not allowed. "
+ << "EMBEDDED_NAVI event is active");
return false;
}
@@ -490,13 +500,13 @@ bool StateControllerImpl::IsResumptionAllowed(ApplicationSharedPtr app,
}
mobile_apis::HMILevel::eType StateControllerImpl::GetAvailableHmiLevel(
- ApplicationSharedPtr app, mobile_apis::HMILevel::eType hmi_level) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ ApplicationSharedPtr app,
+ mobile_apis::HMILevel::eType desired_hmi_level) const {
+ SDL_LOG_AUTO_TRACE();
- mobile_apis::HMILevel::eType result = hmi_level;
- LOG4CXX_DEBUG(logger_, "HMI Level: " << hmi_level);
+ mobile_apis::HMILevel::eType result = desired_hmi_level;
- if (!IsStreamableHMILevel(hmi_level)) {
+ if (!IsStreamableHMILevel(desired_hmi_level)) {
return result;
}
@@ -504,8 +514,11 @@ mobile_apis::HMILevel::eType StateControllerImpl::GetAvailableHmiLevel(
const bool does_audio_app_with_same_type_exist =
app_mngr_.IsAppTypeExistsInFullOrLimited(app);
- if (mobile_apis::HMILevel::HMI_LIMITED == hmi_level) {
+ if (mobile_apis::HMILevel::HMI_LIMITED == desired_hmi_level) {
if (!is_audio_app || does_audio_app_with_same_type_exist) {
+ SDL_LOG_DEBUG(
+ "Not audio application trying to resume in limited or "
+ "audio application with the same type active");
result = app_mngr_.GetDefaultHmiLevel(app);
}
return result;
@@ -516,20 +529,21 @@ mobile_apis::HMILevel::eType StateControllerImpl::GetAvailableHmiLevel(
(active_app.use_count() != 0) && active_app->app_id() != app->app_id();
if (is_audio_app) {
if (does_audio_app_with_same_type_exist) {
+ SDL_LOG_DEBUG("Audio application with the same type active");
result = app_mngr_.GetDefaultHmiLevel(app);
} else if (is_active_app_exist) {
result = mobile_apis::HMILevel::HMI_LIMITED;
} else if (app->is_navi() &&
IsTempStateActive(HmiState::StateID::STATE_ID_AUDIO_SOURCE)) {
- LOG4CXX_DEBUG(logger_,
- "Navigation app will be resumed to LIMITED, "
- "because of AUDIO_SOURCE ia active.");
+ SDL_LOG_DEBUG(
+ "Navigation app will be resumed to LIMITED, "
+ "because of AUDIO_SOURCE ia active.");
result = mobile_apis::HMILevel::HMI_LIMITED;
} else if (app->is_media_application() &&
IsTempStateActive(HmiState::StateID::STATE_ID_EMBEDDED_NAVI)) {
- LOG4CXX_DEBUG(logger_,
- "Media app will be resumed to LIMITED, "
- "because of EMBEDDED_NAVI is active.");
+ SDL_LOG_DEBUG(
+ "Media app will be resumed to LIMITED, "
+ "because of EMBEDDED_NAVI is active.");
result = mobile_apis::HMILevel::HMI_LIMITED;
}
} else if (is_active_app_exist) {
@@ -542,61 +556,63 @@ mobile_apis::HMILevel::eType StateControllerImpl::GetAvailableHmiLevel(
bool StateControllerImpl::IsStateAvailable(ApplicationSharedPtr app,
HmiStatePtr state) const {
using namespace mobile_apis;
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Checking state: " << *state);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Checking state: " << *state);
if (app->is_resuming()) {
return IsStateAvailableForResumption(app, state);
}
- if (IsTempStateActive(HmiState::StateID::STATE_ID_AUDIO_SOURCE) ||
- IsTempStateActive(HmiState::StateID::STATE_ID_EMBEDDED_NAVI)) {
- if (HMILevel::HMI_FULL == state->hmi_level()) {
- LOG4CXX_DEBUG(logger_,
- "AUDIO_SOURCE or EMBEDDED_NAVI is active."
- << " Requested state is not available");
+ if (HMILevel::HMI_FULL == state->hmi_level()) {
+ if (IsTempStateActive(HmiState::StateID::STATE_ID_AUDIO_SOURCE) &&
+ app->is_media_application()) {
+ SDL_LOG_DEBUG("Media app is not allowed to activate due"
+ << " to AUDIO_SOURCE event is active");
+ return false;
+ }
+
+ if (IsTempStateActive(HmiState::StateID::STATE_ID_EMBEDDED_NAVI) &&
+ app->is_navi()) {
+ SDL_LOG_DEBUG("Navi app is not allowed to activate due"
+ << " to EMBEDDED_NAVI event is active");
return false;
}
}
- LOG4CXX_DEBUG(logger_, "Requested state is available");
+ SDL_LOG_DEBUG("Requested state is available");
return true;
}
bool StateControllerImpl::IsStateAvailableForResumption(
ApplicationSharedPtr app, HmiStatePtr state) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace mobile_apis;
if (!app->is_resuming() || !IsStreamableHMILevel(state->hmi_level())) {
- LOG4CXX_DEBUG(logger_,
- "Application is not in resuming mode."
- << " Requested state is available");
+ SDL_LOG_DEBUG("Application is not in resuming mode."
+ << " Requested state is available");
return true;
}
if (IsTempStateActive(HmiState::StateID::STATE_ID_VR_SESSION) ||
IsTempStateActive(HmiState::StateID::STATE_ID_SAFETY_MODE)) {
- LOG4CXX_DEBUG(logger_,
- "Requested state is not available. "
- << "VR session or emergency event is active");
+ SDL_LOG_DEBUG("Requested state is not available. "
+ << "VR session or emergency event is active");
return false;
}
if (IsTempStateActive(HmiState::StateID::STATE_ID_PHONE_CALL) &&
app->is_media_application()) {
- LOG4CXX_DEBUG(logger_,
- "Requested state for media application "
- << "is not available. Phone call is active");
+ SDL_LOG_DEBUG("Requested state for media application "
+ << "is not available. Phone call is active");
return false;
}
if (IsTempStateActive(HmiState::StateID::STATE_ID_DEACTIVATE_HMI)) {
- LOG4CXX_DEBUG(logger_,
- "Requested state is not available. "
- << "Deactivate HMI event is active");
+ SDL_LOG_DEBUG("Requested state is not available. "
+ << "Deactivate HMI event is active");
return false;
}
- LOG4CXX_DEBUG(logger_, "Requested state is available");
+ SDL_LOG_DEBUG("Requested state is available");
return true;
}
@@ -604,10 +620,9 @@ void StateControllerImpl::SetupRegularHmiState(ApplicationSharedPtr app,
const WindowID window_id,
HmiStatePtr state) {
using namespace mobile_apis;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(state);
- LOG4CXX_DEBUG(logger_,
- "Setup window #" << window_id << " regular state: " << *state);
+ SDL_LOG_DEBUG("Setup window #" << window_id << " regular state: " << *state);
HmiStatePtr curr_state = app->CurrentHmiState(window_id);
HmiStatePtr old_state =
CreateHmiState(app, HmiState::StateID::STATE_ID_REGULAR);
@@ -621,9 +636,8 @@ void StateControllerImpl::SetupRegularHmiState(ApplicationSharedPtr app,
if (mobile_apis::PredefinedWindows::DEFAULT_WINDOW == window_id &&
HMILevel::HMI_LIMITED == state->hmi_level() && app->is_resuming()) {
- LOG4CXX_DEBUG(logger_,
- "Resuming to LIMITED level. "
- << "Send OnResumeAudioSource notification");
+ SDL_LOG_DEBUG("Resuming to LIMITED level. "
+ << "Send OnResumeAudioSource notification");
MessageHelper::SendOnResumeAudioSourceToHMI(app->app_id(), app_mngr_);
}
@@ -637,7 +651,7 @@ void StateControllerImpl::SetupRegularHmiState(
const mobile_apis::HMILevel::eType hmi_level,
const mobile_apis::AudioStreamingState::eType audio_state,
const mobile_apis::VideoStreamingState::eType video_state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
HmiStatePtr prev_state = app->RegularHmiState(window_id);
DCHECK_OR_RETURN_VOID(prev_state);
@@ -655,39 +669,36 @@ void StateControllerImpl::SetupRegularHmiState(
void StateControllerImpl::ApplyRegularState(ApplicationSharedPtr app,
const WindowID window_id,
HmiStatePtr state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
DCHECK_OR_RETURN_VOID(state);
DCHECK_OR_RETURN_VOID(state->state_id() == HmiState::STATE_ID_REGULAR);
- LOG4CXX_DEBUG(logger_,
- "Applying to app " << app->app_id() << " window #" << window_id
+ SDL_LOG_DEBUG("Applying to app " << app->app_id() << " window #" << window_id
<< " state " << *state);
SetupRegularHmiState(app, window_id, state);
if (mobile_apis::PredefinedWindows::DEFAULT_WINDOW != window_id) {
- LOG4CXX_DEBUG(logger_, "No need to resolve conflicts for a widget");
+ SDL_LOG_DEBUG("No need to resolve conflicts for a widget");
return;
}
- LOG4CXX_DEBUG(logger_,
- "Resolving HMI level conflicts for app " << app->app_id());
+ SDL_LOG_DEBUG("Resolving HMI level conflicts for app " << app->app_id());
ForEachApplication(HmiLevelConflictResolver(app, window_id, state, this));
}
void StateControllerImpl::UpdateAppWindowsStreamingState(
ApplicationSharedPtr app, HmiStatePtr state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto window_ids = app->GetWindowIds();
for (auto window_id : window_ids) {
HmiStatePtr window_hmi_state = app->RegularHmiState(window_id);
- LOG4CXX_DEBUG(
- logger_, "State: " << *state << " window state: " << *window_hmi_state);
+ SDL_LOG_DEBUG("State: " << *state
+ << " window state: " << *window_hmi_state);
if (window_hmi_state->audio_streaming_state() !=
state->audio_streaming_state() ||
window_hmi_state->video_streaming_state() !=
state->video_streaming_state()) {
- LOG4CXX_DEBUG(logger_,
- "Updating streaming state for window #" << window_id);
+ SDL_LOG_DEBUG("Updating streaming state for window #" << window_id);
HmiStatePtr new_window_state =
CreateHmiState(app, HmiState::StateID::STATE_ID_REGULAR);
@@ -701,12 +712,60 @@ void StateControllerImpl::UpdateAppWindowsStreamingState(
new_window_state->set_window_type(window_hmi_state->window_type());
app->SetRegularState(window_id, new_window_state);
- MessageHelper::SendHMIStatusNotification(app, window_id, app_mngr_);
+ auto notification =
+ MessageHelper::CreateHMIStatusNotification(app, window_id);
+ app_mngr_.GetRPCService().ManageMobileCommand(
+ notification, commands::Command::SOURCE_SDL);
}
}
}
-void StateControllerImpl::on_event(const event_engine::MobileEvent& event) {}
+void StateControllerImpl::on_event(const event_engine::MobileEvent& event) {
+ using namespace mobile_apis;
+
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Received event for function" << event.id());
+ switch (event.id()) {
+ case FunctionID::RegisterAppInterfaceID: {
+ auto message = event.smart_object();
+ uint32_t connection_key =
+ message[strings::params][strings::connection_key].asUInt();
+ ApplicationSharedPtr app = app_mngr_.application(connection_key);
+
+ if (app.use_count() == 0) {
+ SDL_LOG_WARN("Application doesn't exist");
+ return;
+ }
+ {
+ sync_primitives::AutoLock autolock(
+ apps_with_pending_hmistatus_notification_lock_);
+
+ auto it = apps_with_pending_hmistatus_notification_.find(app->app_id());
+ if (it == apps_with_pending_hmistatus_notification_.end()) {
+ SDL_LOG_WARN("Application does not have a pending OnHMIStatus");
+ return;
+ }
+
+ bool success = message[strings::msg_params][strings::success].asBool();
+ if (success) {
+ // Only send notification if RAI was a success
+ auto notification =
+ MessageHelper::CreateHMIStatusNotification(app, 0);
+ app_mngr_.GetRPCService().ManageMobileCommand(
+ notification, commands::Command::SOURCE_SDL);
+ }
+
+ apps_with_pending_hmistatus_notification_.erase(app->app_id());
+ if (apps_with_pending_hmistatus_notification_.empty()) {
+ unsubscribe_from_event(FunctionID::RegisterAppInterfaceID);
+ }
+ }
+ } break;
+
+ default:
+ break;
+ }
+}
void StateControllerImpl::on_event(const event_engine::Event& event) {
using event_engine::Event;
@@ -714,7 +773,7 @@ void StateControllerImpl::on_event(const event_engine::Event& event) {
using namespace hmi_apis;
namespace FunctionID = hmi_apis::FunctionID;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const SmartObject& message = event.smart_object();
const FunctionID::eType id = static_cast<FunctionID::eType>(event.id());
switch (id) {
@@ -750,11 +809,11 @@ void StateControllerImpl::on_event(const event_engine::Event& event) {
case FunctionID::BasicCommunication_OnEventChanged: {
bool is_active =
message[strings::msg_params][hmi_notification::is_active].asBool();
- const uint32_t id =
+ const uint32_t event_id =
message[strings::msg_params][hmi_notification::event_name].asUInt();
// TODO(AOleynik): Add verification/conversion check here
const Common_EventTypes::eType state_id =
- static_cast<Common_EventTypes::eType>(id);
+ static_cast<Common_EventTypes::eType>(event_id);
if (is_active) {
if (Common_EventTypes::AUDIO_SOURCE == state_id) {
ApplyTempState<HmiState::STATE_ID_AUDIO_SOURCE>();
@@ -799,8 +858,7 @@ void StateControllerImpl::on_event(const event_engine::Event& event) {
}
}
- LOG4CXX_WARN(logger_,
- "Couldn't recognize state id (val='" << state_id << "')");
+ SDL_LOG_WARN("Couldn't recognize state id (val='" << state_id << "')");
break;
}
default:
@@ -809,7 +867,7 @@ void StateControllerImpl::on_event(const event_engine::Event& event) {
}
void StateControllerImpl::ActivateDefaultWindow(ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace mobile_apis;
const WindowID window_id = PredefinedWindows::DEFAULT_WINDOW;
@@ -823,15 +881,15 @@ void StateControllerImpl::ActivateDefaultWindow(ApplicationSharedPtr app) {
SetRegularState(app, window_id, hmi_level, audio_state, video_state, false);
- // After main window activation, streaming state should be updated for another
- // windows of the app
+ // After main window activation, streaming state should be updated for
+ // another windows of the app
HmiStatePtr new_state =
app->RegularHmiState(PredefinedWindows::DEFAULT_WINDOW);
UpdateAppWindowsStreamingState(app, new_state);
}
void StateControllerImpl::ExitDefaultWindow(ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace mobile_apis;
const WindowID window_id = PredefinedWindows::DEFAULT_WINDOW;
@@ -854,26 +912,46 @@ void StateControllerImpl::OnStateChanged(ApplicationSharedPtr app,
const WindowID window_id,
HmiStatePtr old_state,
HmiStatePtr new_state) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
DCHECK_OR_RETURN_VOID(old_state);
DCHECK_OR_RETURN_VOID(new_state);
- LOG4CXX_DEBUG(logger_,
- "Window #" << window_id << " old state: " << *old_state);
- LOG4CXX_DEBUG(logger_,
- "Window #" << window_id << " new state: " << *new_state);
+ SDL_LOG_DEBUG("Window #" << window_id << " old state: " << *old_state);
+ SDL_LOG_DEBUG("Window #" << window_id << " new state: " << *new_state);
- if (!IsStateChanged(*old_state, *new_state)) {
- LOG4CXX_DEBUG(logger_, "State has NOT been changed.");
+ if ((new_state->hmi_level() == mobile_apis::HMILevel::INVALID_ENUM) &&
+ (old_state->hmi_level() == mobile_apis::HMILevel::INVALID_ENUM)) {
+ SDL_LOG_DEBUG("HMI level is invalid data.");
return;
}
- MessageHelper::SendHMIStatusNotification(app, window_id, app_mngr_);
+ if (!IsStateChanged(*old_state, *new_state)) {
+ SDL_LOG_DEBUG("State has NOT been changed.");
+ return;
+ }
+ if (app->is_ready()) {
+ SDL_LOG_DEBUG("Sending OnHMIStatus to application " << app->app_id());
+ auto notification =
+ MessageHelper::CreateHMIStatusNotification(app, window_id);
+ app_mngr_.GetRPCService().ManageMobileCommand(
+ notification, commands::Command::SOURCE_SDL);
+ } else {
+ SDL_LOG_DEBUG(
+ "Application "
+ << app->app_id()
+ << " not ready to receive OnHMIStatus. Delaying notification");
+ {
+ sync_primitives::AutoLock autolock(
+ apps_with_pending_hmistatus_notification_lock_);
+ apps_with_pending_hmistatus_notification_.insert(app->app_id());
+ }
+ subscribe_on_event(mobile_apis::FunctionID::RegisterAppInterfaceID);
+ }
if (mobile_apis::PredefinedWindows::DEFAULT_WINDOW != window_id) {
- LOG4CXX_DEBUG(logger_,
- "State was changed not for a main application window. No "
- "additional actions required");
+ SDL_LOG_DEBUG(
+ "State was changed not for a main application window. No "
+ "additional actions required");
return;
}
@@ -883,6 +961,19 @@ void StateControllerImpl::OnStateChanged(ApplicationSharedPtr app,
app_mngr_.OnHMIStateChanged(app->app_id(), old_state, new_state);
app->usage_report().RecordHmiStateChanged(new_state->hmi_level());
+
+ if (mobile_apis::HMILevel::INVALID_ENUM == old_state->hmi_level()) {
+ const auto app_default_hmi_level = app_mngr_.GetDefaultHmiLevel(app);
+ if (app_default_hmi_level == new_state->hmi_level()) {
+ const uint32_t app_id = app->app_id();
+ const uint32_t corr_id =
+ postponed_activation_controller_.GetPendingActivationCorrId(app_id);
+ if (corr_id > 0) {
+ app_mngr_.GetPolicyHandler().OnActivateApp(app_id, corr_id);
+ postponed_activation_controller_.RemoveAppToActivate(app_id);
+ }
+ }
+ }
}
bool StateControllerImpl::IsTempStateActive(HmiState::StateID id) const {
@@ -890,12 +981,52 @@ bool StateControllerImpl::IsTempStateActive(HmiState::StateID id) const {
return helpers::in_range(active_states_, id);
}
+void StateControllerImpl::ResumePostponedWindows(const uint32_t app_id) {
+ SDL_LOG_AUTO_TRACE();
+
+ auto it_postponed_windows = postponed_app_widgets_.find(app_id);
+ if (it_postponed_windows != postponed_app_widgets_.end()) {
+ const WindowStatePairs& window_pairs = it_postponed_windows->second;
+ SDL_LOG_DEBUG("Application " << app_id << " has " << window_pairs.size()
+ << " postponed windows. Restoring...");
+
+ auto application = app_mngr_.application(app_id);
+ if (!application) {
+ SDL_LOG_ERROR("Application " << app_id << " is not registered");
+ postponed_app_widgets_.erase(it_postponed_windows);
+ return;
+ }
+
+ for (const WindowStatePair& pair : window_pairs) {
+ const WindowID window_id = pair.first;
+ HmiStatePtr postponed_state = pair.second;
+
+ OnAppWindowAdded(application,
+ window_id,
+ postponed_state->window_type(),
+ postponed_state->hmi_level());
+ }
+
+ postponed_app_widgets_.erase(it_postponed_windows);
+ }
+}
+
+void StateControllerImpl::DropPostponedWindows(const uint32_t app_id) {
+ SDL_LOG_AUTO_TRACE();
+ auto it_postponed_windows = postponed_app_widgets_.find(app_id);
+ if (it_postponed_windows != postponed_app_widgets_.end()) {
+ SDL_LOG_DEBUG("Dropping postponed windows information for application "
+ << app_id);
+ postponed_app_widgets_.erase(it_postponed_windows);
+ }
+}
+
void StateControllerImpl::OnApplicationRegistered(
ApplicationSharedPtr app,
const mobile_apis::HMILevel::eType default_level) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- // After app registration HMI level should be set for DEFAUL_WINDOW only
+ // After app registration HMI level should be set for DEFAULT_WINDOW only
OnAppWindowAdded(app,
mobile_apis::PredefinedWindows::DEFAULT_WINDOW,
mobile_apis::WindowType::MAIN,
@@ -910,9 +1041,28 @@ void StateControllerImpl::OnAppWindowAdded(
namespace HMILevel = mobile_apis::HMILevel;
namespace AudioStreamingState = mobile_apis::AudioStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
+ if (mobile_apis::WindowType::WIDGET == window_type) {
+ auto main_state =
+ app->CurrentHmiState(mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
+ if (mobile_apis::HMILevel::INVALID_ENUM == main_state->hmi_level()) {
+ SDL_LOG_DEBUG("Application " << app->app_id()
+ << " is not registered. Widget with ID: "
+ << window_id << " has been postponed");
+
+ HmiStatePtr postponed_state =
+ CreateHmiState(app, HmiState::StateID::STATE_ID_REGULAR);
+ postponed_state->set_window_type(window_type);
+ postponed_state->set_hmi_level(default_level);
+
+ WindowStatePair pair = std::make_pair(window_id, postponed_state);
+ postponed_app_widgets_[app->app_id()].push_back(pair);
+ return;
+ }
+ }
+
{
sync_primitives::AutoLock lck(active_states_lock_);
for (const auto state_id : active_states_) {
@@ -949,7 +1099,7 @@ int64_t StateControllerImpl::RequestHMIStateChange(
ApplicationConstSharedPtr app,
hmi_apis::Common_HMILevel::eType level,
bool send_policy_priority) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
smart_objects::SmartObjectSPtr request = NULL;
if (hmi_apis::Common_HMILevel::NONE == level) {
request = MessageHelper::GetBCCloseApplicationRequestToHMI(app, app_mngr_);
@@ -962,11 +1112,11 @@ int64_t StateControllerImpl::RequestHMIStateChange(
app_mngr_);
}
if (!request) {
- LOG4CXX_ERROR(logger_, "Unable to create request");
+ SDL_LOG_ERROR("Unable to create request");
return -1;
}
if (!app_mngr_.GetRPCService().ManageHMICommand(request)) {
- LOG4CXX_ERROR(logger_, "Unable to send request");
+ SDL_LOG_ERROR("Unable to send request");
return -1;
}
const uint32_t corr_id =
@@ -975,7 +1125,7 @@ int64_t StateControllerImpl::RequestHMIStateChange(
}
void StateControllerImpl::ApplyPostponedStateForApp(ApplicationSharedPtr app) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
const WindowIds window_ids = app->GetWindowIds();
@@ -990,7 +1140,7 @@ void StateControllerImpl::ApplyPostponedStateForApp(ApplicationSharedPtr app) {
}
void StateControllerImpl::TempStateStarted(HmiState::StateID id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
{
sync_primitives::AutoLock autolock(active_states_lock_);
@@ -1000,11 +1150,11 @@ void StateControllerImpl::TempStateStarted(HmiState::StateID id) {
}
}
- LOG4CXX_ERROR(logger_, "StateID '" << id << "' is already active");
+ SDL_LOG_ERROR("StateID '" << id << "' is already active");
}
void StateControllerImpl::TempStateStopped(HmiState::StateID ID) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
{
sync_primitives::AutoLock autolock(active_states_lock_);
active_states_.remove(ID);
@@ -1016,15 +1166,14 @@ void StateControllerImpl::TempStateStopped(HmiState::StateID ID) {
void StateControllerImpl::DeactivateApp(ApplicationSharedPtr app,
const WindowID window_id) {
using namespace mobile_apis;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(app);
const HmiStatePtr regular = app->RegularHmiState(window_id);
DCHECK_OR_RETURN_VOID(regular);
HmiStatePtr new_regular = std::make_shared<HmiState>(*regular);
- LOG4CXX_DEBUG(logger_,
- "Window #" << window_id << " current HMI level: '"
+ SDL_LOG_DEBUG("Window #" << window_id << " current HMI level: '"
<< app->hmi_level(window_id) << "'");
const bool is_audio_app = app->IsAudioApplication();
const bool is_video_app = app->IsVideoApplication();
@@ -1076,12 +1225,12 @@ void StateControllerImpl::OnHMIResponse(
void StateControllerImpl::OnAppActivated(
const smart_objects::SmartObject& message) {
using namespace mobile_apis;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t app_id = message[strings::msg_params][strings::app_id].asUInt();
ApplicationSharedPtr app = app_mngr_.application(app_id);
if (!app) {
- LOG4CXX_ERROR(logger_, "Application with id " << app_id << " not found");
+ SDL_LOG_ERROR("Application with id " << app_id << " not found");
return;
}
@@ -1092,9 +1241,8 @@ void StateControllerImpl::OnAppActivated(
const auto window_ids = app->GetWindowIds();
if (!helpers::in_range(window_ids, window_id)) {
- LOG4CXX_ERROR(
- logger_,
- "Application " << app_id << " does not contain window #" << window_id);
+ SDL_LOG_ERROR("Application " << app_id << " does not contain window #"
+ << window_id);
return;
}
@@ -1117,12 +1265,12 @@ void StateControllerImpl::OnAppActivated(
void StateControllerImpl::OnAppDeactivated(
const smart_objects::SmartObject& message) {
using namespace mobile_apis;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t app_id = message[strings::msg_params][strings::app_id].asUInt();
ApplicationSharedPtr app = app_mngr_.application(app_id);
if (!app) {
- LOG4CXX_ERROR(logger_, "Application with id " << app_id << " not found");
+ SDL_LOG_ERROR("Application with id " << app_id << " not found");
return;
}
@@ -1133,9 +1281,8 @@ void StateControllerImpl::OnAppDeactivated(
const auto window_ids = app->GetWindowIds();
if (!helpers::in_range(window_ids, window_id)) {
- LOG4CXX_ERROR(
- logger_,
- "Application " << app_id << " does not contain window #" << window_id);
+ SDL_LOG_ERROR("Application " << app_id << " does not contain window #"
+ << window_id);
return;
}
@@ -1156,8 +1303,8 @@ void StateControllerImpl::OnAppDeactivated(
return;
}
- // TODO(AOleynik): Need to delete DeactivateReason and modify OnAppDeactivated
- // when HMI will support that, otherwise won't be testable
+ // TODO(AOleynik): Need to delete DeactivateReason and modify
+ // OnAppDeactivated when HMI will support that, otherwise won't be testable
DeactivateApp(app, window_id);
}
@@ -1180,7 +1327,7 @@ void StateControllerImpl::OnVideoStreamingStopped(
}
bool StateControllerImpl::IsStateActive(HmiState::StateID state_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
switch (state_id) {
case HmiState::STATE_ID_CURRENT:
case HmiState::STATE_ID_REGULAR:
@@ -1194,7 +1341,7 @@ bool StateControllerImpl::IsStateActive(HmiState::StateID state_id) const {
HmiStatePtr StateControllerImpl::CreateHmiState(
std::shared_ptr<Application> app, HmiState::StateID state_id) const {
using namespace utils;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
HmiStatePtr new_state;
switch (state_id) {
case HmiState::STATE_ID_PHONE_CALL: {
@@ -1242,7 +1389,7 @@ HmiStatePtr StateControllerImpl::CreateHmiState(
break;
}
default:
- LOG4CXX_FATAL(logger_, "Invalid state_id " << state_id);
+ SDL_LOG_FATAL("Invalid state_id " << state_id);
NOTREACHED();
break;
}
@@ -1257,10 +1404,9 @@ mobile_apis::AudioStreamingState::eType StateControllerImpl::CalcAudioState(
state = mobile_apis::AudioStreamingState::AUDIBLE;
}
- LOG4CXX_DEBUG(logger_,
- "Calculated audio state of app "
- << app->app_id() << " for " << hmi_level << " HMI level is "
- << state);
+ SDL_LOG_DEBUG("Calculated audio state of app "
+ << app->app_id() << " for " << hmi_level << " HMI level is "
+ << state);
return state;
}
@@ -1268,15 +1414,20 @@ mobile_apis::VideoStreamingState::eType StateControllerImpl::CalcVideoState(
ApplicationSharedPtr app,
const mobile_apis::HMILevel::eType hmi_level) const {
auto state = mobile_apis::VideoStreamingState::NOT_STREAMABLE;
- if (IsStreamableHMILevel(hmi_level) && app->IsVideoApplication()) {
+
+ if (app->IsVideoApplication() && IsStreamableHMILevel(hmi_level)) {
state = mobile_apis::VideoStreamingState::STREAMABLE;
}
- LOG4CXX_DEBUG(logger_,
- "Calculated video state of app "
- << app->app_id() << " for " << hmi_level << " HMI level is "
- << state);
+ SDL_LOG_DEBUG("Calculated video state of app "
+ << app->app_id() << " for " << hmi_level << " HMI level is "
+ << state);
return state;
}
+PostponedActivationController&
+StateControllerImpl::GetPostponedActivationController() {
+ return postponed_activation_controller_;
+}
+
} // namespace application_manager
diff --git a/src/components/application_manager/src/system_time/system_time_handler_impl.cc b/src/components/application_manager/src/system_time/system_time_handler_impl.cc
index deb92d5d81..3aee6d7e21 100644
--- a/src/components/application_manager/src/system_time/system_time_handler_impl.cc
+++ b/src/components/application_manager/src/system_time/system_time_handler_impl.cc
@@ -41,7 +41,7 @@
namespace application_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "SystemTimeHandler")
+SDL_CREATE_LOG_VARIABLE("SystemTimeHandler")
SystemTimeHandlerImpl::SystemTimeHandlerImpl(
ApplicationManager& application_manager)
@@ -51,66 +51,65 @@ SystemTimeHandlerImpl::SystemTimeHandlerImpl(
, last_time_(0)
, system_time_listener_(NULL)
, app_manager_(application_manager) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
subscribe_on_event(
hmi_apis::FunctionID::BasicCommunication_OnSystemTimeReady);
}
SystemTimeHandlerImpl::~SystemTimeHandlerImpl() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
unsubscribe_from_all_hmi_events();
}
void SystemTimeHandlerImpl::DoSystemTimeQuery() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace application_manager;
sync_primitives::AutoLock lock(state_lock_);
if (!utc_time_can_be_received_) {
- LOG4CXX_INFO(logger_,
- "Navi module is not yet ready."
- << "Will process request once it became ready.");
+ SDL_LOG_INFO("Navi module is not yet ready."
+ << " Will process request once it became ready.");
return;
}
SendTimeRequest();
}
void SystemTimeHandlerImpl::DoSubscribe(utils::SystemTimeListener* listener) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(listener);
sync_primitives::AutoLock lock(system_time_listener_lock_);
system_time_listener_ = listener;
}
void SystemTimeHandlerImpl::ResetPendingSystemTimeRequests() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
unsubscribe_from_event(
hmi_apis::FunctionID::BasicCommunication_GetSystemTime);
awaiting_get_system_time_ = false;
}
void SystemTimeHandlerImpl::DoUnsubscribe(utils::SystemTimeListener* listener) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(system_time_listener_lock_);
system_time_listener_ = NULL;
}
time_t SystemTimeHandlerImpl::FetchSystemTime() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return last_time_;
}
bool SystemTimeHandlerImpl::utc_time_can_be_received() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(state_lock_);
return utc_time_can_be_received_;
}
void SystemTimeHandlerImpl::SendTimeRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (awaiting_get_system_time_) {
- LOG4CXX_WARN(logger_, "Another GetSystemTime request in progress. Skipped");
+ SDL_LOG_WARN("Another GetSystemTime request in progress. Skipped");
return;
}
@@ -124,7 +123,7 @@ void SystemTimeHandlerImpl::SendTimeRequest() {
void SystemTimeHandlerImpl::on_event(
const application_manager::event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace application_manager;
using namespace hmi_apis::FunctionID;
switch (event.id()) {
@@ -135,13 +134,13 @@ void SystemTimeHandlerImpl::on_event(
ProcessSystemTimeResponse(event);
break;
default:
- LOG4CXX_ERROR(logger_, "Unknown Event received");
+ SDL_LOG_ERROR("Unknown Event received");
break;
}
}
void SystemTimeHandlerImpl::ProcessSystemTimeReadyNotification() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(state_lock_);
utc_time_can_be_received_ = true;
unsubscribe_from_event(
@@ -150,7 +149,7 @@ void SystemTimeHandlerImpl::ProcessSystemTimeReadyNotification() {
void SystemTimeHandlerImpl::ProcessSystemTimeResponse(
const application_manager::event_engine::Event& event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const smart_objects::SmartObject& message = event.smart_object();
const auto result = static_cast<hmi_apis::Common_Result::eType>(
diff --git a/src/components/application_manager/test/CMakeLists.txt b/src/components/application_manager/test/CMakeLists.txt
index 230be524c8..c9c9a80391 100755
--- a/src/components/application_manager/test/CMakeLists.txt
+++ b/src/components/application_manager/test/CMakeLists.txt
@@ -47,6 +47,7 @@ include_directories(
${COMPONENTS_DIR}/application_manager/test/include/
${COMPONENTS_DIR}/application_manager/rpc_plugins/sdl_rpc_plugin/include/
${COMPONENTS_DIR}/application_manager/rpc_plugins/vehicle_info_plugin/include/
+ ${COMPONENTS_DIR}/application_manager/rpc_plugins/rc_rpc_plugin/include/
${BSON_INCLUDE_DIRECTORY}
)
@@ -69,6 +70,7 @@ set(testSources
${AM_TEST_DIR}/rpc_passing_handler_test.cc
${AM_TEST_DIR}/application_manager_impl_test.cc
${AM_TEST_DIR}/application_helper_test.cc
+ ${AM_TEST_DIR}/rpc_service_impl_test.cc
${AM_TEST_DIR}/command_holder_test.cc
)
@@ -157,7 +159,7 @@ set(ResumptionData_SOURCES
${AM_TEST_DIR}/mock_message_helper.cc
)
-file(COPY hmi_capabilities.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+file(COPY ${CMAKE_SOURCE_DIR}/src/appMain/hmi_capabilities.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY hmi_capabilities_sc1.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY hmi_capabilities_sc2.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY hmi_capabilities_old_apt.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
diff --git a/src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc b/src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc
index b3bb8dd705..08868a239f 100644
--- a/src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc
+++ b/src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc
@@ -37,6 +37,7 @@
#include "application_manager/mock_application.h"
#include "application_manager/mock_application_manager.h"
#include "application_manager/mock_resume_ctrl.h"
+#include "application_manager/resumption/resumption_data_processor.h"
#include "connection_handler/mock_connection_handler.h"
#include "gtest/gtest.h"
#include "utils/macro.h"
@@ -162,7 +163,7 @@ class AppLaunchCtrlTest : public ::testing::Test {
NiceMock<am_test::MockApplicationManager> app_mngr_mock_;
NiceMock<app_launch_test::AppLaunchDataMock> app_launch_data_mock_;
NiceMock<ch_test::MockConnectionHandler> connection_handler_mock_;
- NiceMock<resumprion_test::MockResumeCtrl> resume_ctrl_mock_;
+ NiceMock<resumption_test::MockResumeCtrl> resume_ctrl_mock_;
NiceMock<app_launch_test::MockAppLaunchSettings> settings_;
std::unique_ptr<app_launch::AppLaunchCtrlImpl> app_launch_ctrl_;
};
diff --git a/src/components/application_manager/test/application_helper_test.cc b/src/components/application_manager/test/application_helper_test.cc
index ec84acc697..4c451ab072 100644
--- a/src/components/application_manager/test/application_helper_test.cc
+++ b/src/components/application_manager/test/application_helper_test.cc
@@ -151,10 +151,12 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectAppDataReset) {
const uint32_t choice_set_id = 3;
const mobile_apis::ButtonName::eType button = mobile_apis::ButtonName::AC;
- smart_objects::SmartObject cmd;
+ smart_objects::SmartObject cmd(smart_objects::SmartType_Map);
cmd[strings::msg_params][strings::cmd_id] = cmd_id;
cmd[strings::msg_params][strings::vr_commands][0] = "vrCmd";
cmd[strings::msg_params][strings::menu_id] = menu_id;
+ cmd[strings::menu_params] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
cmd[strings::msg_params][strings::interaction_choice_set_id] = choice_set_id;
app_impl_->AddCommand(cmd_id, cmd[strings::msg_params]);
@@ -182,9 +184,12 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectAppDataReset) {
app_impl_->AddFile(file);
- EXPECT_TRUE(NULL != app_impl_->FindCommand(cmd_id));
- EXPECT_TRUE(NULL != app_impl_->FindSubMenu(menu_id));
- EXPECT_TRUE(NULL != app_impl_->FindChoiceSet(choice_set_id));
+ const auto command1 = app_impl_->FindCommand(cmd_id);
+ EXPECT_TRUE(smart_objects::SmartType_Null != command1.getType());
+ const auto sub_menu1 = app_impl_->FindSubMenu(menu_id);
+ EXPECT_TRUE(smart_objects::SmartType_Null != sub_menu1.getType());
+ const auto choice_set1 = app_impl_->FindChoiceSet(choice_set_id);
+ EXPECT_TRUE(smart_objects::SmartType_Null != choice_set1.getType());
EXPECT_TRUE(app_impl_->IsSubscribedToButton(button));
auto help_prompt = app_impl_->help_prompt();
EXPECT_TRUE(help_prompt->asString() == some_string);
@@ -204,11 +209,24 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectAppDataReset) {
EXPECT_TRUE(NULL != file_ptr);
EXPECT_TRUE(file_ptr->file_name == filename);
+ EXPECT_CALL(*mock_message_helper_, CreateUnsubscribeWayPointsRequest(_))
+ .WillOnce(Return(std::make_shared<smart_objects::SmartObject>()));
+
+ EXPECT_CALL(*mock_message_helper_, CreateDeleteUICommandRequest(_, _, _))
+ .WillOnce(Return(std::make_shared<smart_objects::SmartObject>()));
+
+ EXPECT_CALL(*mock_message_helper_, CreateDeleteVRCommandRequest(_, _, _))
+ .WillOnce(Return(std::make_shared<smart_objects::SmartObject>()));
+
// Act
application_manager::DeleteApplicationData(app_impl_, app_manager_impl_);
- EXPECT_FALSE(NULL != app_impl_->FindCommand(cmd_id));
- EXPECT_FALSE(NULL != app_impl_->FindSubMenu(menu_id));
- EXPECT_FALSE(NULL != app_impl_->FindChoiceSet(choice_set_id));
+
+ const auto command2 = app_impl_->FindCommand(cmd_id);
+ EXPECT_TRUE(smart_objects::SmartType_Null == command2.getType());
+ const auto sub_menu2 = app_impl_->FindSubMenu(menu_id);
+ EXPECT_TRUE(smart_objects::SmartType_Null == sub_menu2.getType());
+ const auto choice_set2 = app_impl_->FindChoiceSet(choice_set_id);
+ EXPECT_TRUE(smart_objects::SmartType_Null == choice_set2.getType());
EXPECT_FALSE(app_impl_->IsSubscribedToButton(button));
help_prompt = app_impl_->help_prompt();
EXPECT_FALSE(help_prompt->asString() == some_string);
@@ -243,9 +261,14 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectHMICleanupRequests) {
app_impl_->AddChoiceSet(choice_set_id, cmd[strings::msg_params]);
app_impl_->SubscribeToButton(mobile_apis::ButtonName::AC);
- EXPECT_CALL(*mock_message_helper_, SendUnsubscribedWayPoints(_));
+ EXPECT_CALL(*mock_message_helper_, CreateUnsubscribeWayPointsRequest(_))
+ .WillOnce(Return(std::make_shared<smart_objects::SmartObject>()));
+
+ EXPECT_CALL(*mock_message_helper_, CreateDeleteUICommandRequest(_, _, _))
+ .WillOnce(Return(std::make_shared<smart_objects::SmartObject>()));
- EXPECT_CALL(*mock_message_helper_, SendDeleteCommandRequest(_, _, _));
+ EXPECT_CALL(*mock_message_helper_, CreateDeleteVRCommandRequest(_, _, _))
+ .WillOnce(Return(std::make_shared<smart_objects::SmartObject>()));
EXPECT_CALL(*mock_message_helper_, SendDeleteSubmenuRequest(_, _, _));
diff --git a/src/components/application_manager/test/application_impl_test.cc b/src/components/application_manager/test/application_impl_test.cc
index 11578f19d6..d468c9790b 100644
--- a/src/components/application_manager/test/application_impl_test.cc
+++ b/src/components/application_manager/test/application_impl_test.cc
@@ -47,6 +47,7 @@
#include "application_manager/mock_resume_ctrl.h"
#include "application_manager/policies/mock_policy_handler_interface.h"
#include "application_manager/resumption/resume_ctrl.h"
+#include "application_manager/resumption/resumption_data_processor.h"
#include "application_manager/state_controller.h"
#include "policy/usage_statistics/mock_statistics_manager.h"
#include "resumption/last_state.h"
@@ -260,8 +261,8 @@ TEST_F(ApplicationImplTest, AddStates_RemoveNotLastNotFirstState) {
app_impl->RemoveHMIState(kDefaultWindowId, state2->state_id());
HmiStatePtr current_state = app_impl->CurrentHmiState(kDefaultWindowId);
EXPECT_EQ(state3, current_state);
- // HMI level is equal to parent hmi_level
- EXPECT_EQ(HMILevel::HMI_FULL, current_state->hmi_level());
+ // HMI level is equal to state3 hmi_level
+ EXPECT_EQ(HMILevel::HMI_LIMITED, current_state->hmi_level());
EXPECT_EQ(HmiState::STATE_ID_TTS_SESSION, current_state->state_id());
EXPECT_EQ(state1, current_state->parent());
}
@@ -270,10 +271,9 @@ TEST_F(ApplicationImplTest, AddStates_RemoveFirstState) {
HmiStatePtr state1 = TestAddHmiState(HMILevel::HMI_FULL,
HmiState::STATE_ID_PHONE_CALL,
&ApplicationImpl::AddHMIState);
- // Second state
- TestAddHmiState(HMILevel::HMI_NONE,
- HmiState::STATE_ID_VIDEO_STREAMING,
- &ApplicationImpl::AddHMIState);
+ HmiStatePtr state2 = TestAddHmiState(HMILevel::HMI_NONE,
+ HmiState::STATE_ID_VIDEO_STREAMING,
+ &ApplicationImpl::AddHMIState);
HmiStatePtr state3 = TestAddHmiState(HMILevel::HMI_LIMITED,
HmiState::STATE_ID_TTS_SESSION,
&ApplicationImpl::AddHMIState);
@@ -286,7 +286,7 @@ TEST_F(ApplicationImplTest, AddStates_RemoveFirstState) {
// Last state does not have a parent
EXPECT_EQ(HMILevel::HMI_LIMITED, current_state->hmi_level());
EXPECT_EQ(HmiState::STATE_ID_TTS_SESSION, current_state->state_id());
- EXPECT_EQ(nullptr, current_state->parent());
+ EXPECT_EQ(state2, current_state->parent());
}
TEST_F(ApplicationImplTest, SetRegularState_RemoveFirstState) {
@@ -307,7 +307,7 @@ TEST_F(ApplicationImplTest, SetRegularState_RemoveFirstState) {
HmiStatePtr current_state = app_impl->CurrentHmiState(kDefaultWindowId);
EXPECT_EQ(state3, current_state);
// Last state has a parent
- EXPECT_EQ(HMILevel::HMI_FULL, current_state->hmi_level());
+ EXPECT_EQ(HMILevel::HMI_LIMITED, current_state->hmi_level());
EXPECT_EQ(HmiState::STATE_ID_TTS_SESSION, current_state->state_id());
EXPECT_EQ(state2, current_state->parent());
}
@@ -534,16 +534,16 @@ TEST_F(ApplicationImplTest, AreCommandLimitsExceeded_LimitFromPT) {
EXPECT_CALL(policy_interface, GetPriority(policy_app_id, _))
.WillRepeatedly(Return(false));
- EXPECT_CALL(policy_interface, GetNotificationsNumber(_))
+ EXPECT_CALL(policy_interface, GetNotificationsNumber(_, false))
.WillOnce(Return(cmd_limit));
EXPECT_FALSE(app_impl->AreCommandLimitsExceeded(FunctionID::ReadDIDID,
TLimitSource::POLICY_TABLE));
- EXPECT_CALL(policy_interface, GetNotificationsNumber(_))
+ EXPECT_CALL(policy_interface, GetNotificationsNumber(_, false))
.WillOnce(Return(cmd_limit));
EXPECT_FALSE(app_impl->AreCommandLimitsExceeded(FunctionID::GetVehicleDataID,
TLimitSource::POLICY_TABLE));
- EXPECT_CALL(policy_interface, GetNotificationsNumber(_))
+ EXPECT_CALL(policy_interface, GetNotificationsNumber(_, false))
.WillRepeatedly(Return(0));
EXPECT_TRUE(app_impl->AreCommandLimitsExceeded(FunctionID::ReadDIDID,
TLimitSource::POLICY_TABLE));
@@ -597,6 +597,7 @@ TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeNotNaviNotVoice) {
EXPECT_FALSE(app_impl->is_navi());
EXPECT_FALSE(app_impl->is_voice_communication_supported());
EXPECT_FALSE(app_impl->mobile_projection_enabled());
+ EXPECT_FALSE(app_impl->webengine_projection_enabled());
app_impl->set_app_types(type_media);
app_impl->ChangeSupportingAppHMIType();
@@ -604,6 +605,7 @@ TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeNotNaviNotVoice) {
EXPECT_FALSE(app_impl->is_navi());
EXPECT_FALSE(app_impl->is_voice_communication_supported());
EXPECT_FALSE(app_impl->mobile_projection_enabled());
+ EXPECT_FALSE(app_impl->webengine_projection_enabled());
}
TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsVoice) {
@@ -613,6 +615,7 @@ TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsVoice) {
EXPECT_FALSE(app_impl->is_navi());
EXPECT_FALSE(app_impl->is_voice_communication_supported());
EXPECT_FALSE(app_impl->mobile_projection_enabled());
+ EXPECT_FALSE(app_impl->webengine_projection_enabled());
app_impl->set_app_types(type_comm);
app_impl->ChangeSupportingAppHMIType();
@@ -620,6 +623,7 @@ TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsVoice) {
EXPECT_FALSE(app_impl->is_navi());
EXPECT_TRUE(app_impl->is_voice_communication_supported());
EXPECT_FALSE(app_impl->mobile_projection_enabled());
+ EXPECT_FALSE(app_impl->webengine_projection_enabled());
}
TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsNavi) {
@@ -629,6 +633,7 @@ TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsNavi) {
EXPECT_FALSE(app_impl->is_navi());
EXPECT_FALSE(app_impl->is_voice_communication_supported());
EXPECT_FALSE(app_impl->mobile_projection_enabled());
+ EXPECT_FALSE(app_impl->webengine_projection_enabled());
app_impl->set_app_types(type_navi);
app_impl->ChangeSupportingAppHMIType();
@@ -636,6 +641,71 @@ TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsNavi) {
EXPECT_TRUE(app_impl->is_navi());
EXPECT_FALSE(app_impl->is_voice_communication_supported());
EXPECT_FALSE(app_impl->mobile_projection_enabled());
+ EXPECT_FALSE(app_impl->webengine_projection_enabled());
+}
+
+TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsWebView) {
+ smart_objects::SmartObject app_types;
+ app_types[0] = mobile_apis::AppHMIType::WEB_VIEW;
+
+ EXPECT_FALSE(app_impl->is_navi());
+ EXPECT_FALSE(app_impl->is_voice_communication_supported());
+ EXPECT_FALSE(app_impl->mobile_projection_enabled());
+ EXPECT_FALSE(app_impl->webengine_projection_enabled());
+
+ app_impl->set_app_types(app_types);
+ app_impl->ChangeSupportingAppHMIType();
+
+ EXPECT_FALSE(app_impl->is_navi());
+ EXPECT_FALSE(app_impl->is_voice_communication_supported());
+ EXPECT_FALSE(app_impl->mobile_projection_enabled());
+ EXPECT_TRUE(app_impl->webengine_projection_enabled());
+}
+
+TEST_F(ApplicationImplTest,
+ ChangeSupportingAppHMIType_TypeFromWebViewToProjection) {
+ smart_objects::SmartObject app_types;
+ app_types[0] = mobile_apis::AppHMIType::WEB_VIEW;
+
+ EXPECT_FALSE(app_impl->mobile_projection_enabled());
+ EXPECT_FALSE(app_impl->webengine_projection_enabled());
+
+ app_impl->set_app_types(app_types);
+ app_impl->ChangeSupportingAppHMIType();
+
+ EXPECT_FALSE(app_impl->mobile_projection_enabled());
+ EXPECT_TRUE(app_impl->webengine_projection_enabled());
+
+ app_types[0] = mobile_apis::AppHMIType::PROJECTION;
+
+ app_impl->set_app_types(app_types);
+ app_impl->ChangeSupportingAppHMIType();
+
+ EXPECT_FALSE(app_impl->webengine_projection_enabled());
+ EXPECT_TRUE(app_impl->mobile_projection_enabled());
+}
+
+TEST_F(ApplicationImplTest,
+ ChangeSupportingAppHMIType_TypeFromProjectionToWebView) {
+ smart_objects::SmartObject app_types;
+ app_types[0] = mobile_apis::AppHMIType::PROJECTION;
+
+ EXPECT_FALSE(app_impl->mobile_projection_enabled());
+ EXPECT_FALSE(app_impl->webengine_projection_enabled());
+
+ app_impl->set_app_types(app_types);
+ app_impl->ChangeSupportingAppHMIType();
+
+ EXPECT_FALSE(app_impl->webengine_projection_enabled());
+ EXPECT_TRUE(app_impl->mobile_projection_enabled());
+
+ app_types[0] = mobile_apis::AppHMIType::WEB_VIEW;
+
+ app_impl->set_app_types(app_types);
+ app_impl->ChangeSupportingAppHMIType();
+
+ EXPECT_FALSE(app_impl->mobile_projection_enabled());
+ EXPECT_TRUE(app_impl->webengine_projection_enabled());
}
TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsNaviAndVoice) {
@@ -647,6 +717,7 @@ TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsNaviAndVoice) {
EXPECT_FALSE(app_impl->is_navi());
EXPECT_FALSE(app_impl->is_voice_communication_supported());
EXPECT_FALSE(app_impl->mobile_projection_enabled());
+ EXPECT_FALSE(app_impl->webengine_projection_enabled());
app_impl->set_app_types(app_types);
app_impl->ChangeSupportingAppHMIType();
@@ -654,6 +725,7 @@ TEST_F(ApplicationImplTest, ChangeSupportingAppHMIType_TypeIsNaviAndVoice) {
EXPECT_TRUE(app_impl->is_navi());
EXPECT_TRUE(app_impl->is_voice_communication_supported());
EXPECT_FALSE(app_impl->mobile_projection_enabled());
+ EXPECT_FALSE(app_impl->webengine_projection_enabled());
}
TEST_F(ApplicationImplTest,
@@ -667,6 +739,7 @@ TEST_F(ApplicationImplTest,
EXPECT_FALSE(app_impl->is_navi());
EXPECT_FALSE(app_impl->is_voice_communication_supported());
EXPECT_FALSE(app_impl->mobile_projection_enabled());
+ EXPECT_FALSE(app_impl->webengine_projection_enabled());
app_impl->set_app_types(app_types);
app_impl->ChangeSupportingAppHMIType();
@@ -674,13 +747,14 @@ TEST_F(ApplicationImplTest,
EXPECT_TRUE(app_impl->is_navi());
EXPECT_TRUE(app_impl->is_voice_communication_supported());
EXPECT_TRUE(app_impl->mobile_projection_enabled());
+ EXPECT_FALSE(app_impl->webengine_projection_enabled());
}
TEST_F(ApplicationImplTest, UpdateHash_AppMngrNotSuspended) {
EXPECT_CALL(*MockMessageHelper::message_helper_mock(),
SendHashUpdateNotification(app_id, _))
.Times(1);
- resumprion_test::MockResumeCtrl mock_resume_ctrl;
+ resumption_test::MockResumeCtrl mock_resume_ctrl;
EXPECT_CALL(mock_application_manager_, resume_controller())
.WillOnce(ReturnRef(mock_resume_ctrl));
EXPECT_CALL(mock_resume_ctrl, is_suspended()).WillOnce(Return(false));
@@ -693,7 +767,7 @@ TEST_F(ApplicationImplTest, UpdateHash_AppMngrSuspended) {
EXPECT_CALL(*MockMessageHelper::message_helper_mock(),
SendHashUpdateNotification(app_id, _))
.Times(0);
- resumprion_test::MockResumeCtrl mock_resume_ctrl;
+ resumption_test::MockResumeCtrl mock_resume_ctrl;
EXPECT_CALL(mock_application_manager_, resume_controller())
.WillOnce(ReturnRef(mock_resume_ctrl));
EXPECT_CALL(mock_resume_ctrl, is_suspended()).WillOnce(Return(true));
@@ -763,7 +837,6 @@ TEST_F(ApplicationImplTest, StartStreaming_StreamingApproved) {
TEST_F(ApplicationImplTest, SuspendNaviStreaming) {
protocol_handler::ServiceType type =
protocol_handler::ServiceType::kMobileNav;
- EXPECT_CALL(mock_application_manager_, OnAppStreaming(app_id, type, false));
EXPECT_CALL(mock_application_manager_,
ProcessOnDataStreamingNotification(type, app_id, false));
app_impl->SuspendStreaming(type);
@@ -771,7 +844,6 @@ TEST_F(ApplicationImplTest, SuspendNaviStreaming) {
TEST_F(ApplicationImplTest, SuspendAudioStreaming) {
protocol_handler::ServiceType type = protocol_handler::ServiceType::kAudio;
- EXPECT_CALL(mock_application_manager_, OnAppStreaming(app_id, type, false));
EXPECT_CALL(mock_application_manager_,
ProcessOnDataStreamingNotification(type, app_id, false));
app_impl->SuspendStreaming(type);
@@ -780,12 +852,16 @@ TEST_F(ApplicationImplTest, SuspendAudioStreaming) {
// TODO {AKozoriz} : Fix tests with streaming (APPLINK-19289)
TEST_F(ApplicationImplTest, DISABLED_Suspend_WakeUpAudioStreaming) {
protocol_handler::ServiceType type = protocol_handler::ServiceType::kAudio;
- EXPECT_CALL(mock_application_manager_, OnAppStreaming(app_id, type, false));
+ EXPECT_CALL(
+ mock_application_manager_,
+ OnAppStreaming(app_id, type, Application::StreamingState::kSuspended));
EXPECT_CALL(*MockMessageHelper::message_helper_mock(),
SendOnDataStreaming(type, false, _));
app_impl->SuspendStreaming(type);
- EXPECT_CALL(mock_application_manager_, OnAppStreaming(app_id, type, true));
+ EXPECT_CALL(
+ mock_application_manager_,
+ OnAppStreaming(app_id, type, Application::StreamingState::kStarted));
EXPECT_CALL(*MockMessageHelper::message_helper_mock(),
SendOnDataStreaming(type, true, _));
app_impl->WakeUpStreaming(type);
@@ -794,12 +870,16 @@ TEST_F(ApplicationImplTest, DISABLED_Suspend_WakeUpAudioStreaming) {
TEST_F(ApplicationImplTest, DISABLED_Suspend_WakeUpNaviStreaming) {
protocol_handler::ServiceType type =
protocol_handler::ServiceType::kMobileNav;
- EXPECT_CALL(mock_application_manager_, OnAppStreaming(app_id, type, false));
+ EXPECT_CALL(
+ mock_application_manager_,
+ OnAppStreaming(app_id, type, Application::StreamingState::kSuspended));
EXPECT_CALL(*MockMessageHelper::message_helper_mock(),
SendOnDataStreaming(type, false, _));
app_impl->SuspendStreaming(type);
- EXPECT_CALL(mock_application_manager_, OnAppStreaming(app_id, type, true));
+ EXPECT_CALL(
+ mock_application_manager_,
+ OnAppStreaming(app_id, type, Application::StreamingState::kStarted));
EXPECT_CALL(*MockMessageHelper::message_helper_mock(),
SendOnDataStreaming(type, true, _));
app_impl->WakeUpStreaming(type);
@@ -811,7 +891,9 @@ TEST_F(ApplicationImplTest, StopStreaming_StreamingApproved) {
protocol_handler::ServiceType::kMobileNav;
app_impl->set_video_streaming_approved(true);
- EXPECT_CALL(mock_application_manager_, OnAppStreaming(app_id, type, false));
+ EXPECT_CALL(
+ mock_application_manager_,
+ OnAppStreaming(app_id, type, Application::StreamingState::kStopped));
EXPECT_CALL(mock_application_manager_,
ProcessOnDataStreamingNotification(type, app_id, false));
EXPECT_CALL(*MockMessageHelper::message_helper_mock(),
@@ -823,7 +905,9 @@ TEST_F(ApplicationImplTest, StopStreaming_StreamingApproved) {
// Stop audio streaming
app_impl->set_audio_streaming_approved(true);
type = protocol_handler::ServiceType::kAudio;
- EXPECT_CALL(mock_application_manager_, OnAppStreaming(app_id, type, false));
+ EXPECT_CALL(
+ mock_application_manager_,
+ OnAppStreaming(app_id, type, Application::StreamingState::kStopped));
EXPECT_CALL(mock_application_manager_,
ProcessOnDataStreamingNotification(type, app_id, false));
EXPECT_CALL(*MockMessageHelper::message_helper_mock(),
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 2c16048e97..cf8aadb080 100644
--- a/src/components/application_manager/test/application_manager_impl_test.cc
+++ b/src/components/application_manager/test/application_manager_impl_test.cc
@@ -66,9 +66,6 @@
#include "utils/lock.h"
#include "encryption/hashing.h"
-#ifdef ENABLE_LOG
-#include "utils/push_log.h"
-#endif
namespace test {
namespace components {
@@ -97,9 +94,14 @@ using test::components::policy_test::MockPolicyHandlerInterface;
using namespace application_manager;
-// custom action to call a member function with 4 arguments
-ACTION_P6(InvokeMemberFuncWithArg4, ptr, memberFunc, a, b, c, d) {
- (ptr->*memberFunc)(a, b, c, d);
+// custom action to call a member function with 2 arguments
+ACTION_P4(InvokeMemberFuncWithArg2, ptr, memberFunc, a, b) {
+ (ptr->*memberFunc)(a, b);
+}
+
+// custom action to call a member function with 3 arguments
+ACTION_P5(InvokeMemberFuncWithArg3, ptr, memberFunc, a, b, c) {
+ (ptr->*memberFunc)(a, b, c);
}
namespace {
@@ -180,9 +182,6 @@ class ApplicationManagerImplTest
NiceMock<usage_statistics_test::MockStatisticsManager> >())
{
-#ifdef ENABLE_LOG
- logger::create_log_message_loop_thread();
-#endif
Mock::VerifyAndClearExpectations(mock_message_helper_);
}
~ApplicationManagerImplTest() OVERRIDE {
@@ -269,6 +268,17 @@ class ApplicationManagerImplTest
ASSERT_TRUE(mock_app_ptr_.get());
}
+ void SetExpectationForCreateModuleInfoSO(
+ const hmi_apis::FunctionID::eType function_id) {
+ smart_objects::SmartObject sm_object(smart_objects::SmartType_Map);
+ sm_object[strings::params][strings::function_id] =
+ static_cast<int>(function_id);
+ auto sptr = std::make_shared<smart_objects::SmartObject>(sm_object);
+
+ ON_CALL(*mock_message_helper_, CreateModuleInfoSO(function_id, _))
+ .WillByDefault(Return(sptr));
+ }
+
application_manager::commands::MessageSharedPtr CreateCloseAppMessage() {
using namespace application_manager;
@@ -327,6 +337,44 @@ class ApplicationManagerImplTest
void CreatePendingApplication();
#endif
+ void ExpectedHmiState(
+ const ApplicationSharedPtr wep_app,
+ const WindowID main_window_id,
+ const mobile_apis::HMILevel::eType hmi_level,
+ const mobile_apis::VideoStreamingState::eType vss,
+ const mobile_apis::AudioStreamingState::eType audio_str_st,
+ const mobile_apis::SystemContext::eType system_ctx) {
+ EXPECT_EQ(hmi_level, wep_app->hmi_level(main_window_id));
+ EXPECT_EQ(vss, wep_app->video_streaming_state());
+ EXPECT_EQ(audio_str_st, wep_app->audio_streaming_state());
+ EXPECT_EQ(system_ctx, wep_app->system_context(main_window_id));
+ }
+
+ smart_objects::SmartObjectSPtr CreateRAI(const std::string app_hmi_type,
+ const bool is_media_application) {
+ smart_objects::SmartObject rai(smart_objects::SmartType_Map);
+ smart_objects::SmartObject& params = rai[strings::msg_params];
+ params[strings::app_id] = kAppId;
+ params[strings::language_desired] = mobile_api::Language::EN_US;
+ params[strings::hmi_display_language_desired] = mobile_api::Language::EN_US;
+
+ rai[strings::params][strings::connection_key] = kConnectionKey;
+ rai[strings::msg_params][strings::app_name] = kAppName;
+ rai[strings::msg_params][strings::app_hmi_type] = app_hmi_type;
+ rai[strings::msg_params][strings::is_media_application] =
+ is_media_application;
+ rai[strings::msg_params][strings::sync_msg_version]
+ [strings::minor_version] = APIVersion::kAPIV2;
+ rai[strings::msg_params][strings::sync_msg_version]
+ [strings::major_version] = APIVersion::kAPIV6;
+
+ rai[strings::params][strings::protocol_version] =
+ protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_2;
+
+ const auto rai_ptr = std::make_shared<smart_objects::SmartObject>(rai);
+ return rai_ptr;
+ }
+
void CreatePendingLocalApplication(const std::string& policy_app_id);
uint32_t app_id_;
@@ -351,6 +399,13 @@ class ApplicationManagerImplTest
mock_statistics_manager_;
};
+MATCHER_P(HMIFunctionIDIs, result_code, "") {
+ return result_code == static_cast<hmi_apis::FunctionID::eType>(
+ (*arg)[application_manager::strings::params]
+ [application_manager::strings::function_id]
+ .asInt());
+}
+
INSTANTIATE_TEST_CASE_P(
ProcessServiceStatusUpdate_REQUEST_ACCEPTED,
ApplicationManagerImplTest,
@@ -445,16 +500,16 @@ TEST_F(ApplicationManagerImplTest,
SubscribeAppForWayPoints_ExpectSubscriptionApp) {
auto app_ptr = std::static_pointer_cast<am::Application>(mock_app_ptr_);
app_manager_impl_->SubscribeAppForWayPoints(app_ptr);
- EXPECT_TRUE(app_manager_impl_->IsAppSubscribedForWayPoints(app_ptr));
+ EXPECT_TRUE(app_manager_impl_->IsAppSubscribedForWayPoints(*app_ptr));
}
TEST_F(ApplicationManagerImplTest,
UnsubscribeAppForWayPoints_ExpectUnsubscriptionApp) {
auto app_ptr = std::static_pointer_cast<am::Application>(mock_app_ptr_);
app_manager_impl_->SubscribeAppForWayPoints(app_ptr);
- EXPECT_TRUE(app_manager_impl_->IsAppSubscribedForWayPoints(app_ptr));
+ EXPECT_TRUE(app_manager_impl_->IsAppSubscribedForWayPoints(*app_ptr));
app_manager_impl_->UnsubscribeAppFromWayPoints(app_ptr);
- EXPECT_FALSE(app_manager_impl_->IsAppSubscribedForWayPoints(app_ptr));
+ EXPECT_FALSE(app_manager_impl_->IsAppSubscribedForWayPoints(*app_ptr));
const std::set<uint32_t> result =
app_manager_impl_->GetAppsSubscribedForWayPoints();
EXPECT_TRUE(result.empty());
@@ -491,7 +546,7 @@ TEST_F(ApplicationManagerImplTest, OnServiceStartedCallback_RpcService) {
bool result = false;
std::vector<std::string> rejected_params;
- EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _))
+ EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _, _))
.WillOnce(DoAll(SaveArg<1>(&result), SaveArg<2>(&rejected_params)));
app_manager_impl_->OnServiceStartedCallback(
@@ -502,28 +557,6 @@ TEST_F(ApplicationManagerImplTest, OnServiceStartedCallback_RpcService) {
EXPECT_TRUE(rejected_params.empty());
}
-TEST_F(ApplicationManagerImplTest, OnServiceStartedCallback_UnknownApp) {
- AddMockApplication();
-
- const connection_handler::DeviceHandle device_handle = 0;
- const protocol_handler::ServiceType service_type =
- protocol_handler::ServiceType::kInvalidServiceType;
- const int32_t session_key = 123;
- EXPECT_CALL(*mock_app_ptr_, app_id()).WillRepeatedly(Return(456));
-
- bool result = false;
- std::vector<std::string> rejected_params;
- EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _))
- .WillOnce(DoAll(SaveArg<1>(&result), SaveArg<2>(&rejected_params)));
-
- app_manager_impl_->OnServiceStartedCallback(
- device_handle, session_key, service_type, NULL);
-
- // check: return value is false and list is empty
- EXPECT_FALSE(result);
- EXPECT_TRUE(rejected_params.empty());
-}
-
TEST_F(ApplicationManagerImplTest, OnServiceStartedCallback_UnknownService) {
AddMockApplication();
@@ -535,7 +568,7 @@ TEST_F(ApplicationManagerImplTest, OnServiceStartedCallback_UnknownService) {
bool result = false;
std::vector<std::string> rejected_params;
- EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _))
+ EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _, _))
.WillOnce(DoAll(SaveArg<1>(&result), SaveArg<2>(&rejected_params)));
app_manager_impl_->OnServiceStartedCallback(
@@ -566,7 +599,7 @@ TEST_F(ApplicationManagerImplTest, OnServiceStartedCallback_VideoServiceStart) {
bool result = false;
std::vector<std::string> rejected_params;
- EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _))
+ EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _, _))
.WillOnce(DoAll(SaveArg<1>(&result), SaveArg<2>(&rejected_params)));
// check: SetVideoConfig() should not be called, StartStreaming() is called
@@ -597,7 +630,7 @@ TEST_F(ApplicationManagerImplTest,
bool result = false;
std::vector<std::string> rejected_params;
- EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _))
+ EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _, _))
.WillOnce(DoAll(SaveArg<1>(&result), SaveArg<2>(&rejected_params)));
// check: SetVideoConfig() and StartStreaming() should not be called
@@ -634,7 +667,7 @@ TEST_F(ApplicationManagerImplTest,
bool result = false;
std::vector<std::string> rejected_params;
- EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _))
+ EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _, _))
.WillOnce(DoAll(SaveArg<1>(&result), SaveArg<2>(&rejected_params)));
// check: SetVideoConfig() and StartStreaming() should not be called
@@ -670,7 +703,7 @@ TEST_F(ApplicationManagerImplTest,
bool result = false;
std::vector<std::string> rejected_params;
- EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _))
+ EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _, _))
.WillOnce(DoAll(SaveArg<1>(&result), SaveArg<2>(&rejected_params)));
BsonObject input_params;
@@ -696,18 +729,15 @@ TEST_F(ApplicationManagerImplTest,
converted_params[strings::height] = 640;
converted_params[strings::width] = 480;
- std::vector<std::string> empty;
-
// check: SetVideoConfig() and StartStreaming() are called
EXPECT_CALL(*mock_app_ptr_, SetVideoConfig(service_type, converted_params))
- .WillOnce(DoAll(InvokeMemberFuncWithArg4(
- app_manager_impl_.get(),
- &ApplicationManagerImpl::OnStreamingConfigured,
- session_key,
- service_type,
- true,
- ByRef(empty)),
- Return(true)));
+ .WillOnce(
+ DoAll(InvokeMemberFuncWithArg2(
+ app_manager_impl_.get(),
+ &ApplicationManagerImpl::OnStreamingConfigurationSuccessful,
+ session_key,
+ service_type),
+ Return(true)));
EXPECT_CALL(*mock_app_ptr_, StartStreaming(service_type)).WillOnce(Return());
app_manager_impl_->OnServiceStartedCallback(
@@ -759,7 +789,7 @@ TEST_F(ApplicationManagerImplTest,
bool result = false;
std::vector<std::string> rejected_params;
- EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _))
+ EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _, _))
.WillOnce(DoAll(SaveArg<1>(&result), SaveArg<2>(&rejected_params)));
BsonObject input_params;
@@ -788,17 +818,18 @@ TEST_F(ApplicationManagerImplTest,
std::vector<std::string> rejected_list;
rejected_list.push_back(std::string("protocol"));
rejected_list.push_back(std::string("codec"));
+ std::string reason;
// simulate HMI returning negative response
EXPECT_CALL(*mock_app_ptr_, SetVideoConfig(service_type, converted_params))
- .WillOnce(DoAll(InvokeMemberFuncWithArg4(
- app_manager_impl_.get(),
- &ApplicationManagerImpl::OnStreamingConfigured,
- session_key,
- service_type,
- false,
- ByRef(rejected_list)),
- Return(true)));
+ .WillOnce(
+ DoAll(InvokeMemberFuncWithArg3(
+ app_manager_impl_.get(),
+ &ApplicationManagerImpl::OnStreamingConfigurationFailed,
+ session_key,
+ ByRef(rejected_list),
+ ByRef(reason)),
+ Return(true)));
// check: StartStreaming() should not be called
EXPECT_CALL(*mock_app_ptr_, StartStreaming(service_type)).Times(0);
@@ -838,7 +869,7 @@ TEST_F(ApplicationManagerImplTest,
bool result = false;
std::vector<std::string> rejected_params;
- EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _))
+ EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _, _))
.WillOnce(DoAll(SaveArg<1>(&result), SaveArg<2>(&rejected_params)));
BsonObject input_params;
@@ -878,7 +909,7 @@ TEST_F(ApplicationManagerImplTest, OnServiceStartedCallback_AudioServiceStart) {
bool result = false;
std::vector<std::string> rejected_params;
- EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _))
+ EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _, _))
.WillOnce(DoAll(SaveArg<1>(&result), SaveArg<2>(&rejected_params)));
// check: SetVideoConfig() should not be called, StartStreaming() is called
@@ -913,7 +944,7 @@ TEST_F(ApplicationManagerImplTest,
bool result = false;
std::vector<std::string> rejected_params;
- EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _))
+ EXPECT_CALL(mock_connection_handler_, NotifyServiceStartedResult(_, _, _, _))
.WillOnce(DoAll(SaveArg<1>(&result), SaveArg<2>(&rejected_params)));
BsonObject input_params;
@@ -1198,14 +1229,19 @@ TEST_F(ApplicationManagerImplTest, StartStopAudioPassThru) {
const uint32_t app_id = 65537;
const int32_t max_duration = 1000;
- // below are not used
const int32_t correlation_id = 0;
const int32_t sampling_rate = 0;
const int32_t bits_per_sample = 0;
const int32_t audio_type = 0;
- EXPECT_CALL(mock_media_manager,
- StartMicrophoneRecording(app_id, _, max_duration))
+ EXPECT_CALL(
+ mock_media_manager,
+ StartMicrophoneRecording(app_id,
+ _,
+ max_duration,
+ mobile_apis::SamplingRate::SamplingRate_8KHZ,
+ mobile_apis::BitsPerSample::BitsPerSample_8_BIT,
+ mobile_apis::AudioType::PCM))
.WillOnce(Return());
EXPECT_CALL(mock_media_manager, StopMicrophoneRecording(app_id))
.WillOnce(Return());
@@ -1282,14 +1318,19 @@ TEST_F(ApplicationManagerImplTest, UnregisterAnotherAppDuringAudioPassThru) {
app_manager_impl_->AddMockApplication(mock_app_2);
const int32_t max_duration = 1000;
- // below are not used
const int32_t correlation_id = 0;
const int32_t sampling_rate = 0;
const int32_t bits_per_sample = 0;
const int32_t audio_type = 0;
- EXPECT_CALL(mock_media_manager,
- StartMicrophoneRecording(app_id_2, _, max_duration))
+ EXPECT_CALL(
+ mock_media_manager,
+ StartMicrophoneRecording(app_id_2,
+ _,
+ max_duration,
+ mobile_apis::SamplingRate::SamplingRate_8KHZ,
+ mobile_apis::BitsPerSample::BitsPerSample_8_BIT,
+ mobile_apis::AudioType::PCM))
.WillOnce(Return());
EXPECT_CALL(mock_media_manager, StopMicrophoneRecording(app_id_2))
.WillOnce(Return());
@@ -1516,7 +1557,7 @@ TEST_F(ApplicationManagerImplTest,
// - .ini file specifies TCP_WIFI for EMPTY_APP entry.
// -> The app does not have required transport.
bool result = CheckResumptionRequiredTransportAvailableTest(
- NULL,
+ nullptr,
primary_device_handle,
primary_transport_device_string,
secondary_device_handle,
@@ -2018,6 +2059,211 @@ TEST_F(
EXPECT_EQ(1u, app_list.size());
}
+TEST_F(
+ ApplicationManagerImplTest,
+ RegisterApplication_WEPNonMediaAppRegisterActivateDeactivateExit_EXPECT_CORRECT_HMI_STATES) {
+ using namespace mobile_apis;
+ EXPECT_CALL(
+ mock_session_observer_,
+ GetDataOnSessionKey(kConnectionKey,
+ _,
+ _,
+ testing::An<connection_handler::DeviceHandle*>()))
+ .WillOnce(DoAll(SetArgPointee<3u>(kDeviceId), Return(0)));
+
+ const std::string app_hmi_type{"WEB_VIEW"};
+ const bool is_media_app = false;
+ const auto rai_ptr = CreateRAI(app_hmi_type, is_media_app);
+
+ std::unique_ptr<plugin_manager::RPCPluginManager> rpc_plugin_manager(
+ new MockRPCPluginManager());
+ app_manager_impl_->SetPluginManager(rpc_plugin_manager);
+ auto wep_nonmedia_app = app_manager_impl_->RegisterApplication(rai_ptr);
+ wep_nonmedia_app->set_is_media_application(false);
+ wep_nonmedia_app->set_is_ready(true);
+
+ EXPECT_EQ(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_2,
+ wep_nonmedia_app->protocol_version());
+ EXPECT_EQ(APIVersion::kAPIV2,
+ wep_nonmedia_app->version().min_supported_api_version);
+ EXPECT_EQ(APIVersion::kAPIV6,
+ wep_nonmedia_app->version().max_supported_api_version);
+
+ // Initial HMI level, audio, video streaming states and system context
+ // set after app registration
+ ExpectedHmiState(wep_nonmedia_app,
+ kDefaultWindowId,
+ HMILevel::INVALID_ENUM,
+ VideoStreamingState::INVALID_ENUM,
+ AudioStreamingState::INVALID_ENUM,
+ SystemContext::SYSCTXT_MAIN);
+
+ smart_objects::SmartObjectSPtr notification =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+ EXPECT_CALL(*mock_message_helper_,
+ CreateHMIStatusNotification(_, kDefaultWindowId))
+ .WillOnce(Return(notification));
+ EXPECT_CALL(*mock_rpc_service_, ManageMobileCommand(notification, _));
+
+ // Const shared ptr is required for OnAppActivated due to its signature
+ ApplicationConstSharedPtr const_wep_app = wep_nonmedia_app;
+ EXPECT_CALL(*mock_app_service_manager_, OnAppActivated(const_wep_app));
+
+ // Activate Webengine projection non-media app
+ // to check its audio & video streaming states in FULL Hmi level
+ app_manager_impl_->ActivateApplication(wep_nonmedia_app);
+
+ // WEP non-media app should be always not_streamable
+ // and not_audible even in FULL HMI Level
+ ExpectedHmiState(wep_nonmedia_app,
+ kDefaultWindowId,
+ HMILevel::HMI_FULL,
+ VideoStreamingState::NOT_STREAMABLE,
+ AudioStreamingState::NOT_AUDIBLE,
+ SystemContext::SYSCTXT_MAIN);
+
+ EXPECT_CALL(*mock_message_helper_,
+ CreateHMIStatusNotification(_, kDefaultWindowId))
+ .WillOnce(Return(notification));
+ EXPECT_CALL(*mock_rpc_service_, ManageMobileCommand(notification, _));
+
+ // Deactivate Webengine projection non-media app
+ // to check its new HMI level and audio & video streaming states
+ app_manager_impl_->state_controller().DeactivateApp(wep_nonmedia_app,
+ kDefaultWindowId);
+
+ // WEP non-media app should be deactivated to BACKGROUND
+ // WEP non-media app should be not audible and not streamable
+ // in BACKGROUND HMI Level
+
+ ExpectedHmiState(wep_nonmedia_app,
+ kDefaultWindowId,
+ HMILevel::HMI_BACKGROUND,
+ VideoStreamingState::NOT_STREAMABLE,
+ AudioStreamingState::NOT_AUDIBLE,
+ SystemContext::SYSCTXT_MAIN);
+
+ EXPECT_CALL(*mock_message_helper_,
+ CreateHMIStatusNotification(_, kDefaultWindowId))
+ .WillOnce(Return(notification));
+ EXPECT_CALL(*mock_rpc_service_, ManageMobileCommand(notification, _));
+
+ // Exit of Webengine projection non-media app
+ // to check its new HMI level and audio & video streaming states
+ app_manager_impl_->state_controller().ExitDefaultWindow(wep_nonmedia_app);
+ // WEP non-media app should be deactivated to NONE
+ // WEP non-media app should be not audible and not streamable
+ // in NONE HMI Level
+ ExpectedHmiState(wep_nonmedia_app,
+ kDefaultWindowId,
+ HMILevel::HMI_NONE,
+ VideoStreamingState::NOT_STREAMABLE,
+ AudioStreamingState::NOT_AUDIBLE,
+ SystemContext::SYSCTXT_MAIN);
+}
+
+TEST_F(
+ ApplicationManagerImplTest,
+ RegisterApplication_WEPMediaAppRegisterActivateDeactivateExit_EXPECT_CORRECT_HMI_STATES) {
+ using namespace mobile_apis;
+
+ EXPECT_CALL(
+ mock_session_observer_,
+ GetDataOnSessionKey(kConnectionKey,
+ _,
+ _,
+ testing::An<connection_handler::DeviceHandle*>()))
+ .WillOnce(DoAll(SetArgPointee<3u>(kDeviceId), Return(0)));
+
+ const std::string app_hmi_type{"WEB_VIEW"};
+ const bool is_media_app = true;
+ const auto rai_ptr = CreateRAI(app_hmi_type, is_media_app);
+
+ std::unique_ptr<plugin_manager::RPCPluginManager> rpc_plugin_manager(
+ new MockRPCPluginManager());
+ app_manager_impl_->SetPluginManager(rpc_plugin_manager);
+ auto wep_media_app = app_manager_impl_->RegisterApplication(rai_ptr);
+ wep_media_app->set_is_media_application(true);
+ wep_media_app->set_is_ready(true);
+
+ EXPECT_EQ(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_2,
+ wep_media_app->protocol_version());
+ EXPECT_EQ(APIVersion::kAPIV2,
+ wep_media_app->version().min_supported_api_version);
+ EXPECT_EQ(APIVersion::kAPIV6,
+ wep_media_app->version().max_supported_api_version);
+
+ // Initial HMI level, audio, video streaming states and system context
+ // set after app registration
+ ExpectedHmiState(wep_media_app,
+ kDefaultWindowId,
+ HMILevel::INVALID_ENUM,
+ VideoStreamingState::INVALID_ENUM,
+ AudioStreamingState::INVALID_ENUM,
+ SystemContext::SYSCTXT_MAIN);
+
+ // Const shared ptr is required for OnAppActivated due to its signature
+ ApplicationConstSharedPtr const_wep_app = wep_media_app;
+ EXPECT_CALL(*mock_app_service_manager_, OnAppActivated(const_wep_app));
+
+ smart_objects::SmartObjectSPtr notification =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+ EXPECT_CALL(*mock_message_helper_,
+ CreateHMIStatusNotification(_, kDefaultWindowId))
+ .WillOnce(Return(notification));
+ EXPECT_CALL(*mock_rpc_service_, ManageMobileCommand(notification, _));
+
+ // Activate Webengine projection media app
+ // to check its audio & video streaming states in FULL Hmi level
+ app_manager_impl_->ActivateApplication(wep_media_app);
+
+ // WEP media app should be always not_streamable
+ // but audible even in FULL HMI Level
+ ExpectedHmiState(wep_media_app,
+ kDefaultWindowId,
+ HMILevel::HMI_FULL,
+ VideoStreamingState::NOT_STREAMABLE,
+ AudioStreamingState::AUDIBLE,
+ SystemContext::SYSCTXT_MAIN);
+
+ EXPECT_CALL(*mock_message_helper_,
+ CreateHMIStatusNotification(_, kDefaultWindowId))
+ .WillOnce(Return(notification));
+ EXPECT_CALL(*mock_rpc_service_, ManageMobileCommand(notification, _));
+
+ // Deactivate Webengine projection media app
+ // to check its new HMI level and audio & video streaming states
+ app_manager_impl_->state_controller().DeactivateApp(wep_media_app,
+ kDefaultWindowId);
+
+ // WEP media app should be deactivated to LIMITED
+ // WEP media app should be audible but not streamable in LIMITED HMI Level
+ ExpectedHmiState(wep_media_app,
+ kDefaultWindowId,
+ HMILevel::HMI_LIMITED,
+ VideoStreamingState::NOT_STREAMABLE,
+ AudioStreamingState::AUDIBLE,
+ SystemContext::SYSCTXT_MAIN);
+
+ EXPECT_CALL(*mock_message_helper_,
+ CreateHMIStatusNotification(_, kDefaultWindowId))
+ .WillOnce(Return(notification));
+ EXPECT_CALL(*mock_rpc_service_, ManageMobileCommand(notification, _));
+
+ // Exit of Webengine projection media app
+ // to check its new HMI level and audio & video streaming states
+ app_manager_impl_->state_controller().ExitDefaultWindow(wep_media_app);
+ // WEP media app should be exited to NONE
+ ExpectedHmiState(wep_media_app,
+ kDefaultWindowId,
+ HMILevel::HMI_NONE,
+ VideoStreamingState::NOT_STREAMABLE,
+ AudioStreamingState::NOT_AUDIBLE,
+ SystemContext::SYSCTXT_MAIN);
+}
+
TEST_F(ApplicationManagerImplTest, AddAndRemoveQueryAppDevice_SUCCESS) {
const connection_handler::DeviceHandle device_handle = 1u;
ASSERT_FALSE(app_manager_impl_->IsAppsQueriedFrom(device_handle));
@@ -2028,6 +2274,26 @@ TEST_F(ApplicationManagerImplTest, AddAndRemoveQueryAppDevice_SUCCESS) {
EXPECT_FALSE(app_manager_impl_->IsAppsQueriedFrom(device_handle));
}
+TEST_F(
+ ApplicationManagerImplTest,
+ RequestForInterfacesAvailability_AllRequestsWillBeSuccessfullyRequested) {
+ std::vector<hmi_apis::FunctionID::eType> expected_requests{
+ hmi_apis::FunctionID::VehicleInfo_IsReady,
+ hmi_apis::FunctionID::VR_IsReady,
+ hmi_apis::FunctionID::TTS_IsReady,
+ hmi_apis::FunctionID::UI_IsReady,
+ hmi_apis::FunctionID::RC_IsReady};
+
+ for (auto request : expected_requests) {
+ SetExpectationForCreateModuleInfoSO(request);
+ EXPECT_CALL(*mock_rpc_service_,
+ ManageHMICommand(HMIFunctionIDIs(request),
+ commands::Command::SOURCE_HMI));
+ }
+
+ app_manager_impl_->RequestForInterfacesAvailability();
+}
+
} // namespace application_manager_test
} // namespace components
} // namespace test
diff --git a/src/components/application_manager/test/application_state_test.cc b/src/components/application_manager/test/application_state_test.cc
index 22d111f926..b45b078ab3 100644
--- a/src/components/application_manager/test/application_state_test.cc
+++ b/src/components/application_manager/test/application_state_test.cc
@@ -47,6 +47,7 @@ namespace application_manager_test {
using namespace application_manager;
using namespace mobile_apis;
+using ::testing::Return;
typedef HmiState::StateID StateID;
namespace {
@@ -57,6 +58,7 @@ const std::string kDefaultWindowName = "DefaultName";
std::vector<StateID> GenerateCurrentStates() {
std::vector<StateID> states;
+ states.push_back(StateID::STATE_ID_REGULAR);
states.push_back(StateID::STATE_ID_PHONE_CALL);
states.push_back(StateID::STATE_ID_SAFETY_MODE);
states.push_back(StateID::STATE_ID_VR_SESSION);
@@ -71,11 +73,13 @@ class ApplicationStateTest : public ::testing::Test {
public:
void SetUp() OVERRIDE {
mock_app_.reset(new MockApplication);
+ EXPECT_CALL(*mock_app_, hmi_app_id()).WillRepeatedly(Return(0));
}
protected:
static std::vector<StateID> added_states_;
ApplicationState app_state;
+ HmiStatePtr initial_state_;
const StateID current_id = StateID::STATE_ID_CURRENT;
const StateID postponed_id = StateID::STATE_ID_POSTPONED;
std::shared_ptr<MockApplication> mock_app_;
@@ -87,6 +91,12 @@ std::vector<StateID> ApplicationStateTest::added_states_ =
TEST_F(ApplicationStateTest, AddStates_GetCurrentStates) {
std::vector<StateID>::iterator new_state = added_states_.begin();
+ initial_state_ = std::make_shared<HmiState>(
+ static_cast<std::shared_ptr<Application> >(mock_app_),
+ app_mngr_,
+ *new_state);
+ app_state.InitState(kDefaultWindowId, std::string(), initial_state_);
+ ++new_state;
for (; new_state != added_states_.end(); ++new_state) {
HmiStatePtr state = std::make_shared<HmiState>(
static_cast<std::shared_ptr<Application> >(mock_app_),
@@ -99,6 +109,12 @@ TEST_F(ApplicationStateTest, AddStates_GetCurrentStates) {
TEST_F(ApplicationStateTest, AddStates_RemoveStates_GetCurrentState) {
std::vector<StateID>::iterator new_state = added_states_.begin();
+ initial_state_ = std::make_shared<HmiState>(
+ static_cast<std::shared_ptr<Application> >(mock_app_),
+ app_mngr_,
+ *new_state);
+ app_state.InitState(kDefaultWindowId, std::string(), initial_state_);
+ ++new_state;
for (; new_state != added_states_.end(); ++new_state) {
HmiStatePtr state = std::make_shared<HmiState>(
static_cast<std::shared_ptr<Application> >(mock_app_),
@@ -122,6 +138,12 @@ TEST_F(ApplicationStateTest, AddStates_RemoveStates_GetCurrentState) {
TEST_F(ApplicationStateTest, AddStatesAddPostponedState_GetPostponedState) {
// Added some states
std::vector<StateID>::iterator new_state = added_states_.begin();
+ initial_state_ = std::make_shared<HmiState>(
+ static_cast<std::shared_ptr<Application> >(mock_app_),
+ app_mngr_,
+ *new_state);
+ app_state.InitState(kDefaultWindowId, std::string(), initial_state_);
+ ++new_state;
for (; new_state != added_states_.end(); ++new_state) {
HmiStatePtr state = std::make_shared<HmiState>(
static_cast<std::shared_ptr<Application> >(mock_app_),
@@ -147,16 +169,16 @@ TEST_F(ApplicationStateTest, AddStatesAddPostponedState_GetPostponedState) {
TEST_F(ApplicationStateTest, AddStates_GetRegularState) {
// Add state
std::vector<StateID>::iterator new_state = added_states_.begin();
- HmiStatePtr state = std::make_shared<HmiState>(
+ initial_state_ = std::make_shared<HmiState>(
static_cast<std::shared_ptr<Application> >(mock_app_),
app_mngr_,
*new_state);
- state->set_hmi_level(HMILevel::HMI_FULL);
- app_state.AddState(kDefaultWindowId, state);
+ initial_state_->set_hmi_level(HMILevel::HMI_FULL);
+ app_state.InitState(kDefaultWindowId, std::string(), initial_state_);
++new_state;
// Add some other
for (; new_state != added_states_.end(); ++new_state) {
- state = std::make_shared<HmiState>(
+ HmiStatePtr state = std::make_shared<HmiState>(
static_cast<std::shared_ptr<Application> >(mock_app_),
app_mngr_,
*new_state);
@@ -165,24 +187,25 @@ TEST_F(ApplicationStateTest, AddStates_GetRegularState) {
}
// Regular state will be the first added state
- new_state = added_states_.begin();
HmiStatePtr reg_state =
app_state.GetState(kDefaultWindowId, StateID::STATE_ID_REGULAR);
- EXPECT_EQ(*new_state, reg_state->state_id());
+ EXPECT_EQ(StateID::STATE_ID_REGULAR, reg_state->state_id());
EXPECT_EQ(HMILevel::HMI_FULL, reg_state->hmi_level());
}
-TEST_F(ApplicationStateTest, AddRegularState_RemoveFirstState_GetRegularState) {
+TEST_F(ApplicationStateTest,
+ AddRegularState_ReplaceFirstState_GetRegularState) {
std::vector<StateID>::iterator new_state = added_states_.begin();
- HmiStatePtr state = std::make_shared<HmiState>(
+ initial_state_ = std::make_shared<HmiState>(
static_cast<std::shared_ptr<Application> >(mock_app_),
app_mngr_,
*new_state);
- app_state.AddState(kDefaultWindowId, state);
+ initial_state_->set_hmi_level(HMILevel::HMI_FULL);
+ app_state.InitState(kDefaultWindowId, std::string(), initial_state_);
++new_state;
// Add postponed state
- state = std::make_shared<HmiState>(
+ HmiStatePtr state = std::make_shared<HmiState>(
static_cast<std::shared_ptr<Application> >(mock_app_),
app_mngr_,
postponed_id);
@@ -201,91 +224,92 @@ TEST_F(ApplicationStateTest, AddRegularState_RemoveFirstState_GetRegularState) {
}
// Regular state will be the first added state
- new_state = added_states_.begin();
HmiStatePtr reg_state =
app_state.GetState(kDefaultWindowId, StateID::STATE_ID_REGULAR);
- ASSERT_EQ(*new_state, reg_state->state_id());
+ ASSERT_EQ(StateID::STATE_ID_REGULAR, reg_state->state_id());
+ EXPECT_EQ(HMILevel::HMI_FULL, reg_state->hmi_level());
- app_state.RemoveState(kDefaultWindowId, *new_state);
+ state = std::make_shared<HmiState>(
+ static_cast<std::shared_ptr<Application> >(mock_app_),
+ app_mngr_,
+ StateID::STATE_ID_REGULAR);
+ state->set_hmi_level(HMILevel::HMI_BACKGROUND);
+ app_state.AddState(kDefaultWindowId, state);
- ++new_state;
- // Now regular state is the next state except postponed
+ // Regular state was replaced
reg_state = app_state.GetState(kDefaultWindowId, StateID::STATE_ID_REGULAR);
- EXPECT_EQ(*new_state, reg_state->state_id());
+ EXPECT_EQ(StateID::STATE_ID_REGULAR, reg_state->state_id());
+ EXPECT_EQ(HMILevel::HMI_BACKGROUND, reg_state->hmi_level());
}
TEST_F(ApplicationStateTest, AddRegularState_PreviousStatePostponed) {
- // Add some state
- StateID first_state = StateID::STATE_ID_PHONE_CALL;
- HmiStatePtr state = std::make_shared<HmiState>(
+ // Add initial state
+ StateID first_state = StateID::STATE_ID_REGULAR;
+ initial_state_ = std::make_shared<HmiState>(
static_cast<std::shared_ptr<Application> >(mock_app_),
app_mngr_,
first_state);
- app_state.AddState(kDefaultWindowId, state);
+ initial_state_->set_hmi_level(HMILevel::HMI_BACKGROUND);
+ app_state.InitState(kDefaultWindowId, std::string(), initial_state_);
// Add postponed state
- state = std::make_shared<HmiState>(
+ HmiStatePtr state = std::make_shared<HmiState>(
static_cast<std::shared_ptr<Application> >(mock_app_),
app_mngr_,
postponed_id);
+ state->set_hmi_level(HMILevel::HMI_LIMITED);
app_state.AddState(kDefaultWindowId, state);
// Add new postponed state
- std::shared_ptr<MockApplication> mock_app_2(new MockApplication);
state = std::make_shared<HmiState>(
static_cast<std::shared_ptr<Application> >(mock_app_),
app_mngr_,
postponed_id);
+ state->set_hmi_level(HMILevel::HMI_FULL);
app_state.AddState(kDefaultWindowId, state);
- // Add regular state
- state = std::make_shared<HmiState>(
- static_cast<std::shared_ptr<Application> >(mock_app_),
- app_mngr_,
- StateID::STATE_ID_REGULAR);
- app_state.AddState(kDefaultWindowId, state);
-
- // Postponed state is the first
- HmiStatePtr reg_state =
- app_state.GetState(kDefaultWindowId, StateID::STATE_ID_POSTPONED);
+ // Postponed state is returned
+ HmiStatePtr reg_state = app_state.GetState(kDefaultWindowId, postponed_id);
ASSERT_EQ(postponed_id, reg_state->state_id());
+ EXPECT_EQ(HMILevel::HMI_FULL, reg_state->hmi_level());
- // Regular state is the second one
+ // Regular state is returned
reg_state = app_state.GetState(kDefaultWindowId, StateID::STATE_ID_REGULAR);
EXPECT_EQ(StateID::STATE_ID_REGULAR, reg_state->state_id());
+ EXPECT_EQ(HMILevel::HMI_BACKGROUND, reg_state->hmi_level());
}
TEST_F(ApplicationStateTest, InitState_GetRegularState) {
StateID init_state = StateID::STATE_ID_REGULAR;
- HmiStatePtr state = std::make_shared<HmiState>(
+ initial_state_ = std::make_shared<HmiState>(
static_cast<std::shared_ptr<Application> >(mock_app_),
app_mngr_,
init_state);
- app_state.InitState(kDefaultWindowId, kDefaultWindowName, state);
+ app_state.InitState(kDefaultWindowId, kDefaultWindowName, initial_state_);
HmiStatePtr reg_state =
app_state.GetState(kDefaultWindowId, StateID::STATE_ID_REGULAR);
- EXPECT_EQ(state, reg_state);
+ EXPECT_EQ(initial_state_, reg_state);
HmiStatePtr curr_state =
app_state.GetState(kDefaultWindowId, StateID::STATE_ID_CURRENT);
- EXPECT_EQ(state, curr_state);
+ EXPECT_EQ(initial_state_, curr_state);
}
-TEST_F(ApplicationStateTest, AddPosponedState_DeletePosponedState) {
+TEST_F(ApplicationStateTest, AddPostponedState_DeletePosponedState) {
// Precondition
StateID init_state = StateID::STATE_ID_REGULAR;
- HmiStatePtr state = std::make_shared<HmiState>(
+ initial_state_ = std::make_shared<HmiState>(
static_cast<std::shared_ptr<Application> >(mock_app_),
app_mngr_,
init_state);
- state->set_hmi_level(mobile_apis::HMILevel::HMI_FULL);
+ initial_state_->set_hmi_level(mobile_apis::HMILevel::HMI_FULL);
- app_state.InitState(kDefaultWindowId, kDefaultWindowName, state);
+ app_state.InitState(kDefaultWindowId, kDefaultWindowName, initial_state_);
// Add postponed state
- state = std::make_shared<HmiState>(
+ HmiStatePtr state = std::make_shared<HmiState>(
static_cast<std::shared_ptr<Application> >(mock_app_),
app_mngr_,
postponed_id);
@@ -305,19 +329,19 @@ TEST_F(ApplicationStateTest, AddPosponedState_DeletePosponedState) {
TEST_F(ApplicationStateTest,
AddRegularState_RemoveRegularState_RegularStateNotDeleted) {
- StateID reg_state = StateID::STATE_ID_REGULAR;
- HmiStatePtr state = std::make_shared<HmiState>(
+ StateID init_state = StateID::STATE_ID_REGULAR;
+ initial_state_ = std::make_shared<HmiState>(
static_cast<std::shared_ptr<Application> >(mock_app_),
app_mngr_,
- reg_state);
- app_state.InitState(kDefaultWindowId, kDefaultWindowName, state);
+ init_state);
+ app_state.InitState(kDefaultWindowId, kDefaultWindowName, initial_state_);
// Try deleting regular state
- app_state.RemoveState(kDefaultWindowId, reg_state);
+ app_state.RemoveState(kDefaultWindowId, init_state);
// Get regular state
- HmiStatePtr get_reg_state = app_state.GetState(kDefaultWindowId, reg_state);
- EXPECT_EQ(state, get_reg_state);
+ HmiStatePtr get_reg_state = app_state.GetState(kDefaultWindowId, init_state);
+ EXPECT_EQ(initial_state_, get_reg_state);
}
} // namespace application_manager_test
diff --git a/src/components/application_manager/test/commands/command_request_impl_test.cc b/src/components/application_manager/test/commands/command_request_impl_test.cc
index 83b5d7eeb4..9034bf442f 100644
--- a/src/components/application_manager/test/commands/command_request_impl_test.cc
+++ b/src/components/application_manager/test/commands/command_request_impl_test.cc
@@ -543,8 +543,8 @@ TEST_F(CommandRequestImplTest, HashUpdateAllowed_UpdateExpected) {
EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
- const bool is_succedeed = true;
- command->SendResponse(is_succedeed, kMobResultSuccess, NULL, NULL);
+ const bool is_succeeded = true;
+ command->SendResponse(is_succeeded, kMobResultSuccess, NULL, NULL);
MockAppPtr mock_app = CreateMockApp();
EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app));
@@ -564,8 +564,8 @@ TEST_F(CommandRequestImplTest, HashUpdateDisallowed_HashUpdateNotExpected) {
EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
- const bool is_succedeed = true;
- command->SendResponse(is_succedeed, kMobResultSuccess, NULL, NULL);
+ const bool is_succeeded = true;
+ command->SendResponse(is_succeeded, kMobResultSuccess, NULL, NULL);
MockAppPtr mock_app = CreateMockApp();
EXPECT_CALL(*mock_app, UpdateHash()).Times(0);
@@ -583,8 +583,8 @@ TEST_F(CommandRequestImplTest, RequestFailed_HashUpdateNotExpected) {
EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
- const bool is_succedeed = false;
- command->SendResponse(is_succedeed, kMobResultSuccess, NULL, NULL);
+ const bool is_succeeded = false;
+ command->SendResponse(is_succeeded, kMobResultSuccess, NULL, NULL);
MockAppPtr mock_app = CreateMockApp();
EXPECT_CALL(*mock_app, UpdateHash()).Times(0);
@@ -602,8 +602,8 @@ TEST_F(CommandRequestImplTest, AppNotFound_HashUpdateNotExpected) {
EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
- const bool is_succedeed = true;
- command->SendResponse(is_succedeed, kMobResultSuccess, NULL, NULL);
+ const bool is_succeeded = true;
+ command->SendResponse(is_succeeded, kMobResultSuccess, NULL, NULL);
MockAppPtr mock_app = CreateMockApp();
EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(MockAppPtr()));
diff --git a/src/components/application_manager/test/hmi_capabilities.json b/src/components/application_manager/test/hmi_capabilities.json
deleted file mode 100644
index afa5fa6056..0000000000
--- a/src/components/application_manager/test/hmi_capabilities.json
+++ /dev/null
@@ -1,731 +0,0 @@
-{
- "UI": {
- "language":"EN_US",
- "languages":[
- "EN_US",
- "ES_MX",
- "FR_CA",
- "DE_DE",
- "ES_ES",
- "EN_GB",
- "RU_RU",
- "TR_TR",
- "PL_PL",
- "FR_FR",
- "IT_IT",
- "SV_SE",
- "PT_PT",
- "NL_NL",
- "ZH_TW",
- "JA_JP",
- "AR_SA",
- "KO_KR",
- "PT_BR",
- "CS_CZ",
- "DA_DK",
- "NO_NO",
- "NL_BE",
- "EL_GR",
- "HU_HU",
- "FI_FI",
- "SK_SK",
- "EN_IN",
- "TH_TH",
- "EN_SA",
- "HE_IL",
- "RO_RO",
- "UK_UA",
- "ID_ID",
- "VI_VN",
- "MS_MY",
- "HI_IN"
- ],
- "displayCapabilities": {
- "displayType": "GEN2_8_DMA",
- "displayName": "GENERIC_DISPLAY",
- "textFields": [
- {
- "name": "mainField1",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "mainField2",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "mainField3",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "mainField4",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "statusBar",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "mediaClock",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "mediaTrack",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "alertText1",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "alertText2",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "alertText3",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "scrollableMessageBody",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "initialInteractionText",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "navigationText1",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "navigationText2",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "ETA",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "totalDistance",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "navigationText",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "audioPassThruDisplayText1",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "audioPassThruDisplayText2",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "sliderHeader",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "sliderFooter",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "notificationText",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "menuName",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "secondaryText",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "tertiaryText",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "timeToDestination",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "turnText",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- },
- {
- "name": "menuTitle",
- "characterSet": "TYPE2SET",
- "width": 500,
- "rows": 1
- }
- ],
- "imageFields": [
- {
- "name": "softButtonImage",
- "imageTypeSupported": [
- "GRAPHIC_PNG"
- ],
- "imageResolution": {
- "resolutionWidth": 35,
- "resolutionHeight": 35
- }
- },
- {
- "name": "choiceImage",
- "imageTypeSupported": [
- "GRAPHIC_PNG"
- ],
- "imageResolution": {
- "resolutionWidth": 35,
- "resolutionHeight": 35
- }
- },
- {
- "name": "choiceSecondaryImage",
- "imageTypeSupported": [
- "GRAPHIC_PNG"
- ],
- "imageResolution": {
- "resolutionWidth": 35,
- "resolutionHeight": 35
- }
- },
- {
- "name": "menuIcon",
- "imageTypeSupported": [
- "GRAPHIC_PNG"
- ],
- "imageResolution": {
- "resolutionWidth": 35,
- "resolutionHeight": 35
- }
- },
- {
- "name": "cmdIcon",
- "imageTypeSupported": [
- "GRAPHIC_PNG"
- ],
- "imageResolution": {
- "resolutionWidth": 35,
- "resolutionHeight": 35
- }
- },
- {
- "name": "appIcon",
- "imageTypeSupported": [
- "GRAPHIC_PNG"
- ],
- "imageResolution": {
- "resolutionWidth": 35,
- "resolutionHeight": 35
- }
- },
- {
- "name": "graphic",
- "imageTypeSupported": [
- "GRAPHIC_PNG"
- ],
- "imageResolution": {
- "resolutionWidth": 35,
- "resolutionHeight": 35
- }
- },
- {
- "name": "secondaryGraphic",
- "imageTypeSupported": [
- "GRAPHIC_PNG"
- ],
- "imageResolution": {
- "resolutionWidth": 35,
- "resolutionHeight": 35
- }
- },
- {
- "name": "locationImage",
- "imageTypeSupported": [
- "GRAPHIC_PNG"
- ],
- "imageResolution": {
- "resolutionWidth": 35,
- "resolutionHeight": 35
- }
- }
-
- ],
- "mediaClockFormats": [
- "CLOCK1",
- "CLOCK2",
- "CLOCK3",
- "CLOCKTEXT1",
- "CLOCKTEXT2",
- "CLOCKTEXT3",
- "CLOCKTEXT4"
- ],
- "graphicSupported": true,
- "templatesAvailable": [
-
- "DEFAULT",
- "MEDIA",
- "NON-MEDIA",
- "ONSCREEN_PRESETS",
- "NAV_FULLSCREEN_MAP",
- "NAV_KEYBOARD",
- "GRAPHIC_WITH_TEXT",
- "TEXT_WITH_GRAPHIC",
- "TILES_ONLY",
- "TEXTBUTTONS_ONLY",
- "GRAPHIC_WITH_TILES",
- "TILES_WITH_GRAPHIC",
- "GRAPHIC_WITH_TEXT_AND_SOFTBUTTONS",
- "TEXT_AND_SOFTBUTTONS_WITH_GRAPHIC",
- "GRAPHIC_WITH_TEXTBUTTONS",
- "TEXTBUTTONS_WITH_GRAPHIC",
- "LARGE_GRAPHIC_WITH_SOFTBUTTONS",
- "DOUBLE_GRAPHIC_WITH_SOFTBUTTONS",
- "LARGE_GRAPHIC_ONLY"
- ],
- "screenParams": {
- "resolution": {
- "resolutionWidth": 800,
- "resolutionHeight": 350
- },
- "touchEventAvailable": {
- "pressAvailable": true,
- "multiTouchAvailable": false,
- "doublePressAvailable": false
- }
- },
- "numCustomPresetsAvailable": 8,
- "imageCapabilities": [
- "DYNAMIC",
- "STATIC"
- ]
- },
- "audioPassThruCapabilities": [{
- "samplingRate": "44KHZ",
- "bitsPerSample": "RATE_8_BIT",
- "audioType": "PCM"
- }],
- "pcmStreamCapabilities": {
- "samplingRate": "16KHZ",
- "bitsPerSample": "RATE_16_BIT",
- "audioType": "PCM"
- },
- "hmiZoneCapabilities": "FRONT",
- "softButtonCapabilities": [
- {
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true,
- "imageSupported": true
- }
- ],
- "systemCapabilities": {
- "navigationCapability": {
- "sendLocationEnabled": true,
- "getWayPointsEnabled": true
- },
- "phoneCapability": {
- "dialNumberEnabled": true
- },
-
- "remoteControlCapability":{
- "climateControlCapabilities": [
- {
- "moduleName": "primary_climate",
- "fanSpeedAvailable": true,
- "desiredTemperatureAvailable": true,
- "acEnableAvailable": true,
- "acMaxEnableAvailable": true,
- "circulateAirEnableAvailable": true,
- "autoModeEnableAvailable": true,
- "dualModeEnableAvailable": true,
- "defrostZoneAvailable": true,
- "ventilationModeAvailable": true,
- "defrostZone": [
- "FRONT",
- "REAR",
- "ALL",
- "NONE"
- ],
- "ventilationMode": [
- "UPPER",
- "LOWER",
- "BOTH",
- "NONE"
- ]
- }
- ],
- "radioControlCapabilities": [
- {
- "moduleName": "radio",
- "radioEnableAvailable": true,
- "radioBandAvailable": true,
- "radioFrequencyAvailable": true,
- "hdChannelAvailable": true,
- "rdsDataAvailable": true,
- "availableHDsAvailable": true,
- "stateAvailable": true,
- "signalStrengthAvailable": true,
- "signalChangeThresholdAvailable": true
- }
- ],
- "buttonCapabilities": [
- {
- "name": "AC_MAX",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "AC",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "RECIRCULATE",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "FAN_UP",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "FAN_DOWN",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "TEMP_UP",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "TEMP_DOWN",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "DEFROST_MAX",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "DEFROST",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "DEFROST_REAR",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "UPPER_VENT",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "LOWER_VENT",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "VOLUME_UP",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "VOLUME_DOWN",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "EJECT",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "SOURCE",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "SHUFFLE",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "REPEAT",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- }
- ]
- },
- "videoStreamingCapability": {
- "preferredResolution": {
- "resolutionWidth": 800,
- "resolutionHeight": 350
- },
- "maxBitrate": 10000,
- "supportedFormats": [
- {
- "protocol": "RAW",
- "codec": "H264"
- },
- {
- "protocol": "RTP",
- "codec": "Theora"
- }
- ],
- "hapticSpatialDataSupported": true
- }
- }
- },
- "VR": {
- "capabilities": [
- "TEXT"
- ],
- "language": "ES_MX",
- "languages": [
- "AR_SA",
- "EN_US",
- "ES_MX",
- "FR_CA",
- "DE_DE",
- "ES_ES",
- "EN_GB",
- "RU_RU",
- "TR_TR",
- "PL_PL",
- "FR_FR",
- "IT_IT",
- "SV_SE",
- "PT_PT",
- "NL_NL",
- "ZH_TW",
- "JA_JP",
- "KO_KR",
- "PT_BR",
- "CS_CZ",
- "DA_DK",
- "NO_NO"
- ]
- },
- "TTS": {
- "capabilities": [
- "TEXT"
- ],
- "language": "DE_DE",
- "languages": [
- "DA_DK",
- "CS_CZ",
- "KO_KR",
- "EN_US",
- "ES_MX",
- "FR_CA",
- "DE_DE",
- "ES_ES",
- "EN_GB",
- "RU_RU",
- "TR_TR",
- "PL_PL",
- "FR_FR",
- "IT_IT",
- "SV_SE",
- "PT_PT",
- "NL_NL",
- "ZH_TW",
- "JA_JP",
- "AR_SA",
- "PT_BR",
- "NO_NO"
- ]
- },
- "Buttons": {
- "capabilities": [
- {
- "name": "PRESET_0",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_1",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_2",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_3",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_4",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_5",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_6",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_7",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_8",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_9",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "OK",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PLAY_PAUSE",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "SEEKLEFT",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "SEEKRIGHT",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "TUNEUP",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "TUNEDOWN",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- }
- ],
- "presetBankCapabilities": {
- "onScreenPresetsAvailable": true
- }
- },
- "VehicleInfo": {
- "make": "Ford",
- "model": "Fiesta",
- "modelYear": "2013",
- "trim": "SE"
- },
- "SyncMessageVersion": {
- "majorVersion": 3,
- "minorVersion": 0
- }
-}
diff --git a/src/components/application_manager/test/hmi_capabilities_old_apt.json b/src/components/application_manager/test/hmi_capabilities_old_apt.json
index 5a5af37e2f..56ae151caa 100644
--- a/src/components/application_manager/test/hmi_capabilities_old_apt.json
+++ b/src/components/application_manager/test/hmi_capabilities_old_apt.json
@@ -2,7 +2,7 @@
"UI": {
"audioPassThruCapabilities": {
"samplingRate": "22KHZ",
- "bitsPerSample": "RATE_16_BIT",
+ "bitsPerSample": "16_BIT",
"audioType": "PCM"
}
}
diff --git a/src/components/application_manager/test/hmi_capabilities_sc2.json b/src/components/application_manager/test/hmi_capabilities_sc2.json
index a8578f04f5..318fcf7a3e 100644
--- a/src/components/application_manager/test/hmi_capabilities_sc2.json
+++ b/src/components/application_manager/test/hmi_capabilities_sc2.json
@@ -1,5 +1,11 @@
{
"UI": {
+ "language": "EN_US",
+ "languages": [
+ "EN_US",
+ "ES_MX",
+ "FR_CA"
+ ],
"systemCapabilities": {
"navigationCapability": {
"sendLocationEnabled": true,
diff --git a/src/components/application_manager/test/hmi_capabilities_test.cc b/src/components/application_manager/test/hmi_capabilities_test.cc
index 6234830f50..4e2e948335 100644
--- a/src/components/application_manager/test/hmi_capabilities_test.cc
+++ b/src/components/application_manager/test/hmi_capabilities_test.cc
@@ -33,7 +33,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "application_manager/hmi_capabilities_impl.h"
+
+#include <algorithm>
+#include <memory>
#include <string>
+#include <vector>
#include "application_manager/hmi_capabilities.h"
#include "application_manager/mock_message_helper.h"
@@ -42,238 +47,254 @@
#include "smart_objects/enum_schema_item.h"
#include "smart_objects/smart_object.h"
-#include "application_manager/hmi_capabilities_for_testing.h"
#include "application_manager/mock_application_manager.h"
#include "application_manager/mock_application_manager_settings.h"
#include "application_manager/mock_event_dispatcher.h"
#include "application_manager/mock_rpc_service.h"
#include "application_manager/resumption/resume_ctrl.h"
#include "application_manager/state_controller.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
#include "resumption/last_state_impl.h"
#include "resumption/last_state_wrapper_impl.h"
#include "utils/file_system.h"
+#include "utils/jsoncpp_reader_wrapper.h"
namespace test {
namespace components {
namespace application_manager_test {
+namespace {
+const std::string kAppInfoDataFile = "./app_info_data";
+const std::string kAppStorageFolder = "app_storage_folder";
+const std::string kAppInfoStorage = "app_info_storage";
+const std::string kHmiCapabilitiesDefaultFile = "hmi_capabilities.json";
+const std::string kHmiCapabilitiesCacheFile = "hmi_capabilities_cache.json";
+const uint32_t kEqualizerMaxChanelId = 10;
+} // namespace
+
using ::testing::_;
-using ::testing::AtLeast;
-using ::testing::InSequence;
using ::testing::Invoke;
+using ::testing::NiceMock;
using ::testing::Return;
using ::testing::ReturnRef;
using namespace application_manager;
+const std::vector<hmi_apis::Common_LightName::eType> light_name_enum_values{
+ hmi_apis::Common_LightName::eType::FRONT_LEFT_HIGH_BEAM,
+ hmi_apis::Common_LightName::eType::FRONT_RIGHT_HIGH_BEAM,
+ hmi_apis::Common_LightName::eType::FRONT_LEFT_LOW_BEAM,
+ hmi_apis::Common_LightName::eType::FRONT_RIGHT_LOW_BEAM,
+ hmi_apis::Common_LightName::eType::FRONT_LEFT_PARKING_LIGHT,
+ hmi_apis::Common_LightName::eType::FRONT_RIGHT_PARKING_LIGHT,
+ hmi_apis::Common_LightName::eType::FRONT_LEFT_FOG_LIGHT,
+ hmi_apis::Common_LightName::eType::FRONT_RIGHT_FOG_LIGHT,
+ hmi_apis::Common_LightName::eType::FRONT_LEFT_DAYTIME_RUNNING_LIGHT,
+ hmi_apis::Common_LightName::eType::FRONT_RIGHT_DAYTIME_RUNNING_LIGHT,
+ hmi_apis::Common_LightName::eType::FRONT_LEFT_TURN_LIGHT,
+ hmi_apis::Common_LightName::eType::FRONT_RIGHT_TURN_LIGHT,
+ hmi_apis::Common_LightName::eType::REAR_LEFT_FOG_LIGHT,
+ hmi_apis::Common_LightName::eType::REAR_RIGHT_FOG_LIGHT,
+ hmi_apis::Common_LightName::eType::REAR_LEFT_TAIL_LIGHT,
+ hmi_apis::Common_LightName::eType::REAR_RIGHT_TAIL_LIGHT,
+ hmi_apis::Common_LightName::eType::REAR_LEFT_BRAKE_LIGHT,
+ hmi_apis::Common_LightName::eType::REAR_RIGHT_BRAKE_LIGHT,
+ hmi_apis::Common_LightName::eType::REAR_LEFT_TURN_LIGHT,
+ hmi_apis::Common_LightName::eType::REAR_RIGHT_TURN_LIGHT,
+ hmi_apis::Common_LightName::eType::REAR_REGISTRATION_PLATE_LIGHT,
+ hmi_apis::Common_LightName::eType::HIGH_BEAMS,
+ hmi_apis::Common_LightName::eType::LOW_BEAMS,
+ hmi_apis::Common_LightName::eType::FOG_LIGHTS,
+ hmi_apis::Common_LightName::eType::RUNNING_LIGHTS,
+ hmi_apis::Common_LightName::eType::PARKING_LIGHTS,
+ hmi_apis::Common_LightName::eType::BRAKE_LIGHTS,
+ hmi_apis::Common_LightName::eType::REAR_REVERSING_LIGHTS,
+ hmi_apis::Common_LightName::eType::SIDE_MARKER_LIGHTS,
+ hmi_apis::Common_LightName::eType::LEFT_TURN_LIGHTS,
+ hmi_apis::Common_LightName::eType::RIGHT_TURN_LIGHTS,
+ hmi_apis::Common_LightName::eType::HAZARD_LIGHTS,
+ hmi_apis::Common_LightName::eType::REAR_CARGO_LIGHTS,
+ hmi_apis::Common_LightName::eType::REAR_TRUCK_BED_LIGHTS,
+ hmi_apis::Common_LightName::eType::REAR_TRAILER_LIGHTS,
+ hmi_apis::Common_LightName::eType::LEFT_SPOT_LIGHTS,
+ hmi_apis::Common_LightName::eType::RIGHT_SPOT_LIGHTS,
+ hmi_apis::Common_LightName::eType::LEFT_PUDDLE_LIGHTS,
+ hmi_apis::Common_LightName::eType::RIGHT_PUDDLE_LIGHTS,
+ hmi_apis::Common_LightName::eType::AMBIENT_LIGHTS,
+ hmi_apis::Common_LightName::eType::OVERHEAD_LIGHTS,
+ hmi_apis::Common_LightName::eType::READING_LIGHTS,
+ hmi_apis::Common_LightName::eType::TRUNK_LIGHTS,
+ hmi_apis::Common_LightName::eType::EXTERIOR_FRONT_LIGHTS,
+ hmi_apis::Common_LightName::eType::EXTERIOR_REAR_LIGHTS,
+ hmi_apis::Common_LightName::eType::EXTERIOR_LEFT_LIGHTS,
+ hmi_apis::Common_LightName::eType::EXTERIOR_RIGHT_LIGHTS,
+ hmi_apis::Common_LightName::eType::EXTERIOR_ALL_LIGHTS};
+
+bool IsLightNameExists(const hmi_apis::Common_LightName::eType& light_name) {
+ auto it = std::find(
+ light_name_enum_values.begin(), light_name_enum_values.end(), light_name);
+ return !(it == light_name_enum_values.end());
+}
+
class HMICapabilitiesTest : public ::testing::Test {
protected:
HMICapabilitiesTest()
: last_state_wrapper_(std::make_shared<resumption::LastStateWrapperImpl>(
- std::make_shared<resumption::LastStateImpl>("app_storage_folder",
- "app_info_storage")))
- , file_name_("hmi_capabilities.json") {}
- virtual void SetUp() OVERRIDE {
- EXPECT_CALL(app_mngr_, event_dispatcher())
- .WillOnce(ReturnRef(mock_event_dispatcher));
- EXPECT_CALL(app_mngr_, get_settings())
- .WillRepeatedly(ReturnRef(mock_application_manager_settings_));
- EXPECT_CALL(mock_application_manager_settings_,
- hmi_capabilities_file_name())
- .WillOnce(ReturnRef(file_name_));
- EXPECT_CALL(mock_event_dispatcher, add_observer(_, _, _)).Times(1);
- EXPECT_CALL(mock_event_dispatcher, remove_observer(_)).Times(1);
- EXPECT_CALL(mock_application_manager_settings_, launch_hmi())
- .WillOnce(Return(false));
- hmi_capabilities_test =
- std::make_shared<HMICapabilitiesForTesting>(app_mngr_);
- hmi_capabilities_test->Init(last_state_wrapper_);
+ std::make_shared<resumption::LastStateImpl>(kAppStorageFolder,
+ kAppInfoStorage))) {}
+
+ void SetUp() OVERRIDE {
+ ON_CALL(mock_app_mngr_, event_dispatcher())
+ .WillByDefault(ReturnRef(mock_event_dispatcher_));
+ ON_CALL(mock_app_mngr_, get_settings())
+ .WillByDefault(ReturnRef(mock_application_manager_settings_));
+ ON_CALL(mock_application_manager_settings_, hmi_capabilities_file_name())
+ .WillByDefault(ReturnRef(kHmiCapabilitiesDefaultFile));
+ ON_CALL(mock_application_manager_settings_,
+ hmi_capabilities_cache_file_name())
+ .WillByDefault(ReturnRef(kHmiCapabilitiesCacheFile));
+
+ hmi_capabilities_ = std::make_shared<HMICapabilitiesImpl>(mock_app_mngr_);
}
void TearDown() OVERRIDE {
- hmi_capabilities_test.reset();
- }
- static void TearDownTestCase() {
- if (file_system::FileExists("./app_info_data")) {
- EXPECT_TRUE(::file_system::DeleteFile("./app_info_data"));
- }
- }
-
- void SetCooperating();
- MockApplicationManager app_mngr_;
- event_engine_test::MockEventDispatcher mock_event_dispatcher;
- resumption::LastStateWrapperPtr last_state_wrapper_;
- MockApplicationManagerSettings mock_application_manager_settings_;
- std::shared_ptr<HMICapabilitiesForTesting> hmi_capabilities_test;
- const std::string file_name_;
- application_manager_test::MockRPCService mock_rpc_service_;
-};
-
-const char* const cstring_values_[] = {
- "EN_US", "ES_MX", "FR_CA", "DE_DE", "ES_ES", "EN_GB", "RU_RU", "TR_TR",
- "PL_PL", "FR_FR", "IT_IT", "SV_SE", "PT_PT", "NL_NL", "EN_AU", "ZH_CN",
- "ZH_TW", "JA_JP", "AR_SA", "KO_KR", "PT_BR", "CS_CZ", "DA_DK", "NO_NO",
- "NL_BE", "EL_GR", "HU_HU", "FI_FI", "SK_SK", "EN_IN", "TH_TH", "EN_SA",
- "HE_IL", "RO_RO", "UK_UA", "ID_ID", "VI_VN", "MS_MY", "HI_IN"};
-
-const hmi_apis::Common_Language::eType enum_values_[] = {
- hmi_apis::Common_Language::EN_US, hmi_apis::Common_Language::ES_MX,
- hmi_apis::Common_Language::FR_CA, hmi_apis::Common_Language::DE_DE,
- hmi_apis::Common_Language::ES_ES, hmi_apis::Common_Language::EN_GB,
- hmi_apis::Common_Language::RU_RU, hmi_apis::Common_Language::TR_TR,
- hmi_apis::Common_Language::PL_PL, hmi_apis::Common_Language::FR_FR,
- hmi_apis::Common_Language::IT_IT, hmi_apis::Common_Language::SV_SE,
- hmi_apis::Common_Language::PT_PT, hmi_apis::Common_Language::NL_NL,
- hmi_apis::Common_Language::EN_AU, hmi_apis::Common_Language::ZH_CN,
- hmi_apis::Common_Language::ZH_TW, hmi_apis::Common_Language::JA_JP,
- hmi_apis::Common_Language::AR_SA, hmi_apis::Common_Language::KO_KR,
- hmi_apis::Common_Language::PT_BR, hmi_apis::Common_Language::CS_CZ,
- hmi_apis::Common_Language::DA_DK, hmi_apis::Common_Language::NO_NO,
- hmi_apis::Common_Language::NL_BE, hmi_apis::Common_Language::EL_GR,
- hmi_apis::Common_Language::HU_HU, hmi_apis::Common_Language::FI_FI,
- hmi_apis::Common_Language::SK_SK, hmi_apis::Common_Language::EN_IN,
- hmi_apis::Common_Language::TH_TH, hmi_apis::Common_Language::EN_SA,
- hmi_apis::Common_Language::HE_IL, hmi_apis::Common_Language::RO_RO,
- hmi_apis::Common_Language::UK_UA, hmi_apis::Common_Language::ID_ID,
- hmi_apis::Common_Language::VI_VN, hmi_apis::Common_Language::MS_MY,
- hmi_apis::Common_Language::HI_IN};
-
-struct CStringComparator {
- bool operator()(const char* a, const char* b) {
- return strcmp(a, b) < 0;
- }
-};
-
-typedef std::
- map<const char*, hmi_apis::Common_Language::eType, CStringComparator>
- CStringToEnumMap;
-
-CStringToEnumMap InitCStringToEnumMap() {
- size_t value = sizeof(cstring_values_) / sizeof(cstring_values_[0]);
- CStringToEnumMap result;
- for (size_t i = 0; i < value; ++i) {
- result[cstring_values_[i]] = enum_values_[i];
+ DeleteFileIfExists(kHmiCapabilitiesCacheFile);
+ DeleteFileIfExists(kAppInfoDataFile);
+ hmi_capabilities_.reset();
}
- return result;
-}
-bool StringToEnum(const char* str, hmi_apis::Common_Language::eType& value) {
- size_t count_value = sizeof(cstring_values_) / sizeof(cstring_values_[0]);
- CStringToEnumMap result;
- for (size_t i = 0; i < count_value; ++i) {
- result[cstring_values_[i]] = enum_values_[i];
+ void CreateFile(const std::string& file_name) {
+ file_system::CreateFile(file_name);
+ ASSERT_TRUE(file_system::FileExists(file_name));
}
- CStringToEnumMap::const_iterator it = result.find(str);
- if (it == result.end()) {
- return false;
+ void DeleteFileIfExists(const std::string& file_path) {
+ if (file_system::FileExists(file_path)) {
+ EXPECT_TRUE(::file_system::DeleteFile(file_path));
+ }
}
- value = it->second;
- return true;
-}
-hmi_apis::Common_Language::eType TestCommonLanguageFromString(
- const std::string& language) {
- hmi_apis::Common_Language::eType value;
- if (StringToEnum(language.c_str(), value)) {
- return value;
+ void SetUpLanguageAndLightCapabilitiesExpectation() {
+ ON_CALL(mock_app_mngr_, IsSOStructValid(_, _)).WillByDefault(Return(true));
}
- return hmi_apis::Common_Language::INVALID_ENUM;
-}
-
-TEST_F(HMICapabilitiesTest, LoadCapabilitiesFromFile) {
- const std::string hmi_capabilities_file = "hmi_capabilities.json";
- EXPECT_CALL(mock_application_manager_settings_, hmi_capabilities_file_name())
- .WillOnce(ReturnRef(hmi_capabilities_file));
- EXPECT_CALL(*(MockMessageHelper::message_helper_mock()),
- CommonLanguageFromString(_))
- .WillRepeatedly(Invoke(TestCommonLanguageFromString));
- if (file_system::FileExists("./app_info_data")) {
- EXPECT_TRUE(::file_system::DeleteFile("./app_info_data"));
- }
- EXPECT_CALL(app_mngr_, IsSOStructValid(_, _)).WillOnce(Return(true));
+ std::shared_ptr<HMICapabilitiesImpl> hmi_capabilities_;
+ NiceMock<MockApplicationManager> mock_app_mngr_;
+ NiceMock<event_engine_test::MockEventDispatcher> mock_event_dispatcher_;
+ NiceMock<MockApplicationManagerSettings> mock_application_manager_settings_;
+ resumption::LastStateWrapperPtr last_state_wrapper_;
+ smart_objects::CSmartSchema schema_;
+};
- EXPECT_TRUE(hmi_capabilities_test->LoadCapabilitiesFromFile());
+TEST_F(HMICapabilitiesTest,
+ Init_CheckActiveLanguages_SuccesSetupDefaultLanguages) {
+ SetUpLanguageAndLightCapabilitiesExpectation();
+ hmi_capabilities_->Init(last_state_wrapper_);
- // Check active languages
EXPECT_EQ(hmi_apis::Common_Language::EN_US,
- hmi_capabilities_test->active_ui_language());
- EXPECT_EQ(hmi_apis::Common_Language::ES_MX,
- hmi_capabilities_test->active_vr_language());
- EXPECT_EQ(hmi_apis::Common_Language::DE_DE,
- hmi_capabilities_test->active_tts_language());
+ hmi_capabilities_->active_ui_language());
+ EXPECT_EQ(hmi_apis::Common_Language::EN_US,
+ hmi_capabilities_->active_vr_language());
+ EXPECT_EQ(hmi_apis::Common_Language::EN_US,
+ hmi_capabilities_->active_tts_language());
+}
- // Check UI languages
- const smart_objects::SmartObject ui_supported_languages =
- *(hmi_capabilities_test->ui_supported_languages());
+TEST_F(HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckUILanguages_SuccessLoadAndConvert) {
+ SetUpLanguageAndLightCapabilitiesExpectation();
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto ui_supported_languages_so =
+ *(hmi_capabilities_->ui_supported_languages());
EXPECT_EQ(hmi_apis::Common_Language::EN_US,
static_cast<hmi_apis::Common_Language::eType>(
- ui_supported_languages[0].asInt()));
+ ui_supported_languages_so[0].asInt()));
EXPECT_EQ(hmi_apis::Common_Language::ES_MX,
static_cast<hmi_apis::Common_Language::eType>(
- ui_supported_languages[1].asInt()));
+ ui_supported_languages_so[1].asInt()));
EXPECT_EQ(hmi_apis::Common_Language::FR_CA,
static_cast<hmi_apis::Common_Language::eType>(
- ui_supported_languages[2].asInt()));
+ ui_supported_languages_so[2].asInt()));
+}
- // Check VR languages
- const smart_objects::SmartObject vr_supported_languages =
- *(hmi_capabilities_test->vr_supported_languages());
+TEST_F(HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckVRLanguages_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto vr_supported_languages_so =
+ *(hmi_capabilities_->vr_supported_languages());
- EXPECT_EQ(hmi_apis::Common_Language::AR_SA,
- static_cast<hmi_apis::Common_Language::eType>(
- vr_supported_languages[0].asInt()));
EXPECT_EQ(hmi_apis::Common_Language::EN_US,
static_cast<hmi_apis::Common_Language::eType>(
- vr_supported_languages[1].asInt()));
+ vr_supported_languages_so[0].asInt()));
EXPECT_EQ(hmi_apis::Common_Language::ES_MX,
static_cast<hmi_apis::Common_Language::eType>(
- vr_supported_languages[2].asInt()));
+ vr_supported_languages_so[1].asInt()));
+ EXPECT_EQ(hmi_apis::Common_Language::FR_CA,
+ static_cast<hmi_apis::Common_Language::eType>(
+ vr_supported_languages_so[2].asInt()));
+}
- // Check TTS languages
- const smart_objects::SmartObject tts_supported_languages =
- *(hmi_capabilities_test->tts_supported_languages());
+TEST_F(
+ HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckTTSSupportedLanguages_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto tts_supported_languages_so =
+ *(hmi_capabilities_->tts_supported_languages());
- EXPECT_EQ(hmi_apis::Common_Language::DA_DK,
+ EXPECT_EQ(hmi_apis::Common_Language::EN_US,
static_cast<hmi_apis::Common_Language::eType>(
- tts_supported_languages[0].asInt()));
- EXPECT_EQ(hmi_apis::Common_Language::CS_CZ,
+ tts_supported_languages_so[0].asInt()));
+ EXPECT_EQ(hmi_apis::Common_Language::ES_MX,
static_cast<hmi_apis::Common_Language::eType>(
- tts_supported_languages[1].asInt()));
- EXPECT_EQ(hmi_apis::Common_Language::KO_KR,
+ tts_supported_languages_so[1].asInt()));
+ EXPECT_EQ(hmi_apis::Common_Language::FR_CA,
static_cast<hmi_apis::Common_Language::eType>(
- tts_supported_languages[2].asInt()));
+ tts_supported_languages_so[2].asInt()));
+}
+
+TEST_F(HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckSpeechCapabilities_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto tts_capabilities_so = *(hmi_capabilities_->speech_capabilities());
- // Check TTS capabilities
- const smart_objects::SmartObject tts_capabilities =
- *(hmi_capabilities_test->speech_capabilities());
EXPECT_EQ(hmi_apis::Common_SpeechCapabilities::SC_TEXT,
static_cast<hmi_apis::Common_SpeechCapabilities::eType>(
- tts_capabilities[0].asInt()));
+ tts_capabilities_so[0].asInt()));
+}
- // Check button capabilities
- const smart_objects::SmartObject buttons_capabilities_so =
- *(hmi_capabilities_test->button_capabilities());
+TEST_F(
+ HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckUIButtonCapabilities_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto buttons_capabilities_so =
+ *(hmi_capabilities_->button_capabilities());
// Count of buttons in json file
- const uint32_t btn_length = buttons_capabilities_so.length();
- EXPECT_EQ(16u, btn_length);
- for (uint32_t i = 0; i < btn_length; ++i) {
- EXPECT_TRUE((buttons_capabilities_so[i]).keyExists(strings::name));
- EXPECT_TRUE((buttons_capabilities_so[i]).keyExists("shortPressAvailable"));
- EXPECT_TRUE((buttons_capabilities_so[i]).keyExists("longPressAvailable"));
- EXPECT_TRUE((buttons_capabilities_so[i]).keyExists("upDownAvailable"));
- EXPECT_TRUE(buttons_capabilities_so[i]["shortPressAvailable"].asBool());
- EXPECT_TRUE(buttons_capabilities_so[i]["longPressAvailable"].asBool());
- EXPECT_TRUE(buttons_capabilities_so[i]["upDownAvailable"].asBool());
+ const size_t btn_length = buttons_capabilities_so.length();
+ EXPECT_EQ(16ull, btn_length);
+ for (size_t index = 0; index < btn_length; ++index) {
+ EXPECT_TRUE(buttons_capabilities_so
+ [index][rc_rpc_plugin::enums_value::kShortPressAvailable]
+ .asBool());
+ EXPECT_TRUE(
+ buttons_capabilities_so[index]
+ [rc_rpc_plugin::enums_value::kLongPressAvailable]
+ .asBool());
+ EXPECT_TRUE(
+ buttons_capabilities_so[index]
+ [rc_rpc_plugin::enums_value::kUpDownAvailable]
+ .asBool());
}
- const smart_objects::SmartObject display_capabilities_so =
- *(hmi_capabilities_test->display_capabilities());
+}
- // Check display type
- EXPECT_EQ(hmi_apis::Common_DisplayType::GEN2_8_DMA,
+TEST_F(HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckDisplayType_SuccessLoadAndConvert) {
+ SetUpLanguageAndLightCapabilitiesExpectation();
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto display_capabilities_so =
+ *(hmi_capabilities_->display_capabilities());
+
+ EXPECT_EQ(hmi_apis::Common_DisplayType::SDL_GENERIC,
static_cast<hmi_apis::Common_DisplayType::eType>(
display_capabilities_so[hmi_response::display_type].asInt()));
@@ -281,51 +302,79 @@ TEST_F(HMICapabilitiesTest, LoadCapabilitiesFromFile) {
display_capabilities_so[hmi_response::display_name].asString());
EXPECT_TRUE(display_capabilities_so["graphicSupported"].asBool());
+}
- // Check text fields
- const uint32_t text_len =
- display_capabilities_so[hmi_response::text_fields].length();
- EXPECT_NE(0u, text_len);
- for (uint32_t i = 0; i < text_len; ++i) {
- EXPECT_TRUE((display_capabilities_so[hmi_response::text_fields][i])
- .keyExists(strings::name));
- EXPECT_TRUE((display_capabilities_so[hmi_response::text_fields][i])
- .keyExists(strings::character_set));
- }
-
- // Check image fields
- EXPECT_TRUE((display_capabilities_so).keyExists(hmi_response::image_fields));
- const uint32_t img_len =
+TEST_F(HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckImageFields_SuccessLoadAndConvert) {
+ SetUpLanguageAndLightCapabilitiesExpectation();
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto display_capabilities_so =
+ *(hmi_capabilities_->display_capabilities());
+
+ ASSERT_TRUE((display_capabilities_so).keyExists(hmi_response::image_fields));
+ const size_t img_len =
display_capabilities_so[hmi_response::image_fields].length();
- EXPECT_NE(0u, img_len);
- for (uint32_t i = 0; i < img_len; ++i) {
- EXPECT_TRUE((display_capabilities_so[hmi_response::image_fields][i])
+ EXPECT_NE(0ull, img_len);
+ for (size_t index = 0; index < img_len; ++index) {
+ EXPECT_TRUE((display_capabilities_so[hmi_response::image_fields][index])
.keyExists(strings::name));
- EXPECT_TRUE((display_capabilities_so[hmi_response::image_fields][i])
- .keyExists(strings::image_type_supported));
- if (display_capabilities_so[hmi_response::image_fields][i][strings::name] ==
- hmi_apis::Common_ImageFieldName::locationImage) {
+
+ const hmi_apis::Common_ImageFieldName::eType field_name =
+ static_cast<hmi_apis::Common_ImageFieldName::eType>(
+ display_capabilities_so[hmi_response::image_fields][index]
+ [strings::name]
+ .asInt());
+
+ if ((field_name == hmi_apis::Common_ImageFieldName::locationImage) ||
+ (field_name == hmi_apis::Common_ImageFieldName::alertIcon)) {
+ EXPECT_TRUE((display_capabilities_so[hmi_response::image_fields][index])
+ .keyExists(strings::image_type_supported));
EXPECT_EQ(hmi_apis::Common_FileType::GRAPHIC_PNG,
static_cast<hmi_apis::Common_FileType::eType>(
- display_capabilities_so[hmi_response::image_fields][i]
+ display_capabilities_so[hmi_response::image_fields][index]
[strings::image_type_supported][0]
.asInt()));
}
}
+}
+
+TEST_F(HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckTextFields_SuccessLoadAndConvert) {
+ SetUpLanguageAndLightCapabilitiesExpectation();
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto display_capabilities_so =
+ *(hmi_capabilities_->display_capabilities());
+
+ const size_t text_len =
+ display_capabilities_so[hmi_response::text_fields].length();
+ EXPECT_NE(0ull, text_len);
+ for (size_t index = 0; index < text_len; ++index) {
+ EXPECT_TRUE((display_capabilities_so[hmi_response::text_fields][index])
+ .keyExists(strings::name));
+ EXPECT_TRUE((display_capabilities_so[hmi_response::text_fields][index])
+ .keyExists(strings::character_set));
+ }
+}
+
+TEST_F(HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckMediaClockFormats_SuccessLoadAndConvert) {
+ SetUpLanguageAndLightCapabilitiesExpectation();
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto display_capabilities_so =
+ *(hmi_capabilities_->display_capabilities());
- // Check media clock formats
EXPECT_TRUE(
(display_capabilities_so).keyExists(hmi_response::media_clock_formats));
- const uint32_t media_length =
+ const size_t media_length =
display_capabilities_so[hmi_response::media_clock_formats].length();
- EXPECT_NE(0u, media_length);
- for (uint32_t i = 0; i < media_length; ++i) {
+ EXPECT_NE(0ull, media_length);
+ for (size_t i = 0; i < media_length; ++i) {
EXPECT_EQ(
i,
display_capabilities_so[hmi_response::media_clock_formats][i].asUInt());
}
- EXPECT_TRUE(
+ ASSERT_TRUE(
(display_capabilities_so).keyExists(hmi_response::image_capabilities));
EXPECT_EQ(hmi_apis::Common_ImageType::DYNAMIC,
static_cast<hmi_apis::Common_ImageType::eType>(
@@ -336,9 +385,17 @@ TEST_F(HMICapabilitiesTest, LoadCapabilitiesFromFile) {
display_capabilities_so[hmi_response::image_capabilities][1]
.asInt()));
- // Check audio pass thru
- const smart_objects::SmartObject audio_pass_thru_capabilities_so =
- *(hmi_capabilities_test->audio_pass_thru_capabilities());
+ // TemplatesAvailable parameter could be as empty array
+ ASSERT_TRUE(
+ display_capabilities_so.keyExists(hmi_response::templates_available));
+}
+
+TEST_F(HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckAudioPassThru_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto audio_pass_thru_capabilities_so =
+ *(hmi_capabilities_->audio_pass_thru_capabilities());
+
EXPECT_EQ(smart_objects::SmartType_Array,
audio_pass_thru_capabilities_so.getType());
EXPECT_EQ(1u, audio_pass_thru_capabilities_so.length());
@@ -351,57 +408,118 @@ TEST_F(HMICapabilitiesTest, LoadCapabilitiesFromFile) {
EXPECT_EQ(hmi_apis::Common_AudioType::PCM,
static_cast<hmi_apis::Common_AudioType::eType>(
audio_pass_thru_capabilities_so[0]["audioType"].asInt()));
+}
+
+TEST_F(
+ HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckHmiZoneCapabilities_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto hmi_zone_capabilities_so =
+ *(hmi_capabilities_->hmi_zone_capabilities());
- // Check hmi zone capabilities
- const smart_objects::SmartObject hmi_zone_capabilities_so =
- *(hmi_capabilities_test->hmi_zone_capabilities());
EXPECT_EQ(hmi_apis::Common_HmiZoneCapabilities::FRONT,
static_cast<hmi_apis::Common_HmiZoneCapabilities::eType>(
hmi_zone_capabilities_so.asInt()));
+}
- const smart_objects::SmartObject soft_button_capabilities_so =
- *(hmi_capabilities_test->soft_button_capabilities());
+TEST_F(
+ HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckSoftButtonCapabilities_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto& soft_button_capabilities_so =
+ *(hmi_capabilities_->soft_button_capabilities());
+
+ const size_t soft_butons_length = soft_button_capabilities_so.length();
+
+ ASSERT_TRUE(soft_butons_length > 0);
+
+ for (size_t index = 0; index < soft_butons_length; ++index) {
+ EXPECT_TRUE(soft_button_capabilities_so[index].keyExists(
+ rc_rpc_plugin::enums_value::kShortPressAvailable));
+ EXPECT_EQ(smart_objects::SmartType::SmartType_Boolean,
+ soft_button_capabilities_so
+ [index][rc_rpc_plugin::enums_value::kShortPressAvailable]
+ .getType());
+
+ EXPECT_TRUE(soft_button_capabilities_so[index].keyExists(
+ rc_rpc_plugin::enums_value::kLongPressAvailable));
+ EXPECT_EQ(smart_objects::SmartType::SmartType_Boolean,
+ soft_button_capabilities_so
+ [index][rc_rpc_plugin::enums_value::kLongPressAvailable]
+ .getType());
+
+ EXPECT_TRUE(soft_button_capabilities_so[index].keyExists(
+ rc_rpc_plugin::enums_value::kUpDownAvailable));
+ EXPECT_EQ(smart_objects::SmartType::SmartType_Boolean,
+ soft_button_capabilities_so
+ [index][rc_rpc_plugin::enums_value::kUpDownAvailable]
+ .getType());
+
+ EXPECT_TRUE(soft_button_capabilities_so[index].keyExists(
+ hmi_response::image_supported));
+ EXPECT_EQ(smart_objects::SmartType::SmartType_Boolean,
+ soft_button_capabilities_so[index][hmi_response::image_supported]
+ .getType());
+ }
+}
- EXPECT_TRUE(soft_button_capabilities_so[0]["shortPressAvailable"].asBool());
- EXPECT_TRUE(soft_button_capabilities_so[0]["longPressAvailable"].asBool());
- EXPECT_TRUE(soft_button_capabilities_so[0]["upDownAvailable"].asBool());
- EXPECT_TRUE(soft_button_capabilities_so[0]["imageSupported"].asBool());
+TEST_F(
+ HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckPresetBankCapabilities_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto preset_bank_so = *(hmi_capabilities_->preset_bank_capabilities());
- const smart_objects::SmartObject preset_bank_so =
- *(hmi_capabilities_test->preset_bank_capabilities());
- EXPECT_TRUE(preset_bank_so["onScreenPresetsAvailable"].asBool());
+ EXPECT_TRUE(
+ preset_bank_so.keyExists(hmi_response::on_screen_presets_available));
+ EXPECT_EQ(
+ smart_objects::SmartType::SmartType_Boolean,
+ preset_bank_so[hmi_response::on_screen_presets_available].getType());
+}
- // Check vehicle type
- const smart_objects::SmartObject vehicle_type_so =
- *(hmi_capabilities_test->vehicle_type());
+TEST_F(HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckVehicleType_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto vehicle_type_so = *(hmi_capabilities_->vehicle_type());
- EXPECT_EQ("Ford", vehicle_type_so["make"].asString());
- EXPECT_EQ("Fiesta", vehicle_type_so["model"].asString());
- EXPECT_EQ("2013", vehicle_type_so["modelYear"].asString());
+ EXPECT_EQ("SDL", vehicle_type_so["make"].asString());
+ EXPECT_EQ("Generic", vehicle_type_so["model"].asString());
+ EXPECT_EQ("2019", vehicle_type_so["modelYear"].asString());
EXPECT_EQ("SE", vehicle_type_so["trim"].asString());
+}
- // Check system capabilities
- smart_objects::SmartObject navigation_capability_so =
- *(hmi_capabilities_test->navigation_capability());
+TEST_F(
+ HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckNavigationCapabilities_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto navigation_capability_so =
+ *(hmi_capabilities_->navigation_capability());
EXPECT_TRUE(navigation_capability_so.keyExists("sendLocationEnabled"));
EXPECT_TRUE(navigation_capability_so.keyExists("getWayPointsEnabled"));
EXPECT_TRUE(navigation_capability_so["sendLocationEnabled"].asBool());
EXPECT_TRUE(navigation_capability_so["getWayPointsEnabled"].asBool());
- // since we have navigation capabilities, the feature should be supported
- EXPECT_TRUE(hmi_capabilities_test->navigation_supported());
+ // Since we have navigation capabilities, the feature should be supported
+ EXPECT_TRUE(hmi_capabilities_->navigation_supported());
+}
- const smart_objects::SmartObject phone_capability_so =
- *(hmi_capabilities_test->phone_capability());
+TEST_F(HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckPhoneCapability_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto phone_capability_so = *(hmi_capabilities_->phone_capability());
EXPECT_TRUE(phone_capability_so.keyExists("dialNumberEnabled"));
EXPECT_TRUE(phone_capability_so["dialNumberEnabled"].asBool());
- EXPECT_TRUE(hmi_capabilities_test->phone_call_supported());
+ EXPECT_TRUE(hmi_capabilities_->phone_call_supported());
+}
- const smart_objects::SmartObject vs_capability_so =
- *(hmi_capabilities_test->video_streaming_capability());
+TEST_F(
+ HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckVideoStreamingCapability_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto vs_capability_so =
+ *(hmi_capabilities_->video_streaming_capability());
EXPECT_TRUE(vs_capability_so.keyExists(strings::preferred_resolution));
EXPECT_TRUE(vs_capability_so[strings::preferred_resolution].keyExists(
@@ -419,156 +537,312 @@ TEST_F(HMICapabilitiesTest, LoadCapabilitiesFromFile) {
EXPECT_TRUE(vs_capability_so.keyExists(strings::max_bitrate));
EXPECT_EQ(10000, vs_capability_so[strings::max_bitrate].asInt());
EXPECT_TRUE(vs_capability_so.keyExists(strings::supported_formats));
- const uint32_t supported_formats_len =
+ const size_t supported_formats_len =
vs_capability_so[strings::supported_formats].length();
- EXPECT_EQ(2u, supported_formats_len);
+ EXPECT_EQ(1ull, supported_formats_len);
+
EXPECT_TRUE(vs_capability_so[strings::supported_formats][0].keyExists(
strings::protocol));
EXPECT_TRUE(vs_capability_so[strings::supported_formats][0].keyExists(
strings::codec));
- EXPECT_EQ(0,
+ EXPECT_EQ(hmi_apis::Common_VideoStreamingProtocol::RAW,
vs_capability_so[strings::supported_formats][0][strings::protocol]
.asInt());
EXPECT_EQ(
- 0,
+ hmi_apis::Common_VideoStreamingCodec::H264,
vs_capability_so[strings::supported_formats][0][strings::codec].asInt());
- EXPECT_TRUE(vs_capability_so[strings::supported_formats][1].keyExists(
- strings::protocol));
- EXPECT_TRUE(vs_capability_so[strings::supported_formats][1].keyExists(
- strings::codec));
- EXPECT_EQ(1,
- vs_capability_so[strings::supported_formats][1][strings::protocol]
- .asInt());
- EXPECT_EQ(
- 2,
- vs_capability_so[strings::supported_formats][1][strings::codec].asInt());
EXPECT_TRUE(
vs_capability_so.keyExists(strings::haptic_spatial_data_supported));
- EXPECT_TRUE(
+ EXPECT_FALSE(
vs_capability_so[strings::haptic_spatial_data_supported].asBool());
- EXPECT_TRUE(hmi_capabilities_test->video_streaming_supported());
-
- // Check remote control capabilites
- const smart_objects::SmartObject rc_capability_so =
- *(hmi_capabilities_test->rc_capability());
+ EXPECT_TRUE(hmi_capabilities_->video_streaming_supported());
+}
- EXPECT_TRUE(rc_capability_so.keyExists("climateControlCapabilities"));
- EXPECT_TRUE(rc_capability_so.keyExists("radioControlCapabilities"));
- EXPECT_TRUE(rc_capability_so.keyExists("buttonCapabilities"));
+TEST_F(
+ HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckRemoteControlCapabilites_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto rc_capability_so = *(hmi_capabilities_->rc_capability());
+
+ ASSERT_TRUE(rc_capability_so.keyExists(
+ rc_rpc_plugin::strings::kclimateControlCapabilities));
+ const auto& climate_control_capabilities_so =
+ rc_capability_so[rc_rpc_plugin::strings::kclimateControlCapabilities][0];
+
+ EXPECT_TRUE(climate_control_capabilities_so
+ [rc_rpc_plugin::strings::kFanSpeedAvailable]
+ .asBool());
+ EXPECT_TRUE(climate_control_capabilities_so
+ [rc_rpc_plugin::strings::kDesiredTemperatureAvailable]
+ .asBool());
+ EXPECT_TRUE(climate_control_capabilities_so
+ [rc_rpc_plugin::strings::kAcEnableAvailable]
+ .asBool());
+ EXPECT_TRUE(climate_control_capabilities_so
+ [rc_rpc_plugin::strings::kAcMaxEnableAvailable]
+ .asBool());
+}
+TEST_F(
+ HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckRadioControlCapabilities_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto rc_capability_so = *(hmi_capabilities_->rc_capability());
+
+ ASSERT_TRUE(rc_capability_so.keyExists(
+ rc_rpc_plugin::strings::kradioControlCapabilities));
+ const auto& radio_control_capabilities_so =
+ rc_capability_so[rc_rpc_plugin::strings::kradioControlCapabilities][0];
+
+ EXPECT_EQ("radio", radio_control_capabilities_so["moduleName"].asString());
+
+ EXPECT_TRUE(radio_control_capabilities_so
+ [rc_rpc_plugin::message_params::kAvailableHdChannelsAvailable]
+ .asBool());
+ EXPECT_TRUE(radio_control_capabilities_so
+ [rc_rpc_plugin::strings::kSignalChangeThresholdAvailable]
+ .asBool());
+ EXPECT_TRUE(radio_control_capabilities_so
+ [rc_rpc_plugin::strings::kSignalStrengthAvailable]
+ .asBool());
+ EXPECT_TRUE(radio_control_capabilities_so
+ [rc_rpc_plugin::strings::kHdRadioEnableAvailable]
+ .asBool());
+ EXPECT_TRUE(radio_control_capabilities_so
+ [rc_rpc_plugin::strings::kSiriusxmRadioAvailable]
+ .asBool());
EXPECT_TRUE(
- rc_capability_so["climateControlCapabilities"][0]["fanSpeedAvailable"]
+ radio_control_capabilities_so[rc_rpc_plugin::strings::kSisDataAvailable]
.asBool());
- EXPECT_TRUE(rc_capability_so["climateControlCapabilities"][0]
- ["desiredTemperatureAvailable"]
- .asBool());
EXPECT_TRUE(
- rc_capability_so["climateControlCapabilities"][0]["acEnableAvailable"]
+ radio_control_capabilities_so[rc_rpc_plugin::strings::kStateAvailable]
.asBool());
EXPECT_TRUE(
- rc_capability_so["climateControlCapabilities"][0]["acMaxEnableAvailable"]
+ radio_control_capabilities_so[rc_rpc_plugin::strings::kRadioBandAvailable]
.asBool());
-
+ EXPECT_TRUE(radio_control_capabilities_so
+ [rc_rpc_plugin::strings::kRadioFrequencyAvailable]
+ .asBool());
EXPECT_TRUE(
- rc_capability_so["radioControlCapabilities"][0]["radioBandAvailable"]
+ radio_control_capabilities_so[rc_rpc_plugin::strings::kHdChannelAvailable]
.asBool());
EXPECT_TRUE(
- rc_capability_so["radioControlCapabilities"][0]["radioFrequencyAvailable"]
+ radio_control_capabilities_so[rc_rpc_plugin::strings::kRdsDataAvailable]
.asBool());
+
+ ASSERT_TRUE(radio_control_capabilities_so.keyExists(
+ rc_rpc_plugin::message_params::kModuleInfo));
+ ASSERT_TRUE(
+ radio_control_capabilities_so[rc_rpc_plugin::message_params::kModuleInfo]
+ .keyExists(rc_rpc_plugin::message_params::kModuleId));
+}
+
+TEST_F(
+ HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckRCButtonCapabilities_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto rc_capability_so = *(hmi_capabilities_->rc_capability());
+
+ ASSERT_TRUE(
+ rc_capability_so.keyExists(rc_rpc_plugin::strings::kbuttonCapabilities));
+ const auto& button_capabilities_so =
+ rc_capability_so[rc_rpc_plugin::strings::kbuttonCapabilities];
+
+ const size_t button_capabilities_length = button_capabilities_so.length();
+
+ for (size_t index = 0; index < button_capabilities_length; ++index) {
+ ASSERT_TRUE(button_capabilities_so[index].keyExists("name"));
+
+ ASSERT_TRUE(button_capabilities_so[index].keyExists(
+ rc_rpc_plugin::enums_value::kLongPressAvailable));
+ EXPECT_EQ(
+ smart_objects::SmartType::SmartType_Boolean,
+ button_capabilities_so[index]
+ [rc_rpc_plugin::enums_value::kLongPressAvailable]
+ .getType());
+ ASSERT_TRUE(button_capabilities_so[index].keyExists(
+ rc_rpc_plugin::enums_value::kShortPressAvailable));
+ EXPECT_EQ(
+ smart_objects::SmartType::SmartType_Boolean,
+ button_capabilities_so[index]
+ [rc_rpc_plugin::enums_value::kShortPressAvailable]
+ .getType());
+
+ ASSERT_TRUE(button_capabilities_so[index].keyExists(
+ rc_rpc_plugin::enums_value::kUpDownAvailable));
+ EXPECT_EQ(
+ smart_objects::SmartType::SmartType_Boolean,
+ button_capabilities_so[index]
+ [rc_rpc_plugin::enums_value::kUpDownAvailable]
+ .getType());
+ }
+}
+
+TEST_F(HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckAudioCapabilities_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto rc_capability_so = *(hmi_capabilities_->rc_capability());
+
+ EXPECT_TRUE(rc_capability_so.keyExists(
+ rc_rpc_plugin::strings::kaudioControlCapabilities));
+
+ const auto& audio_capabilities_so =
+ rc_capability_so[rc_rpc_plugin::strings::kaudioControlCapabilities][0];
+
+ EXPECT_TRUE(audio_capabilities_so.keyExists(
+ rc_rpc_plugin::message_params::kModuleInfo));
+
+ const auto& audio_cap_module_info =
+ audio_capabilities_so[rc_rpc_plugin::message_params::kModuleInfo];
+ EXPECT_TRUE(audio_cap_module_info.keyExists(
+ rc_rpc_plugin::message_params::kModuleId));
+ EXPECT_TRUE(audio_cap_module_info.keyExists(
+ rc_rpc_plugin::strings::kAllowMultipleAccess));
EXPECT_TRUE(
- rc_capability_so["radioControlCapabilities"][0]["hdChannelAvailable"]
+ audio_cap_module_info[rc_rpc_plugin::strings::kAllowMultipleAccess]
.asBool());
+
+ EXPECT_TRUE(
+ audio_capabilities_so[rc_rpc_plugin::strings::kSourceAvailable].asBool());
+ EXPECT_TRUE(
+ audio_capabilities_so[rc_rpc_plugin::strings::kVolumeAvailable].asBool());
+ EXPECT_TRUE(audio_capabilities_so[rc_rpc_plugin::strings::kEqualizerAvailable]
+ .asBool());
EXPECT_TRUE(
- rc_capability_so["radioControlCapabilities"][0]["rdsDataAvailable"]
+ audio_capabilities_so[rc_rpc_plugin::strings::kKeepContextAvailable]
.asBool());
+ EXPECT_EQ(
+ kEqualizerMaxChanelId,
+ audio_capabilities_so[rc_rpc_plugin::strings::kEqualizerMaxChannelId]
+ .asInt());
+}
- EXPECT_TRUE(rc_capability_so["buttonCapabilities"][0]["shortPressAvailable"]
- .asBool());
+TEST_F(HMICapabilitiesTest,
+ LoadCapabilitiesFromFile_CheckSeatCapabilities_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto rc_capability_so = *(hmi_capabilities_->rc_capability());
+
+ EXPECT_TRUE(rc_capability_so.keyExists(
+ rc_rpc_plugin::strings::kseatControlCapabilities));
+ const auto& seat_capabilities_so =
+ rc_capability_so[rc_rpc_plugin::strings::kseatControlCapabilities][0];
+
+ EXPECT_TRUE(seat_capabilities_so.keyExists(
+ rc_rpc_plugin::message_params::kModuleInfo));
+ const auto& seat_cap_module_info =
+ seat_capabilities_so[rc_rpc_plugin::message_params::kModuleInfo];
EXPECT_TRUE(
- rc_capability_so["buttonCapabilities"][0]["longPressAvailable"].asBool());
+ seat_cap_module_info.keyExists(rc_rpc_plugin::message_params::kModuleId));
+ EXPECT_TRUE(seat_cap_module_info.keyExists(
+ rc_rpc_plugin::strings::kAllowMultipleAccess));
EXPECT_FALSE(
- rc_capability_so["buttonCapabilities"][0]["upDownAvailable"].asBool());
+ seat_cap_module_info[rc_rpc_plugin::strings::kAllowMultipleAccess]
+ .asBool());
}
TEST_F(HMICapabilitiesTest,
- LoadCapabilitiesFromFileAndVerifyUnsupportedSystemCapabilities) {
- MockApplicationManager mock_app_mngr;
- event_engine_test::MockEventDispatcher mock_dispatcher;
- MockApplicationManagerSettings mock_application_manager_settings;
+ LoadCapabilitiesFromFile_CheckLightCapabilities_SuccessLoadAndConvert) {
+ hmi_capabilities_->Init(last_state_wrapper_);
+ const auto rc_capability_so = *(hmi_capabilities_->rc_capability());
+
+ EXPECT_TRUE(rc_capability_so.keyExists(
+ rc_rpc_plugin::strings::klightControlCapabilities));
+ const auto& light_capabilities_so =
+ rc_capability_so[rc_rpc_plugin::strings::klightControlCapabilities];
+
+ EXPECT_TRUE(light_capabilities_so.keyExists(
+ rc_rpc_plugin::message_params::kModuleInfo));
+ const auto& light_cap_module_info =
+ light_capabilities_so[rc_rpc_plugin::message_params::kModuleInfo];
+ EXPECT_TRUE(light_cap_module_info.keyExists(
+ rc_rpc_plugin::message_params::kModuleId));
+ EXPECT_FALSE(
+ light_cap_module_info[rc_rpc_plugin::strings::kAllowMultipleAccess]
+ .asBool());
- const std::string hmi_capabilities_file = "hmi_capabilities_sc1.json";
+ EXPECT_TRUE(light_capabilities_so.keyExists(
+ rc_rpc_plugin::strings::kSupportedLights));
+
+ const auto& supported_lights =
+ light_capabilities_so[rc_rpc_plugin::strings::kSupportedLights];
+
+ const size_t supported_lights_length = supported_lights.length();
+ for (size_t index = 0; index < supported_lights_length; ++index) {
+ EXPECT_TRUE(
+ IsLightNameExists(static_cast<hmi_apis::Common_LightName::eType>(
+ supported_lights[index]["name"].asInt())));
+ EXPECT_TRUE(supported_lights[index].keyExists(
+ rc_rpc_plugin::strings::kStatusAvailable));
+ EXPECT_TRUE(supported_lights[index].keyExists(
+ rc_rpc_plugin::strings::kDensityAvailable));
+ EXPECT_TRUE(supported_lights[index].keyExists(
+ rc_rpc_plugin::strings::kRGBColorSpaceAvailable));
+ }
+
+ EXPECT_TRUE(rc_capability_so.keyExists(
+ rc_rpc_plugin::strings::klightControlCapabilities));
+ const auto& light_ctrl_cap_so =
+ rc_capability_so[rc_rpc_plugin::strings::klightControlCapabilities];
+
+ EXPECT_TRUE(light_ctrl_cap_so.keyExists("moduleName"));
+ EXPECT_TRUE(
+ light_ctrl_cap_so.keyExists(rc_rpc_plugin::strings::kSupportedLights));
+ EXPECT_EQ(
+ smart_objects::SmartType::SmartType_Array,
+ light_ctrl_cap_so[rc_rpc_plugin::strings::kSupportedLights].getType());
+
+ const auto& supported_light_so =
+ light_ctrl_cap_so[rc_rpc_plugin::strings::kSupportedLights];
- EXPECT_CALL(mock_app_mngr, event_dispatcher())
- .WillOnce(ReturnRef(mock_dispatcher));
- EXPECT_CALL(mock_app_mngr, get_settings())
- .WillRepeatedly(ReturnRef(mock_application_manager_settings));
- EXPECT_CALL(mock_application_manager_settings, hmi_capabilities_file_name())
- .WillOnce(ReturnRef(hmi_capabilities_file));
- EXPECT_CALL(mock_dispatcher, add_observer(_, _, _)).Times(1);
- EXPECT_CALL(mock_dispatcher, remove_observer(_)).Times(1);
- EXPECT_CALL(mock_application_manager_settings, launch_hmi())
- .WillOnce(Return(false));
-
- if (file_system::FileExists("./app_info_data")) {
- EXPECT_TRUE(::file_system::DeleteFile("./app_info_data"));
+ const size_t sup_lights_length = supported_light_so.length();
+
+ for (size_t index = 0; index < sup_lights_length; ++index) {
+ EXPECT_TRUE(
+ supported_light_so[index].keyExists(rc_rpc_plugin::strings::kName));
}
+}
- std::shared_ptr<HMICapabilitiesForTesting> hmi_capabilities =
- std::make_shared<HMICapabilitiesForTesting>(mock_app_mngr);
- hmi_capabilities->Init(last_state_wrapper_);
+TEST_F(HMICapabilitiesTest,
+ LoadCapabilitiesFromFileAndVerifyUnsupportedSystemCapabilities) {
+ const std::string hmi_capabilities_file = "hmi_capabilities_sc1.json";
+ ON_CALL(mock_application_manager_settings_, hmi_capabilities_file_name())
+ .WillByDefault(ReturnRef(hmi_capabilities_file));
+
+ hmi_capabilities_->Init(last_state_wrapper_);
// Check system capabilities; only phone capability is available
- EXPECT_FALSE(hmi_capabilities->navigation_supported());
- EXPECT_TRUE(hmi_capabilities->phone_call_supported());
- EXPECT_FALSE(hmi_capabilities->video_streaming_supported());
- EXPECT_FALSE(hmi_capabilities->rc_supported());
+ EXPECT_FALSE(hmi_capabilities_->navigation_supported());
+ EXPECT_TRUE(hmi_capabilities_->phone_call_supported());
+ EXPECT_FALSE(hmi_capabilities_->video_streaming_supported());
+ EXPECT_FALSE(hmi_capabilities_->rc_supported());
// verify phone capability
const smart_objects::SmartObject phone_capability_so =
- *(hmi_capabilities->phone_capability());
+ *(hmi_capabilities_->phone_capability());
EXPECT_TRUE(phone_capability_so.keyExists("dialNumberEnabled"));
EXPECT_TRUE(phone_capability_so["dialNumberEnabled"].asBool());
}
TEST_F(HMICapabilitiesTest,
LoadCapabilitiesFromFileAndVerifyEmptySystemCapabilities) {
- MockApplicationManager mock_app_mngr;
- event_engine_test::MockEventDispatcher mock_dispatcher;
- MockApplicationManagerSettings mock_application_manager_settings;
-
const std::string hmi_capabilities_file = "hmi_capabilities_sc2.json";
+ ON_CALL(mock_application_manager_settings_, hmi_capabilities_file_name())
+ .WillByDefault(ReturnRef(hmi_capabilities_file));
- EXPECT_CALL(mock_app_mngr, event_dispatcher())
- .WillOnce(ReturnRef(mock_dispatcher));
- EXPECT_CALL(mock_app_mngr, get_settings())
- .WillRepeatedly(ReturnRef(mock_application_manager_settings));
- EXPECT_CALL(mock_application_manager_settings, hmi_capabilities_file_name())
- .WillOnce(ReturnRef(hmi_capabilities_file));
- EXPECT_CALL(mock_dispatcher, add_observer(_, _, _)).Times(1);
- EXPECT_CALL(mock_dispatcher, remove_observer(_)).Times(1);
- EXPECT_CALL(mock_application_manager_settings, launch_hmi())
- .WillOnce(Return(false));
-
- if (file_system::FileExists("./app_info_data")) {
- EXPECT_TRUE(::file_system::DeleteFile("./app_info_data"));
- }
-
- std::shared_ptr<HMICapabilitiesForTesting> hmi_capabilities =
- std::make_shared<HMICapabilitiesForTesting>(mock_app_mngr);
- hmi_capabilities->Init(last_state_wrapper_);
+ hmi_capabilities_->Init(last_state_wrapper_);
// Check system capabilities; only navigation capability is valid, the other
// two are empty
- EXPECT_TRUE(hmi_capabilities->navigation_supported());
- EXPECT_FALSE(hmi_capabilities->phone_call_supported());
- EXPECT_FALSE(hmi_capabilities->video_streaming_supported());
- EXPECT_FALSE(hmi_capabilities->rc_supported());
+ EXPECT_TRUE(hmi_capabilities_->navigation_supported());
+ EXPECT_FALSE(hmi_capabilities_->phone_call_supported());
+ EXPECT_FALSE(hmi_capabilities_->video_streaming_supported());
+ EXPECT_FALSE(hmi_capabilities_->rc_supported());
// verify navigation capabilities
smart_objects::SmartObject navigation_capability_so =
- *(hmi_capabilities->navigation_capability());
+ *(hmi_capabilities_->navigation_capability());
EXPECT_TRUE(navigation_capability_so.keyExists("sendLocationEnabled"));
EXPECT_TRUE(navigation_capability_so.keyExists("getWayPointsEnabled"));
EXPECT_TRUE(navigation_capability_so["sendLocationEnabled"].asBool());
@@ -577,41 +851,19 @@ TEST_F(HMICapabilitiesTest,
TEST_F(HMICapabilitiesTest,
LoadCapabilitiesFromFileAndVerifyOldAudioPassThruCapabilities) {
- MockApplicationManager mock_app_mngr;
- event_engine_test::MockEventDispatcher mock_dispatcher;
- MockApplicationManagerSettings mock_application_manager_settings;
-
const std::string hmi_capabilities_file = "hmi_capabilities_old_apt.json";
+ ON_CALL(mock_application_manager_settings_, hmi_capabilities_file_name())
+ .WillByDefault(ReturnRef(hmi_capabilities_file));
- EXPECT_CALL(mock_app_mngr, event_dispatcher())
- .WillOnce(ReturnRef(mock_dispatcher));
- EXPECT_CALL(mock_app_mngr, get_settings())
- .WillRepeatedly(ReturnRef(mock_application_manager_settings));
- EXPECT_CALL(mock_application_manager_settings, hmi_capabilities_file_name())
- .WillOnce(ReturnRef(hmi_capabilities_file));
- EXPECT_CALL(mock_dispatcher, add_observer(_, _, _)).Times(1);
- EXPECT_CALL(mock_dispatcher, remove_observer(_)).Times(1);
- EXPECT_CALL(mock_application_manager_settings, launch_hmi())
- .WillOnce(Return(false));
- EXPECT_CALL(*(MockMessageHelper::message_helper_mock()),
- CommonLanguageFromString(_))
- .WillRepeatedly(Invoke(TestCommonLanguageFromString));
-
- if (file_system::FileExists("./app_info_data")) {
- EXPECT_TRUE(::file_system::DeleteFile("./app_info_data"));
- }
-
- std::shared_ptr<HMICapabilitiesForTesting> hmi_capabilities =
- std::make_shared<HMICapabilitiesForTesting>(mock_app_mngr);
- hmi_capabilities->Init(last_state_wrapper_);
+ hmi_capabilities_->Init(last_state_wrapper_);
// with old audio pass thru format, the object is an array containing a single
// object
smart_objects::SmartObjectSPtr audio_pass_thru_capabilities_so =
- hmi_capabilities->audio_pass_thru_capabilities();
+ hmi_capabilities_->audio_pass_thru_capabilities();
EXPECT_EQ(smart_objects::SmartType_Array,
audio_pass_thru_capabilities_so->getType());
- EXPECT_EQ(1u, audio_pass_thru_capabilities_so->length());
+ EXPECT_EQ(1ull, audio_pass_thru_capabilities_so->length());
smart_objects::SmartObject& first_element =
(*audio_pass_thru_capabilities_so)[0];
EXPECT_TRUE(first_element.keyExists("samplingRate"));
@@ -629,45 +881,605 @@ TEST_F(HMICapabilitiesTest,
}
TEST_F(HMICapabilitiesTest, VerifyImageType) {
+ ON_CALL(mock_app_mngr_, IsSOStructValid(_, _)).WillByDefault(Return(true));
+
const int32_t image_type = 1;
smart_objects::SmartObject sm_obj;
- EXPECT_CALL(app_mngr_, IsSOStructValid(_, _)).WillOnce(Return(true));
sm_obj[hmi_response::image_capabilities][0] = image_type;
- hmi_capabilities_test->set_display_capabilities(sm_obj);
+ hmi_capabilities_->set_display_capabilities(sm_obj);
- EXPECT_TRUE(hmi_capabilities_test->VerifyImageType(image_type));
+ EXPECT_TRUE(hmi_capabilities_->VerifyImageType(image_type));
const int32_t new_image_type = 2;
- EXPECT_FALSE(hmi_capabilities_test->VerifyImageType(new_image_type));
-}
-
-void HMICapabilitiesTest::SetCooperating() {
- smart_objects::SmartObjectSPtr test_so;
- EXPECT_CALL(*(MockMessageHelper::message_helper_mock()),
- CreateModuleInfoSO(_, _))
- .WillRepeatedly(Return(test_so));
- EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _))
- .WillRepeatedly(Return(true));
+ EXPECT_FALSE(hmi_capabilities_->VerifyImageType(new_image_type));
}
TEST_F(HMICapabilitiesTest, SetVRCooperating) {
- hmi_capabilities_test->set_is_vr_cooperating(true);
- EXPECT_EQ(true, hmi_capabilities_test->is_vr_cooperating());
+ hmi_capabilities_->set_is_vr_cooperating(true);
+ EXPECT_TRUE(hmi_capabilities_->is_vr_cooperating());
}
TEST_F(HMICapabilitiesTest, SetTTSCooperating) {
- hmi_capabilities_test->set_is_tts_cooperating(true);
- EXPECT_EQ(true, hmi_capabilities_test->is_tts_cooperating());
+ hmi_capabilities_->set_is_tts_cooperating(true);
+ EXPECT_TRUE(hmi_capabilities_->is_tts_cooperating());
}
TEST_F(HMICapabilitiesTest, SetUICooperating) {
- hmi_capabilities_test->set_is_ui_cooperating(true);
- EXPECT_EQ(true, hmi_capabilities_test->is_ui_cooperating());
+ hmi_capabilities_->set_is_ui_cooperating(true);
+ EXPECT_TRUE(hmi_capabilities_->is_ui_cooperating());
}
TEST_F(HMICapabilitiesTest, SetIviCooperating) {
- hmi_capabilities_test->set_is_ivi_cooperating(true);
- EXPECT_EQ(true, hmi_capabilities_test->is_ivi_cooperating());
+ hmi_capabilities_->set_is_ivi_cooperating(true);
+ EXPECT_TRUE(hmi_capabilities_->is_ivi_cooperating());
+}
+
+TEST_F(
+ HMICapabilitiesTest,
+ UpdateCapabilitiesDependingOn_ccpuVersion_FromCacheForOld_RequestForNew) {
+ const std::string ccpu_version = "4.1.3.B_EB355B";
+ const std::string ccpu_version_new = "5.1.3.B_EB355B";
+ const std::string hmi_capabilities_invalid_file =
+ "hmi_capabilities_invalid_file.json";
+
+ ON_CALL(mock_application_manager_settings_, hmi_capabilities_file_name())
+ .WillByDefault(ReturnRef(hmi_capabilities_invalid_file));
+
+ EXPECT_CALL(mock_app_mngr_, SetHMICooperating(true));
+ EXPECT_CALL(mock_app_mngr_, RequestForInterfacesAvailability()).Times(2);
+
+ hmi_capabilities_->set_ccpu_version(ccpu_version);
+ hmi_capabilities_->OnSoftwareVersionReceived(ccpu_version);
+
+ EXPECT_EQ(ccpu_version, hmi_capabilities_->ccpu_version());
+
+ hmi_capabilities_->OnSoftwareVersionReceived(ccpu_version_new);
+ EXPECT_EQ(ccpu_version_new, hmi_capabilities_->ccpu_version());
+}
+
+TEST_F(HMICapabilitiesTest,
+ UpdateCapabilitiesForNew_ccpuVersion_DeleteCacheFile) {
+ MockApplicationManagerSettings mock_application_manager_settings;
+ const std::string ccpu_version = "4.1.3.B_EB355B";
+ const std::string ccpu_version_new = "5.1.3.B_EB355B";
+ const std::string hmi_capabilities_invalid_file =
+ "hmi_capabilities_invalid_file.json";
+
+ CreateFile(kHmiCapabilitiesCacheFile);
+
+ ON_CALL(mock_application_manager_settings_, hmi_capabilities_file_name())
+ .WillByDefault(ReturnRef(hmi_capabilities_invalid_file));
+
+ hmi_capabilities_->set_ccpu_version(ccpu_version);
+ hmi_capabilities_->OnSoftwareVersionReceived(ccpu_version_new);
+ EXPECT_EQ(ccpu_version_new, hmi_capabilities_->ccpu_version());
+
+ EXPECT_FALSE(file_system::FileExists(kHmiCapabilitiesCacheFile));
+}
+
+TEST_F(
+ HMICapabilitiesTest,
+ OnSoftwareVersionReceived_CcpuMatchNoPendingRequestsForCapability_SetHMICooperatingToTrue) {
+ // If local ccpu_version matches with the received ccpu_version from the HMI,
+ // and cache exists, SDL Core should check if hmi_cooperating is set to true
+ // if yes - SDL should respond to all pending RAI requests, if they exist.
+ // hmi_cooperting is set to true when no pending capability requests exist
+ const std::string ccpu_version = "4.1.3.B_EB355B";
+
+ hmi_capabilities_->set_ccpu_version(ccpu_version);
+
+ EXPECT_CALL(mock_app_mngr_, SetHMICooperating(true));
+
+ hmi_capabilities_->OnSoftwareVersionReceived(ccpu_version);
+}
+
+TEST_F(
+ HMICapabilitiesTest,
+ OnSoftwareVersionReceived_CcpuMatchHavePendingRequestsForCapability_NoSetHMICooperatingToTrue) {
+ // If local ccpu_version matches with the received ccpu_version from the HMI,
+ // and there is no cache, SDL Core should check if hmi_cooperating is set to
+ // true if no - SDL should suspend all RAI responses (if any) and wait for HMI
+ // responses with all required capabilities. The RAI responses (if any) could
+ // be handled only after hmi_cooperating is set to true, it is set when all
+ // capabilities responses are received from the HMI
+ const std::string ccpu_version = "4.1.3.B_EB355B";
+
+ // Init() is required to set pending capabilities requests to the HMI
+ hmi_capabilities_->Init(last_state_wrapper_);
+ hmi_capabilities_->set_ccpu_version(ccpu_version);
+
+ EXPECT_CALL(mock_app_mngr_, SetHMICooperating(true)).Times(0);
+
+ hmi_capabilities_->OnSoftwareVersionReceived(ccpu_version);
+}
+
+TEST_F(HMICapabilitiesTest,
+ CacheFileNameNotSpecified_NoNeedToSave_ReturnSuccess) {
+ const std::string hmi_capabilities_empty_file_name = "";
+ const std::vector<std::string> sections_to_update{hmi_response::language};
+
+ ON_CALL(mock_application_manager_settings_,
+ hmi_capabilities_cache_file_name())
+ .WillByDefault(ReturnRef(hmi_capabilities_empty_file_name));
+
+ EXPECT_TRUE(hmi_capabilities_->SaveCachedCapabilitiesToFile(
+ hmi_interface::tts, sections_to_update, schema_));
+}
+
+TEST_F(HMICapabilitiesTest, SaveCachedCapabilitiesToFile_ParseFile_Failed) {
+ const std::vector<std::string> sections_to_update{hmi_response::language};
+
+ file_system::CreateFile(kHmiCapabilitiesCacheFile);
+ EXPECT_TRUE(file_system::FileExists(kHmiCapabilitiesCacheFile));
+
+ EXPECT_FALSE(hmi_capabilities_->SaveCachedCapabilitiesToFile(
+ hmi_interface::tts, sections_to_update, schema_));
+}
+
+TEST_F(HMICapabilitiesTest,
+ SaveCachedCapabilitiesToFile_ParsedFieldsSave_Success) {
+ const std::vector<std::string> sections_to_update{
+ hmi_response::display_capabilities};
+ const std::string content_to_save = "{\"field\" : \"value\" }";
+
+ CreateFile(kHmiCapabilitiesCacheFile);
+
+ const std::vector<uint8_t> binary_data_to_save(content_to_save.begin(),
+ content_to_save.end());
+ file_system::Write(kHmiCapabilitiesCacheFile, binary_data_to_save);
+
+ EXPECT_TRUE(hmi_capabilities_->SaveCachedCapabilitiesToFile(
+ hmi_interface::tts, sections_to_update, schema_));
+
+ std::string content_after_update;
+ EXPECT_TRUE(
+ file_system::ReadFile(kHmiCapabilitiesCacheFile, content_after_update));
+ EXPECT_NE(content_to_save, content_after_update);
+}
+
+TEST_F(
+ HMICapabilitiesTest,
+ SaveCachedCapabilitiesToFile_LanguageIsNotTheSameAsPersisted_SaveNewLanguageToCache) {
+ SetUpLanguageAndLightCapabilitiesExpectation();
+ const std::string new_language = "RU-RU";
+
+ hmi_capabilities_->Init(last_state_wrapper_);
+ hmi_capabilities_->set_active_tts_language(hmi_apis::Common_Language::RU_RU);
+ const std::vector<std::string> sections_to_update{hmi_response::language};
+ const std::string content_to_save = "{\"TTS\": {\"language\":\"EN_US\"}}";
+
+ CreateFile(kHmiCapabilitiesCacheFile);
+ const std::vector<uint8_t> binary_data_to_save(content_to_save.begin(),
+ content_to_save.end());
+ file_system::Write(kHmiCapabilitiesCacheFile, binary_data_to_save);
+
+ EXPECT_TRUE(hmi_capabilities_->SaveCachedCapabilitiesToFile(
+ hmi_interface::tts, sections_to_update, schema_));
+
+ std::string content_after_update;
+ ASSERT_TRUE(
+ file_system::ReadFile(kHmiCapabilitiesCacheFile, content_after_update));
+ EXPECT_TRUE(content_after_update.find(new_language) != std::string::npos);
+}
+
+TEST_F(
+ HMICapabilitiesTest,
+ SaveCachedCapabilitiesToFile_SectionToUpdateIsEmpty_SkipSaving_ReturnTrue) {
+ const std::vector<std::string> sections_to_update;
+ EXPECT_TRUE(hmi_capabilities_->SaveCachedCapabilitiesToFile(
+ "", sections_to_update, schema_));
+}
+
+TEST_F(HMICapabilitiesTest, PrepareJsonValueForSaving_Success) {
+ const std::vector<std::string> sections_to_update{
+ hmi_response::display_capabilities,
+ hmi_response::hmi_zone_capabilities,
+ hmi_response::soft_button_capabilities,
+ strings::audio_pass_thru_capabilities,
+ strings::hmi_capabilities,
+ strings::system_capabilities,
+ hmi_response::languages};
+
+ const std::vector<std::string> interfaces_name{
+ hmi_interface::tts,
+ hmi_interface::vr,
+ hmi_interface::ui,
+ hmi_interface::buttons,
+ hmi_interface::vehicle_info,
+ hmi_interface::rc,
+ hmi_response::speech_capabilities,
+ hmi_response::prerecorded_speech_capabilities,
+ hmi_response::button_capabilities,
+ hmi_response::preset_bank_capabilities};
+
+ smart_objects::SmartObject audio_capabilities_so(
+ smart_objects::SmartType_Array);
+ audio_capabilities_so[0][strings::sampling_rate] =
+ hmi_apis::Common_SamplingRate::RATE_44KHZ;
+ audio_capabilities_so[0][strings::bits_per_sample] =
+ hmi_apis::Common_BitsPerSample::RATE_8_BIT;
+ audio_capabilities_so[0][strings::audio_type] =
+ hmi_apis::Common_AudioType::PCM;
+
+ const std::string content_to_save = "{\"field\" : \"value\" }";
+ const std::vector<uint8_t> binary_data_to_save(content_to_save.begin(),
+ content_to_save.end());
+
+ hmi_capabilities_->set_audio_pass_thru_capabilities(audio_capabilities_so);
+
+ CreateFile(kHmiCapabilitiesCacheFile);
+ file_system::Write(kHmiCapabilitiesCacheFile, binary_data_to_save);
+
+ for (size_t i = 0; i < interfaces_name.size(); ++i) {
+ EXPECT_TRUE(hmi_capabilities_->SaveCachedCapabilitiesToFile(
+ interfaces_name[i], sections_to_update, schema_));
+ }
+
+ std::string content_after_update;
+ EXPECT_TRUE(
+ file_system::ReadFile(kHmiCapabilitiesCacheFile, content_after_update));
+
+ Json::Value root_node;
+ utils::JsonReader reader;
+ ASSERT_TRUE(reader.parse(content_after_update, &root_node));
+
+ for (size_t i = 0; i < interfaces_name.size(); ++i) {
+ EXPECT_TRUE(static_cast<bool>(root_node[interfaces_name[i]]));
+ }
+ EXPECT_TRUE(
+ root_node[hmi_interface::ui][strings::audio_pass_thru_capabilities]
+ .isArray());
+}
+
+TEST_F(HMICapabilitiesTest,
+ OnCapabilityInitialized_RespondToAllPendingRAIRequestsIfTheyHold) {
+ SetUpLanguageAndLightCapabilitiesExpectation();
+
+ std::vector<hmi_apis::FunctionID::eType> requests_required{
+ hmi_apis::FunctionID::RC_GetCapabilities,
+ hmi_apis::FunctionID::VR_GetLanguage,
+ hmi_apis::FunctionID::VR_GetSupportedLanguages,
+ hmi_apis::FunctionID::VR_GetCapabilities,
+ hmi_apis::FunctionID::TTS_GetLanguage,
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages,
+ hmi_apis::FunctionID::TTS_GetCapabilities,
+ hmi_apis::FunctionID::Buttons_GetCapabilities,
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType,
+ hmi_apis::FunctionID::UI_GetCapabilities,
+ hmi_apis::FunctionID::UI_GetLanguage,
+ hmi_apis::FunctionID::UI_GetSupportedLanguages};
+
+ // Contains only UI capabilities
+ const std::string hmi_capabilities_file = "hmi_capabilities_sc2.json";
+ ON_CALL(mock_application_manager_settings_, hmi_capabilities_file_name())
+ .WillByDefault(ReturnRef(hmi_capabilities_file));
+
+ // Initializes the UI capabilities with the default values
+ // Other interfaces are absent and appropriate requests should be sent
+ hmi_capabilities_->Init(last_state_wrapper_);
+
+ ON_CALL(mock_app_mngr_, IsHMICooperating()).WillByDefault(Return(false));
+
+ // Sets isHMICooperating flag to true after all required capabilities are
+ // received from HMI
+ EXPECT_CALL(mock_app_mngr_, SetHMICooperating(true));
+
+ for (const auto& request_id : requests_required) {
+ hmi_capabilities_->UpdateRequestsRequiredForCapabilities(request_id);
+ }
+}
+
+TEST_F(HMICapabilitiesTest,
+ OnlyUICapabilitiesInCacheFile_RequestRequiredForOtherInterfaces) {
+ SetUpLanguageAndLightCapabilitiesExpectation();
+
+ std::vector<hmi_apis::FunctionID::eType> requests_required{
+ hmi_apis::FunctionID::RC_GetCapabilities,
+ hmi_apis::FunctionID::VR_GetLanguage,
+ hmi_apis::FunctionID::VR_GetSupportedLanguages,
+ hmi_apis::FunctionID::VR_GetCapabilities,
+ hmi_apis::FunctionID::TTS_GetLanguage,
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages,
+ hmi_apis::FunctionID::TTS_GetCapabilities,
+ hmi_apis::FunctionID::Buttons_GetCapabilities,
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType};
+
+ const std::string hmi_capabilities_cache_file =
+ "hmi_capabilities_cache_test.json";
+ CreateFile(hmi_capabilities_cache_file);
+ const std::string predefined_ui_capabilities =
+ "{\"UI\" : {\"language\" : "
+ "\"EN-US\",\"languages\":[],\"displayCapabilities\" : "
+ "{},\"audioPassThruCapabilities\":[],\"pcmStreamCapabilities\" : "
+ "{},\"hmiZoneCapabilities\": \"\",\"softButtonCapabilities\" : "
+ "[],\"systemCapabilities\" : {}}}";
+
+ const std::vector<uint8_t> binary_data_to_save(
+ predefined_ui_capabilities.begin(), predefined_ui_capabilities.end());
+
+ file_system::Write(hmi_capabilities_cache_file, binary_data_to_save);
+
+ ON_CALL(mock_application_manager_settings_,
+ hmi_capabilities_cache_file_name())
+ .WillByDefault(ReturnRef(hmi_capabilities_cache_file));
+
+ hmi_capabilities_->Init(last_state_wrapper_);
+
+ EXPECT_FALSE(hmi_capabilities_->IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetLanguage));
+ EXPECT_FALSE(hmi_capabilities_->IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetSupportedLanguages));
+ EXPECT_FALSE(hmi_capabilities_->IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::UI_GetCapabilities));
+
+ for (const auto& item : requests_required) {
+ EXPECT_TRUE(hmi_capabilities_->IsRequestsRequiredForCapabilities(item));
+ }
+
+ DeleteFileIfExists(hmi_capabilities_cache_file);
+}
+
+TEST_F(HMICapabilitiesTest,
+ OnlyRCCapabilitiesInCacheFile_RequestRequiredForOtherInterfaces) {
+ SetUpLanguageAndLightCapabilitiesExpectation();
+
+ std::vector<hmi_apis::FunctionID::eType> requests_required{
+ hmi_apis::FunctionID::UI_GetLanguage,
+ hmi_apis::FunctionID::UI_GetSupportedLanguages,
+ hmi_apis::FunctionID::UI_GetCapabilities,
+ hmi_apis::FunctionID::VR_GetLanguage,
+ hmi_apis::FunctionID::VR_GetSupportedLanguages,
+ hmi_apis::FunctionID::VR_GetCapabilities,
+ hmi_apis::FunctionID::TTS_GetLanguage,
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages,
+ hmi_apis::FunctionID::TTS_GetCapabilities,
+ hmi_apis::FunctionID::Buttons_GetCapabilities,
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType};
+
+ const std::string hmi_capabilities_cache_file =
+ "hmi_capabilities_cache_test.json";
+ CreateFile(hmi_capabilities_cache_file);
+ const std::string predefined_rc_capabilities =
+ "{\"RC\" : {\"remoteControlCapability\" : {\"buttonCapabilities\": "
+ "[],\"climateControlCapabilities\": [],\"radioControlCapabilities\": "
+ "[],\"audioControlCapabilities\": [],\"seatControlCapabilities\": "
+ "[],\"lightControlCapabilities\": {},\"hmiSettingsControlCapabilities\": "
+ "{}},\"seatLocationCapability\": {}}}}";
+
+ const std::vector<uint8_t> binary_data_to_save(
+ predefined_rc_capabilities.begin(), predefined_rc_capabilities.end());
+
+ file_system::Write(hmi_capabilities_cache_file, binary_data_to_save);
+
+ ON_CALL(mock_application_manager_settings_,
+ hmi_capabilities_cache_file_name())
+ .WillByDefault(ReturnRef(hmi_capabilities_cache_file));
+
+ hmi_capabilities_->Init(last_state_wrapper_);
+
+ EXPECT_FALSE(hmi_capabilities_->IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::RC_GetCapabilities));
+
+ for (const auto& item : requests_required) {
+ EXPECT_TRUE(hmi_capabilities_->IsRequestsRequiredForCapabilities(item));
+ }
+}
+
+TEST_F(HMICapabilitiesTest,
+ OnlyVRCapabilitiesInCacheFile_RequestRequiredForOtherInterfaces) {
+ SetUpLanguageAndLightCapabilitiesExpectation();
+
+ std::vector<hmi_apis::FunctionID::eType> requests_required{
+ hmi_apis::FunctionID::UI_GetLanguage,
+ hmi_apis::FunctionID::UI_GetSupportedLanguages,
+ hmi_apis::FunctionID::RC_GetCapabilities,
+ hmi_apis::FunctionID::UI_GetCapabilities,
+ hmi_apis::FunctionID::TTS_GetLanguage,
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages,
+ hmi_apis::FunctionID::TTS_GetCapabilities,
+ hmi_apis::FunctionID::Buttons_GetCapabilities,
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType};
+
+ const std::string hmi_capabilities_cache_file =
+ "hmi_capabilities_cache_test.json";
+ CreateFile(hmi_capabilities_cache_file);
+ const std::string predefined_vr_capabilities =
+ "{\"VR\": {\"vrCapabilities\": [],\"language\": \"\",\"languages\": []}}";
+
+ const std::vector<uint8_t> binary_data_to_save(
+ predefined_vr_capabilities.begin(), predefined_vr_capabilities.end());
+
+ file_system::Write(hmi_capabilities_cache_file, binary_data_to_save);
+
+ ON_CALL(mock_application_manager_settings_,
+ hmi_capabilities_cache_file_name())
+ .WillByDefault(ReturnRef(hmi_capabilities_cache_file));
+
+ hmi_capabilities_->Init(last_state_wrapper_);
+
+ EXPECT_FALSE(hmi_capabilities_->IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetLanguage));
+ EXPECT_FALSE(hmi_capabilities_->IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetSupportedLanguages));
+ EXPECT_FALSE(hmi_capabilities_->IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetCapabilities));
+
+ for (const auto& item : requests_required) {
+ EXPECT_TRUE(hmi_capabilities_->IsRequestsRequiredForCapabilities(item));
+ }
+}
+
+TEST_F(HMICapabilitiesTest,
+ OnlyTTSCapabilitiesInCacheFile_RequestRequiredForOtherInterfaces) {
+ SetUpLanguageAndLightCapabilitiesExpectation();
+
+ std::vector<hmi_apis::FunctionID::eType> requests_required{
+ hmi_apis::FunctionID::UI_GetLanguage,
+ hmi_apis::FunctionID::UI_GetSupportedLanguages,
+ hmi_apis::FunctionID::UI_GetCapabilities,
+ hmi_apis::FunctionID::RC_GetCapabilities,
+ hmi_apis::FunctionID::VR_GetLanguage,
+ hmi_apis::FunctionID::VR_GetSupportedLanguages,
+ hmi_apis::FunctionID::VR_GetCapabilities,
+ hmi_apis::FunctionID::Buttons_GetCapabilities,
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType};
+
+ const std::string hmi_capabilities_cache_file =
+ "hmi_capabilities_cache_test.json";
+ CreateFile(hmi_capabilities_cache_file);
+ const std::string predefined_tts_capabilities =
+ "{\"TTS\": {\"speechCapabilities\": [],\"prerecordedSpeechCapabilities\" "
+ ": [],\"language\": \"\",\"languages\": "
+ "[]}}";
+
+ const std::vector<uint8_t> binary_data_to_save(
+ predefined_tts_capabilities.begin(), predefined_tts_capabilities.end());
+
+ file_system::Write(hmi_capabilities_cache_file, binary_data_to_save);
+
+ ON_CALL(mock_application_manager_settings_,
+ hmi_capabilities_cache_file_name())
+ .WillByDefault(ReturnRef(hmi_capabilities_cache_file));
+
+ hmi_capabilities_->Init(last_state_wrapper_);
+
+ EXPECT_FALSE(hmi_capabilities_->IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetLanguage));
+ EXPECT_FALSE(hmi_capabilities_->IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages));
+ EXPECT_FALSE(hmi_capabilities_->IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::TTS_GetCapabilities));
+
+ for (const auto& item : requests_required) {
+ EXPECT_TRUE(hmi_capabilities_->IsRequestsRequiredForCapabilities(item));
+ }
+}
+
+TEST_F(HMICapabilitiesTest,
+ OnlyButtonsSCapabilitiesInCacheFile_RequestRequiredForOtherInterfaces) {
+ SetUpLanguageAndLightCapabilitiesExpectation();
+
+ std::vector<hmi_apis::FunctionID::eType> requests_required{
+ hmi_apis::FunctionID::UI_GetLanguage,
+ hmi_apis::FunctionID::UI_GetSupportedLanguages,
+ hmi_apis::FunctionID::UI_GetCapabilities,
+ hmi_apis::FunctionID::RC_GetCapabilities,
+ hmi_apis::FunctionID::TTS_GetLanguage,
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages,
+ hmi_apis::FunctionID::TTS_GetCapabilities,
+ hmi_apis::FunctionID::VR_GetLanguage,
+ hmi_apis::FunctionID::VR_GetSupportedLanguages,
+ hmi_apis::FunctionID::VR_GetCapabilities,
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType};
+
+ const std::string hmi_capabilities_cache_file =
+ "hmi_capabilities_cache_test.json";
+ CreateFile(hmi_capabilities_cache_file);
+ const std::string predefined_buttons_capabilities =
+ "{\"Buttons\": {\"capabilities\": [],\"presetBankCapabilities\": {}}}";
+
+ const std::vector<uint8_t> binary_data_to_save(
+ predefined_buttons_capabilities.begin(),
+ predefined_buttons_capabilities.end());
+
+ file_system::Write(hmi_capabilities_cache_file, binary_data_to_save);
+
+ ON_CALL(mock_application_manager_settings_,
+ hmi_capabilities_cache_file_name())
+ .WillByDefault(ReturnRef(hmi_capabilities_cache_file));
+
+ hmi_capabilities_->Init(last_state_wrapper_);
+
+ EXPECT_FALSE(hmi_capabilities_->IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::Buttons_GetCapabilities));
+
+ for (const auto& item : requests_required) {
+ EXPECT_TRUE(hmi_capabilities_->IsRequestsRequiredForCapabilities(item));
+ }
+}
+
+TEST_F(HMICapabilitiesTest,
+ OnlyVehicleInfoInCacheFile_RequestRequiredForOtherInterfaces) {
+ SetUpLanguageAndLightCapabilitiesExpectation();
+
+ std::vector<hmi_apis::FunctionID::eType> requests_required{
+ hmi_apis::FunctionID::UI_GetLanguage,
+ hmi_apis::FunctionID::UI_GetSupportedLanguages,
+ hmi_apis::FunctionID::UI_GetCapabilities,
+ hmi_apis::FunctionID::RC_GetCapabilities,
+ hmi_apis::FunctionID::TTS_GetLanguage,
+ hmi_apis::FunctionID::TTS_GetSupportedLanguages,
+ hmi_apis::FunctionID::TTS_GetCapabilities,
+ hmi_apis::FunctionID::VR_GetLanguage,
+ hmi_apis::FunctionID::VR_GetSupportedLanguages,
+ hmi_apis::FunctionID::VR_GetCapabilities,
+ hmi_apis::FunctionID::Buttons_GetCapabilities};
+
+ const std::string hmi_capabilities_cache_file =
+ "hmi_capabilities_cache_test.json";
+ CreateFile(hmi_capabilities_cache_file);
+ const std::string predefined_vi_capabilities =
+ "{\"VehicleInfo\": { \"vehicleType\" : {} }}";
+
+ const std::vector<uint8_t> binary_data_to_save(
+ predefined_vi_capabilities.begin(), predefined_vi_capabilities.end());
+
+ file_system::Write(hmi_capabilities_cache_file, binary_data_to_save);
+
+ ON_CALL(mock_application_manager_settings_,
+ hmi_capabilities_cache_file_name())
+ .WillByDefault(ReturnRef(hmi_capabilities_cache_file));
+
+ hmi_capabilities_->Init(last_state_wrapper_);
+
+ EXPECT_FALSE(hmi_capabilities_->IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VehicleInfo_GetVehicleType));
+
+ for (const auto& item : requests_required) {
+ EXPECT_TRUE(hmi_capabilities_->IsRequestsRequiredForCapabilities(item));
+ }
+}
+
+TEST_F(
+ HMICapabilitiesTest,
+ ConvertJsonArrayToSoArray_ConvertPrerecordedSpeech_SuccessConvertFromStringToEnum) {
+ SetUpLanguageAndLightCapabilitiesExpectation();
+
+ CreateFile(kHmiCapabilitiesCacheFile);
+ const std::string prerecordedSpeechCapabilities =
+ "{ \"TTS\" :{"
+ "\"prerecordedSpeechCapabilities\" :["
+ "\"HELP_JINGLE\","
+ "\"INITIAL_JINGLE\","
+ "\"LISTEN_JINGLE\","
+ "\"POSITIVE_JINGLE\","
+ "\"NEGATIVE_JINGLE\"]}"
+ "}";
+
+ const std::vector<uint8_t> binary_data_to_save(
+ prerecordedSpeechCapabilities.begin(),
+ prerecordedSpeechCapabilities.end());
+ file_system::Write(kHmiCapabilitiesCacheFile, binary_data_to_save);
+
+ hmi_capabilities_->Init(last_state_wrapper_);
+
+ const auto tts_capabilities_so = *(hmi_capabilities_->prerecorded_speech());
+
+ EXPECT_EQ(hmi_apis::Common_PrerecordedSpeech::HELP_JINGLE,
+ static_cast<hmi_apis::Common_PrerecordedSpeech::eType>(
+ tts_capabilities_so[0].asInt()));
+ EXPECT_EQ(hmi_apis::Common_PrerecordedSpeech::INITIAL_JINGLE,
+ static_cast<hmi_apis::Common_PrerecordedSpeech::eType>(
+ tts_capabilities_so[1].asInt()));
+ EXPECT_EQ(hmi_apis::Common_PrerecordedSpeech::LISTEN_JINGLE,
+ static_cast<hmi_apis::Common_PrerecordedSpeech::eType>(
+ tts_capabilities_so[2].asInt()));
+ EXPECT_EQ(hmi_apis::Common_PrerecordedSpeech::POSITIVE_JINGLE,
+ static_cast<hmi_apis::Common_PrerecordedSpeech::eType>(
+ tts_capabilities_so[3].asInt()));
+ EXPECT_EQ(hmi_apis::Common_PrerecordedSpeech::NEGATIVE_JINGLE,
+ static_cast<hmi_apis::Common_PrerecordedSpeech::eType>(
+ tts_capabilities_so[4].asInt()));
}
} // namespace application_manager_test
diff --git a/src/components/application_manager/test/include/application_manager/mock_app_service_manager.h b/src/components/application_manager/test/include/application_manager/mock_app_service_manager.h
index 0b3753a532..60d2f90297 100644
--- a/src/components/application_manager/test/include/application_manager/mock_app_service_manager.h
+++ b/src/components/application_manager/test/include/application_manager/mock_app_service_manager.h
@@ -37,6 +37,7 @@
#include "application_manager/app_service_manager.h"
#include "application_manager/commands/command.h"
#include "application_manager/commands/command_impl.h"
+#include "application_manager/rpc_passing_handler.h"
namespace test {
namespace components {
@@ -86,6 +87,7 @@ class MockAppServiceManager : public application_manager::AppServiceManager {
const bool service_published));
MOCK_METHOD1(UpdateNavigationCapabilities,
bool(smart_objects::SmartObject& out_params));
+ MOCK_METHOD0(GetRPCPassingHandler, application_manager::RPCPassingHandler&());
};
} // namespace application_manager_test
diff --git a/src/components/application_manager/test/include/application_manager/mock_application.h b/src/components/application_manager/test/include/application_manager/mock_application.h
index 362dda4efb..454b43b99f 100644
--- a/src/components/application_manager/test/include/application_manager/mock_application.h
+++ b/src/components/application_manager/test/include/application_manager/mock_application.h
@@ -67,6 +67,8 @@ class MockApplication : public ::application_manager::Application {
MOCK_METHOD1(set_is_navi, void(bool allow));
MOCK_CONST_METHOD0(mobile_projection_enabled, bool());
MOCK_METHOD1(set_mobile_projection_enabled, void(bool allow));
+ MOCK_CONST_METHOD0(webengine_projection_enabled, bool());
+ MOCK_METHOD1(set_webengine_projection_enabled, void(const bool allow));
MOCK_CONST_METHOD0(video_streaming_approved, bool());
MOCK_METHOD1(set_video_streaming_approved, void(bool state));
MOCK_CONST_METHOD0(audio_streaming_approved, bool());
@@ -86,15 +88,16 @@ class MockApplication : public ::application_manager::Application {
void(protocol_handler::ServiceType service_type));
MOCK_METHOD1(SuspendStreaming,
void(protocol_handler::ServiceType service_type));
- MOCK_METHOD2(WakeUpStreaming,
- void(protocol_handler::ServiceType service_type,
- uint32_t timer_len));
+ MOCK_METHOD1(WakeUpStreaming,
+ void(protocol_handler::ServiceType service_type));
MOCK_CONST_METHOD0(is_voice_communication_supported, bool());
MOCK_METHOD1(set_voice_communication_supported,
void(bool is_voice_communication_supported));
MOCK_CONST_METHOD0(app_allowed, bool());
MOCK_CONST_METHOD0(has_been_activated, bool());
MOCK_METHOD1(set_activated, bool(bool is_active));
+ MOCK_CONST_METHOD0(is_ready, bool());
+ MOCK_METHOD1(set_is_ready, bool(bool is_active));
MOCK_CONST_METHOD0(version, const ::application_manager::Version&());
MOCK_METHOD1(set_hmi_application_id, void(uint32_t hmi_app_id));
MOCK_CONST_METHOD0(hmi_app_id, uint32_t());
@@ -315,19 +318,19 @@ class MockApplication : public ::application_manager::Application {
void(uint32_t cmd_id,
const smart_objects::SmartObject& command));
MOCK_METHOD1(RemoveCommand, void(uint32_t cmd_id));
- MOCK_METHOD1(FindCommand, smart_objects::SmartObject*(uint32_t cmd_id));
+ MOCK_METHOD1(FindCommand, smart_objects::SmartObject(uint32_t cmd_id));
MOCK_METHOD2(AddSubMenu,
void(uint32_t menu_id, const smart_objects::SmartObject& menu));
MOCK_METHOD1(RemoveSubMenu, void(uint32_t menu_id));
- MOCK_CONST_METHOD1(FindSubMenu,
- smart_objects::SmartObject*(uint32_t menu_id));
- MOCK_METHOD1(IsSubMenuNameAlreadyExist, bool(const std::string& name));
+ MOCK_CONST_METHOD1(FindSubMenu, smart_objects::SmartObject(uint32_t menu_id));
+ MOCK_METHOD2(IsSubMenuNameAlreadyExist,
+ bool(const std::string& name, const uint32_t parent_id));
MOCK_METHOD2(AddChoiceSet,
void(uint32_t choice_set_id,
const smart_objects::SmartObject& choice_set));
MOCK_METHOD1(RemoveChoiceSet, void(uint32_t choice_set_id));
MOCK_METHOD1(FindChoiceSet,
- smart_objects::SmartObject*(uint32_t choice_set_id));
+ smart_objects::SmartObject(uint32_t choice_set_id));
MOCK_METHOD3(AddPerformInteractionChoiceSet,
void(uint32_t correlation_id,
uint32_t choice_set_id,
diff --git a/src/components/application_manager/test/include/application_manager/hmi_capabilities_for_testing.h b/src/components/application_manager/test/include/application_manager/mock_command_holder.h
index 9764a9997f..0391808126 100644
--- a/src/components/application_manager/test/include/application_manager/hmi_capabilities_for_testing.h
+++ b/src/components/application_manager/test/include/application_manager/mock_command_holder.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Ford Motor Company
+ * Copyright (c) 2020, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,28 +29,32 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-
-#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_HMI_CAPABILITIES_FOR_TESTING_H_
-#define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_HMI_CAPABILITIES_FOR_TESTING_H_
-
-#include "application_manager/hmi_capabilities_impl.h"
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_COMMAND_HOLDER_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_COMMAND_HOLDER_H_
+#include "application_manager/command_holder.h"
+#include "gmock/gmock.h"
namespace test {
namespace components {
namespace application_manager_test {
-class HMICapabilitiesForTesting
- : public ::application_manager::HMICapabilitiesImpl {
+class MockCommandHolder : public application_manager::CommandHolder {
public:
- HMICapabilitiesForTesting(::application_manager::ApplicationManager& app_mngr)
- : HMICapabilitiesImpl(app_mngr) {}
- bool LoadCapabilitiesFromFile() {
- return load_capabilities_from_file();
- }
+ MOCK_METHOD4(
+ Suspend,
+ void(application_manager::ApplicationSharedPtr application,
+ application_manager::CommandHolder::CommandType type,
+ application_manager::commands::Command::CommandSource source,
+ smart_objects::SmartObjectSPtr command));
+ MOCK_METHOD2(Resume,
+ void(application_manager::ApplicationSharedPtr application,
+ application_manager::CommandHolder::CommandType type));
+ MOCK_METHOD1(Clear,
+ void(application_manager::ApplicationSharedPtr application));
};
} // namespace application_manager_test
} // namespace components
} // namespace test
-#endif // SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_HMI_CAPABILITIES_FOR_TESTING_H_
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_COMMAND_HOLDER_H_
diff --git a/src/components/application_manager/test/include/application_manager/mock_hmi_capabilities.h b/src/components/application_manager/test/include/application_manager/mock_hmi_capabilities.h
index 7c163d78ad..2f9f40ad2a 100644
--- a/src/components/application_manager/test/include/application_manager/mock_hmi_capabilities.h
+++ b/src/components/application_manager/test/include/application_manager/mock_hmi_capabilities.h
@@ -75,7 +75,7 @@ class MockHMICapabilities : public ::application_manager::HMICapabilities {
void(const hmi_apis::Common_Language::eType language));
MOCK_CONST_METHOD0(ui_supported_languages,
- const smart_objects::SmartObject*());
+ const smart_objects::SmartObjectSPtr());
MOCK_METHOD1(set_ui_supported_languages,
void(const smart_objects::SmartObject& supported_languages));
@@ -85,7 +85,7 @@ class MockHMICapabilities : public ::application_manager::HMICapabilities {
void(const hmi_apis::Common_Language::eType language));
MOCK_CONST_METHOD0(vr_supported_languages,
- const smart_objects::SmartObject*());
+ const smart_objects::SmartObjectSPtr());
MOCK_METHOD1(set_vr_supported_languages,
void(const smart_objects::SmartObject& supported_languages));
@@ -95,7 +95,7 @@ class MockHMICapabilities : public ::application_manager::HMICapabilities {
void(const hmi_apis::Common_Language::eType language));
MOCK_CONST_METHOD0(tts_supported_languages,
- const smart_objects::SmartObject*());
+ const smart_objects::SmartObjectSPtr());
MOCK_METHOD1(set_tts_supported_languages,
void(const smart_objects::SmartObject& supported_languages));
@@ -172,26 +172,35 @@ class MockHMICapabilities : public ::application_manager::HMICapabilities {
MOCK_CONST_METHOD0(rc_supported, bool());
MOCK_METHOD1(set_rc_supported, void(const bool supported));
+ MOCK_CONST_METHOD0(driver_distraction_supported, bool());
+ MOCK_METHOD1(set_driver_distraction_supported, void(const bool supported));
+
MOCK_CONST_METHOD0(navigation_capability,
- const smart_objects::SmartObject*());
+ const smart_objects::SmartObjectSPtr());
MOCK_METHOD1(set_navigation_capability,
void(const smart_objects::SmartObject& navigation_capability));
- MOCK_CONST_METHOD0(phone_capability, const smart_objects::SmartObject*());
+ MOCK_CONST_METHOD0(phone_capability, const smart_objects::SmartObjectSPtr());
MOCK_METHOD1(set_phone_capability,
void(const smart_objects::SmartObject& phone_capability));
MOCK_CONST_METHOD0(video_streaming_capability,
- const smart_objects::SmartObject*());
+ const smart_objects::SmartObjectSPtr());
MOCK_METHOD1(
set_video_streaming_capability,
void(const smart_objects::SmartObject& video_streaming_capability));
- MOCK_CONST_METHOD0(rc_capability, const smart_objects::SmartObject*());
+ MOCK_CONST_METHOD0(rc_capability, const smart_objects::SmartObjectSPtr());
MOCK_METHOD1(set_rc_capability,
void(const smart_objects::SmartObject& rc_capability));
+ MOCK_CONST_METHOD0(driver_distraction_capability,
+ const smart_objects::SmartObjectSPtr());
+ MOCK_METHOD1(
+ set_driver_distraction_capability,
+ void(const smart_objects::SmartObject& driver_distraction_capability));
+
MOCK_CONST_METHOD0(seat_location_capability,
- const smart_objects::SmartObject*());
+ const smart_objects::SmartObjectSPtr());
MOCK_METHOD1(
set_seat_location_capability,
void(const smart_objects::SmartObject& seat_location_capability));
@@ -203,22 +212,22 @@ class MockHMICapabilities : public ::application_manager::HMICapabilities {
MOCK_CONST_METHOD0(ccpu_version, const std::string&());
MOCK_METHOD1(set_ccpu_version, void(const std::string& ccpu_version));
+ MOCK_METHOD1(OnSoftwareVersionReceived,
+ void(const std::string& ccpu_version));
+ MOCK_METHOD0(UpdateCachedCapabilities, void());
MOCK_METHOD0(get_hmi_language_handler,
application_manager::HMILanguageHandler&());
MOCK_METHOD1(set_handle_response_for,
void(const smart_objects::SmartObject& request));
-
- protected:
- MOCK_CONST_METHOD2(check_existing_json_member,
- bool(const Json::Value& json_member,
- const char* name_of_member));
-
- MOCK_CONST_METHOD2(convert_json_languages_to_obj,
- void(const Json::Value& json_languages,
- smart_objects::SmartObject& languages));
- MOCK_CONST_METHOD2(convert_audio_capability_to_obj,
- void(const Json::Value& capability,
- smart_objects::SmartObject& output_so));
+ MOCK_METHOD3(SaveCachedCapabilitiesToFile,
+ bool(const std::string& interface_name,
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema));
+ MOCK_CONST_METHOD0(DeleteCachedCapabilitiesFile, bool());
+ MOCK_CONST_METHOD1(IsRequestsRequiredForCapabilities,
+ bool(hmi_apis::FunctionID::eType));
+ MOCK_METHOD1(UpdateRequestsRequiredForCapabilities,
+ void(hmi_apis::FunctionID::eType requested_interface));
};
} // namespace application_manager_test
diff --git a/src/components/application_manager/test/include/application_manager/mock_message_helper.h b/src/components/application_manager/test/include/application_manager/mock_message_helper.h
index eb3c97bfff..d7919a374b 100644
--- a/src/components/application_manager/test/include/application_manager/mock_message_helper.h
+++ b/src/components/application_manager/test/include/application_manager/mock_message_helper.h
@@ -57,22 +57,12 @@ class MockMessageHelper {
smart_objects::SmartObjectSPtr(const uint32_t app_id));
MOCK_METHOD2(SendHashUpdateNotification,
void(const uint32_t app_id, ApplicationManager& app_mngr));
- MOCK_METHOD1(HMIResultToString,
- std::string(hmi_apis::Common_Result::eType hmi_result));
- MOCK_METHOD1(HMIResultFromString,
- hmi_apis::Common_Result::eType(const std::string& hmi_result));
- MOCK_METHOD1(MobileResultToString,
- std::string(mobile_apis::Result::eType mobile_result));
- MOCK_METHOD1(MobileResultFromString,
- mobile_api::Result::eType(const std::string& mobile_result));
MOCK_METHOD1(HMIToMobileResult,
mobile_api::Result::eType(
const hmi_apis::Common_Result::eType hmi_result));
MOCK_METHOD1(MobileToHMIResult,
hmi_apis::Common_Result::eType(
const mobile_api::Result::eType mobile_result));
- MOCK_METHOD1(StringToHMILevel,
- mobile_api::HMILevel::eType(const std::string& hmi_level));
MOCK_METHOD3(CreateDeviceListSO,
smart_objects::SmartObjectSPtr(
const connection_handler::DeviceMap& devices,
@@ -129,10 +119,17 @@ class MockMessageHelper {
MOCK_METHOD2(CreateMessageForHMI,
smart_objects::SmartObjectSPtr(hmi_apis::messageType::eType,
const uint32_t));
- MOCK_METHOD3(SendHMIStatusNotification,
- void(ApplicationSharedPtr application,
- const WindowID window_id,
- ApplicationManager& application_manager));
+ MOCK_METHOD2(CreateMessageForHMI,
+ smart_objects::SmartObjectSPtr(hmi_apis::FunctionID::eType,
+ const uint32_t));
+ MOCK_METHOD2(CreateHMIStatusNotification,
+ smart_objects::SmartObjectSPtr(ApplicationSharedPtr application,
+ const WindowID window_id));
+ MOCK_METHOD3(CreateOnButtonSubscriptionNotificationsForApp,
+ smart_objects::SmartObjectList(
+ ApplicationConstSharedPtr application,
+ ApplicationManager& app_mngr,
+ const ButtonSubscriptions& button_subscriptions));
MOCK_METHOD4(SendPolicyUpdate,
void(const std::string& file_path,
const uint32_t timeout,
@@ -162,34 +159,53 @@ class MockMessageHelper {
const bool require_encryption));
MOCK_METHOD4(SendPolicySnapshotNotification,
void(uint32_t connection_key,
+ const std::string& snapshot_file_path,
+ const std::string& url,
+ ApplicationManager& app_mngr));
+ MOCK_METHOD4(SendPolicySnapshotNotification,
+ void(uint32_t connection_key,
const std::vector<uint8_t>& policy_data,
const std::string& url,
ApplicationManager& app_mngr));
- MOCK_METHOD1(CommonLanguageFromString,
- hmi_apis::Common_Language::eType(const std::string& language));
- MOCK_METHOD1(CommonLightNameFromString,
- hmi_apis::Common_LightName::eType(const std::string& lightName));
- MOCK_METHOD1(CommonLanguageToString,
- std::string(hmi_apis::Common_Language::eType));
- MOCK_METHOD1(MobileLanguageToString,
- std::string(mobile_apis::Language::eType));
MOCK_METHOD2(CreateModuleInfoSO,
smart_objects::SmartObjectSPtr(uint32_t function_id,
ApplicationManager& app_mngr));
MOCK_METHOD2(SendAllOnButtonSubscriptionNotificationsForApp,
void(ApplicationConstSharedPtr app,
ApplicationManager& app_mngr));
+ MOCK_METHOD2(CreateUIResetGlobalPropertiesRequest,
+ smart_objects::SmartObjectSPtr(
+ const ResetGlobalPropertiesResult& reset_result,
+ ApplicationSharedPtr application));
+
+ MOCK_METHOD2(CreateTTSResetGlobalPropertiesRequest,
+ smart_objects::SmartObjectSPtr(
+ const ResetGlobalPropertiesResult& reset_result,
+ ApplicationSharedPtr application));
+ MOCK_METHOD2(CreateGlobalPropertiesRequestsToHMI,
+ smart_objects::SmartObjectList(ApplicationConstSharedPtr app,
+ ApplicationManager& app_mngr));
+ MOCK_METHOD1(CreateSubscribeWayPointsMessageToHMI,
+ smart_objects::SmartObjectSPtr(const uint32_t correlation_id));
+
+ MOCK_METHOD3(
+ CreateOnButtonSubscriptionNotification,
+ smart_objects::SmartObjectSPtr(uint32_t app_id,
+ hmi_apis::Common_ButtonName::eType button,
+ bool is_subscribed));
MOCK_METHOD2(SendOnResumeAudioSourceToHMI,
void(uint32_t app_id, ApplicationManager& app_mngr));
- MOCK_METHOD2(CreateAddSubMenuRequestToHMI,
+ MOCK_METHOD2(CreateAddSubMenuRequestsToHMI,
smart_objects::SmartObjectList(ApplicationConstSharedPtr app,
- const uint32_t correlation_id));
+ ApplicationManager& app_mngr));
MOCK_METHOD2(CreateAddCommandRequestToHMI,
smart_objects::SmartObjectList(ApplicationConstSharedPtr app,
ApplicationManager& app_mngr));
MOCK_METHOD1(CreateAddVRCommandRequestFromChoiceToHMI,
smart_objects::SmartObjectList(ApplicationConstSharedPtr app));
- MOCK_METHOD1(SendGlobalPropertiesToHMI, void(ApplicationConstSharedPtr app));
+ MOCK_METHOD2(SendGlobalPropertiesToHMI,
+ void(ApplicationConstSharedPtr app,
+ ApplicationManager& app_mngr));
MOCK_METHOD3(VerifyTtsFiles,
mobile_apis::Result::eType(smart_objects::SmartObject& message,
ApplicationConstSharedPtr app,
@@ -277,7 +293,8 @@ class MockMessageHelper {
const std::string& urlSchema,
const std::string& packageName,
ApplicationManager& app_man));
- MOCK_METHOD1(SendUnsubscribedWayPoints, bool(ApplicationManager& app_mngr));
+ MOCK_METHOD1(CreateUnsubscribeWayPointsRequest,
+ smart_objects::SmartObjectSPtr(const uint32_t correlation_id));
MOCK_METHOD2(SendQueryApps,
void(const uint32_t connection_key,
@@ -305,15 +322,17 @@ class MockMessageHelper {
void(const uint32_t app_id,
const std::string& icon_path,
ApplicationManager& application_manager));
- MOCK_METHOD1(StringifiedHMILevel,
- std::string(const mobile_apis::HMILevel::eType hmi_level));
MOCK_METHOD2(GetDeviceMacAddressForHandle,
std::string(const transport_manager::DeviceHandle device_handle,
const ApplicationManager& app_mngr));
- MOCK_METHOD3(SendDeleteCommandRequest,
- void(smart_objects::SmartObject* cmd,
- ApplicationSharedPtr application,
- ApplicationManager& app_mngr));
+ MOCK_METHOD3(CreateDeleteUICommandRequest,
+ smart_objects::SmartObjectSPtr(smart_objects::SmartObject* cmd,
+ const uint32_t app_id,
+ const uint32_t corr_id));
+ MOCK_METHOD3(CreateDeleteVRCommandRequest,
+ smart_objects::SmartObjectSPtr(smart_objects::SmartObject* cmd,
+ ApplicationSharedPtr application,
+ const uint32_t corr_id));
MOCK_METHOD3(SendDeleteSubmenuRequest,
void(smart_objects::SmartObject* cmd,
ApplicationSharedPtr application,
@@ -351,6 +370,21 @@ class MockMessageHelper {
const hmi_apis::Common_ServiceStatusUpdateReason::eType
service_update_reason,
const uint32_t app_id));
+ MOCK_METHOD4(CreateNegativeResponseFromHmi,
+ smart_objects::SmartObjectSPtr(const int32_t function_id,
+ const uint32_t correlation_id,
+ const int32_t result_code,
+ const std::string& info));
+
+ MOCK_METHOD3(CreateResponseMessageFromHmi,
+ smart_objects::SmartObjectSPtr(const int32_t function_id,
+ const uint32_t correlation_id,
+ const int32_t result_code));
+ MOCK_METHOD3(CreateUIDeleteWindowRequestToHMI,
+ smart_objects::SmartObjectSPtr(
+ application_manager::ApplicationSharedPtr application,
+ application_manager::ApplicationManager& app_mngr,
+ const application_manager::WindowID window_id));
static MockMessageHelper* message_helper_mock();
};
diff --git a/src/components/application_manager/test/include/application_manager/mock_request.h b/src/components/application_manager/test/include/application_manager/mock_request.h
index 77b5bb7c38..c1cc7f601f 100644
--- a/src/components/application_manager/test/include/application_manager/mock_request.h
+++ b/src/components/application_manager/test/include/application_manager/mock_request.h
@@ -56,6 +56,8 @@ class MockRequest : public application_manager::commands::Command {
MOCK_CONST_METHOD0(default_timeout, uint32_t());
MOCK_CONST_METHOD0(function_id, int32_t());
MOCK_CONST_METHOD0(window_id, application_manager::WindowID());
+ MOCK_METHOD1(set_warning_info, void(const std::string info));
+ MOCK_CONST_METHOD0(warning_info, std::string());
MOCK_METHOD0(onTimeOut, void());
MOCK_METHOD0(AllowedToTerminate, bool());
MOCK_METHOD1(SetAllowedToTerminate, void(bool is_allowed));
diff --git a/src/components/application_manager/test/include/application_manager/mock_resume_ctrl.h b/src/components/application_manager/test/include/application_manager/mock_resume_ctrl.h
index 3935ab7924..c2c02a1d0c 100644
--- a/src/components/application_manager/test/include/application_manager/mock_resume_ctrl.h
+++ b/src/components/application_manager/test/include/application_manager/mock_resume_ctrl.h
@@ -38,7 +38,7 @@
namespace test {
namespace components {
-namespace resumprion_test {
+namespace resumption_test {
class MockResumeCtrl : public resumption::ResumeCtrl {
public:
@@ -59,12 +59,16 @@ class MockResumeCtrl : public resumption::ResumeCtrl {
MOCK_CONST_METHOD0(is_suspended, bool());
MOCK_METHOD0(StopSavePersistentDataTimer, void());
MOCK_METHOD0(StartSavePersistentDataTimer, void());
- MOCK_METHOD2(StartResumption,
+ MOCK_METHOD3(StartResumption,
bool(app_mngr::ApplicationSharedPtr application,
- const std::string& hash));
+ const std::string& hash,
+ resumption::ResumeCtrl::ResumptionCallBack));
MOCK_METHOD1(StartResumptionOnlyHMILevel,
bool(app_mngr::ApplicationSharedPtr application));
MOCK_METHOD1(RetryResumption, void(const uint32_t app_id));
+ MOCK_METHOD2(HandleOnTimeOut,
+ void(const uint32_t correlation_id,
+ const hmi_apis::FunctionID::eType));
MOCK_METHOD1(CheckPersistenceFilesForResumption,
bool(app_mngr::ApplicationSharedPtr application));
MOCK_METHOD2(CheckApplicationHash,
@@ -92,26 +96,22 @@ class MockResumeCtrl : public resumption::ResumeCtrl {
MOCK_CONST_METHOD2(GetSavedAppHmiLevel,
int32_t(const std::string&, const std::string&));
MOCK_METHOD1(RestoreAppHMIState,
- bool(application_manager::ApplicationSharedPtr application));
+ void(application_manager::ApplicationSharedPtr application));
MOCK_METHOD1(SetupDefaultHMILevel,
bool(application_manager::ApplicationSharedPtr application));
MOCK_METHOD1(StartAppHmiStateResumption,
- bool(application_manager::ApplicationSharedPtr application));
+ void(application_manager::ApplicationSharedPtr application));
MOCK_METHOD3(SetAppHMIState,
bool(application_manager::ApplicationSharedPtr application,
const mobile_apis::HMILevel::eType hmi_level,
bool check_policy));
MOCK_CONST_METHOD0(LaunchTime, time_t());
- MOCK_METHOD2(RestoreAppWidgets,
- size_t(app_mngr::ApplicationSharedPtr application,
- const smart_objects::SmartObject& saved_app));
-
- MOCK_METHOD1(RestoreWidgetsHMIState,
- void(const smart_objects::SmartObject& response_message));
-
- MOCK_METHOD1(StartWaitingForDisplayCapabilitiesUpdate,
- void(application_manager::ApplicationSharedPtr application));
+ MOCK_METHOD2(StartWaitingForDisplayCapabilitiesUpdate,
+ void(application_manager::ApplicationSharedPtr application,
+ const bool is_resume_app));
+ MOCK_METHOD0(resumption_data_processor,
+ resumption::ResumptionDataProcessor&());
#ifdef BUILD_TESTS
MOCK_METHOD1(set_resumption_storage,
@@ -120,7 +120,7 @@ class MockResumeCtrl : public resumption::ResumeCtrl {
#endif // BUILD_TESTS
};
-} // namespace resumprion_test
+} // namespace resumption_test
} // namespace components
} // namespace test
diff --git a/src/components/utils/test/log_message_loop_thread_test.cc b/src/components/application_manager/test/include/application_manager/mock_resumption_data_processor.h
index 74b1f5094f..11ca5949c5 100644
--- a/src/components/utils/test/log_message_loop_thread_test.cc
+++ b/src/components/application_manager/test/include/application_manager/mock_resumption_data_processor.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Ford Motor Company
+ * Copyright (c) 2018, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,49 +30,35 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "utils/log_message_loop_thread.h"
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_RESUMPTION_DATA_PROCESSOR_H
+#define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_RESUMPTION_DATA_PROCESSOR_H
+
+#include "application_manager/application.h"
+#include "application_manager/resumption/resume_ctrl.h"
+#include "application_manager/resumption/resumption_data_processor.h"
+
#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-#include "utils/logger_status.h"
namespace test {
namespace components {
-namespace utils_test {
-
-using namespace ::logger;
-using ::testing::_;
-
-TEST(LogMessageLoopThread, DestroyLogMessage_loggerStatusDeletingLogger) {
- logger::logger_status = CreatingLoggerThread;
- LogMessageLoopThread* loop_thread = new LogMessageLoopThread();
- // assert
- EXPECT_EQ(CreatingLoggerThread, logger::logger_status);
-
- // act
- delete loop_thread;
-
- // assert
- EXPECT_EQ(DeletingLoggerThread, logger::logger_status);
+namespace resumption_test {
- logger::logger_status = LoggerThreadNotCreated;
-}
-
-class MockLogMessageTest : public LogMessageLoopThread {
+class MockResumptionDataProcessor : public resumption::ResumptionDataProcessor {
public:
- MOCK_CONST_METHOD1(Handle, void(const LogMessage message));
+ MOCK_METHOD3(Restore,
+ void(application_manager::ApplicationSharedPtr application,
+ smart_objects::SmartObject& saved_app,
+ resumption::ResumeCtrl::ResumptionCallBack callback));
+ MOCK_METHOD2(HandleOnTimeOut,
+ void(const uint32_t correlation_id,
+ const hmi_apis::FunctionID::eType function_id));
+ MOCK_METHOD2(SubscribeToResponse,
+ void(const int32_t app_id,
+ const resumption::ResumptionRequest& request));
};
-TEST(LogMessageLoopThread, HandleNeverCalled) {
- logger::logger_status = CreatingLoggerThread;
-
- MockLogMessageTest mmock;
- EXPECT_CALL(mmock, Handle(_)).Times(0);
- LogMessageLoopThread* loop_thread = new LogMessageLoopThread();
-
- delete loop_thread;
- logger::logger_status = LoggerThreadNotCreated;
-}
-
-} // namespace utils_test
+} // namespace resumption_test
} // namespace components
} // namespace test
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_RESUMPTION_DATA_PROCESSOR_H
diff --git a/src/components/application_manager/test/include/application_manager/resumption_data_test.h b/src/components/application_manager/test/include/application_manager/resumption_data_test.h
index e313427547..e38b428877 100644
--- a/src/components/application_manager/test/include/application_manager/resumption_data_test.h
+++ b/src/components/application_manager/test/include/application_manager/resumption_data_test.h
@@ -63,7 +63,15 @@ using namespace mobile_apis;
class ResumptionDataTest : public ::testing::Test {
protected:
ResumptionDataTest()
- : kCountOfCommands_(5u)
+ : help_prompt_(NULL)
+ , timeout_prompt_(NULL)
+ , vr_help_(NULL)
+ , vr_help_title_(NULL)
+ , vr_synonyms_(NULL)
+ , keyboard_props_(NULL)
+ , menu_title_(NULL)
+ , menu_icon_(NULL)
+ , kCountOfCommands_(5u)
, kCountOfChoice_(2u)
, kCountOfChoiceSets_(4u)
, kCountOfSubmenues_(3u)
@@ -77,6 +85,7 @@ class ResumptionDataTest : public ::testing::Test {
, ivilock_ptr_(std::make_shared<sync_primitives::Lock>())
, window_params_map_lock_ptr_(std::make_shared<sync_primitives::Lock>()) {
}
+ virtual ~ResumptionDataTest();
// Check structure in saved application
void CheckSavedApp(sm::SmartObject& saved_data);
// Set data for resumption
@@ -161,7 +170,8 @@ class ResumptionDataTest : public ::testing::Test {
std::shared_ptr<sync_primitives::Lock> window_params_map_lock_ptr_;
application_manager_test::MockApplicationManagerSettings
mock_application_manager_settings_;
- application_manager_test::MockApplicationManager mock_application_manager_;
+ NiceMock<application_manager_test::MockApplicationManager>
+ mock_application_manager_;
std::shared_ptr<NiceMock<application_manager_test::MockAppExtension> >
mock_app_extension_;
std::list<application_manager::AppExtensionPtr> extensions_;
diff --git a/src/components/application_manager/test/include/application_manager/test_resumption_data_db.h b/src/components/application_manager/test/include/application_manager/test_resumption_data_db.h
index 3f5802cb5a..e7a8f25261 100644
--- a/src/components/application_manager/test/include/application_manager/test_resumption_data_db.h
+++ b/src/components/application_manager/test/include/application_manager/test_resumption_data_db.h
@@ -44,13 +44,16 @@ namespace test {
namespace components {
namespace resumption_test {
+using ::testing::NiceMock;
+
class TestResumptionDataDB : public ResumptionDataDB {
public:
utils::dbms::SQLDatabase* get_db_handle() {
return db();
}
- application_manager_test::MockApplicationManager mock_application_manager_;
+ NiceMock<application_manager_test::MockApplicationManager>
+ mock_application_manager_;
TestResumptionDataDB(DbStorage db_storage)
: ResumptionDataDB(db_storage, mock_application_manager_) {}
};
diff --git a/src/components/application_manager/test/message_helper/message_helper_test.cc b/src/components/application_manager/test/message_helper/message_helper_test.cc
index f85c569bdb..c380805bc2 100644
--- a/src/components/application_manager/test/message_helper/message_helper_test.cc
+++ b/src/components/application_manager/test/message_helper/message_helper_test.cc
@@ -30,6 +30,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <algorithm>
#include <string>
#include <vector>
@@ -40,12 +41,14 @@
#include "application_manager/event_engine/event_dispatcher.h"
#include "application_manager/mock_application.h"
#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application_manager_settings.h"
#include "application_manager/mock_help_prompt_manager.h"
#include "application_manager/mock_rpc_service.h"
#include "application_manager/policies/policy_handler.h"
#include "application_manager/resumption/resume_ctrl.h"
#include "application_manager/state_controller.h"
#include "policy/mock_policy_settings.h"
+#include "smart_objects/enum_schema_item.h"
#include "utils/custom_string.h"
#include "utils/lock.h"
@@ -77,6 +80,11 @@ using testing::ReturnRef;
using testing::ReturnRefOfCopy;
using testing::SaveArg;
+namespace {
+const uint32_t kAppId = 123u;
+const uint32_t kCorrelationId_ = 1939u;
+} // namespace
+
TEST(MessageHelperTestCreate,
CreateBlockedByPoliciesResponse_SmartObject_Equal) {
mobile_apis::FunctionID::eType function_id =
@@ -159,8 +167,10 @@ TEST(MessageHelperTestCreate,
EXPECT_CALL(*mock_help_prompt_manager, GetSendingType())
.WillRepeatedly(Return(HelpPromptManager::SendingType::kSendBoth));
+ application_manager_test::MockApplicationManager mock_application_manager;
smart_objects::SmartObjectList ptr =
- MessageHelper::CreateGlobalPropertiesRequestsToHMI(appSharedMock, 0u);
+ MessageHelper::CreateGlobalPropertiesRequestsToHMI(
+ appSharedMock, mock_application_manager);
EXPECT_TRUE(ptr.empty());
}
@@ -209,8 +219,10 @@ TEST(MessageHelperTestCreate,
EXPECT_CALL(*mock_help_prompt_manager, GetSendingType())
.WillRepeatedly(Return(HelpPromptManager::SendingType::kSendBoth));
+ application_manager_test::MockApplicationManager mock_application_manager;
smart_objects::SmartObjectList ptr =
- MessageHelper::CreateGlobalPropertiesRequestsToHMI(appSharedMock, 0u);
+ MessageHelper::CreateGlobalPropertiesRequestsToHMI(
+ appSharedMock, mock_application_manager);
EXPECT_FALSE(ptr.empty());
@@ -399,9 +411,10 @@ TEST(MessageHelperTestCreate, CreateAddSubMenuRequestToHMI_SendObject_Equal) {
EXPECT_CALL(*appSharedMock, sub_menu_map()).WillOnce(Return(data_accessor));
EXPECT_CALL(*appSharedMock, app_id()).Times(AtLeast(1)).WillOnce(Return(1u));
- const uint32_t cor_id = 0u;
+ application_manager_test::MockApplicationManager mock_application_manager;
smart_objects::SmartObjectList ptr =
- MessageHelper::CreateAddSubMenuRequestToHMI(appSharedMock, cor_id);
+ MessageHelper::CreateAddSubMenuRequestsToHMI(appSharedMock,
+ mock_application_manager);
EXPECT_FALSE(ptr.empty());
@@ -429,9 +442,10 @@ TEST(MessageHelperTestCreate,
EXPECT_CALL(*appSharedMock, sub_menu_map()).WillOnce(Return(data_accessor));
- const uint32_t cor_id = 0u;
+ application_manager_test::MockApplicationManager mock_application_manager;
smart_objects::SmartObjectList ptr =
- MessageHelper::CreateAddSubMenuRequestToHMI(appSharedMock, cor_id);
+ MessageHelper::CreateAddSubMenuRequestsToHMI(appSharedMock,
+ mock_application_manager);
EXPECT_TRUE(ptr.empty());
}
@@ -602,9 +616,21 @@ class MessageHelperTest : public ::testing::Test {
, hmi_level_strings{"FULL", "LIMITED", "BACKGROUND", "NONE"}
, delta_from_functions_id(32768) {}
+ void StartStreamPreConditions() {
+ ON_CALL(mock_application_manager_, GetNextHMICorrelationID())
+ .WillByDefault(Return(kCorrelationId_));
+ ON_CALL(mock_application_manager_, get_settings())
+ .WillByDefault(ReturnRef(mock_app_mngr_settings_));
+ ON_CALL(mock_application_manager_, GetRPCService())
+ .WillByDefault(ReturnRef(mock_rpc_service_));
+ }
+
protected:
- application_manager_test::MockApplicationManager mock_application_manager;
- application_manager_test::MockRPCService mock_rpc_service_;
+ testing::NiceMock<application_manager_test::MockApplicationManager>
+ mock_application_manager_;
+ testing::NiceMock<application_manager_test::MockApplicationManagerSettings>
+ mock_app_mngr_settings_;
+ testing::NiceMock<application_manager_test::MockRPCService> mock_rpc_service_;
const StringArray language_strings;
const StringArray hmi_result_strings;
const StringArray mobile_result_strings;
@@ -615,41 +641,6 @@ class MessageHelperTest : public ::testing::Test {
const size_t delta_from_functions_id;
};
-TEST_F(MessageHelperTest,
- CommonLanguageFromString_StringValueOfEnum_CorrectEType) {
- HmiLanguage::eType enum_value;
- HmiLanguage::eType enum_from_string_value;
- // Check all languages >= 0
- for (size_t array_index = 0; array_index < language_strings.size();
- ++array_index) {
- enum_value = static_cast<HmiLanguage::eType>(array_index);
- enum_from_string_value =
- MessageHelper::CommonLanguageFromString(language_strings[array_index]);
- EXPECT_EQ(enum_value, enum_from_string_value);
- }
- // Check InvalidEnum == -1
- enum_value = HmiLanguage::INVALID_ENUM;
- enum_from_string_value = MessageHelper::CommonLanguageFromString("");
- EXPECT_EQ(enum_value, enum_from_string_value);
-}
-
-TEST_F(MessageHelperTest,
- CommonLanguageToString_ETypeValueOfEnum_CorrectString) {
- std::string string_from_enum;
- HmiLanguage::eType casted_enum;
- // Check all languages >=0
- for (size_t array_index = 0; array_index < language_strings.size();
- ++array_index) {
- casted_enum = static_cast<HmiLanguage::eType>(array_index);
- string_from_enum = MessageHelper::CommonLanguageToString(casted_enum);
- EXPECT_EQ(language_strings[array_index], string_from_enum);
- }
- // Check InvalidEnum == -1
- string_from_enum =
- MessageHelper::CommonLanguageToString(HmiLanguage::INVALID_ENUM);
- EXPECT_EQ("", string_from_enum);
-}
-
TEST_F(MessageHelperTest, ConvertEnumAPINoCheck_AnyEnumType_AnotherEnumType) {
hmi_apis::Common_LayoutMode::eType tested_enum_value =
hmi_apis::Common_LayoutMode::ICON_ONLY;
@@ -660,38 +651,6 @@ TEST_F(MessageHelperTest, ConvertEnumAPINoCheck_AnyEnumType_AnotherEnumType) {
EXPECT_EQ(hmi_apis::Common_AppHMIType::DEFAULT, converted);
}
-TEST_F(MessageHelperTest, HMIResultFromString_StringValueOfEnum_CorrectEType) {
- HmiResults::eType enum_value;
- HmiResults::eType enum_from_string_value;
- // Check all results >= 0
- for (size_t array_index = 0; array_index < hmi_result_strings.size();
- ++array_index) {
- enum_value = static_cast<HmiResults::eType>(array_index);
- enum_from_string_value =
- MessageHelper::HMIResultFromString(hmi_result_strings[array_index]);
- EXPECT_EQ(enum_value, enum_from_string_value);
- }
- // Check InvalidEnum == -1
- enum_value = HmiResults::INVALID_ENUM;
- enum_from_string_value = MessageHelper::HMIResultFromString("");
- EXPECT_EQ(enum_value, enum_from_string_value);
-}
-
-TEST_F(MessageHelperTest, HMIResultToString_ETypeValueOfEnum_CorrectString) {
- std::string string_from_enum;
- HmiResults::eType casted_enum;
- // Check all results >=0
- for (size_t array_index = 0; array_index < hmi_result_strings.size();
- ++array_index) {
- casted_enum = static_cast<HmiResults::eType>(array_index);
- string_from_enum = MessageHelper::HMIResultToString(casted_enum);
- EXPECT_EQ(hmi_result_strings[array_index], string_from_enum);
- }
- // Check InvalidEnum == -1
- string_from_enum = MessageHelper::HMIResultToString(HmiResults::INVALID_ENUM);
- EXPECT_EQ("", string_from_enum);
-}
-
TEST_F(MessageHelperTest,
HMIToMobileResult_HmiResultEType_GetCorrectMobileResultEType) {
MobileResults::eType tested_enum;
@@ -701,7 +660,7 @@ TEST_F(MessageHelperTest,
for (size_t enum_index = 0; enum_index < hmi_result_strings.size();
++enum_index) {
tested_enum =
- MessageHelper::MobileResultFromString(hmi_result_strings[enum_index]);
+ StringToEnum<MobileResults::eType>(hmi_result_strings[enum_index]);
casted_hmi_enum = static_cast<HmiResults::eType>(enum_index);
converted_enum = MessageHelper::HMIToMobileResult(casted_hmi_enum);
EXPECT_EQ(tested_enum, converted_enum);
@@ -748,10 +707,10 @@ TEST_F(MessageHelperTest,
smart_objects::SmartObject object;
policy_handler_test::MockPolicySettings policy_settings_;
const policy::PolicyHandler policy_handler(policy_settings_,
- mock_application_manager);
+ mock_application_manager_);
// Method call
mobile_apis::Result::eType result = MessageHelper::ProcessSoftButtons(
- object, appSharedMock, policy_handler, mock_application_manager);
+ object, appSharedMock, policy_handler, mock_application_manager_);
// Expect
EXPECT_EQ(mobile_apis::Result::SUCCESS, result);
}
@@ -767,10 +726,10 @@ TEST_F(MessageHelperTest,
buttons[0][strings::image][strings::value] = "invalid\\nvalue";
policy_handler_test::MockPolicySettings policy_settings_;
const policy::PolicyHandler policy_handler(policy_settings_,
- mock_application_manager);
+ mock_application_manager_);
// Method call
mobile_apis::Result::eType result = MessageHelper::ProcessSoftButtons(
- object, appSharedMock, policy_handler, mock_application_manager);
+ object, appSharedMock, policy_handler, mock_application_manager_);
// Expect
EXPECT_EQ(mobile_apis::Result::INVALID_DATA, result);
}
@@ -784,7 +743,7 @@ TEST_F(MessageHelperTest, VerifyImage_ImageTypeIsStatic_Success) {
image[strings::value] = "static_icon";
// Method call
mobile_apis::Result::eType result = MessageHelper::VerifyImage(
- image, appSharedMock, mock_application_manager);
+ image, appSharedMock, mock_application_manager_);
// EXPECT
EXPECT_EQ(mobile_apis::Result::SUCCESS, result);
}
@@ -799,7 +758,7 @@ TEST_F(MessageHelperTest, VerifyImage_ImageValueNotValid_InvalidData) {
image[strings::value] = " ";
// Method call
mobile_apis::Result::eType result = MessageHelper::VerifyImage(
- image, appSharedMock, mock_application_manager);
+ image, appSharedMock, mock_application_manager_);
// EXPECT
EXPECT_EQ(mobile_apis::Result::INVALID_DATA, result);
}
@@ -813,7 +772,7 @@ TEST_F(MessageHelperTest, VerifyImageApplyPath_ImageTypeIsStatic_Success) {
image[strings::value] = "icon.png";
// Method call
mobile_apis::Result::eType result = MessageHelper::VerifyImage(
- image, appSharedMock, mock_application_manager);
+ image, appSharedMock, mock_application_manager_);
EXPECT_EQ(mobile_apis::Result::SUCCESS, result);
// EXPECT
EXPECT_EQ("icon.png", image[strings::value].asString());
@@ -829,7 +788,7 @@ TEST_F(MessageHelperTest, VerifyImageApplyPath_ImageValueNotValid_InvalidData) {
image[strings::value] = " ";
// Method call
mobile_apis::Result::eType result = MessageHelper::VerifyImage(
- image, appSharedMock, mock_application_manager);
+ image, appSharedMock, mock_application_manager_);
// EXPECT
EXPECT_EQ(mobile_apis::Result::INVALID_DATA, result);
}
@@ -845,7 +804,7 @@ TEST_F(MessageHelperTest, VerifyImageFiles_SmartObjectWithValidData_Success) {
images[1][strings::value] = "static_icon";
// Method call
mobile_apis::Result::eType result = MessageHelper::VerifyImageFiles(
- images, appSharedMock, mock_application_manager);
+ images, appSharedMock, mock_application_manager_);
// EXPECT
EXPECT_EQ(mobile_apis::Result::SUCCESS, result);
}
@@ -863,7 +822,7 @@ TEST_F(MessageHelperTest,
images[1][strings::value] = "image\\n";
// Method call
mobile_apis::Result::eType result = MessageHelper::VerifyImageFiles(
- images, appSharedMock, mock_application_manager);
+ images, appSharedMock, mock_application_manager_);
// EXPECT
EXPECT_EQ(mobile_apis::Result::INVALID_DATA, result);
}
@@ -883,7 +842,7 @@ TEST_F(MessageHelperTest,
message[1][strings::image][strings::value] = "static_icon";
// Method call
mobile_apis::Result::eType result = MessageHelper::VerifyImageVrHelpItems(
- message, appSharedMock, mock_application_manager);
+ message, appSharedMock, mock_application_manager_);
// EXPECT
EXPECT_EQ(mobile_apis::Result::SUCCESS, result);
}
@@ -903,7 +862,7 @@ TEST_F(MessageHelperTest,
message[1][strings::image][strings::value] = "image\\n";
// Method call
mobile_apis::Result::eType result = MessageHelper::VerifyImageVrHelpItems(
- message, appSharedMock, mock_application_manager);
+ message, appSharedMock, mock_application_manager_);
// EXPECT
EXPECT_EQ(mobile_apis::Result::INVALID_DATA, result);
}
@@ -929,27 +888,6 @@ TEST_F(MessageHelperTest,
}
}
-TEST_F(MessageHelperTest,
- StringifiedHmiLevel_LevelEnum_EqualsWithStringsInArray) {
- mobile_apis::HMILevel::eType casted_enum;
- std::string converted_value;
- for (size_t i = 0; i < hmi_level_strings.size(); ++i) {
- casted_enum = static_cast<mobile_apis::HMILevel::eType>(i);
- converted_value = MessageHelper::StringifiedHMILevel(casted_enum);
- EXPECT_EQ(hmi_level_strings[i], converted_value);
- }
-}
-
-TEST_F(MessageHelperTest, StringToHmiLevel_LevelString_EqEType) {
- mobile_apis::HMILevel::eType tested_enum;
- mobile_apis::HMILevel::eType converted_enum;
- for (size_t i = 0; i < hmi_level_strings.size(); ++i) {
- tested_enum = static_cast<mobile_apis::HMILevel::eType>(i);
- converted_enum = MessageHelper::StringToHMILevel(hmi_level_strings[i]);
- EXPECT_EQ(tested_enum, converted_enum);
- }
-}
-
TEST_F(MessageHelperTest, SubscribeApplicationToSoftButton_CallFromApp) {
// Create application mock
MockApplicationSharedPtr appSharedPtr = std::make_shared<MockApplication>();
@@ -973,7 +911,7 @@ TEST_F(MessageHelperTest, SendGetListOfPermissionsResponse_SUCCESS) {
smart_objects::SmartObjectSPtr result;
- ON_CALL(mock_application_manager, GetRPCService())
+ ON_CALL(mock_application_manager_, GetRPCService())
.WillByDefault(ReturnRef(mock_rpc_service_));
EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
@@ -982,7 +920,7 @@ TEST_F(MessageHelperTest, SendGetListOfPermissionsResponse_SUCCESS) {
MessageHelper::SendGetListOfPermissionsResponse(permissions,
external_consent_status,
correlation_id,
- mock_application_manager);
+ mock_application_manager_);
ASSERT_TRUE(result.get());
@@ -1013,7 +951,7 @@ TEST_F(MessageHelperTest,
smart_objects::SmartObjectSPtr result;
- ON_CALL(mock_application_manager, GetRPCService())
+ ON_CALL(mock_application_manager_, GetRPCService())
.WillByDefault(ReturnRef(mock_rpc_service_));
EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
@@ -1022,7 +960,7 @@ TEST_F(MessageHelperTest,
MessageHelper::SendGetListOfPermissionsResponse(permissions,
external_consent_status,
correlation_id,
- mock_application_manager);
+ mock_application_manager_);
ASSERT_TRUE(result.get());
@@ -1059,7 +997,7 @@ TEST_F(MessageHelperTest,
TEST_F(MessageHelperTest, SendNaviSetVideoConfigRequest) {
smart_objects::SmartObjectSPtr result;
- ON_CALL(mock_application_manager, GetRPCService())
+ ON_CALL(mock_application_manager_, GetRPCService())
.WillByDefault(ReturnRef(mock_rpc_service_));
EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _))
.WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
@@ -1073,7 +1011,7 @@ TEST_F(MessageHelperTest, SendNaviSetVideoConfigRequest) {
video_params[strings::height] = 480;
MessageHelper::SendNaviSetVideoConfig(
- app_id, mock_application_manager, video_params);
+ app_id, mock_application_manager_, video_params);
EXPECT_EQ(hmi_apis::FunctionID::Navigation_SetVideoConfig,
(*result)[strings::params][strings::function_id].asInt());
@@ -1091,6 +1029,120 @@ TEST_F(MessageHelperTest, SendNaviSetVideoConfigRequest) {
EXPECT_EQ(480, msg_params[strings::config][strings::height].asInt());
}
+TEST_F(MessageHelperTest,
+ SendAudioStartStream_SendAudioStreamUrl_MaxPath_Equal) {
+ // baskslash-2 and place for a null character-1
+ auto const special_characters = 3;
+ std::string audio_stream_file = "/";
+ audio_stream_file +=
+ std::string(PATH_MAX - NAME_MAX - special_characters, 'u') + "/";
+ audio_stream_file += std::string(NAME_MAX, 'u');
+ std::string audio_server_type;
+ smart_objects::SmartObjectSPtr start_stream;
+
+ StartStreamPreConditions();
+
+ ON_CALL(mock_app_mngr_settings_, audio_server_type())
+ .WillByDefault(ReturnRef(audio_server_type));
+ ON_CALL(mock_app_mngr_settings_, audio_stream_file())
+ .WillByDefault(ReturnRef(audio_stream_file));
+ ON_CALL(mock_rpc_service_, ManageHMICommand(_, _))
+ .WillByDefault(DoAll(SaveArg<0>(&start_stream), Return(true)));
+
+ MessageHelper::SendAudioStartStream(kAppId, mock_application_manager_);
+
+ smart_objects::SmartObject& msg_params = (*start_stream)[strings::msg_params];
+
+ EXPECT_TRUE(msg_params.keyExists(strings::url));
+ EXPECT_EQ(msg_params[strings::url], audio_stream_file);
+}
+
+TEST_F(MessageHelperTest,
+ SendAudioStartStream_SendAudioStreamUrl_ViolationOfLimits_NotEqual) {
+ // baskslash-2 and place for a null character-1
+ auto const special_characters = 3;
+ std::string audio_stream_file = "/";
+ audio_stream_file +=
+ std::string(PATH_MAX - NAME_MAX - special_characters, 'u') + "/";
+ audio_stream_file += std::string(NAME_MAX + 1, 'u');
+ std::string audio_server_type;
+ smart_objects::SmartObjectSPtr start_stream;
+
+ StartStreamPreConditions();
+
+ ON_CALL(mock_app_mngr_settings_, audio_server_type())
+ .WillByDefault(ReturnRef(audio_server_type));
+ ON_CALL(mock_app_mngr_settings_, audio_stream_file())
+ .WillByDefault(ReturnRef(audio_stream_file));
+ ON_CALL(mock_rpc_service_, ManageHMICommand(_, _))
+ .WillByDefault(DoAll(SaveArg<0>(&start_stream), Return(true)));
+
+ MessageHelper::SendAudioStartStream(kAppId, mock_application_manager_);
+
+ smart_objects::SmartObject& msg_params = (*start_stream)[strings::msg_params];
+
+ EXPECT_TRUE(msg_params.keyExists(strings::url));
+ EXPECT_STRNE(msg_params[strings::url].asCharArray(),
+ audio_stream_file.c_str());
+}
+
+TEST_F(MessageHelperTest,
+ SendNaviStartStream_SendVideoStreamUrl_MaxPath_Equal) {
+ // baskslash-2 and place for a null character-1
+ auto const special_characters = 3;
+ std::string video_stream_file = "/";
+ video_stream_file +=
+ std::string(PATH_MAX - NAME_MAX - special_characters, 'u') + "/";
+ video_stream_file += std::string(NAME_MAX, 'u');
+ std::string video_server_type;
+ smart_objects::SmartObjectSPtr start_stream;
+
+ StartStreamPreConditions();
+
+ ON_CALL(mock_app_mngr_settings_, video_server_type())
+ .WillByDefault(ReturnRef(video_server_type));
+ ON_CALL(mock_app_mngr_settings_, video_stream_file())
+ .WillByDefault(ReturnRef(video_stream_file));
+ ON_CALL(mock_rpc_service_, ManageHMICommand(_, _))
+ .WillByDefault(DoAll(SaveArg<0>(&start_stream), Return(true)));
+
+ MessageHelper::SendNaviStartStream(kAppId, mock_application_manager_);
+
+ smart_objects::SmartObject& msg_params = (*start_stream)[strings::msg_params];
+
+ EXPECT_TRUE(msg_params.keyExists(strings::url));
+ EXPECT_EQ(msg_params[strings::url], video_stream_file);
+}
+
+TEST_F(MessageHelperTest,
+ SendNaviStartStream_SendVideoStreamUrl_ViolationOfLimits_NotEqual) {
+ // baskslash-2 and place for a null character-1
+ auto const special_characters = 3;
+ std::string video_stream_file = "/";
+ video_stream_file +=
+ std::string(PATH_MAX - NAME_MAX - special_characters, 'u') + "/";
+ video_stream_file += std::string(NAME_MAX + 1, 'u');
+ std::string video_server_type;
+ smart_objects::SmartObjectSPtr start_stream;
+
+ StartStreamPreConditions();
+
+ ON_CALL(mock_app_mngr_settings_, video_server_type())
+ .WillByDefault(ReturnRef(video_server_type));
+ ON_CALL(mock_app_mngr_settings_, video_stream_file())
+ .WillByDefault(ReturnRef(video_stream_file));
+ ON_CALL(mock_rpc_service_, ManageHMICommand(_, _))
+ .WillByDefault(DoAll(SaveArg<0>(&start_stream), Return(true)));
+
+ MessageHelper::SendNaviStartStream(kAppId, mock_application_manager_);
+
+ smart_objects::SmartObject& msg_params = (*start_stream)[strings::msg_params];
+
+ EXPECT_TRUE(msg_params.keyExists(strings::url));
+ EXPECT_STRNE(msg_params[strings::url].asCharArray(),
+ video_stream_file.c_str());
+}
+
TEST_F(MessageHelperTest, ExtractWindowIdFromSmartObject_SUCCESS) {
const WindowID window_id = 145;
smart_objects::SmartObject message(smart_objects::SmartType_Map);
@@ -1112,6 +1164,38 @@ TEST_F(MessageHelperTest, ExtractWindowIdFromSmartObject_FromWrongType) {
MessageHelper::ExtractWindowIdFromSmartObject(message));
}
+TEST_F(MessageHelperTest,
+ VehicleDataMapping_ContainsGeneratedVehicleTypes_SUCCESS) {
+ using VehicleDataTypeEnum = mobile_apis::VehicleDataType::eType;
+ using VehicleDataTypes =
+ smart_objects::EnumConversionHelper<VehicleDataTypeEnum>;
+
+ const auto& vehicle_data_mapping = MessageHelper::vehicle_data();
+ const auto& enum_map = VehicleDataTypes::enum_to_cstring_map();
+
+ // Values which vehicle_data_mapping doesn't contain
+ const std::vector<VehicleDataTypeEnum> excluded_values = {
+ VehicleDataTypeEnum::INVALID_ENUM,
+ VehicleDataTypeEnum::VEHICLEDATA_OEM_CUSTOM_DATA,
+ VehicleDataTypeEnum::VEHICLEDATA_BATTVOLTAGE};
+
+ for (const auto& enum_item : enum_map) {
+ const auto& excluded_value = std::find(
+ excluded_values.begin(), excluded_values.end(), enum_item.first);
+ if (excluded_value != excluded_values.end()) {
+ continue;
+ }
+
+ const auto& found_value = std::find_if(
+ vehicle_data_mapping.begin(),
+ vehicle_data_mapping.end(),
+ [&enum_item](const std::pair<std::string, VehicleDataTypeEnum>& item)
+ -> bool { return enum_item.first == item.second; });
+
+ EXPECT_NE(found_value, vehicle_data_mapping.end());
+ }
+}
+
} // namespace application_manager_test
} // namespace components
} // namespace test
diff --git a/src/components/application_manager/test/mock_message_helper.cc b/src/components/application_manager/test/mock_message_helper.cc
index 959bbf5bd0..91f953eaf5 100644
--- a/src/components/application_manager/test/mock_message_helper.cc
+++ b/src/components/application_manager/test/mock_message_helper.cc
@@ -102,30 +102,6 @@ smart_objects::SmartObjectSPtr GetHashUpdateNotification(
app_id);
}
-std::string MessageHelper::HMIResultToString(
- hmi_apis::Common_Result::eType hmi_result) {
- return MockMessageHelper::message_helper_mock()->HMIResultToString(
- hmi_result);
-}
-
-hmi_apis::Common_Result::eType MessageHelper::HMIResultFromString(
- const std::string& hmi_result) {
- return MockMessageHelper::message_helper_mock()->HMIResultFromString(
- hmi_result);
-}
-
-std::string MessageHelper::MobileResultToString(
- mobile_apis::Result::eType mobile_result) {
- return MockMessageHelper::message_helper_mock()->MobileResultToString(
- mobile_result);
-}
-
-mobile_api::Result::eType MessageHelper::MobileResultFromString(
- const std::string& mobile_result) {
- return MockMessageHelper::message_helper_mock()->MobileResultFromString(
- mobile_result);
-}
-
mobile_api::Result::eType MessageHelper::HMIToMobileResult(
const hmi_apis::Common_Result::eType hmi_result) {
return MockMessageHelper::message_helper_mock()->HMIToMobileResult(
@@ -138,11 +114,6 @@ hmi_apis::Common_Result::eType MessageHelper::MobileToHMIResult(
mobile_result);
}
-mobile_api::HMILevel::eType MessageHelper::StringToHMILevel(
- const std::string& hmi_level) {
- return MockMessageHelper::message_helper_mock()->StringToHMILevel(hmi_level);
-}
-
smart_objects::SmartObjectSPtr MessageHelper::CreateDeviceListSO(
const connection_handler::DeviceMap& devices,
const policy::PolicyHandlerInterface& policy_handler,
@@ -220,6 +191,15 @@ void MessageHelper::SendOnPermissionsChangeNotification(
void MessageHelper::SendPolicySnapshotNotification(
uint32_t connection_key,
+ const std::string& snapshot_file_path,
+ const std::string& url,
+ ApplicationManager& app_mngr) {
+ MockMessageHelper::message_helper_mock()->SendPolicySnapshotNotification(
+ connection_key, snapshot_file_path, url, app_mngr);
+}
+
+void MessageHelper::SendPolicySnapshotNotification(
+ uint32_t connection_key,
const std::vector<uint8_t>& policy_data,
const std::string& url,
ApplicationManager& app_mngr) {
@@ -258,12 +238,16 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateMessageForHMI(
message_type, correlation_id);
}
-void MessageHelper::SendHMIStatusNotification(
- ApplicationSharedPtr application,
- const WindowID window_id,
- ApplicationManager& application_manager) {
- MockMessageHelper::message_helper_mock()->SendHMIStatusNotification(
- application, window_id, application_manager);
+smart_objects::SmartObjectSPtr MessageHelper::CreateMessageForHMI(
+ hmi_apis::FunctionID::eType function_id, const uint32_t correlation_id) {
+ return MockMessageHelper::message_helper_mock()->CreateMessageForHMI(
+ function_id, correlation_id);
+}
+
+smart_objects::SmartObjectSPtr MessageHelper::CreateHMIStatusNotification(
+ ApplicationSharedPtr application, const WindowID window_id) {
+ return MockMessageHelper::message_helper_mock()->CreateHMIStatusNotification(
+ application, window_id);
}
void MessageHelper::SendUpdateSDLResponse(const std::string& result,
@@ -273,18 +257,6 @@ void MessageHelper::SendUpdateSDLResponse(const std::string& result,
result, correlation_id, app_mngr);
}
-hmi_apis::Common_Language::eType MessageHelper::CommonLanguageFromString(
- const std::string& language) {
- return MockMessageHelper::message_helper_mock()->CommonLanguageFromString(
- language);
-}
-
-hmi_apis::Common_LightName::eType MessageHelper::CommonLightNameFromString(
- const std::string& lightName) {
- return MockMessageHelper::message_helper_mock()->CommonLightNameFromString(
- lightName);
-}
-
smart_objects::SmartObjectSPtr MessageHelper::CreateModuleInfoSO(
uint32_t function_id, ApplicationManager& app_mngr) {
return MockMessageHelper::message_helper_mock()->CreateModuleInfoSO(
@@ -307,10 +279,10 @@ void MessageHelper::SendOnResumeAudioSourceToHMI(const uint32_t app_id,
app_id, app_mngr);
}
-smart_objects::SmartObjectList MessageHelper::CreateAddSubMenuRequestToHMI(
- ApplicationConstSharedPtr app, const uint32_t correlation_id) {
- return MockMessageHelper::message_helper_mock()->CreateAddSubMenuRequestToHMI(
- app, correlation_id);
+smart_objects::SmartObjectList MessageHelper::CreateAddSubMenuRequestsToHMI(
+ ApplicationConstSharedPtr app, ApplicationManager& app_mngr) {
+ return MockMessageHelper::message_helper_mock()
+ ->CreateAddSubMenuRequestsToHMI(app, app_mngr);
}
smart_objects::SmartObjectList MessageHelper::CreateAddCommandRequestToHMI(
@@ -329,7 +301,7 @@ MessageHelper::CreateAddVRCommandRequestFromChoiceToHMI(
void MessageHelper::SendGlobalPropertiesToHMI(ApplicationConstSharedPtr app,
ApplicationManager& app_mngr) {
return MockMessageHelper::message_helper_mock()->SendGlobalPropertiesToHMI(
- app);
+ app, app_mngr);
}
mobile_apis::Result::eType MessageHelper::VerifyTtsFiles(
@@ -363,16 +335,6 @@ mobile_apis::Result::eType MessageHelper::VerifyImageFiles(
message, app, app_mngr);
}
-std::string MessageHelper::CommonLanguageToString(
- hmi_apis::Common_Language::eType lang) {
- return MockMessageHelper::message_helper_mock()->CommonLanguageToString(lang);
-}
-
-std::string MessageHelper::MobileLanguageToString(
- mobile_apis::Language::eType lang) {
- return MockMessageHelper::message_helper_mock()->MobileLanguageToString(lang);
-}
-
smart_objects::SmartObjectSPtr MessageHelper::GetBCActivateAppRequestToHMI(
ApplicationConstSharedPtr app,
const policy::PolicyHandlerInterface& policy_handler,
@@ -508,9 +470,10 @@ void MessageHelper::SendLaunchApp(const uint32_t connection_key,
connection_key, urlSchema, packageName, app_man);
}
-bool MessageHelper::SendUnsubscribedWayPoints(ApplicationManager& app_mngr) {
- return MockMessageHelper::message_helper_mock()->SendUnsubscribedWayPoints(
- app_mngr);
+smart_objects::SmartObjectSPtr MessageHelper::CreateUnsubscribeWayPointsRequest(
+ const uint32_t correlation_id) {
+ return MockMessageHelper::message_helper_mock()
+ ->CreateUnsubscribeWayPointsRequest(correlation_id);
}
void MessageHelper::SendQueryApps(const uint32_t connection_key,
@@ -560,12 +523,6 @@ void MessageHelper::SendSetAppIcon(const uint32_t app_id,
app_id, icon_path, application_manager);
}
-std::string MessageHelper::StringifiedHMILevel(
- const mobile_apis::HMILevel::eType hmi_level) {
- return MockMessageHelper::message_helper_mock()->StringifiedHMILevel(
- hmi_level);
-}
-
std::string MessageHelper::GetDeviceMacAddressForHandle(
const transport_manager::DeviceHandle device_handle,
const ApplicationManager& app_mngr) {
@@ -573,11 +530,20 @@ std::string MessageHelper::GetDeviceMacAddressForHandle(
device_handle, app_mngr);
}
-void MessageHelper::SendDeleteCommandRequest(smart_objects::SmartObject* cmd,
- ApplicationSharedPtr application,
- ApplicationManager& app_mngr) {
- return MockMessageHelper::message_helper_mock()->SendDeleteCommandRequest(
- cmd, application, app_mngr);
+smart_objects::SmartObjectSPtr MessageHelper::CreateDeleteUICommandRequest(
+ smart_objects::SmartObject* cmd,
+ const uint32_t app_id,
+ const uint32_t corr_id) {
+ return MockMessageHelper::message_helper_mock()->CreateDeleteUICommandRequest(
+ cmd, app_id, corr_id);
+}
+
+smart_objects::SmartObjectSPtr MessageHelper::CreateDeleteVRCommandRequest(
+ smart_objects::SmartObject* cmd,
+ ApplicationSharedPtr application,
+ const uint32_t corr_id) {
+ return MockMessageHelper::message_helper_mock()->CreateDeleteVRCommandRequest(
+ cmd, application, corr_id);
}
void MessageHelper::SendDeleteSubmenuRequest(smart_objects::SmartObject* cmd,
@@ -600,6 +566,48 @@ void MessageHelper::SendResetPropertiesRequest(ApplicationSharedPtr application,
application, app_mngr);
}
+smart_objects::SmartObjectSPtr
+MessageHelper::CreateUIResetGlobalPropertiesRequest(
+ const ResetGlobalPropertiesResult& reset_result,
+ ApplicationSharedPtr application) {
+ return MockMessageHelper::message_helper_mock()
+ ->CreateUIResetGlobalPropertiesRequest(reset_result, application);
+}
+
+smart_objects::SmartObjectSPtr
+MessageHelper::CreateTTSResetGlobalPropertiesRequest(
+ const ResetGlobalPropertiesResult& reset_result,
+ ApplicationSharedPtr application) {
+ return MockMessageHelper::message_helper_mock()
+ ->CreateTTSResetGlobalPropertiesRequest(reset_result, application);
+}
+
+smart_objects::SmartObjectList
+MessageHelper::CreateGlobalPropertiesRequestsToHMI(
+ ApplicationConstSharedPtr app, ApplicationManager& app_mngr) {
+ return MockMessageHelper::message_helper_mock()
+ ->CreateGlobalPropertiesRequestsToHMI(app, app_mngr);
+}
+
+smart_objects::SmartObjectSPtr
+MessageHelper::CreateOnButtonSubscriptionNotification(
+ uint32_t app_id,
+ hmi_apis::Common_ButtonName::eType button,
+ bool is_subscribed) {
+ return MockMessageHelper::message_helper_mock()
+ ->CreateOnButtonSubscriptionNotification(app_id, button, is_subscribed);
+}
+
+smart_objects::SmartObjectList
+MessageHelper::CreateOnButtonSubscriptionNotificationsForApp(
+ ApplicationConstSharedPtr application,
+ ApplicationManager& app_mngr,
+ const ButtonSubscriptions& button_subscriptions) {
+ return MockMessageHelper::message_helper_mock()
+ ->CreateOnButtonSubscriptionNotificationsForApp(
+ application, app_mngr, button_subscriptions);
+}
+
void MessageHelper::SendUnsubscribeButtonNotification(
mobile_apis::ButtonName::eType button,
ApplicationSharedPtr application,
@@ -645,4 +653,30 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateOnServiceUpdateNotification(
->CreateOnServiceUpdateNotification(
service_type, service_event, service_update_reason, app_id);
}
+
+smart_objects::SmartObjectSPtr MessageHelper::CreateUIDeleteWindowRequestToHMI(
+ ApplicationSharedPtr application,
+ ApplicationManager& app_mngr,
+ const WindowID window_id) {
+ return MockMessageHelper::message_helper_mock()
+ ->CreateUIDeleteWindowRequestToHMI(application, app_mngr, window_id);
+}
+
+smart_objects::SmartObjectSPtr MessageHelper::CreateNegativeResponseFromHmi(
+ const int32_t function_id,
+ const uint32_t correlation_id,
+ const int32_t result_code,
+ const std::string& info) {
+ return MockMessageHelper::message_helper_mock()
+ ->CreateNegativeResponseFromHmi(
+ function_id, correlation_id, result_code, info);
+}
+
+smart_objects::SmartObjectSPtr MessageHelper::CreateResponseMessageFromHmi(
+ const int32_t function_id,
+ const uint32_t correlation_id,
+ const int32_t result_code) {
+ return MockMessageHelper::message_helper_mock()->CreateResponseMessageFromHmi(
+ function_id, correlation_id, result_code);
+}
} // namespace application_manager
diff --git a/src/components/application_manager/test/policy_handler_test.cc b/src/components/application_manager/test/policy_handler_test.cc
index cfaa771fa0..39ad034d6f 100644
--- a/src/components/application_manager/test/policy_handler_test.cc
+++ b/src/components/application_manager/test/policy_handler_test.cc
@@ -248,8 +248,6 @@ class PolicyHandlerTest : public ::testing::Test {
EXPECT_CALL(*mock_app_, hmi_level(kDefaultWindowId))
.WillOnce(Return(mobile_apis::HMILevel::HMI_NONE));
- EXPECT_CALL(mock_message_helper_, StringToHMILevel(default_hmi_level))
- .WillOnce(Return(hmi_level));
ChangePolicyManagerToMock();
const policy::EncryptionRequired require_encryption;
EXPECT_CALL(*mock_policy_manager_, GetAppEncryptionRequired(kPolicyAppId_))
@@ -593,16 +591,13 @@ TEST_F(PolicyHandlerTest,
TEST_F(PolicyHandlerTest,
OnPermissionsUpdated_MethodWith3Parameters_FromNONE_ToFULL) {
// Set hmi level from NONE to FULL
- const std::string new_kHmiLevel_string = "HMI_FULL";
+ const std::string new_kHmiLevel_string = "FULL";
mobile_apis::HMILevel::eType new_hmi_level = mobile_apis::HMILevel::HMI_FULL;
// Check expectations
EXPECT_CALL(app_manager_, application(kDeviceId, kPolicyAppId_))
.Times(2)
.WillRepeatedly(Return(mock_app_));
EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId1_));
- EXPECT_CALL(mock_message_helper_, StringToHMILevel(new_kHmiLevel_string))
- .WillOnce(Return(new_hmi_level));
-
EXPECT_CALL(*mock_app_, hmi_level(kDefaultWindowId))
.WillOnce(Return(mobile_apis::HMILevel::HMI_NONE));
ChangePolicyManagerToMock();
@@ -625,7 +620,7 @@ TEST_F(PolicyHandlerTest,
TEST_F(PolicyHandlerTest,
OnPermissionsUpdated_MethodWith3Parameters_FromNONE_ToNotFull) {
// Set hmi level from NONE to Limited
- const std::string new_kHmiLevel_string = "HMI_LIMITED";
+ const std::string new_kHmiLevel_string = "LIMITED";
mobile_apis::HMILevel::eType new_hmi_level =
mobile_apis::HMILevel::HMI_LIMITED;
// Check expectations
@@ -633,9 +628,6 @@ TEST_F(PolicyHandlerTest,
.Times(2)
.WillRepeatedly(Return(mock_app_));
EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId1_));
- EXPECT_CALL(mock_message_helper_, StringToHMILevel(new_kHmiLevel_string))
- .WillOnce(Return(new_hmi_level));
-
EXPECT_CALL(*mock_app_, hmi_level(kDefaultWindowId))
.WillOnce(Return(mobile_apis::HMILevel::HMI_NONE));
ChangePolicyManagerToMock();
@@ -658,15 +650,12 @@ TEST_F(PolicyHandlerTest,
TEST_F(PolicyHandlerTest,
OnPermissionsUpdated_MethodWith3Parameters_FromNotNONE) {
// Set hmi level from LIMITED to FULL
- std::string new_kHmiLevel_string = "HMI_FULL";
- mobile_apis::HMILevel::eType new_hmi_level = mobile_apis::HMILevel::HMI_FULL;
+ std::string new_kHmiLevel_string = "FULL";
// Check expectations
EXPECT_CALL(app_manager_, application(kDeviceId, kPolicyAppId_))
.Times(2)
.WillRepeatedly(Return(mock_app_));
EXPECT_CALL(*mock_app_, app_id()).WillOnce(Return(kAppId1_));
- EXPECT_CALL(mock_message_helper_, StringToHMILevel(new_kHmiLevel_string))
- .WillOnce(Return(new_hmi_level));
EXPECT_CALL(*mock_app_, hmi_level(kDefaultWindowId))
.WillOnce(Return(mobile_apis::HMILevel::HMI_LIMITED));
@@ -716,8 +705,6 @@ TEST_F(PolicyHandlerTest, CheckPermissions) {
CheckPermissions(
kDeviceId, kPolicyAppId_, kHmiLevel_, kRpc_, kRpc_params, _));
#endif // EXTERNAL_PROPRIETARY_MODE
- EXPECT_CALL(mock_message_helper_, StringifiedHMILevel(hmi_level))
- .WillOnce(Return(kHmiLevel_));
EXPECT_CALL(mock_message_helper_, GetDeviceMacAddressForHandle(device, _))
.WillOnce(Return(kDeviceId));
// Act
@@ -729,9 +716,9 @@ TEST_F(PolicyHandlerTest, GetNotificationsNumber) {
// Arrange
EnablePolicyAndPolicyManagerMock();
// Check expectations
- EXPECT_CALL(*mock_policy_manager_, GetNotificationsNumber(priority_));
+ EXPECT_CALL(*mock_policy_manager_, GetNotificationsNumber(priority_, false));
// Act
- policy_handler_.GetNotificationsNumber(priority_);
+ policy_handler_.GetNotificationsNumber(priority_, false);
}
TEST_F(PolicyHandlerTest, GetUserConsentForDevice) {
@@ -1248,17 +1235,15 @@ TEST_F(PolicyHandlerTest, OnGetUserFriendlyMessage) {
ChangePolicyManagerToMock();
// Check expectations
std::vector<std::string> message_codes;
- const std::string language("ru-ru");
+ const std::string language("RU-RU");
const uint32_t correlation_id = 2;
#ifdef EXTERNAL_PROPRIETARY_MODE
const hmi_apis::Common_Language::eType default_language =
hmi_apis::Common_Language::EN_US;
- const std::string default_language_string = "EN_US";
+ const std::string default_language_string = "EN-US";
application_manager_test::MockHMICapabilities mock_hmi_capabilities;
EXPECT_CALL(app_manager_, hmi_capabilities())
.WillOnce(ReturnRef(mock_hmi_capabilities));
- EXPECT_CALL(mock_message_helper_, CommonLanguageToString(default_language))
- .WillOnce(Return(default_language_string));
EXPECT_CALL(mock_hmi_capabilities, active_ui_language())
.WillOnce(Return(default_language));
EXPECT_CALL(
@@ -1859,7 +1844,9 @@ TEST_F(PolicyHandlerTest, DISABLED_OnSnapshotCreated_UrlAdded) {
.WillOnce(ReturnRef(mock_session_observer));
EXPECT_CALL(*mock_app_, device()).WillOnce(Return(0));
EXPECT_CALL(app_manager_, applications()).WillOnce(Return(app_set));
- EXPECT_CALL(mock_message_helper_, SendPolicySnapshotNotification(_, _, _, _));
+ EXPECT_CALL(mock_message_helper_,
+ SendPolicySnapshotNotification(
+ _, testing::A<const std::vector<uint8_t>&>(), _, _));
// Check expectations for get app id
GetAppIDForSending();
// Expectations
@@ -3071,16 +3058,12 @@ TEST_F(PolicyHandlerTest, GetAppPropertiesStatus_HybridAppNotChanged_SUCCESS) {
}
TEST_F(PolicyHandlerTest, GetAppPropertiesStatus_PolicyDisabled_FAIL) {
- ChangePolicyManagerToMock();
-
EXPECT_CALL(policy_settings_, enable_policy()).WillOnce(Return(false));
policy_handler_.LoadPolicyLibrary();
smart_objects::SmartObject properties;
properties[strings::app_id] = kPolicyAppId_;
- EXPECT_CALL(*mock_policy_manager_, GetAppProperties(_, _)).Times(0);
- EXPECT_CALL(*mock_policy_manager_, GetInitialAppData(_, _, _)).Times(0);
const auto expected_app_properties_state =
policy::PolicyHandlerInterface::AppPropertiesState::NO_CHANGES;
EXPECT_EQ(expected_app_properties_state,
@@ -3112,16 +3095,11 @@ TEST_F(PolicyHandlerTest, PushAppIdToPTUQueue_PolicyEnabled_SUCCESS) {
}
TEST_F(PolicyHandlerTest, PushAppIdToPTUQueue_PolicyDisabled_FAIL) {
- ChangePolicyManagerToMock();
-
- const uint32_t expected_apps_count = 0u;
EXPECT_CALL(policy_settings_, enable_policy()).WillOnce(Return(false));
- EXPECT_CALL(*mock_policy_manager_,
- UpdatePTUReadyAppsCount(expected_apps_count))
- .Times(0);
policy_handler_.LoadPolicyLibrary();
policy_handler_.PushAppIdToPTUQueue(kAppId1_);
+ const uint32_t expected_apps_count = 0u;
EXPECT_EQ(expected_apps_count,
policy_handler_.applications_ptu_queue_.size());
}
@@ -3132,16 +3110,6 @@ TEST_F(PolicyHandlerTest, StopRetrySequence_PolicyEnabled_SUCCESS) {
policy_handler_.StopRetrySequence();
}
-TEST_F(PolicyHandlerTest, StopRetrySequence_PolicyDisabled_FAIL) {
- ChangePolicyManagerToMock();
-
- EXPECT_CALL(policy_settings_, enable_policy()).WillOnce(Return(false));
- EXPECT_CALL(*mock_policy_manager_, StopRetrySequence()).Times(0);
-
- policy_handler_.LoadPolicyLibrary();
- policy_handler_.StopRetrySequence();
-}
-
TEST_F(PolicyHandlerTest, GetPolicyTableData_PolicyEnabled_SUCCESS) {
ChangePolicyManagerToMock();
Json::Value expected_table_data(Json::objectValue);
@@ -3152,10 +3120,7 @@ TEST_F(PolicyHandlerTest, GetPolicyTableData_PolicyEnabled_SUCCESS) {
}
TEST_F(PolicyHandlerTest, GetPolicyTableData_PolicyDisabled_FAIL) {
- ChangePolicyManagerToMock();
-
EXPECT_CALL(policy_settings_, enable_policy()).WillOnce(Return(false));
- EXPECT_CALL(*mock_policy_manager_, GetPolicyTableData()).Times(0);
policy_handler_.LoadPolicyLibrary();
@@ -3183,10 +3148,7 @@ TEST_F(PolicyHandlerTest, GetRemovedVehicleDataItems_PolicyEnabled_SUCCESS) {
TEST_F(PolicyHandlerTest, GetRemovedVehicleDataItems_PolicyDisabled_FAIL) {
using rpc::policy_table_interface_base::VehicleDataItem;
- ChangePolicyManagerToMock();
-
EXPECT_CALL(policy_settings_, enable_policy()).WillOnce(Return(false));
- EXPECT_CALL(*mock_policy_manager_, GetRemovedVehicleDataItems()).Times(0);
policy_handler_.LoadPolicyLibrary();
@@ -3224,16 +3186,6 @@ TEST_F(PolicyHandlerTest, OnLocalAppAdded_PolicyEnabled_SUCCESS) {
policy_handler_.OnLocalAppAdded();
}
-TEST_F(PolicyHandlerTest, OnLocalAppAdded_PolicyDisabled_FAIL) {
- ChangePolicyManagerToMock();
-
- EXPECT_CALL(policy_settings_, enable_policy()).WillOnce(Return(false));
- EXPECT_CALL(*mock_policy_manager_, OnLocalAppAdded()).Times(0);
-
- policy_handler_.LoadPolicyLibrary();
- policy_handler_.OnLocalAppAdded();
-}
-
TEST_F(PolicyHandlerTest, OnPermissionsUpdated_PolicyEnabled_SUCCESS) {
ChangePolicyManagerToMock();
@@ -3253,14 +3205,10 @@ TEST_F(PolicyHandlerTest, OnPermissionsUpdated_PolicyEnabled_SUCCESS) {
}
TEST_F(PolicyHandlerTest, OnPermissionsUpdated_PolicyDisabled_FAIL) {
- ChangePolicyManagerToMock();
-
EXPECT_CALL(policy_settings_, enable_policy()).WillOnce(Return(false));
policy_handler_.LoadPolicyLibrary();
EXPECT_CALL(app_manager_, application(kDeviceId_, kPolicyAppId_)).Times(0);
- EXPECT_CALL(*mock_policy_manager_, GetAppEncryptionRequired(kPolicyAppId_))
- .Times(0);
EXPECT_CALL(*mock_app_, app_id()).Times(0);
Permissions app_permissions;
@@ -3279,16 +3227,6 @@ TEST_F(PolicyHandlerTest, IsNewApplication_PolicyEnabled_SUCCESS) {
EXPECT_TRUE(policy_handler_.IsNewApplication(kPolicyAppId_));
}
-TEST_F(PolicyHandlerTest, IsNewApplication_PolicyDisabled_FAIL) {
- ChangePolicyManagerToMock();
-
- EXPECT_CALL(policy_settings_, enable_policy()).WillOnce(Return(false));
- policy_handler_.LoadPolicyLibrary();
-
- EXPECT_CALL(*mock_policy_manager_, IsNewApplication(kPolicyAppId_)).Times(0);
- EXPECT_FALSE(policy_handler_.IsNewApplication(kPolicyAppId_));
-}
-
} // namespace policy_handler_test
} // namespace components
} // namespace test
diff --git a/src/components/application_manager/test/rc_policy_handler_test.cc b/src/components/application_manager/test/rc_policy_handler_test.cc
index cc9f741d28..c4d6b11f5a 100644
--- a/src/components/application_manager/test/rc_policy_handler_test.cc
+++ b/src/components/application_manager/test/rc_policy_handler_test.cc
@@ -211,7 +211,7 @@ TEST_F(RCPolicyHandlerTest, OnUpdateHMILevel_HmiLevelChanged_SUCCESS) {
EXPECT_CALL(app_manager_,
ChangeAppsHMILevel(kAppId1_, mobile_apis::HMILevel::HMI_LIMITED));
- EXPECT_CALL(mock_message_helper_, SendHMIStatusNotification(_, _));
+ EXPECT_CALL(mock_message_helper_, CreateHMIStatusNotification(_, _));
policy_handler_.OnUpdateHMILevel(kDeviceId_, kPolicyAppId_, hmi_level);
}
@@ -276,7 +276,7 @@ TEST_F(RCPolicyHandlerTest, OnUpdateHMIStatus_ValidAppAndHmiLevel_SUCCESS) {
EXPECT_CALL(app_manager_,
ChangeAppsHMILevel(kAppId1_, mobile_apis::HMILevel::HMI_NONE));
- EXPECT_CALL(mock_message_helper_, SendHMIStatusNotification(_, _));
+ EXPECT_CALL(mock_message_helper_, CreateHMIStatusNotification(_, _));
policy_handler_.OnUpdateHMIStatus(kDeviceId_, kPolicyAppId_, hmi_level);
}
@@ -307,7 +307,7 @@ TEST_F(RCPolicyHandlerTest, OnUpdateHMIStatus_ValidParams_SUCCESS) {
EXPECT_CALL(*mock_app_, app_id()).WillRepeatedly(Return(kAppId1_));
EXPECT_CALL(app_manager_,
ChangeAppsHMILevel(kAppId1_, mobile_apis::HMILevel::HMI_NONE));
- EXPECT_CALL(mock_message_helper_, SendHMIStatusNotification(_, _));
+ EXPECT_CALL(mock_message_helper_, CreateHMIStatusNotification(_, _));
policy_handler_.OnUpdateHMIStatus(kDeviceId_, kPolicyAppId_, hmi_level);
}
diff --git a/src/components/application_manager/test/request_info_test.cc b/src/components/application_manager/test/request_info_test.cc
index a0b1793cf5..118ca1e41e 100644
--- a/src/components/application_manager/test/request_info_test.cc
+++ b/src/components/application_manager/test/request_info_test.cc
@@ -90,7 +90,6 @@ class RequestInfoTest : public ::testing::Test {
};
TEST_F(RequestInfoTest, RequestInfoEqualEndTime) {
- std::vector<std::shared_ptr<TestRequestInfo> > requests;
const date_time::TimeDuration& time = date_time::getCurrentTime();
for (uint32_t i = 0; i < count_of_requests_for_test_; ++i) {
std::shared_ptr<TestRequestInfo> request = CreateTestInfo(
diff --git a/src/components/application_manager/test/resumption/resume_ctrl_test.cc b/src/components/application_manager/test/resumption/resume_ctrl_test.cc
index da3cd934e4..8d228240d2 100644
--- a/src/components/application_manager/test/resumption/resume_ctrl_test.cc
+++ b/src/components/application_manager/test/resumption/resume_ctrl_test.cc
@@ -35,7 +35,6 @@
#include "application_manager/application.h"
#include "application_manager/application_manager_impl.h"
-#include "application_manager/display_capabilities_builder.h"
#include "application_manager/mock_app_extension.h"
#include "application_manager/mock_application.h"
#include "application_manager/mock_help_prompt_manager.h"
@@ -53,6 +52,7 @@
#include "application_manager/mock_event_dispatcher.h"
#include "application_manager/mock_message_helper.h"
#include "application_manager/mock_state_controller.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
namespace test {
namespace components {
@@ -153,6 +153,9 @@ class ResumeCtrlTest : public ::testing::Test {
EXPECT_CALL(*mock_app_, deferred_resumption_hmi_level())
.Times(AtLeast(0))
.WillRepeatedly(Return(kDefaultDeferredTestLevel_));
+
+ callback_ = [](mobile_apis::Result::eType result_code,
+ const std::string& info) {};
}
void TearDown() OVERRIDE {
Mock::VerifyAndClearExpectations(&mock_app_mngr_);
@@ -203,17 +206,25 @@ class ResumeCtrlTest : public ::testing::Test {
return response;
}
+ void SetupIsAppRevoked(const bool is_app_revoked) {
+ EXPECT_CALL(mock_app_mngr_, GetPolicyHandler())
+ .WillOnce(ReturnRef(mock_policy_handler_));
+ EXPECT_CALL(mock_policy_handler_, IsApplicationRevoked(_))
+ .WillOnce(Return(is_app_revoked));
+ }
+
NiceMock<event_engine_test::MockEventDispatcher> mock_event_dispatcher_;
- application_manager_test::MockApplicationManagerSettings
+ NiceMock<application_manager_test::MockApplicationManagerSettings>
mock_application_manager_settings_;
NiceMock<application_manager_test::MockApplicationManager> mock_app_mngr_;
std::shared_ptr<NiceMock<application_manager_test::MockAppExtension> >
mock_app_extension_;
- MockStateController mock_state_controller_;
+ NiceMock<MockStateController> mock_state_controller_;
std::shared_ptr<ResumeCtrl> res_ctrl_;
std::shared_ptr<NiceMock<resumption_test::MockResumptionData> > mock_storage_;
std::shared_ptr<NiceMock<MockApplication> > mock_app_;
std::shared_ptr<MockHelpPromptManager> mock_help_prompt_manager_;
+ policy_test::MockPolicyHandlerInterface mock_policy_handler_;
application_manager::ApplicationConstSharedPtr const_app_;
const uint32_t kTestAppId_;
const std::string kTestPolicyAppId_;
@@ -233,32 +244,13 @@ class ResumeCtrlTest : public ::testing::Test {
const std::string kProjectionLowbandwidthLevel_;
const std::string kMediaLowbandwidthLevel_;
NiceMock<application_manager_test::MockRPCService> mock_rpc_service_;
+ resumption::ResumeCtrl::ResumptionCallBack callback_;
};
/**
* @brief Group of tests which check starting resumption with different data
*/
-TEST_F(ResumeCtrlTest, StartResumption_AppWithGrammarId) {
- smart_objects::SmartObject saved_app;
- saved_app[application_manager::strings::hash_id] = kHash_;
- saved_app[application_manager::strings::grammar_id] = kTestGrammarId_;
-
- // Check RestoreApplicationData
- GetInfoFromApp();
-
- ON_CALL(mock_app_mngr_, GetDefaultHmiLevel(const_app_))
- .WillByDefault(Return(kDefaultTestLevel_));
- ON_CALL(*mock_storage_,
- GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
- .WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- EXPECT_CALL(*mock_app_, UpdateHash());
- EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_));
-
- const bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
- EXPECT_TRUE(res);
-}
-
MATCHER_P4(CheckAppFile, is_persistent, is_download, file_name, file_type, "") {
application_manager::AppFile app_file = arg;
return app_file.is_persistent == is_persistent &&
@@ -277,10 +269,9 @@ TEST_F(ResumeCtrlTest, StartResumption_WithoutGrammarId) {
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- EXPECT_CALL(*mock_app_, UpdateHash());
EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_)).Times(0);
- bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
+ bool res = res_ctrl_->StartResumption(mock_app_, kHash_, callback_);
EXPECT_FALSE(res);
}
@@ -324,7 +315,17 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithFiles) {
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- EXPECT_CALL(*mock_app_, UpdateHash());
+
+ smart_objects::SmartObjectList requests;
+ EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
+ CreateAddCommandRequestToHMI(_, _))
+ .WillRepeatedly(Return(requests));
+ EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
+ CreateAddVRCommandRequestFromChoiceToHMI(_))
+ .WillRepeatedly(Return(requests));
+ std::list<application_manager::AppExtensionPtr> extensions;
+ extensions.insert(extensions.begin(), mock_app_extension_);
+ EXPECT_CALL(*mock_app_, Extensions()).WillOnce(ReturnRef(extensions));
EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_));
for (uint32_t i = 0; i < count_of_files; ++i) {
EXPECT_CALL(*mock_app_,
@@ -335,7 +336,7 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithFiles) {
static_cast<mobile_apis::FileType::eType>(file_types[i]))));
}
- const bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
+ const bool res = res_ctrl_->StartResumption(mock_app_, kHash_, callback_);
EXPECT_TRUE(res);
}
@@ -368,16 +369,23 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithSubmenues) {
for (uint32_t i = 0; i < count_of_submenues; ++i) {
EXPECT_CALL(*mock_app_, AddSubMenu(i, test_application_submenues[i]));
}
- smart_objects::SmartObjectList requests;
- EXPECT_CALL(mock_app_mngr_, GetNextHMICorrelationID())
- .WillRepeatedly(Return(kCorId_));
+ smart_objects::SmartObjectList requests;
+ EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
+ CreateAddSubMenuRequestsToHMI(_, _))
+ .WillRepeatedly(Return(requests));
EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
- CreateAddSubMenuRequestToHMI(_, kCorId_))
+ CreateAddCommandRequestToHMI(_, _))
.WillRepeatedly(Return(requests));
+ EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
+ CreateAddVRCommandRequestFromChoiceToHMI(_))
+ .WillRepeatedly(Return(requests));
+
+ std::list<application_manager::AppExtensionPtr> extensions;
+ extensions.insert(extensions.begin(), mock_app_extension_);
+ EXPECT_CALL(*mock_app_, Extensions()).WillOnce(ReturnRef(extensions));
- EXPECT_CALL(*mock_app_, UpdateHash());
- const bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
+ const bool res = res_ctrl_->StartResumption(mock_app_, kHash_, callback_);
EXPECT_TRUE(res);
}
@@ -404,7 +412,6 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithCommands) {
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- EXPECT_CALL(*mock_app_, UpdateHash());
EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_));
ON_CALL(*mock_app_, help_prompt_manager())
.WillByDefault(ReturnRef(*mock_help_prompt_manager_));
@@ -443,7 +450,14 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithCommands) {
CreateAddCommandRequestToHMI(_, _))
.WillRepeatedly(Return(requests));
- const bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
+ EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
+ CreateAddVRCommandRequestFromChoiceToHMI(_))
+ .WillRepeatedly(Return(requests));
+ std::list<application_manager::AppExtensionPtr> extensions;
+ extensions.insert(extensions.begin(), mock_app_extension_);
+ EXPECT_CALL(*mock_app_, Extensions()).WillOnce(ReturnRef(extensions));
+
+ const bool res = res_ctrl_->StartResumption(mock_app_, kHash_, callback_);
EXPECT_TRUE(res);
}
@@ -483,7 +497,6 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithChoiceSet) {
ON_CALL(*mock_storage_,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
- EXPECT_CALL(*mock_app_, UpdateHash());
EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_));
for (uint32_t i = 0; i < count_of_choice_sets; ++i) {
@@ -494,14 +507,24 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithChoiceSet) {
EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
CreateAddVRCommandRequestFromChoiceToHMI(_))
.WillRepeatedly(Return(requests));
+ EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
+ CreateAddCommandRequestToHMI(_, _))
+ .WillRepeatedly(Return(requests));
+
+ std::list<application_manager::AppExtensionPtr> extensions;
+ extensions.insert(extensions.begin(), mock_app_extension_);
+ EXPECT_CALL(*mock_app_, Extensions()).WillOnce(ReturnRef(extensions));
- const bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
+ const bool res = res_ctrl_->StartResumption(mock_app_, kHash_, callback_);
EXPECT_TRUE(res);
}
TEST_F(ResumeCtrlTest, StartResumption_AppWithGlobalProperties) {
// Prepare Data
smart_objects::SmartObject test_global_properties;
+ test_global_properties[application_manager::strings::vr_help_title] =
+ "VR help title";
+
smart_objects::SmartObject saved_app;
saved_app[application_manager::strings::hash_id] = kHash_;
saved_app[application_manager::strings::grammar_id] = kTestGrammarId_;
@@ -518,13 +541,19 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithGlobalProperties) {
EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_));
- EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
- SendGlobalPropertiesToHMI(_));
-
EXPECT_CALL(*mock_app_, load_global_properties(test_global_properties));
- EXPECT_CALL(*mock_app_, UpdateHash());
- const bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
+ smart_objects::SmartObjectList requests;
+ EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
+ CreateGlobalPropertiesRequestsToHMI(_, _))
+ .WillRepeatedly(Return(requests));
+ EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
+ CreateAddCommandRequestToHMI(_, _))
+ .WillRepeatedly(Return(requests));
+ std::list<application_manager::AppExtensionPtr> extensions;
+ extensions.insert(extensions.begin(), mock_app_extension_);
+ EXPECT_CALL(*mock_app_, Extensions()).WillOnce(ReturnRef(extensions));
+ const bool res = res_ctrl_->StartResumption(mock_app_, kHash_, callback_);
EXPECT_TRUE(res);
}
@@ -555,6 +584,19 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithSubscribeOnButtons) {
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
+ std::shared_ptr<sync_primitives::Lock> button_lock_ptr =
+ std::make_shared<sync_primitives::Lock>();
+ ButtonSubscriptions button_subscriptions;
+ DataAccessor<ButtonSubscriptions> button_subscription_accessor(
+ button_subscriptions, button_lock_ptr);
+ ON_CALL(*mock_app_, SubscribedButtons())
+ .WillByDefault(Return(button_subscription_accessor));
+
+ smart_objects::SmartObjectList button_subscription_notifications;
+ ON_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
+ CreateOnButtonSubscriptionNotificationsForApp(_, _, _))
+ .WillByDefault(Return(button_subscription_notifications));
+
EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_));
for (uint32_t i = 0; i < count_of_buttons; ++i) {
@@ -562,20 +604,17 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithSubscribeOnButtons) {
*mock_app_,
SubscribeToButton(static_cast<mobile_apis::ButtonName::eType>(i)));
}
- EXPECT_CALL(*mock_app_, UpdateHash());
std::list<application_manager::AppExtensionPtr> extensions;
extensions.insert(extensions.begin(), mock_app_extension_);
EXPECT_CALL(*mock_app_, Extensions()).WillOnce(ReturnRef(extensions));
- EXPECT_CALL(*mock_app_extension_, ProcessResumption(test_subscriptions));
-
+ EXPECT_CALL(*mock_app_extension_, ProcessResumption(saved_app));
EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
- SendAllOnButtonSubscriptionNotificationsForApp(_, _))
- .Times(2);
+ CreateOnButtonSubscriptionNotificationsForApp(_, _, _));
- const bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
+ const bool res = res_ctrl_->StartResumption(mock_app_, kHash_, callback_);
EXPECT_TRUE(res);
}
@@ -612,19 +651,19 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithSubscriptionToIVI) {
smart_objects::SmartObjectList requests;
- EXPECT_CALL(*mock_app_, UpdateHash());
std::list<application_manager::AppExtensionPtr> extensions;
extensions.insert(extensions.begin(), mock_app_extension_);
EXPECT_CALL(*mock_app_, Extensions()).WillOnce(ReturnRef(extensions));
- EXPECT_CALL(*mock_app_extension_, ProcessResumption(test_subscriptions));
- const bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
+ EXPECT_CALL(*mock_app_extension_, ProcessResumption(saved_app));
+ const bool res = res_ctrl_->StartResumption(mock_app_, kHash_, callback_);
EXPECT_TRUE(res);
}
-TEST_F(ResumeCtrlTest, StartResumption_AppWithSubscriptionToWayPoints) {
+TEST_F(ResumeCtrlTest,
+ DISABLED_StartResumption_AppWithSubscriptionToWayPoints) {
smart_objects::SmartObject saved_app;
saved_app[application_manager::strings::hash_id] = kHash_;
saved_app[application_manager::strings::grammar_id] = kTestGrammarId_;
@@ -636,6 +675,16 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithSubscriptionToWayPoints) {
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
EXPECT_CALL(*mock_app_, set_grammar_id(kTestGrammarId_));
+
+ smart_objects::SmartObjectSPtr subscribe_waypoints_msg;
+ EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
+ CreateSubscribeWayPointsMessageToHMI(_))
+ .WillRepeatedly(Return(subscribe_waypoints_msg));
+ std::list<application_manager::AppExtensionPtr> extensions;
+ // It will work only for WayPointsAppExtension, need to rework this test
+ extensions.insert(extensions.begin(), mock_app_extension_);
+ EXPECT_CALL(*mock_app_, Extensions()).WillOnce(ReturnRef(extensions));
+
EXPECT_CALL(
mock_app_mngr_,
SubscribeAppForWayPoints(A<application_manager::ApplicationSharedPtr>()));
@@ -646,228 +695,10 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithSubscriptionToWayPoints) {
EXPECT_CALL(mock_state_controller_,
SetRegularState(_, kDefaultWindowId, hmi_test_level));
- const bool result = res_ctrl_->StartResumption(mock_app_, kHash_);
+ const bool result = res_ctrl_->StartResumption(mock_app_, kHash_, callback_);
EXPECT_TRUE(result);
}
-TEST_F(ResumeCtrlTest,
- RestoreAppWidgets_AppWithWidgets_SendCreateWindowRequests) {
- using namespace smart_objects;
- using namespace application_manager;
- GetInfoFromApp();
- const uint32_t count_of_widgets = 10u;
-
- auto create_window_info_so = []() -> SmartObject {
- SmartObject widgets_info(SmartType_Array);
- for (uint32_t i = 0; i < count_of_widgets; ++i) {
- SmartObject widget_info(SmartType_Map);
- widget_info[strings::associated_service_type] = "ServiceType";
- widget_info[strings::duplicate_updates_from_window_id] = 0;
- widget_info[strings::window_name] =
- std::string("Widget ") + std::to_string(i + 1);
- widget_info[strings::window_type] =
- static_cast<int32_t>(mobile_apis::WindowType::WIDGET);
- widget_info[strings::window_id] = i + 1;
- widgets_info[widgets_info.length()] = widget_info;
- }
- return widgets_info;
- };
-
- auto create_saved_app_so = [&create_window_info_so, this]() -> SmartObject {
- smart_objects::SmartObject saved_app;
- const auto test_app_widgets = create_window_info_so();
- saved_app[strings::hash_id] = kHash_;
- saved_app[strings::windows_info] = test_app_widgets;
- saved_app[application_manager::strings::grammar_id] = kTestGrammarId_;
- saved_app[application_manager::strings::hmi_level] = eType::HMI_FULL;
- return saved_app;
- };
-
- const auto saved_app = create_saved_app_so();
-
- const auto hmi_request = std::make_shared<smart_objects::SmartObject>(
- smart_objects::SmartType_Map);
- const auto hmi_requests =
- smart_objects::SmartObjectList(count_of_widgets, hmi_request);
-
- DisplayCapabilitiesBuilder builder(*mock_app_);
- ON_CALL(*mock_app_, display_capabilities_builder())
- .WillByDefault(ReturnRef(builder));
- EXPECT_CALL(
- *application_manager::MockMessageHelper::message_helper_mock(),
- CreateUICreateWindowRequestsToHMI(_, _, saved_app[strings::windows_info]))
- .WillOnce(Return(hmi_requests));
-
- ON_CALL(mock_app_mngr_, GetRPCService())
- .WillByDefault(ReturnRef(mock_rpc_service_));
-
- EXPECT_CALL(mock_rpc_service_,
- ManageHMICommand(_, commands::Command::SOURCE_SDL_TO_HMI))
- .Times(count_of_widgets)
- .WillRepeatedly(Return(true));
-
- res_ctrl_->RestoreAppWidgets(mock_app_, saved_app);
-}
-
-TEST_F(ResumeCtrlTest,
- RestoreWidgetsHMIState_AppWithWidgets_AddWidgetsInternally) {
- const uint32_t count_of_widgets = 10u;
-
- smart_objects::SmartObject saved_app;
- saved_app[strings::hash_id] = kHash_;
- saved_app[strings::windows_info] = smart_objects::SmartObject();
- saved_app[application_manager::strings::grammar_id] = kTestGrammarId_;
- saved_app[application_manager::strings::hmi_level] = eType::HMI_FULL;
-
- ON_CALL(mock_app_mngr_, application_by_hmi_app(kDefaultHmiAppId))
- .WillByDefault(Return(mock_app_));
- DisplayCapabilitiesBuilder builder(*mock_app_);
- ON_CALL(*mock_app_, display_capabilities_builder())
- .WillByDefault(ReturnRef(builder));
-
- smart_objects::SmartObjectList requests;
- smart_objects::SmartObjectList responses;
- for (uint32_t i = 0; i < count_of_widgets; ++i) {
- const auto window_type = mobile_apis::WindowType::WIDGET;
- const WindowID window_id = i + 1;
- const auto window_name = std::string("Widget ") + std::to_string(window_id);
- requests.push_back(
- CreateStubCreateWindowRequest(window_name, window_id, window_type));
- responses.push_back(CreateStubCreateWindowResponse(
- window_id, hmi_apis::Common_Result::SUCCESS));
- EXPECT_CALL(mock_app_mngr_, CreateRegularState(_, window_type, _, _, _, _))
- .WillRepeatedly(Return(nullptr));
- EXPECT_CALL(*mock_app_, SetInitialState(window_id, window_name, _));
- EXPECT_CALL(mock_state_controller_,
- OnAppWindowAdded(_, window_id, window_type, _));
- }
-
- EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
- CreateUICreateWindowRequestsToHMI(_, _, _))
- .WillOnce(Return(requests));
-
- ON_CALL(mock_app_mngr_, GetRPCService())
- .WillByDefault(ReturnRef(mock_rpc_service_));
- EXPECT_CALL(mock_rpc_service_,
- ManageHMICommand(_, commands::Command::SOURCE_SDL_TO_HMI))
- .Times(count_of_widgets)
- .WillRepeatedly(Return(true));
- res_ctrl_->RestoreAppWidgets(mock_app_, saved_app);
- for (const auto& response : responses) {
- res_ctrl_->RestoreWidgetsHMIState(*response);
- }
-}
-
-TEST_F(ResumeCtrlTest,
- RestoreAppWidgets_AppWithoutWidgets_NoCreateWindowRqSent) {
- smart_objects::SmartObject saved_app;
- saved_app[strings::hash_id] = kHash_;
- saved_app[application_manager::strings::grammar_id] = kTestGrammarId_;
- saved_app[application_manager::strings::hmi_level] = eType::HMI_FULL;
-
- EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
- CreateUICreateWindowRequestsToHMI(_, _, _))
- .Times(0);
-
- res_ctrl_->RestoreAppWidgets(mock_app_, saved_app);
-}
-
-TEST_F(ResumeCtrlTest, RestoreWidgetsHMIState_HMIResponseWith_InvalidCorrId) {
- smart_objects::SmartObject saved_app;
- saved_app[strings::hash_id] = kHash_;
- saved_app[strings::windows_info] = smart_objects::SmartObject();
- saved_app[application_manager::strings::grammar_id] = kTestGrammarId_;
- saved_app[application_manager::strings::hmi_level] = eType::HMI_FULL;
-
- const int32_t invalid_corr_id = -1;
- auto response = CreateStubCreateWindowResponse(
- invalid_corr_id, hmi_apis::Common_Result::SUCCESS);
-
- ON_CALL(mock_app_mngr_, application_by_hmi_app(kDefaultHmiAppId))
- .WillByDefault(Return(mock_app_));
-
- DisplayCapabilitiesBuilder builder(*mock_app_);
- ON_CALL(*mock_app_, display_capabilities_builder())
- .WillByDefault(ReturnRef(builder));
-
- smart_objects::SmartObjectList requests;
-
- const auto window_type = mobile_apis::WindowType::WIDGET;
- const WindowID window_id = 1;
- const auto window_name = std::string("Widget ") + std::to_string(window_id);
- requests.push_back(
- CreateStubCreateWindowRequest(window_name, window_id, window_type));
-
- EXPECT_CALL(mock_app_mngr_, CreateRegularState(_, window_type, _, _, _, _))
- .Times(0);
- EXPECT_CALL(*mock_app_, SetInitialState(window_id, window_name, _)).Times(0);
- EXPECT_CALL(mock_state_controller_,
- OnAppWindowAdded(_, window_id, window_type, _))
- .Times(0);
-
- EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
- CreateUICreateWindowRequestsToHMI(_, _, _))
- .WillOnce(Return(requests));
-
- ON_CALL(mock_app_mngr_, GetRPCService())
- .WillByDefault(ReturnRef(mock_rpc_service_));
- EXPECT_CALL(mock_rpc_service_,
- ManageHMICommand(_, commands::Command::SOURCE_SDL_TO_HMI))
- .WillRepeatedly(Return(true));
- res_ctrl_->RestoreAppWidgets(mock_app_, saved_app);
- res_ctrl_->RestoreWidgetsHMIState(*response);
-}
-
-TEST_F(ResumeCtrlTest, RestoreWidgetsHMIState_HMIResponseWith_Unsuccess) {
- smart_objects::SmartObject saved_app;
- saved_app[strings::hash_id] = kHash_;
- saved_app[strings::windows_info] = smart_objects::SmartObject();
- saved_app[application_manager::strings::grammar_id] = kTestGrammarId_;
- saved_app[application_manager::strings::hmi_level] = eType::HMI_FULL;
-
- const int32_t correlation_id = 1;
- auto response = CreateStubCreateWindowResponse(
- correlation_id, hmi_apis::Common_Result::GENERIC_ERROR);
-
- ON_CALL(mock_app_mngr_, application_by_hmi_app(kDefaultHmiAppId))
- .WillByDefault(Return(mock_app_));
-
- DisplayCapabilitiesBuilder builder(*mock_app_);
- smart_objects::SmartObject stub_window_info(smart_objects::SmartType_Null);
- auto stub_resume_cb = [](Application&, const smart_objects::SmartObject&) {};
- builder.InitBuilder(stub_resume_cb, stub_window_info);
- ON_CALL(*mock_app_, display_capabilities_builder())
- .WillByDefault(ReturnRef(builder));
-
- smart_objects::SmartObjectList requests;
- smart_objects::SmartObjectList responses;
-
- const auto window_type = mobile_apis::WindowType::WIDGET;
- const WindowID window_id = 1;
- const auto window_name = std::string("Widget ") + std::to_string(window_id);
- requests.push_back(
- CreateStubCreateWindowRequest(window_name, window_id, window_type));
-
- EXPECT_CALL(mock_app_mngr_, CreateRegularState(_, window_type, _, _, _, _))
- .Times(0);
- EXPECT_CALL(*mock_app_, SetInitialState(window_id, window_name, _)).Times(0);
- EXPECT_CALL(mock_state_controller_,
- OnAppWindowAdded(_, window_id, window_type, _))
- .Times(0);
-
- EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
- CreateUICreateWindowRequestsToHMI(_, _, _))
- .WillOnce(Return(requests));
-
- ON_CALL(mock_app_mngr_, GetRPCService())
- .WillByDefault(ReturnRef(mock_rpc_service_));
- EXPECT_CALL(mock_rpc_service_,
- ManageHMICommand(_, commands::Command::SOURCE_SDL_TO_HMI))
- .WillRepeatedly(Return(true));
- res_ctrl_->RestoreAppWidgets(mock_app_, saved_app);
- res_ctrl_->RestoreWidgetsHMIState(*response);
-}
-
TEST_F(ResumeCtrlTest, StartResumptionOnlyHMILevel) {
smart_objects::SmartObject saved_app;
@@ -933,6 +764,9 @@ TEST_F(ResumeCtrlTest, StartAppHmiStateResumption_AppInFull) {
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
+ const bool is_app_revoked = false;
+ SetupIsAppRevoked(is_app_revoked);
+
EXPECT_CALL(*mock_storage_,
RemoveApplicationFromSaved(kTestPolicyAppId_, kMacAddress_))
.WillOnce(Return(true));
@@ -980,6 +814,9 @@ TEST_F(ResumeCtrlTest, StartAppHmiStateResumption_AppHasDeferredResumption) {
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
+ const bool is_app_revoked = false;
+ SetupIsAppRevoked(is_app_revoked);
+
mobile_apis::HMILevel::eType app_deferred_level = deferred_level;
EXPECT_CALL(*mock_app_, deferred_resumption_hmi_level())
.WillRepeatedly(ReturnPointee(&app_deferred_level));
@@ -1016,6 +853,9 @@ TEST_F(ResumeCtrlTest,
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
+ const bool is_app_revoked = false;
+ SetupIsAppRevoked(is_app_revoked);
+
EXPECT_CALL(mock_app_mngr_, CheckResumptionRequiredTransportAvailable(_))
.WillOnce(Return(false));
@@ -1061,6 +901,9 @@ TEST_F(
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
+ const bool is_app_revoked = false;
+ SetupIsAppRevoked(is_app_revoked);
+
EXPECT_CALL(mock_app_mngr_, CheckResumptionRequiredTransportAvailable(_))
.WillOnce(Return(false));
@@ -1124,8 +967,7 @@ TEST_F(ResumeCtrlTest, RestoreAppHMIState_RestoreHMILevelFull) {
ON_CALL(mock_app_mngr_, GetUserConsentForDevice("12345"))
.WillByDefault(Return(policy::kDeviceAllowed));
- const bool res = res_ctrl_->RestoreAppHMIState(mock_app_);
- EXPECT_TRUE(res);
+ res_ctrl_->RestoreAppHMIState(mock_app_);
}
TEST_F(ResumeCtrlTest, SetupDefaultHMILevel) {
@@ -1210,6 +1052,9 @@ TEST_F(ResumeCtrlTest, ApplicationResumptiOnTimer_AppInFull) {
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
+ const bool is_app_revoked = false;
+ SetupIsAppRevoked(is_app_revoked);
+
EXPECT_CALL(*mock_storage_,
RemoveApplicationFromSaved(kTestPolicyAppId_, kMacAddress_))
.WillOnce(Return(true));
@@ -1554,6 +1399,9 @@ TEST_F(
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
+ const bool is_app_revoked = false;
+ SetupIsAppRevoked(is_app_revoked);
+
EXPECT_CALL(*mock_storage_,
RemoveApplicationFromSaved(kTestPolicyAppId_, kMacAddress_))
.WillOnce(Return(true));
@@ -1596,6 +1444,9 @@ TEST_F(
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
+ const bool is_app_revoked = false;
+ SetupIsAppRevoked(is_app_revoked);
+
ON_CALL(mock_app_mngr_, GetUserConsentForDevice("12345"))
.WillByDefault(Return(policy::kDeviceAllowed));
@@ -1662,6 +1513,9 @@ TEST_F(
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
+ const bool is_app_revoked = false;
+ SetupIsAppRevoked(is_app_revoked);
+
EXPECT_CALL(*mock_storage_,
RemoveApplicationFromSaved(kTestPolicyAppId_, kMacAddress_))
.WillOnce(Return(true));
@@ -1704,6 +1558,9 @@ TEST_F(
GetSavedApplication(kTestPolicyAppId_, kMacAddress_, _))
.WillByDefault(DoAll(SetArgReferee<2>(saved_app), Return(true)));
+ const bool is_app_revoked = false;
+ SetupIsAppRevoked(is_app_revoked);
+
ON_CALL(mock_app_mngr_, GetUserConsentForDevice("12345"))
.WillByDefault(Return(policy::kDeviceAllowed));
diff --git a/src/components/application_manager/test/resumption/resumption_data_db_test.cc b/src/components/application_manager/test/resumption/resumption_data_db_test.cc
index d67c229cc3..ec390e4be0 100644
--- a/src/components/application_manager/test/resumption/resumption_data_db_test.cc
+++ b/src/components/application_manager/test/resumption/resumption_data_db_test.cc
@@ -61,10 +61,6 @@ using namespace file_system;
using namespace resumption;
using namespace mobile_apis;
-namespace {
-const std::string kPath =
- file_system::CurrentWorkingDirectory() + "/" + "test_storage";
-}
class ResumptionDataDBTest : public ResumptionDataTest {
protected:
void SetUp() OVERRIDE {
@@ -88,10 +84,11 @@ class ResumptionDataDBTest : public ResumptionDataTest {
kDatabaseName = "resumption";
if (is_in_file) {
path_ = "test_storage";
- CreateDirectory(file_system::CurrentWorkingDirectory() + "/" + path_);
- CreateDirectory(kPath);
+ std::string test_storage_path =
+ file_system::CurrentWorkingDirectory() + "/" + "test_storage";
+ CreateDirectory(test_storage_path);
test_db_ = new utils::dbms::SQLDatabase(kDatabaseName);
- test_db_->set_path(kPath + "/");
+ test_db_->set_path(test_storage_path + "/");
res_db_ = new TestResumptionDataDB(In_File_Storage);
} else {
res_db_ = new TestResumptionDataDB(In_Memory_Storage);
@@ -137,6 +134,7 @@ class ResumptionDataDBTest : public ResumptionDataTest {
// Check that db includes tables with given elements
void CheckSavedDB();
static const bool is_in_file = false;
+
const std::string tables_exist =
"SELECT COUNT(*) FROM sqlite_master WHERE `type` = 'table';";
const std::string init_last_ign_count =
diff --git a/src/components/application_manager/test/resumption/resumption_data_test.cc b/src/components/application_manager/test/resumption/resumption_data_test.cc
index e362064a78..d5228934db 100644
--- a/src/components/application_manager/test/resumption/resumption_data_test.cc
+++ b/src/components/application_manager/test/resumption/resumption_data_test.cc
@@ -52,6 +52,33 @@ using ::testing::Return;
using ::testing::ReturnPointee;
using ::testing::ReturnRef;
+ResumptionDataTest::~ResumptionDataTest() {
+ delete help_prompt_;
+ delete timeout_prompt_;
+ delete vr_help_;
+ delete vr_help_title_;
+ delete vr_synonyms_;
+ delete keyboard_props_;
+ delete menu_title_;
+ delete menu_icon_;
+
+ for (am::CommandsMap::iterator it = test_commands_map.begin();
+ test_commands_map.end() != it;
+ ++it) {
+ delete it->second;
+ }
+ for (am::SubMenuMap::iterator it = test_submenu_map.begin();
+ test_submenu_map.end() != it;
+ ++it) {
+ delete it->second;
+ }
+ for (am::ChoiceSetMap::iterator it = test_choiceset_map.begin();
+ test_choiceset_map.end() != it;
+ ++it) {
+ delete it->second;
+ }
+}
+
void ResumptionDataTest::CheckSavedApp(sm::SmartObject& resume_app_list) {
EXPECT_EQ(policy_app_id_, resume_app_list[am::strings::app_id].asString());
EXPECT_EQ(grammar_id_, resume_app_list[am::strings::grammar_id].asUInt());
@@ -149,7 +176,7 @@ void ResumptionDataTest::CheckChoiceSet(sm::SmartObject& res_list) {
sm::SmartObject command = res_list[i][am::strings::choice_set][j];
EXPECT_EQ(i + j, command[am::strings::choice_id].asUInt());
char numb[12];
- std::snprintf(numb, 12, "%d", i + j);
+ std::snprintf(numb, 12, "%u", i + j);
std::string test_choice =
(*test_choiceset_map[i])[am::strings::choice_set][j]
[am::strings::vr_commands][0]
@@ -313,11 +340,10 @@ void ResumptionDataTest::CheckTimeoutPrompt(
void ResumptionDataTest::CheckVRHelp(sm::SmartObject& res_list) {
std::string text;
- int position;
for (uint i = 0; i < kCountOfVrhelptitle_; ++i) {
text = (*vr_help_)[i][am::strings::text].asString();
EXPECT_EQ(text, res_list[i][am::strings::text].asString());
- position = (*vr_help_)[i][am::strings::position].asInt();
+ int position = (*vr_help_)[i][am::strings::position].asInt();
EXPECT_EQ(position, res_list[i][am::strings::position].asInt());
}
}
@@ -490,7 +516,7 @@ void ResumptionDataTest::SetCommands() {
sm::SmartObject sm_icon;
for (uint32_t i = 0; i < kCountOfCommands_; ++i) {
char numb[12];
- std::snprintf(numb, 12, "%d", i);
+ std::snprintf(numb, 12, "%u", i);
sm_comm[am::strings::cmd_id] = i;
sm_comm[am::strings::menu_params][am::strings::position] = i;
sm_comm[am::strings::menu_params][am::hmi_request::parent_id] = i;
@@ -499,7 +525,7 @@ void ResumptionDataTest::SetCommands() {
for (uint32_t j = 0; j < kCountOfChoice_; ++j) {
char vr[12];
- std::snprintf(vr, 12, "%d", i + j);
+ std::snprintf(vr, 12, "%u", i + j);
vr_commandsvector[j] = "VrCommand " + std::string(vr);
}
sm_comm[am::strings::vr_commands] = vr_commandsvector;
@@ -517,7 +543,7 @@ void ResumptionDataTest::SetSubmenues() {
sm::SmartObject sm_comm;
for (uint32_t i = 10; i < kCountOfSubmenues_ + 10; ++i) {
char numb[12];
- std::snprintf(numb, 12, "%d", i);
+ std::snprintf(numb, 12, "%u", i);
sm_comm[am::strings::menu_id] = i;
sm_comm[am::strings::position] = i;
sm_comm[am::strings::menu_name] = "SubMenu" + std::string(numb);
@@ -536,7 +562,7 @@ void ResumptionDataTest::SetChoiceSet() {
for (uint32_t i = 0; i < kCountOfChoiceSets_; ++i) {
for (uint32_t j = 0; j < kCountOfChoice_; ++j) {
char numb[12];
- std::snprintf(numb, 12, "%d", i + j);
+ std::snprintf(numb, 12, "%u", i + j);
choice[am::strings::choice_id] = i + j;
vr_commandsvector[0] = "ChoiceSet VrCommand " + std::string(numb);
@@ -569,11 +595,10 @@ void ResumptionDataTest::SetChoiceSet() {
void ResumptionDataTest::SetAppFiles() {
am::AppFile test_file;
- int file_types;
for (uint i = 0; i < kCountOfFiles_; ++i) {
char numb[12];
std::snprintf(numb, 12, "%d", i);
- file_types = i;
+ int file_types = i;
test_file.is_persistent = true;
test_file.is_download_complete = true;
test_file.file_type = static_cast<FileType::eType>(file_types);
diff --git a/src/components/application_manager/test/rpc_service_impl_test.cc b/src/components/application_manager/test/rpc_service_impl_test.cc
new file mode 100644
index 0000000000..0a7cff031d
--- /dev/null
+++ b/src/components/application_manager/test/rpc_service_impl_test.cc
@@ -0,0 +1,837 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <gmock/gmock.h>
+#include "gtest/gtest.h"
+
+#include <string>
+#include "application_manager/rpc_service_impl.h"
+
+#include "application_manager/commands/command.h"
+#include "application_manager/commands/command_impl.h"
+#include "application_manager/mock_app_service_manager.h"
+#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_command_factory.h"
+#include "application_manager/mock_command_holder.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_request.h"
+#include "application_manager/mock_request_controller_settings.h"
+#include "application_manager/mock_rpc_plugin.h"
+#include "application_manager/mock_rpc_plugin_manager.h"
+#include "application_manager/mock_rpc_protection_manager.h"
+#include "application_manager/plugin_manager/plugin_keys.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "connection_handler/mock_connection_handler.h"
+#include "hmi_message_handler/mock_hmi_message_handler.h"
+#include "include/test/protocol_handler/mock_protocol_handler.h"
+
+namespace test {
+namespace components {
+namespace application_manager_test {
+
+namespace rpc_service = application_manager::rpc_service;
+namespace am = application_manager;
+using test::components::hmi_message_handler_test::MockHMIMessageHandler;
+using test::components::protocol_handler_test::MockProtocolHandler;
+typedef smart_objects::SmartObjectSPtr MessageSharedPtr;
+typedef utils::Optional<am::plugin_manager::RPCPlugin> PluginOpt;
+using test::components::application_manager_test::MockAppServiceManager;
+using ::testing::_;
+using ::testing::NiceMock;
+using ::testing::Return;
+using ::testing::ReturnRef;
+
+namespace {
+const uint32_t kConnectionKey = 1u;
+const connection_handler::DeviceHandle kDeviceHandle = 1u;
+const std::string kPolicyAppId = "policy_app_id";
+const uint32_t kCorrelationId = 1u;
+const uint32_t kFunctionId = 1u;
+const uint32_t kAppId = 1u;
+const int32_t kMobileProtocolType = 0;
+const int32_t kProtocolVersion = 1;
+const int32_t kConnectionSessionsCount = 2;
+} // namespace
+
+class RPCServiceImplTest : public ::testing::Test {
+ public:
+ RPCServiceImplTest()
+ : request_controller_(mock_request_controler_)
+ , mock_rpc_protection_manager_(
+ std::make_shared<
+ testing::NiceMock<am::MockRPCProtectionManager> >())
+ , mock_message_helper_(*am::MockMessageHelper::message_helper_mock())
+ , mock_app_service_nmgr_(mock_app_mngr_, nullptr) {
+ rpc_service_ = std::make_shared<rpc_service::RPCServiceImpl>(
+ mock_app_mngr_,
+ request_controller_,
+ &mock_protocol_handler_,
+ &mock_hmi_handler_,
+ mock_command_holder_,
+ mock_rpc_protection_manager_,
+ hmi_so_factory_,
+ mobile_so_factory_);
+ }
+
+ MessageSharedPtr CreateMessage(
+ const smart_objects::SmartType type = smart_objects::SmartType_Null) {
+ return std::make_shared<smart_objects::SmartObject>(type);
+ }
+ void PrepareBasicMessage(MessageSharedPtr& message) {
+ (*message)[am::strings::params][am::strings::function_id] =
+ static_cast<mobile_apis::FunctionID::eType>(
+ mobile_apis::FunctionID::RESERVED);
+ (*message)[am::strings::params][am::strings::correlation_id] =
+ kCorrelationId;
+ (*message)[am::strings::params][am::strings::protocol_type] =
+ kMobileProtocolType;
+ (*message)[am::strings::params][am::strings::connection_key] =
+ kConnectionKey;
+ }
+
+ // This class is created to allow access to protected method
+ // InitFunctionSchema from MOBILE_API
+ class MobileAPIWithPublicSchemaSetting : public mobile_apis::MOBILE_API {
+ public:
+ void SetSchema(mobile_apis::FunctionID::eType function_id,
+ mobile_apis::messageType::eType message_type) {
+ InitFunctionSchema(function_id, message_type);
+ }
+ };
+
+ // This class is created to allow access to protected method
+ // InitFunctionSchema from HMI_API
+ class HMIAPIWithPublicSchemaSetting : public hmi_apis::HMI_API {
+ public:
+ void SetSchema(hmi_apis::FunctionID::eType function_id,
+ hmi_apis::messageType::eType message_type) {
+ InitFunctionSchema(function_id, message_type);
+ }
+ };
+
+ protected:
+ hmi_apis::HMI_API hmi_so_factory_;
+ mobile_apis::MOBILE_API mobile_so_factory_;
+ testing::NiceMock<MockApplicationManager> mock_app_mngr_;
+ testing::NiceMock<MockRequestControlerSettings> mock_request_controler_;
+ testing::NiceMock<MockProtocolHandler> mock_protocol_handler_;
+ am::request_controller::RequestController request_controller_;
+ testing::NiceMock<MockHMIMessageHandler> mock_hmi_handler_;
+ testing::NiceMock<MockCommandHolder> mock_command_holder_;
+ std::shared_ptr<am::MockRPCProtectionManager> mock_rpc_protection_manager_;
+ std::shared_ptr<rpc_service::RPCService> rpc_service_;
+ std::shared_ptr<MockApplication> mock_app_ptr_;
+ am::MockMessageHelper& mock_message_helper_;
+ MockAppServiceManager mock_app_service_nmgr_;
+ testing::NiceMock<am::plugin_manager::MockRPCPluginManager>
+ mock_rpc_plugin_manager_;
+ testing::NiceMock<am::plugin_manager::MockRPCPlugin> mock_rpc_plugin_;
+ testing::NiceMock<MockCommandFactory> mock_command_factory_;
+};
+
+TEST_F(RPCServiceImplTest, ManageMobileCommand_MessageIsNullPtr_False) {
+ MessageSharedPtr message;
+ EXPECT_FALSE(rpc_service_->ManageMobileCommand(
+ message, am::commands::Command::CommandSource::SOURCE_MOBILE));
+}
+
+TEST_F(RPCServiceImplTest, ManageMobileCommand_IsLowVoltage_False) {
+ auto message = CreateMessage();
+ ON_CALL(mock_app_mngr_, IsLowVoltage()).WillByDefault(Return(true));
+ EXPECT_FALSE(rpc_service_->ManageMobileCommand(
+ message, am::commands::Command::CommandSource::SOURCE_MOBILE));
+}
+
+TEST_F(RPCServiceImplTest, ManageMobileCommand_AppInReconnectMode) {
+ auto message = CreateMessage(smart_objects::SmartType_Map);
+ auto source = am::commands::Command::CommandSource::SOURCE_MOBILE;
+ (*message)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+
+ mock_app_ptr_ = std::make_shared<NiceMock<MockApplication> >();
+ ON_CALL(mock_app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_ptr_));
+ ON_CALL(*mock_app_ptr_, device()).WillByDefault(Return(kDeviceHandle));
+ ON_CALL(*mock_app_ptr_, policy_app_id()).WillByDefault(Return(kPolicyAppId));
+ ON_CALL(mock_app_mngr_, IsAppInReconnectMode(kDeviceHandle, kPolicyAppId))
+ .WillByDefault(Return(true));
+ EXPECT_CALL(mock_command_holder_,
+ Suspend(static_cast<am::ApplicationSharedPtr>(mock_app_ptr_),
+ am::CommandHolder::CommandType::kMobileCommand,
+ source,
+ message))
+ .WillOnce(Return());
+
+ EXPECT_TRUE(rpc_service_->ManageMobileCommand(message, source));
+}
+
+TEST_F(RPCServiceImplTest,
+ ManageMobileCommand_SourceIsCheckedForUnsupportedRequest) {
+ typedef am::plugin_manager::RPCPlugin RPCPlugin;
+
+ auto message = CreateMessage(smart_objects::SmartType_Map);
+ auto source = am::commands::Command::CommandSource::SOURCE_MOBILE;
+ (*message)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*message)[am::strings::params][am::strings::function_id] = kFunctionId;
+ (*message)[am::strings::params][am::strings::protocol_type] =
+ kMobileProtocolType;
+
+ ON_CALL(mock_app_mngr_, IsLowVoltage()).WillByDefault(Return(false));
+ mock_app_ptr_ = std::make_shared<NiceMock<MockApplication> >();
+ ON_CALL(mock_app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_ptr_));
+ ON_CALL(*mock_app_ptr_, device()).WillByDefault(Return(kDeviceHandle));
+ ON_CALL(*mock_app_ptr_, policy_app_id()).WillByDefault(Return(kPolicyAppId));
+ ON_CALL(mock_app_mngr_, IsAppInReconnectMode(kDeviceHandle, kPolicyAppId))
+ .WillByDefault(Return(false));
+ ON_CALL(mock_app_mngr_, GetPluginManager())
+ .WillByDefault(ReturnRef(mock_rpc_plugin_manager_));
+ auto empty_plugin(utils::Optional<RPCPlugin>::OptionalEmpty::EMPTY);
+ ON_CALL(mock_rpc_plugin_manager_, FindPluginToProcess(kFunctionId, source))
+ .WillByDefault(Return(empty_plugin));
+
+ EXPECT_FALSE(rpc_service_->ManageMobileCommand(message, source));
+}
+
+TEST_F(RPCServiceImplTest, ManageHMICommand_MessageIsNullPtr_False) {
+ MessageSharedPtr message;
+ EXPECT_FALSE(rpc_service_->ManageHMICommand(
+ message, am::commands::Command::CommandSource::SOURCE_HMI));
+}
+
+TEST_F(RPCServiceImplTest, ManageHMICommand_IsLowVoltage_ReturnFalse) {
+ auto message = CreateMessage();
+ ON_CALL(mock_app_mngr_, IsLowVoltage()).WillByDefault(Return(true));
+ EXPECT_FALSE(rpc_service_->ManageHMICommand(
+ message, am::commands::Command::CommandSource::SOURCE_HMI));
+}
+
+TEST_F(RPCServiceImplTest, ManageHMICommand_PluginIsEmpty_False) {
+ auto message = CreateMessage();
+ auto source = am::commands::Command::CommandSource::SOURCE_HMI;
+ (*message)[am::strings::params][am::strings::function_id] = kFunctionId;
+
+ ON_CALL(mock_app_mngr_, IsLowVoltage()).WillByDefault(Return(false));
+ ON_CALL(mock_app_mngr_, GetPluginManager())
+ .WillByDefault(ReturnRef(mock_rpc_plugin_manager_));
+ typedef am::plugin_manager::RPCPlugin RPCPlugin;
+ utils::Optional<RPCPlugin> mock_rpc_plugin_opt(
+ utils::Optional<RPCPlugin>::OptionalEmpty::EMPTY);
+ ON_CALL(mock_rpc_plugin_manager_, FindPluginToProcess(kFunctionId, source))
+ .WillByDefault(Return(mock_rpc_plugin_opt));
+
+ EXPECT_FALSE(rpc_service_->ManageHMICommand(message, source));
+}
+
+TEST_F(RPCServiceImplTest, ManageHMICommand_FailedCreateCommand_False) {
+ typedef am::plugin_manager::RPCPlugin RPCPlugin;
+
+ auto message = CreateMessage();
+ auto source = am::commands::Command::CommandSource::SOURCE_HMI;
+ (*message)[am::strings::params][am::strings::function_id] = kFunctionId;
+
+ ON_CALL(mock_app_mngr_, IsLowVoltage()).WillByDefault(Return(false));
+ ON_CALL(mock_app_mngr_, GetPluginManager())
+ .WillByDefault(ReturnRef(mock_rpc_plugin_manager_));
+ utils::Optional<RPCPlugin> mock_rpc_plugin_opt = mock_rpc_plugin_;
+ ON_CALL(mock_rpc_plugin_manager_, FindPluginToProcess(kFunctionId, source))
+ .WillByDefault(Return(mock_rpc_plugin_opt));
+ ON_CALL(mock_rpc_plugin_, GetCommandFactory())
+ .WillByDefault(ReturnRef(mock_command_factory_));
+ std::shared_ptr<MockRequest> cmd;
+ ON_CALL(mock_command_factory_, CreateCommand(message, source))
+ .WillByDefault(Return(cmd));
+
+ EXPECT_FALSE(rpc_service_->ManageHMICommand(message, source));
+}
+
+TEST_F(RPCServiceImplTest, ManageHMICommand_IsAppInReconnectMode_True) {
+ typedef am::plugin_manager::RPCPlugin RPCPlugin;
+
+ auto message = CreateMessage();
+ auto source = am::commands::Command::CommandSource::SOURCE_HMI;
+ (*message)[am::strings::params][am::strings::function_id] = kFunctionId;
+ (*message)[am::strings::msg_params][am::strings::app_id] = kAppId;
+
+ ON_CALL(mock_app_mngr_, IsLowVoltage()).WillByDefault(Return(false));
+ ON_CALL(mock_app_mngr_, GetPluginManager())
+ .WillByDefault(ReturnRef(mock_rpc_plugin_manager_));
+ utils::Optional<RPCPlugin> mock_rpc_plugin_opt = mock_rpc_plugin_;
+ ON_CALL(mock_rpc_plugin_manager_, FindPluginToProcess(kFunctionId, source))
+ .WillByDefault(Return(mock_rpc_plugin_opt));
+ ON_CALL(mock_rpc_plugin_, GetCommandFactory())
+ .WillByDefault(ReturnRef(mock_command_factory_));
+ std::shared_ptr<MockRequest> cmd =
+ std::make_shared<MockRequest>(kConnectionKey, kCorrelationId);
+ ON_CALL(mock_command_factory_, CreateCommand(message, source))
+ .WillByDefault(Return(cmd));
+
+ auto mock_app = std::make_shared<NiceMock<MockApplication> >();
+ ON_CALL(mock_app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app));
+ const connection_handler::DeviceHandle device_id1 = 1u;
+ ON_CALL(*mock_app, device()).WillByDefault(Return(device_id1));
+ ON_CALL(*mock_app, policy_app_id()).WillByDefault(Return(kPolicyAppId));
+ ON_CALL(mock_app_mngr_, IsAppInReconnectMode(device_id1, kPolicyAppId))
+ .WillByDefault(Return(true));
+
+ EXPECT_CALL(mock_command_holder_,
+ Suspend(static_cast<am::ApplicationSharedPtr>(mock_app),
+ am::CommandHolder::CommandType::kHmiCommand,
+ source,
+ message))
+ .WillOnce(Return());
+ EXPECT_TRUE(rpc_service_->ManageHMICommand(message, source));
+}
+
+TEST_F(RPCServiceImplTest,
+ ManageHMICommand_MessageTypeUnknownTypeCommandNotInit_ReturnFalse) {
+ typedef am::plugin_manager::RPCPlugin RPCPlugin;
+
+ auto message = CreateMessage();
+ auto source = am::commands::Command::CommandSource::SOURCE_HMI;
+ (*message)[am::strings::params][am::strings::function_id] = kFunctionId;
+ (*message)[am::strings::params][am::strings::message_type] = am::kUnknownType;
+
+ ON_CALL(mock_app_mngr_, IsLowVoltage()).WillByDefault(Return(false));
+ ON_CALL(mock_app_mngr_, GetPluginManager())
+ .WillByDefault(ReturnRef(mock_rpc_plugin_manager_));
+ utils::Optional<RPCPlugin> mock_rpc_plugin_opt = mock_rpc_plugin_;
+ ON_CALL(mock_rpc_plugin_manager_, FindPluginToProcess(kFunctionId, source))
+ .WillByDefault(Return(mock_rpc_plugin_opt));
+ ON_CALL(mock_rpc_plugin_, GetCommandFactory())
+ .WillByDefault(ReturnRef(mock_command_factory_));
+ std::shared_ptr<MockRequest> cmd =
+ std::make_shared<MockRequest>(kConnectionKey, kCorrelationId);
+ ON_CALL(mock_command_factory_, CreateCommand(message, source))
+ .WillByDefault(Return(cmd));
+
+ EXPECT_CALL(*cmd, Init()).WillOnce(Return(false));
+ EXPECT_FALSE(rpc_service_->ManageHMICommand(message, source));
+}
+
+TEST_F(RPCServiceImplTest,
+ IsAppServiceRPC_SourceMobileWithValidFuncId_ReturnTrue) {
+ auto source_mobile = am::commands::Command::CommandSource::SOURCE_MOBILE;
+ auto source_sdl = am::commands::Command::CommandSource::SOURCE_SDL;
+
+ EXPECT_TRUE(rpc_service_->IsAppServiceRPC(
+ mobile_apis::FunctionID::GetSystemCapabilityID, source_mobile));
+ EXPECT_TRUE(rpc_service_->IsAppServiceRPC(
+ mobile_apis::FunctionID::OnSystemCapabilityUpdatedID, source_sdl));
+ EXPECT_TRUE(rpc_service_->IsAppServiceRPC(
+ mobile_apis::FunctionID::GetSystemCapabilityID, source_sdl));
+ EXPECT_TRUE(rpc_service_->IsAppServiceRPC(
+ mobile_apis::FunctionID::OnSystemCapabilityUpdatedID, source_sdl));
+}
+
+TEST_F(RPCServiceImplTest,
+ IsAppServiceRPC_SourceHMIWithValidFuncId_ReturnTrue) {
+ auto source_hmi = am::commands::Command::CommandSource::SOURCE_HMI;
+ auto source_sdl_to_hmi =
+ am::commands::Command::CommandSource::SOURCE_SDL_TO_HMI;
+ int32_t function_id =
+ hmi_apis::FunctionID::BasicCommunication_OnSystemCapabilityUpdated;
+
+ EXPECT_TRUE(rpc_service_->IsAppServiceRPC(function_id, source_hmi));
+ EXPECT_TRUE(rpc_service_->IsAppServiceRPC(function_id, source_sdl_to_hmi));
+}
+
+TEST_F(RPCServiceImplTest, IsAppServiceRPC_EmptyPlugin_ReturnFalse) {
+ auto source = am::commands::Command::CommandSource::SOURCE_HMI;
+
+ ON_CALL(mock_app_mngr_, GetPluginManager())
+ .WillByDefault(ReturnRef(mock_rpc_plugin_manager_));
+ typedef am::plugin_manager::RPCPlugin RPCPlugin;
+ utils::Optional<RPCPlugin> mock_rpc_plugin_opt(
+ utils::Optional<RPCPlugin>::OptionalEmpty::EMPTY);
+ ON_CALL(mock_rpc_plugin_manager_, FindPluginToProcess(kFunctionId, source))
+ .WillByDefault(Return(mock_rpc_plugin_opt));
+
+ EXPECT_FALSE(rpc_service_->IsAppServiceRPC(kFunctionId, source));
+}
+
+TEST_F(RPCServiceImplTest, IsAppServiceRPC_PluginWithWrongName_ReturnFalse) {
+ auto source = am::commands::Command::CommandSource::SOURCE_HMI;
+
+ ON_CALL(mock_app_mngr_, GetPluginManager())
+ .WillByDefault(ReturnRef(mock_rpc_plugin_manager_));
+ PluginOpt mock_rpc_plugin_opt(mock_rpc_plugin_);
+ ON_CALL(mock_rpc_plugin_manager_, FindPluginToProcess(kFunctionId, source))
+ .WillByDefault(Return(mock_rpc_plugin_opt));
+ ON_CALL(mock_rpc_plugin_, PluginName()).WillByDefault(Return(""));
+
+ EXPECT_FALSE(rpc_service_->IsAppServiceRPC(kFunctionId, source));
+}
+
+TEST_F(RPCServiceImplTest,
+ IsAppServiceRPC_CommandFactoryIsAbleToProcess_ReturnTrue) {
+ auto source = am::commands::Command::CommandSource::SOURCE_HMI;
+ using namespace application_manager::plugin_manager::plugin_names;
+
+ ON_CALL(mock_app_mngr_, GetPluginManager())
+ .WillByDefault(ReturnRef(mock_rpc_plugin_manager_));
+ PluginOpt mock_rpc_plugin_opt(mock_rpc_plugin_);
+ ON_CALL(mock_rpc_plugin_manager_, FindPluginToProcess(kFunctionId, source))
+ .WillByDefault(Return(mock_rpc_plugin_opt));
+ ON_CALL(mock_rpc_plugin_, PluginName())
+ .WillByDefault(Return(app_service_rpc_plugin));
+ ON_CALL(mock_rpc_plugin_, GetCommandFactory())
+ .WillByDefault(ReturnRef(mock_command_factory_));
+ ON_CALL(mock_command_factory_, IsAbleToProcess(kFunctionId, source))
+ .WillByDefault(Return(true));
+
+ EXPECT_TRUE(rpc_service_->IsAppServiceRPC(kFunctionId, source));
+}
+
+TEST_F(RPCServiceImplTest,
+ UpdateMobileRPCParams_FunctionSchemaIsResettedAndAddedCustomMember) {
+ using namespace ns_smart_device_link::ns_smart_objects;
+
+ // Get initial state of schema
+ auto function_id = mobile_apis::FunctionID::OnHMIStatusID;
+ auto message_type = mobile_apis::messageType::notification;
+ MobileAPIWithPublicSchemaSetting extended_mobile_api;
+ extended_mobile_api.SetSchema(function_id, message_type);
+
+ auto rpc_service_with_extended_api =
+ std::make_shared<rpc_service::RPCServiceImpl>(
+ mock_app_mngr_,
+ request_controller_,
+ &mock_protocol_handler_,
+ &mock_hmi_handler_,
+ mock_command_holder_,
+ mock_rpc_protection_manager_,
+ hmi_so_factory_,
+ extended_mobile_api);
+
+ CSmartSchema initial_schema;
+ extended_mobile_api.GetSchema(function_id, message_type, initial_schema);
+ auto initial_schema_item = initial_schema.getSchemaItem();
+
+ // Change state of schema and add custom parameter
+ auto new_function_id = mobile_apis::FunctionID::OnButtonEventID;
+ std::map<std::string, SMember> members;
+ members["custom member"] = SMember();
+ rpc_service_with_extended_api->UpdateMobileRPCParams(
+ new_function_id, message_type, members);
+ CSmartSchema updated_schema;
+ extended_mobile_api.GetSchema(new_function_id, message_type, updated_schema);
+
+ // Check that schema is changed
+ EXPECT_NE(initial_schema_item, updated_schema.getSchemaItem());
+}
+
+TEST_F(RPCServiceImplTest,
+ UpdateHMIRPCParams_FunctionSchemaIsResettedAndAddedCustomMember) {
+ using namespace ns_smart_device_link::ns_smart_objects;
+
+ // Get initial state of schema
+ auto function_id = hmi_apis::FunctionID::Buttons_OnButtonEvent;
+ auto message_type = hmi_apis::messageType::notification;
+ HMIAPIWithPublicSchemaSetting extended_hmi_api;
+ extended_hmi_api.SetSchema(function_id, message_type);
+
+ auto rpc_service_with_extended_api =
+ std::make_shared<rpc_service::RPCServiceImpl>(
+ mock_app_mngr_,
+ request_controller_,
+ &mock_protocol_handler_,
+ &mock_hmi_handler_,
+ mock_command_holder_,
+ mock_rpc_protection_manager_,
+ extended_hmi_api,
+ mobile_so_factory_);
+
+ CSmartSchema initial_schema;
+ extended_hmi_api.GetSchema(function_id, message_type, initial_schema);
+ auto initial_schema_item = initial_schema.getSchemaItem();
+
+ // Change state of schema and add custom parameter
+ auto new_function_id = hmi_apis::FunctionID::Buttons_OnButtonPress;
+ std::map<std::string, SMember> members;
+ members["custom member"] = SMember();
+ rpc_service_with_extended_api->UpdateHMIRPCParams(
+ function_id, message_type, members);
+ CSmartSchema updated_schema;
+ extended_hmi_api.GetSchema(new_function_id, message_type, updated_schema);
+
+ // Check that schema is changed
+ EXPECT_NE(initial_schema_item, updated_schema.getSchemaItem());
+}
+
+TEST_F(RPCServiceImplTest, SendMessageToHMI_HappyPath) {
+ using namespace application_manager::plugin_manager::plugin_names;
+ auto source = am::commands::Command::CommandSource::SOURCE_SDL_TO_HMI;
+ auto func_id = mobile_apis::FunctionID::RESERVED;
+ auto message = CreateMessage(smart_objects::SmartType_Map);
+ PrepareBasicMessage(message);
+
+ ON_CALL(mock_app_mngr_, GetPluginManager())
+ .WillByDefault(ReturnRef(mock_rpc_plugin_manager_));
+ PluginOpt mock_rpc_plugin_opt(mock_rpc_plugin_);
+ ON_CALL(mock_rpc_plugin_manager_, FindPluginToProcess(func_id, source))
+ .WillByDefault(Return(mock_rpc_plugin_opt));
+ ON_CALL(mock_rpc_plugin_, PluginName())
+ .WillByDefault(Return(app_service_rpc_plugin));
+ ON_CALL(mock_rpc_plugin_, GetCommandFactory())
+ .WillByDefault(ReturnRef(mock_command_factory_));
+
+ EXPECT_CALL(mock_command_factory_, IsAbleToProcess(func_id, source))
+ .WillOnce(Return(true));
+ rpc_service_->SendMessageToHMI(message);
+}
+
+TEST_F(RPCServiceImplTest, SendMessageToHMI_NoHMIHandler_ExecutionAborted) {
+ auto message = CreateMessage(smart_objects::SmartType_Map);
+ PrepareBasicMessage(message);
+
+ rpc_service_->set_hmi_message_handler(nullptr);
+ EXPECT_CALL(mock_app_mngr_, GetPluginManager()).Times(0);
+ rpc_service_->SendMessageToHMI(message);
+}
+
+TEST_F(RPCServiceImplTest, Handle_NoHMIHandler_ExecutionAborted) {
+ auto message_handler = std::make_shared<rpc_service::RPCServiceImpl>(
+ mock_app_mngr_,
+ request_controller_,
+ &mock_protocol_handler_,
+ &mock_hmi_handler_,
+ mock_command_holder_,
+ mock_rpc_protection_manager_,
+ hmi_so_factory_,
+ mobile_so_factory_);
+ message_handler->set_hmi_message_handler(nullptr);
+
+ auto msg = std::shared_ptr<am::Message>();
+ auto msg_to_hmi = am::rpc_service::impl::MessageToHmi(msg);
+
+ EXPECT_CALL(mock_hmi_handler_, SendMessageToHMI(msg_to_hmi)).Times(0);
+ message_handler->Handle(msg_to_hmi);
+}
+
+TEST_F(RPCServiceImplTest, Handle_ValidHMIHandler) {
+ auto message_handler = std::make_shared<rpc_service::RPCServiceImpl>(
+ mock_app_mngr_,
+ request_controller_,
+ &mock_protocol_handler_,
+ &mock_hmi_handler_,
+ mock_command_holder_,
+ mock_rpc_protection_manager_,
+ hmi_so_factory_,
+ mobile_so_factory_);
+ auto msg = std::shared_ptr<am::Message>();
+ auto msg_to_hmi = am::rpc_service::impl::MessageToHmi(msg);
+
+ EXPECT_CALL(mock_hmi_handler_, SendMessageToHMI(msg_to_hmi));
+ message_handler->Handle(msg_to_hmi);
+}
+
+TEST_F(RPCServiceImplTest, Handle_NoMobileProtocolHandler_ExecutionAborted) {
+ auto message_handler = std::make_shared<rpc_service::RPCServiceImpl>(
+ mock_app_mngr_,
+ request_controller_,
+ &mock_protocol_handler_,
+ &mock_hmi_handler_,
+ mock_command_holder_,
+ mock_rpc_protection_manager_,
+ hmi_so_factory_,
+ mobile_so_factory_);
+
+ message_handler->set_protocol_handler(nullptr);
+ auto message_to_send = std::make_shared<am::Message>(
+ protocol_handler::MessagePriority::kDefault);
+
+ EXPECT_CALL(mock_protocol_handler_, IsRPCServiceSecure(_)).Times(0);
+ message_handler->Handle(
+ am::rpc_service::impl::MessageToMobile(message_to_send, false));
+}
+
+TEST_F(RPCServiceImplTest, Handle_NoRawMessage_ExecutionAborted) {
+ auto message_handler = std::make_shared<rpc_service::RPCServiceImpl>(
+ mock_app_mngr_,
+ request_controller_,
+ &mock_protocol_handler_,
+ &mock_hmi_handler_,
+ mock_command_holder_,
+ mock_rpc_protection_manager_,
+ hmi_so_factory_,
+ mobile_so_factory_);
+ auto message_to_send = std::make_shared<am::Message>(
+ protocol_handler::MessagePriority::kDefault);
+
+ EXPECT_CALL(mock_protocol_handler_, IsRPCServiceSecure(_)).Times(0);
+ message_handler->Handle(
+ am::rpc_service::impl::MessageToMobile(message_to_send, false));
+}
+
+TEST_F(RPCServiceImplTest,
+ Handle_NeedsEncryptionAndServiceNotSecure_ExecutionAborted) {
+ auto message_handler = std::make_shared<rpc_service::RPCServiceImpl>(
+ mock_app_mngr_,
+ request_controller_,
+ &mock_protocol_handler_,
+ &mock_hmi_handler_,
+ mock_command_holder_,
+ mock_rpc_protection_manager_,
+ hmi_so_factory_,
+ mobile_so_factory_);
+ auto message_to_send = std::make_shared<am::Message>(
+ protocol_handler::MessagePriority::kDefault);
+ message_to_send->set_protocol_version(
+ protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_1);
+ message_to_send->set_connection_key(kConnectionKey);
+ message_to_send->set_correlation_id(kCorrelationId);
+ message_to_send->set_function_id(kFunctionId);
+ message_to_send->set_message_type(static_cast<am::MessageType>(0));
+ message_to_send->set_json_message(std::string("message"));
+
+ EXPECT_CALL(mock_protocol_handler_, IsRPCServiceSecure(kConnectionKey))
+ .WillOnce(Return(false));
+ EXPECT_CALL(*mock_rpc_protection_manager_, IsInEncryptionNeededCache(_, _))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_protocol_handler_, SendMessageToMobileApp(_, _, _)).Times(0);
+ message_handler->Handle(
+ am::rpc_service::impl::MessageToMobile(message_to_send, false));
+}
+
+TEST_F(RPCServiceImplTest, Handle_HappyPathWithoutClosingSession) {
+ auto message_handler = std::make_shared<rpc_service::RPCServiceImpl>(
+ mock_app_mngr_,
+ request_controller_,
+ &mock_protocol_handler_,
+ &mock_hmi_handler_,
+ mock_command_holder_,
+ mock_rpc_protection_manager_,
+ hmi_so_factory_,
+ mobile_so_factory_);
+ auto message_to_send = std::make_shared<am::Message>(
+ protocol_handler::MessagePriority::kDefault);
+ message_to_send->set_protocol_version(
+ protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_1);
+ message_to_send->set_connection_key(kConnectionKey);
+ message_to_send->set_correlation_id(kCorrelationId);
+ message_to_send->set_function_id(kFunctionId);
+ message_to_send->set_message_type(am::MessageType::kNotification);
+ message_to_send->set_json_message(std::string("message"));
+
+ EXPECT_CALL(mock_protocol_handler_, IsRPCServiceSecure(kConnectionKey))
+ .WillOnce(Return(true));
+ ON_CALL(mock_app_mngr_, application(_)).WillByDefault(Return(nullptr));
+ EXPECT_CALL(*mock_rpc_protection_manager_, CheckPolicyEncryptionFlag(_, _, _))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_protocol_handler_, SendMessageToMobileApp(_, _, _))
+ .WillOnce(Return());
+ EXPECT_CALL(*mock_rpc_protection_manager_,
+ RemoveFromEncryptionNeededCache(_, _))
+ .WillOnce(Return());
+ message_handler->Handle(
+ am::rpc_service::impl::MessageToMobile(message_to_send, false));
+}
+
+TEST_F(RPCServiceImplTest, Handle_HappyPathWithClosedSession) {
+ auto message_handler = std::make_shared<rpc_service::RPCServiceImpl>(
+ mock_app_mngr_,
+ request_controller_,
+ &mock_protocol_handler_,
+ &mock_hmi_handler_,
+ mock_command_holder_,
+ mock_rpc_protection_manager_,
+ hmi_so_factory_,
+ mobile_so_factory_);
+ auto message_to_send = std::make_shared<am::Message>(
+ protocol_handler::MessagePriority::kDefault);
+ message_to_send->set_protocol_version(
+ protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_1);
+ message_to_send->set_connection_key(kConnectionKey);
+ message_to_send->set_correlation_id(kCorrelationId);
+ message_to_send->set_function_id(kFunctionId);
+ message_to_send->set_message_type(am::MessageType::kNotification);
+ message_to_send->set_json_message(std::string("message"));
+
+ NiceMock<test::components::connection_handler_test::MockConnectionHandler>
+ mock_conn_handler;
+ EXPECT_CALL(mock_app_mngr_, connection_handler())
+ .WillRepeatedly(ReturnRef(mock_conn_handler));
+ ON_CALL(mock_conn_handler, GetConnectionSessionsCount(_))
+ .WillByDefault(Return(kConnectionSessionsCount));
+ ON_CALL(mock_protocol_handler_, IsRPCServiceSecure(_))
+ .WillByDefault(Return(true));
+ ON_CALL(mock_app_mngr_, application(_)).WillByDefault(Return(nullptr));
+ EXPECT_CALL(*mock_rpc_protection_manager_, CheckPolicyEncryptionFlag(_, _, _))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_protocol_handler_, SendMessageToMobileApp(_, _, _))
+ .WillOnce(Return());
+ EXPECT_CALL(*mock_rpc_protection_manager_,
+ RemoveFromEncryptionNeededCache(_, _))
+ .WillOnce(Return());
+ EXPECT_CALL(mock_conn_handler, CloseSession(_, _)).WillOnce(Return());
+
+ message_handler->Handle(
+ am::rpc_service::impl::MessageToMobile(message_to_send, true));
+}
+
+TEST_F(RPCServiceImplTest, SendMessageToMobile_HappyPath) {
+ using namespace application_manager::plugin_manager::plugin_names;
+ namespace jhs = ns_smart_device_link::ns_json_handler::strings;
+ auto func_id = mobile_apis::FunctionID::OnSystemRequestID;
+ auto source = am::commands::Command::CommandSource::SOURCE_SDL;
+
+ auto message = CreateMessage(smart_objects::SmartType_Map);
+ (*message)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*message)[am::strings::params][am::strings::function_id] = func_id;
+ (*message)[am::strings::msg_params][am::strings::request_type] =
+ mobile_apis::RequestType::PROPRIETARY;
+ (*message)[am::strings::msg_params][am::strings::result_code] =
+ mobile_apis::Result::SUCCESS;
+
+ (*message)[jhs::S_PARAMS][jhs::S_FUNCTION_ID] = func_id;
+ (*message)[jhs::S_PARAMS][jhs::S_MESSAGE_TYPE] =
+ mobile_apis::messageType::request;
+ (*message)[jhs::S_PARAMS][jhs::S_PROTOCOL_TYPE] = kMobileProtocolType;
+ (*message)[jhs::S_PARAMS][jhs::S_PROTOCOL_VERSION] = kProtocolVersion;
+
+ mock_app_ptr_ = std::make_shared<NiceMock<MockApplication> >();
+ ON_CALL(mock_app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_ptr_));
+ ON_CALL(*mock_app_ptr_, protocol_version())
+ .WillByDefault(
+ Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_1));
+
+ EXPECT_CALL(mock_app_mngr_, GetAppServiceManager())
+ .WillRepeatedly(ReturnRef(mock_app_service_nmgr_));
+ auto rpc_pass_handler = std::make_shared<am::RPCPassingHandler>(
+ mock_app_service_nmgr_, mock_app_mngr_);
+ EXPECT_CALL(mock_app_service_nmgr_, GetRPCPassingHandler())
+ .WillRepeatedly(ReturnRef(*rpc_pass_handler));
+ EXPECT_CALL(mock_app_service_nmgr_, GetActiveServices())
+ .WillRepeatedly(Return(std::vector<am::AppService>()));
+
+ ON_CALL(mock_app_mngr_, GetPluginManager())
+ .WillByDefault(ReturnRef(mock_rpc_plugin_manager_));
+ PluginOpt mock_rpc_plugin_opt(mock_rpc_plugin_);
+ ON_CALL(mock_rpc_plugin_manager_, FindPluginToProcess(func_id, source))
+ .WillByDefault(Return(mock_rpc_plugin_opt));
+ ON_CALL(mock_rpc_plugin_, PluginName())
+ .WillByDefault(Return(app_service_rpc_plugin));
+ ON_CALL(mock_rpc_plugin_, GetCommandFactory())
+ .WillByDefault(ReturnRef(mock_command_factory_));
+ ON_CALL(mock_command_factory_, IsAbleToProcess(func_id, source))
+ .WillByDefault(Return(true));
+
+ auto window_id = 0;
+ ON_CALL(mock_message_helper_, ExtractWindowIdFromSmartObject(_))
+ .WillByDefault(Return(window_id));
+ ON_CALL(mock_message_helper_, StringifiedFunctionID(func_id))
+ .WillByDefault(Return("OnSystemRequest"));
+ EXPECT_CALL(mock_app_mngr_,
+ CheckPolicyPermissions(_, window_id, "OnSystemRequest", _, _))
+ .WillOnce(Return(mobile_apis::Result::SUCCESS));
+
+ policy_test::MockPolicyHandlerInterface mock_policy_handler;
+ EXPECT_CALL(mock_app_mngr_, GetPolicyHandler())
+ .WillOnce(ReturnRef(mock_policy_handler));
+ EXPECT_CALL(mock_policy_handler, OnUpdateRequestSentToMobile());
+
+ rpc_service_->SendMessageToMobile(message);
+}
+
+TEST_F(RPCServiceImplTest,
+ SendMessageToMobile_PolicyPermissionsFailed_ExecutionAborted) {
+ using namespace application_manager::plugin_manager::plugin_names;
+
+ namespace jhs = ns_smart_device_link::ns_json_handler::strings;
+ auto func_id = mobile_apis::FunctionID::OnSystemRequestID;
+ auto source = am::commands::Command::CommandSource::SOURCE_SDL;
+
+ auto message = CreateMessage(smart_objects::SmartType_Map);
+ (*message)[am::strings::params][am::strings::connection_key] = kConnectionKey;
+ (*message)[am::strings::params][am::strings::function_id] = func_id;
+ (*message)[am::strings::msg_params][am::strings::request_type] =
+ mobile_apis::RequestType::PROPRIETARY;
+ (*message)[am::strings::msg_params][am::strings::result_code] =
+ mobile_apis::Result::SUCCESS;
+
+ (*message)[jhs::S_PARAMS][jhs::S_FUNCTION_ID] = func_id;
+ (*message)[jhs::S_PARAMS][jhs::S_MESSAGE_TYPE] =
+ mobile_apis::messageType::request;
+ (*message)[jhs::S_PARAMS][jhs::S_PROTOCOL_TYPE] = kMobileProtocolType;
+ (*message)[jhs::S_PARAMS][jhs::S_PROTOCOL_VERSION] = kProtocolVersion;
+
+ mock_app_ptr_ = std::make_shared<NiceMock<MockApplication> >();
+ ON_CALL(mock_app_mngr_, application(kConnectionKey))
+ .WillByDefault(Return(mock_app_ptr_));
+ ON_CALL(*mock_app_ptr_, protocol_version())
+ .WillByDefault(
+ Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_1));
+
+ EXPECT_CALL(mock_app_mngr_, GetAppServiceManager())
+ .WillRepeatedly(ReturnRef(mock_app_service_nmgr_));
+ auto rpc_pass_handler = std::make_shared<am::RPCPassingHandler>(
+ mock_app_service_nmgr_, mock_app_mngr_);
+ EXPECT_CALL(mock_app_service_nmgr_, GetRPCPassingHandler())
+ .WillRepeatedly(ReturnRef(*rpc_pass_handler));
+ EXPECT_CALL(mock_app_service_nmgr_, GetActiveServices())
+ .WillRepeatedly(Return(std::vector<am::AppService>()));
+
+ ON_CALL(mock_app_mngr_, GetPluginManager())
+ .WillByDefault(ReturnRef(mock_rpc_plugin_manager_));
+ PluginOpt mock_rpc_plugin_opt(mock_rpc_plugin_);
+ ON_CALL(mock_rpc_plugin_manager_, FindPluginToProcess(func_id, source))
+ .WillByDefault(Return(mock_rpc_plugin_opt));
+ ON_CALL(mock_rpc_plugin_, PluginName())
+ .WillByDefault(Return(app_service_rpc_plugin));
+ ON_CALL(mock_rpc_plugin_, GetCommandFactory())
+ .WillByDefault(ReturnRef(mock_command_factory_));
+ ON_CALL(mock_command_factory_, IsAbleToProcess(func_id, source))
+ .WillByDefault(Return(true));
+
+ auto window_id = -1; // Assume that this ID is invalid;
+ ON_CALL(mock_message_helper_, ExtractWindowIdFromSmartObject(_))
+ .WillByDefault(Return(window_id));
+ ON_CALL(mock_message_helper_, StringifiedFunctionID(func_id))
+ .WillByDefault(Return("OnSystemRequest"));
+ EXPECT_CALL(mock_app_mngr_,
+ CheckPolicyPermissions(_, window_id, "OnSystemRequest", _, _))
+ .WillOnce(Return(mobile_apis::Result::INVALID_ENUM));
+
+ policy_test::MockPolicyHandlerInterface mock_policy_handler;
+ EXPECT_CALL(mock_app_mngr_, GetPolicyHandler()).Times(0);
+ EXPECT_CALL(mock_policy_handler, OnUpdateRequestSentToMobile()).Times(0);
+
+ rpc_service_->SendMessageToMobile(message);
+}
+} // namespace application_manager_test
+
+} // namespace components
+
+} // namespace test
diff --git a/src/components/application_manager/test/sdl_preloaded_pt.json b/src/components/application_manager/test/sdl_preloaded_pt.json
index ad264c8518..536a0939f9 100644
--- a/src/components/application_manager/test/sdl_preloaded_pt.json
+++ b/src/components/application_manager/test/sdl_preloaded_pt.json
@@ -21,9 +21,19 @@
"EMERGENCY": 60,
"NAVIGATION": 15,
"PROJECTION": 15,
+ "VOICECOM": 20,
"COMMUNICATION": 6,
"NORMAL": 4,
"NONE": 0
+ },
+ "subtle_notifications_per_minute_by_priority": {
+ "EMERGENCY": 60,
+ "NAVIGATION": 20,
+ "PROJECTION": 20,
+ "VOICECOM": 30,
+ "COMMUNICATION": 15,
+ "NORMAL": 10,
+ "NONE": 0
}
},
"functional_groupings": {
@@ -367,7 +377,8 @@
"odometer",
"tirePressure",
"vin",
- "wiperStatus"]
+ "wiperStatus",
+ "stabilityControlsStatus"]
},
"OnVehicleData": {
"hmi_levels": ["BACKGROUND",
@@ -388,7 +399,8 @@
"odometer",
"tirePressure",
"vin",
- "wiperStatus"]
+ "wiperStatus",
+ "stabilityControlsStatus"]
},
"SubscribeVehicleData": {
"hmi_levels": ["BACKGROUND",
@@ -408,7 +420,8 @@
"cloudAppVehicleID",
"odometer",
"tirePressure",
- "wiperStatus"]
+ "wiperStatus",
+ "stabilityControlsStatus"]
},
"UnsubscribeVehicleData": {
"hmi_levels": ["BACKGROUND",
@@ -428,7 +441,8 @@
"cloudAppVehicleID",
"odometer",
"tirePressure",
- "wiperStatus"]
+ "wiperStatus",
+ "stabilityControlsStatus"]
}
}
},
diff --git a/src/components/application_manager/test/sdl_pt_update.json b/src/components/application_manager/test/sdl_pt_update.json
index aea3f7700b..dc4fe16027 100644
--- a/src/components/application_manager/test/sdl_pt_update.json
+++ b/src/components/application_manager/test/sdl_pt_update.json
@@ -1610,7 +1610,8 @@
"odometer",
"tirePressure",
"vin",
- "wiperStatus"
+ "wiperStatus",
+ "stabilityControlsStatus"
]
},
"OnVehicleData" : {
@@ -1629,7 +1630,8 @@
"odometer",
"tirePressure",
"vin",
- "wiperStatus"
+ "wiperStatus",
+ "stabilityControlsStatus"
]
},
"SubscribeVehicleData" : {
@@ -1647,7 +1649,8 @@
"cloudAppVehicleID",
"odometer",
"tirePressure",
- "wiperStatus"
+ "wiperStatus",
+ "stabilityControlsStatus"
]
},
"UnsubscribeVehicleData" : {
@@ -1665,7 +1668,8 @@
"cloudAppVehicleID",
"odometer",
"tirePressure",
- "wiperStatus"
+ "wiperStatus",
+ "stabilityControlsStatus"
]
}
},
@@ -1739,6 +1743,15 @@
"NORMAL" : 4,
"VOICECOMM" : 10
},
+ "subtle_notifications_per_minute_by_priority": {
+ "COMMUNICATION": 15,
+ "EMERGENCY": 60,
+ "NAVIGATION": 20,
+ "PROJECTION": 20,
+ "NONE": 0,
+ "NORMAL": 10,
+ "VOICECOMM": 30
+ },
"seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
"timeout_after_x_seconds" : 60,
"vehicle_make" : "Stark Industries",
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 93565b8719..16e8bff8b8 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
@@ -83,6 +83,15 @@ const uint32_t kHMIAppID = 2718u;
const am::WindowID kDefaultWindowId =
mobile_apis::PredefinedWindows::DEFAULT_WINDOW;
const am::WindowID kCustomWindowId = 2;
+
+const uint32_t kAppIdInFull = 1761;
+const uint32_t kHMIAppIdInFull = 15685;
+const uint32_t kAppIdMovedToFull = 1796;
+const uint32_t kHMIAppIdMovedToFull = 30093;
+const uint32_t kAppIdLimited = 1762;
+const uint32_t kHMIAppIdLimited = 17559;
+const uint32_t kAppIDMovedToLimited = 1763;
+const uint32_t kHMIAppIdMovedToLimited = 17663;
} // namespace
struct HmiStatesComparator {
@@ -131,6 +140,8 @@ struct HmiStatesIDComparator {
#define NOT_VC false
#define NAVI true
#define NOT_NAVI false
+#define WEP true
+#define NOT_WEP false
enum ApplicationType {
APP_TYPE_NON_MEDIA,
@@ -211,12 +222,23 @@ class StateControllerImplTest : public ::testing::Test {
uint32_t media_navi_vc_app_id_ = 1922;
uint32_t media_navi_vc_hmi_app_id_ = 21419;
+ am::ApplicationSharedPtr media_wep_app_;
+ NiceMock<application_manager_test::MockApplication>* media_wep_app_ptr_;
+ uint32_t media_wep_app_id_ = 1977;
+ uint32_t media_wep_app_hmi_app_id_ = 21491;
+
+ am::ApplicationSharedPtr non_media_wep_app_;
+ NiceMock<application_manager_test::MockApplication>* non_media_wep_app_ptr_;
+ uint32_t non_media_wep_app_id_ = 1979;
+ uint32_t non_media_wep_app_hmi_app_id_ = 21599;
+
std::vector<am::HmiStatePtr> valid_states_for_audio_app_;
std::vector<am::HmiStatePtr> valid_states_for_not_audio_app_;
std::vector<am::HmiStatePtr> common_invalid_states_;
std::vector<am::HmiStatePtr> invalid_states_for_not_audio_app;
std::vector<am::HmiStatePtr> invalid_states_for_audio_app;
std::vector<am::HmiState::StateID> valid_state_ids_;
+ std::vector<am::HmiState::StateID> valid_non_navi_state_ids_;
typedef std::map<am::ApplicationSharedPtr,
NiceMock<application_manager_test::MockApplication>*>
@@ -503,7 +525,7 @@ class StateControllerImplTest : public ::testing::Test {
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
createHmiState(HMILevel::HMI_LIMITED,
- AudioStreamingState::ATTENUATED,
+ AudioStreamingState::NOT_AUDIBLE,
VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
@@ -522,6 +544,10 @@ class StateControllerImplTest : public ::testing::Test {
result_hmi_state = valid_states_for_audio_app_;
break;
}
+ case APP_TYPE_ATTENUATED: {
+ PrepareStateResultsForAttenuated(result_hmi_state);
+ break;
+ }
default: { break; }
}
}
@@ -557,7 +583,7 @@ class StateControllerImplTest : public ::testing::Test {
}
}
- ApplicationType AppType(uint32_t app_id) {
+ ApplicationType AppType(const uint32_t app_id) {
// TODO(AOleynik): Currently there is ongoing discussion regarding mixed
// application properties, i.e. is_media_application flag from RAI and
// AppHmiTypes (NAVIGATION, etc.). Most likely logic should be changed
@@ -573,7 +599,7 @@ class StateControllerImplTest : public ::testing::Test {
return APP_TYPE_NON_MEDIA;
}
- auto app = it->first;
+ const auto app = it->first;
if (app->is_navi()) {
return APP_TYPE_NAVI;
}
@@ -682,22 +708,26 @@ class StateControllerImplTest : public ::testing::Test {
NiceMock<application_manager_test::MockApplication>** app_mock,
uint32_t app_id,
uint32_t hmi_app_id,
- bool media,
- bool navi,
- bool vc) {
+ const bool media,
+ const bool navi,
+ const bool vc,
+ const bool wep) {
*app_mock = new NiceMock<application_manager_test::MockApplication>;
- Mock::AllowLeak(*app_mock); // WorkAround for gogletest bug
+ Mock::AllowLeak(*app_mock); // WorkAround for googletest bug
am::ApplicationSharedPtr app(*app_mock);
ON_CALL(**app_mock, app_id()).WillByDefault(Return(app_id));
ON_CALL(**app_mock, hmi_app_id()).WillByDefault(Return(hmi_app_id));
ON_CALL(**app_mock, is_media_application()).WillByDefault(Return(media));
ON_CALL(**app_mock, is_navi()).WillByDefault(Return(navi));
+ ON_CALL(**app_mock, webengine_projection_enabled())
+ .WillByDefault(Return(wep));
ON_CALL(**app_mock, is_voice_communication_supported())
.WillByDefault(Return(vc));
ON_CALL(**app_mock, IsAudioApplication())
.WillByDefault(Return(media || navi || vc));
+ ON_CALL(**app_mock, is_ready()).WillByDefault(Return(true));
EXPECT_CALL(**app_mock, usage_report())
.WillRepeatedly(ReturnRef(usage_stat));
@@ -890,6 +920,15 @@ class StateControllerImplTest : public ::testing::Test {
valid_state_ids_.push_back(am::HmiState::StateID::STATE_ID_PHONE_CALL);
valid_state_ids_.push_back(am::HmiState::StateID::STATE_ID_SAFETY_MODE);
valid_state_ids_.push_back(am::HmiState::StateID::STATE_ID_NAVI_STREAMING);
+
+ valid_non_navi_state_ids_.push_back(
+ am::HmiState::StateID::STATE_ID_VR_SESSION);
+ valid_non_navi_state_ids_.push_back(
+ am::HmiState::StateID::STATE_ID_TTS_SESSION);
+ valid_non_navi_state_ids_.push_back(
+ am::HmiState::StateID::STATE_ID_PHONE_CALL);
+ valid_non_navi_state_ids_.push_back(
+ am::HmiState::StateID::STATE_ID_SAFETY_MODE);
}
void ConfigureApps() {
@@ -898,45 +937,72 @@ class StateControllerImplTest : public ::testing::Test {
simple_hmi_app_id_,
NOT_MEDIA,
NOT_NAVI,
- NOT_VC);
+ NOT_VC,
+ NOT_WEP);
media_app_ = ConfigureApp(&media_app_ptr_,
media_app_id_,
media_hmi_app_id_,
MEDIA,
NOT_NAVI,
- NOT_VC);
+ NOT_VC,
+ NOT_WEP);
navi_app_ = ConfigureApp(&navi_app_ptr_,
navi_app_id_,
navi_hmi_app_id_,
NOT_MEDIA,
NAVI,
- NOT_VC);
- vc_app_ = ConfigureApp(
- &vc_app_ptr_, vc_app_id_, vc_hmi_app_id_, NOT_MEDIA, NOT_NAVI, VC);
+ NOT_VC,
+ NOT_WEP);
+ vc_app_ = ConfigureApp(&vc_app_ptr_,
+ vc_app_id_,
+ vc_hmi_app_id_,
+ NOT_MEDIA,
+ NOT_NAVI,
+ VC,
+ NOT_WEP);
media_navi_app_ = ConfigureApp(&media_navi_app_ptr_,
media_navi_app_id_,
media_navi_hmi_app_id_,
MEDIA,
NAVI,
- NOT_VC);
+ NOT_VC,
+ NOT_WEP);
media_vc_app_ = ConfigureApp(&media_vc_app_ptr_,
media_vc_app_id_,
media_vc_hmi_app_id_,
MEDIA,
NOT_NAVI,
- VC);
+ VC,
+ NOT_WEP);
navi_vc_app_ = ConfigureApp(&navi_vc_app_ptr_,
navi_vc_app_id_,
navi_vc_hmi_app_id_,
NOT_MEDIA,
NAVI,
- VC);
+ VC,
+ NOT_WEP);
media_navi_vc_app_ = ConfigureApp(&media_navi_vc_app_ptr_,
media_navi_vc_app_id_,
media_navi_vc_hmi_app_id_,
MEDIA,
NAVI,
- VC);
+ VC,
+ NOT_WEP);
+ media_wep_app_ = ConfigureApp(&media_wep_app_ptr_,
+ media_wep_app_id_,
+ media_wep_app_hmi_app_id_,
+ MEDIA,
+ NOT_NAVI,
+ NOT_VC,
+ WEP);
+ non_media_wep_app_ = ConfigureApp(&non_media_wep_app_ptr_,
+ non_media_wep_app_id_,
+ non_media_wep_app_hmi_app_id_,
+ NOT_MEDIA,
+ NOT_NAVI,
+ NOT_VC,
+ WEP);
+
applications_list_[simple_app_] = simple_app_ptr_;
applications_list_[media_app_] = media_app_ptr_;
applications_list_[navi_app_] = navi_app_ptr_;
@@ -945,7 +1011,10 @@ class StateControllerImplTest : public ::testing::Test {
applications_list_[media_vc_app_] = media_vc_app_ptr_;
applications_list_[navi_vc_app_] = navi_vc_app_ptr_;
applications_list_[media_navi_vc_app_] = media_navi_vc_app_ptr_;
+ applications_list_[media_wep_app_] = media_wep_app_ptr_;
+ applications_list_[non_media_wep_app_] = non_media_wep_app_ptr_;
}
+
void CheckAppConfiguration() {
ASSERT_EQ(simple_app_.get(), simple_app_ptr_);
ASSERT_EQ(media_app_.get(), media_app_ptr_);
@@ -955,6 +1024,8 @@ class StateControllerImplTest : public ::testing::Test {
ASSERT_EQ(media_vc_app_.get(), media_vc_app_ptr_);
ASSERT_EQ(navi_vc_app_.get(), navi_vc_app_ptr_);
ASSERT_EQ(media_navi_vc_app_.get(), media_navi_vc_app_ptr_);
+ ASSERT_EQ(media_wep_app_.get(), media_wep_app_ptr_);
+ ASSERT_EQ(non_media_wep_app_.get(), non_media_wep_app_ptr_);
ASSERT_EQ(simple_app_->app_id(), simple_app_id_);
ASSERT_EQ(media_app_->app_id(), media_app_id_);
@@ -964,6 +1035,8 @@ class StateControllerImplTest : public ::testing::Test {
ASSERT_EQ(media_vc_app_->app_id(), media_vc_app_id_);
ASSERT_EQ(navi_vc_app_->app_id(), navi_vc_app_id_);
ASSERT_EQ(media_navi_vc_app_->app_id(), media_navi_vc_app_id_);
+ ASSERT_EQ(media_wep_app_->app_id(), media_wep_app_id_);
+ ASSERT_EQ(non_media_wep_app_->app_id(), non_media_wep_app_id_);
ASSERT_EQ(simple_app_->hmi_app_id(), simple_hmi_app_id_);
ASSERT_EQ(media_app_->hmi_app_id(), media_hmi_app_id_);
@@ -973,6 +1046,8 @@ class StateControllerImplTest : public ::testing::Test {
ASSERT_EQ(media_vc_app_->hmi_app_id(), media_vc_hmi_app_id_);
ASSERT_EQ(navi_vc_app_->hmi_app_id(), navi_vc_hmi_app_id_);
ASSERT_EQ(media_navi_vc_app_->hmi_app_id(), media_navi_vc_hmi_app_id_);
+ ASSERT_EQ(media_wep_app_->hmi_app_id(), media_wep_app_hmi_app_id_);
+ ASSERT_EQ(non_media_wep_app_->hmi_app_id(), non_media_wep_app_hmi_app_id_);
ASSERT_FALSE(simple_app_->IsAudioApplication());
ASSERT_TRUE(media_app_->IsAudioApplication());
@@ -982,6 +1057,8 @@ class StateControllerImplTest : public ::testing::Test {
ASSERT_TRUE(media_vc_app_->IsAudioApplication());
ASSERT_TRUE(navi_vc_app_->IsAudioApplication());
ASSERT_TRUE(media_navi_vc_app_->IsAudioApplication());
+ ASSERT_TRUE(media_wep_app_->IsAudioApplication());
+ ASSERT_FALSE(non_media_wep_app_->IsAudioApplication());
ASSERT_FALSE(simple_app_->is_media_application());
ASSERT_TRUE(media_app_->is_media_application());
@@ -991,6 +1068,8 @@ class StateControllerImplTest : public ::testing::Test {
ASSERT_TRUE(media_vc_app_->is_media_application());
ASSERT_FALSE(navi_vc_app_->is_media_application());
ASSERT_TRUE(media_navi_vc_app_->is_media_application());
+ ASSERT_TRUE(media_wep_app_->is_media_application());
+ ASSERT_FALSE(non_media_wep_app_->is_media_application());
ASSERT_FALSE(simple_app_->is_navi());
ASSERT_TRUE(navi_app_->is_navi());
@@ -1000,6 +1079,8 @@ class StateControllerImplTest : public ::testing::Test {
ASSERT_FALSE(media_vc_app_->is_navi());
ASSERT_TRUE(navi_vc_app_->is_navi());
ASSERT_TRUE(media_navi_vc_app_->is_navi());
+ ASSERT_FALSE(media_wep_app_->is_navi());
+ ASSERT_FALSE(non_media_wep_app_->is_navi());
ASSERT_FALSE(simple_app_->is_voice_communication_supported());
ASSERT_FALSE(navi_app_->is_voice_communication_supported());
@@ -1009,6 +1090,8 @@ class StateControllerImplTest : public ::testing::Test {
ASSERT_TRUE(media_vc_app_->is_voice_communication_supported());
ASSERT_TRUE(navi_vc_app_->is_voice_communication_supported());
ASSERT_TRUE(media_navi_vc_app_->is_voice_communication_supported());
+ ASSERT_FALSE(media_wep_app_->is_voice_communication_supported());
+ ASSERT_FALSE(non_media_wep_app_->is_voice_communication_supported());
}
virtual void SetUp() OVERRIDE {
@@ -1021,6 +1104,11 @@ class StateControllerImplTest : public ::testing::Test {
CheckAppConfiguration();
FillStatesLists();
SetConnection();
+
+ ON_CALL(message_helper_mock_, CreateHMIStatusNotification(_, _))
+ .WillByDefault(Return(std::make_shared<smart_objects::SmartObject>()));
+ ON_CALL(app_manager_mock_, GetRPCService())
+ .WillByDefault(ReturnRef(mock_rpc_service_));
}
void TearDown() OVERRIDE {
@@ -1089,12 +1177,14 @@ class StateControllerImplTest : public ::testing::Test {
EXPECT_CALL(*app_mock, CurrentHmiState(window_id))
.WillOnce(Return(old_state))
.WillOnce(Return(new_state));
+ ON_CALL(*app_mock, IsFullscreen()).WillByDefault(Return(true));
EXPECT_CALL(
*app_mock,
SetRegularState(window_id, Truly(HmiStatesComparator(new_state))));
if (!HmiStatesComparator(old_state)(new_state)) {
EXPECT_CALL(message_helper_mock_,
- SendHMIStatusNotification(app, window_id, _));
+ CreateHMIStatusNotification(app, window_id))
+ .WillOnce(Return(std::make_shared<smart_objects::SmartObject>()));
if (kDefaultWindowId == window_id) {
EXPECT_CALL(app_manager_mock_,
OnHMIStateChanged(app->app_id(), _, new_state));
@@ -1110,6 +1200,7 @@ class StateControllerImplTest : public ::testing::Test {
EXPECT_CALL(*app_mock, RegularHmiState(kDefaultWindowId))
.WillOnce(Return(old_state))
.WillOnce(Return(old_state));
+ ON_CALL(*app_mock, IsFullscreen()).WillByDefault(Return(true));
ExpectSuccessfulSetHmiState(app, app_mock, old_state, new_state);
}
@@ -1120,7 +1211,7 @@ class StateControllerImplTest : public ::testing::Test {
am::HmiStatePtr state) {
ON_CALL(*app_mock, RegularHmiState(window_id)).WillByDefault(Return(state));
EXPECT_CALL(message_helper_mock_,
- SendHMIStatusNotification(app, window_id, _))
+ CreateHMIStatusNotification(app, window_id))
.Times(0);
EXPECT_CALL(app_manager_mock_, OnHMIStateChanged(app->app_id(), _, _))
.Times(0);
@@ -1156,6 +1247,13 @@ class StateControllerImplTest : public ::testing::Test {
mobile_apis::SystemContext::SYSCTXT_MAIN);
}
+ am::HmiStatePtr FullAudibleStreamableState() {
+ return createHmiState(mobile_apis::HMILevel::HMI_FULL,
+ mobile_apis::AudioStreamingState::AUDIBLE,
+ mobile_apis::VideoStreamingState::STREAMABLE,
+ mobile_apis::SystemContext::SYSCTXT_MAIN);
+ }
+
am::HmiStatePtr FullNotAudibleState() {
return createHmiState(mobile_apis::HMILevel::HMI_FULL,
mobile_apis::AudioStreamingState::NOT_AUDIBLE,
@@ -1364,7 +1462,6 @@ class StateControllerImplTest : public ::testing::Test {
};
TEST_F(StateControllerImplTest, OnStateChangedWithEqualStates) {
- EXPECT_CALL(app_manager_mock_, SendHMIStatusNotification(_)).Times(0);
EXPECT_CALL(app_manager_mock_, OnHMIStateChanged(_, _, _)).Times(0);
EXPECT_CALL(*simple_app_ptr_, ResetDataInNone()).Times(0);
@@ -1381,9 +1478,9 @@ TEST_F(StateControllerImplTest, OnStateChangedWithDifferentStates) {
for (uint32_t j = 0; j < valid_states_for_not_audio_app_.size(); ++j) {
HmiStatesComparator comp(valid_states_for_not_audio_app_[i]);
if (!comp(valid_states_for_not_audio_app_[j])) {
- EXPECT_CALL(
- message_helper_mock_,
- SendHMIStatusNotification(simple_app_, kDefaultWindowId, _));
+ EXPECT_CALL(message_helper_mock_,
+ CreateHMIStatusNotification(simple_app_, kDefaultWindowId))
+ .WillOnce(Return(std::make_shared<smart_objects::SmartObject>()));
EXPECT_CALL(app_manager_mock_,
OnHMIStateChanged(simple_app_id_,
valid_states_for_not_audio_app_[i],
@@ -1398,7 +1495,7 @@ TEST_F(StateControllerImplTest, OnStateChangedWithDifferentStates) {
valid_states_for_not_audio_app_[i],
valid_states_for_not_audio_app_[j]);
- EXPECT_CALL(message_helper_mock_, SendHMIStatusNotification(_, _, _))
+ EXPECT_CALL(message_helper_mock_, CreateHMIStatusNotification(_, _))
.Times(0);
EXPECT_CALL(app_manager_mock_, OnHMIStateChanged(_, _, _)).Times(0);
EXPECT_CALL(*simple_app_ptr_, ResetDataInNone()).Times(0);
@@ -1421,11 +1518,18 @@ TEST_F(StateControllerImplTest, OnStateChangedToNone) {
VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN);
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _))
+ .Times(2)
+ .WillRepeatedly(Return(true));
+ EXPECT_CALL(app_manager_mock_, OnHMIStateChanged(_, _, _)).Times(2);
+
EXPECT_CALL(*simple_app_ptr_, ResetDataInNone()).Times(0);
+
state_ctrl_->OnStateChanged(
simple_app_, kDefaultWindowId, none_state, not_none_state);
EXPECT_CALL(*simple_app_ptr_, ResetDataInNone()).Times(1);
+
state_ctrl_->OnStateChanged(
simple_app_, kDefaultWindowId, not_none_state, none_state);
}
@@ -1435,7 +1539,7 @@ TEST_F(StateControllerImplTest, MoveSimpleAppToValidStates) {
namespace AudioStreamingState = mobile_apis::AudioStreamingState;
namespace VideoStreamingState = mobile_apis::VideoStreamingState;
namespace SystemContext = mobile_apis::SystemContext;
- HmiStatePtr initial_state = createHmiState(HMILevel::INVALID_ENUM,
+ HmiStatePtr initial_state = createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::INVALID_ENUM,
VideoStreamingState::INVALID_ENUM,
SystemContext::INVALID_ENUM);
@@ -1449,7 +1553,9 @@ TEST_F(StateControllerImplTest, MoveSimpleAppToValidStates) {
.WillOnce(Return(initial_state))
.WillOnce(Return(state_to_setup));
EXPECT_CALL(message_helper_mock_,
- SendHMIStatusNotification(simple_app_, kDefaultWindowId, _));
+ CreateHMIStatusNotification(simple_app_, kDefaultWindowId))
+ .WillOnce(Return(std::make_shared<smart_objects::SmartObject>()));
+
EXPECT_CALL(app_manager_mock_,
OnHMIStateChanged(simple_app_id_,
Truly(HmiStatesComparator(initial_state)),
@@ -1474,7 +1580,7 @@ TEST_F(StateControllerImplTest, MoveAudioNotResumeAppToValidStates) {
NiceMock<application_manager_test::MockApplication>* audio_app_mock =
media_navi_vc_app_ptr_;
- HmiStatePtr initial_state = createHmiState(HMILevel::INVALID_ENUM,
+ HmiStatePtr initial_state = createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::INVALID_ENUM,
VideoStreamingState::INVALID_ENUM,
SystemContext::INVALID_ENUM);
@@ -1488,7 +1594,9 @@ TEST_F(StateControllerImplTest, MoveAudioNotResumeAppToValidStates) {
.WillOnce(Return(initial_state))
.WillOnce(Return(state_to_setup));
EXPECT_CALL(message_helper_mock_,
- SendHMIStatusNotification(audio_app, kDefaultWindowId, _));
+ CreateHMIStatusNotification(audio_app, kDefaultWindowId))
+ .WillOnce(Return(std::make_shared<smart_objects::SmartObject>()));
+ ;
EXPECT_CALL(app_manager_mock_,
OnHMIStateChanged(audio_app->app_id(), _, state_to_setup));
@@ -1511,7 +1619,7 @@ TEST_F(StateControllerImplTest, MoveAudioResumeAppToValidStates) {
NiceMock<application_manager_test::MockApplication>* audio_app_mock =
media_navi_vc_app_ptr_;
- HmiStatePtr initial_state = createHmiState(HMILevel::INVALID_ENUM,
+ HmiStatePtr initial_state = createHmiState(HMILevel::HMI_NONE,
AudioStreamingState::INVALID_ENUM,
VideoStreamingState::INVALID_ENUM,
SystemContext::INVALID_ENUM);
@@ -1542,8 +1650,6 @@ TEST_F(StateControllerImplTest, MoveAudioResumeAppToValidStates) {
}
EXPECT_CALL(app_manager_mock_, active_application())
.WillRepeatedly(Return(am::ApplicationSharedPtr()));
- EXPECT_CALL(app_manager_mock_, SendHMIStatusNotification(audio_app))
- .Times(AtLeast(0));
EXPECT_CALL(app_manager_mock_,
OnHMIStateChanged(audio_app->app_id(), _, state_to_setup))
.Times(AtLeast(0));
@@ -1601,10 +1707,21 @@ TEST_F(StateControllerImplTest,
am::ApplicationSharedPtr app_moved_to_full;
NiceMock<application_manager_test::MockApplication>* app_moved_to_full_mock;
- app_in_full =
- ConfigureApp(&app_in_full_mock, 1761, 15685, NOT_MEDIA, NOT_NAVI, NOT_VC);
- app_moved_to_full = ConfigureApp(
- &app_moved_to_full_mock, 1796, 30093, NOT_MEDIA, NOT_NAVI, NOT_VC);
+ app_in_full = ConfigureApp(&app_in_full_mock,
+ kAppIdInFull,
+ kHMIAppIdInFull,
+ NOT_MEDIA,
+ NOT_NAVI,
+ NOT_VC,
+ NOT_WEP);
+
+ app_moved_to_full = ConfigureApp(&app_moved_to_full_mock,
+ kAppIdMovedToFull,
+ kHMIAppIdMovedToFull,
+ NOT_MEDIA,
+ NOT_NAVI,
+ NOT_VC,
+ NOT_WEP);
InsertApplication(app_in_full);
InsertApplication(app_moved_to_full);
@@ -1678,12 +1795,23 @@ TEST_F(StateControllerImplTest,
namespace HMILevel = mobile_apis::HMILevel;
namespace SystemContext = mobile_apis::SystemContext;
NiceMock<application_manager_test::MockApplication>* app_in_full_mock;
- am::ApplicationSharedPtr app_in_full =
- ConfigureApp(&app_in_full_mock, 1761, 15685, MEDIA, NOT_NAVI, NOT_VC);
+ am::ApplicationSharedPtr app_in_full = ConfigureApp(&app_in_full_mock,
+ kAppIdInFull,
+ kHMIAppIdInFull,
+ MEDIA,
+ NOT_NAVI,
+ NOT_VC,
+ NOT_WEP);
NiceMock<application_manager_test::MockApplication>* app_moved_to_full_mock;
- am::ApplicationSharedPtr app_moved_to_full = ConfigureApp(
- &app_moved_to_full_mock, 1796, 30093, MEDIA, NOT_NAVI, NOT_VC);
+ am::ApplicationSharedPtr app_moved_to_full =
+ ConfigureApp(&app_moved_to_full_mock,
+ kAppIdMovedToFull,
+ kHMIAppIdMovedToFull,
+ MEDIA,
+ NOT_NAVI,
+ NOT_VC,
+ NOT_WEP);
InsertApplication(app_in_full);
InsertApplication(app_moved_to_full);
@@ -1705,12 +1833,23 @@ TEST_F(StateControllerImplTest,
namespace SystemContext = mobile_apis::SystemContext;
NiceMock<application_manager_test::MockApplication>* app_in_limited_mock;
- am::ApplicationSharedPtr app_in_limited =
- ConfigureApp(&app_in_limited_mock, 1761, 15685, NOT_MEDIA, NAVI, NOT_VC);
+ am::ApplicationSharedPtr app_in_limited = ConfigureApp(&app_in_limited_mock,
+ kAppIdLimited,
+ kHMIAppIdLimited,
+ NOT_MEDIA,
+ NAVI,
+ NOT_VC,
+ NOT_WEP);
NiceMock<application_manager_test::MockApplication>* app_moved_to_full_mock;
am::ApplicationSharedPtr app_moved_to_full =
- ConfigureApp(&app_moved_to_full_mock, 1796, 30093, NOT_MEDIA, NAVI, VC);
+ ConfigureApp(&app_moved_to_full_mock,
+ kAppIdMovedToFull,
+ kHMIAppIdMovedToFull,
+ NOT_MEDIA,
+ NAVI,
+ VC,
+ NOT_WEP);
InsertApplication(app_in_limited);
InsertApplication(app_moved_to_full);
@@ -1731,13 +1870,24 @@ TEST_F(StateControllerImplTest,
namespace HMILevel = mobile_apis::HMILevel;
namespace SystemContext = mobile_apis::SystemContext;
NiceMock<application_manager_test::MockApplication>* app_in_limited_mock;
- am::ApplicationSharedPtr app_in_limited =
- ConfigureApp(&app_in_limited_mock, 1761, 15685, NOT_MEDIA, NOT_NAVI, VC);
+ am::ApplicationSharedPtr app_in_limited = ConfigureApp(&app_in_limited_mock,
+ kAppIdLimited,
+ kHMIAppIdLimited,
+ NOT_MEDIA,
+ NOT_NAVI,
+ VC,
+ NOT_WEP);
NiceMock<application_manager_test::MockApplication>*
app_moved_to_limited_mock;
- am::ApplicationSharedPtr app_moved_to_limited = ConfigureApp(
- &app_moved_to_limited_mock, 1796, 30093, NOT_MEDIA, NOT_NAVI, VC);
+ am::ApplicationSharedPtr app_moved_to_limited =
+ ConfigureApp(&app_moved_to_limited_mock,
+ kAppIDMovedToLimited,
+ kHMIAppIdMovedToLimited,
+ NOT_MEDIA,
+ NOT_NAVI,
+ VC,
+ NOT_WEP);
InsertApplication(app_in_limited);
InsertApplication(app_moved_to_limited);
@@ -1886,16 +2036,27 @@ TEST_F(StateControllerImplTest,
namespace SystemContext = mobile_apis::SystemContext;
NiceMock<application_manager_test::MockApplication>* app_moved_to_full_mock;
- am::ApplicationSharedPtr app_moved_to_full = ConfigureApp(
- &app_moved_to_full_mock, 1761, 15685, NOT_MEDIA, NOT_NAVI, NOT_VC);
+ am::ApplicationSharedPtr app_moved_to_full =
+ ConfigureApp(&app_moved_to_full_mock,
+ kAppIdMovedToFull,
+ kHMIAppIdMovedToFull,
+ NOT_MEDIA,
+ NOT_NAVI,
+ NOT_VC,
+ NOT_WEP);
am::ApplicationSharedPtr limited_app = media_app_;
NiceMock<application_manager_test::MockApplication>* limited_app_mock =
media_app_ptr_;
NiceMock<application_manager_test::MockApplication>* full_app_mock;
- am::ApplicationSharedPtr full_app =
- ConfigureApp(&full_app_mock, 1796, 30093, NOT_MEDIA, NOT_NAVI, NOT_VC);
+ am::ApplicationSharedPtr full_app = ConfigureApp(&full_app_mock,
+ kAppIdInFull,
+ kHMIAppIdInFull,
+ NOT_MEDIA,
+ NOT_NAVI,
+ NOT_VC,
+ NOT_WEP);
InsertApplication(app_moved_to_full);
InsertApplication(limited_app);
@@ -1924,16 +2085,32 @@ TEST_F(
namespace SystemContext = mobile_apis::SystemContext;
NiceMock<application_manager_test::MockApplication>* app_moved_to_full_mock;
- am::ApplicationSharedPtr app_moved_to_full = ConfigureApp(
- &app_moved_to_full_mock, 1761, 15685, MEDIA, NOT_NAVI, NOT_VC);
+ am::ApplicationSharedPtr app_moved_to_full =
+ ConfigureApp(&app_moved_to_full_mock,
+ kAppIdMovedToFull,
+ kHMIAppIdMovedToFull,
+ MEDIA,
+ NOT_NAVI,
+ NOT_VC,
+ NOT_WEP);
NiceMock<application_manager_test::MockApplication>* limited_app_mock;
- am::ApplicationSharedPtr limited_app =
- ConfigureApp(&limited_app_mock, 1762, 17559, MEDIA, NOT_NAVI, NOT_VC);
+ am::ApplicationSharedPtr limited_app = ConfigureApp(&limited_app_mock,
+ kAppIdLimited,
+ kHMIAppIdLimited,
+ MEDIA,
+ NOT_NAVI,
+ NOT_VC,
+ NOT_WEP);
NiceMock<application_manager_test::MockApplication>* full_app_mock;
- am::ApplicationSharedPtr full_app =
- ConfigureApp(&full_app_mock, 1796, 30093, NOT_MEDIA, NOT_NAVI, NOT_VC);
+ am::ApplicationSharedPtr full_app = ConfigureApp(&full_app_mock,
+ kAppIdInFull,
+ kHMIAppIdInFull,
+ NOT_MEDIA,
+ NOT_NAVI,
+ NOT_VC,
+ NOT_WEP);
InsertApplication(app_moved_to_full);
InsertApplication(limited_app);
@@ -1962,16 +2139,32 @@ TEST_F(
namespace SystemContext = mobile_apis::SystemContext;
NiceMock<application_manager_test::MockApplication>* app_moved_to_full_mock;
- am::ApplicationSharedPtr app_moved_to_full = ConfigureApp(
- &app_moved_to_full_mock, 1761, 15685, MEDIA, NOT_NAVI, NOT_VC);
+ am::ApplicationSharedPtr app_moved_to_full =
+ ConfigureApp(&app_moved_to_full_mock,
+ kAppIdMovedToFull,
+ kHMIAppIdMovedToFull,
+ MEDIA,
+ NOT_NAVI,
+ NOT_VC,
+ NOT_WEP);
NiceMock<application_manager_test::MockApplication>* limited_app_mock;
- am::ApplicationSharedPtr limited_app =
- ConfigureApp(&limited_app_mock, 1762, 17559, MEDIA, NOT_NAVI, NOT_VC);
+ am::ApplicationSharedPtr limited_app = ConfigureApp(&limited_app_mock,
+ kAppIdLimited,
+ kHMIAppIdLimited,
+ MEDIA,
+ NOT_NAVI,
+ NOT_VC,
+ NOT_WEP);
NiceMock<application_manager_test::MockApplication>* full_app_mock;
- am::ApplicationSharedPtr full_app =
- ConfigureApp(&full_app_mock, 1796, 30093, NOT_MEDIA, NAVI, NOT_VC);
+ am::ApplicationSharedPtr full_app = ConfigureApp(&full_app_mock,
+ kAppIdInFull,
+ kHMIAppIdInFull,
+ NOT_MEDIA,
+ NAVI,
+ NOT_VC,
+ NOT_WEP);
InsertApplication(app_moved_to_full);
InsertApplication(limited_app);
@@ -2044,8 +2237,7 @@ TEST_F(StateControllerImplTest,
media_navi_vc_app_, kDefaultWindowId, FullAudibleState(), false);
}
-// TODO {AKozoriz} Changed logic in state_controller
-TEST_F(StateControllerImplTest, DISABLED_ActivateAppSuccessReceivedFromHMI) {
+TEST_F(StateControllerImplTest, ActivateAppSuccessReceivedFromHMI) {
using namespace hmi_apis;
using namespace mobile_apis;
@@ -2147,8 +2339,6 @@ TEST_F(StateControllerImplTest, SendEventBCActivateApp_HMIReceivesError) {
EXPECT_CALL(*simple_app_ptr_, SetRegularState(kDefaultWindowId, _))
.Times(0);
- EXPECT_CALL(app_manager_mock_, SendHMIStatusNotification(simple_app_))
- .Times(0);
EXPECT_CALL(app_manager_mock_,
OnHMIStateChanged(simple_app_->app_id(), _, _))
.Times(0);
@@ -2172,8 +2362,6 @@ TEST_F(StateControllerImplTest, ActivateAppInvalidCorrelationId) {
EXPECT_CALL(app_manager_mock_, application_by_hmi_app(hmi_app_id))
.WillOnce(Return(am::ApplicationSharedPtr()));
EXPECT_CALL(*simple_app_ptr_, SetRegularState(kDefaultWindowId, _)).Times(0);
- EXPECT_CALL(app_manager_mock_, SendHMIStatusNotification(simple_app_))
- .Times(0);
EXPECT_CALL(app_manager_mock_, OnHMIStateChanged(simple_app_->app_id(), _, _))
.Times(0);
SetBCActivateAppRequestToHMI(Common_HMILevel::FULL, corr_id);
@@ -2187,16 +2375,16 @@ TEST_F(StateControllerImplTest, ActivateAppInvalidCorrelationId) {
state_ctrl_->on_event(event);
}
-TEST_F(StateControllerImplTest, DISABLED_ApplyTempStatesForSimpleApp) {
+TEST_F(StateControllerImplTest, ApplyTempStatesForSimpleApp) {
InsertApplication(simple_app_);
CheckStateApplyingForApplication(
- simple_app_, *simple_app_ptr_, valid_state_ids_);
+ simple_app_, *simple_app_ptr_, valid_non_navi_state_ids_);
}
-TEST_F(StateControllerImplTest, DISABLED_ApplyTempStatesForMediaApp) {
+TEST_F(StateControllerImplTest, ApplyTempStatesForMediaApp) {
InsertApplication(media_app_);
CheckStateApplyingForApplication(
- media_app_, *media_app_ptr_, valid_state_ids_);
+ media_app_, *media_app_ptr_, valid_non_navi_state_ids_);
}
TEST_F(StateControllerImplTest, ApplyTempStatesForNaviApp) {
@@ -2204,9 +2392,10 @@ TEST_F(StateControllerImplTest, ApplyTempStatesForNaviApp) {
CheckStateApplyingForApplication(navi_app_, *navi_app_ptr_, valid_state_ids_);
}
-TEST_F(StateControllerImplTest, DISABLED_ApplyTempStatesForVCApp) {
+TEST_F(StateControllerImplTest, ApplyTempStatesForVCApp) {
InsertApplication(vc_app_);
- CheckStateApplyingForApplication(vc_app_, *vc_app_ptr_, valid_state_ids_);
+ CheckStateApplyingForApplication(
+ vc_app_, *vc_app_ptr_, valid_non_navi_state_ids_);
}
TEST_F(StateControllerImplTest, ApplyTempStatesForMediaNaviApp) {
@@ -2215,10 +2404,10 @@ TEST_F(StateControllerImplTest, ApplyTempStatesForMediaNaviApp) {
media_navi_app_, *media_navi_app_ptr_, valid_state_ids_);
}
-TEST_F(StateControllerImplTest, DISABLED_ApplyTempStatesForMediaVCApp) {
+TEST_F(StateControllerImplTest, ApplyTempStatesForMediaVCApp) {
InsertApplication(media_vc_app_);
CheckStateApplyingForApplication(
- media_vc_app_, *media_vc_app_ptr_, valid_state_ids_);
+ media_vc_app_, *media_vc_app_ptr_, valid_non_navi_state_ids_);
}
TEST_F(StateControllerImplTest, ApplyTempStatesForNaviVCApp) {
@@ -2360,82 +2549,80 @@ TEST_F(StateControllerImplTest,
}
TEST_F(StateControllerImplTest, SetNaviStreamingStateForNonMediaApplication) {
- am::HmiStatePtr state_navi_streming =
- std::make_shared<am::VideoStreamingHmiState>(simple_app_,
- app_manager_mock_);
+ am::HmiStatePtr state_navi_streaming =
+ std::make_shared<am::NaviStreamingHmiState>(simple_app_,
+ app_manager_mock_);
TestSetState(simple_app_,
- state_navi_streming,
+ state_navi_streaming,
APP_TYPE_NON_MEDIA,
&StateControllerImplTest::PrepareNaviStreamingHMIStateResults);
}
TEST_F(StateControllerImplTest,
- DISABLED_SetNaviStreamingStateMediaApplicationAttenuatedNotSupported) {
- am::HmiStatePtr state_navi_streming =
- std::make_shared<am::VideoStreamingHmiState>(media_app_,
- app_manager_mock_);
+ SetNaviStreamingStateMediaApplicationAttenuatedNotSupported) {
+ am::HmiStatePtr state_navi_streaming =
+ std::make_shared<am::NaviStreamingHmiState>(media_app_,
+ app_manager_mock_);
EXPECT_CALL(app_manager_mock_, is_attenuated_supported())
.WillRepeatedly(Return(false));
TestSetState(media_app_,
- state_navi_streming,
+ state_navi_streaming,
APP_TYPE_MEDIA,
&StateControllerImplTest::PrepareNaviStreamingHMIStateResults);
}
TEST_F(StateControllerImplTest,
- DISABLED_SetNaviStreamingStateMediaApplicationAttenuatedSupported) {
- am::HmiStatePtr state_navi_streming =
- std::make_shared<am::VideoStreamingHmiState>(media_app_,
- app_manager_mock_);
+ SetNaviStreamingStateMediaApplicationAttenuatedSupported) {
+ am::HmiStatePtr state_navi_streaming =
+ std::make_shared<am::NaviStreamingHmiState>(media_app_,
+ app_manager_mock_);
EXPECT_CALL(app_manager_mock_, is_attenuated_supported())
.WillRepeatedly(Return(true));
TestSetState(media_app_,
- state_navi_streming,
+ state_navi_streaming,
APP_TYPE_ATTENUATED,
- &StateControllerImplTest::PrepareVRTTSHMIStateResults);
+ &StateControllerImplTest::PrepareNaviStreamingHMIStateResults);
}
TEST_F(StateControllerImplTest,
- DISABLED_SetNaviStreamingStateVCApplicationAttenuatedNotSupported) {
- am::HmiStatePtr state_navi_streming =
- std::make_shared<am::VideoStreamingHmiState>(vc_app_, app_manager_mock_);
+ SetNaviStreamingStateVCApplicationAttenuatedNotSupported) {
+ am::HmiStatePtr state_navi_streaming =
+ std::make_shared<am::NaviStreamingHmiState>(vc_app_, app_manager_mock_);
EXPECT_CALL(app_manager_mock_, is_attenuated_supported())
.WillRepeatedly(Return(false));
TestSetState(vc_app_,
- state_navi_streming,
+ state_navi_streaming,
APP_TYPE_MEDIA,
&StateControllerImplTest::PrepareNaviStreamingHMIStateResults);
}
TEST_F(StateControllerImplTest,
- DISABLED_SetNaviStreamingStateVCApplicationAttenuatedSupported) {
- am::HmiStatePtr state_navi_streming =
- std::make_shared<am::VideoStreamingHmiState>(vc_app_, app_manager_mock_);
+ SetNaviStreamingStateVCApplicationAttenuatedSupported) {
+ am::HmiStatePtr state_navi_streaming =
+ std::make_shared<am::NaviStreamingHmiState>(vc_app_, app_manager_mock_);
EXPECT_CALL(app_manager_mock_, is_attenuated_supported())
.WillRepeatedly(Return(true));
TestSetState(vc_app_,
- state_navi_streming,
+ state_navi_streaming,
APP_TYPE_ATTENUATED,
- &StateControllerImplTest::PrepareVRTTSHMIStateResults);
+ &StateControllerImplTest::PrepareNaviStreamingHMIStateResults);
}
-TEST_F(StateControllerImplTest, DISABLED_SetNaviStreamingStateNaviApplication) {
- am::HmiStatePtr state_navi_streming =
- std::make_shared<am::VideoStreamingHmiState>(navi_app_,
- app_manager_mock_);
+TEST_F(StateControllerImplTest, SetNaviStreamingStateNaviApplication) {
+ am::HmiStatePtr state_navi_streaming =
+ std::make_shared<am::NaviStreamingHmiState>(navi_app_, app_manager_mock_);
TestSetState(navi_app_,
- state_navi_streming,
+ state_navi_streaming,
APP_TYPE_NAVI,
&StateControllerImplTest::PrepareNaviStreamingHMIStateResults);
}
-TEST_F(StateControllerImplTest,
- DISABLED_SetNaviStreamingStateMediaNaviApplication) {
- am::HmiStatePtr state_navi_streming =
- std::make_shared<am::VideoStreamingHmiState>(media_navi_app_,
- app_manager_mock_);
+TEST_F(StateControllerImplTest, SetNaviStreamingStateMediaNaviApplication) {
+ am::HmiStatePtr state_navi_streaming =
+ std::make_shared<am::NaviStreamingHmiState>(media_navi_app_,
+ app_manager_mock_);
TestSetState(media_navi_app_,
- state_navi_streming,
+ state_navi_streaming,
APP_TYPE_NAVI,
&StateControllerImplTest::PrepareNaviStreamingHMIStateResults);
}
@@ -3011,6 +3198,8 @@ TEST_F(StateControllerImplTest,
EXPECT_CALL(*simple_app_ptr_, keep_context()).WillOnce(Return(true));
EXPECT_CALL(*simple_app_ptr_, IsAudioApplication())
.WillRepeatedly(Return(true));
+ EXPECT_CALL(*simple_app_ptr_, is_media_application())
+ .WillRepeatedly(Return(true));
EXPECT_CALL(*simple_app_ptr_, CurrentHmiState(kDefaultWindowId))
.WillOnce(Return(FullAudibleState()));
EXPECT_CALL(*simple_app_ptr_, set_keep_context(false));
@@ -3045,6 +3234,8 @@ TEST_F(StateControllerImplTest, OnEventChangedAudioSourceAppToBackground) {
EXPECT_CALL(*simple_app_ptr_, IsAudioApplication())
.WillRepeatedly(Return(true));
+ EXPECT_CALL(*simple_app_ptr_, is_media_application())
+ .WillRepeatedly(Return(true));
EXPECT_CALL(*simple_app_ptr_, CurrentHmiState(kDefaultWindowId))
.WillOnce(Return(LimitedState()));
@@ -3062,6 +3253,40 @@ TEST_F(StateControllerImplTest, OnEventChangedAudioSourceAppToBackground) {
mobile_apis::AudioStreamingState::NOT_AUDIBLE);
}
+TEST_F(StateControllerImplTest, OnEventChangedAudioSourceNavAppToLimited) {
+ const uint32_t app_id = navi_app_->app_id();
+ InsertApplication(navi_app_);
+ smart_objects::SmartObject msg;
+ msg[am::strings::msg_params][am::strings::app_id] = app_id;
+ msg[am::strings::msg_params][am::hmi_notification::is_active] = true;
+ msg[am::strings::msg_params][am::hmi_notification::event_name] =
+ hmi_apis::Common_EventTypes::AUDIO_SOURCE;
+
+ const hmi_apis::FunctionID::eType event_id =
+ hmi_apis::FunctionID::BasicCommunication_OnEventChanged;
+ am::event_engine::Event event(event_id);
+ event.set_smart_object(msg);
+
+ EXPECT_CALL(*navi_app_ptr_, is_navi()).WillRepeatedly(Return(true));
+ EXPECT_CALL(*navi_app_ptr_, CurrentHmiState(kDefaultWindowId))
+ .WillOnce(Return(FullAudibleStreamableState()));
+
+ HmiStatePtr new_state;
+ EXPECT_CALL(*navi_app_ptr_, AddHMIState(kDefaultWindowId, _))
+ .WillOnce(SaveArg<1>(&new_state));
+
+ am::WindowIds window_ids = {kDefaultWindowId};
+ EXPECT_CALL(*navi_app_ptr_, GetWindowIds()).WillOnce(Return(window_ids));
+
+ state_ctrl_->on_event(event);
+
+ EXPECT_EQ(new_state->hmi_level(), mobile_apis::HMILevel::HMI_LIMITED);
+ EXPECT_EQ(new_state->audio_streaming_state(),
+ mobile_apis::AudioStreamingState::AUDIBLE);
+ EXPECT_EQ(new_state->video_streaming_state(),
+ mobile_apis::VideoStreamingState::STREAMABLE);
+}
+
TEST_F(StateControllerImplTest, OnEventOnAppDeactivatedIncorrectHmiLevel) {
smart_objects::SmartObject msg;
const uint32_t app_id = simple_app_->app_id();
@@ -3309,7 +3534,9 @@ TEST_F(StateControllerImplTest, OnApplicationRegisteredDifferentStates) {
EXPECT_CALL(*simple_app_ptr_, ResetDataInNone()).Times(0);
EXPECT_CALL(message_helper_mock_,
- SendHMIStatusNotification(simple_app_, kDefaultWindowId, _));
+ CreateHMIStatusNotification(simple_app_, kDefaultWindowId))
+ .WillOnce(Return(std::make_shared<smart_objects::SmartObject>()));
+ ;
EXPECT_CALL(app_manager_mock_, OnHMIStateChanged(_, _, _));
state_ctrl_->OnApplicationRegistered(simple_app_,
@@ -3360,7 +3587,6 @@ TEST_F(StateControllerImplTest, OnApplicationRegisteredEqualStates) {
.WillRepeatedly(Return(default_state));
EXPECT_CALL(*simple_app_ptr_, ResetDataInNone()).Times(0);
- EXPECT_CALL(app_manager_mock_, SendHMIStatusNotification(_)).Times(0);
EXPECT_CALL(app_manager_mock_, OnHMIStateChanged(_, _, _)).Times(0);
state_ctrl_->OnApplicationRegistered(simple_app_,
@@ -3388,6 +3614,29 @@ TEST_F(
media_app_, kDefaultWindowId, new_state, send_activate_app);
}
+TEST_F(
+ StateControllerImplTest,
+ SetRegularState_WEPAppIsInResumingModeEmbeddedNaviIsActive_HmiStateIsNotChanged) {
+ am::event_engine::Event embedded_navi_event(
+ hmi_apis::FunctionID::BasicCommunication_OnEventChanged);
+ smart_objects::SmartObject message;
+ message[am::strings::msg_params][am::hmi_notification::is_active] = true;
+ message[am::strings::msg_params][am::hmi_notification::event_name] =
+ hmi_apis::Common_EventTypes::EMBEDDED_NAVI;
+ embedded_navi_event.set_smart_object(message);
+ state_ctrl_->on_event(embedded_navi_event);
+
+ EXPECT_CALL(*media_wep_app_ptr_, is_resuming())
+ .Times(2)
+ .WillRepeatedly(Return(true));
+ EXPECT_CALL(*media_wep_app_ptr_, SetRegularState(_, _)).Times(0);
+
+ const auto new_state = FullAudibleState();
+ const bool send_activate_app = true;
+ state_ctrl_->SetRegularState(
+ media_wep_app_, kDefaultWindowId, new_state, send_activate_app);
+}
+
TEST_F(StateControllerImplTest,
SetRegularState_BcActivateAppSendFailed_HmiLevelIsNotChanged) {
const am::HmiStatePtr new_state = FullAudibleState();
@@ -3611,7 +3860,9 @@ TEST_F(
SetRegularState(kCustomWindowId,
Truly(HmiStatesComparator(expected_window_state))));
EXPECT_CALL(message_helper_mock_,
- SendHMIStatusNotification(media_app_, kCustomWindowId, _));
+ CreateHMIStatusNotification(media_app_, kCustomWindowId))
+ .WillOnce(Return(std::make_shared<smart_objects::SmartObject>()));
+ ;
state_ctrl_->ActivateDefaultWindow(media_app_);
}
@@ -3644,7 +3895,9 @@ TEST_F(StateControllerImplTest,
SetRegularState(kCustomWindowId,
Truly(HmiStatesComparator(expected_window_state))));
EXPECT_CALL(message_helper_mock_,
- SendHMIStatusNotification(media_app_, kCustomWindowId, _));
+ CreateHMIStatusNotification(media_app_, kCustomWindowId))
+ .WillOnce(Return(std::make_shared<smart_objects::SmartObject>()));
+ ;
state_ctrl_->ExitDefaultWindow(media_app_);
}
@@ -3676,11 +3929,16 @@ TEST_F(StateControllerImplTest,
EXPECT_CALL(*simple_app_ptr_,
SetRegularState(kCustomWindowId,
Truly(HmiStatesComparator(expected_state))));
+ EXPECT_CALL(*simple_app_ptr_,
+ CurrentHmiState(mobile_apis::PredefinedWindows::DEFAULT_WINDOW))
+ .WillOnce(Return(expected_state));
EXPECT_CALL(*simple_app_ptr_, CurrentHmiState(kCustomWindowId))
.WillOnce(Return(initial_state))
.WillOnce(Return(expected_state));
EXPECT_CALL(message_helper_mock_,
- SendHMIStatusNotification(simple_app_, kCustomWindowId, _));
+ CreateHMIStatusNotification(simple_app_, kCustomWindowId))
+ .WillOnce(Return(std::make_shared<smart_objects::SmartObject>()));
+ ;
EXPECT_CALL(app_manager_mock_, OnHMIStateChanged(_, _, _)).Times(0);
state_ctrl_->OnAppWindowAdded(simple_app_,
diff --git a/src/components/config_profile/include/config_profile/ini_file.h b/src/components/config_profile/include/config_profile/ini_file.h
index 3f3ddddf48..204fb6c7bf 100644
--- a/src/components/config_profile/include/config_profile/ini_file.h
+++ b/src/components/config_profile/include/config_profile/ini_file.h
@@ -56,7 +56,7 @@ namespace profile {
/*
* @brief Global defines
*/
-#define INI_LINE_LEN 512
+#define INI_LINE_LEN 1024
#define INI_FILE_TEMP_NAME "ini.tmp"
#define INI_FLAG_UPDATE 0x00
diff --git a/src/components/config_profile/include/config_profile/profile.h b/src/components/config_profile/include/config_profile/profile.h
index 76c66c7c7b..bbd0a5d243 100644
--- a/src/components/config_profile/include/config_profile/profile.h
+++ b/src/components/config_profile/include/config_profile/profile.h
@@ -212,6 +212,12 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
const std::string& hmi_capabilities_file_name() const;
/**
+ * @brief Returns hmi capabilities cache file name
+ * @return hmi capabilities cache file name
+ */
+ const std::string& hmi_capabilities_cache_file_name() const;
+
+ /**
* @brief Returns help promt vector
*/
const std::vector<std::string>& help_prompt() const;
@@ -985,6 +991,7 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
uint32_t stop_streaming_timeout_;
uint16_t time_testing_port_;
std::string hmi_capabilities_file_name_;
+ std::string hmi_capabilities_cache_file_name_;
std::vector<std::string> help_prompt_;
std::vector<std::string> time_out_promt_;
std::vector<std::string> vr_commands_;
diff --git a/src/components/config_profile/src/ini_file.cc b/src/components/config_profile/src/ini_file.cc
index 024c75de3e..dd64f48afa 100644
--- a/src/components/config_profile/src/ini_file.cc
+++ b/src/components/config_profile/src/ini_file.cc
@@ -55,7 +55,7 @@
namespace profile {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Profile")
+SDL_CREATE_LOG_VARIABLE("Profile")
char* ini_write_inst(const char* fname, uint8_t flag) {
FILE* fp = 0;
@@ -152,13 +152,15 @@ char* ini_read_value(const char* fname,
return NULL;
}
+#ifdef BUILD_TESTS
+// cppcheck-suppress unusedFunction //Used in unit tests
char ini_write_value(const char* fname,
const char* chapter,
const char* item,
const char* value,
uint8_t flag) {
FILE *rd_fp, *wr_fp = 0;
- uint16_t i, cr_count;
+ uint16_t cr_count;
int32_t wr_result;
bool chapter_found = false;
bool value_written = false;
@@ -186,11 +188,9 @@ char ini_write_value(const char* fname,
#if USE_MKSTEMP
{
const char* temp_str = "./";
- int32_t fd = -1;
if (temp_str) {
snprintf(temp_fname, PATH_MAX, "%s/ini.XXXXXX", temp_str);
-
- fd = mkstemp(temp_fname);
+ int32_t fd = mkstemp(temp_fname);
if (-1 == fd) {
fclose(rd_fp);
return FALSE;
@@ -244,7 +244,7 @@ char ini_write_value(const char* fname,
first chapter is significant */
value_written = true;
} else if (result == INI_RIGHT_ITEM) {
- for (i = 0; i < cr_count; i++)
+ for (uint16_t i = 0; i < cr_count; i++)
fprintf(wr_fp, "\n");
cr_count = 0;
wr_result = fprintf(wr_fp, "%s=%s\n", item, value);
@@ -278,18 +278,18 @@ char ini_write_value(const char* fname,
if (0 != rename(temp_fname, fname)) {
if (0 != remove(temp_fname)) {
- LOG4CXX_WARN_WITH_ERRNO(
- logger_, "Unable to remove temp file: " << std::string(temp_fname));
+ SDL_LOG_WARN_WITH_ERRNO(
+ "Unable to remove temp file: " << std::string(temp_fname));
}
return FALSE;
}
return (value_written);
}
+#endif // BUILD_TESTS
Ini_search_id ini_parse_line(const char* line, const char* tag, char* value) {
const char* line_ptr;
- char* temp_ptr;
char temp_str[INI_LINE_LEN] = "";
*temp_str = '\0';
@@ -332,7 +332,7 @@ Ini_search_id ini_parse_line(const char* line, const char* tag, char* value) {
return INI_NOTHING;
snprintf(temp_str, INI_LINE_LEN, "%s", line_ptr);
- temp_ptr = strrchr(temp_str, ']');
+ char* temp_ptr = strrchr(temp_str, ']');
if (NULL == temp_ptr) {
return INI_NOTHING;
} else {
diff --git a/src/components/config_profile/src/profile.cc b/src/components/config_profile/src/profile.cc
index 3037b66fdd..d9204acf90 100644
--- a/src/components/config_profile/src/profile.cc
+++ b/src/components/config_profile/src/profile.cc
@@ -53,15 +53,13 @@
namespace {
#define LOG_UPDATED_VALUE(value, key, section) \
{ \
- LOG4CXX_INFO(logger_, \
- "Setting value '" << value << "' for key '" << key \
+ SDL_LOG_INFO("Setting value '" << value << "' for key '" << key \
<< "' in section '" << section << "'."); \
}
#define LOG_UPDATED_BOOL_VALUE(value, key, section) \
{ \
- LOG4CXX_INFO(logger_, \
- "Setting value '" << std::boolalpha << value << "' for key '" \
+ SDL_LOG_INFO("Setting value '" << std::boolalpha << value << "' for key '" \
<< key << "' in section '" << section \
<< "'."); \
}
@@ -101,6 +99,7 @@ const char* kRCModuleConsentSection = "RCModuleConsent";
const char* kSDLVersionKey = "SDLVersion";
const char* kHmiCapabilitiesKey = "HMICapabilities";
+const char* kHmiCapabilitiesCacheFileKey = "HMICapabilitiesCacheFile";
const char* kPathToSnapshotKey = "PathToSnapshot";
const char* kPreloadedPTKey = "PreloadedPT";
const char* kAttemptsToOpenPolicyDBKey = "AttemptsToOpenPolicyDB";
@@ -444,7 +443,7 @@ const char* kDefaultAOAFilterSerialNumber = "N000000";
namespace profile {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Profile")
+SDL_CREATE_LOG_VARIABLE("Profile")
Profile::Profile()
: sdl_version_(kDefaultSDLVersion)
@@ -472,6 +471,7 @@ Profile::Profile()
, stop_streaming_timeout_(kDefaultStopStreamingTimeout)
, time_testing_port_(kDefaultTimeTestingPort)
, hmi_capabilities_file_name_(kDefaultHmiCapabilitiesFileName)
+ , hmi_capabilities_cache_file_name_()
, help_prompt_()
, time_out_promt_()
, min_tread_stack_size_(threads::Thread::kMinStackSize)
@@ -650,6 +650,10 @@ const std::string& Profile::hmi_capabilities_file_name() const {
return hmi_capabilities_file_name_;
}
+const std::string& Profile::hmi_capabilities_cache_file_name() const {
+ return hmi_capabilities_cache_file_name_;
+}
+
const std::string& Profile::server_address() const {
return server_address_;
}
@@ -1241,7 +1245,7 @@ const std::string Profile::hmi_origin_id() const {
}
void Profile::UpdateValues() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// SDL version
ReadStringValue(
@@ -1335,6 +1339,21 @@ void Profile::UpdateValues() {
LOG_UPDATED_VALUE(app_storage_folder_, kAppStorageFolderKey, kMainSection);
+ // HMI capabilities cache file
+ ReadStringValue(&hmi_capabilities_cache_file_name_,
+ "",
+ kMainSection,
+ kHmiCapabilitiesCacheFileKey);
+
+ if (!hmi_capabilities_cache_file_name_.empty()) {
+ hmi_capabilities_cache_file_name_ =
+ app_storage_folder_ + "/" + hmi_capabilities_cache_file_name_;
+ }
+
+ LOG_UPDATED_VALUE(hmi_capabilities_cache_file_name_,
+ kHmiCapabilitiesCacheFileKey,
+ kMainSection);
+
// Application resourse folder
ReadStringValue(&app_resource_folder_,
file_system::CurrentWorkingDirectory().c_str(),
@@ -1531,7 +1550,8 @@ void Profile::UpdateValues() {
kMediaManagerSection,
kNamedVideoPipePathKey);
- named_video_pipe_path_ = app_storage_folder_ + "/" + named_video_pipe_path_;
+ named_video_pipe_path_ = app_storage_folder_ + "/" +
+ std::string(named_video_pipe_path_, 0, NAME_MAX);
LOG_UPDATED_VALUE(
named_video_pipe_path_, kNamedVideoPipePathKey, kMediaManagerSection);
@@ -1542,7 +1562,8 @@ void Profile::UpdateValues() {
kMediaManagerSection,
kNamedAudioPipePathKey);
- named_audio_pipe_path_ = app_storage_folder_ + "/" + named_audio_pipe_path_;
+ named_audio_pipe_path_ = app_storage_folder_ + "/" +
+ std::string(named_audio_pipe_path_, 0, NAME_MAX);
LOG_UPDATED_VALUE(
named_audio_pipe_path_, kNamedAudioPipePathKey, kMediaManagerSection);
@@ -1551,7 +1572,8 @@ void Profile::UpdateValues() {
ReadStringValue(
&video_stream_file_, "", kMediaManagerSection, kVideoStreamFileKey);
- video_stream_file_ = app_storage_folder_ + "/" + video_stream_file_;
+ video_stream_file_ =
+ app_storage_folder_ + "/" + std::string(video_stream_file_, 0, NAME_MAX);
LOG_UPDATED_VALUE(
video_stream_file_, kVideoStreamFileKey, kMediaManagerSection);
@@ -1560,7 +1582,8 @@ void Profile::UpdateValues() {
ReadStringValue(
&audio_stream_file_, "", kMediaManagerSection, kAudioStreamFileKey);
- audio_stream_file_ = app_storage_folder_ + "/" + audio_stream_file_;
+ audio_stream_file_ =
+ app_storage_folder_ + "/" + std::string(audio_stream_file_, 0, NAME_MAX);
LOG_UPDATED_VALUE(
audio_stream_file_, kAudioStreamFileKey, kMediaManagerSection);
@@ -1716,8 +1739,7 @@ void Profile::UpdateValues() {
help_prompt_.clear();
std::string help_prompt_value;
if (ReadValue(&help_prompt_value, kGlobalPropertiesSection, kHelpPromptKey)) {
- char* str = NULL;
- str = strtok(const_cast<char*>(help_prompt_value.c_str()), ",");
+ char* str = strtok(const_cast<char*>(help_prompt_value.c_str()), ",");
while (str != NULL) {
// Default prompt should have delimiter included for each item
const std::string prompt_item = std::string(str) + tts_delimiter_;
@@ -1736,8 +1758,7 @@ void Profile::UpdateValues() {
std::string timeout_prompt_value;
if (ReadValue(
&timeout_prompt_value, kGlobalPropertiesSection, kTimeoutPromptKey)) {
- char* str = NULL;
- str = strtok(const_cast<char*>(timeout_prompt_value.c_str()), ",");
+ char* str = strtok(const_cast<char*>(timeout_prompt_value.c_str()), ",");
while (str != NULL) {
// Default prompt should have delimiter included for each item
const std::string prompt_item = std::string(str) + tts_delimiter_;
@@ -1761,8 +1782,7 @@ void Profile::UpdateValues() {
vr_commands_.clear();
std::string vr_help_command_value;
if (ReadValue(&vr_help_command_value, kVrCommandsSection, kHelpCommandKey)) {
- char* str = NULL;
- str = strtok(const_cast<char*>(vr_help_command_value.c_str()), ",");
+ char* str = strtok(const_cast<char*>(vr_help_command_value.c_str()), ",");
while (str != NULL) {
const std::string vr_item = str;
vr_commands_.push_back(vr_item);
@@ -1844,8 +1864,8 @@ void Profile::UpdateValues() {
"",
kMainSection,
kSupportedDiagModesKey)) {
- char* str = NULL;
- str = strtok(const_cast<char*>(supported_diag_modes_value.c_str()), ",");
+ char* str =
+ strtok(const_cast<char*>(supported_diag_modes_value.c_str()), ",");
while (str != NULL) {
errno = 0;
uint32_t user_value = strtol(str, NULL, 16);
@@ -2828,7 +2848,7 @@ bool Profile::StringToNumber(const std::string& input, uint64_t& output) const {
bool Profile::IsRelativePath(const std::string& path) {
if (path.empty()) {
- LOG4CXX_ERROR(logger_, "Empty path passed.");
+ SDL_LOG_ERROR("Empty path passed.");
return false;
}
return '/' != path[0];
diff --git a/src/components/config_profile/test/profile_test.cc b/src/components/config_profile/test/profile_test.cc
index 6dc0434440..7b9bb374b9 100644
--- a/src/components/config_profile/test/profile_test.cc
+++ b/src/components/config_profile/test/profile_test.cc
@@ -511,28 +511,58 @@ TEST_F(ProfileTest, StringUpperBoundValue) {
profile_.set_config_file_name("smartDeviceLink_invalid_string.ini");
EXPECT_EQ("smartDeviceLink_invalid_string.ini", profile_.config_file_name());
- // Total count of elements in ini file's string will be less 512
+ // Total count of elements in ini file's string will be less 1024
vr_help_title =
"0/0/0/1/"
"2345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~"
- "STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:"
- "yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!"
- "def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,"
- "01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_"
- "GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$"
- "mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890abc!"
- "def@ghi";
+ "STU{}WXY"
+ "[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-"
+ "DEF_GHIJKL+MNO|P"
+ "QR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*"
+ "vwx:yz()ABC-DEF_G"
+ "HIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%"
+ "pqr^stu*vwx:yz()"
+ "ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@"
+ "ghi#jkl$mno%pqr^stu*"
+ "vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890abc!def@ghi0/0/0/"
+ "1/2345678"
+ "'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]"
+ "Z,012345"
+ "67890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+"
+ "MNO|PQR~STU{}WX"
+ "Y[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-"
+ "DEF_GHIJKL+MNO|PQ"
+ "R~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:"
+ "yz()ABC-DEF_GHIJK"
+ "L+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^"
+ "stu*vwx:yz()ABC-";
EXPECT_EQ(vr_help_title, profile_.vr_help_title());
EXPECT_NE(vr_help_title, profile_.recording_file_name());
recording_file_name =
"0/0/0/1/"
"2345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~"
- "STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:"
- "yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!"
- "def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,"
- "01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_"
- "GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$"
- "mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890abc";
+ "STU{}WXY"
+ "[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-"
+ "DEF_GHIJKL+MNO|P"
+ "QR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*"
+ "vwx:yz()ABC-DEF_G"
+ "HIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%"
+ "pqr^stu*vwx:yz()"
+ "ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@"
+ "ghi#jkl$mno%pqr^stu*"
+ "vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890abc!def@ghi0/0/0/"
+ "1/2345678"
+ "'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]"
+ "Z,012345"
+ "67890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+"
+ "MNO|PQR~STU{}WX"
+ "Y[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-"
+ "DEF_GHIJKL+MNO|PQ"
+ "R~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:"
+ "yz()ABC-DEF_GHIJK"
+ "L+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^"
+ "stu*vwx:yz()ABC-"
+ "DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890abc!def@ghi01234";
EXPECT_EQ(recording_file_name, profile_.recording_file_name());
// Update config file
profile_.UpdateValues();
diff --git a/src/components/config_profile/test/smartDeviceLink_invalid_string.ini b/src/components/config_profile/test/smartDeviceLink_invalid_string.ini
index f18b43cb41..430cc31f84 100644
--- a/src/components/config_profile/test/smartDeviceLink_invalid_string.ini
+++ b/src/components/config_profile/test/smartDeviceLink_invalid_string.ini
@@ -82,7 +82,7 @@ AudioStreamFile = audio_stream_file
; Recording file source (used for audio pass thru emulation only)
RecordingFileSource = 00012\\345/678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012\\345/678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012\\345/678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012\\345/678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012\\345/678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a
; Recording file for audio pass thru
-RecordingFileName = 0/0/0/1/2345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890abc!def@ghi
+RecordingFileName = 0/0/0/1/2345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890abc!def@ghi0/0/0/1/2345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890abc!def@ghi01234
; HelpPromt and TimeOutPrompt is a vector of strings separated by comma
[GLOBAL PROPERTIES]
@@ -94,7 +94,7 @@ TTSDelimiter = coma and point
HelpPromt = Please speak one of the following commands,Please say a command
; Default prompt items, separated by comma
TimeOutPromt = Please speak one of the following commands,Please say a command
-HelpTitle = 0/0/0/1/2345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890abc!def@ghi
+HelpTitle = 0/0/0/1/2345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890abc!def@ghi0/0/0/1/2345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-DEF_GHIJKL+MNO|PQR~STU{}WXY[]Z,01234567890a00012345678'90abc!def@ghi#jkl$mno%pqr^stu*vwx:yz()ABC-
; In case mobile app didn't send global properties default global properties will be sent after this timeout
; max value TTSGlobalPropertiesTimeout 64K
TTSGlobalPropertiesTimeout = 20
diff --git a/src/components/connection_handler/include/connection_handler/connection.h b/src/components/connection_handler/include/connection_handler/connection.h
index 7e4ab6a24e..8b286e1309 100644
--- a/src/components/connection_handler/include/connection_handler/connection.h
+++ b/src/components/connection_handler/include/connection_handler/connection.h
@@ -41,6 +41,7 @@
#include "protocol/service_type.h"
#include "protocol_handler/protocol_packet.h"
#include "utils/lock.h"
+#include "utils/semantic_version.h"
#include "utils/threads/thread.h"
#ifdef ENABLE_SECURITY
@@ -98,12 +99,14 @@ typedef std::vector<Service> ServiceList;
struct Session {
ServiceList service_list;
uint8_t protocol_version;
+ utils::SemanticVersion full_protocol_version;
#ifdef ENABLE_SECURITY
security_manager::SSLContext* ssl_context;
#endif // ENABLE_SECURITY
Session()
: service_list()
, protocol_version(::protocol_handler::PROTOCOL_VERSION_2)
+ , full_protocol_version(utils::SemanticVersion(2, 0, 0))
#ifdef ENABLE_SECURITY
, ssl_context(NULL)
#endif // ENABLE_SECURITY
@@ -112,6 +115,7 @@ struct Session {
explicit Session(const ServiceList& services, uint8_t protocol_version)
: service_list(services)
, protocol_version(protocol_version)
+ , full_protocol_version(utils::SemanticVersion(protocol_version, 0, 0))
#ifdef ENABLE_SECURITY
, ssl_context(NULL)
#endif // ENABLE_SECURITY
@@ -173,6 +177,17 @@ class Connection {
uint32_t RemoveSession(uint8_t session_id);
/**
+ * @brief Called upon final message being sent for a session
+ */
+ void OnFinalMessageCallback();
+
+ /**
+ * @brief Check whether final message was sent from this connection
+ * @return true if final message was sent by any session of this connection
+ */
+ bool IsFinalMessageSent() const;
+
+ /**
* @brief Adds uprotected service to session or
* check protection to service has been started before
* @param session_id session ID
@@ -184,7 +199,8 @@ class Connection {
bool AddNewService(uint8_t session_id,
protocol_handler::ServiceType service_type,
const bool is_protected,
- transport_manager::ConnectionUID connection_id);
+ transport_manager::ConnectionUID connection_id,
+ std::string* err_reason = nullptr);
/**
* @brief Removes service from session
* @param session_id session ID
@@ -290,6 +306,15 @@ class Connection {
uint8_t protocol_version);
/**
+ * @brief changes protocol version in session
+ * @param session_id session id
+ * @param full_protocol_version full protocol version of the registered
+ * application
+ */
+ void UpdateProtocolVersionSession(
+ uint8_t session_id, const utils::SemanticVersion& full_protocol_version);
+
+ /**
* @brief checks if session supports heartbeat
* @param session_id session id
* @return TRUE on success, otherwise FALSE
@@ -306,6 +331,17 @@ class Connection {
bool ProtocolVersion(uint8_t session_id, uint8_t& protocol_version);
/**
+ * @brief find protocol version for session
+ * @param session_id id of session which is launched on mobile side
+ * @param full_protocol_version where to write the full protocol version
+ * output
+ * @return TRUE if session exists otherwise
+ * return FALSE
+ */
+ bool ProtocolVersion(uint8_t session_id,
+ utils::SemanticVersion& full_protocol_version);
+
+ /**
* @brief Returns the primary connection handle associated with this
* connection
* @return ConnectionHandle
@@ -353,6 +389,7 @@ class Connection {
HeartBeatMonitor* heartbeat_monitor_;
uint32_t heartbeat_timeout_;
threads::Thread* heart_beat_monitor_thread_;
+ bool final_message_sent_;
DISALLOW_COPY_AND_ASSIGN(Connection);
};
diff --git a/src/components/connection_handler/include/connection_handler/connection_handler_impl.h b/src/components/connection_handler/include/connection_handler/connection_handler_impl.h
index b2b4c5a970..3bfa5b34b8 100644
--- a/src/components/connection_handler/include/connection_handler/connection_handler_impl.h
+++ b/src/components/connection_handler/include/connection_handler/connection_handler_impl.h
@@ -35,6 +35,7 @@
#include <list>
#include <map>
+#include <set>
#include <string>
#include <vector>
@@ -247,13 +248,16 @@ class ConnectionHandlerImpl
* \param hashCode Hash used only in second version of SmartDeviceLink
* protocol. (Set to HASH_ID_WRONG if the hash is incorrect)
* If not equal to hash assigned to session on start then operation fails.
- * \return uint32_t 0 if operation fails, session key otherwise
+ * \param err_reason where to write reason for the End Session failure if the
+ * operation fails \return uint32_t 0 if operation fails, session key
+ * otherwise
*/
uint32_t OnSessionEndedCallback(
const transport_manager::ConnectionUID connection_handle,
const uint8_t session_id,
uint32_t* hashCode,
- const protocol_handler::ServiceType& service_type) OVERRIDE;
+ const protocol_handler::ServiceType& service_type,
+ std::string* err_reason = nullptr) OVERRIDE;
/**
* \brief Callback function used by ProtocolHandler
@@ -269,6 +273,8 @@ class ConnectionHandlerImpl
*/
void OnMalformedMessageCallback(const uint32_t& connection_key) OVERRIDE;
+ void OnFinalMessageCallback(const uint32_t& connection_key) OVERRIDE;
+
/**
* @brief Converts connection handle to transport type string used in
* smartDeviceLink.ini file, e.g. "TCP_WIFI"
@@ -490,6 +496,17 @@ class ConnectionHandlerImpl
uint8_t protocol_version) OVERRIDE;
/**
+ * @brief binds protocol version with session
+ *
+ * @param connection_key pair of connection and session id
+ * @param full_protocol_version contains full protocol version of registered
+ * application.
+ */
+ void BindProtocolVersionWithSession(
+ uint32_t connection_key,
+ const utils::SemanticVersion& full_protocol_version) OVERRIDE;
+
+ /**
* \brief returns TRUE if session supports sending HEART BEAT ACK to mobile
* side
* \param connection_handle Connection identifier whithin which session
@@ -513,6 +530,19 @@ class ConnectionHandlerImpl
uint8_t& protocol_version) const OVERRIDE;
/**
+ * @brief find protocol version which application supports
+ * @param connection_id id of connection
+ * @param session_id id of session
+ * @param full_protocol_version where to write the full protocol version
+ * output
+ * @return TRUE if session and connection exist otherwise returns FALSE
+ */
+ bool ProtocolVersionUsed(
+ uint32_t connection_id,
+ uint8_t session_id,
+ utils::SemanticVersion& full_protocol_version) const OVERRIDE;
+
+ /**
* \brief information about given Connection Key.
* \param key Unique key used by other components as session identifier
* \param app_id Returned: ApplicationID
@@ -579,10 +609,10 @@ class ConnectionHandlerImpl
* \note This is invoked only once but can be invoked by multiple threads.
* Also it can be invoked before OnServiceStartedCallback() returns.
**/
- virtual void NotifyServiceStartedResult(
- uint32_t session_key,
- bool result,
- std::vector<std::string>& rejected_params);
+ void NotifyServiceStartedResult(uint32_t session_key,
+ bool result,
+ std::vector<std::string>& rejected_params,
+ const std::string& reason) OVERRIDE;
/**
* \brief Called when secondary transport with given session ID is established
@@ -619,6 +649,10 @@ class ConnectionHandlerImpl
**/
void RemoveConnection(const ConnectionHandle connection_handle);
+ /**
+ * @brief Called when connection is closed.
+ * @param connection_id Connection unique identifier.
+ */
void OnConnectionEnded(const transport_manager::ConnectionUID connection_id);
const uint8_t GetSessionIdFromSecondaryTransport(
diff --git a/src/components/connection_handler/src/connection.cc b/src/components/connection_handler/src/connection.cc
index 304be9ddb0..5bd72773c2 100644
--- a/src/components/connection_handler/src/connection.cc
+++ b/src/components/connection_handler/src/connection.cc
@@ -52,7 +52,7 @@
*/
namespace connection_handler {
-CREATE_LOGGERPTR_GLOBAL(logger_, "ConnectionHandler")
+SDL_CREATE_LOG_VARIABLE("ConnectionHandler")
Service* Session::FindService(
const protocol_handler::ServiceType& service_type) {
@@ -82,19 +82,20 @@ Connection::Connection(ConnectionHandle connection_handle,
, connection_handle_(connection_handle)
, connection_device_handle_(connection_device_handle)
, primary_connection_handle_(0)
- , heartbeat_timeout_(heartbeat_timeout) {
- LOG4CXX_AUTO_TRACE(logger_);
+ , heartbeat_timeout_(heartbeat_timeout)
+ , final_message_sent_(false) {
+ SDL_LOG_AUTO_TRACE();
DCHECK(connection_handler_);
heartbeat_monitor_ = new HeartBeatMonitor(heartbeat_timeout_, this);
heart_beat_monitor_thread_ =
threads::CreateThread("HeartBeatMonitor", heartbeat_monitor_);
- heart_beat_monitor_thread_->start();
+ heart_beat_monitor_thread_->Start();
}
Connection::~Connection() {
- LOG4CXX_AUTO_TRACE(logger_);
- heart_beat_monitor_thread_->join();
+ SDL_LOG_AUTO_TRACE();
+ heart_beat_monitor_thread_->Stop(threads::Thread::kThreadSoftStop);
delete heartbeat_monitor_;
threads::DeleteThread(heart_beat_monitor_thread_);
@@ -106,13 +107,11 @@ Connection::~Connection() {
sync_primitives::AutoLock lock(session_map_lock_);
SessionMap::iterator session_it = session_map_.begin();
while (session_it != session_map_.end()) {
- LOG4CXX_INFO(
- logger_,
- "Removed Session ID "
- << static_cast<int>(session_it->first)
- << " from Session/Connection Map in Connection Destructor");
+ SDL_LOG_INFO("Removed Session ID "
+ << static_cast<int>(session_it->first)
+ << " from Session/Connection Map in Connection Destructor");
connection_handler_->RemoveSession(session_it->first);
- session_it++;
+ ++session_it;
}
session_map_.clear();
@@ -120,7 +119,7 @@ Connection::~Connection() {
uint32_t Connection::AddNewSession(
const transport_manager::ConnectionUID connection_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// NESTED LOCK: make sure to lock session_map_lock_ then ConnectionHandler's
// session_connection_map_lock_ptr_ (which will be taken in AddSession)
@@ -144,7 +143,7 @@ uint32_t Connection::AddNewSession(
}
uint32_t Connection::RemoveSession(uint8_t session_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Again, a NESTED lock, but it follows the rules.
sync_primitives::AutoLock lock(session_map_lock_);
@@ -155,7 +154,7 @@ uint32_t Connection::RemoveSession(uint8_t session_id) {
SessionMap::iterator it = session_map_.find(session_id);
if (session_map_.end() == it) {
- LOG4CXX_WARN(logger_, "Session not found in this connection!");
+ SDL_LOG_WARN("Session not found in this connection!");
return 0;
}
heartbeat_monitor_->RemoveSession(session_id);
@@ -164,19 +163,31 @@ uint32_t Connection::RemoveSession(uint8_t session_id) {
return session_id;
}
+void Connection::OnFinalMessageCallback() {
+ SDL_LOG_AUTO_TRACE();
+ final_message_sent_ = true;
+}
+
+bool Connection::IsFinalMessageSent() const {
+ return final_message_sent_;
+}
+
bool Connection::AddNewService(uint8_t session_id,
protocol_handler::ServiceType service_type,
const bool request_protection,
- transport_manager::ConnectionUID connection_id) {
+ transport_manager::ConnectionUID connection_id,
+ std::string* err_reason) {
// Ignore wrong services
if (protocol_handler::kControl == service_type ||
protocol_handler::kInvalidServiceType == service_type) {
- LOG4CXX_WARN(logger_, "Wrong service " << static_cast<int>(service_type));
+ SDL_LOG_WARN("Wrong service " << static_cast<int>(service_type));
+ if (err_reason) {
+ *err_reason = "Wrong service type " + std::to_string(service_type);
+ }
return false;
}
- LOG4CXX_DEBUG(logger_,
- "Add service " << service_type << " for session "
+ SDL_LOG_DEBUG("Add service " << service_type << " for session "
<< static_cast<uint32_t>(session_id)
<< " using connection ID "
<< static_cast<uint32_t>(connection_id));
@@ -184,7 +195,12 @@ bool Connection::AddNewService(uint8_t session_id,
SessionMap::iterator session_it = session_map_.find(session_id);
if (session_it == session_map_.end()) {
- LOG4CXX_WARN(logger_, "Session not found in this connection!");
+ SDL_LOG_WARN("Session not found in this connection!");
+ if (err_reason) {
+ *err_reason = "Session " + std::to_string(session_id) +
+ " not found for connection " +
+ std::to_string(connection_id);
+ }
return false;
}
Session& session = session_it->second;
@@ -195,9 +211,9 @@ bool Connection::AddNewService(uint8_t session_id,
service_type,
protocol_handler::ServiceType::kAudio,
protocol_handler::ServiceType::kMobileNav)) {
- LOG4CXX_WARN(logger_,
- "Audio and video services are disallowed for protocol version "
- "2 or lower");
+ SDL_LOG_WARN(
+ "Audio and video services are disallowed for protocol version "
+ "2 or lower");
return false;
}
@@ -206,17 +222,25 @@ bool Connection::AddNewService(uint8_t session_id,
if (service) {
#ifdef ENABLE_SECURITY
if (!request_protection) {
- LOG4CXX_WARN(logger_,
- "Session " << static_cast<int>(session_id)
+ SDL_LOG_WARN("Session " << static_cast<int>(session_id)
<< " already has unprotected service "
<< static_cast<int>(service_type));
+ if (err_reason) {
+ *err_reason = "Session " + std::to_string(session_id) +
+ " already has an unprotected service of type " +
+ std::to_string(service_type);
+ }
return false;
}
if (service->is_protected_) {
- LOG4CXX_WARN(logger_,
- "Session " << static_cast<int>(session_id)
+ SDL_LOG_WARN("Session " << static_cast<int>(session_id)
<< " already has protected service "
<< static_cast<int>(service_type));
+ if (err_reason) {
+ *err_reason = "Session " + std::to_string(session_id) +
+ " already has a protected service of type " +
+ std::to_string(service_type);
+ }
return false;
}
// For unproteced service could be start protection
@@ -247,15 +271,14 @@ bool Connection::RemoveService(uint8_t session_id,
protocol_handler::ServiceType service_type) {
// Ignore wrong and required for Session services
if (is_incorrect_for_remove_service(service_type)) {
- LOG4CXX_WARN(logger_,
- "Could not remove service " << static_cast<int>(service_type));
+ SDL_LOG_WARN("Could not remove service " << static_cast<int>(service_type));
return false;
}
sync_primitives::AutoLock lock(session_map_lock_);
SessionMap::iterator session_it = session_map_.find(session_id);
if (session_map_.end() == session_it) {
- LOG4CXX_WARN(logger_, "Session not found in this connection!");
+ SDL_LOG_WARN("Session not found in this connection!");
return false;
}
@@ -263,8 +286,7 @@ bool Connection::RemoveService(uint8_t session_id,
ServiceList::iterator service_it =
find(service_list.begin(), service_list.end(), service_type);
if (service_list.end() == service_it) {
- LOG4CXX_WARN(logger_,
- "Session " << session_id
+ SDL_LOG_WARN("Session " << session_id
<< " didn't established"
" service "
<< service_type);
@@ -277,14 +299,13 @@ bool Connection::RemoveService(uint8_t session_id,
uint8_t Connection::RemoveSecondaryServices(
transport_manager::ConnectionUID secondary_connection_handle,
std::list<protocol_handler::ServiceType>& removed_services_list) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint8_t found_session_id = 0;
sync_primitives::AutoLock lock(session_map_lock_);
- LOG4CXX_INFO(logger_,
- "RemoveSecondaryServices looking for services on Connection ID "
- << static_cast<int>(secondary_connection_handle));
+ SDL_LOG_INFO("RemoveSecondaryServices looking for services on Connection ID "
+ << static_cast<int>(secondary_connection_handle));
// Walk the SessionMap in the primary connection, and for each
// Session, we walk its ServiceList, looking for all the services
@@ -292,9 +313,8 @@ uint8_t Connection::RemoveSecondaryServices(
for (SessionMap::iterator session_it = session_map_.begin();
session_map_.end() != session_it;
++session_it) {
- LOG4CXX_INFO(logger_,
- "RemoveSecondaryServices found session ID "
- << static_cast<int>(session_it->first));
+ SDL_LOG_INFO("RemoveSecondaryServices found session ID "
+ << static_cast<int>(session_it->first));
// Now, for each session, walk the its ServiceList, looking for services
// that were using secondary)_connection_handle. If we find such a service,
@@ -302,22 +322,19 @@ uint8_t Connection::RemoveSecondaryServices(
ServiceList& service_list = session_it->second.service_list;
ServiceList::iterator service_it = service_list.begin();
for (; service_it != service_list.end();) {
- LOG4CXX_INFO(logger_,
- "RemoveSecondaryServices found service ID "
- << static_cast<int>(service_it->service_type));
+ SDL_LOG_INFO("RemoveSecondaryServices found service ID "
+ << static_cast<int>(service_it->service_type));
if (service_it->connection_id == secondary_connection_handle) {
found_session_id = session_it->first;
- LOG4CXX_INFO(logger_,
- "RemoveSecondaryServices removing Service "
- << static_cast<int>(service_it->service_type)
- << " in session "
- << static_cast<int>(found_session_id));
+ SDL_LOG_INFO("RemoveSecondaryServices removing Service "
+ << static_cast<int>(service_it->service_type)
+ << " in session " << static_cast<int>(found_session_id));
removed_services_list.push_back(service_it->service_type);
service_it = service_list.erase(service_it);
} else {
- service_it++;
+ ++service_it;
}
}
@@ -337,7 +354,7 @@ int Connection::SetSSLContext(uint8_t session_id,
sync_primitives::AutoLock lock(session_map_lock_);
SessionMap::iterator session_it = session_map_.find(session_id);
if (session_it == session_map_.end()) {
- LOG4CXX_WARN(logger_, "Session not found in this connection!");
+ SDL_LOG_WARN("Session not found in this connection!");
return security_manager::SecurityManager::ERROR_INTERNAL;
}
Session& session = session_it->second;
@@ -348,11 +365,11 @@ int Connection::SetSSLContext(uint8_t session_id,
security_manager::SSLContext* Connection::GetSSLContext(
const uint8_t session_id,
const protocol_handler::ServiceType& service_type) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(session_map_lock_);
SessionMap::const_iterator session_it = session_map_.find(session_id);
if (session_it == session_map_.end()) {
- LOG4CXX_WARN(logger_, "Session not found in this connection!");
+ SDL_LOG_WARN("Session not found in this connection!");
return NULL;
}
const Session& session = session_it->second;
@@ -361,29 +378,29 @@ security_manager::SSLContext* Connection::GetSSLContext(
return session.ssl_context;
const Service* service = session.FindService(service_type);
if (!service) {
- LOG4CXX_WARN(logger_, "Service not found in this session!");
+ SDL_LOG_WARN("Service not found in this session!");
return NULL;
}
if (!service->is_protected_)
return NULL;
- LOG4CXX_TRACE(logger_, "SSLContext is " << session.ssl_context);
+ SDL_LOG_TRACE("SSLContext is " << session.ssl_context);
return session.ssl_context;
}
void Connection::SetProtectionFlag(
const uint8_t session_id,
const protocol_handler::ServiceType& service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(session_map_lock_);
SessionMap::iterator session_it = session_map_.find(session_id);
if (session_it == session_map_.end()) {
- LOG4CXX_WARN(logger_, "Session not found in this connection!");
+ SDL_LOG_WARN("Session not found in this connection!");
return;
}
Session& session = session_it->second;
Service* service = session.FindService(service_type);
if (!service) {
- LOG4CXX_WARN(logger_, "Service not found in this session!");
+ SDL_LOG_WARN("Service not found in this session!");
return;
}
service->is_protected_ = true;
@@ -404,12 +421,12 @@ void Connection::SetProtectionFlag(
bool Connection::SessionServiceExists(
const uint8_t session_id,
const protocol_handler::ServiceType& service_type) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(session_map_lock_);
SessionMap::const_iterator session_it = session_map_.find(session_id);
if (session_it == session_map_.end()) {
- LOG4CXX_WARN(logger_, "Session not found in this connection!");
+ SDL_LOG_WARN("Session not found in this connection!");
return false;
}
@@ -449,19 +466,46 @@ void Connection::UpdateProtocolVersionSession(uint8_t session_id,
sync_primitives::AutoLock lock(session_map_lock_);
SessionMap::iterator session_it = session_map_.find(session_id);
if (session_map_.end() == session_it) {
- LOG4CXX_WARN(logger_, "Session not found in this connection!");
+ SDL_LOG_WARN("Session not found in this connection!");
return;
}
Session& session = session_it->second;
session.protocol_version = protocol_version;
+ if (session.full_protocol_version.major_version_ !=
+ session.protocol_version) {
+ session.full_protocol_version =
+ utils::SemanticVersion(protocol_version, 0, 0);
+ }
+}
+
+void Connection::UpdateProtocolVersionSession(
+ uint8_t session_id, const utils::SemanticVersion& full_protocol_version) {
+ SDL_LOG_AUTO_TRACE();
+
+ if (!full_protocol_version.isValid()) {
+ SDL_LOG_WARN("Invalid version: " << full_protocol_version.toString());
+ return;
+ }
+
+ sync_primitives::AutoLock lock(session_map_lock_);
+ SessionMap::iterator session_it = session_map_.find(session_id);
+ if (session_map_.end() == session_it) {
+ SDL_LOG_WARN("Session not found in this connection!");
+ return;
+ }
+
+ Session& session = session_it->second;
+ session.protocol_version =
+ static_cast<uint8_t>(full_protocol_version.major_version_);
+ session.full_protocol_version = full_protocol_version;
}
bool Connection::SupportHeartBeat(uint8_t session_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(session_map_lock_);
SessionMap::iterator session_it = session_map_.find(session_id);
if (session_map_.end() == session_it) {
- LOG4CXX_WARN(logger_, "Session not found in this connection!");
+ SDL_LOG_WARN("Session not found in this connection!");
return false;
}
Session& session = session_it->second;
@@ -472,17 +516,30 @@ bool Connection::SupportHeartBeat(uint8_t session_id) {
bool Connection::ProtocolVersion(uint8_t session_id,
uint8_t& protocol_version) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(session_map_lock_);
SessionMap::iterator session_it = session_map_.find(session_id);
if (session_map_.end() == session_it) {
- LOG4CXX_WARN(logger_, "Session not found in this connection!");
+ SDL_LOG_WARN("Session not found in this connection!");
return false;
}
protocol_version = (session_it->second).protocol_version;
return true;
}
+bool Connection::ProtocolVersion(
+ uint8_t session_id, utils::SemanticVersion& full_protocol_version) {
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(session_map_lock_);
+ SessionMap::iterator session_it = session_map_.find(session_id);
+ if (session_map_.end() == session_it) {
+ SDL_LOG_WARN("Session not found in this connection!");
+ return false;
+ }
+ full_protocol_version = (session_it->second).full_protocol_version;
+ return true;
+}
+
ConnectionHandle Connection::primary_connection_handle() const {
return primary_connection_handle_;
}
diff --git a/src/components/connection_handler/src/connection_handler_impl.cc b/src/components/connection_handler/src/connection_handler_impl.cc
index 1ad938332a..549450dbe0 100644
--- a/src/components/connection_handler/src/connection_handler_impl.cc
+++ b/src/components/connection_handler/src/connection_handler_impl.cc
@@ -50,7 +50,7 @@
*/
namespace connection_handler {
-CREATE_LOGGERPTR_GLOBAL(logger_, "ConnectionHandler")
+SDL_CREATE_LOG_VARIABLE("ConnectionHandler")
ConnectionHandle HandleFromConnectionUID(transport_manager::ConnectionUID uid) {
return ConnectionHandle(uid);
@@ -78,11 +78,11 @@ ConnectionHandlerImpl::ConnectionHandlerImpl(
, ending_connection_(NULL) {}
ConnectionHandlerImpl::~ConnectionHandlerImpl() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
void ConnectionHandlerImpl::Stop() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ConnectionList::iterator itr = connection_list_.begin();
while (itr != connection_list_.end()) {
RemoveConnection(itr->second->connection_handle());
@@ -95,30 +95,28 @@ void ConnectionHandlerImpl::Stop() {
void ConnectionHandlerImpl::set_connection_handler_observer(
ConnectionHandlerObserver* observer) {
- LOG4CXX_DEBUG(
- logger_,
- "ConnectionHandlerImpl::set_connection_handler_observer() " << observer);
+ SDL_LOG_DEBUG("ConnectionHandlerImpl::set_connection_handler_observer() "
+ << observer);
sync_primitives::AutoWriteLock write_lock(connection_handler_observer_lock_);
if (!observer) {
- LOG4CXX_WARN(logger_, "Set Null pointer to observer.");
+ SDL_LOG_WARN("Set Null pointer to observer.");
}
connection_handler_observer_ = observer;
}
void ConnectionHandlerImpl::set_protocol_handler(
protocol_handler::ProtocolHandler* protocol_handler) {
- LOG4CXX_DEBUG(
- logger_,
- "ConnectionHandlerImpl::set_protocol_handler()" << protocol_handler);
+ SDL_LOG_DEBUG("ConnectionHandlerImpl::set_protocol_handler() "
+ << protocol_handler);
if (!protocol_handler) {
- LOG4CXX_WARN(logger_, "Set Null pointer to protocol handler.");
+ SDL_LOG_WARN("Set Null pointer to protocol handler.");
}
protocol_handler_ = protocol_handler;
}
void ConnectionHandlerImpl::OnDeviceListUpdated(
const std::vector<transport_manager::DeviceInfo>&) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoReadLock read_lock(connection_handler_observer_lock_);
sync_primitives::AutoReadLock lock(device_list_lock_);
if (connection_handler_observer_) {
@@ -135,16 +133,15 @@ void ConnectionHandlerImpl::OnFindNewApplicationsRequest() {
void ConnectionHandlerImpl::OnDeviceFound(
const transport_manager::DeviceInfo&) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
void ConnectionHandlerImpl::OnDeviceAdded(
const transport_manager::DeviceInfo& device_info) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto handle = device_info.device_handle();
- LOG4CXX_DEBUG(logger_,
- "OnDeviceAdded!!!: " << handle << " " << device_info.name()
+ SDL_LOG_DEBUG("OnDeviceAdded!!!: " << handle << " " << device_info.name()
<< " " << device_info.mac_address() << " "
<< device_info.connection_type());
@@ -158,8 +155,7 @@ void ConnectionHandlerImpl::OnDeviceAdded(
auto result = device_list_.insert(std::make_pair(handle, device));
if (!result.second) {
- LOG4CXX_ERROR(logger_,
- "Device with handle " << handle
+ SDL_LOG_ERROR("Device with handle " << handle
<< " is known already. "
"Information won't be updated.");
return;
@@ -173,7 +169,7 @@ void ConnectionHandlerImpl::OnDeviceAdded(
void ConnectionHandlerImpl::OnDeviceRemoved(
const transport_manager::DeviceInfo& device_info) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Device has been removed. Perform all needed actions.
// 1. Delete all the connections and sessions of this device
// 2. Delete device from a list
@@ -219,7 +215,7 @@ namespace {
struct DeviceFinder {
explicit DeviceFinder(const std::string& device_uid)
: device_uid_(device_uid) {}
- bool operator()(const DeviceMap::value_type& device) {
+ bool operator()(const DeviceMap::value_type& device) const {
return device_uid_ == device.second.mac_address();
}
@@ -252,12 +248,12 @@ void ConnectionHandlerImpl::OnDeviceSwitchingStart(
}
void ConnectionHandlerImpl::OnScanDevicesFinished() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
void ConnectionHandlerImpl::OnScanDevicesFailed(
const transport_manager::SearchDeviceError& error) {
- LOG4CXX_WARN(logger_, "Scan devices failed. " << error.text());
+ SDL_LOG_WARN("Scan devices failed. " << error.text());
}
void ConnectionHandlerImpl::OnConnectionStatusUpdated() {
@@ -267,9 +263,8 @@ void ConnectionHandlerImpl::OnConnectionStatusUpdated() {
void ConnectionHandlerImpl::OnConnectionPending(
const transport_manager::DeviceInfo& device_info,
const transport_manager::ConnectionUID connection_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "OnConnectionPending!!!: " << device_info.device_handle() << " "
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("OnConnectionPending!!!: " << device_info.device_handle() << " "
<< device_info.name() << " "
<< device_info.mac_address() << " "
<< device_info.connection_type());
@@ -278,12 +273,11 @@ void ConnectionHandlerImpl::OnConnectionPending(
auto it = device_list_.find(device_info.device_handle());
if (device_list_.end() == it) {
- LOG4CXX_ERROR(logger_, "Unknown device!");
+ SDL_LOG_ERROR("Unknown device!");
return;
}
}
- LOG4CXX_DEBUG(logger_,
- "Add Pending Connection #" << connection_id << " to the list.");
+ SDL_LOG_DEBUG("Add Pending Connection #" << connection_id << " to the list.");
std::string endpoint = device_info.mac_address();
cloud_app_id_map_lock_.Acquire();
@@ -321,23 +315,21 @@ void ConnectionHandlerImpl::OnConnectionPending(
void ConnectionHandlerImpl::OnConnectionEstablished(
const transport_manager::DeviceInfo& device_info,
const transport_manager::ConnectionUID connection_id) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "OnConnectionEstablished!!!: "
- << device_info.device_handle() << " " << device_info.name()
- << " " << device_info.mac_address() << " "
- << device_info.connection_type());
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("OnConnectionEstablished!!!: "
+ << device_info.device_handle() << " " << device_info.name()
+ << " " << device_info.mac_address() << " "
+ << device_info.connection_type());
{
sync_primitives::AutoReadLock lock(device_list_lock_);
auto it = device_list_.find(device_info.device_handle());
if (device_list_.end() == it) {
- LOG4CXX_ERROR(logger_, "Unknown device!");
+ SDL_LOG_ERROR("Unknown device!");
return;
}
}
- LOG4CXX_DEBUG(logger_,
- "Add Connection #" << connection_id << " to the list.");
+ SDL_LOG_DEBUG("Add Connection #" << connection_id << " to the list.");
sync_primitives::AutoWriteLock lock(connection_list_lock_);
if (connection_list_.find(connection_id) == connection_list_.end()) {
connection_list_.insert(ConnectionList::value_type(
@@ -353,12 +345,12 @@ void ConnectionHandlerImpl::OnConnectionFailed(
const transport_manager::DeviceInfo& device_info,
const transport_manager::ConnectError& error) {
// TODO(PV): implement
- LOG4CXX_ERROR(logger_, "Failed connecting.");
+ SDL_LOG_ERROR("Failed connecting.");
}
void ConnectionHandlerImpl::OnConnectionClosed(
transport_manager::ConnectionUID connection_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
OnConnectionEnded(connection_id);
}
@@ -367,14 +359,14 @@ void ConnectionHandlerImpl::OnConnectionClosedFailure(
transport_manager::ConnectionUID connection_id,
const transport_manager::DisconnectError& error) {
// TODO(PV): implement
- LOG4CXX_ERROR(logger_, "ConnectionHandlerImpl::OnConnectionClosedFailure");
+ SDL_LOG_ERROR("ConnectionHandlerImpl::OnConnectionClosedFailure");
}
void ConnectionHandlerImpl::OnUnexpectedDisconnect(
transport_manager::ConnectionUID connection_id,
const transport_manager::CommunicationError& error) {
- LOG4CXX_AUTO_TRACE(logger_);
-
+ SDL_LOG_AUTO_TRACE();
+ UNUSED(error);
OnConnectionEnded(connection_id);
}
@@ -382,19 +374,19 @@ void ConnectionHandlerImpl::OnDeviceConnectionLost(
const transport_manager::DeviceHandle& device,
const transport_manager::DisconnectDeviceError& error) {
// TODO(PV): implement
- LOG4CXX_ERROR(logger_, "Lost connection with device " << device);
+ SDL_LOG_ERROR("Lost connection with device " << device);
}
void ConnectionHandlerImpl::OnDisconnectFailed(
const transport_manager::DeviceHandle& device,
const transport_manager::DisconnectDeviceError& error) {
// TODO(PV): implement
- LOG4CXX_ERROR(logger_, "Trying to Disconnect device failed.");
+ SDL_LOG_ERROR("Trying to Disconnect device failed.");
}
void ConnectionHandlerImpl::RemoveConnection(
const ConnectionHandle connection_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
OnConnectionEnded(connection_handle);
}
@@ -403,7 +395,7 @@ void ConnectionHandlerImpl::RemoveConnection(
bool AllowProtection(const ConnectionHandlerSettings& settings,
const protocol_handler::ServiceType& service_type,
const bool is_protected) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::vector<int>& force_unprotected_list =
is_protected ? settings.force_unprotected_service()
: settings.force_protected_service();
@@ -411,13 +403,11 @@ bool AllowProtection(const ConnectionHandlerSettings& settings,
if (std::find(force_unprotected_list.begin(),
force_unprotected_list.end(),
service_type) != force_unprotected_list.end()) {
- LOG4CXX_ERROR(
- logger_,
- "Service " << static_cast<int>(service_type) << " shall be protected");
+ SDL_LOG_ERROR("Service " << static_cast<int>(service_type)
+ << " shall be protected");
return false;
}
- LOG4CXX_DEBUG(logger_,
- "Service " << static_cast<int>(service_type) << " allowed");
+ SDL_LOG_DEBUG("Service " << static_cast<int>(service_type) << " allowed");
return true;
}
#endif // ENABLE_SECURITY
@@ -428,7 +418,7 @@ void ConnectionHandlerImpl::OnSessionStartedCallback(
const protocol_handler::ServiceType& service_type,
const bool is_protected,
const BsonObject* params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<std::string> rejected_params;
@@ -442,17 +432,16 @@ void ConnectionHandlerImpl::OnSessionStartedCallback(
SessionTransports st = GetSessionTransports(session_id);
if (session_id != 0) {
if (st.primary_transport == 0) {
- LOG4CXX_WARN(logger_,
- "OnSessionStartedCallback could not find Session in the "
- "Session/Connection Map!");
+ SDL_LOG_WARN(
+ "OnSessionStartedCallback could not find Session in the "
+ "Session/Connection Map!");
} else {
- LOG4CXX_INFO(logger_,
- "OnSessionStartedCallback found session "
- << static_cast<int>(session_id)
- << " with primary connection "
- << static_cast<int>(st.primary_transport)
- << " and secondary connection "
- << static_cast<int>(st.secondary_transport));
+ SDL_LOG_INFO("OnSessionStartedCallback found session "
+ << static_cast<int>(session_id)
+ << " with primary connection "
+ << static_cast<int>(st.primary_transport)
+ << " and secondary connection "
+ << static_cast<int>(st.secondary_transport));
primary_connection_handle = st.primary_transport;
}
}
@@ -467,20 +456,37 @@ void ConnectionHandlerImpl::OnSessionStartedCallback(
#ifdef ENABLE_SECURITY
if (!AllowProtection(get_settings(), service_type, is_protected)) {
- protocol_handler_->NotifySessionStarted(context, rejected_params);
+ protocol_handler_->NotifySessionStarted(
+ context,
+ rejected_params,
+ "Service of type " + std::to_string(service_type) + " cannot be " +
+ (is_protected ? "protected" : "unprotected"));
return;
}
#endif // ENABLE_SECURITY
- sync_primitives::AutoReadLock lock(connection_list_lock_);
- ConnectionList::iterator it =
- connection_list_.find(primary_connection_handle);
- if (connection_list_.end() == it) {
- LOG4CXX_ERROR(logger_, "Unknown connection!");
- protocol_handler_->NotifySessionStarted(context, rejected_params);
+
+ auto find_connection =
+ [this](const transport_manager::ConnectionUID& primary_connection_handle)
+ -> Connection* {
+ sync_primitives::AutoReadLock lock(connection_list_lock_);
+ auto it = connection_list_.find(primary_connection_handle);
+ if (it != connection_list_.end()) {
+ return it->second;
+ }
+ return nullptr;
+ };
+
+ Connection* connection = find_connection(primary_connection_handle);
+
+ if (!connection) {
+ SDL_LOG_ERROR("Unknown connection!");
+ protocol_handler_->NotifySessionStarted(
+ context,
+ rejected_params,
+ "Unknown connection " + std::to_string(primary_connection_handle));
return;
}
- Connection* connection = it->second;
context.is_new_service_ =
!connection->SessionServiceExists(session_id, service_type);
@@ -488,23 +494,34 @@ void ConnectionHandlerImpl::OnSessionStartedCallback(
context.new_session_id_ =
connection->AddNewSession(primary_connection_handle);
if (0 == context.new_session_id_) {
- LOG4CXX_ERROR(logger_, "Couldn't start new session!");
- protocol_handler_->NotifySessionStarted(context, rejected_params);
+ SDL_LOG_ERROR("Couldn't start new session!");
+ protocol_handler_->NotifySessionStarted(
+ context, rejected_params, "Unable to create new session");
return;
}
context.hash_id_ =
KeyFromPair(primary_connection_handle, context.new_session_id_);
} else { // Could be create new service or protected exists one
- if (!connection->AddNewService(
- session_id, service_type, is_protected, connection_handle)) {
- LOG4CXX_ERROR(logger_,
- "Couldn't establish "
+ std::string err_reason;
+ if (!connection->AddNewService(session_id,
+ service_type,
+ is_protected,
+ connection_handle,
+ &err_reason)) {
+ SDL_LOG_ERROR("Couldn't establish "
#ifdef ENABLE_SECURITY
- << (is_protected ? "protected" : "non-protected")
+ << (is_protected ? "protected" : "non-protected")
#endif // ENABLE_SECURITY
- << " service " << static_cast<int>(service_type)
- << " for session " << static_cast<int>(session_id));
- protocol_handler_->NotifySessionStarted(context, rejected_params);
+ << " service " << static_cast<int>(service_type)
+ << " for session " << static_cast<int>(session_id));
+
+ protocol_handler_->NotifySessionStarted(
+ context,
+ rejected_params,
+ "Cannot start " +
+ std::string(is_protected ? "a protected" : "an unprotected") +
+ " service of type " + std::to_string(service_type) + ". " +
+ err_reason);
return;
}
context.new_session_id_ = session_id;
@@ -540,15 +557,16 @@ void ConnectionHandlerImpl::OnSessionStartedCallback(
void ConnectionHandlerImpl::NotifyServiceStartedResult(
uint32_t session_key,
bool result,
- std::vector<std::string>& rejected_params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ std::vector<std::string>& rejected_params,
+ const std::string& reason) {
+ SDL_LOG_AUTO_TRACE();
protocol_handler::SessionContext context;
{
sync_primitives::AutoLock auto_lock(start_service_context_map_lock_);
auto it = start_service_context_map_.find(session_key);
if (it == start_service_context_map_.end()) {
- LOG4CXX_ERROR(logger_, "context for start service not found!");
+ SDL_LOG_ERROR("context for start service not found!");
return;
}
context = it->second;
@@ -563,15 +581,14 @@ void ConnectionHandlerImpl::NotifyServiceStartedResult(
ConnectionList::iterator it =
connection_list_.find(context.primary_connection_id_);
if (connection_list_.end() == it) {
- LOG4CXX_ERROR(logger_, "connection not found");
+ SDL_LOG_ERROR("connection not found");
return;
}
connection = it->second;
}
if (!result) {
- LOG4CXX_WARN(logger_,
- "Service starting forbidden by connection_handler_observer");
+ SDL_LOG_WARN("Service starting forbidden by connection_handler_observer");
if (protocol_handler::kRpc == context.service_type_) {
connection->RemoveSession(context.new_session_id_);
} else {
@@ -582,13 +599,13 @@ void ConnectionHandlerImpl::NotifyServiceStartedResult(
}
if (protocol_handler_ != NULL) {
- protocol_handler_->NotifySessionStarted(context, rejected_params);
+ protocol_handler_->NotifySessionStarted(context, rejected_params, reason);
}
}
void ConnectionHandlerImpl::OnApplicationFloodCallBack(
const uint32_t& connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
transport_manager::ConnectionUID connection_handle = 0;
uint8_t session_id = 0;
@@ -601,22 +618,21 @@ void ConnectionHandlerImpl::OnApplicationFloodCallBack(
if (session_id != 0) {
SessionTransports st = GetSessionTransports(session_id);
if (st.primary_transport == 0) {
- LOG4CXX_WARN(logger_,
- "OnApplicationFloodCallBack could not find Session in the "
- "Session/Connection Map!");
+ SDL_LOG_WARN(
+ "OnApplicationFloodCallBack could not find Session in the "
+ "Session/Connection Map!");
} else {
- LOG4CXX_INFO(logger_,
- "OnApplicationFloodCallBack found session "
- << static_cast<int>(session_id)
- << " with primary connection "
- << static_cast<int>(st.primary_transport)
- << " and secondary connection "
- << static_cast<int>(st.secondary_transport));
+ SDL_LOG_INFO("OnApplicationFloodCallBack found session "
+ << static_cast<int>(session_id)
+ << " with primary connection "
+ << static_cast<int>(st.primary_transport)
+ << " and secondary connection "
+ << static_cast<int>(st.secondary_transport));
connection_handle = st.primary_transport;
}
}
- LOG4CXX_INFO(logger_, "Disconnect flooding application");
+ SDL_LOG_INFO("Disconnect flooding application");
if (session_id != 0) {
CloseSession(connection_handle, session_id, kFlood);
} else {
@@ -627,7 +643,7 @@ void ConnectionHandlerImpl::OnApplicationFloodCallBack(
void ConnectionHandlerImpl::OnMalformedMessageCallback(
const uint32_t& connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
transport_manager::ConnectionUID connection_handle = 0;
uint8_t session_id = 0;
@@ -640,32 +656,51 @@ void ConnectionHandlerImpl::OnMalformedMessageCallback(
if (session_id != 0) {
SessionTransports st = GetSessionTransports(session_id);
if (st.primary_transport == 0) {
- LOG4CXX_WARN(logger_,
- "OnMalformedMessageCallback could not find Session in the "
- "Session/Connection Map!");
+ SDL_LOG_WARN(
+ "OnMalformedMessageCallback could not find Session in the "
+ "Session/Connection Map!");
} else {
- LOG4CXX_INFO(logger_,
- "OnMalformedMessageCallback found session "
- << static_cast<int>(session_id)
- << " with primary connection "
- << static_cast<int>(st.primary_transport)
- << " and secondary connection "
- << static_cast<int>(st.secondary_transport));
+ SDL_LOG_INFO("OnMalformedMessageCallback found session "
+ << static_cast<int>(session_id)
+ << " with primary connection "
+ << static_cast<int>(st.primary_transport)
+ << " and secondary connection "
+ << static_cast<int>(st.secondary_transport));
connection_handle = st.primary_transport;
}
}
- LOG4CXX_INFO(logger_, "Disconnect malformed messaging application");
+ SDL_LOG_INFO("Disconnect malformed messaging application");
CloseConnectionSessions(connection_handle, kMalformed);
CloseConnection(connection_handle);
}
+void ConnectionHandlerImpl::OnFinalMessageCallback(
+ const uint32_t& connection_key) {
+ SDL_LOG_AUTO_TRACE();
+
+ transport_manager::ConnectionUID connection_handle = 0;
+ uint8_t session_id = 0;
+ PairFromKey(connection_key, &connection_handle, &session_id);
+
+ sync_primitives::AutoWriteLock connection_list_lock(connection_list_lock_);
+ ConnectionList::iterator connection_it =
+ connection_list_.find(connection_handle);
+
+ if (connection_list_.end() != connection_it) {
+ SDL_LOG_DEBUG("OnFinalMessageCallback found connection "
+ << connection_handle);
+ connection_it->second->OnFinalMessageCallback();
+ }
+}
+
uint32_t ConnectionHandlerImpl::OnSessionEndedCallback(
const transport_manager::ConnectionUID connection_handle,
const uint8_t session_id,
uint32_t* hashCode,
- const protocol_handler::ServiceType& service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ const protocol_handler::ServiceType& service_type,
+ std::string* err_reason) {
+ SDL_LOG_AUTO_TRACE();
// In case this is a Session running on a Secondary Transport, we need to
// find the Sessions's primary transport. In this case, "connection_handle"
@@ -677,17 +712,19 @@ uint32_t ConnectionHandlerImpl::OnSessionEndedCallback(
if (session_id != 0) {
SessionTransports st = GetSessionTransports(session_id);
if (st.primary_transport == 0) {
- LOG4CXX_WARN(logger_,
- "OnSessionEndedCallback could not find Session in the "
- "Session/Connection Map!");
+ SDL_LOG_WARN(
+ "OnSessionEndedCallback could not find Session in the "
+ "Session/Connection Map!");
+ if (err_reason) {
+ *err_reason = "Could not find Session in the Session/Connection Map!";
+ }
} else {
- LOG4CXX_INFO(logger_,
- "OnSessionEndedCallback found session "
- << static_cast<int>(session_id)
- << " with primary connection "
- << static_cast<int>(st.primary_transport)
- << " and secondary connection "
- << static_cast<int>(st.secondary_transport));
+ SDL_LOG_INFO("OnSessionEndedCallback found session "
+ << static_cast<int>(session_id)
+ << " with primary connection "
+ << static_cast<int>(st.primary_transport)
+ << " and secondary connection "
+ << static_cast<int>(st.secondary_transport));
primary_connection_handle = st.primary_transport;
}
}
@@ -696,8 +733,11 @@ uint32_t ConnectionHandlerImpl::OnSessionEndedCallback(
ConnectionList::iterator it =
connection_list_.find(primary_connection_handle);
if (connection_list_.end() == it) {
- LOG4CXX_WARN(logger_, "Unknown connection!");
+ SDL_LOG_WARN("Unknown connection!");
connection_list_lock_.Release();
+ if (err_reason) {
+ *err_reason = "Could not find Connection in the Connection Map!";
+ }
return 0;
}
std::pair<int32_t, Connection*> connection_item = *it;
@@ -708,34 +748,42 @@ uint32_t ConnectionHandlerImpl::OnSessionEndedCallback(
KeyFromPair(primary_connection_handle, session_id);
if (protocol_handler::kRpc == service_type) {
- LOG4CXX_INFO(
- logger_,
- "Session " << static_cast<uint32_t>(session_id) << " to be removed");
+ SDL_LOG_INFO("Session " << static_cast<uint32_t>(session_id)
+ << " to be removed");
// old version of protocol doesn't support hash
if (protocol_handler::HASH_ID_NOT_SUPPORTED != *hashCode) {
if (protocol_handler::HASH_ID_WRONG == *hashCode ||
session_key != *hashCode) {
- LOG4CXX_WARN(
- logger_,
- "Wrong hash_id for session " << static_cast<uint32_t>(session_id));
+ SDL_LOG_WARN("Wrong hash_id for session "
+ << static_cast<uint32_t>(session_id));
*hashCode = protocol_handler::HASH_ID_WRONG;
+
+ if (err_reason) {
+ *err_reason = "Wrong hash_id for session " +
+ std::to_string(static_cast<uint32_t>(session_id));
+ }
return 0;
}
}
if (!connection->RemoveSession(session_id)) {
- LOG4CXX_WARN(
- logger_,
- "Couldn't remove session " << static_cast<uint32_t>(session_id));
+ SDL_LOG_WARN("Couldn't remove session "
+ << static_cast<uint32_t>(session_id));
+ if (err_reason) {
+ *err_reason = "Couldn't remove session " +
+ std::to_string(static_cast<uint32_t>(session_id));
+ }
return 0;
}
} else {
- LOG4CXX_INFO(
- logger_,
- "Service " << static_cast<uint32_t>(service_type) << " to be removed");
+ SDL_LOG_INFO("Service " << static_cast<uint32_t>(service_type)
+ << " to be removed");
if (!connection->RemoveService(session_id, service_type)) {
- LOG4CXX_WARN(
- logger_,
- "Couldn't remove service " << static_cast<uint32_t>(service_type));
+ SDL_LOG_WARN("Couldn't remove service "
+ << static_cast<uint32_t>(service_type));
+ if (err_reason) {
+ *err_reason = "Couldn't remove service " +
+ std::to_string(static_cast<uint32_t>(service_type));
+ }
return 0;
}
}
@@ -752,10 +800,10 @@ bool ConnectionHandlerImpl::OnSecondaryTransportStarted(
transport_manager::ConnectionUID& primary_connection_handle,
const transport_manager::ConnectionUID secondary_connection_handle,
const uint8_t session_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (session_id == 0) {
- LOG4CXX_WARN(logger_, "Session id for secondary transport is invalid");
+ SDL_LOG_WARN("Session id for secondary transport is invalid");
return false;
}
@@ -766,8 +814,7 @@ bool ConnectionHandlerImpl::OnSecondaryTransportStarted(
ConnectionList::iterator it =
connection_list_.find(secondary_connection_handle);
if (connection_list_.end() == it) {
- LOG4CXX_WARN(logger_,
- "Unknown connection " << secondary_connection_handle);
+ SDL_LOG_WARN("Unknown connection " << secondary_connection_handle);
return false;
}
@@ -780,8 +827,7 @@ bool ConnectionHandlerImpl::OnSecondaryTransportStarted(
SetSecondaryTransportID(session_id, secondary_connection_handle);
primary_connection_handle = st.primary_transport;
if (st.secondary_transport != secondary_connection_handle) {
- LOG4CXX_WARN(logger_,
- "Failed setting the session's secondary transport ID");
+ SDL_LOG_WARN("Failed setting the session's secondary transport ID");
return false;
}
@@ -792,9 +838,9 @@ bool ConnectionHandlerImpl::OnSecondaryTransportStarted(
sync_primitives::AutoReadLock read_lock(connection_handler_observer_lock_);
if (connection_handler_observer_) {
- LOG4CXX_TRACE(logger_,
- "Calling Connection Handler Observer's "
- "OnSecondaryTransportStartedCallback");
+ SDL_LOG_TRACE(
+ "Calling Connection Handler Observer's "
+ "OnSecondaryTransportStartedCallback");
connection_handler_observer_->OnSecondaryTransportStartedCallback(
device_handle, session_key);
}
@@ -805,18 +851,17 @@ bool ConnectionHandlerImpl::OnSecondaryTransportStarted(
void ConnectionHandlerImpl::OnSecondaryTransportEnded(
const transport_manager::ConnectionUID primary_connection_handle,
const transport_manager::ConnectionUID secondary_connection_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- LOG4CXX_INFO(logger_,
- "Secondary Transport: "
- << static_cast<int32_t>(secondary_connection_handle)
- << " ended. Cleaning up services from primary connection ID "
- << static_cast<int32_t>(primary_connection_handle));
+ SDL_LOG_INFO("Secondary Transport: "
+ << static_cast<int32_t>(secondary_connection_handle)
+ << " ended. Cleaning up services from primary connection ID "
+ << static_cast<int32_t>(primary_connection_handle));
connection_list_lock_.AcquireForReading();
ConnectionList::iterator itr =
connection_list_.find(primary_connection_handle);
if (connection_list_.end() == itr) {
- LOG4CXX_ERROR(logger_, "Primary Connection not found!");
+ SDL_LOG_ERROR("Primary Connection not found!");
connection_list_lock_.Release();
return;
}
@@ -877,12 +922,12 @@ void ConnectionHandlerImpl::CreateWebEngineDevice() {
const std::string
ConnectionHandlerImpl::TransportTypeProfileStringFromConnHandle(
transport_manager::ConnectionUID connection_handle) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoReadLock lock(connection_list_lock_);
ConnectionList::const_iterator it = connection_list_.find(connection_handle);
if (connection_list_.end() == it) {
- LOG4CXX_WARN(logger_, "Unknown connection " << connection_handle);
+ SDL_LOG_WARN("Unknown connection " << connection_handle);
return std::string();
} else {
DeviceHandle device_handle = it->second->connection_device_handle();
@@ -898,7 +943,7 @@ ConnectionHandlerImpl::TransportTypeProfileStringFromDeviceHandle(
sync_primitives::AutoReadLock lock(device_list_lock_);
auto it = device_list_.find(device_handle);
if (device_list_.end() == it) {
- LOG4CXX_ERROR(logger_, "Device not found!");
+ SDL_LOG_ERROR("Device not found!");
} else {
connection_type = it->second.connection_type();
}
@@ -924,12 +969,14 @@ ConnectionHandlerImpl::TransportTypeProfileStringFromDeviceHandle(
return std::string("IAP_CARPLAY");
} else if (connection_type == "CLOUD_WEBSOCKET") {
return std::string("WEBSOCKET");
+ } else if (connection_type == "WEBENGINE_WEBSOCKET") {
+ return std::string("WEBENGINE");
#ifdef BUILD_TESTS
} else if (connection_type == "BTMAC") {
return std::string("BTMAC");
#endif
} else {
- LOG4CXX_WARN(logger_, "Unknown transport type string: " << connection_type);
+ SDL_LOG_WARN("Unknown transport type string: " << connection_type);
return std::string();
}
}
@@ -938,15 +985,14 @@ uint32_t ConnectionHandlerImpl::KeyFromPair(
transport_manager::ConnectionUID connection_handle,
uint8_t session_id) const {
const uint32_t key = connection_handle | (session_id << 16);
- LOG4CXX_DEBUG(logger_,
- "Key for ConnectionHandle:"
- << static_cast<uint32_t>(connection_handle)
- << " Session:" << static_cast<uint32_t>(session_id)
- << " is: 0x" << std::hex << static_cast<uint32_t>(key));
+ SDL_LOG_DEBUG("Key for ConnectionHandle:"
+ << static_cast<uint32_t>(connection_handle)
+ << " Session:" << static_cast<uint32_t>(session_id) << " is: 0x"
+ << std::hex << static_cast<uint32_t>(key));
if (protocol_handler::HASH_ID_WRONG == key) {
- LOG4CXX_ERROR(logger_,
- "Connection key is WRONG_HASH_ID "
- "(session id shall be greater 0)");
+ SDL_LOG_ERROR(
+ "Connection key is WRONG_HASH_ID "
+ "(session id shall be greater 0)");
}
return key;
}
@@ -957,11 +1003,10 @@ void ConnectionHandlerImpl::PairFromKey(
uint8_t* session_id) const {
*connection_handle = key & 0xFF00FFFF;
*session_id = key >> 16;
- LOG4CXX_DEBUG(
- logger_,
- "ConnectionHandle:" << static_cast<int32_t>(*connection_handle)
- << " Session:" << static_cast<int32_t>(*session_id)
- << " for key:" << static_cast<int32_t>(key));
+ SDL_LOG_DEBUG("ConnectionHandle: "
+ << static_cast<int32_t>(*connection_handle)
+ << " Session: " << static_cast<int32_t>(*session_id)
+ << " for key: " << static_cast<int32_t>(key));
}
int32_t ConnectionHandlerImpl::GetDataOnSessionKey(
@@ -969,7 +1014,7 @@ int32_t ConnectionHandlerImpl::GetDataOnSessionKey(
uint32_t* app_id,
std::list<int32_t>* sessions_list,
connection_handler::DeviceHandle* device_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const int32_t error_result = -1;
transport_manager::ConnectionUID conn_handle = 0;
@@ -978,16 +1023,15 @@ int32_t ConnectionHandlerImpl::GetDataOnSessionKey(
ConnectionList::const_iterator it = connection_list_.find(conn_handle);
if (connection_list_.end() == it) {
- LOG4CXX_ERROR(logger_, "Connection not found for key: " << key);
+ SDL_LOG_ERROR("Connection not found for key: " << key);
return error_result;
}
const Connection& connection = *it->second;
const SessionMap session_map = connection.session_map();
if (0 == session_id || session_map.end() == session_map.find(session_id)) {
- LOG4CXX_ERROR(logger_,
- "Session not found in connection: "
- << static_cast<int32_t>(conn_handle));
+ SDL_LOG_ERROR("Session not found in connection: "
+ << static_cast<int32_t>(conn_handle));
return error_result;
}
@@ -1006,8 +1050,7 @@ int32_t ConnectionHandlerImpl::GetDataOnSessionKey(
}
}
- LOG4CXX_INFO(logger_,
- "Connection " << static_cast<int32_t>(conn_handle) << " has "
+ SDL_LOG_INFO("Connection " << static_cast<int32_t>(conn_handle) << " has "
<< session_map.size() << " sessions.");
return 0;
}
@@ -1041,13 +1084,12 @@ uint32_t findGap(const std::map<unsigned char, T>& map) {
uint32_t ConnectionHandlerImpl::AddSession(
const transport_manager::ConnectionUID primary_transport_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(session_connection_map_lock_ptr_);
const uint32_t session_id = findGap(session_connection_map_);
if (session_id > 0) {
- LOG4CXX_INFO(logger_,
- "New session ID " << session_id << " and Connection Id "
+ SDL_LOG_INFO("New session ID " << session_id << " and Connection Id "
<< static_cast<int>(primary_transport_id)
<< " added to Session/Connection Map");
SessionTransports st;
@@ -1055,25 +1097,23 @@ uint32_t ConnectionHandlerImpl::AddSession(
st.secondary_transport = 0;
session_connection_map_[session_id] = st;
} else {
- LOG4CXX_WARN(logger_,
- "Session/Connection Map could not create a new session ID!!!");
+ SDL_LOG_WARN("Session/Connection Map could not create a new session ID!!!");
}
return session_id;
}
bool ConnectionHandlerImpl::RemoveSession(uint8_t session_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(session_connection_map_lock_ptr_);
SessionConnectionMap::iterator itr = session_connection_map_.find(session_id);
if (session_connection_map_.end() == itr) {
- LOG4CXX_WARN(logger_, "Session not found in Session/Connection Map!");
+ SDL_LOG_WARN("Session not found in Session/Connection Map!");
return false;
}
- LOG4CXX_INFO(logger_,
- "Removed Session ID " << static_cast<int>(session_id)
+ SDL_LOG_INFO("Removed Session ID " << static_cast<int>(session_id)
<< " from Session/Connection Map");
session_connection_map_.erase(session_id);
return true;
@@ -1093,10 +1133,9 @@ SessionTransports ConnectionHandlerImpl::SetSecondaryTransportID(
sync_primitives::AutoLock auto_lock(session_connection_map_lock_ptr_);
SessionConnectionMap::iterator it = session_connection_map_.find(session_id);
if (session_connection_map_.end() == it) {
- LOG4CXX_WARN(logger_,
- "SetSecondaryTransportID: session ID "
- << static_cast<int>(session_id)
- << " not found in Session/Connection map");
+ SDL_LOG_WARN("SetSecondaryTransportID: session ID "
+ << static_cast<int>(session_id)
+ << " not found in Session/Connection map");
st.primary_transport = 0;
st.secondary_transport = 0;
} else {
@@ -1110,12 +1149,11 @@ SessionTransports ConnectionHandlerImpl::SetSecondaryTransportID(
if (st.secondary_transport != 0 &&
secondary_transport_id != kDisabledSecondary &&
secondary_transport_id != 0) {
- LOG4CXX_WARN(logger_,
- "SetSecondaryTransportID: session ID "
- << static_cast<int>(session_id)
- << " already has a secondary connection "
- << static_cast<int>(st.secondary_transport)
- << " in the Session/Connection map");
+ SDL_LOG_WARN("SetSecondaryTransportID: session ID "
+ << static_cast<int>(session_id)
+ << " already has a secondary connection "
+ << static_cast<int>(st.secondary_transport)
+ << " in the Session/Connection map");
} else {
st.secondary_transport = secondary_transport_id;
session_connection_map_[session_id] = st;
@@ -1145,29 +1183,26 @@ const uint8_t ConnectionHandlerImpl::GetSessionIdFromSecondaryTransport(
transport_manager::ConnectionUID secondary_transport_id) const {
sync_primitives::AutoLock auto_lock(session_connection_map_lock_ptr_);
SessionConnectionMap::const_iterator it = session_connection_map_.begin();
- for (; session_connection_map_.end() != it; it++) {
+ for (; session_connection_map_.end() != it; ++it) {
SessionTransports st = it->second;
if (st.secondary_transport == secondary_transport_id) {
return it->first;
}
}
- LOG4CXX_ERROR(logger_,
- "Could not find secondary transport ID "
- << static_cast<int>(secondary_transport_id)
- << " in the Session/Connection map");
+ SDL_LOG_ERROR("Could not find secondary transport ID "
+ << static_cast<int>(secondary_transport_id)
+ << " in the Session/Connection map");
return 0;
}
Connection* ConnectionHandlerImpl::GetPrimaryConnection(
const ConnectionHandle connection_handle) const {
- LOG4CXX_DEBUG(logger_,
- "Getting primary connection for ID " << connection_handle);
+ SDL_LOG_DEBUG("Getting primary connection for ID " << connection_handle);
ConnectionList::const_iterator it = connection_list_.find(connection_handle);
if (connection_list_.end() == it) {
- LOG4CXX_ERROR(
- logger_,
- "Connection with ID " << connection_handle << " was not found");
+ SDL_LOG_ERROR("Connection with ID " << connection_handle
+ << " was not found");
return nullptr;
}
@@ -1220,7 +1255,7 @@ int32_t ConnectionHandlerImpl::GetDataOnDeviceID(
std::list<uint32_t>* applications_list,
std::string* mac_address,
std::string* connection_type) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
int32_t result = -1;
@@ -1228,7 +1263,7 @@ int32_t ConnectionHandlerImpl::GetDataOnDeviceID(
auto it = device_list_.find(device_handle);
if (device_list_.end() == it) {
- LOG4CXX_ERROR(logger_, "Device not found for handle " << device_handle);
+ SDL_LOG_ERROR("Device not found for handle " << device_handle);
return result;
}
@@ -1283,7 +1318,7 @@ void ConnectionHandlerImpl::GetConnectedDevicesMAC(
#ifdef ENABLE_SECURITY
int ConnectionHandlerImpl::SetSSLContext(
const uint32_t& key, security_manager::SSLContext* context) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
transport_manager::ConnectionUID connection_handle = 0;
uint8_t session_id = 0;
PairFromKey(key, &connection_handle, &session_id);
@@ -1299,7 +1334,7 @@ int ConnectionHandlerImpl::SetSSLContext(
security_manager::SSLContext* ConnectionHandlerImpl::GetSSLContext(
const uint32_t& key, const protocol_handler::ServiceType& service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
transport_manager::ConnectionUID connection_handle = 0;
uint8_t session_id = 0;
PairFromKey(key, &connection_handle, &session_id);
@@ -1315,7 +1350,7 @@ security_manager::SSLContext* ConnectionHandlerImpl::GetSSLContext(
void ConnectionHandlerImpl::SetProtectionFlag(
const uint32_t& key, const protocol_handler::ServiceType& service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
transport_manager::ConnectionUID connection_handle = 0;
uint8_t session_id = 0;
PairFromKey(key, &connection_handle, &session_id);
@@ -1350,7 +1385,7 @@ ConnectionHandlerImpl::GetHandshakeContext(uint32_t key) const {
bool ConnectionHandlerImpl::SessionServiceExists(
const uint32_t connection_key,
const protocol_handler::ServiceType& service_type) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
transport_manager::ConnectionUID connection_handle = 0;
uint8_t session_id = 0;
PairFromKey(connection_key, &connection_handle, &session_id);
@@ -1358,7 +1393,7 @@ bool ConnectionHandlerImpl::SessionServiceExists(
sync_primitives::AutoReadLock lock(connection_list_lock_);
ConnectionList::const_iterator it = connection_list_.find(connection_handle);
if (connection_list_.end() == it) {
- LOG4CXX_ERROR(logger_, "Unknown connection!");
+ SDL_LOG_ERROR("Unknown connection!");
return false;
}
const Connection& connection = *it->second;
@@ -1366,7 +1401,7 @@ bool ConnectionHandlerImpl::SessionServiceExists(
}
void ConnectionHandlerImpl::StartDevicesDiscovery() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
transport_manager_.SearchDevices();
sync_primitives::AutoReadLock read_lock(connection_handler_observer_lock_);
@@ -1382,13 +1417,12 @@ void ConnectionHandlerImpl::ConnectToDevice(
sync_primitives::AutoReadLock lock(device_list_lock_);
it_in = device_list_.find(device_handle);
if (device_list_.end() != it_in) {
- LOG4CXX_INFO(logger_, "Connecting to device with handle " << device_handle);
+ SDL_LOG_INFO("Connecting to device with handle " << device_handle);
if (transport_manager::E_SUCCESS !=
transport_manager_.ConnectDevice(device_handle)) {
- LOG4CXX_WARN(logger_, "Can't connect to device");
+ SDL_LOG_WARN("Can't connect to device");
} else {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Application Manager wanted to connect to non-existing device");
}
}
@@ -1411,7 +1445,7 @@ void ConnectionHandlerImpl::RunAppOnDevice(const std::string& device_mac,
return;
}
}
- LOG4CXX_WARN(logger_, "No apps found on device " << device_mac);
+ SDL_LOG_WARN("No apps found on device " << device_mac);
}
void ConnectionHandlerImpl::ConnectToAllDevices() {
@@ -1420,7 +1454,7 @@ void ConnectionHandlerImpl::ConnectToAllDevices() {
++i) {
if (transport_manager::webengine_constants::kWebEngineDeviceName ==
i->second.user_friendly_name()) {
- LOG4CXX_DEBUG(logger_, "No need to connect to web engine device");
+ SDL_LOG_DEBUG("No need to connect to web engine device");
continue;
}
ConnectToDevice(i->first);
@@ -1443,13 +1477,13 @@ void ConnectionHandlerImpl::RemoveCloudAppDevice(const DeviceHandle device_id) {
}
void ConnectionHandlerImpl::StartTransportManager() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
transport_manager_.PerformActionOnClients(
transport_manager::TransportAction::kVisibilityOn);
}
void ConnectionHandlerImpl::CloseRevokedConnection(uint32_t connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t connection_handle = 0;
uint8_t session_id = 0;
@@ -1460,7 +1494,7 @@ void ConnectionHandlerImpl::CloseRevokedConnection(uint32_t connection_key) {
void ConnectionHandlerImpl::CloseConnection(
ConnectionHandle connection_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
transport_manager::ConnectionUID connection_uid =
ConnectionUIDFromHandle(connection_handle);
transport_manager_.DisconnectForce(connection_uid);
@@ -1476,7 +1510,7 @@ void ConnectionHandlerImpl::CloseConnection(
uint32_t ConnectionHandlerImpl::GetConnectionSessionsCount(
uint32_t connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t connection_handle = 0;
uint8_t session_id = 0;
PairFromKey(connection_key, &connection_handle, &session_id);
@@ -1503,9 +1537,8 @@ void ConnectionHandlerImpl::CloseSession(uint32_t key,
void ConnectionHandlerImpl::CloseSession(ConnectionHandle connection_handle,
uint8_t session_id,
CloseSessionReason close_reason) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "Closing session with id: " << static_cast<int>(session_id));
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Closing session with id: " << static_cast<int>(session_id));
// In case of malformed message the connection should be broke up without
// any other notification to mobile.
@@ -1526,15 +1559,14 @@ void ConnectionHandlerImpl::CloseSession(ConnectionHandle connection_handle,
session_map = connection_list_itr->second->session_map();
connection_list_itr->second->RemoveSession(session_id);
} else {
- LOG4CXX_ERROR(logger_,
- "Connection with id: " << connection_id << " not found");
+ SDL_LOG_ERROR("Connection with id: " << connection_id << " not found");
return;
}
}
sync_primitives::AutoReadLock read_lock(connection_handler_observer_lock_);
if (!connection_handler_observer_) {
- LOG4CXX_ERROR(logger_, "Connection handler observer not found");
+ SDL_LOG_ERROR("Connection handler observer not found");
return;
}
@@ -1553,24 +1585,22 @@ void ConnectionHandlerImpl::CloseSession(ConnectionHandle connection_handle,
session_key, service_type, close_reason);
}
} else {
- LOG4CXX_ERROR(logger_, "Session with id: " << session_id << " not found");
+ SDL_LOG_ERROR("Session with id: " << session_id << " not found");
return;
}
- LOG4CXX_DEBUG(
- logger_,
- "Session with id: " << session_id << " has been closed successfully");
+ SDL_LOG_DEBUG("Session with id: " << session_id
+ << " has been closed successfully");
}
void ConnectionHandlerImpl::CloseConnectionSessions(
ConnectionHandle connection_handle, CloseSessionReason close_reason) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
transport_manager::ConnectionUID connection_id =
ConnectionUIDFromHandle(connection_handle);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Closing all sessions for connection with id: " << connection_id);
typedef std::vector<uint8_t> SessionIdVector;
@@ -1588,8 +1618,7 @@ void ConnectionHandlerImpl::CloseConnectionSessions(
session_id_vector.push_back(session_map_itr->first);
}
} else {
- LOG4CXX_ERROR(logger_,
- "Connection with id: " << connection_id << " not found");
+ SDL_LOG_ERROR("Connection with id: " << connection_id << " not found");
return;
}
}
@@ -1599,12 +1628,12 @@ void ConnectionHandlerImpl::CloseConnectionSessions(
}
session_id_vector.clear();
- LOG4CXX_DEBUG(logger_,
- "All sessions for connection with id: "
- << connection_id << " have been closed successfully");
+ SDL_LOG_DEBUG("All sessions for connection with id: "
+ << connection_id << " have been closed successfully");
}
void ConnectionHandlerImpl::SendEndService(uint32_t key, uint8_t service_type) {
+ SDL_LOG_AUTO_TRACE();
if (protocol_handler_) {
uint32_t connection_handle = 0;
uint8_t session_id = 0;
@@ -1614,17 +1643,16 @@ void ConnectionHandlerImpl::SendEndService(uint32_t key, uint8_t service_type) {
// that transport from the SessionConnection Map
SessionTransports st = GetSessionTransports(session_id);
if (st.primary_transport == 0) {
- LOG4CXX_WARN(logger_,
- "SendEndService could not find Session in the "
- "Session/Connection Map!");
+ SDL_LOG_WARN(
+ "SendEndService could not find Session in the "
+ "Session/Connection Map!");
} else {
- LOG4CXX_INFO(logger_,
- "SendEndService found session "
- << static_cast<int>(session_id)
- << " with primary connection "
- << static_cast<int>(st.primary_transport)
- << " and secondary connection "
- << static_cast<int>(st.secondary_transport));
+ SDL_LOG_INFO("SendEndService found session "
+ << static_cast<int>(session_id)
+ << " with primary connection "
+ << static_cast<int>(st.primary_transport)
+ << " and secondary connection "
+ << static_cast<int>(st.secondary_transport));
sync_primitives::AutoLock auto_lock(session_connection_map_lock_ptr_);
auto it = std::find(st.secondary_transport_services.begin(),
st.secondary_transport_services.end(),
@@ -1640,7 +1668,7 @@ void ConnectionHandlerImpl::SendEndService(uint32_t key, uint8_t service_type) {
}
void ConnectionHandlerImpl::StartSessionHeartBeat(uint32_t connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t connection_handle = 0;
uint8_t session_id = 0;
PairFromKey(connection_key, &connection_handle, &session_id);
@@ -1654,7 +1682,7 @@ void ConnectionHandlerImpl::StartSessionHeartBeat(uint32_t connection_key) {
void ConnectionHandlerImpl::SetHeartBeatTimeout(uint32_t connection_key,
uint32_t timeout) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t connection_handle = 0;
uint8_t session_id = 0;
PairFromKey(connection_key, &connection_handle, &session_id);
@@ -1676,7 +1704,7 @@ void ConnectionHandlerImpl::SendHeartBeat(ConnectionHandle connection_handle,
void ConnectionHandlerImpl::KeepConnectionAlive(uint32_t connection_key,
uint8_t session_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoReadLock lock(connection_list_lock_);
ConnectionList::iterator it = connection_list_.find(connection_key);
if (connection_list_.end() != it) {
@@ -1686,13 +1714,12 @@ void ConnectionHandlerImpl::KeepConnectionAlive(uint32_t connection_key,
void ConnectionHandlerImpl::OnConnectionEnded(
const transport_manager::ConnectionUID connection_id) {
- LOG4CXX_INFO(logger_,
- "Delete Connection: " << static_cast<int32_t>(connection_id)
+ SDL_LOG_INFO("Delete Connection: " << static_cast<int32_t>(connection_id)
<< " from the list.");
connection_list_lock_.AcquireForWriting();
ConnectionList::iterator itr = connection_list_.find(connection_id);
if (connection_list_.end() == itr) {
- LOG4CXX_ERROR(logger_, "Connection not found!");
+ SDL_LOG_ERROR("Connection not found!");
connection_list_lock_.Release();
return;
}
@@ -1708,6 +1735,10 @@ void ConnectionHandlerImpl::OnConnectionEnded(
ending_connection_ = connection.get();
const SessionMap session_map = connection->session_map();
+ const CloseSessionReason close_reason =
+ connection->IsFinalMessageSent() ? CloseSessionReason::kFinalMessage
+ : CloseSessionReason::kCommon;
+
for (SessionMap::const_iterator session_it = session_map.begin();
session_map.end() != session_it;
++session_it) {
@@ -1723,9 +1754,7 @@ void ConnectionHandlerImpl::OnConnectionEnded(
service_list.rbegin();
for (; service_list_itr != service_list.rend(); ++service_list_itr) {
connection_handler_observer_->OnServiceEndedCallback(
- session_key,
- service_list_itr->service_type,
- CloseSessionReason::kCommon);
+ session_key, service_list_itr->service_type, close_reason);
}
}
ending_connection_ = NULL;
@@ -1740,7 +1769,7 @@ void ConnectionHandlerImpl::OnConnectionEnded(
void ConnectionHandlerImpl::BindProtocolVersionWithSession(
uint32_t connection_key, uint8_t protocol_version) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint32_t connection_handle = 0;
uint8_t session_id = 0;
PairFromKey(connection_key, &connection_handle, &session_id);
@@ -1752,10 +1781,25 @@ void ConnectionHandlerImpl::BindProtocolVersionWithSession(
}
}
+void ConnectionHandlerImpl::BindProtocolVersionWithSession(
+ uint32_t connection_key,
+ const utils::SemanticVersion& full_protocol_version) {
+ SDL_LOG_AUTO_TRACE();
+ uint32_t connection_handle = 0;
+ uint8_t session_id = 0;
+ PairFromKey(connection_key, &connection_handle, &session_id);
+
+ sync_primitives::AutoReadLock lock(connection_list_lock_);
+ auto connection = GetPrimaryConnection(connection_handle);
+ if (connection) {
+ connection->UpdateProtocolVersionSession(session_id, full_protocol_version);
+ }
+}
+
bool ConnectionHandlerImpl::IsHeartBeatSupported(
transport_manager::ConnectionUID connection_handle,
uint8_t session_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoReadLock lock(connection_list_lock_);
const uint32_t connection_id = static_cast<uint32_t>(connection_handle);
auto connection = GetPrimaryConnection(connection_id);
@@ -1771,7 +1815,7 @@ bool ConnectionHandlerImpl::ProtocolVersionUsed(
uint32_t connection_id,
uint8_t session_id,
uint8_t& protocol_version) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoReadLock lock(connection_list_lock_);
auto connection = GetPrimaryConnection(connection_id);
@@ -1785,6 +1829,25 @@ bool ConnectionHandlerImpl::ProtocolVersionUsed(
return false;
}
+bool ConnectionHandlerImpl::ProtocolVersionUsed(
+ uint32_t connection_id,
+ uint8_t session_id,
+ utils::SemanticVersion& full_protocol_version) const {
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoReadLock lock(connection_list_lock_);
+ auto connection = GetPrimaryConnection(connection_id);
+
+ if (connection) {
+ return connection->ProtocolVersion(session_id, full_protocol_version);
+ } else if (ending_connection_ &&
+ static_cast<uint32_t>(ending_connection_->connection_handle()) ==
+ connection_id) {
+ return ending_connection_->ProtocolVersion(session_id,
+ full_protocol_version);
+ }
+ return false;
+}
+
#ifdef BUILD_TESTS
ConnectionList& ConnectionHandlerImpl::getConnectionList() {
return connection_list_;
diff --git a/src/components/connection_handler/src/device.cc b/src/components/connection_handler/src/device.cc
index 515304778b..94e7226f84 100644
--- a/src/components/connection_handler/src/device.cc
+++ b/src/components/connection_handler/src/device.cc
@@ -43,7 +43,7 @@
*/
namespace connection_handler {
-CREATE_LOGGERPTR_GLOBAL(logger_, "ConnectionHandler")
+SDL_CREATE_LOG_VARIABLE("ConnectionHandler")
Device::Device(DeviceHandle device_handle,
const std::string& user_friendly_name,
@@ -54,9 +54,8 @@ Device::Device(DeviceHandle device_handle,
, mac_address_(mac_address)
, connection_type_(connection_type) {
mac_address_ = encryption::MakeHash(mac_address);
- LOG4CXX_DEBUG(
- logger_,
- "Device: MAC address - " << mac_address << ", hash - " << mac_address_);
+ SDL_LOG_DEBUG("Device: MAC address - " << mac_address << ", hash - "
+ << mac_address_);
}
DeviceHandle Device::device_handle() const {
diff --git a/src/components/connection_handler/src/heartbeat_monitor.cc b/src/components/connection_handler/src/heartbeat_monitor.cc
index 2b50f1ce1b..f3e2da2696 100644
--- a/src/components/connection_handler/src/heartbeat_monitor.cc
+++ b/src/components/connection_handler/src/heartbeat_monitor.cc
@@ -41,7 +41,7 @@ namespace connection_handler {
using namespace sync_primitives;
-CREATE_LOGGERPTR_GLOBAL(logger_, "HeartBeatMonitor")
+SDL_CREATE_LOG_VARIABLE("HeartBeatMonitor")
HeartBeatMonitor::HeartBeatMonitor(uint32_t heartbeat_timeout_mseconds,
Connection* connection)
@@ -57,7 +57,7 @@ void HeartBeatMonitor::Process() {
if (state.HasTimeoutElapsed()) {
const uint8_t session_id = it->first;
if (state.IsReadyToClose()) {
- LOG4CXX_WARN(logger_, "Will close session");
+ SDL_LOG_WARN("Will close session");
sessions_list_lock_.Release();
RemoveSession(session_id);
connection_->CloseSession(session_id);
@@ -65,9 +65,8 @@ void HeartBeatMonitor::Process() {
it = sessions_.begin();
continue;
} else {
- LOG4CXX_DEBUG(logger_,
- "Send heart beat into session with id "
- << static_cast<int32_t>(session_id));
+ SDL_LOG_DEBUG("Send heart beat into session with id "
+ << static_cast<int32_t>(session_id));
state.PrepareToClose();
connection_->SendHeartBeat(it->first);
}
@@ -79,9 +78,8 @@ void HeartBeatMonitor::Process() {
void HeartBeatMonitor::threadMain() {
AutoLock main_lock(main_thread_lock_);
- LOG4CXX_DEBUG(
- logger_,
- "Start heart beat monitor. Timeout is " << default_heartbeat_timeout_);
+ SDL_LOG_DEBUG("Start heart beat monitor. Timeout is "
+ << default_heartbeat_timeout_);
while (run_) {
heartbeat_monitor_.WaitFor(main_lock, kDefaultCycleTimeout);
Process();
@@ -91,42 +89,37 @@ void HeartBeatMonitor::threadMain() {
void HeartBeatMonitor::AddSession(uint8_t session_id) {
const uint32_t converted_session_id = static_cast<int32_t>(session_id);
UNUSED(converted_session_id);
- LOG4CXX_DEBUG(logger_, "Add session with id " << converted_session_id);
+ SDL_LOG_DEBUG("Add session with id " << converted_session_id);
AutoLock auto_lock(sessions_list_lock_);
if (sessions_.end() != sessions_.find(session_id)) {
- LOG4CXX_WARN(
- logger_,
- "Session with id: " << converted_session_id << " already exists");
+ SDL_LOG_WARN("Session with id: " << converted_session_id
+ << " already exists");
return;
}
sessions_.insert(
std::make_pair(session_id, SessionState(default_heartbeat_timeout_)));
- LOG4CXX_INFO(logger_,
- "Start heartbeat for session: " << converted_session_id);
+ SDL_LOG_INFO("Start heartbeat for session: " << converted_session_id);
}
void HeartBeatMonitor::RemoveSession(uint8_t session_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
AutoLock auto_lock(sessions_list_lock_);
- LOG4CXX_DEBUG(logger_,
- "Remove session with id " << static_cast<int>(session_id));
+ SDL_LOG_DEBUG("Remove session with id " << static_cast<int>(session_id));
if (sessions_.erase(session_id) == 0) {
- LOG4CXX_WARN(logger_,
- "Remove session with id " << static_cast<int>(session_id)
+ SDL_LOG_WARN("Remove session with id " << static_cast<int>(session_id)
<< " was unsuccessful");
}
}
void HeartBeatMonitor::KeepAlive(uint8_t session_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
AutoLock auto_lock(sessions_list_lock_);
if (sessions_.end() != sessions_.find(session_id)) {
- LOG4CXX_INFO(logger_,
- "Resetting heart beat timer for session with id "
- << static_cast<int32_t>(session_id));
+ SDL_LOG_INFO("Resetting heart beat timer for session with id "
+ << static_cast<int32_t>(session_id));
sessions_[session_id].KeepAlive();
}
@@ -136,7 +129,7 @@ void HeartBeatMonitor::exitThreadMain() {
// FIXME (dchmerev@luxoft.com): thread requested to stop should stop as soon
// as possible,
// not running one more iteration before actual stop
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
AutoLock main_lock(main_thread_lock_);
run_ = false;
heartbeat_monitor_.NotifyOne();
@@ -144,8 +137,7 @@ void HeartBeatMonitor::exitThreadMain() {
void HeartBeatMonitor::set_heartbeat_timeout_milliseconds(uint32_t timeout,
uint8_t session_id) {
- LOG4CXX_DEBUG(logger_,
- "Set new heart beat timeout " << timeout
+ SDL_LOG_DEBUG("Set new heart beat timeout " << timeout
<< "For session: " << session_id);
AutoLock session_locker(sessions_list_lock_);
@@ -158,12 +150,12 @@ HeartBeatMonitor::SessionState::SessionState(
uint32_t heartbeat_timeout_mseconds)
: heartbeat_timeout_mseconds_(heartbeat_timeout_mseconds)
, is_heartbeat_sent_(false) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
RefreshExpiration();
}
void HeartBeatMonitor::SessionState::RefreshExpiration() {
- LOG4CXX_DEBUG(logger_, "Refresh expiration: " << heartbeat_timeout_mseconds_);
+ SDL_LOG_DEBUG("Refresh expiration: " << heartbeat_timeout_mseconds_);
using namespace date_time;
date_time::TimeDuration time = getCurrentTime();
AddMilliseconds(time, heartbeat_timeout_mseconds_);
@@ -172,15 +164,14 @@ void HeartBeatMonitor::SessionState::RefreshExpiration() {
void HeartBeatMonitor::SessionState::UpdateTimeout(
uint32_t heartbeat_timeout_mseconds) {
- LOG4CXX_DEBUG(logger_,
- "Update timout with value " << heartbeat_timeout_mseconds_);
+ SDL_LOG_DEBUG("Update timout with value " << heartbeat_timeout_mseconds_);
heartbeat_timeout_mseconds_ = heartbeat_timeout_mseconds;
RefreshExpiration();
}
void HeartBeatMonitor::SessionState::PrepareToClose() {
is_heartbeat_sent_ = true;
- LOG4CXX_DEBUG(logger_, "Prepare to close");
+ SDL_LOG_DEBUG("Prepare to close");
RefreshExpiration();
}
@@ -189,7 +180,7 @@ bool HeartBeatMonitor::SessionState::IsReadyToClose() const {
}
void HeartBeatMonitor::SessionState::KeepAlive() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
is_heartbeat_sent_ = false;
RefreshExpiration();
}
diff --git a/src/components/connection_handler/test/connection_handler_impl_test.cc b/src/components/connection_handler/test/connection_handler_impl_test.cc
index 855225c460..9305eee2ee 100644
--- a/src/components/connection_handler/test/connection_handler_impl_test.cc
+++ b/src/components/connection_handler/test/connection_handler_impl_test.cc
@@ -65,9 +65,9 @@ using ::testing::ReturnRefOfCopy;
using ::testing::SaveArg;
using ::testing::SaveArgPointee;
-// custom action to call a member function with 3 arguments
-ACTION_P5(InvokeMemberFuncWithArg3, ptr, memberFunc, a, b, c) {
- (ptr->*memberFunc)(a, b, c);
+// custom action to call a member function with 4 arguments
+ACTION_P6(InvokeMemberFuncWithArg4, ptr, memberFunc, a, b, c, d) {
+ (ptr->*memberFunc)(a, b, c, d);
}
namespace {
@@ -127,7 +127,7 @@ class ConnectionHandlerTest : public ::testing::Test {
void AddTestSession() {
protocol_handler_test::MockProtocolHandler temp_protocol_handler;
connection_handler_->set_protocol_handler(&temp_protocol_handler);
- EXPECT_CALL(temp_protocol_handler, NotifySessionStarted(_, _))
+ EXPECT_CALL(temp_protocol_handler, NotifySessionStarted(_, _, _))
.WillOnce(SaveArg<0>(&out_context_));
connection_handler_->OnSessionStartedCallback(
@@ -164,7 +164,7 @@ class ConnectionHandlerTest : public ::testing::Test {
SessionContext context;
protocol_handler_test::MockProtocolHandler temp_protocol_handler;
connection_handler_->set_protocol_handler(&temp_protocol_handler);
- EXPECT_CALL(temp_protocol_handler, NotifySessionStarted(_, _))
+ EXPECT_CALL(temp_protocol_handler, NotifySessionStarted(_, _, _))
.WillOnce(SaveArg<0>(&context));
connection_handler_->OnSessionStartedCallback(uid_,
@@ -371,7 +371,7 @@ TEST_F(ConnectionHandlerTest, StartSession_NoConnection) {
protocol_handler::SessionContext context;
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _, _))
.WillOnce(SaveArg<0>(&context));
connection_handler_->OnSessionStartedCallback(
@@ -855,6 +855,24 @@ TEST_F(ConnectionHandlerTest, OnConnectionClosed) {
connection_handler_->OnConnectionClosed(uid_);
}
+TEST_F(ConnectionHandlerTest, OnFinalMessageCallback_OnConnectionClosed) {
+ AddTestDeviceConnection();
+ AddTestSession();
+
+ connection_handler_test::MockConnectionHandlerObserver
+ mock_connection_handler_observer;
+ connection_handler_->set_connection_handler_observer(
+ &mock_connection_handler_observer);
+
+ EXPECT_CALL(mock_connection_handler_observer,
+ OnServiceEndedCallback(connection_key_, kBulk, kFinalMessage));
+ EXPECT_CALL(mock_connection_handler_observer,
+ OnServiceEndedCallback(connection_key_, kRpc, kFinalMessage));
+
+ connection_handler_->OnFinalMessageCallback(connection_key_);
+ connection_handler_->OnConnectionClosed(uid_);
+}
+
TEST_F(ConnectionHandlerTest, OnUnexpectedDisconnect) {
AddTestDeviceConnection();
AddTestSession();
@@ -874,6 +892,27 @@ TEST_F(ConnectionHandlerTest, OnUnexpectedDisconnect) {
connection_handler_->OnUnexpectedDisconnect(uid_, err);
}
+TEST_F(ConnectionHandlerTest, OnFinalMessageCallback_OnUnexpectedDisconnect) {
+ AddTestDeviceConnection();
+ AddTestSession();
+
+ connection_handler_test::MockConnectionHandlerObserver
+ mock_connection_handler_observer;
+ connection_handler_->set_connection_handler_observer(
+ &mock_connection_handler_observer);
+
+ EXPECT_CALL(mock_connection_handler_observer,
+ OnServiceEndedCallback(
+ connection_key_, kBulk, CloseSessionReason::kFinalMessage));
+ EXPECT_CALL(mock_connection_handler_observer,
+ OnServiceEndedCallback(
+ connection_key_, kRpc, CloseSessionReason::kFinalMessage));
+
+ connection_handler_->OnFinalMessageCallback(connection_key_);
+ transport_manager::CommunicationError err;
+ connection_handler_->OnUnexpectedDisconnect(uid_, err);
+}
+
TEST_F(ConnectionHandlerTest, ConnectToDevice) {
// Precondition
const uint32_t dev_handle1 = 1;
@@ -1144,7 +1183,7 @@ TEST_F(ConnectionHandlerTest, StartService_withServices) {
SessionContext audio_context, video_context;
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _, _))
.WillOnce(SaveArg<0>(&audio_context))
.WillOnce(SaveArg<0>(&video_context));
@@ -1185,7 +1224,7 @@ TEST_F(ConnectionHandlerTest, StartService_withServices_withParams) {
std::vector<std::string> empty;
BsonObject* dummy_param = reinterpret_cast<BsonObject*>(&dummy);
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, empty))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, empty, _))
.WillOnce(SaveArg<0>(&video_context));
connection_handler_->OnSessionStartedCallback(uid_,
@@ -1230,7 +1269,7 @@ TEST_F(ConnectionHandlerTest, ServiceStop) {
SessionContext audio_context;
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _, _))
.WillRepeatedly(SaveArg<0>(&audio_context));
// Check ignoring hash_id on stop non-rpc service
@@ -1307,19 +1346,21 @@ TEST_F(ConnectionHandlerTest, SessionStarted_WithRpc) {
connection_handler_->set_connection_handler_observer(
&mock_connection_handler_observer);
std::vector<std::string> empty;
+ std::string reason;
uint32_t session_key =
connection_handler_->KeyFromPair(uid_, out_context_.initial_session_id_);
EXPECT_CALL(mock_connection_handler_observer,
OnServiceStartedCallback(device_handle_, _, kRpc, NULL))
- .WillOnce(InvokeMemberFuncWithArg3(
+ .WillOnce(InvokeMemberFuncWithArg4(
connection_handler_,
&ConnectionHandler::NotifyServiceStartedResult,
session_key,
true,
- ByRef(empty)));
+ ByRef(empty),
+ reason));
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _, _))
.WillOnce(SaveArg<0>(&out_context_));
// Start new session with RPC service
@@ -1345,19 +1386,21 @@ TEST_F(ConnectionHandlerTest, ServiceStarted_Video_SUCCESS) {
uint32_t session_key =
connection_handler_->KeyFromPair(uid_, out_context_.new_session_id_);
std::vector<std::string> empty;
+ std::string reason;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceStartedCallback(
device_handle_, session_key, kMobileNav, dummy_params))
- .WillOnce(InvokeMemberFuncWithArg3(
+ .WillOnce(InvokeMemberFuncWithArg4(
connection_handler_,
&ConnectionHandler::NotifyServiceStartedResult,
session_key,
true,
- ByRef(empty)));
+ ByRef(empty),
+ reason));
// confirm that NotifySessionStarted() is called
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, empty))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, empty, _))
.WillOnce(SaveArg<0>(&out_context_));
connection_handler_->OnSessionStartedCallback(uid_,
@@ -1385,19 +1428,21 @@ TEST_F(ConnectionHandlerTest, ServiceStarted_Video_FAILURE) {
uint32_t session_key =
connection_handler_->KeyFromPair(uid_, out_context_.new_session_id_);
std::vector<std::string> empty;
+ std::string reason;
EXPECT_CALL(mock_connection_handler_observer,
OnServiceStartedCallback(
device_handle_, session_key, kMobileNav, dummy_params))
- .WillOnce(InvokeMemberFuncWithArg3(
+ .WillOnce(InvokeMemberFuncWithArg4(
connection_handler_,
&ConnectionHandler::NotifyServiceStartedResult,
session_key,
false,
- ByRef(empty)));
+ ByRef(empty),
+ reason));
// confirm that NotifySessionStarted() is called
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, empty))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, empty, _))
.WillOnce(SaveArg<0>(&out_context_));
connection_handler_->OnSessionStartedCallback(uid_,
@@ -1421,7 +1466,7 @@ TEST_F(ConnectionHandlerTest, ServiceStarted_Video_Multiple) {
protocol_handler_test::MockProtocolHandler temp_protocol_handler;
connection_handler_->set_protocol_handler(&temp_protocol_handler);
- EXPECT_CALL(temp_protocol_handler, NotifySessionStarted(_, _))
+ EXPECT_CALL(temp_protocol_handler, NotifySessionStarted(_, _, _))
.WillOnce(SaveArg<0>(&context_first))
.WillOnce(SaveArg<0>(&context_second));
@@ -1455,6 +1500,8 @@ TEST_F(ConnectionHandlerTest, ServiceStarted_Video_Multiple) {
connection_handler_->KeyFromPair(uid_, context_second.new_session_id_);
std::vector<std::string> empty;
+ std::string reason;
+
ChangeProtocol(uid_,
context_first.new_session_id_,
protocol_handler::PROTOCOL_VERSION_3);
@@ -1472,23 +1519,25 @@ TEST_F(ConnectionHandlerTest, ServiceStarted_Video_Multiple) {
device_handle_, session_key2, kMobileNav, dummy_params))
// call NotifyServiceStartedResult() twice, first for the second session
// then for the first session
- .WillOnce(DoAll(InvokeMemberFuncWithArg3(
+ .WillOnce(DoAll(InvokeMemberFuncWithArg4(
connection_handler_,
&ConnectionHandler::NotifyServiceStartedResult,
session_key2,
false,
- ByRef(empty)),
- InvokeMemberFuncWithArg3(
+ ByRef(empty),
+ reason),
+ InvokeMemberFuncWithArg4(
connection_handler_,
&ConnectionHandler::NotifyServiceStartedResult,
session_key1,
true,
- ByRef(empty))));
+ ByRef(empty),
+ reason)));
// verify that connection handler will not mix up the two results
SessionContext new_context_first, new_context_second;
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, empty))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, empty, _))
.WillOnce(SaveArg<0>(&new_context_second))
.WillOnce(SaveArg<0>(&new_context_first));
@@ -1520,7 +1569,7 @@ TEST_F(ConnectionHandlerTest,
SessionContext fail_context;
SessionContext positive_context;
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _, _))
.WillOnce(SaveArg<0>(&fail_context))
.WillOnce(SaveArg<0>(&positive_context));
@@ -1563,7 +1612,7 @@ TEST_F(ConnectionHandlerTest,
SessionContext fail_context;
SessionContext positive_context;
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _, _))
.WillOnce(SaveArg<0>(&fail_context))
.WillOnce(SaveArg<0>(&positive_context));
@@ -1608,7 +1657,7 @@ TEST_F(ConnectionHandlerTest,
SessionContext context_first, context_second;
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _, _))
.WillOnce(SaveArg<0>(&context_first))
.WillOnce(SaveArg<0>(&context_second));
@@ -1663,7 +1712,7 @@ TEST_F(ConnectionHandlerTest,
SessionContext rejected_context, positive_context;
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _, _))
.WillOnce(SaveArg<0>(&rejected_context))
.WillOnce(SaveArg<0>(&positive_context));
@@ -1706,7 +1755,7 @@ TEST_F(ConnectionHandlerTest, SessionStarted_DealyProtect) {
SessionContext context_new, context_second, context_third;
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _, _))
.WillOnce(SaveArg<0>(&context_new))
.WillOnce(SaveArg<0>(&context_second))
.WillOnce(SaveArg<0>(&context_third));
@@ -1761,7 +1810,7 @@ TEST_F(ConnectionHandlerTest, SessionStarted_DealyProtectBulk) {
SessionContext new_context;
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _, _))
.WillOnce(SaveArg<0>(&new_context));
connection_handler_->OnSessionStartedCallback(uid_,
out_context_.new_session_id_,
@@ -1867,7 +1916,7 @@ TEST_F(ConnectionHandlerTest, GetSSLContext_ByProtectedService) {
SessionContext new_context;
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _, _))
.WillOnce(SaveArg<0>(&new_context));
// Open kAudio service
@@ -1904,7 +1953,7 @@ TEST_F(ConnectionHandlerTest, GetSSLContext_ByDealyProtectedRPC) {
SessionContext new_context;
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _, _))
.WillOnce(SaveArg<0>(&new_context));
// Protect kRpc (Bulk will be protect also)
@@ -1944,7 +1993,7 @@ TEST_F(ConnectionHandlerTest, GetSSLContext_ByDealyProtectedBulk) {
SessionContext new_context;
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
- EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _))
+ EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _, _))
.WillOnce(SaveArg<0>(&new_context));
// Protect Bulk (kRpc will be protected also)
diff --git a/src/components/formatters/include/formatters/CSmartFactory.h b/src/components/formatters/include/formatters/CSmartFactory.h
index c384dbf01d..83bcbb770e 100644
--- a/src/components/formatters/include/formatters/CSmartFactory.h
+++ b/src/components/formatters/include/formatters/CSmartFactory.h
@@ -147,16 +147,18 @@ class CSmartFactory {
* @brief Attach schema to the function SmartObject.
*
* @param object SmartObject to attach schema for.
- *
* @param remove_unknown_parameters contains true if need
* to remove fake parameters from smart object otherwise contains false.
+ * @param MessageVersion the version of the schema to be applied
+ * @param report__ object for reporting warnings during schema application
*
* @return True if operation was successful or false otherwise.
*/
bool attachSchema(
ns_smart_device_link::ns_smart_objects::SmartObject& object,
const bool remove_unknown_parameters,
- const utils::SemanticVersion& MessageVersion = utils::SemanticVersion());
+ const utils::SemanticVersion& MessageVersion = utils::SemanticVersion(),
+ rpc::ValidationReport* report__ = nullptr);
/**
* @brief Attach schema to the struct SmartObject.
@@ -277,7 +279,8 @@ template <class FunctionIdEnum, class MessageTypeEnum, class StructIdEnum>
bool CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::attachSchema(
ns_smart_device_link::ns_smart_objects::SmartObject& object,
const bool remove_unknown_parameters,
- const utils::SemanticVersion& MessageVersion) {
+ const utils::SemanticVersion& MessageVersion,
+ rpc::ValidationReport* report__) {
if (false == object.keyExists(strings::S_PARAMS))
return false;
if (false == object[strings::S_PARAMS].keyExists(strings::S_MESSAGE_TYPE))
@@ -305,7 +308,7 @@ bool CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::attachSchema(
object.setSchema(schemaIterator->second);
schemaIterator->second.applySchema(
- object, remove_unknown_parameters, MessageVersion);
+ object, remove_unknown_parameters, MessageVersion, report__);
return true;
}
diff --git a/src/components/formatters/src/CFormatterJsonBase.cc b/src/components/formatters/src/CFormatterJsonBase.cc
index e5354d5326..d88ffc7158 100644
--- a/src/components/formatters/src/CFormatterJsonBase.cc
+++ b/src/components/formatters/src/CFormatterJsonBase.cc
@@ -95,7 +95,7 @@ void ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonBase::
for (std::set<std::string>::const_iterator key = keys.begin();
key != keys.end();
- key++) {
+ ++key) {
Json::Value value(Json::nullValue);
objToJsonValue(obj.getElement(*key), value);
diff --git a/src/components/formatters/test/include/formatters/SmartFactoryTestHelper.h b/src/components/formatters/test/include/formatters/SmartFactoryTestHelper.h
index 08962db120..d937849b5d 100644
--- a/src/components/formatters/test/include/formatters/SmartFactoryTestHelper.h
+++ b/src/components/formatters/test/include/formatters/SmartFactoryTestHelper.h
@@ -110,10 +110,6 @@ class CSmartFactoryTest : public CSmartFactory<FunctionIdTest::eType,
std::shared_ptr<ISchemaItem> >
TStructsSchemaItems;
- static std::shared_ptr<ISchemaItem> ProvideObjectSchemaItemForStruct(
- TStructsSchemaItems& struct_schema_items,
- const StructIdentifiersTest::eType struct_id);
-
void InitStructSchemes(TStructsSchemaItems& struct_schema_items);
void InitFunctionSchemes(
diff --git a/src/components/formatters/test/src/SmartFactoryTestHelper.cc b/src/components/formatters/test/src/SmartFactoryTestHelper.cc
index 4d089ff9b1..dd4dbe5910 100644
--- a/src/components/formatters/test/src/SmartFactoryTestHelper.cc
+++ b/src/components/formatters/test/src/SmartFactoryTestHelper.cc
@@ -432,13 +432,6 @@ std::shared_ptr<ISchemaItem> CSmartFactoryTest::InitStructSchemaItem_Common_1(
TSchemaItemParameter<size_t>(500),
TSchemaItemParameter<std::string>());
- // Struct member image.
- //
- // Image struct
- std::shared_ptr<ISchemaItem> image_SchemaItem =
- ProvideObjectSchemaItemForStruct(struct_schema_items,
- StructIdentifiersTest::Common_2);
-
// Struct member position.
//
// Position to display item
@@ -446,19 +439,12 @@ std::shared_ptr<ISchemaItem> CSmartFactoryTest::InitStructSchemaItem_Common_1(
TNumberSchemaItem<int32_t>::create(TSchemaItemParameter<int32_t>(1),
TSchemaItemParameter<int32_t>(500),
TSchemaItemParameter<int32_t>());
- Members struct_members;
- struct_members["image"] = SMember(image_SchemaItem, false);
Members schema_members;
schema_members["text"] = SMember(text_SchemaItem, true);
schema_members["position"] = SMember(position_SchemaItem, true);
- Members root_members_map;
- root_members_map[""] =
- SMember(CObjectSchemaItem::create(struct_members), true);
- root_members_map[""] =
- SMember(CObjectSchemaItem::create(schema_members), true);
return CObjectSchemaItem::create(schema_members);
}
@@ -485,16 +471,3 @@ CSmartFactoryTest::InitStructSchemaItem_Common_2() {
return CObjectSchemaItem::create(schema_members);
}
-
-std::shared_ptr<ISchemaItem>
-CSmartFactoryTest::ProvideObjectSchemaItemForStruct(
- TStructsSchemaItems& struct_schema_items,
- const StructIdentifiersTest::eType struct_id) {
- const TStructsSchemaItems::const_iterator it =
- struct_schema_items.find(struct_id);
- if (it != struct_schema_items.end()) {
- return it->second;
- }
- return ns_smart_device_link::ns_smart_objects::CAlwaysFalseSchemaItem::
- create();
-}
diff --git a/src/components/formatters/test/src/create_smartSchema.cc b/src/components/formatters/test/src/create_smartSchema.cc
index c852c65ea1..23459e2eac 100644
--- a/src/components/formatters/test/src/create_smartSchema.cc
+++ b/src/components/formatters/test/src/create_smartSchema.cc
@@ -139,6 +139,8 @@ const AppTypeTest::eType
test::components::formatters::AppTypeTest::MEDIA,
};
+#ifdef BUILD_TESTS
+// cppcheck-suppress unusedFunction //Used in unit tests
CSmartSchema initObjectSchema() {
std::set<TestType::eType> resultCode_allowedEnumSubsetValues;
resultCode_allowedEnumSubsetValues.insert(
@@ -222,6 +224,7 @@ CSmartSchema initObjectSchema() {
return CSmartSchema(CObjectSchemaItem::create(rootMembersMap));
};
+// cppcheck-suppress unusedFunction //Used in unit tests
CSmartSchema initSchemaForMetaFormatter() {
std::set<TestType::eType> resultCode_allowedEnumSubsetValues;
resultCode_allowedEnumSubsetValues.insert(
@@ -336,15 +339,6 @@ CSmartSchema initSchemaForMetaFormatter() {
ISchemaItemPtr majorVersion_SchemaItem = TNumberSchemaItem<int>::create();
ISchemaItemPtr minorVersion_SchemaItem = TNumberSchemaItem<int>::create();
ISchemaItemPtr patchVersion_SchemaItem = TNumberSchemaItem<int>::create();
- ISchemaItemPtr syncMsg_SchemaItem =
- CStringSchemaItem::create(TSchemaItemParameter<size_t>(0),
- TSchemaItemParameter<size_t>(1000),
- TSchemaItemParameter<std::string>());
-
- ISchemaItemPtr syncMsgVersion_SchemaItem =
- CArraySchemaItem::create(syncMsg_SchemaItem,
- TSchemaItemParameter<size_t>(0),
- TSchemaItemParameter<size_t>(1000));
// Creation map for syncMsgVersion
std::map<std::string, SMember> schemaSyncMsgVersionMap;
@@ -400,6 +394,7 @@ CSmartSchema initSchemaForMetaFormatter() {
SMember(CObjectSchemaItem::create(paramsMembersMap), true);
return CSmartSchema(CObjectSchemaItem::create(rootMembersMap));
};
+#endif // BUILD_TESTS
} // namespace formatters
} // namespace components
diff --git a/src/components/formatters/test/src/meta_formatter_test_helper.cc b/src/components/formatters/test/src/meta_formatter_test_helper.cc
index 4f8975fe53..0c396d4dc7 100644
--- a/src/components/formatters/test/src/meta_formatter_test_helper.cc
+++ b/src/components/formatters/test/src/meta_formatter_test_helper.cc
@@ -148,7 +148,7 @@ void CMetaFormatterTestHelper::CompareObjects(const SmartObject& first,
for (std::set<std::string>::const_iterator key = keys.begin();
key != keys.end();
- key++) {
+ ++key) {
CompareObjects(first.getElement(*key), second.getElement(*key));
}
} else if (SmartType_Boolean == first.getType()) {
diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/mb_controller.h b/src/components/hmi_message_handler/include/hmi_message_handler/mb_controller.h
index 544a3ca275..5a10ccee38 100644
--- a/src/components/hmi_message_handler/include/hmi_message_handler/mb_controller.h
+++ b/src/components/hmi_message_handler/include/hmi_message_handler/mb_controller.h
@@ -58,8 +58,6 @@ using namespace boost::beast::websocket;
namespace hmi_message_handler {
-CREATE_LOGGERPTR_GLOBAL(mb_logger_, "HMIMessageHandler")
-
enum ErrorCode {
CONTROLLER_EXISTS = -32000,
SUBSCRIBTION_EXISTS = -32001,
@@ -68,8 +66,7 @@ enum ErrorCode {
class WebsocketSession;
-class CMessageBrokerController
- : public std::enable_shared_from_this<CMessageBrokerController> {
+class CMessageBrokerController {
public:
CMessageBrokerController(const std::string& address,
uint16_t port,
@@ -101,7 +98,7 @@ class CMessageBrokerController
void sendResponse(Json::Value& message);
- void sendJsonMessage(Json::Value& message);
+ bool sendJsonMessage(Json::Value& message);
void subscribeTo(std::string property);
@@ -125,30 +122,32 @@ class CMessageBrokerController
std::string GetComponentName(std::string& method);
- void processInternalRequest(Json::Value& message,
- WebsocketSession* ws_session);
+ void processInternalRequest(const Json::Value& message,
+ WebsocketSession& ws_session);
- void pushRequest(Json::Value& message, WebsocketSession* ws_session);
+ bool pushRequest(Json::Value& message, WebsocketSession& ws_session);
// Registry
- bool addController(WebsocketSession* ws_session, std::string name);
+ bool addController(WebsocketSession& ws_session, const std::string& name);
- void deleteController(WebsocketSession* ws_session);
+ void deleteController(WebsocketSession& ws_session);
- void deleteController(std::string name);
+ void deleteController(const std::string& name);
- void removeSubscribersBySession(const WebsocketSession* ws);
+ void removeSubscribersBySession(const WebsocketSession& ws);
- bool addSubscriber(WebsocketSession* ws_session, std::string name);
+ bool addSubscriber(WebsocketSession& ws_session, const std::string& name);
- void deleteSubscriber(WebsocketSession* ws, std::string name);
+ void deleteSubscriber(const WebsocketSession& ws, const std::string& name);
- int getSubscribersFd(std::string name,
- std::vector<WebsocketSession*>& result);
+ std::vector<std::shared_ptr<WebsocketSession> > getSubscribersFd(
+ const std::string& name);
int getNextControllerId();
private:
+ void CloseConnection();
+
boost::asio::io_context ioc_;
const std::string& address_;
uint16_t port_;
@@ -168,13 +167,13 @@ class CMessageBrokerController
mConnectionList;
sync_primitives::Lock mConnectionListLock;
- std::map<std::string, WebsocketSession*> mControllersList;
+ std::map<std::string, std::weak_ptr<WebsocketSession> > mControllersList;
sync_primitives::Lock mControllersListLock;
- std::multimap<std::string, WebsocketSession*> mSubscribersList;
+ std::multimap<std::string, std::weak_ptr<WebsocketSession> > mSubscribersList;
sync_primitives::Lock mSubscribersListLock;
- std::map<std::string, WebsocketSession*> mRequestList;
+ std::map<std::string, std::weak_ptr<WebsocketSession> > mRequestList;
sync_primitives::Lock mRequestListLock;
std::atomic_bool shutdown_;
@@ -182,4 +181,4 @@ class CMessageBrokerController
} // namespace hmi_message_handler
-#endif /* MB_CONTROLLER_H */ \ No newline at end of file
+#endif /* MB_CONTROLLER_H */
diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/websocket_session.h b/src/components/hmi_message_handler/include/hmi_message_handler/websocket_session.h
index 08d1b55aaf..67a46aca56 100644
--- a/src/components/hmi_message_handler/include/hmi_message_handler/websocket_session.h
+++ b/src/components/hmi_message_handler/include/hmi_message_handler/websocket_session.h
@@ -83,8 +83,6 @@ typedef std::shared_ptr<std::string> Message;
namespace hmi_message_handler {
-CREATE_LOGGERPTR_GLOBAL(ws_logger_, "HMIMessageHandler")
-
class CMessageBrokerController;
class WebsocketSession : public std::enable_shared_from_this<WebsocketSession> {
@@ -203,4 +201,4 @@ class WebsocketSession : public std::enable_shared_from_this<WebsocketSession> {
} // namespace hmi_message_handler
-#endif /* WEBSOCKET_SESSION_H */ \ No newline at end of file
+#endif /* WEBSOCKET_SESSION_H */
diff --git a/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc b/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc
index 70865f7771..93ba433d3e 100644
--- a/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc
+++ b/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc
@@ -35,7 +35,7 @@
namespace hmi_message_handler {
-CREATE_LOGGERPTR_GLOBAL(logger_, "HMIMessageHandler")
+SDL_CREATE_LOG_VARIABLE("HMIMessageHandler")
HMIMessageHandlerImpl::HMIMessageHandlerImpl(
const HMIMessageHandlerSettings& settings)
@@ -51,47 +51,47 @@ HMIMessageHandlerImpl::HMIMessageHandlerImpl(
threads::ThreadOptions(get_settings().thread_min_stack_size())) {}
HMIMessageHandlerImpl::~HMIMessageHandlerImpl() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
messages_to_hmi_.Shutdown();
messages_from_hmi_.Shutdown();
set_message_observer(NULL);
}
void HMIMessageHandlerImpl::OnMessageReceived(MessageSharedPointer message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(observer_locker_);
if (!observer_) {
- LOG4CXX_WARN(logger_, "No HMI message observer set!");
+ SDL_LOG_WARN("No HMI message observer set!");
return;
}
messages_from_hmi_.PostMessage(impl::MessageFromHmi(message));
}
void HMIMessageHandlerImpl::SendMessageToHMI(MessageSharedPointer message) {
- LOG4CXX_INFO(logger_, "SendMessageToHMI");
+ SDL_LOG_INFO("SendMessageToHMI");
messages_to_hmi_.PostMessage(impl::MessageToHmi(message));
}
void HMIMessageHandlerImpl::set_message_observer(HMIMessageObserver* observer) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(observer_locker_);
observer_ = observer;
}
void HMIMessageHandlerImpl::OnErrorSending(MessageSharedPointer message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(observer_locker_);
if (!observer_) {
- LOG4CXX_WARN(logger_, "No HMI message observer set!");
+ SDL_LOG_WARN("No HMI message observer set!");
return;
}
observer_->OnErrorSending(message);
}
void HMIMessageHandlerImpl::AddHMIMessageAdapter(HMIMessageAdapter* adapter) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!adapter) {
- LOG4CXX_WARN(logger_, "HMIMessageAdapter is not valid!");
+ SDL_LOG_WARN("HMIMessageAdapter is not valid!");
return;
}
sync_primitives::AutoLock lock(message_adapters_locker_);
@@ -100,9 +100,9 @@ void HMIMessageHandlerImpl::AddHMIMessageAdapter(HMIMessageAdapter* adapter) {
void HMIMessageHandlerImpl::RemoveHMIMessageAdapter(
HMIMessageAdapter* adapter) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!adapter) {
- LOG4CXX_WARN(logger_, "HMIMessageAdapter is not valid!");
+ SDL_LOG_WARN("HMIMessageAdapter is not valid!");
return;
}
sync_primitives::AutoLock lock(message_adapters_locker_);
@@ -114,15 +114,15 @@ const HMIMessageHandlerSettings& HMIMessageHandlerImpl::get_settings() const {
}
void HMIMessageHandlerImpl::Handle(const impl::MessageFromHmi message) {
- LOG4CXX_INFO(logger_, "Received message from hmi");
+ SDL_LOG_INFO("Received message from hmi");
sync_primitives::AutoLock lock(observer_locker_);
if (!observer_) {
- LOG4CXX_ERROR(logger_, "Observer is not set for HMIMessageHandler");
+ SDL_LOG_ERROR("Observer is not set for HMIMessageHandler");
return;
}
observer_->OnMessageReceived(message);
- LOG4CXX_INFO(logger_, "Message from hmi given away.");
+ SDL_LOG_INFO("Message from hmi given away.");
}
void HMIMessageHandlerImpl::Handle(const impl::MessageToHmi message) {
sync_primitives::AutoLock lock(message_adapters_locker_);
diff --git a/src/components/hmi_message_handler/src/mb_controller.cc b/src/components/hmi_message_handler/src/mb_controller.cc
index ffc6ef23a3..e74f719780 100644
--- a/src/components/hmi_message_handler/src/mb_controller.cc
+++ b/src/components/hmi_message_handler/src/mb_controller.cc
@@ -33,6 +33,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace boost::beast::websocket;
namespace hmi_message_handler {
+SDL_CREATE_LOG_VARIABLE("HMIMessageHandler")
+
CMessageBrokerController::CMessageBrokerController(const std::string& address,
uint16_t port,
std::string name,
@@ -50,15 +52,8 @@ CMessageBrokerController::CMessageBrokerController(const std::string& address,
}
CMessageBrokerController::~CMessageBrokerController() {
- boost::system::error_code ec;
- socket_.close();
- acceptor_.close(ec);
- if (ec) {
- std::string str_err = "ErrorMessage Close: " + ec.message();
- LOG4CXX_ERROR(mb_logger_, str_err);
- }
- shutdown_ = true;
- ioc_.stop();
+ shutdown_.exchange(true);
+ CloseConnection();
}
bool CMessageBrokerController::StartListener() {
@@ -66,26 +61,26 @@ bool CMessageBrokerController::StartListener() {
acceptor_.open(endpoint_.protocol(), error);
if (error) {
std::string str_err = "ErrorOpen: " + error.message();
- LOG4CXX_ERROR(mb_logger_, str_err);
+ SDL_LOG_ERROR(str_err);
return false;
}
acceptor_.set_option(boost::asio::socket_base::reuse_address(true), error);
if (error) {
std::string str_err = "ErrorSetOption: " + error.message();
- LOG4CXX_ERROR(mb_logger_, str_err);
+ SDL_LOG_ERROR(str_err);
return false;
}
acceptor_.bind(endpoint_, error);
if (error) {
std::string str_err = "ErrorBind: " + error.message();
- LOG4CXX_ERROR(mb_logger_, str_err);
+ SDL_LOG_ERROR(str_err);
return false;
}
acceptor_.listen(boost::asio::socket_base::max_listen_connections, error);
if (error) {
std::string str_err = "ErrorListen: " + error.message();
- LOG4CXX_ERROR(mb_logger_, str_err);
+ SDL_LOG_ERROR(str_err);
return false;
}
return true;
@@ -114,9 +109,8 @@ void CMessageBrokerController::WaitForConnection() {
void CMessageBrokerController::StartSession(boost::system::error_code ec) {
if (ec) {
- std::string str_err = "ErrorMessage: " + ec.message();
- LOG4CXX_ERROR(mb_logger_, str_err);
- ioc_.stop();
+ SDL_LOG_ERROR("ErrorMessage: " << ec.message());
+ CloseConnection();
return;
}
if (shutdown_) {
@@ -143,15 +137,13 @@ bool CMessageBrokerController::isNotification(Json::Value& message) {
void CMessageBrokerController::sendNotification(Json::Value& message) {
std::string methodName = message["method"].asString();
- std::vector<WebsocketSession*> result;
- int subscribersCount = getSubscribersFd(methodName, result);
- if (0 < subscribersCount) {
- std::vector<WebsocketSession*>::iterator it;
- for (it = result.begin(); it != result.end(); it++) {
- (*it)->sendJsonMessage(message);
- }
- } else {
- LOG4CXX_ERROR(mb_logger_, ("No subscribers for this property!\n"));
+ const auto result = getSubscribersFd(methodName);
+ if (result.empty()) {
+ SDL_LOG_ERROR("No subscribers for method: " << methodName);
+ }
+
+ for (const auto& ws : result) {
+ ws->sendJsonMessage(message);
}
}
@@ -165,40 +157,59 @@ bool CMessageBrokerController::isResponse(Json::Value& message) {
}
void CMessageBrokerController::sendResponse(Json::Value& message) {
- WebsocketSession* ws;
- std::map<std::string, WebsocketSession*>::iterator it;
- sync_primitives::AutoLock request_lock(mRequestListLock);
-
+ std::weak_ptr<WebsocketSession> weak_ws;
std::string id = message["id"].asString();
- it = mRequestList.find(id);
- if (it != mRequestList.end()) {
- ws = it->second;
+
+ {
+ sync_primitives::AutoLock request_lock(mRequestListLock);
+ const auto it = mRequestList.find(id);
+ if (it != mRequestList.end()) {
+ std::swap(weak_ws, it->second);
+ mRequestList.erase(it);
+ }
+ }
+
+ if (auto ws = weak_ws.lock()) {
ws->sendJsonMessage(message);
- mRequestList.erase(it);
+ } else {
+ SDL_LOG_ERROR("A request is not found for id: " << id);
}
}
-void CMessageBrokerController::sendJsonMessage(Json::Value& message) {
+bool CMessageBrokerController::sendJsonMessage(Json::Value& message) {
if (isNotification(message)) {
sendNotification(message);
- return;
+ return true;
} else if (isResponse(message)) {
sendResponse(message);
- return;
+ return true;
}
// Send request
- WebsocketSession* ws;
- std::map<std::string, WebsocketSession*>::iterator it;
+ std::shared_ptr<WebsocketSession> ws;
std::string method = message["method"].asString();
std::string component_name = GetComponentName(method);
- sync_primitives::AutoLock lock(mControllersListLock);
- it = mControllersList.find(component_name);
- if (it != mControllersList.end()) {
- ws = it->second;
- ws->sendJsonMessage(message);
+ {
+ sync_primitives::AutoLock lock(mControllersListLock);
+ const auto it = mControllersList.find(component_name);
+ if (it != mControllersList.end()) {
+ ws = it->second.lock();
+ if (!ws) {
+ // Clear expired
+ mControllersList.erase(it);
+ }
+ }
+ }
+
+ if (!ws) {
+ SDL_LOG_ERROR(
+ "A controller is not found for the method: " << component_name);
+ return false;
}
+
+ ws->sendJsonMessage(message);
+ return true;
}
void CMessageBrokerController::subscribeTo(std::string property) {}
@@ -216,7 +227,8 @@ bool CMessageBrokerController::Connect() {
}
void CMessageBrokerController::exitReceivingThread() {
- shutdown_ = true;
+ shutdown_.exchange(true);
+
mConnectionListLock.Acquire();
std::vector<std::shared_ptr<hmi_message_handler::WebsocketSession> >::iterator
it;
@@ -225,19 +237,7 @@ void CMessageBrokerController::exitReceivingThread() {
it = mConnectionList.erase(it);
}
mConnectionListLock.Release();
-
- boost::system::error_code ec;
- socket_.close();
- acceptor_.cancel(ec);
- if (ec) {
- std::string str_err = "ErrorMessage Cancel: " + ec.message();
- LOG4CXX_ERROR(mb_logger_, str_err);
- }
- acceptor_.close(ec);
- if (ec) {
- std::string str_err = "ErrorMessage Close: " + ec.message();
- }
- ioc_.stop();
+ CloseConnection();
}
std::string CMessageBrokerController::getMethodName(std::string& method) {
@@ -262,139 +262,121 @@ std::string CMessageBrokerController::GetComponentName(std::string& method) {
return return_string;
}
-bool CMessageBrokerController::addController(WebsocketSession* ws_session,
- std::string name) {
- bool result = false;
- std::map<std::string, WebsocketSession*>::iterator it;
-
+bool CMessageBrokerController::addController(WebsocketSession& ws_session,
+ const std::string& name) {
sync_primitives::AutoLock lock(mControllersListLock);
- it = mControllersList.find(name);
- if (it == mControllersList.end()) {
- mControllersList.insert(
- std::map<std::string, WebsocketSession*>::value_type(name, ws_session));
- result = true;
- } else {
- LOG4CXX_ERROR(mb_logger_, ("Controller already exists!\n"));
- }
- return result;
+ return mControllersList.emplace(name, ws_session.shared_from_this()).second;
}
-void CMessageBrokerController::deleteController(WebsocketSession* ws_session) {
- {
- sync_primitives::AutoLock lock(mControllersListLock);
- std::map<std::string, WebsocketSession*>::iterator it;
- for (it = mControllersList.begin(); it != mControllersList.end();) {
- if (it->second == ws_session) {
- mControllersList.erase(it++);
- } else {
- it++;
- }
+void CMessageBrokerController::deleteController(WebsocketSession& ws_session) {
+ removeSubscribersBySession(ws_session);
+ sync_primitives::AutoLock lock(mControllersListLock);
+ for (auto it = mControllersList.cbegin(); it != mControllersList.cend();) {
+ const std::shared_ptr<WebsocketSession> ws = it->second.lock();
+ if (!ws || ws.get() == &ws_session) {
+ it = mControllersList.erase(it);
+ } else {
+ ++it;
}
}
- removeSubscribersBySession(ws_session);
}
-void CMessageBrokerController::deleteController(std::string name) {
- std::map<std::string, WebsocketSession*>::iterator it;
- WebsocketSession* ws;
+void CMessageBrokerController::deleteController(const std::string& name) {
+ std::weak_ptr<WebsocketSession> weak_ws;
{
sync_primitives::AutoLock lock(mControllersListLock);
- it = mControllersList.find(name);
+ const auto it = mControllersList.find(name);
if (it != mControllersList.end()) {
- ws = it->second;
+ std::swap(weak_ws, it->second);
mControllersList.erase(it);
- } else {
- return;
}
}
- removeSubscribersBySession(ws);
+
+ if (auto ws = weak_ws.lock()) {
+ removeSubscribersBySession(*ws);
+ } else {
+ SDL_LOG_ERROR("A controller is not found for the method: " << name);
+ }
}
void CMessageBrokerController::removeSubscribersBySession(
- const WebsocketSession* ws) {
+ const WebsocketSession& ws) {
sync_primitives::AutoLock lock(mSubscribersListLock);
- std::multimap<std::string, WebsocketSession*>::iterator it_s =
- mSubscribersList.begin();
- for (; it_s != mSubscribersList.end();) {
- if (it_s->second == ws) {
- mSubscribersList.erase(it_s++);
+ for (auto it_s = mSubscribersList.cbegin();
+ it_s != mSubscribersList.cend();) {
+ auto ws_session = it_s->second.lock();
+ if (!ws_session || ws_session.get() == &ws) {
+ it_s = mSubscribersList.erase(it_s);
} else {
++it_s;
}
}
}
-void CMessageBrokerController::pushRequest(Json::Value& message,
- WebsocketSession* ws_session) {
- sync_primitives::AutoLock lock(mRequestListLock);
+bool CMessageBrokerController::pushRequest(Json::Value& message,
+ WebsocketSession& ws_session) {
std::string id = message["id"].asString();
- mRequestList.insert(
- std::map<std::string, WebsocketSession*>::value_type(id, ws_session));
+ sync_primitives::AutoLock lock(mRequestListLock);
+ return mRequestList.emplace(std::move(id), ws_session.shared_from_this())
+ .second;
}
-bool CMessageBrokerController::addSubscriber(WebsocketSession* ws_session,
- std::string name) {
- bool result = true;
+bool CMessageBrokerController::addSubscriber(WebsocketSession& ws_session,
+ const std::string& name) {
sync_primitives::AutoLock lock(mSubscribersListLock);
- std::pair<std::multimap<std::string, WebsocketSession*>::iterator,
- std::multimap<std::string, WebsocketSession*>::iterator>
- p = mSubscribersList.equal_range(name);
- if (p.first != p.second) {
- std::multimap<std::string, WebsocketSession*>::iterator itr;
- for (itr = p.first; itr != p.second; itr++) {
- if (ws_session == itr->second) {
- result = false;
- LOG4CXX_ERROR(mb_logger_, ("Subscriber already exists!\n"));
- }
+ auto p = mSubscribersList.equal_range(name);
+ for (auto it = p.first; it != p.second;) {
+ const std::shared_ptr<WebsocketSession> ws = it->second.lock();
+ if (!ws) {
+ // Clear expired
+ it = mSubscribersList.erase(it);
+ } else if (ws.get() == &ws_session) {
+ // Found an element: {name, ws_session}
+ return false;
+ } else {
+ ++it;
}
}
- if (result) {
- mSubscribersList.insert(
- std::map<std::string, WebsocketSession*>::value_type(name, ws_session));
- }
- return result;
+
+ // Not found an element: {name, ws_session}
+ mSubscribersList.emplace_hint(p.second, name, ws_session.shared_from_this());
+ return true;
}
-void CMessageBrokerController::deleteSubscriber(WebsocketSession* ws,
- std::string name) {
+void CMessageBrokerController::deleteSubscriber(const WebsocketSession& ws,
+ const std::string& name) {
sync_primitives::AutoLock lock(mSubscribersListLock);
- std::pair<std::multimap<std::string, WebsocketSession*>::iterator,
- std::multimap<std::string, WebsocketSession*>::iterator>
- p = mSubscribersList.equal_range(name);
- if (p.first != p.second) {
- std::multimap<std::string, WebsocketSession*>::iterator itr;
- for (itr = p.first; itr != p.second;) {
- if (ws == itr->second) {
- mSubscribersList.erase(itr++);
- } else {
- ++itr;
- }
+ auto p = mSubscribersList.equal_range(name);
+ for (auto it = p.first; it != p.second;) {
+ const std::shared_ptr<WebsocketSession> ws_session = it->second.lock();
+ if (!ws_session || &ws == ws_session.get()) {
+ it = mSubscribersList.erase(it);
+ } else {
+ ++it;
}
}
}
-int CMessageBrokerController::getSubscribersFd(
- std::string name, std::vector<WebsocketSession*>& result) {
- int res = 0;
- std::map<std::string, WebsocketSession*>::iterator it;
-
+std::vector<std::shared_ptr<WebsocketSession> >
+CMessageBrokerController::getSubscribersFd(const std::string& name) {
+ std::vector<std::shared_ptr<WebsocketSession> > result;
sync_primitives::AutoLock lock(mSubscribersListLock);
- std::pair<std::multimap<std::string, WebsocketSession*>::iterator,
- std::multimap<std::string, WebsocketSession*>::iterator>
- p = mSubscribersList.equal_range(name);
- if (p.first != p.second) {
- std::multimap<std::string, WebsocketSession*>::iterator itr;
- for (itr = p.first; itr != p.second; itr++) {
- result.push_back(itr->second);
+ auto p = mSubscribersList.equal_range(name);
+ for (auto it = p.first; it != p.second;) {
+ if (std::shared_ptr<WebsocketSession> ws = it->second.lock()) {
+ result.push_back(std::move(ws));
+ ++it;
+ } else {
+ // Clear expired
+ it = mSubscribersList.erase(it);
}
}
- res = result.size();
- return res;
+ return result;
}
void CMessageBrokerController::processInternalRequest(
- Json::Value& message, WebsocketSession* ws_session) {
+ const Json::Value& message, WebsocketSession& ws_session) {
std::string method = message["method"].asString();
std::string methodName = getMethodName(method);
if (methodName == "registerComponent") {
@@ -407,7 +389,7 @@ void CMessageBrokerController::processInternalRequest(
response["id"] = message["id"];
response["jsonrpc"] = "2.0";
response["result"] = getNextControllerId();
- ws_session->sendJsonMessage(response);
+ ws_session.sendJsonMessage(response);
} else {
Json::Value error, err;
error["id"] = message["id"];
@@ -415,7 +397,7 @@ void CMessageBrokerController::processInternalRequest(
err["code"] = CONTROLLER_EXISTS;
err["message"] = "Controller has been already registered.";
error["error"] = err;
- ws_session->sendJsonMessage(error);
+ ws_session.sendJsonMessage(error);
}
} else {
Json::Value error, err;
@@ -424,7 +406,7 @@ void CMessageBrokerController::processInternalRequest(
err["code"] = INVALID_REQUEST;
err["message"] = "Wrong method parameter.";
error["error"] = err;
- ws_session->sendJsonMessage(error);
+ ws_session.sendJsonMessage(error);
}
} else if (methodName == "subscribeTo") {
Json::Value params = message["params"];
@@ -435,7 +417,7 @@ void CMessageBrokerController::processInternalRequest(
response["id"] = message["id"];
response["jsonrpc"] = "2.0";
response["result"] = "OK";
- ws_session->sendJsonMessage(response);
+ ws_session.sendJsonMessage(response);
} else {
Json::Value error, err;
error["id"] = message["id"];
@@ -443,7 +425,7 @@ void CMessageBrokerController::processInternalRequest(
err["code"] = CONTROLLER_EXISTS;
err["message"] = "Subscribe has been already registered.";
error["error"] = err;
- ws_session->sendJsonMessage(error);
+ ws_session.sendJsonMessage(error);
}
} else {
Json::Value error, err;
@@ -452,7 +434,7 @@ void CMessageBrokerController::processInternalRequest(
err["code"] = INVALID_REQUEST;
err["message"] = "Wrong method parameter.";
error["error"] = err;
- ws_session->sendJsonMessage(error);
+ ws_session.sendJsonMessage(error);
}
} else if (methodName == "unregisterComponent") {
@@ -465,7 +447,7 @@ void CMessageBrokerController::processInternalRequest(
response["id"] = message["id"];
response["jsonrpc"] = "2.0";
response["result"] = "OK";
- ws_session->sendJsonMessage(response);
+ ws_session.sendJsonMessage(response);
} else {
Json::Value error, err;
error["id"] = message["id"];
@@ -473,7 +455,7 @@ void CMessageBrokerController::processInternalRequest(
err["code"] = INVALID_REQUEST;
err["message"] = "Wrong method parameter.";
error["error"] = err;
- ws_session->sendJsonMessage(error);
+ ws_session.sendJsonMessage(error);
}
} else if (methodName == "unsubscribeFrom") {
Json::Value params = message["params"];
@@ -484,7 +466,7 @@ void CMessageBrokerController::processInternalRequest(
response["id"] = message["id"];
response["jsonrpc"] = "2.0";
response["result"] = "OK";
- ws_session->sendJsonMessage(response);
+ ws_session.sendJsonMessage(response);
} else {
Json::Value error, err;
error["id"] = message["id"];
@@ -492,7 +474,7 @@ void CMessageBrokerController::processInternalRequest(
err["code"] = INVALID_REQUEST;
err["message"] = "Wrong method parameter.";
error["error"] = err;
- ws_session->sendJsonMessage(error);
+ ws_session.sendJsonMessage(error);
}
} else {
}
@@ -501,4 +483,27 @@ void CMessageBrokerController::processInternalRequest(
int CMessageBrokerController::getNextControllerId() {
return 1000 * mControllersIdCounter++;
}
+
+void CMessageBrokerController::CloseConnection() {
+ if (!ioc_.stopped()) {
+ boost::system::error_code ec;
+
+ acceptor_.cancel(ec);
+ if (ec) {
+ SDL_LOG_ERROR("Acceptor cancel error: " << ec.message());
+ }
+
+ acceptor_.close(ec);
+ if (ec) {
+ SDL_LOG_ERROR("Acceptor close error: " << ec.message());
+ }
+
+ socket_.close(ec);
+ if (ec) {
+ SDL_LOG_ERROR("Socket close error : " << ec.message());
+ }
+
+ ioc_.stop();
+ }
+}
} // namespace hmi_message_handler
diff --git a/src/components/hmi_message_handler/src/messagebroker_adapter.cc b/src/components/hmi_message_handler/src/messagebroker_adapter.cc
index b5e2defd58..cc13341ca0 100644
--- a/src/components/hmi_message_handler/src/messagebroker_adapter.cc
+++ b/src/components/hmi_message_handler/src/messagebroker_adapter.cc
@@ -38,7 +38,7 @@
namespace hmi_message_handler {
-CREATE_LOGGERPTR_GLOBAL(logger_, "HMIMessageHandler")
+SDL_CREATE_LOG_VARIABLE("HMIMessageHandler")
typedef hmi_message_handler::CMessageBrokerController MessageBrokerController;
@@ -47,17 +47,17 @@ MessageBrokerAdapter::MessageBrokerAdapter(HMIMessageHandler* handler_param,
uint16_t port)
: HMIMessageAdapterImpl(handler_param)
, MessageBrokerController(server_address, port, "SDL", 8) {
- LOG4CXX_TRACE(logger_, "Created MessageBrokerAdapter");
+ SDL_LOG_TRACE("Created MessageBrokerAdapter");
}
MessageBrokerAdapter::~MessageBrokerAdapter() {}
void MessageBrokerAdapter::SendMessageToHMI(
hmi_message_handler::MessageSharedPointer message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (message.use_count() == 0) {
- LOG4CXX_ERROR(logger_, "Can`t send not valid message");
+ SDL_LOG_ERROR("Can`t send not valid message");
return;
}
@@ -66,31 +66,33 @@ void MessageBrokerAdapter::SendMessageToHMI(
const std::string str = message->json_message();
if (!reader.parse(str, &json_value)) {
- LOG4CXX_ERROR(logger_, "Received invalid json string. ");
+ SDL_LOG_ERROR("Received invalid json string. ");
return;
}
- sendJsonMessage(json_value);
+ if (!sendJsonMessage(json_value)) {
+ handler()->OnErrorSending(message);
+ }
}
void MessageBrokerAdapter::processResponse(std::string method,
Json::Value& root) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProcessRecievedFromMB(root);
}
void MessageBrokerAdapter::processRequest(Json::Value& root) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProcessRecievedFromMB(root);
}
void MessageBrokerAdapter::processNotification(Json::Value& root) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProcessRecievedFromMB(root);
}
void MessageBrokerAdapter::SubscribeTo() {
- LOG4CXX_INFO(logger_, "MessageBrokerAdapter::subscribeTo");
+ SDL_LOG_INFO("MessageBrokerAdapter::subscribeTo");
MessageBrokerController::subscribeTo("Buttons.OnButtonEvent");
MessageBrokerController::subscribeTo("Buttons.OnButtonPress");
MessageBrokerController::subscribeTo("UI.OnCommand");
@@ -143,8 +145,10 @@ void MessageBrokerAdapter::SubscribeTo() {
MessageBrokerController::subscribeTo("RC.OnRemoteControlSettings");
MessageBrokerController::subscribeTo(
"BasicCommunication.OnSystemCapabilityUpdated");
+ MessageBrokerController::subscribeTo("UI.OnUpdateFile");
+ MessageBrokerController::subscribeTo("UI.OnUpdateSubMenu");
- LOG4CXX_INFO(logger_, "Subscribed to notifications.");
+ SDL_LOG_INFO("Subscribed to notifications.");
}
void* MessageBrokerAdapter::SubscribeAndBeginReceiverThread(void* param) {
@@ -157,8 +161,8 @@ void* MessageBrokerAdapter::SubscribeAndBeginReceiverThread(void* param) {
}
void MessageBrokerAdapter::ProcessRecievedFromMB(Json::Value& root) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_INFO(logger_, "MB_Adapter: " << root);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_INFO("MB_Adapter: " << root);
if (root.isNull()) {
// LOG
return;
@@ -184,12 +188,12 @@ void MessageBrokerAdapter::ProcessRecievedFromMB(Json::Value& root) {
protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI);
if (!handler()) {
- LOG4CXX_WARN(logger_, "handler is NULL");
+ SDL_LOG_WARN("handler is NULL");
return;
}
handler()->OnMessageReceived(message);
- LOG4CXX_INFO(logger_, "Successfully sent to observer");
+ SDL_LOG_INFO("Successfully sent to observer");
}
} // namespace hmi_message_handler
diff --git a/src/components/hmi_message_handler/src/websocket_session.cc b/src/components/hmi_message_handler/src/websocket_session.cc
index 7ffb35aba6..a387b639a2 100644
--- a/src/components/hmi_message_handler/src/websocket_session.cc
+++ b/src/components/hmi_message_handler/src/websocket_session.cc
@@ -36,6 +36,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace boost::beast::websocket;
namespace hmi_message_handler {
+SDL_CREATE_LOG_VARIABLE("HMIMessageHandler")
+
WebsocketSession::WebsocketSession(boost::asio::ip::tcp::socket socket,
CMessageBrokerController* controller)
: ws_(std::move(socket))
@@ -49,7 +51,7 @@ WebsocketSession::WebsocketSession(boost::asio::ip::tcp::socket socket,
, thread_delegate_(new LoopThreadDelegate(&message_queue_, this))
, thread_(threads::CreateThread("WS Async Send", thread_delegate_)) {
m_writer["indentation"] = "";
- thread_->start(threads::ThreadOptions());
+ thread_->Start(threads::ThreadOptions());
}
WebsocketSession::~WebsocketSession() {}
@@ -64,7 +66,7 @@ void WebsocketSession::Accept() {
void WebsocketSession::Shutdown() {
shutdown_ = true;
thread_delegate_->SetShutdown();
- thread_->join();
+ thread_->Stop(threads::Thread::kThreadSoftStop);
delete thread_delegate_;
threads::DeleteThread(thread_);
}
@@ -80,10 +82,10 @@ void WebsocketSession::Recv(boost::system::error_code ec) {
if (ec) {
std::string str_err = "ErrorMessage: " + ec.message();
- LOG4CXX_ERROR(ws_logger_, str_err);
+ SDL_LOG_ERROR(str_err);
shutdown_ = true;
thread_delegate_->SetShutdown();
- controller_->deleteController(this);
+ controller_->deleteController(*this);
return;
}
@@ -121,10 +123,10 @@ void WebsocketSession::Read(boost::system::error_code ec,
boost::ignore_unused(bytes_transferred);
if (ec) {
std::string str_err = "ErrorMessage: " + ec.message();
- LOG4CXX_ERROR(ws_logger_, str_err);
+ SDL_LOG_ERROR(str_err);
shutdown_ = true;
thread_delegate_->SetShutdown();
- controller_->deleteController(this);
+ controller_->deleteController(*this);
buffer_.consume(buffer_.size());
return;
}
@@ -136,7 +138,7 @@ void WebsocketSession::Read(boost::system::error_code ec,
Json::Value root;
if (!reader.parse(data, &root)) {
- LOG4CXX_ERROR(ws_logger_, "Invalid JSON Message.");
+ SDL_LOG_ERROR("Invalid JSON Message.");
return;
}
@@ -179,8 +181,7 @@ void WebsocketSession::onMessageReceived(Json::Value message) {
if (message.isMember("result") && message["result"].isInt()) {
mControllersIdStart = message["result"].asInt();
} else {
- LOG4CXX_ERROR(ws_logger_,
- "Not possible to initialize mControllersIdStart!");
+ SDL_LOG_ERROR("Not possible to initialize mControllersIdStart!");
}
} else if ("MB.subscribeTo" == method ||
"MB.unregisterComponent" == method ||
@@ -190,22 +191,21 @@ void WebsocketSession::onMessageReceived(Json::Value message) {
controller_->processResponse(method, message);
}
} else {
- LOG4CXX_ERROR(ws_logger_,
- "Request with id: " + id + " has not been found!");
+ SDL_LOG_ERROR("Request with id: " + id + " has not been found!");
}
} else {
std::string method = message["method"].asString();
std::string component_name = GetComponentName(method);
if (component_name == "MB") {
- controller_->processInternalRequest(message, this);
+ controller_->processInternalRequest(message, *this);
} else {
- controller_->pushRequest(message, this);
+ controller_->pushRequest(message, *this);
controller_->processRequest(message);
}
}
} else {
- LOG4CXX_ERROR(ws_logger_, "Message contains wrong data!\n");
+ SDL_LOG_ERROR("Message contains wrong data!\n");
sendJsonMessage(error);
}
}
@@ -314,8 +314,7 @@ void WebsocketSession::LoopThreadDelegate::DrainQueue() {
boost::system::error_code ec;
handler_.ws_.write(boost::asio::buffer(*message_ptr), ec);
if (ec) {
- LOG4CXX_ERROR(ws_logger_,
- "A system error has occurred: " << ec.message());
+ SDL_LOG_ERROR("A system error has occurred: " << ec.message());
}
}
}
diff --git a/src/components/hmi_message_handler/test/hmi_message_handler_impl_test.cc b/src/components/hmi_message_handler/test/hmi_message_handler_impl_test.cc
index 84ca5883ab..c9ad49efed 100644
--- a/src/components/hmi_message_handler/test/hmi_message_handler_impl_test.cc
+++ b/src/components/hmi_message_handler/test/hmi_message_handler_impl_test.cc
@@ -191,7 +191,14 @@ TEST_F(HMIMessageHandlerImplTest, SendMessageToHMI_Success) {
}
TEST(WebsocketSessionTest, SendMessage_UnpreparedConnection_WithoutFall) {
- ::testing::FLAGS_gtest_death_test_style = "threadsafe";
+ // Value "threadsafe" is preferable for this case, but as workaround for
+ // possible bug in gcc compiler value "fast" was set. Because of this warning
+ // message is appeared.
+
+ // ToDo: set value "threadsafe", if current version of gcc can handle
+ // this value correctly without causing of core dump.
+
+ ::testing::FLAGS_gtest_death_test_style = "fast";
auto send_message = []() {
auto message =
diff --git a/src/components/include/application_manager/application_manager.h b/src/components/include/application_manager/application_manager.h
index a3aace0f3f..67f23956be 100644
--- a/src/components/include/application_manager/application_manager.h
+++ b/src/components/include/application_manager/application_manager.h
@@ -89,6 +89,7 @@ class Application;
class AppServiceManager;
class StateControllerImpl;
struct CommandParametersPermissions;
+struct ResetGlobalPropertiesResult;
using policy::RPCParams;
typedef std::vector<ApplicationSharedPtr> AppSharedPtrs;
struct ApplicationsSorter {
@@ -344,11 +345,25 @@ class ApplicationManager {
/**
* @brief Checks if Application is subscribed for way points
- * @param Application pointer
+ * @param Application id
+ * @return true if Application is subscribed for way points
+ * otherwise false
+ */
+ virtual bool IsAppSubscribedForWayPoints(uint32_t app_id) const = 0;
+
+ /**
+ * @brief Checks if Application is subscribed for way points
+ * @param Application reference
* @return true if Application is subscribed for way points
* otherwise false
*/
- virtual bool IsAppSubscribedForWayPoints(ApplicationSharedPtr app) const = 0;
+ virtual bool IsAppSubscribedForWayPoints(Application& app) const = 0;
+
+ /**
+ * @brief Subscribe Application for way points
+ * @param Application id
+ */
+ virtual void SubscribeAppForWayPoints(uint32_t id) = 0;
/**
* @brief Subscribe Application for way points
@@ -358,6 +373,12 @@ class ApplicationManager {
/**
* @brief Unsubscribe Application for way points
+ * @param Application id
+ */
+ virtual void UnsubscribeAppFromWayPoints(uint32_t app_id) = 0;
+
+ /**
+ * @brief Unsubscribe Application for way points
* @param Application pointer
*/
virtual void UnsubscribeAppFromWayPoints(ApplicationSharedPtr app) = 0;
@@ -369,6 +390,13 @@ class ApplicationManager {
virtual bool IsAnyAppSubscribedForWayPoints() const = 0;
/**
+ * @brief Save message after OnWayPointsChangeNotification reception
+ * @param way_points_message pointer to the smartobject
+ */
+ virtual void SaveWayPointsMessage(
+ smart_objects::SmartObjectSPtr way_points_message) = 0;
+
+ /**
* @brief Get subscribed for way points
* @return reference to set of subscribed apps for way points
*/
@@ -485,7 +513,13 @@ class ApplicationManager {
virtual void ConnectToDevice(const std::string& device_mac) = 0;
- virtual void OnHMIStartedCooperation() = 0;
+ virtual void OnHMIReady() = 0;
+
+ /**
+ * @brief Send GetCapabilities requests for
+ * each interface (VR, TTS, UI etc) to HMI
+ */
+ virtual void RequestForInterfacesAvailability() = 0;
virtual void DisconnectCloudApp(ApplicationSharedPtr app) = 0;
@@ -504,6 +538,13 @@ class ApplicationManager {
GetCloudAppConnectionStatus(ApplicationConstSharedPtr app) const = 0;
virtual bool IsHMICooperating() const = 0;
+
+ /*
+ * @brief Hold or respond to all pending RAI requests
+ * @param hmi_cooperating new state to be set
+ */
+ virtual void SetHMICooperating(const bool hmi_cooperating) = 0;
+
/**
* @brief Notifies all components interested in Vehicle Data update
* i.e. new value of odometer etc and returns list of applications
@@ -513,9 +554,24 @@ class ApplicationManager {
*/
virtual void IviInfoUpdated(const std::string& vehicle_info, int value) = 0;
+ /**
+ * @brief Creates the application object for a newly registered application.
+ * This method performs initialiation of the app object by setting properties
+ * and starting the resumption process if applicable.
+ * @param request_for_registration Smart Object RegisterAppInterfaceRequest
+ * message received from mobile.
+ */
virtual ApplicationSharedPtr RegisterApplication(
const std::shared_ptr<smart_objects::SmartObject>&
request_for_registration) = 0;
+ /**
+ * @brief Completes initialization process by adding the app to the
+ * applications accessor. App is now accessible by all other Core components.
+ * @param application ApplicationSharedPtr for newly registered application.
+ * @param connection_key Internal application id of registering application.
+ */
+ virtual void FinalizeAppRegistration(ApplicationSharedPtr application,
+ const uint32_t connection_key) = 0;
virtual void SendUpdateAppList() = 0;
@@ -545,6 +601,26 @@ class ApplicationManager {
virtual void RemoveAppFromTTSGlobalPropertiesList(const uint32_t app_id) = 0;
+ /**
+ * @brief Resets application's global properties to default values
+ * @param global_properties_ids container with global properties IDs to reset
+ * @param app_id ID of app which properties to reset
+ * @return struct with flags indicating success global properties reset
+ */
+ virtual ResetGlobalPropertiesResult ResetGlobalProperties(
+ const smart_objects::SmartObject& global_properties_ids,
+ const uint32_t app_id) = 0;
+
+ /**
+ * @brief Resets all application's global properties to default values
+ * returning struct that indicates which properties have been
+ * successfully reset.
+ * @param app_id ID of app which properties to reset
+ * @return struct with flags indicating global properties reset
+ */
+ virtual ResetGlobalPropertiesResult ResetAllApplicationGlobalProperties(
+ const uint32_t app_id) = 0;
+
virtual mobile_apis::Result::eType SaveBinary(
const std::vector<uint8_t>& binary_data,
const std::string& file_path,
@@ -752,11 +828,11 @@ class ApplicationManager {
* @brief Callback calls when application starts/stops data streaming
* @param app_id Streaming application id
* @param service_type Streaming service type
- * @param state Shows if streaming started or stopped
+ * @param new_state Defines new streaming state
*/
virtual void OnAppStreaming(uint32_t app_id,
protocol_handler::ServiceType service_type,
- bool state) = 0;
+ const Application::StreamingState new_state) = 0;
/**
* @brief CreateRegularState create regular HMI state for application
@@ -797,18 +873,24 @@ class ApplicationManager {
protocol_handler::ServiceType service_type) = 0;
/**
- * @brief Called when application completes streaming configuration
+ * @brief Called when application successfully completes streaming
+ * configuration
* @param app_id Streaming application id
* @param service_type Streaming service type
- * @param result true if configuration is successful, false otherwise
- * @param rejected_params list of rejected parameters' name. Valid
- * only when result is false.
*/
- virtual void OnStreamingConfigured(
+ virtual void OnStreamingConfigurationSuccessful(
+ uint32_t app_id, protocol_handler::ServiceType service_type) = 0;
+
+ /**
+ * @brief Called when application fails streaming configuration
+ * @param app_id Streaming application id
+ * @param rejected_params list of rejected parameter names
+ * @param reason NACK reason
+ */
+ virtual void OnStreamingConfigurationFailed(
uint32_t app_id,
- protocol_handler::ServiceType service_type,
- bool result,
- std::vector<std::string>& rejected_params) = 0;
+ std::vector<std::string>& rejected_params,
+ const std::string& reason) = 0;
virtual const ApplicationManagerSettings& get_settings() const = 0;
// Extract the app ID to use internally based on the UseFullAppID .ini setting
diff --git a/src/components/include/application_manager/application_manager_settings.h b/src/components/include/application_manager/application_manager_settings.h
index 524feed6e5..02cd79aa8e 100644
--- a/src/components/include/application_manager/application_manager_settings.h
+++ b/src/components/include/application_manager/application_manager_settings.h
@@ -72,8 +72,11 @@ class ApplicationManagerSettings : public RequestControlerSettings,
virtual const std::string& tts_delimiter() const = 0;
virtual const uint32_t& put_file_in_none() const = 0;
virtual const std::string& sdl_version() const = 0;
+ virtual const std::string& vr_help_title() const = 0;
virtual const std::vector<std::string>& time_out_promt() const = 0;
+ virtual const std::vector<std::string>& help_prompt() const = 0;
virtual const std::string& hmi_capabilities_file_name() const = 0;
+ virtual const std::string& hmi_capabilities_cache_file_name() const = 0;
virtual const std::string& video_server_type() const = 0;
virtual const std::string& audio_server_type() const = 0;
virtual const std::string& server_address() const = 0;
diff --git a/src/components/include/application_manager/hmi_capabilities.h b/src/components/include/application_manager/hmi_capabilities.h
index e10295b56f..56ac807d63 100644
--- a/src/components/include/application_manager/hmi_capabilities.h
+++ b/src/components/include/application_manager/hmi_capabilities.h
@@ -46,9 +46,8 @@ class ApplicationManager;
class HMICapabilities {
public:
- /*
+ /**
* @brief Class destructor
- *
*/
virtual ~HMICapabilities() {}
@@ -59,7 +58,7 @@ class HMICapabilities {
*/
virtual HMILanguageHandler& get_hmi_language_handler() = 0;
- /*
+ /**
* @brief Checks if image type(Static/Dynamic) requested by
* Mobile Device is supported on current HMI.
* @param image_type received type of image from Enum.
@@ -69,7 +68,6 @@ class HMICapabilities {
/**
* @brief Checks if all HMI capabilities received
- *
* @return TRUE if all information received, otherwise FALSE
*/
virtual bool is_vr_cooperating() const = 0;
@@ -90,417 +88,385 @@ class HMICapabilities {
virtual bool is_rc_cooperating() const = 0;
virtual void set_is_rc_cooperating(const bool value) = 0;
- /*
+ /**
* @brief Interface used to store information about software version of the
- *target
- *
+ * target
* @param ccpu_version Received system/hmi software version
*/
virtual void set_ccpu_version(const std::string& ccpu_version) = 0;
- /*
+ /**
* @brief Returns software version of the target
- *
* @return TRUE if it supported, otherwise FALSE
*/
virtual const std::string& ccpu_version() const = 0;
- /*
+ /**
* @brief Retrieves if mixing audio is supported by HMI
* (ie recording TTS command and playing audio)
- *
* @return Current state of the mixing audio flag
*/
virtual bool attenuated_supported() const = 0;
- /*
+ /**
* @brief Sets state for mixing audio
- *
* @param state New state to be set
*/
virtual void set_attenuated_supported(const bool state) = 0;
- /*
+ /**
* @brief Retrieves currently active UI language
- *
* @return Currently active UI language
*/
virtual const hmi_apis::Common_Language::eType active_ui_language() const = 0;
- /*
+ /**
* @brief Sets currently active UI language
- *
* @param language Currently active UI language
*/
virtual void set_active_ui_language(
const hmi_apis::Common_Language::eType language) = 0;
- /*
+ /**
* @brief Retrieves UI supported languages
- *
* @return Currently supported UI languages
*/
- virtual const smart_objects::SmartObject* ui_supported_languages() const = 0;
+ virtual const smart_objects::SmartObjectSPtr ui_supported_languages()
+ const = 0;
- /*
+ /**
* @brief Sets supported UI languages
- *
* @param supported_languages Supported UI languages
*/
virtual void set_ui_supported_languages(
const smart_objects::SmartObject& supported_languages) = 0;
- /*
+ /**
* @brief Retrieves currently active VR language
- *
* @return Currently active VR language
*/
virtual const hmi_apis::Common_Language::eType active_vr_language() const = 0;
- /*
+ /**
* @brief Sets currently active VR language
- *
* @param language Currently active VR language
*/
virtual void set_active_vr_language(
const hmi_apis::Common_Language::eType language) = 0;
- /*
+ /**
* @brief Retrieves VR supported languages
- *
* @return Currently supported VR languages
*/
- virtual const smart_objects::SmartObject* vr_supported_languages() const = 0;
+ virtual const smart_objects::SmartObjectSPtr vr_supported_languages()
+ const = 0;
- /*
+ /**
* @brief Sets supported VR languages
- *
* @param supported_languages Supported VR languages
*/
virtual void set_vr_supported_languages(
const smart_objects::SmartObject& supported_languages) = 0;
- /*
+ /**
* @brief Retrieves currently active TTS language
- *
* @return Currently active TTS language
*/
virtual const hmi_apis::Common_Language::eType active_tts_language()
const = 0;
- /*
+ /**
* @brief Sets currently active TTS language
- *
* @param language Currently active TTS language
*/
virtual void set_active_tts_language(
const hmi_apis::Common_Language::eType language) = 0;
- /*
+ /**
* @brief Retrieves TTS supported languages
- *
* @return Currently supported TTS languages
*/
- virtual const smart_objects::SmartObject* tts_supported_languages() const = 0;
+ virtual const smart_objects::SmartObjectSPtr tts_supported_languages()
+ const = 0;
- /*
+ /**
* @brief Sets supported TTS languages
- *
* @param supported_languages Supported TTS languages
*/
virtual void set_tts_supported_languages(
const smart_objects::SmartObject& supported_languages) = 0;
- /*
+ /**
* @brief Retrieves information about the display capabilities
- *
* @return Currently supported display capabilities
*/
virtual const smart_objects::SmartObjectSPtr display_capabilities() const = 0;
- /*
+ /**
* @brief Sets supported display capabilities
- *
* @param display_capabilities supported display capabilities
*/
virtual void set_display_capabilities(
const smart_objects::SmartObject& display_capabilities) = 0;
- /*
+ /**
* @brief Retrieves information about the display capability
* @return Currently supported display capability
*/
virtual const smart_objects::SmartObjectSPtr system_display_capabilities()
const = 0;
- /*
+ /**
* @brief Sets supported display capability
* @param display_capabilities supported display capability
*/
virtual void set_system_display_capabilities(
const smart_objects::SmartObject& display_capabilities) = 0;
- /*
+ /**
* @brief Retrieves information about the HMI zone capabilities
- *
* @return Currently supported HMI zone capabilities
*/
virtual const smart_objects::SmartObjectSPtr hmi_zone_capabilities()
const = 0;
- /*
+ /**
* @brief Sets supported HMI zone capabilities
- *
* @param hmi_zone_capabilities supported HMI zone capabilities
*/
virtual void set_hmi_zone_capabilities(
const smart_objects::SmartObject& hmi_zone_capabilities) = 0;
- /*
+ /**
* @brief Retrieves information about the SoftButton's capabilities
- *
* @return Currently supported SoftButton's capabilities
*/
virtual const smart_objects::SmartObjectSPtr soft_button_capabilities()
const = 0;
- /*
+ /**
* @brief Sets supported SoftButton's capabilities
- *
* @param soft_button_capabilities supported SoftButton's capabilities
*/
virtual void set_soft_button_capabilities(
const smart_objects::SmartObject& soft_button_capabilities) = 0;
- /*
+ /**
* @brief Retrieves information about the Button's capabilities
- *
* @return Currently supported Button's capabilities
*/
virtual const smart_objects::SmartObjectSPtr button_capabilities() const = 0;
- /*
+ /**
* @brief Sets supported Button's capabilities
- *
* @param soft_button_capabilities supported Button's capabilities
*/
virtual void set_button_capabilities(
const smart_objects::SmartObject& button_capabilities) = 0;
- /*
+ /**
* @brief Sets supported speech capabilities
- *
* @param speech_capabilities supported speech capabilities
*/
virtual void set_speech_capabilities(
const smart_objects::SmartObject& speech_capabilities) = 0;
- /*
+ /**
* @brief Retrieves information about the speech capabilities
- *
* @return Currently supported speech capabilities
*/
virtual const smart_objects::SmartObjectSPtr speech_capabilities() const = 0;
- /*
+ /**
* @brief Sets supported VR capabilities
- *
* @param vr_capabilities supported VR capabilities
*/
virtual void set_vr_capabilities(
const smart_objects::SmartObject& vr_capabilities) = 0;
- /*
+ /**
* @brief Retrieves information about the VR capabilities
- *
* @return Currently supported VR capabilities
*/
virtual const smart_objects::SmartObjectSPtr vr_capabilities() const = 0;
- /*
+ /**
* @brief Sets supported audio_pass_thru capabilities
- *
* @param vr_capabilities supported audio_pass_thru capabilities
*/
virtual void set_audio_pass_thru_capabilities(
const smart_objects::SmartObject& audio_pass_thru_capabilities) = 0;
- /*
+ /**
* @brief Retrieves information about the audio_pass_thru capabilities
- *
* @return Currently supported audio_pass_thru capabilities
*/
virtual const smart_objects::SmartObjectSPtr audio_pass_thru_capabilities()
const = 0;
- /*
+ /**
* @brief Sets supported pcm_stream capabilities
- *
* @param supported pcm_stream capabilities
*/
virtual void set_pcm_stream_capabilities(
const smart_objects::SmartObject& pcm_stream_capabilities) = 0;
- /*
+ /**
* @brief Retrieves information about the pcm_stream capabilities
- *
* @return Currently supported pcm_streaming capabilities
*/
virtual const smart_objects::SmartObjectSPtr pcm_stream_capabilities()
const = 0;
- /*
+ /**
* @brief Retrieves information about the preset bank capabilities
- *
* @return Currently supported preset bank capabilities
*/
virtual const smart_objects::SmartObjectSPtr preset_bank_capabilities()
const = 0;
- /*
+ /**
* @brief Sets supported preset bank capabilities
- *
* @param soft_button_capabilities supported preset bank capabilities
*/
virtual void set_preset_bank_capabilities(
const smart_objects::SmartObject& preset_bank_capabilities) = 0;
- /*
+ /**
* @brief Sets vehicle information(make, model, modelYear)
- *
- * @param vehicle_type Cuurent vehicle information
+ * @param vehicle_type vehicle information
*/
virtual void set_vehicle_type(
const smart_objects::SmartObject& vehicle_type) = 0;
- /*
+ /**
* @brief Retrieves vehicle information(make, model, modelYear)
- *
- * @param vehicle_type Cuurent vehicle information
+ * @param vehicle_type Current vehicle information
*/
virtual const smart_objects::SmartObjectSPtr vehicle_type() const = 0;
- /*
+ /**
* @brief Retrieves information about the prerecorded speech
- *
* @return Currently supported prerecorded speech
*/
virtual const smart_objects::SmartObjectSPtr prerecorded_speech() const = 0;
- /*
+ /**
* @brief Sets supported prerecorded speech
- *
* @param prerecorded_speech supported prerecorded speech
*/
virtual void set_prerecorded_speech(
const smart_objects::SmartObject& prerecorded_speech) = 0;
- /*
+ /**
* @brief Interface used to store information if navigation
* supported by the system
- *
* @param supported Indicates if navigation supported by the system
*/
virtual void set_navigation_supported(const bool supported) = 0;
- /*
+ /**
* @brief Retrieves information if navi supported by the system
- *
* @return TRUE if it supported, otherwise FALSE
*/
virtual bool navigation_supported() const = 0;
- /*
+ /**
* @brief Interface used to store information if phone call
* supported by the system
- *
* @param supported Indicates if navigation supported by the sustem
*/
virtual void set_phone_call_supported(const bool supported) = 0;
- /*
+ /**
* @brief Retrieves information if phone call supported by the system
- *
* @return TRUE if it supported, otherwise FALSE
*/
virtual bool phone_call_supported() const = 0;
- /*
+ /**
* @brief Interface to store whether HMI supports video streaming
- *
* @param supported Indicates whether video streaming is supported by HMI
*/
virtual void set_video_streaming_supported(const bool supported) = 0;
- /*
+ /**
* @brief Retrieves whether HMI supports video streaming
- *
* @return TRUE if it supported, otherwise FALSE
*/
virtual bool video_streaming_supported() const = 0;
- /*
+ /**
* @brief Interface to store whether HMI supports remote control
- *
- * @param supported Indicates whether remote control is supported by HMI
+ * @param supported Indicates whether video streaming is supported by HMI
*/
virtual void set_rc_supported(const bool supported) = 0;
- /*
+ /**
* @brief Retrieves whether HMI supports remote control
- *
* @return TRUE if it supported, otherwise FALSE
*/
virtual bool rc_supported() const = 0;
/*
+ * @brief Interface to store whether HMI supports driver distraction menu
+ * limits
+ *
+ * @param supported Indicates whether driver distraction menu limits is
+ * supported by HMI
+ */
+ virtual void set_driver_distraction_supported(const bool supported) = 0;
+
+ /*
+ * @brief Retrieves whether HMI supports driver distraction menu limits
+ *
+ * @return TRUE if it supported, otherwise FALSE
+ */
+ virtual bool driver_distraction_supported() const = 0;
+
+ /*
* @brief Interface used to store information regarding
* the navigation "System Capability"
- *
* @param navigation_capability contains information related
* to the navigation system capability.
*/
virtual void set_navigation_capability(
const smart_objects::SmartObject& navigation_capability) = 0;
- /*
+ /**
* @brief Retrieves information regarding the navigation system capability
- *
* @return NAVIGATION system capability
*/
- virtual const smart_objects::SmartObject* navigation_capability() const = 0;
+ virtual const smart_objects::SmartObjectSPtr navigation_capability()
+ const = 0;
- /*
+ /**
* @brief Interface used to store information regarding
* the phone "System Capability"
- *
* @param phone_capability contains information related
* to the phone system capability.
*/
virtual void set_phone_capability(
const smart_objects::SmartObject& phone_capability) = 0;
- /*
+ /**
* @brief Retrieves information regarding the phone call system capability
- *
* @return PHONE_CALL system capability
*/
- virtual const smart_objects::SmartObject* phone_capability() const = 0;
+ virtual const smart_objects::SmartObjectSPtr phone_capability() const = 0;
- /*
+ /**
* @brief Sets HMI's video streaming related capability information
- *
* @param video_streaming_capability the video streaming related capabilities
*/
virtual void set_video_streaming_capability(
const smart_objects::SmartObject& video_streaming_capability) = 0;
- /*
+ /**
* @brief Retrieves HMI's video streaming related capabilities
- *
* @return HMI's video streaming related capability information
*/
- virtual const smart_objects::SmartObject* video_streaming_capability()
+ virtual const smart_objects::SmartObjectSPtr video_streaming_capability()
const = 0;
/**
@@ -510,7 +476,17 @@ class HMICapabilities {
virtual void set_rc_capability(
const smart_objects::SmartObject& rc_capability) = 0;
- virtual const smart_objects::SmartObject* rc_capability() const = 0;
+ /**
+ * @brief Retrieves information regarding the remote control capabilities
+ * @return RC capabilities
+ */
+ virtual const smart_objects::SmartObjectSPtr rc_capability() const = 0;
+
+ virtual void set_driver_distraction_capability(
+ const smart_objects::SmartObject& driver_distraction_capability) = 0;
+
+ virtual const smart_objects::SmartObjectSPtr driver_distraction_capability()
+ const = 0;
/**
* @brief Sets available SeatLocation capabilities for further usage by
@@ -525,7 +501,7 @@ class HMICapabilities {
* seat location capability
* @return smart object of seat location capability
*/
- virtual const smart_objects::SmartObject* seat_location_capability()
+ virtual const smart_objects::SmartObjectSPtr seat_location_capability()
const = 0;
DEPRECATED
@@ -540,35 +516,53 @@ class HMICapabilities {
virtual void set_handle_response_for(
const smart_objects::SmartObject& request) = 0;
- protected:
- /*
- * @brief function checks if json member exists
- *
- * @param json_member from file hmi_capabilities.json
- * @param name_of_member name which we should check
- * hmi_capabilities.json
- *
- * @returns TRUE if member exists and returns FALSE if
- * member does not exist.
+ /**
+ * @brief Writes cached HMI capabilities from internal cache into the file if
+ * any of updated sections are not present in the file
+ * @param interface_name name of interface to be updated
+ * @param sections_to_update vector of names of sections which were updated in
+ * cache
+ * @param schema reference to schema which should be unapplied before saving
+ * stringified JSON data into the file
+ * @return true if cache was saved successfully, otherwise returns false
+ */
+ virtual bool SaveCachedCapabilitiesToFile(
+ const std::string& interface_name,
+ const std::vector<std::string>& sections_to_update,
+ const smart_objects::CSmartSchema& schema) = 0;
+
+ /**
+ * @brief Deletes cached HMI capabilities file from a file system
*/
- virtual bool check_existing_json_member(const Json::Value& json_member,
- const char* name_of_member) const = 0;
+ virtual bool DeleteCachedCapabilitiesFile() const = 0;
- virtual void convert_json_languages_to_obj(
- const Json::Value& json_languages,
- smart_objects::SmartObject& languages) const = 0;
+ /**
+ * @brief Checks if request required for appropriate function id
+ * @param function_id function ID that required request to get appropriate hmi
+ * capabilities
+ * @return true if request required for capabilities, otherwise false
+ */
+ virtual bool IsRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::eType function_id) const = 0;
- /*
- * @brief function that converts a single entry of audio pass thru capability
- * to smart object
- *
- * @param capability json object that represents a single entry of audio pass
- * thru capability
- * @param output_so the converted object
+ /**
+ * @brief Update collection of requests that should be send to
+ * the HMI to get required HMI capabilities
+ * @param requested_interface function id
+ */
+ virtual void UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::eType requested_interface) = 0;
+
+ /**
+ * @brief Interface that update capabilities depending on ccpu_version
+ * @param ccpu_version Received system/hmi software version
+ */
+ virtual void OnSoftwareVersionReceived(const std::string& ccpu_version) = 0;
+
+ /**
+ * @brief Interface that update cached hmi capabilities
*/
- virtual void convert_audio_capability_to_obj(
- const Json::Value& capability,
- smart_objects::SmartObject& output_so) const = 0;
+ virtual void UpdateCachedCapabilities() = 0;
};
} // namespace application_manager
diff --git a/src/components/include/application_manager/policies/policy_handler_interface.h b/src/components/include/application_manager/policies/policy_handler_interface.h
index f85483f98e..d8aef7cc1a 100644
--- a/src/components/include/application_manager/policies/policy_handler_interface.h
+++ b/src/components/include/application_manager/policies/policy_handler_interface.h
@@ -123,8 +123,8 @@ class PolicyHandlerInterface : public VehicleDataItemProvider {
const RPCParams& rpc_params,
CheckPermissionResult& result) = 0;
- virtual uint32_t GetNotificationsNumber(
- const std::string& priority) const = 0;
+ virtual uint32_t GetNotificationsNumber(const std::string& priority,
+ const bool is_subtle) const = 0;
virtual DeviceConsent GetUserConsentForDevice(
const std::string& device_id) const = 0;
virtual bool GetDefaultHmi(const std::string& device_id,
@@ -316,6 +316,12 @@ class PolicyHandlerInterface : public VehicleDataItemProvider {
virtual void OnSystemInfoChanged(const std::string& language) = 0;
/**
+ * @brief Set preloaded_pt flag value in policy table
+ * @param is_preloaded value to set
+ */
+ virtual void SetPreloadedPtFlag(const bool is_preloaded) = 0;
+
+ /**
* @brief Save data from GetSystemInfo request to policy table
* @param ccpu_version CCPU version
* @param wers_country_code WERS country code
@@ -326,6 +332,12 @@ class PolicyHandlerInterface : public VehicleDataItemProvider {
const std::string& language) = 0;
/**
+ * @brief Get information about last ccpu_version from PT
+ * @return ccpu_version from PT
+ */
+ virtual std::string GetCCPUVersionFromPT() const = 0;
+
+ /**
* @brief Sends GetVehicleData request in case when Vechicle info is ready.
*/
virtual void OnVIIsReady() = 0;
@@ -375,8 +387,13 @@ class PolicyHandlerInterface : public VehicleDataItemProvider {
* @param url The URL provided by the HMI to be used for performing PTU
* retries. If empty, the existing cached URL will be cleared and Core will
* choose which URLs to use on retry
+ * @param snapshot_path The PT snapshot path provided by the HMI. If empty,
+ * the existing cached snapshot path will be cleared.
*/
- virtual void CacheRetryInfo(const uint32_t app_id, const std::string url) = 0;
+ virtual void CacheRetryInfo(
+ const uint32_t app_id = 0,
+ const std::string url = std::string(),
+ const std::string snapshot_path = std::string()) = 0;
#endif // EXTERNAL_PROPRIETARY_MODE
/**
@@ -768,6 +785,15 @@ class PolicyHandlerInterface : public VehicleDataItemProvider {
*/
virtual void OnSystemRequestReceived() const = 0;
+ /**
+ * @brief Triggers a PolicyTableUpdate on startup (only if an update is
+ * required)
+ *
+ * Currently, this function is only implemented for regular policies
+ * since the device consent is not enabled by default for external policies.
+ */
+ virtual void TriggerPTUOnStartupIfRequired() = 0;
+
private:
/**
* @brief Processes data received via OnAppPermissionChanged notification
diff --git a/src/components/include/application_manager/rpc_service.h b/src/components/include/application_manager/rpc_service.h
index 4a80733ee7..630070074a 100644
--- a/src/components/include/application_manager/rpc_service.h
+++ b/src/components/include/application_manager/rpc_service.h
@@ -53,19 +53,31 @@ class RPCService {
/**
* @brief ManageMobileCommand convert message to mobile command and execute it
* @param message pointer to received message
- * @param origin origin of command
+ * @param source source of command
+ * @param warning_info warning message to send on a successful response. Only
+ * applies to requests from mobile.
* @return true if command is executed, otherwise return false
*/
virtual bool ManageMobileCommand(const commands::MessageSharedPtr message,
commands::Command::CommandSource source) = 0;
+ virtual bool ManageMobileCommand(const commands::MessageSharedPtr message,
+ commands::Command::CommandSource source,
+ const std::string warning_info) = 0;
+
/**
* @brief ManageHMICommand convert message to HMI command and execute it
* @param message pointer to received message
+ * @param source source of command
+ * @param warning_info warning message to send on a successful response. Only
+ * applies to requests from HMI.
* @return true if command is executed, otherwise return false
*/
virtual bool ManageHMICommand(const commands::MessageSharedPtr message,
commands::Command::CommandSource source =
commands::Command::SOURCE_HMI) = 0;
+ virtual bool ManageHMICommand(const commands::MessageSharedPtr message,
+ commands::Command::CommandSource source,
+ const std::string warning_info) = 0;
/**
* @brief SendMessageToMobile Put message to the queue to be sent to mobile.
diff --git a/src/components/include/application_manager/state_controller.h b/src/components/include/application_manager/state_controller.h
index 2fa4b0c218..e604675cea 100644
--- a/src/components/include/application_manager/state_controller.h
+++ b/src/components/include/application_manager/state_controller.h
@@ -35,9 +35,12 @@
#include "application_manager/application.h"
#include "application_manager/application_manager.h"
+#include "application_manager/postponed_activation_controller.h"
#include "application_manager/request_controller_settings.h"
#include "stdint.h"
+class PostponedActivationController;
+
namespace application_manager {
class StateController {
public:
@@ -223,6 +226,31 @@ class StateController {
* @param app pointer to application to be exited
*/
virtual void ExitDefaultWindow(ApplicationSharedPtr app) = 0;
+
+ /**
+ * @brief Sets BACKGROUND or LIMITED hmi level to application
+ * depends on application type
+ * @param window_id ID of app window to deactivate
+ * @param app Application to deactivate
+ */
+ virtual void DeactivateApp(ApplicationSharedPtr app,
+ const WindowID window_id) = 0;
+
+ /**
+ * @brief ResumePostponedWindows resumes adding of all postponed windows for a
+ * specified application, if exists
+ * @param app_id id of application to check
+ */
+ virtual void ResumePostponedWindows(const uint32_t app_id) = 0;
+
+ /**
+ * @brief DropPostponedWindows drops all postponed windows for a specified
+ * application, if exists
+ * @param app_id id of application to check
+ */
+ virtual void DropPostponedWindows(const uint32_t app_id) = 0;
+
+ virtual PostponedActivationController& GetPostponedActivationController() = 0;
};
} // namespace application_manager
diff --git a/src/components/include/connection_handler/connection_handler.h b/src/components/include/connection_handler/connection_handler.h
index e98a78f377..c5995fbbb8 100644
--- a/src/components/include/connection_handler/connection_handler.h
+++ b/src/components/include/connection_handler/connection_handler.h
@@ -48,7 +48,13 @@
*/
namespace connection_handler {
-enum CloseSessionReason { kCommon = 0, kFlood, kMalformed, kUnauthorizedApp };
+enum CloseSessionReason {
+ kCommon = 0,
+ kFlood,
+ kMalformed,
+ kUnauthorizedApp,
+ kFinalMessage
+};
class ConnectionHandlerObserver;
@@ -205,6 +211,15 @@ class ConnectionHandler {
uint8_t protocol_version) = 0;
/**
+ * @brief binds protocol version with session
+ * @param connection_key pair of connection and session id
+ * @param full_protocol_version contains full protocol version of registered
+ * application.
+ */
+ virtual void BindProtocolVersionWithSession(
+ uint32_t connection_key,
+ const utils::SemanticVersion& full_protocol_version) = 0;
+ /**
* \brief information about given Connection Key.
* \param key Unique key used by other components as session identifier
* \param app_id Returned: ApplicationID
@@ -288,7 +303,8 @@ class ConnectionHandler {
virtual void NotifyServiceStartedResult(
uint32_t session_key,
bool result,
- std::vector<std::string>& rejected_params) = 0;
+ std::vector<std::string>& rejected_params,
+ const std::string& reason) = 0;
/**
* \brief Called when secondary transport with given session ID is established
diff --git a/src/components/include/media_manager/media_manager.h b/src/components/include/media_manager/media_manager.h
index 123e11f2f0..0729adc7d8 100644
--- a/src/components/include/media_manager/media_manager.h
+++ b/src/components/include/media_manager/media_manager.h
@@ -34,8 +34,10 @@
#define SRC_COMPONENTS_INCLUDE_MEDIA_MANAGER_MEDIA_MANAGER_H_
#include <string>
+#include "interfaces/MOBILE_API.h" // see discussion in sdl_core PR #2184
#include "media_manager/media_manager_settings.h"
#include "protocol/service_type.h"
+#include "utils/macro.h" // for "DEPRECATED"
namespace media_manager {
class MediaManager {
@@ -43,9 +45,17 @@ class MediaManager {
virtual void PlayA2DPSource(int32_t application_key) = 0;
virtual void StopA2DPSource(int32_t application_key) = 0;
- virtual void StartMicrophoneRecording(int32_t application_key,
- const std::string& outputFileName,
- int32_t duration) = 0;
+ DEPRECATED virtual void StartMicrophoneRecording(
+ int32_t application_key,
+ const std::string& outputFileName,
+ int32_t duration) = 0;
+ virtual void StartMicrophoneRecording(
+ int32_t application_key,
+ const std::string& outputFileName,
+ int32_t duration,
+ mobile_apis::SamplingRate::eType sampling_rate,
+ mobile_apis::BitsPerSample::eType bits_per_sample,
+ mobile_apis::AudioType::eType audio_type) = 0;
virtual void StopMicrophoneRecording(int32_t application_key) = 0;
virtual void StartStreaming(int32_t application_key,
@@ -60,14 +70,6 @@ class MediaManager {
*/
virtual const MediaManagerSettings& settings() const = 0;
- /**
- * \brief Convert an amount of audio bytes to an estimated time in ms
- * \param data_size number of bytes to be played
- * \return milliseconds required to play <data_size> many bytes with
- * the current pcm stream capabilities
- */
- virtual uint32_t DataSizeToMilliseconds(uint64_t data_size) const = 0;
-
virtual ~MediaManager() {}
};
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 02810038c3..9d4ad5ea57 100644
--- a/src/components/include/policy/policy_external/policy/policy_manager.h
+++ b/src/components/include/policy/policy_external/policy/policy_manager.h
@@ -417,6 +417,12 @@ class PolicyManager : public usage_statistics::StatisticsManager,
virtual void SetSystemLanguage(const std::string& language) = 0;
/**
+ * @brief Set preloaded_pt flag value in policy table
+ * @param is_preloaded value to set
+ */
+ virtual void SetPreloadedPtFlag(const bool is_preloaded) = 0;
+
+ /**
* @brief Set data from GetSystemInfo response to policy table
* @param ccpu_version CCPU version
* @param wers_country_code WERS country code
@@ -427,6 +433,12 @@ class PolicyManager : public usage_statistics::StatisticsManager,
const std::string& language) = 0;
/**
+ * @brief Get information about last ccpu_version from PT
+ * @return ccpu_version from PT
+ */
+ virtual std::string GetCCPUVersionFromPT() const = 0;
+
+ /**
* @brief Send OnPermissionsUpdated for choosen application
* @param device_id device identifier
* @param application_id Unique application id
@@ -476,10 +488,11 @@ class PolicyManager : public usage_statistics::StatisticsManager,
/**
* @brief Get number of notification by priority
* @param priority Specified priority
+ * @param is_subtle If true, get the number of allowed subtle notifications
* @return notification number
*/
- virtual uint32_t GetNotificationsNumber(
- const std::string& priority) const = 0;
+ virtual uint32_t GetNotificationsNumber(const std::string& priority,
+ const bool is_subtle) const = 0;
/**
* @brief Allows to update Vehicle Identification Number in policy table.
@@ -868,7 +881,8 @@ class PolicyManager : public usage_statistics::StatisticsManager,
} // namespace policy
-extern "C" policy::PolicyManager* CreateManager();
+extern "C" policy::PolicyManager* CreateManager(
+ logger::Logger* logger_instance);
extern "C" void DeleteManager(policy::PolicyManager*);
#endif // SRC_COMPONENTS_INCLUDE_POLICY_POLICY_EXTERNAL_POLICY_POLICY_MANAGER_H_
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 0689a5b768..c90006928a 100644
--- a/src/components/include/policy/policy_regular/policy/policy_manager.h
+++ b/src/components/include/policy/policy_regular/policy/policy_manager.h
@@ -408,6 +408,12 @@ class PolicyManager : public usage_statistics::StatisticsManager,
virtual void SetSystemLanguage(const std::string& language) = 0;
/**
+ * @brief Set preloaded_pt flag value in policy table
+ * @param is_preloaded value to set
+ */
+ virtual void SetPreloadedPtFlag(const bool is_preloaded) = 0;
+
+ /**
* @brief Set data from GetSystemInfo response to policy table
* @param ccpu_version CCPU version
* @param wers_country_code WERS country code
@@ -418,6 +424,12 @@ class PolicyManager : public usage_statistics::StatisticsManager,
const std::string& language) = 0;
/**
+ * @brief Get information about last ccpu_version from PT
+ * @return ccpu_version from PT
+ */
+ virtual std::string GetCCPUVersionFromPT() const = 0;
+
+ /**
* @brief Send OnPermissionsUpdated for choosen application
* @param device_id device identifier
* @param application_id Unique application id
@@ -467,10 +479,11 @@ class PolicyManager : public usage_statistics::StatisticsManager,
/**
* @brief Get number of notification by priority
* @param priority Specified priority
+ * @param is_subtle If true, get the number of allowed subtle notifications
* @return notification number
*/
- virtual uint32_t GetNotificationsNumber(
- const std::string& priority) const = 0;
+ virtual uint32_t GetNotificationsNumber(const std::string& priority,
+ const bool is_subtle) const = 0;
/**
* @brief Allows to update Vehicle Identification Number in policy table.
@@ -801,6 +814,11 @@ class PolicyManager : public usage_statistics::StatisticsManager,
*/
virtual void ResetTimeout() = 0;
+ /**
+ * @brief Trigger a PTU once on startup if it is required
+ */
+ virtual void TriggerPTUOnStartupIfRequired() = 0;
+
protected:
/**
* @brief Checks is PT exceeded IgnitionCycles
@@ -824,7 +842,8 @@ class PolicyManager : public usage_statistics::StatisticsManager,
} // namespace policy
-extern "C" policy::PolicyManager* CreateManager();
+extern "C" policy::PolicyManager* CreateManager(
+ logger::Logger* logger_instance);
extern "C" void DeleteManager(policy::PolicyManager*);
#endif // SRC_COMPONENTS_INCLUDE_POLICY_POLICY_REGULAR_POLICY_POLICY_MANAGER_H_
diff --git a/src/components/include/protocol/rpc_type.h b/src/components/include/protocol/rpc_type.h
index db4a808cfd..fde8fe7885 100644
--- a/src/components/include/protocol/rpc_type.h
+++ b/src/components/include/protocol/rpc_type.h
@@ -49,7 +49,6 @@ enum RpcType {
// Validate and map byte value to RPC type
RpcType RpcTypeFromByte(uint8_t byte);
// Check and convert RpcType to byte value ready to be transmitted
-uint8_t RpcTypeToByte(RpcType type);
const char* RpcTypeToString(RpcType type);
diff --git a/src/components/include/protocol/service_type.h b/src/components/include/protocol/service_type.h
index 803b8106b8..77a095f7e9 100644
--- a/src/components/include/protocol/service_type.h
+++ b/src/components/include/protocol/service_type.h
@@ -79,7 +79,6 @@ enum ServiceType {
* Service types to binary stream
*/
ServiceType ServiceTypeFromByte(uint8_t type);
-uint8_t ServiceTypeToByte(ServiceType type);
} // namespace protocol_handler
#endif // SRC_COMPONENTS_INCLUDE_PROTOCOL_SERVICE_TYPE_H_
diff --git a/src/components/include/protocol_handler/protocol_handler.h b/src/components/include/protocol_handler/protocol_handler.h
index aacb31c260..c7ee670972 100644
--- a/src/components/include/protocol_handler/protocol_handler.h
+++ b/src/components/include/protocol_handler/protocol_handler.h
@@ -134,10 +134,13 @@ class ProtocolHandler {
* @param rejected_params list of parameters name that are rejected.
* Only valid when generated_session_id is 0. Note, even if
* generated_session_id is 0, the list may be empty.
+ * @param err_reason string with NACK reason. Only valid when
+ * generated_session_id is 0.
*/
virtual void NotifySessionStarted(
const SessionContext& context,
- std::vector<std::string>& rejected_params) = 0;
+ std::vector<std::string>& rejected_params,
+ const std::string err_reason = std::string()) = 0;
virtual bool IsRPCServiceSecure(const uint32_t connection_key) const = 0;
diff --git a/src/components/include/protocol_handler/session_observer.h b/src/components/include/protocol_handler/session_observer.h
index e71557fecf..593ce8408c 100644
--- a/src/components/include/protocol_handler/session_observer.h
+++ b/src/components/include/protocol_handler/session_observer.h
@@ -37,6 +37,8 @@
#include <string>
#include "transport_manager/transport_manager.h"
#include "utils/macro.h"
+#include "utils/semantic_version.h"
+
#ifdef ENABLE_SECURITY
#include "security_manager/ssl_context.h"
#endif // ENABLE_SECURITY
@@ -150,13 +152,17 @@ class SessionObserver {
* protocol. (Set to HASH_ID_WRONG if the hash is incorrect)
* If not equal to hash assigned to session on start then operation fails.
* \param service_type Type of service
- * \return uint32_t 0 if operation fails, session key otherwise
+ * \param err_reason where to write reason for the End Session failure if the
+ * operation fails
+ * \return uint32_t 0 if operation fails, session key
+ * otherwise
*/
virtual uint32_t OnSessionEndedCallback(
const transport_manager::ConnectionUID connection_handle,
const uint8_t sessionId,
uint32_t* hashCode,
- const protocol_handler::ServiceType& service_type) = 0;
+ const protocol_handler::ServiceType& service_type,
+ std::string* err_reason = nullptr) = 0;
/**
* \brief Callback function used by ProtocolHandler
@@ -173,6 +179,13 @@ class SessionObserver {
virtual void OnMalformedMessageCallback(const uint32_t& connection_key) = 0;
/**
+ * @brief Callback function used by ProtocolHandler when the last message was
+ * sent for a mobile connection
+ * @param connection_key used by other components as an application identifier
+ */
+ virtual void OnFinalMessageCallback(const uint32_t& connection_key) = 0;
+
+ /**
* @brief Converts connection handle to transport type string used in
* smartDeviceLink.ini file, e.g. "TCP_WIFI"
* @param connection_handle A connection identifier
@@ -267,6 +280,18 @@ class SessionObserver {
uint8_t& protocol_version) const = 0;
/**
+ * @brief returns protocol version which application supports
+ * @param connection_id id of connection
+ * @param session_id id of session
+ * @param full_protocol_version where to write the full protocol version
+ * output
+ * @return TRUE if session and connection exist otherwise returns FALSE
+ */
+ virtual bool ProtocolVersionUsed(
+ uint32_t connection_id,
+ uint8_t session_id,
+ utils::SemanticVersion& full_protocol_version) const = 0;
+ /**
* @brief Check if session contains service with specified service type
* @param connection_key unique id of session to check
* @param service_type type of service to check
diff --git a/src/components/include/security_manager/security_manager_listener.h b/src/components/include/security_manager/security_manager_listener.h
index 0648ed0a11..0f3a126410 100644
--- a/src/components/include/security_manager/security_manager_listener.h
+++ b/src/components/include/security_manager/security_manager_listener.h
@@ -33,6 +33,7 @@
#define SRC_COMPONENTS_INCLUDE_SECURITY_MANAGER_SECURITY_MANAGER_LISTENER_H_
#include <string>
+#include "security_manager/ssl_context.h"
namespace security_manager {
diff --git a/src/components/include/test/application_manager/mock_app_extension.h b/src/components/include/test/application_manager/mock_app_extension.h
index 10a911e799..97c0140748 100644
--- a/src/components/include/test/application_manager/mock_app_extension.h
+++ b/src/components/include/test/application_manager/mock_app_extension.h
@@ -53,6 +53,9 @@ class MockAppExtension : public application_manager::AppExtension {
MOCK_METHOD1(ProcessResumption,
void(const ns_smart_device_link::ns_smart_objects::SmartObject&
resumption_data));
+ MOCK_METHOD1(RevertResumption,
+ void(const ns_smart_device_link::ns_smart_objects::SmartObject&
+ subscriptions));
};
} // namespace application_manager_test
diff --git a/src/components/include/test/application_manager/mock_application_manager.h b/src/components/include/test/application_manager/mock_application_manager.h
index 3bd3b9b7d6..ee5d7f315a 100644
--- a/src/components/include/test/application_manager/mock_application_manager.h
+++ b/src/components/include/test/application_manager/mock_application_manager.h
@@ -155,9 +155,6 @@ class MockApplicationManager : public application_manager::ApplicationManager {
void(const protocol_handler::ServiceType service_type,
const uint32_t app_id,
const bool streaming_data_available));
- MOCK_METHOD1(
- SendHMIStatusNotification,
- void(const std::shared_ptr<application_manager::Application> app));
MOCK_METHOD1(SendDriverDistractionState,
void(application_manager::ApplicationSharedPtr app));
MOCK_METHOD2(SendGetIconUrlNotifications,
@@ -205,7 +202,8 @@ class MockApplicationManager : public application_manager::ApplicationManager {
MOCK_METHOD1(BeginAudioPassThru, bool(uint32_t app_id));
MOCK_METHOD1(EndAudioPassThru, bool(uint32_t app_id));
MOCK_METHOD1(ConnectToDevice, void(const std::string& device_mac));
- MOCK_METHOD0(OnHMIStartedCooperation, void());
+ MOCK_METHOD0(OnHMIReady, void());
+ MOCK_METHOD0(RequestForInterfacesAvailability, void());
MOCK_METHOD1(DisconnectCloudApp,
void(application_manager::ApplicationSharedPtr app));
MOCK_METHOD0(RefreshCloudAppInformation, void());
@@ -215,12 +213,16 @@ class MockApplicationManager : public application_manager::ApplicationManager {
MOCK_METHOD1(PolicyIDByIconUrl, std::string(const std::string url));
MOCK_METHOD1(SetIconFileFromSystemRequest, void(const std::string policy_id));
MOCK_CONST_METHOD0(IsHMICooperating, bool());
+ MOCK_METHOD1(SetHMICooperating, void(const bool hmi_cooperating));
MOCK_METHOD2(IviInfoUpdated,
void(const std::string& vehicle_info, int value));
MOCK_METHOD1(RegisterApplication,
application_manager::ApplicationSharedPtr(
const std::shared_ptr<smart_objects::SmartObject>&
request_for_registration));
+ MOCK_METHOD2(FinalizeAppRegistration,
+ void(application_manager::ApplicationSharedPtr,
+ const uint32_t connection_key));
MOCK_METHOD0(SendUpdateAppList, void());
MOCK_METHOD2(MarkAppsGreyOut,
void(const connection_handler::DeviceHandle handle,
@@ -230,6 +232,13 @@ class MockApplicationManager : public application_manager::ApplicationManager {
MOCK_CONST_METHOD0(IsStopping, bool());
MOCK_METHOD1(RemoveAppFromTTSGlobalPropertiesList,
void(const uint32_t app_id));
+ MOCK_METHOD2(ResetGlobalProperties,
+ application_manager::ResetGlobalPropertiesResult(
+ const smart_objects::SmartObject& global_properties_ids,
+ const uint32_t app_id));
+ MOCK_METHOD1(
+ ResetAllApplicationGlobalProperties,
+ application_manager::ResetGlobalPropertiesResult(const uint32_t app_id));
MOCK_METHOD4(
SaveBinary,
mobile_apis::Result::eType(const std::vector<uint8_t>& binary_data,
@@ -303,10 +312,11 @@ class MockApplicationManager : public application_manager::ApplicationManager {
MOCK_METHOD1(OnAppUnauthorized, void(const uint32_t& app_id));
MOCK_METHOD1(ActivateApplication,
bool(application_manager::ApplicationSharedPtr app));
- MOCK_METHOD3(OnAppStreaming,
- void(uint32_t app_id,
- protocol_handler::ServiceType service_type,
- bool state));
+ MOCK_METHOD3(
+ OnAppStreaming,
+ void(uint32_t app_id,
+ protocol_handler::ServiceType service_type,
+ application_manager::Application::StreamingState new_state));
MOCK_CONST_METHOD6(CreateRegularState,
application_manager::HmiStatePtr(
application_manager::ApplicationSharedPtr app,
@@ -338,14 +348,19 @@ class MockApplicationManager : public application_manager::ApplicationManager {
MOCK_METHOD2(IsSOStructValid,
bool(const hmi_apis::StructIdentifiers::eType struct_id,
const smart_objects::SmartObject& display_capabilities));
+ MOCK_CONST_METHOD1(IsAppSubscribedForWayPoints, bool(uint32_t));
MOCK_CONST_METHOD1(IsAppSubscribedForWayPoints,
- bool(application_manager::ApplicationSharedPtr));
+ bool(application_manager::Application& app));
+ MOCK_METHOD1(SubscribeAppForWayPoints, void(uint32_t));
MOCK_METHOD1(SubscribeAppForWayPoints,
void(application_manager::ApplicationSharedPtr));
+ MOCK_METHOD1(UnsubscribeAppFromWayPoints, void(uint32_t));
MOCK_METHOD1(UnsubscribeAppFromWayPoints,
void(application_manager::ApplicationSharedPtr));
MOCK_CONST_METHOD0(IsAnyAppSubscribedForWayPoints, bool());
MOCK_CONST_METHOD0(GetAppsSubscribedForWayPoints, const std::set<uint32_t>());
+ MOCK_METHOD1(SaveWayPointsMessage,
+ void(std::shared_ptr<smart_objects::SmartObject>));
MOCK_CONST_METHOD1(
WaitingApplicationByID,
application_manager::ApplicationConstSharedPtr(const uint32_t));
@@ -362,11 +377,13 @@ class MockApplicationManager : public application_manager::ApplicationManager {
MOCK_METHOD0(OnTimerSendTTSGlobalProperties, void());
MOCK_METHOD0(OnLowVoltage, void());
MOCK_METHOD0(OnWakeUp, void());
- MOCK_METHOD4(OnStreamingConfigured,
+ MOCK_METHOD2(OnStreamingConfigurationSuccessful,
+ void(uint32_t app_id,
+ protocol_handler::ServiceType service_type));
+ MOCK_METHOD3(OnStreamingConfigurationFailed,
void(uint32_t app_id,
- protocol_handler::ServiceType service_type,
- bool result,
- std::vector<std::string>& rejected_params));
+ std::vector<std::string>& rejected_params,
+ const std::string& reason));
MOCK_METHOD2(ProcessReconnection,
void(application_manager::ApplicationSharedPtr application,
const uint32_t connection_key));
diff --git a/src/components/include/test/application_manager/mock_application_manager_settings.h b/src/components/include/test/application_manager/mock_application_manager_settings.h
index 998ff252fe..9a70a374a7 100644
--- a/src/components/include/test/application_manager/mock_application_manager_settings.h
+++ b/src/components/include/test/application_manager/mock_application_manager_settings.h
@@ -78,8 +78,11 @@ class MockApplicationManagerSettings
MOCK_CONST_METHOD0(tts_delimiter, const std::string&());
MOCK_CONST_METHOD0(put_file_in_none, const uint32_t&());
MOCK_CONST_METHOD0(sdl_version, const std::string&());
+ MOCK_CONST_METHOD0(vr_help_title, const std::string&());
+ MOCK_CONST_METHOD0(help_prompt, const std::vector<std::string>&());
MOCK_CONST_METHOD0(time_out_promt, const std::vector<std::string>&());
MOCK_CONST_METHOD0(hmi_capabilities_file_name, const std::string&());
+ MOCK_CONST_METHOD0(hmi_capabilities_cache_file_name, const std::string&());
MOCK_CONST_METHOD0(video_server_type, const std::string&());
MOCK_CONST_METHOD0(audio_server_type, const std::string&());
MOCK_CONST_METHOD0(server_address, const std::string&());
diff --git a/src/components/include/test/application_manager/mock_rpc_service.h b/src/components/include/test/application_manager/mock_rpc_service.h
index ed06b930d8..e9cf59e670 100644
--- a/src/components/include/test/application_manager/mock_rpc_service.h
+++ b/src/components/include/test/application_manager/mock_rpc_service.h
@@ -17,10 +17,20 @@ class MockRPCService : public application_manager::rpc_service::RPCService {
ManageHMICommand,
bool(const application_manager::commands::MessageSharedPtr message,
application_manager::commands::Command::CommandSource source));
+ MOCK_METHOD3(
+ ManageHMICommand,
+ bool(const application_manager::commands::MessageSharedPtr message,
+ application_manager::commands::Command::CommandSource source,
+ const std::string warning_info));
MOCK_METHOD2(
ManageMobileCommand,
bool(const application_manager::commands::MessageSharedPtr message,
application_manager::commands::Command::CommandSource origin));
+ MOCK_METHOD3(
+ ManageMobileCommand,
+ bool(const application_manager::commands::MessageSharedPtr message,
+ application_manager::commands::Command::CommandSource origin,
+ const std::string warning_info));
MOCK_METHOD2(SendMessageToMobile,
void(application_manager::commands::MessageSharedPtr, bool));
MOCK_METHOD1(
diff --git a/src/components/include/test/application_manager/mock_state_controller.h b/src/components/include/test/application_manager/mock_state_controller.h
index 545090bf30..ca538bacb0 100644
--- a/src/components/include/test/application_manager/mock_state_controller.h
+++ b/src/components/include/test/application_manager/mock_state_controller.h
@@ -108,6 +108,13 @@ class MockStateController : public am::StateController {
MOCK_CONST_METHOD1(IsStateActive, bool(am::HmiState::StateID state_id));
MOCK_METHOD1(ActivateDefaultWindow, void(am::ApplicationSharedPtr app));
MOCK_METHOD1(ExitDefaultWindow, void(am::ApplicationSharedPtr app));
+ MOCK_METHOD1(ResumePostponedWindows, void(const uint32_t app_id));
+ MOCK_METHOD1(DropPostponedWindows, void(const uint32_t app_id));
+ MOCK_METHOD2(DeactivateApp,
+ void(am::ApplicationSharedPtr app,
+ const am::WindowID window_id));
+ MOCK_METHOD0(GetPostponedActivationController,
+ application_manager::PostponedActivationController&());
};
} // namespace application_manager_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 bcff478023..7b6da68c51 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
@@ -100,8 +100,9 @@ class MockPolicyHandlerInterface : public policy::PolicyHandlerInterface {
const policy::PTString& rpc,
const application_manager::RPCParams& rpc_params,
policy::CheckPermissionResult& result));
- MOCK_CONST_METHOD1(GetNotificationsNumber,
- uint32_t(const std::string& priority));
+ MOCK_CONST_METHOD2(GetNotificationsNumber,
+ uint32_t(const std::string& priority,
+ const bool is_subtle));
MOCK_CONST_METHOD1(GetUserConsentForDevice,
policy::DeviceConsent(const std::string& device_id));
MOCK_CONST_METHOD3(GetDefaultHmi,
@@ -180,10 +181,12 @@ class MockPolicyHandlerInterface : public policy::PolicyHandlerInterface {
std::string(const transport_manager::DeviceHandle& device_handle,
const std::string& policy_app_id));
MOCK_METHOD1(OnSystemInfoChanged, void(const std::string& language));
+ MOCK_METHOD1(SetPreloadedPtFlag, void(const bool is_preloaded));
MOCK_METHOD3(OnGetSystemInfo,
void(const std::string& ccpu_version,
const std::string& wers_country_code,
const std::string& language));
+ MOCK_CONST_METHOD0(GetCCPUVersionFromPT, std::string());
MOCK_METHOD0(OnVIIsReady, void());
MOCK_METHOD1(OnVehicleDataUpdated,
void(const smart_objects::SmartObject& message));
@@ -193,8 +196,10 @@ class MockPolicyHandlerInterface : public policy::PolicyHandlerInterface {
#ifndef EXTERNAL_PROPRIETARY_MODE
MOCK_METHOD1(ChoosePTUApplication,
uint32_t(const policy::PTUIterationType iteration_type));
- MOCK_METHOD2(CacheRetryInfo,
- void(const uint32_t app_id, const std::string url));
+ MOCK_METHOD3(CacheRetryInfo,
+ void(const uint32_t app_id,
+ const std::string url,
+ const std::string snapshot_path));
#endif
MOCK_CONST_METHOD0(GetAppIdForSending, uint32_t());
MOCK_METHOD1(
@@ -217,6 +222,7 @@ class MockPolicyHandlerInterface : public policy::PolicyHandlerInterface {
MOCK_CONST_METHOD1(SendOnAppPropertiesChangeNotification,
void(const std::string& policy_app_id));
MOCK_METHOD0(OnPTExchangeNeeded, void());
+ MOCK_METHOD0(TriggerPTUOnStartupIfRequired, void());
MOCK_METHOD1(GetAvailableApps, void(std::queue<std::string>& apps));
MOCK_METHOD3(
AddApplication,
diff --git a/src/components/include/test/connection_handler/mock_connection_handler.h b/src/components/include/test/connection_handler/mock_connection_handler.h
index 6acffea0ed..bf266751d4 100644
--- a/src/components/include/test/connection_handler/mock_connection_handler.h
+++ b/src/components/include/test/connection_handler/mock_connection_handler.h
@@ -96,6 +96,9 @@ class MockConnectionHandler : public connection_handler::ConnectionHandler {
void(uint32_t connection_key, uint8_t session_id));
MOCK_METHOD2(BindProtocolVersionWithSession,
void(uint32_t connection_key, uint8_t protocol_version));
+ MOCK_METHOD2(BindProtocolVersionWithSession,
+ void(uint32_t connection_key,
+ const utils::SemanticVersion& full_protocol_version));
MOCK_CONST_METHOD4(GetDataOnSessionKey,
int32_t(uint32_t key,
uint32_t* app_id,
@@ -120,10 +123,11 @@ class MockConnectionHandler : public connection_handler::ConnectionHandler {
transport_manager::ConnectionUID secondary_transport_id));
MOCK_CONST_METHOD1(GetSessionTransports,
const SessionTransports(uint8_t session_id));
- MOCK_METHOD3(NotifyServiceStartedResult,
+ MOCK_METHOD4(NotifyServiceStartedResult,
void(uint32_t session_key,
bool result,
- std::vector<std::string>& rejected_params));
+ std::vector<std::string>& rejected_params,
+ const std::string& reason));
MOCK_METHOD3(
OnSecondaryTransportStarted,
bool(transport_manager::ConnectionUID& primary_connection_handle,
diff --git a/src/components/include/test/media_manager/mock_media_manager.h b/src/components/include/test/media_manager/mock_media_manager.h
index aa0baa5682..36e35352d6 100644
--- a/src/components/include/test/media_manager/mock_media_manager.h
+++ b/src/components/include/test/media_manager/mock_media_manager.h
@@ -47,6 +47,13 @@ class MockMediaManager : public media_manager::MediaManager {
void(int32_t application_key,
const std::string& outputFileName,
int32_t duration));
+ MOCK_METHOD6(StartMicrophoneRecording,
+ void(int32_t application_key,
+ const std::string& outputFileName,
+ int32_t duration,
+ mobile_apis::SamplingRate::eType,
+ mobile_apis::BitsPerSample::eType,
+ mobile_apis::AudioType::eType));
MOCK_METHOD1(StopMicrophoneRecording, void(int32_t application_key));
MOCK_METHOD2(StartStreaming,
void(int32_t application_key,
@@ -57,7 +64,6 @@ class MockMediaManager : public media_manager::MediaManager {
MOCK_METHOD2(FramesProcessed,
void(int32_t application_key, int32_t frame_number));
MOCK_CONST_METHOD0(settings, const media_manager::MediaManagerSettings&());
- MOCK_CONST_METHOD1(DataSizeToMilliseconds, uint32_t(uint64_t data_size));
};
} // namespace media_manager_test
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 c7a6e3d50a..d93bdff7f7 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
@@ -137,9 +137,9 @@ class MockCacheManagerInterface : public ::policy::CacheManagerInterface {
void(const uint32_t service_type,
EndpointUrls& out_end_points));
MOCK_CONST_METHOD1(GetIconUrl, std::string(const std::string& policy_app_id));
- MOCK_METHOD1(
- GetNotificationsNumber,
- policy_table::NumberOfNotificationsType(const std::string& priority));
+ MOCK_METHOD2(GetNotificationsNumber,
+ policy_table::NumberOfNotificationsType(
+ const std::string& priority, const bool is_subtle));
MOCK_CONST_METHOD2(GetPriority,
bool(const std::string& policy_app_id,
std::string& priority));
@@ -202,10 +202,12 @@ class MockCacheManagerInterface : public ::policy::CacheManagerInterface {
MOCK_METHOD2(SetUserPermissionsForApp,
bool(const PermissionConsent& permissions,
bool* out_app_permissions_changed));
+ MOCK_METHOD1(SetPreloadedPtFlag, void(const bool is_preloaded));
MOCK_METHOD3(SetMetaInfo,
bool(const std::string& ccpu_version,
const std::string& wers_country_code,
const std::string& language));
+ MOCK_CONST_METHOD0(GetCCPUVersionFromPT, std::string());
MOCK_CONST_METHOD0(IsMetaInfoPresent, bool());
MOCK_METHOD1(SetSystemLanguage, bool(const std::string& language));
MOCK_METHOD1(Increment, void(usage_statistics::GlobalCounterId type));
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 bf092d38e8..0123c6c912 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
@@ -173,6 +173,7 @@ class MockPolicyManager : public PolicyManager {
void(const std::string& ccpu_version,
const std::string& wers_country_code,
const std::string& language));
+ MOCK_METHOD1(SetPreloadedPtFlag, void(const bool is_preloaded));
MOCK_METHOD2(SendNotificationOnPermissionsUpdated,
void(const std::string& device_id,
const std::string& application_id));
@@ -206,8 +207,9 @@ class MockPolicyManager : public PolicyManager {
MOCK_METHOD0(CleanupUnpairedDevices, bool());
MOCK_CONST_METHOD1(CanAppKeepContext, bool(const std::string& app_id));
MOCK_CONST_METHOD1(CanAppStealFocus, bool(const std::string& app_id));
- MOCK_CONST_METHOD1(GetNotificationsNumber,
- uint32_t(const std::string& priority));
+ MOCK_CONST_METHOD2(GetNotificationsNumber,
+ uint32_t(const std::string& priority,
+ const bool is_subtle));
MOCK_METHOD1(SetVINValue, void(const std::string& value));
MOCK_CONST_METHOD1(IsPredataPolicy, bool(const std::string& policy_app_id));
MOCK_CONST_METHOD1(HeartBeatTimeout, uint32_t(const std::string& app_id));
@@ -305,6 +307,7 @@ class MockPolicyManager : public PolicyManager {
MOCK_METHOD0(OnSystemRequestReceived, void());
MOCK_METHOD0(RetrySequenceFailed, void());
MOCK_METHOD0(ResetTimeout, void());
+ MOCK_CONST_METHOD0(GetCCPUVersionFromPT, std::string());
};
} // namespace policy_manager_test
} // namespace components
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 d8e13b4b2e..19de301dc3 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
@@ -106,9 +106,9 @@ class MockCacheManagerInterface : public CacheManagerInterface {
policy_table::AppServiceParameters* app_service_parameters));
MOCK_CONST_METHOD1(UnknownRPCPassthroughAllowed,
bool(const std::string& policy_app_id));
- MOCK_METHOD1(
- GetNotificationsNumber,
- policy_table::NumberOfNotificationsType(const std::string& priority));
+ MOCK_METHOD2(GetNotificationsNumber,
+ policy_table::NumberOfNotificationsType(
+ const std::string& priority, const bool is_subtle));
MOCK_CONST_METHOD2(GetPriority,
bool(const std::string& policy_app_id,
std::string& priority));
@@ -176,10 +176,12 @@ class MockCacheManagerInterface : public CacheManagerInterface {
bool(const std::string& app_id, bool is_device_allowed));
MOCK_METHOD1(SetUserPermissionsForApp,
bool(const PermissionConsent& permissions));
+ MOCK_METHOD1(SetPreloadedPtFlag, void(const bool is_preloaded));
MOCK_METHOD3(SetMetaInfo,
bool(const std::string& ccpu_version,
const std::string& wers_country_code,
const std::string& language));
+ MOCK_CONST_METHOD0(GetCCPUVersionFromPT, std::string());
MOCK_CONST_METHOD0(IsMetaInfoPresent, bool());
MOCK_METHOD1(SetSystemLanguage, bool(const std::string& language));
MOCK_METHOD1(Increment, void(usage_statistics::GlobalCounterId type));
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 c803f63c9d..4cb6455db6 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
@@ -172,6 +172,7 @@ class MockPolicyManager : public PolicyManager {
void(const std::string& ccpu_version,
const std::string& wers_country_code,
const std::string& language));
+ MOCK_METHOD1(SetPreloadedPtFlag, void(const bool is_preloaded));
MOCK_METHOD2(SendNotificationOnPermissionsUpdated,
void(const std::string& device_id,
const std::string& application_id));
@@ -204,8 +205,9 @@ class MockPolicyManager : public PolicyManager {
MOCK_METHOD0(CleanupUnpairedDevices, bool());
MOCK_CONST_METHOD1(CanAppKeepContext, bool(const std::string& app_id));
MOCK_CONST_METHOD1(CanAppStealFocus, bool(const std::string& app_id));
- MOCK_CONST_METHOD1(GetNotificationsNumber,
- uint32_t(const std::string& priority));
+ MOCK_CONST_METHOD2(GetNotificationsNumber,
+ uint32_t(const std::string& priority,
+ const bool is_subtle));
MOCK_METHOD1(SetVINValue, void(const std::string& value));
MOCK_CONST_METHOD1(IsPredataPolicy, bool(const std::string& policy_app_id));
MOCK_CONST_METHOD1(HeartBeatTimeout, uint32_t(const std::string& app_id));
@@ -262,6 +264,7 @@ class MockPolicyManager : public PolicyManager {
MOCK_METHOD0(ExceededIgnitionCycles, bool());
MOCK_METHOD0(ExceededDays, bool());
MOCK_METHOD0(StartPTExchange, void());
+ MOCK_METHOD0(TriggerPTUOnStartupIfRequired, void());
// --- Statistics Manager section
MOCK_METHOD1(Increment, void(usage_statistics::GlobalCounterId type));
@@ -307,6 +310,7 @@ class MockPolicyManager : public PolicyManager {
MOCK_CONST_METHOD1(GetAppRequestSubTypesState,
RequestSubType::State(const std::string& policy_app_id));
MOCK_METHOD0(ResetTimeout, void());
+ MOCK_CONST_METHOD0(GetCCPUVersionFromPT, std::string());
};
} // namespace policy_manager_test
diff --git a/src/components/include/test/protocol_handler/mock_protocol_handler.h b/src/components/include/test/protocol_handler/mock_protocol_handler.h
index 354c797c24..94a9efd9e5 100644
--- a/src/components/include/test/protocol_handler/mock_protocol_handler.h
+++ b/src/components/include/test/protocol_handler/mock_protocol_handler.h
@@ -64,9 +64,10 @@ class MockProtocolHandler : public ::protocol_handler::ProtocolHandler {
MOCK_CONST_METHOD0(get_settings,
const ::protocol_handler::ProtocolHandlerSettings&());
MOCK_METHOD0(get_session_observer, protocol_handler::SessionObserver&());
- MOCK_METHOD2(NotifySessionStarted,
+ MOCK_METHOD3(NotifySessionStarted,
void(const ::protocol_handler::SessionContext& context,
- std::vector<std::string>& rejected_params));
+ std::vector<std::string>& rejected_params,
+ const std::string err_reason));
MOCK_METHOD0(NotifyOnGetSystemTimeFailed, void());
MOCK_CONST_METHOD1(IsRPCServiceSecure, bool(const uint32_t connection_key));
MOCK_METHOD0(ProcessFailedPTU, void());
diff --git a/src/components/include/test/protocol_handler/mock_session_observer.h b/src/components/include/test/protocol_handler/mock_session_observer.h
index 01bb41a96e..6bd67f6516 100644
--- a/src/components/include/test/protocol_handler/mock_session_observer.h
+++ b/src/components/include/test/protocol_handler/mock_session_observer.h
@@ -65,10 +65,25 @@ class MockSessionObserver : public ::protocol_handler::SessionObserver {
const uint8_t sessionId,
uint32_t* hashCode,
const protocol_handler::ServiceType& service_type));
+ MOCK_METHOD5(
+ OnSessionEndedCallback,
+ uint32_t(const transport_manager::ConnectionUID connection_handle,
+ const uint8_t sessionId,
+ const uint32_t& hashCode,
+ const protocol_handler::ServiceType& service_type,
+ std::string* err_reason));
+ MOCK_METHOD5(
+ OnSessionEndedCallback,
+ uint32_t(const transport_manager::ConnectionUID connection_handle,
+ const uint8_t sessionId,
+ uint32_t* hashCode,
+ const protocol_handler::ServiceType& service_type,
+ std::string* err_reason));
MOCK_METHOD1(OnApplicationFloodCallBack,
void(const uint32_t& connection_key));
MOCK_METHOD1(OnMalformedMessageCallback,
void(const uint32_t& connection_key));
+ MOCK_METHOD1(OnFinalMessageCallback, void(const uint32_t& connection_key));
MOCK_CONST_METHOD1(
TransportTypeProfileStringFromConnHandle,
const std::string(transport_manager::ConnectionUID connection_handle));
@@ -103,6 +118,10 @@ class MockSessionObserver : public ::protocol_handler::SessionObserver {
bool(uint32_t connection_id,
uint8_t session_id,
uint8_t& protocol_version));
+ MOCK_CONST_METHOD3(ProtocolVersionUsed,
+ bool(uint32_t connection_id,
+ uint8_t session_id,
+ utils::SemanticVersion& full_protocol_version));
MOCK_CONST_METHOD2(SessionServiceExists,
bool(const uint32_t connection_key,
const protocol_handler::ServiceType& service_type));
diff --git a/src/components/include/utils/auto_trace.h b/src/components/include/utils/auto_trace.h
index 36ff3be281..d975d1ae42 100644
--- a/src/components/include/utils/auto_trace.h
+++ b/src/components/include/utils/auto_trace.h
@@ -33,20 +33,19 @@
#ifndef SRC_COMPONENTS_INCLUDE_UTILS_AUTO_TRACE_H_
#define SRC_COMPONENTS_INCLUDE_UTILS_AUTO_TRACE_H_
-#include <log4cxx/logger.h>
#include <string>
+#include "utils/ilogger.h"
namespace logger {
class AutoTrace {
public:
- AutoTrace(log4cxx::LoggerPtr logger,
- const log4cxx::spi::LocationInfo& location);
+ AutoTrace(const std::string& component, const LocationInfo& location);
~AutoTrace();
private:
- log4cxx::LoggerPtr logger_;
- log4cxx::spi::LocationInfo location_;
+ std::string component_;
+ LocationInfo location_;
};
} // namespace logger
diff --git a/src/components/include/utils/push_log.h b/src/components/include/utils/ilogger.h
index f6c396ae71..3cf4777391 100644
--- a/src/components/include/utils/push_log.h
+++ b/src/components/include/utils/ilogger.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Ford Motor Company
+ * Copyright (c) 2020, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,28 +30,62 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef SRC_COMPONENTS_INCLUDE_UTILS_PUSH_LOG_H_
-#define SRC_COMPONENTS_INCLUDE_UTILS_PUSH_LOG_H_
+#pragma once
-#include <log4cxx/logger.h>
+#include <chrono>
#include <string>
+#include <thread>
namespace logger {
-bool push_log(log4cxx::LoggerPtr logger,
- log4cxx::LevelPtr level,
- const std::string& entry,
- log4cxx_time_t timeStamp,
- const log4cxx::spi::LocationInfo& location,
- const log4cxx::LogString& threadName);
+enum class LogLevel {
+ TRACE_LEVEL,
+ DEBUG_LEVEL,
+ INFO_LEVEL,
+ WARNING_LEVEL,
+ ERROR_LEVEL,
+ FATAL_LEVEL
+};
-void flush_logger();
+struct LocationInfo {
+ std::string file_name;
+ std::string function_name;
+ int line_number;
+};
-bool logs_enabled();
-void set_logs_enabled(bool state);
+typedef std::chrono::high_resolution_clock::time_point TimePoint;
-void create_log_message_loop_thread();
-void delete_log_message_loop_thread(log4cxx::LoggerPtr& logger);
-} // namespace logger
+struct LogMessage {
+ std::string component_; // <- component_name
+ LogLevel log_level_;
+ std::string log_event_;
+ TimePoint timestamp_;
+ LocationInfo location_;
+ std::thread::id thread_id_;
+};
+
+class Logger {
+ public:
+ virtual bool IsEnabledFor(const std::string& component,
+ LogLevel log_level) const = 0;
+ virtual void DeInit() = 0;
+ virtual void Flush() = 0;
+ virtual void PushLog(const LogMessage& log_message) = 0;
+ static Logger& instance(Logger* pre_init = nullptr);
+};
-#endif // SRC_COMPONENTS_INCLUDE_UTILS_PUSH_LOG_H_
+class ThirdPartyLoggerInterface {
+ public:
+ virtual ~ThirdPartyLoggerInterface() {}
+ virtual void Init() = 0;
+ virtual void DeInit() = 0;
+ virtual bool IsEnabledFor(const std::string& component,
+ LogLevel log_level) const = 0;
+ virtual void PushLog(const LogMessage& log_message) = 0;
+};
+
+class LoggerInitializer {
+ public:
+ virtual void Init(std::unique_ptr<ThirdPartyLoggerInterface>&& impl) = 0;
+};
+} // namespace logger
diff --git a/src/components/include/utils/logger.h b/src/components/include/utils/logger.h
index d492cfcb1b..6ceff88738 100644
--- a/src/components/include/utils/logger.h
+++ b/src/components/include/utils/logger.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Ford Motor Company
+ * Copyright (c) 2020, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -33,151 +33,103 @@
#ifndef SRC_COMPONENTS_INCLUDE_UTILS_LOGGER_H_
#define SRC_COMPONENTS_INCLUDE_UTILS_LOGGER_H_
-#ifdef ENABLE_LOG
-#include <errno.h>
-#include <log4cxx/propertyconfigurator.h>
-#include <log4cxx/spi/loggingevent.h>
-#include <string.h>
-#include <sstream>
-#include "utils/auto_trace.h"
-#include "utils/logger_status.h"
-#include "utils/push_log.h"
-#endif // ENABLE_LOG
+#include "utils/ilogger.h"
#ifdef ENABLE_LOG
+#include <sstream>
+#include <string>
-#define CREATE_LOGGERPTR_GLOBAL(logger_var, logger_name) \
- namespace { \
- CREATE_LOGGERPTR_LOCAL(logger_var, logger_name); \
+#include "utils/auto_trace.h"
+#define SDL_CREATE_LOG_VARIABLE(component_name) \
+ namespace { \
+ static std::string logger_(component_name); \
}
-#define CREATE_LOGGERPTR_LOCAL(logger_var, logger_name) \
- log4cxx::LoggerPtr logger_var = \
- log4cxx::LoggerPtr(log4cxx::Logger::getLogger(logger_name));
+#define SDL_CREATE_LOCAL_LOG_VARIABLE(component_name) \
+ std::string logger_(component_name);
-#define INIT_LOGGER(file_name, logs_enabled) \
- log4cxx::PropertyConfigurator::configure(file_name); \
- logger::set_logs_enabled(logs_enabled);
+// special macros to dump logs from queue
+// it's needed, for example, when crash happened
+#define SDL_FLUSH_LOGGER() logger::Logger::instance().Flush();
// Logger deinitilization function and macro, need to stop log4cxx writing
// without this deinitilization log4cxx threads continue using some instances
// destroyed by exit()
-void deinit_logger();
-#define DEINIT_LOGGER() deinit_logger()
-
-// Logger thread deinitilization macro that need to stop the thread of handling
-// messages for the log4cxx
-#define DELETE_THREAD_LOGGER(logger_var) \
- logger::delete_log_message_loop_thread(logger_var)
-
-// special macros to dump logs from queue
-// it's need, for example, when crash happend
-#define FLUSH_LOGGER() logger::flush_logger()
-
-#define LOG4CXX_IS_TRACE_ENABLED(logger) logger->isTraceEnabled()
-
-log4cxx_time_t time_now();
-
-#define LOG_WITH_LEVEL(loggerPtr, logLevel, logEvent) \
- do { \
- if (logger::logs_enabled()) { \
- if (logger::logger_status != logger::DeletingLoggerThread) { \
- if (loggerPtr->isEnabledFor(logLevel)) { \
- std::stringstream accumulator; \
- accumulator << logEvent; \
- logger::push_log( \
- loggerPtr, \
- logLevel, \
- accumulator.str(), \
- time_now(), \
- LOG4CXX_LOCATION, \
- ::log4cxx::spi::LoggingEvent::getCurrentThreadName()); \
- } \
- } \
- } \
+#define SDL_DEINIT_LOGGER() logger::Logger::instance().DeInit();
+
+#define LOG_WITH_LEVEL(logLevel, logEvent) \
+ do { \
+ if (logger::Logger::instance().IsEnabledFor(logger_, logLevel)) { \
+ std::stringstream accumulator; \
+ accumulator << logEvent; \
+ logger::LogMessage message{ \
+ logger_, \
+ logLevel, \
+ accumulator.str(), \
+ std::chrono::high_resolution_clock::now(), \
+ logger::LocationInfo{__FILE__, __PRETTY_FUNCTION__, __LINE__}, \
+ std::this_thread::get_id()}; \
+ logger::Logger::instance().PushLog(message); \
+ } \
} while (false)
-#undef LOG4CXX_TRACE
-#define LOG4CXX_TRACE(loggerPtr, logEvent) \
- LOG_WITH_LEVEL(loggerPtr, ::log4cxx::Level::getTrace(), logEvent)
+#define SDL_LOG_TRACE(logEvent) \
+ LOG_WITH_LEVEL(logger::LogLevel::TRACE_LEVEL, logEvent)
-#define LOG4CXX_AUTO_TRACE_WITH_NAME_SPECIFIED(loggerPtr, auto_trace) \
- logger::AutoTrace auto_trace(loggerPtr, LOG4CXX_LOCATION)
-#define LOG4CXX_AUTO_TRACE(loggerPtr) \
- LOG4CXX_AUTO_TRACE_WITH_NAME_SPECIFIED(loggerPtr, SDL_local_auto_trace_object)
+#define SDL_LOG_AUTO_TRACE() \
+ logger::AutoTrace auto_trace( \
+ logger_, logger::LocationInfo{__FILE__, __PRETTY_FUNCTION__, __LINE__})
-#undef LOG4CXX_DEBUG
-#define LOG4CXX_DEBUG(loggerPtr, logEvent) \
- LOG_WITH_LEVEL(loggerPtr, ::log4cxx::Level::getDebug(), logEvent)
+#define SDL_LOG_DEBUG(logEvent) \
+ LOG_WITH_LEVEL(logger::LogLevel::DEBUG_LEVEL, logEvent)
-#undef LOG4CXX_INFO
-#define LOG4CXX_INFO(loggerPtr, logEvent) \
- LOG_WITH_LEVEL(loggerPtr, ::log4cxx::Level::getInfo(), logEvent)
+#define SDL_LOG_INFO(logEvent) \
+ LOG_WITH_LEVEL(logger::LogLevel::INFO_LEVEL, logEvent)
-#undef LOG4CXX_WARN
-#define LOG4CXX_WARN(loggerPtr, logEvent) \
- LOG_WITH_LEVEL(loggerPtr, ::log4cxx::Level::getWarn(), logEvent)
+#define SDL_LOG_WARN(logEvent) \
+ LOG_WITH_LEVEL(logger::LogLevel::WARNING_LEVEL, logEvent)
-#undef LOG4CXX_ERROR
-#define LOG4CXX_ERROR(loggerPtr, logEvent) \
- LOG_WITH_LEVEL(loggerPtr, ::log4cxx::Level::getError(), logEvent)
+#define SDL_LOG_ERROR(logEvent) \
+ LOG_WITH_LEVEL(logger::LogLevel::ERROR_LEVEL, logEvent)
-#undef LOG4CXX_FATAL
-#define LOG4CXX_FATAL(loggerPtr, logEvent) \
- LOG_WITH_LEVEL(loggerPtr, ::log4cxx::Level::getFatal(), logEvent)
+#define SDL_LOG_FATAL(logEvent) \
+ LOG_WITH_LEVEL(logger::LogLevel::FATAL_LEVEL, logEvent)
-#define LOG4CXX_ERROR_WITH_ERRNO(loggerPtr, message) \
- LOG4CXX_ERROR( \
- loggerPtr, \
- message << ", error code " << errno << " (" << strerror(errno) << ")")
+#define SDL_LOG_ERROR_WITH_ERRNO(message) \
+ SDL_LOG_ERROR(message << ", error code " << errno << " (" << strerror(errno) \
+ << ")")
-#define LOG4CXX_WARN_WITH_ERRNO(loggerPtr, message) \
- LOG4CXX_WARN( \
- loggerPtr, \
- message << ", error code " << errno << " (" << strerror(errno) << ")")
+#define SDL_LOG_WARN_WITH_ERRNO(message) \
+ SDL_LOG_WARN(message << ", error code " << errno << " (" << strerror(errno) \
+ << ")")
#else // ENABLE_LOG is OFF
+#define SDL_CREATE_LOG_VARIABLE(x)
-#define CREATE_LOGGERPTR_GLOBAL(logger_var, logger_name)
-
-#define CREATE_LOGGERPTR_LOCAL(logger_var, logger_name)
-
-#define INIT_LOGGER(file_name, logs_enabled)
-
-#define DEINIT_LOGGER()
+#define SDL_CREATE_LOCAL_LOG_VARIABLE(x)
-#define DELETE_THREAD_LOGGER(logger_var)
+#define SDL_DEINIT_LOGGER()
-#define FLUSH_LOGGER()
+#define SDL_FLUSH_LOGGER()
-#define LOG4CXX_IS_TRACE_ENABLED(logger) false
+#define SDL_LOG_TRACE(x)
-#undef LOG4CXX_TRACE
-#define LOG4CXX_TRACE(x, y)
+#define SDL_LOG_AUTO_TRACE()
-#define LOG4CXX_AUTO_TRACE_WITH_NAME_SPECIFIED(loggerPtr, auto_trace)
-#define LOG4CXX_AUTO_TRACE(loggerPtr)
+#define SDL_LOG_DEBUG(x)
-#undef LOG4CXX_DEBUG
-#define LOG4CXX_DEBUG(x, y)
+#define SDL_LOG_INFO(x)
-#undef LOG4CXX_INFO
-#define LOG4CXX_INFO(x, y)
+#define SDL_LOG_WARN(x)
-#undef LOG4CXX_WARN
-#define LOG4CXX_WARN(x, y)
+#define SDL_LOG_ERROR(x)
-#undef LOG4CXX_ERROR
-#define LOG4CXX_ERROR(x, y)
+#define SDL_LOG_ERROR_WITH_ERRNO(x)
-#undef LOG4CXX_ERROR_WITH_ERRNO
-#define LOG4CXX_ERROR_WITH_ERRNO(x, y)
+#define SDL_LOG_WARN_WITH_ERRNO(x)
-#undef LOG4CXX_WARN_WITH_ERRNO
-#define LOG4CXX_WARN_WITH_ERRNO(x, y)
+#define SDL_LOG_FATAL(x)
-#undef LOG4CXX_FATAL
-#define LOG4CXX_FATAL(x, y)
#endif // ENABLE_LOG
#endif // SRC_COMPONENTS_INCLUDE_UTILS_LOGGER_H_
diff --git a/src/components/include/utils/logger_status.h b/src/components/include/utils/logger_status.h
deleted file mode 100644
index 17fa0562c2..0000000000
--- a/src/components/include/utils/logger_status.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SRC_COMPONENTS_INCLUDE_UTILS_LOGGER_STATUS_H_
-#define SRC_COMPONENTS_INCLUDE_UTILS_LOGGER_STATUS_H_
-
-namespace logger {
-
-typedef enum {
- LoggerThreadNotCreated,
- CreatingLoggerThread,
- LoggerThreadCreated,
- DeletingLoggerThread
-} LoggerStatus;
-
-// this variable is only changed when creating and deleting logger thread
-// its reads and writes are believed to be atomic
-// thus it shall be considered thread safe
-extern volatile LoggerStatus logger_status;
-
-} // namespace logger
-
-#endif // SRC_COMPONENTS_INCLUDE_UTILS_LOGGER_STATUS_H_
diff --git a/src/components/include/utils/macro.h b/src/components/include/utils/macro.h
index 00298f690e..7c39bbd356 100644
--- a/src/components/include/utils/macro.h
+++ b/src/components/include/utils/macro.h
@@ -60,9 +60,9 @@
#ifdef DEBUG
#define ASSERT(condition) \
- FLUSH_LOGGER(); \
+ SDL_FLUSH_LOGGER(); \
do { \
- DEINIT_LOGGER(); \
+ SDL_DEINIT_LOGGER(); \
assert(condition); \
} while (false)
#else // RELEASE
@@ -76,9 +76,8 @@
#define DCHECK(condition) \
if (!(condition)) { \
- CREATE_LOGGERPTR_LOCAL(logger_, "Utils"); \
- LOG4CXX_FATAL(logger_, \
- "DCHECK failed with \"" << #condition << "\" [" \
+ SDL_CREATE_LOCAL_LOG_VARIABLE("Utils"); \
+ SDL_LOG_FATAL("DCHECK failed with \"" << #condition << "\" [" \
<< __FUNCTION__ << "][" << __FILE__ \
<< ':' << __LINE__ << ']'); \
ASSERT((condition)); \
@@ -90,9 +89,8 @@
*/
#define DCHECK_OR_RETURN(condition, return_value) \
if (!(condition)) { \
- CREATE_LOGGERPTR_LOCAL(logger_, "Utils"); \
- LOG4CXX_FATAL(logger_, \
- "DCHECK failed with \"" << #condition << "\" [" \
+ SDL_CREATE_LOCAL_LOG_VARIABLE("Utils"); \
+ SDL_LOG_FATAL("DCHECK failed with \"" << #condition << "\" [" \
<< __FUNCTION__ << "][" << __FILE__ \
<< ':' << __LINE__ << ']'); \
ASSERT((condition)); \
@@ -104,9 +102,8 @@
*/
#define DCHECK_OR_RETURN_VOID(condition) \
if (!(condition)) { \
- CREATE_LOGGERPTR_LOCAL(logger_, "Utils"); \
- LOG4CXX_FATAL(logger_, \
- "DCHECK failed with \"" << #condition << "\" [" \
+ SDL_CREATE_LOCAL_LOG_VARIABLE("Utils"); \
+ SDL_LOG_FATAL("DCHECK failed with \"" << #condition << "\" [" \
<< __FUNCTION__ << "][" << __FILE__ \
<< ':' << __LINE__ << ']'); \
ASSERT((condition)); \
diff --git a/src/components/include/utils/message_queue.h b/src/components/include/utils/message_queue.h
index 8dfe7afa52..fd7b762a48 100644
--- a/src/components/include/utils/message_queue.h
+++ b/src/components/include/utils/message_queue.h
@@ -171,13 +171,11 @@ bool MessageQueue<T, Q>::IsShuttingDown() const {
template <typename T, class Q>
void MessageQueue<T, Q>::push(const T& element) {
- {
- sync_primitives::AutoLock auto_lock(queue_lock_);
- if (shutting_down_) {
- return;
- }
- queue_.push(element);
+ sync_primitives::AutoLock auto_lock(queue_lock_);
+ if (shutting_down_) {
+ return;
}
+ queue_.push(element);
queue_new_items_.Broadcast();
}
diff --git a/src/components/include/utils/messagemeter.h b/src/components/include/utils/messagemeter.h
index 1148a65b57..a5ede6057f 100644
--- a/src/components/include/utils/messagemeter.h
+++ b/src/components/include/utils/messagemeter.h
@@ -37,8 +37,11 @@
#include <map>
#include <set>
#include "utils/date_time.h"
+#include "utils/lock.h"
namespace utils {
+
+SDL_CREATE_LOG_VARIABLE("MessageMeter")
/**
@brief The MessageMeter class need to count message frequency
Default time range value is 1 second
@@ -86,10 +89,13 @@ class MessageMeter {
date_time::TimeDuration time_range() const;
private:
+ size_t FrequencyImpl(const Id& id);
+
date_time::TimeDuration time_range_;
typedef std::multiset<date_time::TimeDuration> Timings;
typedef std::map<Id, Timings> TimingMap;
TimingMap timing_map_;
+ sync_primitives::Lock timing_map_lock_;
};
template <class Id>
@@ -99,22 +105,33 @@ MessageMeter<Id>::MessageMeter() {
template <class Id>
size_t MessageMeter<Id>::TrackMessage(const Id& id) {
+ SDL_LOG_AUTO_TRACE();
return TrackMessages(id, 1);
}
template <class Id>
size_t MessageMeter<Id>::TrackMessages(const Id& id, const size_t count) {
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(timing_map_lock_);
Timings& timings = timing_map_[id];
const date_time::TimeDuration current_time = date_time::getCurrentTime();
for (size_t i = 0; i < count; ++i) {
// Adding to the end is amortized constant
timings.insert(timings.end(), current_time);
}
- return Frequency(id);
+ return FrequencyImpl(id);
}
template <class Id>
size_t MessageMeter<Id>::Frequency(const Id& id) {
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(timing_map_lock_);
+ return FrequencyImpl(id);
+}
+
+template <class Id>
+size_t MessageMeter<Id>::FrequencyImpl(const Id& id) {
+ SDL_LOG_AUTO_TRACE();
typename TimingMap::iterator it = timing_map_.find(id);
if (it == timing_map_.end()) {
return 0u;
@@ -131,21 +148,27 @@ size_t MessageMeter<Id>::Frequency(const Id& id) {
template <class Id>
void MessageMeter<Id>::RemoveIdentifier(const Id& id) {
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(timing_map_lock_);
timing_map_.erase(id);
}
template <class Id>
void MessageMeter<Id>::ClearIdentifiers() {
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(timing_map_lock_);
timing_map_.clear();
}
template <class Id>
void MessageMeter<Id>::set_time_range(const size_t time_range_msecs) {
+ SDL_LOG_AUTO_TRACE();
time_range_ = date_time::milliseconds(time_range_msecs);
}
template <class Id>
void MessageMeter<Id>::set_time_range(
const date_time::TimeDuration& time_range) {
+ SDL_LOG_AUTO_TRACE();
time_range_ = time_range;
}
template <class Id>
diff --git a/src/components/include/utils/rwlock.h b/src/components/include/utils/rwlock.h
index 5c7735713e..d98a2c7db7 100644
--- a/src/components/include/utils/rwlock.h
+++ b/src/components/include/utils/rwlock.h
@@ -176,6 +176,40 @@ class AutoWriteLock {
DISALLOW_COPY_AND_ASSIGN(AutoWriteLock);
};
+/**
+ * @brief Unlocks read-write lock which locked on read
+ */
+class AutoReadUnlock {
+ public:
+ explicit AutoReadUnlock(RWLock& rwlock) : rwlock_(rwlock) {
+ rwlock_.Release();
+ }
+ ~AutoReadUnlock() {
+ rwlock_.AcquireForReading();
+ }
+
+ private:
+ RWLock& rwlock_;
+ DISALLOW_COPY_AND_ASSIGN(AutoReadUnlock);
+};
+
+/**
+ * @brief Unlocks read-write lock which locked on write
+ */
+class AutoWriteUnlock {
+ public:
+ explicit AutoWriteUnlock(RWLock& rwlock) : rwlock_(rwlock) {
+ rwlock_.Release();
+ }
+ ~AutoWriteUnlock() {
+ rwlock_.AcquireForWriting();
+ }
+
+ private:
+ RWLock& rwlock_;
+ DISALLOW_COPY_AND_ASSIGN(AutoWriteUnlock);
+};
+
} // namespace sync_primitives
#endif // SRC_COMPONENTS_INCLUDE_UTILS_RWLOCK_H_
diff --git a/src/components/include/utils/threads/message_loop_thread.h b/src/components/include/utils/threads/message_loop_thread.h
index 26ae127b69..6dea86696b 100644
--- a/src/components/include/utils/threads/message_loop_thread.h
+++ b/src/components/include/utils/threads/message_loop_thread.h
@@ -132,16 +132,17 @@ size_t MessageLoopThread<Q>::GetMessageQueueSize() const {
return message_queue_.size();
}
+SDL_CREATE_LOG_VARIABLE("Utils")
+
template <class Q>
MessageLoopThread<Q>::MessageLoopThread(const std::string& name,
Handler* handler,
const ThreadOptions& thread_opts)
: thread_delegate_(new LoopThreadDelegate(&message_queue_, handler))
, thread_(threads::CreateThread(name.c_str(), thread_delegate_)) {
- const bool started = thread_->start(thread_opts);
+ const bool started = thread_->Start(thread_opts);
if (!started) {
- CREATE_LOGGERPTR_LOCAL(logger_, "Utils")
- LOG4CXX_ERROR(logger_, "Failed to start thread " << name);
+ SDL_LOG_ERROR("Failed to start thread " << name);
}
}
@@ -159,7 +160,7 @@ void MessageLoopThread<Q>::PostMessage(const Message& message) {
template <class Q>
void MessageLoopThread<Q>::Shutdown() {
- thread_->join();
+ thread_->Stop(threads::Thread::kThreadStopDelegate);
}
template <class Q>
@@ -178,8 +179,7 @@ MessageLoopThread<Q>::LoopThreadDelegate::LoopThreadDelegate(
template <class Q>
void MessageLoopThread<Q>::LoopThreadDelegate::threadMain() {
- CREATE_LOGGERPTR_LOCAL(logger_, "Utils")
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
while (!message_queue_.IsShuttingDown()) {
DrainQue();
message_queue_.wait();
diff --git a/src/components/include/utils/threads/thread.h b/src/components/include/utils/threads/thread.h
index 6f72679d63..73a43c48b1 100644
--- a/src/components/include/utils/threads/thread.h
+++ b/src/components/include/utils/threads/thread.h
@@ -76,36 +76,73 @@ typedef pthread_t PlatformThreadHandle;
* printf("ok!\n");
*/
-class Thread;
-void enqueue_to_join(Thread* thread);
-
Thread* CreateThread(const char* name, ThreadDelegate* delegate);
void DeleteThread(Thread* thread);
class Thread {
- private:
- const std::string name_;
- // Should be locked to protect delegate_ value
- sync_primitives::Lock delegate_lock_;
- ThreadDelegate* delegate_;
- PlatformThreadHandle handle_;
- ThreadOptions thread_options_;
- // Should be locked to protect isThreadRunning_ and thread_created_ values
- sync_primitives::Lock state_lock_;
- volatile unsigned int isThreadRunning_;
- volatile bool stopped_;
- volatile bool finalized_;
- bool thread_created_;
- // Signalled when Thread::start() is called
- sync_primitives::ConditionalVariable run_cond_;
-
public:
- static int count;
+ /**
+ * @brief ThreadCommand is used to command the thread
+ * kThreadCommandNone - no command, used to indicate that there is no pending
+ * command
+ * kThreadCommandRun - commands thread to run (do another iteration)
+ * kThreadCommandFinalize - informs thread that must exit
+ */
+ enum ThreadCommand {
+ kThreadCommandNone, // must be first
+ kThreadCommandRun,
+ kThreadCommandFinalize // keep last
+ // in case of new commands - update/check threadFunc()
+ };
+
+ /**
+ * @brief ThreadState informs outside world about its state
+ * kThreadStateError - if pthread_create returned an error
+ * kThreadStateNone - there is no thread at all
+ * kThreadStateIdle - the thread is in state idle
+ * kThreadStateRunning - thread is in state running (executing delegates
+ * threadMain())
+ * kThreadStateCompleted - thread completed
+ */
+ enum ThreadState {
+ kThreadStateError = -1,
+ kThreadStateNone,
+ kThreadStateIdle,
+ kThreadStateRunning,
+ kThreadStateCompleted
+ };
+
+ /**
+ * @brief ThreadStopOption
+ * kThreadStopDelegate - executing delegates exitThreadMain and
+ * move thread to kThreadStateIdle
+ * kThreadSoftStop - executing kThreadStopDelegate and
+ * move thread to kThreadStateCompleted
+ * kThreadForceStop - executing kThreadSoftStop,
+ * if necessary pthread_cancel or pthread_exit and
+ * move thread to kThreadStateCompleted
+ */
+ enum ThreadStopOption {
+ kThreadStopDelegate,
+ kThreadSoftStop,
+ kThreadForceStop
+ };
+
+ /**
+ * @brief ThreadJoinOption
+ * kThreadJoinDelegate - waiting for finish threadMain
+ * kThreadJoinThread - waiting for finish threadFunc
+ */
+ enum ThreadJoinOption { kThreadJoinDelegate, kThreadJoinThread };
+
+ friend Thread* CreateThread(const char* name, ThreadDelegate* delegate);
+ friend void DeleteThread(Thread* thread);
+
/**
* @brief Starts the thread.
* @return true if the thread was successfully started.
*/
- bool start();
+ bool Start();
/**
* @brief Starts the thread. Behaves exactly like \ref start() in addition to
@@ -114,26 +151,44 @@ class Thread {
* for details.
* @return true if the thread was successfully started.
*/
- bool start(const ThreadOptions& options);
+ bool Start(const ThreadOptions& options);
- sync_primitives::Lock& delegate_lock() {
- return delegate_lock_;
- }
+ /**
+ * @brief Signals the thread to exit and returns once the thread has exited.
+ * After this method returns, the Thread object is completely reset and may
+ * be used as if it were newly constructed (i.e., Start may be called again).
+ *
+ * Stop may be called multiple times and is simply ignored if the thread is
+ * already stopped.
+ *
+ * Stop will wait for delegate exit
+ */
+ bool Stop(const ThreadStopOption stop_option);
- ThreadDelegate* delegate() const {
+ /**
+ * @brief Blocks the current thread until
+ * the fucntion identified by join_option finishes execution.
+ * If that fucntion has already terminated, then
+ * Join returns immediately.
+ * @param join_option - specify function to wait
+ */
+ void Join(const ThreadJoinOption join_option);
+
+ ThreadDelegate* GetDelegate() const {
return delegate_;
}
- void set_delegate(ThreadDelegate* delegate) {
+ void SetDelegate(ThreadDelegate* delegate) {
+ Stop(kThreadStopDelegate);
delegate_ = delegate;
}
- friend Thread* CreateThread(const char* name, ThreadDelegate* delegate);
- friend void DeleteThread(Thread* thread);
-
- public:
- // Yield current thread
- static void yield();
+ /**
+ * @brief Causes the calling thread to relinquish the CPU. The
+ * thread is moved to the end of the queue for its static priority and a
+ * new thread gets to run.
+ */
+ static void SchedYield();
// Get unique ID of currently executing thread
static PlatformThreadHandle CurrentId();
@@ -143,22 +198,10 @@ class Thread {
std::string name);
/**
- * @brief Signals the thread to exit and returns once the thread has exited.
- * After this method returns, the Thread object is completely reset and may
- * be used as if it were newly constructed (i.e., Start may be called again).
- *
- * Stop may be called multiple times and is simply ignored if the thread is
- * already stopped.
- */
- void stop();
-
- void join();
-
- /**
* @brief Get thread name.
* @return thread name
*/
- const std::string& name() {
+ const std::string& GetThreadName() {
return name_;
}
@@ -167,17 +210,16 @@ class Thread {
* When a thread is running, the thread_id_ is non-zero.
* @return true if the thread has been started, and not yet stopped.
*/
- bool is_running() const {
- return isThreadRunning_;
+ bool IsRunning() {
+ sync_primitives::AutoLock auto_lock(state_lock_);
+ return kThreadStateRunning == thread_state_;
}
- void set_running(bool running);
-
/**
* @brief Is thread joinable?
* @return - Returns true if the thread is joinable.
*/
- bool is_joinable() const {
+ bool IsJoinable() const {
return thread_options_.is_joinable();
}
@@ -185,7 +227,7 @@ class Thread {
* @brief Thread stack size
* @return thread stack size
*/
- size_t stack_size() const {
+ size_t StackSize() const {
return thread_options_.stack_size();
}
@@ -193,7 +235,7 @@ class Thread {
* @brief The native thread handle.
* @return thread handle.
*/
- PlatformThreadHandle thread_handle() const {
+ PlatformThreadHandle ThreadHandle() const {
return handle_;
}
@@ -207,7 +249,7 @@ class Thread {
* @brief Thread options.
* @return thread options.
*/
- const ThreadOptions& thread_options() const {
+ const ThreadOptions& GetThreadOptions() const {
return thread_options_;
}
@@ -216,9 +258,6 @@ class Thread {
*/
static size_t kMinStackSize;
- protected:
- sync_primitives::ConditionalVariable state_cond_;
-
private:
/**
* Ctor.
@@ -235,6 +274,83 @@ class Thread {
static void* threadFunc(void* arg);
static void cleanup(void* arg);
DISALLOW_COPY_AND_ASSIGN(Thread);
+
+ /**
+ * @brief Initializes the thread attributes and
+ * set thread options into attributes
+ * @param thread_options - thread options
+ * @return pthread_attr_t - initialized the thread attributes
+ */
+ pthread_attr_t SetThreadCreationAttributes(ThreadOptions* thread_options);
+
+ /**
+ * @brief Executing delegates exitThreadMain and move thread to
+ * kThreadStateIdle. That funciton is not thread safe.
+ * @param auto_lock - Locked object is used to wait
+ * thread iteration completion
+ * @return true if delegate has been successfully stopped,
+ * false otherwise
+ */
+ bool StopDelegate(sync_primitives::AutoLock& auto_lock);
+
+ /**
+ * @brief Executing StopDelegate and run kThreadCommandFinalize command,
+ * move thread to kThreadStateCompleted,
+ * that funciton is not thread safe
+ * @param auto_lock - Locked object used for waiting
+ * of the last iteration in thread
+ * @return true if thread has been successfully stopped,
+ * false otherwise
+ */
+ bool StopSoft(sync_primitives::AutoLock& auto_lock);
+
+ /**
+ * @brief Executing StopSoft, if necessary pthread_cancel or pthread_exit
+ * and move thread to kThreadStateCompleted,
+ * that funciton is not thread safe
+ * @param auto_lock - Locked object used for waiting
+ * of the last iteration in thread
+ */
+ void StopForce(sync_primitives::AutoLock& auto_lock);
+
+ /**
+ * @brief Waiting finished iteration in thread,
+ * that funciton is not thread safe
+ * @param auto_lock - Locked object using for waiting
+ * finishing iteration in thread
+ */
+ void JoinDelegate(sync_primitives::AutoLock& auto_lock);
+
+ const std::string name_;
+ ThreadDelegate* delegate_;
+ PlatformThreadHandle handle_;
+ ThreadOptions thread_options_;
+ // Should be locked to protect thread state
+ sync_primitives::Lock state_lock_;
+ sync_primitives::ConditionalVariable state_cond_;
+
+ /**
+ * @brief Used to request actions from worker thread.
+ */
+ volatile ThreadCommand thread_command_;
+
+ /**
+ * @brief Used from worker thread to inform about its status.
+ */
+ volatile ThreadState thread_state_;
+
+#ifdef BUILD_TESTS
+ FRIEND_TEST(PosixThreadTest,
+ StartThreadWithNullPtrDelegate_ExpectThreadStateNone);
+ FRIEND_TEST(PosixThreadTest,
+ StartThreadExecutingThreadMain_ExpectThreadStateRunning);
+ FRIEND_TEST(
+ PosixThreadTest,
+ StartThreadExecutingThreadMainCallStopDelegate_ExpectThreadStateIdle);
+ FRIEND_TEST(
+ PosixThreadTest,
+ StartThreadExecutingThreadMainCallForceStop_ExpectThreadStateCompleted);
+#endif
};
} // namespace threads
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index 6c5c932c3e..a9ad0792ec 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -79,6 +79,12 @@
</element>
</enum>
+<enum name="CapacityUnit">
+ <element name="LITERS" />
+ <element name="KILOWATTHOURS" />
+ <element name="KILOGRAMS" />
+</enum>
+
<enum name="PredefinedWindows">
<element name="DEFAULT_WINDOW" value="0">
<description>The default window is a main window pre-created on behalf of the app.</description>
@@ -334,6 +340,7 @@
<element name="SYSTEM" />
<element name="PROJECTION" />
<element name="REMOTE_CONTROL" />
+ <element name="WEB_VIEW" />
</enum>
<enum name="CloudConnectionStatus">
@@ -534,6 +541,9 @@
<element name="CLOSE_CLOUD_CONNECTION">
<description>By getting this value, SDL puts the named app to NONE HMILevel. Used by the HMI to close a cloud app connection.</description>
</element>
+ <element name="RESOURCE_CONSTRAINT">
+ <description>By getting this value, SDL should unregister the application to allow the HMI to close the application.</description>
+ </element>
</enum>
<enum name="TextFieldName">
@@ -622,7 +632,16 @@
<description> Optional location address (if applicable) for SendLocation.</description>
</element>
<element name="phoneNumber">
- <description> Optional hone number of intended location / establishment (if applicable) for SendLocation.</description>
+ <description> Optional phone number of intended location / establishment (if applicable) for SendLocation.</description>
+ </element>
+ <element name="subtleAlertText1">
+ <description>The first line of the subtle alert text field; applies to `SubtleAlert` `alertText1`</description>
+ </element>
+ <element name="subtleAlertText2">
+ <description>The second line of the subtle alert text field; applies to `SubtleAlert` `alertText2`</description>
+ </element>
+ <element name="subtleAlertSoftButtonText">
+ <description>A text field in the soft button of a subtle alert; applies to `SubtleAlert` `softButtons`</description>
</element>
<element name="timeToDestination"/>
<!-- TO DO to be removed -->
@@ -717,6 +736,12 @@
<element name="alertIcon">
<description>The image field for Alert</description>
</element>
+ <element name="subMenuIcon">
+ <description>The image field for AddSubMenu.menuIcon</description>
+ </element>
+ <element name="subtleAlertIcon">
+ <description>The image of the subtle alert; applies to `SubtleAlert` `alertIcon`</description>
+ </element>
</enum>
<enum name="TextAlignment">
@@ -856,14 +881,6 @@
</element>
</enum>
-<struct name="FuelRange">
- <param name="type" type="Common.FuelType" mandatory="false"/>
- <param name="range" type="Float" minvalue="0" maxvalue="10000" mandatory="false">
- <description>
- The estimate range in KM the vehicle can travel based on fuel level and consumption.
- </description>
- </param>
-</struct>
<enum name="ComponentVolumeStatus">
<description>The volume status of a vehicle component.</description>
@@ -887,6 +904,27 @@
</element>
</enum>
+<struct name="FuelRange">
+ <param name="type" type="Common.FuelType" mandatory="false"/>
+ <param name="range" type="Float" minvalue="0" maxvalue="10000" mandatory="false">
+ <description>
+ The estimate range in KM the vehicle can travel based on fuel level and consumption.
+ </description>
+ </param>
+ <param name="level" type="Float" minvalue="-6" maxvalue="1000000" mandatory="false">
+ <description>The relative remaining capacity of this fuel type (percentage).</description>
+ </param>
+ <param name="levelState" type="Common.ComponentVolumeStatus" mandatory="false">
+ <description>The fuel level state</description>
+ </param>
+ <param name="capacity" type="Float" minvalue="0" maxvalue="1000000" mandatory="false">
+ <description>The absolute capacity of this fuel type.</description>
+ </param>
+ <param name="capacityUnit" type="Common.CapacityUnit" mandatory="false">
+ <description>The unit of the capacity of this fuel type such as liters for gasoline or kWh for batteries.</description>
+ </param>
+</struct>
+
<enum name="TPMS">
<element name="UNKNOWN">
<description>If set the status of the tire is not known.</description>
@@ -926,6 +964,7 @@
<description>No gear</description>
</element>
<element name="DRIVE">
+ <description>Regular Drive mode</description>
</element>
<element name="SPORT">
<description>Drive Sport mode</description>
@@ -949,12 +988,44 @@
</element>
<element name="EIGHTH">
</element>
+ <element name="NINTH">
+ </element>
+ <element name="TENTH">
+ </element>
<element name="UNKNOWN">
</element>
<element name="FAULT">
</element>
</enum>
+<enum name="TransmissionType">
+ <description>Type of transmission used in the vehicle.</description>
+ <element name="MANUAL">
+ <description>Manual transmission.</description>
+ </element>
+ <element name="AUTOMATIC">
+ <description>Automatic transmission.</description>
+ </element>
+ <element name="SEMI_AUTOMATIC">
+ <description>Semi automatic transmission.</description>
+ </element>
+ <element name="DUAL_CLUTCH">
+ <description>Dual clutch transmission.</description>
+ </element>
+ <element name="CONTINUOUSLY_VARIABLE">
+ <description>Continuously variable transmission(CVT).</description>
+ </element>
+ <element name="INFINITELY_VARIABLE">
+ <description>Infinitely variable transmission.</description>
+ </element>
+ <element name="ELECTRIC_VARIABLE">
+ <description>Electric variable transmission.</description>
+ </element>
+ <element name="DIRECT_DRIVE">
+ <description>Direct drive between engine and wheels.</description>
+ </element>
+</enum>
+
<enum name="VehicleDataEventStatus">
<description>Reflects the status of a vehicle data event; e.g. a seat belt event status.</description>
<element name="NO_EVENT" internal_name="VDES_NO_EVENT">
@@ -1138,6 +1209,7 @@
<element name="VEHICLEDATA_FUELCONSUMPTION" />
<element name="VEHICLEDATA_EXTERNTEMP" />
<element name="VEHICLEDATA_VIN" />
+ <element name="VEHICLEDATA_GEARSTATUS" />
<element name="VEHICLEDATA_PRNDL" />
<element name="VEHICLEDATA_TIREPRESSURE" />
<element name="VEHICLEDATA_ODOMETER" />
@@ -1162,6 +1234,9 @@
<element name="VEHICLEDATA_ELECTRONICPARKBRAKESTATUS" />
<element name="VEHICLEDATA_CLOUDAPPVEHICLEID" />
<element name="VEHICLEDATA_OEM_CUSTOM_DATA" />
+ <element name="VEHICLEDATA_STABILITYCONTROLSSTATUS" />
+ <element name="VEHICLEDATA_WINDOWSTATUS"/>
+ <element name="VEHICLEDATA_HANDSOFFSTEERING"/>
</enum>
<enum name="WiperStatus">
@@ -1432,16 +1507,25 @@
<enum name="CharacterSet">
<description>The list of potential character sets</description>
<element name="TYPE2SET">
- <description>See [@TODO: create file ref]</description>
+ <description>Note that this element is deprecated in the MOBILE API</description>
</element>
<element name="TYPE5SET">
- <description>See [@TODO: create file ref]</description>
+ <description>Note that this element is deprecated in the MOBILE API</description>
</element>
<element name="CID1SET">
- <description>See [@TODO: create file ref]</description>
+ <description>Note that this element is deprecated in the MOBILE API</description>
</element>
<element name="CID2SET">
- <description>See [@TODO: create file ref]</description>
+ <description>Note that this element is deprecated in the MOBILE API</description>
+ </element>
+ <element name="ASCII">
+ <description>ASCII as defined in https://en.wikipedia.org/wiki/ASCII as defined in codes 0-127. Non-printable characters such as tabs and back spaces are ignored</description>
+ </element>
+ <element name="ISO_8859_1">
+ <description>Latin-1, as defined in https://en.wikipedia.org/wiki/ISO/IEC_8859-1</description>
+ </element>
+ <element name="UTF_8">
+ <description>The UTF-8 character set that uses variable bytes per code point. See https://en.wikipedia.org/wiki/UTF-8 for more details. This is the preferred character set</description>
</element>
</enum>
@@ -1459,6 +1543,7 @@
<enum name="MethodName">
<description>Defines the type of the request which causes text-to-speech prompt</description>
<element name="ALERT" />
+ <element name="SUBTLE_ALERT" />
<element name="SPEAK" />
<element name="AUDIO_PASS_THRU" />
<element name="ALERT_MANEUVER" />
@@ -1673,6 +1758,21 @@
</param>
</struct>
+<struct name="WindowState">
+ <param name="approximatePosition" type="Integer" minvalue="0" maxvalue="100" mandatory="true">
+ <description>The approximate percentage that the window is open - 0 being fully closed, 100 being fully open</description>
+ </param>
+ <param name="deviation" type="Integer" minvalue="0" maxvalue="100" mandatory="true">
+ <description>The percentage deviation of the approximatePosition. e.g. If the approximatePosition is 50 and the deviation is 10, then the window's location is somewhere between 40 and 60.</description>
+ </param>
+</struct>
+
+<struct name="WindowStatus">
+ <description>Describes the status of a window of a door/liftgate etc.</description>
+ <param name="location" type="Common.Grid" mandatory="true"/>
+ <param name="state" type="Common.WindowState" mandatory="true"/>
+</struct>
+
<struct name="ModuleInfo">
<description>Information about a RC module</description>
<param name="moduleId" type="String" maxlength="100" mandatory="true">
@@ -1755,7 +1855,7 @@
<enum name="SeatMemoryActionType">
<element name="SAVE">
- <description>Save current seat postions and settings to seat memory.</description>
+ <description>Save current seat positions and settings to seat memory.</description>
</element>
<element name="RESTORE">
<description>Restore / apply the seat memory settings to the current seat. </description>
@@ -2100,7 +2200,7 @@
</param>
<param name="siriusxmRadioAvailable" type="Boolean" mandatory="false">
<description>
- Availability of sirius XM radio.
+ Availability of Sirius XM radio.
True: Available, False: Not Available, Not present: Not Available.
</description>
</param>
@@ -2579,7 +2679,11 @@
<description>The name that identifies the field. See TextFieldName.</description>
</param>
<param name="characterSet" type="Common.CharacterSet" mandatory="true">
- <description>The character set that is supported in this field. See CharacterSet.</description>
+ <description>
+ The set of characters that are supported by this text field.
+ All text is sent in UTF-8 format, but not all systems may support all of the characters expressed by UTF-8.
+ All systems will support at least ASCII, but they may support more, either the LATIN-1 character set, or the full UTF-8 character set.
+ </description>
</param>
<param name="width" type="Integer" minvalue="1" maxvalue="500" mandatory="true">
<description>The number of characters in one row of this field.</description>
@@ -2817,7 +2921,7 @@
<struct name="MenuParams">
<param name="parentID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="false">
<description>unique ID of the sub menu, the command must be added to.</description>
- <description>If not provided, the command must be added to the top level of the in application menu.</description>
+ <description>If not provided or 0, the command must be added to the top level of the in application menu.</description>
</param>
<param name="position" type="Integer" minvalue="0" maxvalue="1000" mandatory="false">
<description>Position within the items that are at the top level of the in application menu.</description>
@@ -3061,7 +3165,7 @@
</param>
<param name="autoCompleteList" type="String" maxlength="1000" minsize="0" maxsize="100" array="true" mandatory="false">
<description>
- Allows an app to prepopulate the text field with a list of suggested or completed entries as the user types.
+ Allows an app to pre-populate the text field with a list of suggested or completed entries as the user types.
If empty, the auto-complete list will be removed from the screen.
</description>
</param>
@@ -3221,6 +3325,15 @@
</param>
</struct>
+<struct name="StabilityControlsStatus">
+ <param name="escSystem" type="Common.VehicleDataStatus" mandatory="false">
+ <description>true if vehicle stability control is ON, else false</description>
+ </param>
+ <param name="trailerSwayControl" type="Common.VehicleDataStatus" mandatory="false">
+ <description>true if vehicle trailer sway control is ON, else false</description>
+ </param>
+</struct>
+
<struct name="BodyInformation">
<param name="parkBrakeActive" type="Boolean" mandatory="true">
<description>Must be true if the park brake is active</description>
@@ -3495,6 +3608,15 @@
</param>
</struct>
+ <struct name="DynamicUpdateCapabilities">
+ <param name="supportedDynamicImageFieldNames" type="ImageFieldName" array="true" mandatory="false" minsize="1">
+ <description>An array of ImageFieldName values for which the system supports sending OnFileUpdate notifications. If you send an Image struct for that image field with a name without having uploaded the image data using PutFile that matches that name, the system will request that you upload the data with PutFile at a later point when the HMI needs it. The HMI will then display the image in the appropriate field. If not sent, assume false.</description>
+ </param>
+
+ <param name="supportsDynamicSubMenus" type="Boolean" mandatory="false">
+ <description>If true, the head unit supports dynamic sub-menus by sending OnUpdateSubMenu notifications. If true, you should not send AddCommands that attach to a parentID for an AddSubMenu until OnUpdateSubMenu is received with the menuID. At that point, you should send all AddCommands with a parentID that match the menuID. If not set, assume false.</description>
+ </param>
+ </struct>
<struct name="WindowTypeCapabilities">
<param name="type" type="Common.WindowType" mandatory="true" />
@@ -3532,6 +3654,9 @@
<param name="menuLayoutsAvailable" type="Common.MenuLayout" array="true" minsize="1" maxsize="1000" mandatory="false">
<description>An array of available menu layouts. If this parameter is not provided, only the `LIST` layout is assumed to be available</description>
</param>
+ <param name="dynamicUpdateCapabilities" type="DynamicUpdateCapabilities" mandatory="false">
+ <description>Contains the head unit's capabilities for dynamic updating features declaring if the module will send dynamic update RPCs.</description>
+ </param>
</struct>
<struct name="DisplayCapability">
@@ -3551,12 +3676,21 @@
Following cases will cause only affected windows to be included:
1. App creates a new window. After the window is created, a system capability notification will be sent
related only to the created window.
- 2. App sets a new layout to the window. The new layout changes window capabilties.
+ 2. App sets a new layout to the window. The new layout changes window capabilities.
The notification will reflect those changes to the single window.
</description>
</param>
</struct>
+ <struct name="DriverDistractionCapability">
+ <param name="menuLength" type="Integer" mandatory="false">
+ <description>The number of items allowed in a Choice Set or Command menu while the driver is distracted</description>
+ </param>
+ <param name="subMenuDepth" type="Integer" minvalue="1" mandatory="false">
+ <description>The depth of submenus allowed when the driver is distracted. e.g. 3 == top level menu -> submenu -> submenu; 1 == top level menu only</description>
+ </param>
+ </struct>
+
<struct name="SystemCapabilities">
<param name="navigationCapability" type="NavigationCapability" mandatory="false">
</param>
@@ -3564,6 +3698,9 @@
</param>
<param name="videoStreamingCapability" type="VideoStreamingCapability" mandatory="false">
</param>
+ <param name="driverDistractionCapability" type="DriverDistractionCapability" mandatory="false">
+ <description>Describes capabilities when the driver is distracted</description>
+ </param>
</struct>
<struct name="RemoteControlCapabilities">
@@ -4089,6 +4226,7 @@
<element name="APP_SERVICES" />
<element name="SEAT_LOCATION"/>
<element name="DISPLAYS"/>
+ <element name="DRIVER_DISTRACTION" />
</enum>
<struct name="SystemCapability">
@@ -4122,6 +4260,9 @@
<param name="seatLocationCapability" type="SeatLocationCapability" mandatory="false">
<description>Contains information about the locations of each seat</description>
</param>
+ <param name="driverDistractionCapability" type="DriverDistractionCapability" mandatory="false">
+ <description>Describes capabilities when the driver is distracted</description>
+ </param>
</struct>
<enum name="HybridAppPreference">
@@ -4159,6 +4300,18 @@
</param>
</struct>
+ <struct name="GearStatus">
+ <param name="userSelectedGear" type="Common.PRNDL" mandatory="false">
+ <description>Gear position selected by the user i.e. Park, Drive, Reverse</description>
+ </param>
+ <param name="actualGear" type="Common.PRNDL" mandatory="false">
+ <description>Actual Gear in use by the transmission</description>
+ </param>
+ <param name="transmissionType" type="Common.TransmissionType" mandatory="false">
+ <description>Tells the transmission type</description>
+ </param>
+ </struct>
+
</interface>
<interface name="Buttons" version="1.3.0" date="2017-07-18">
@@ -4204,10 +4357,9 @@
</param>
<param name="appID" type="Integer" mandatory="false">
<description>
- In case the ButtonName is CUSTOM_BUTTON or OK, HMI must include appID parameters to OnButtonPress notification sent to SDL.
If appID is not sent together with CUSTOM_BUTTON, this notification will be ignored by SDL.
If appID is present for OK button -> SDL transfers notification to the named app only if it is in FULL or LIMITED (ignores if app is in NONE or BACKGROUND).
- If appID is omited for OK button -> SDL transfers notification to app in FULL
+ If appID is omitted for OK button -> SDL transfers notification to app in FULL
</description>
</param>
</function>
@@ -4221,10 +4373,9 @@
</param>
<param name="appID" type="Integer" mandatory="false">
<description>
- In case the ButtonName is CUSTOM_BUTTON or OK, HMI must include appID parameters to OnButtonEvent notification sent to SDL.
If appID is not sent together with CUSTOM_BUTTON, this notification will be ignored by SDL.
If appID is present for OK button -> SDL transfers notification to the named app only if it is in FULL or LIMITED (ignores if app is in NONE or BACKGROUND).
- If appID is omited for OK button -> SDL transfers notification to app in FULL
+ If appID is omitted for OK button -> SDL transfers notification to app in FULL
</description>
</param>
</function>
@@ -4331,6 +4482,7 @@
</function>
<function name="OnFindApplications" messagetype="notification">
<description>This method must be invoked by HMI to get list of registered apps.</description>
+ <description>DEPRECATED - This RPC is not implemented</description>
<param name="deviceInfo" type="Common.DeviceInfo" mandatory="false">
<description>The name and ID of the device the list of registered applications is required for.</description>
</param>
@@ -4480,7 +4632,7 @@
This parameter is filled for supporting OEM proprietary data exchanges.
</description>
</param>
- <param name="url" type="String" maxlength="1000" minlength="1" mandatory="false">
+ <param name="url" type="String" minlength="1" mandatory="false">
<description>Optional array of URL(s) for HTTP requests.</description>
</param>
<param name="fileType" type="Common.FileType" mandatory="false">
@@ -5040,6 +5192,51 @@
</param>
</function>
+ <function name="SubtleAlert" messagetype="request">
+ <description>Request from SDL to show a subtle alert message on the display.</description>
+ <param name="alertStrings" type="Common.TextFieldStruct" mandatory="true" array="true" minsize="0" maxsize="2">
+ <description>Array of lines of alert text fields. See TextFieldStruct. Uses subtleAlertText1, subtleAlertText2.</description>
+ </param>
+ <param name="alertIcon" type="Common.Image" mandatory="false">
+ <description>
+ Image to be displayed for the corresponding alert. See Image.
+ If omitted, no (or the default if applicable) icon should be displayed.
+ </description>
+ </param>
+ <param name="duration" type="Integer" mandatory="false" minvalue="3000" maxvalue="10000">
+ <description>Timeout in milliseconds.</description>
+ </param>
+ <param name="softButtons" type="Common.SoftButton" mandatory="false" minsize="0" maxsize="2" array="true">
+ <description>App defined SoftButtons</description>
+ </param>
+ <param name="alertType" type="Common.AlertType" mandatory="true">
+ <description>Defines if only UI or BOTH portions of the Alert request are being sent to HMI Side</description>
+ </param>
+ <param name="appID" type="Integer" mandatory="true">
+ <description>ID of application requested this RPC.</description>
+ </param>
+ <param name="cancelID" type="Integer" mandatory="false">
+ <description>
+ An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC.
+ </description>
+ </param>
+ </function>
+
+ <function name="SubtleAlert" messagetype="response">
+ <param name="tryAgainTime" type="Integer" mandatory="false" minvalue="0" maxvalue="2000000000">
+ <description>Amount of time (in milliseconds) that SDL must wait before resending an alert. Must be provided if another system event or overlay currently has a higher priority than this alert.</description>
+ </param>
+ </function>
+
+ <function name="OnSubtleAlertPressed" messagetype="notification">
+ <description>
+ Sent when the alert itself is touched (outside of a soft button). Touching (or otherwise selecting) the alert should open the app before sending this notification.
+ </description>
+ <param name="appID" type="Integer" mandatory="true">
+ <description>ID of application that is related to this RPC.</description>
+ </param>
+ </function>
+
<function name="SetDisplayLayout" messagetype="request">
<description>This RPC is deprecated. Use Show RPC to change layout.</description>
<param name="displayLayout" type="String" maxlength="500" mandatory="true">
@@ -5239,7 +5436,7 @@
<description>ID of the sub menu to be added. Unique for the application.</description>
</param>
<param name="menuParams" type="Common.MenuParams" mandatory="true">
- <description>Position and name of menu to be added. 'parent' field is omitted for this RPC. </description>
+ <description>Position, parentID, and name of menu to be added.</description>
</param>
<param name="menuIcon" type="Common.Image" mandatory="false">
<description>The image field for AddSubMenu</description>
@@ -5327,7 +5524,7 @@
</param>
<param name="functionID" type="Integer" mandatory="true">
<description>
- The ID of the type of interaction the developer wants to dismiss. Only values 10, (PerformInteractionID), 12 (AlertID), 25 (ScrollableMessageID), and 26 (SliderID) are permitted.
+ The ID of the type of interaction the developer wants to dismiss. Only values 10, (PerformInteractionID), 12 (AlertID), 25 (ScrollableMessageID), 26 (SliderID), and 64 (SubtleAlertID) are permitted.
</description>
</param>
<param name="appID" type="Integer" mandatory="true">
@@ -5443,6 +5640,7 @@
<param name="systemCapabilities" type="Common.SystemCapabilities" mandatory="false">
<description>Specifies system capabilities. See SystemCapabilities</description>
</param>
+ <param name="pcmStreamCapabilities" type="Common.AudioPassThruCapabilities" mandatory="false"/>
</function>
<function name="ChangeRegistration" messagetype="request">
<description>Request from SmartDeviceLink to HMI to change language for app.</description>
@@ -5663,6 +5861,33 @@
</function>
<function name="SendHapticData" messagetype="response">
</function>
+
+ <function name="OnUpdateFile" messagetype="notification">
+ <description>For the HMI to tell Core that a file needs to be retrieved from the app.</description>
+ <param name="appID" type="Integer" mandatory="true">
+ <description>ID of application related to this RPC.</description>
+ </param>
+ <param name="fileName" type="String" maxlength="255" mandatory="true">
+ <description>File reference name.</description>
+ </param>
+ </function>
+
+ <function name="OnUpdateSubMenu" messagetype="notification">
+ <description>For the HMI to tell Core that a submenu needs updating</description>
+
+ <param name="appID" type="Integer" mandatory="true">
+ <description>ID of application related to this RPC.</description>
+ </param>
+
+ <param name="menuID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
+ <description>This menuID must match a menuID in the current menu structure</description>
+ </param>
+
+ <param name="updateSubCells" type="Boolean" mandatory="false">
+ <description>If not set, assume false. If true, the app should send AddCommands with parentIDs matching the menuID. These AddCommands will then be attached to the submenu and displayed if the submenu is selected.</description>
+ </param>
+ </function>
+
</interface>
<interface name="Navigation" version="1.5.0" date="2017-08-15">
@@ -5803,7 +6028,7 @@
</function>
<function name="StartStream" messagetype="request">
<description>Request from SmartDeviceLinkCore to HMI to start playing video streaming.</description>
- <param name="url" type="String" minlength="21" maxlength="500" mandatory="true">
+ <param name="url" type="String" minlength="21" mandatory="true">
<description>URL that HMI start playing.</description>
</param>
<param name="appID" type="Integer" mandatory="true">
@@ -5822,7 +6047,7 @@
</function>
<function name="StartAudioStream" messagetype="request">
<description>Request from SmartDeviceLinkCore to HMI to start playing audio streaming.</description>
- <param name="url" type="String" minlength="21" maxlength="500" mandatory="true">
+ <param name="url" type="String" minlength="21" mandatory="true">
<description>URL that HMI start playing.</description>
</param>
<param name="appID" type="Integer" mandatory="true">
@@ -5988,16 +6213,19 @@
<description>The number of revolutions per minute of the engine</description>
</param>
<param name="fuelLevel" type="Boolean" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
+ <description>The fuel level in the tank (percentage). This parameter is deprecated starting RPC Spec 7.0, please see fuelRange</description>
</param>
<param name="fuelLevel_State" type="Boolean" mandatory="false">
- <description>The fuel level state</description>
+ <description>The fuel level state. This parameter is deprecated starting RPC Spec 7.0, please see fuelRange</description>
</param>
<param name="instantFuelConsumption" type="Boolean" mandatory="false">
<description>The instantaneous fuel consumption in microlitres</description>
</param>
<param name="fuelRange" type="Boolean" mandatory="false">
- <description>The estimate range in KM the vehicle can travel based on fuel level and consumption</description>
+ <description>
+ The fuel type, estimated range in KM, fuel level/capacity and fuel level state for the vehicle.
+ See struct FuelRange for details.
+ </description>
</param>
<param name="externalTemperature" type="Boolean" mandatory="false">
<description>The external temperature in degrees celsius</description>
@@ -6005,8 +6233,11 @@
<param name="turnSignal" type="Boolean" mandatory="false">
<description>See TurnSignal</description>
</param>
+ <param name="gearStatus" type="Boolean" mandatory="false">
+ <description>See GearStatus</description>
+ </param>
<param name="prndl" type="Boolean" mandatory="false">
- <description>See PRNDL</description>
+ <description>See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`</description>
</param>
<param name="tirePressure" type="Boolean" mandatory="false">
<description>See TireStatus</description>
@@ -6050,6 +6281,15 @@
<param name="cloudAppVehicleID" type="Boolean" mandatory="false">
<description>Parameter used by cloud apps to identify a head unit</description>
</param>
+ <param name="stabilityControlsStatus" type="Boolean" mandatory="false">
+ <description>See StabilityControlsStatus</description>
+ </param>
+ <param name="windowStatus" type="Boolean" mandatory="false">
+ <description>See WindowStatus</description>
+ </param>
+ <param name="handsOffSteering" type="Boolean" mandatory="false">
+ <description>To indicate whether driver hands are off the steering wheel</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
@@ -6081,16 +6321,19 @@
<description>The number of revolutions per minute of the engine</description>
</param>
<param name="fuelLevel" type="Common.VehicleDataResult" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
+ <description>The fuel level in the tank (percentage). This parameter is deprecated starting RPC Spec 7.0, please see fuelRange</description>
</param>
<param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="false">
- <description>The fuel level state</description>
+ <description>The fuel level state. This parameter is deprecated starting RPC Spec 7.0, please see fuelRange</description>
</param>
<param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="false">
<description>The instantaneous fuel consumption in microlitres</description>
</param>
<param name="fuelRange" type="Common.VehicleDataResult" mandatory="false">
- <description>The estimate range in KM the vehicle can travel based on fuel level and consumption</description>
+ <description>
+ The fuel type, estimated range in KM, fuel level/capacity and fuel level state for the vehicle.
+ See struct FuelRange for details.
+ </description>
</param>
<param name="externalTemperature" type="Common.VehicleDataResult" mandatory="false">
<description>The external temperature in degrees celsius.</description>
@@ -6098,8 +6341,11 @@
<param name="turnSignal" type="Common.VehicleDataResult" mandatory="false">
<description>See TurnSignal</description>
</param>
+ <param name="gearStatus" type="Common.VehicleDataResult" mandatory="false">
+ <description>See GearStatus</description>
+ </param>
<param name="prndl" type="Common.VehicleDataResult" mandatory="false">
- <description>See PRNDL</description>
+ <description>See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`</description>
</param>
<param name="tirePressure" type="Common.VehicleDataResult" mandatory="false">
<description>See TireStatus</description>
@@ -6143,6 +6389,15 @@
<param name="cloudAppVehicleID" type="Common.VehicleDataResult" mandatory="false">
<description>Parameter used by cloud apps to identify a head unit</description>
</param>
+ <param name="stabilityControlsStatus" type="Common.VehicleDataResult" mandatory="false">
+ <description>See StabilityControlsStatus</description>
+ </param>
+ <param name="windowStatus" type="Common.VehicleDataResult" mandatory="false">
+ <description>See WindowStatus</description>
+ </param>
+ <param name="handsOffSteering" type="Common.VehicleDataResult" mandatory="false">
+ <description>To indicate whether driver hands are off the steering wheel</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false">
@@ -6167,9 +6422,6 @@
<description>
This function is used to unsubscribe the notifications from the subscribeVehicleData function.
</description>
- <param name="appID" type="Integer" mandatory="true">
- <description>ID of application that requested this RPC.</description>
- </param>
<param name="gps" type="Boolean" mandatory="false">
<description>See GPSData</description>
</param>
@@ -6180,16 +6432,19 @@
<description>The number of revolutions per minute of the engine</description>
</param>
<param name="fuelLevel" type="Boolean" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
+ <description>The fuel level in the tank (percentage). This parameter is deprecated starting RPC Spec 7.0, please see fuelRange</description>
</param>
<param name="fuelLevel_State" type="Boolean" mandatory="false">
- <description>The fuel level state</description>
+ <description>The fuel level state. This parameter is deprecated starting RPC Spec 7.0, please see fuelRange</description>
</param>
<param name="instantFuelConsumption" type="Boolean" mandatory="false">
<description>The instantaneous fuel consumption in microlitres</description>
</param>
<param name="fuelRange" type="Boolean" mandatory="false">
- <description>The estimate range in KM the vehicle can travel based on fuel level and consumption</description>
+ <description>
+ The fuel type, estimated range in KM, fuel level/capacity and fuel level state for the vehicle.
+ See struct FuelRange for details.
+ </description>
</param>
<param name="externalTemperature" type="Boolean" mandatory="false">
<description>The external temperature in degrees celsius.</description>
@@ -6197,8 +6452,11 @@
<param name="turnSignal" type="Boolean" mandatory="false">
<description>See TurnSignal</description>
</param>
+ <param name="gearStatus" type="Boolean" mandatory="false">
+ <description>See GearStatus</description>
+ </param>
<param name="prndl" type="Boolean" mandatory="false">
- <description>See PRNDL</description>
+ <description>See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`</description>
</param>
<param name="tirePressure" type="Boolean" mandatory="false">
<description>See TireStatus</description>
@@ -6242,6 +6500,15 @@
<param name="cloudAppVehicleID" type="Boolean" mandatory="false">
<description>Parameter used by cloud apps to identify a head unit</description>
</param>
+ <param name="stabilityControlsStatus" type="Boolean" mandatory="false">
+ <description>See StabilityControlsStatus</description>
+ </param>
+ <param name="windowStatus" type="Boolean" mandatory="false">
+ <description>See WindowStatus</description>
+ </param>
+ <param name="handsOffSteering" type="Boolean" mandatory="false">
+ <description>To indicate whether driver hands are off the steering wheel</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
@@ -6273,16 +6540,19 @@
<description>The number of revolutions per minute of the engine</description>
</param>
<param name="fuelLevel" type="Common.VehicleDataResult" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
+ <description>The fuel level in the tank (percentage). This parameter is deprecated starting RPC Spec 7.0, please see fuelRange</description>
</param>
<param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="false">
- <description>The fuel level state</description>
+ <description>The fuel level state. This parameter is deprecated starting RPC Spec 7.0, please see fuelRange</description>
</param>
<param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="false">
<description>The instantaneous fuel consumption in microlitres</description>
</param>
<param name="fuelRange" type="Common.VehicleDataResult" mandatory="false">
- <description>The estimate range in KM the vehicle can travel based on fuel level and consumption</description>
+ <description>
+ The fuel type, estimated range in KM, fuel level/capacity and fuel level state for the vehicle.
+ See struct FuelRange for details.
+ </description>
</param>
<param name="externalTemperature" type="Common.VehicleDataResult" mandatory="false">
<description>The external temperature in degrees celsius</description>
@@ -6290,8 +6560,11 @@
<param name="turnSignal" type="Common.VehicleDataResult" mandatory="false">
<description>See TurnSignal</description>
</param>
+ <param name="gearStatus" type="Common.VehicleDataResult" mandatory="false">
+ <description>See GearStatus</description>
+ </param>
<param name="prndl" type="Common.VehicleDataResult" mandatory="false">
- <description>See PRNDL</description>
+ <description>See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`</description>
</param>
<param name="tirePressure" type="Common.VehicleDataResult" mandatory="false">
<description>See TireStatus</description>
@@ -6335,6 +6608,15 @@
<param name="cloudAppVehicleID" type="Common.VehicleDataResult" mandatory="false">
<description>Parameter used by cloud apps to identify a head unit</description>
</param>
+ <param name="stabilityControlsStatus" type="Common.VehicleDataResult" mandatory="false">
+ <description>See StabilityControlsStatus</description>
+ </param>
+ <param name="windowStatus" type="Common.VehicleDataResult" mandatory="false">
+ <description>See WindowStatus</description>
+ </param>
+ <param name="handsOffSteering" type="Common.VehicleDataResult" mandatory="false">
+ <description>To indicate whether driver hands are off the steering wheel</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false">
@@ -6367,16 +6649,19 @@
<description>The number of revolutions per minute of the engine</description>
</param>
<param name="fuelLevel" type="Boolean" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
+ <description>The fuel level in the tank (percentage). This parameter is deprecated starting RPC Spec 7.0, please see fuelRange</description>
</param>
<param name="fuelLevel_State" type="Boolean" mandatory="false">
- <description>The fuel level state</description>
+ <description>The fuel level state. This parameter is deprecated starting RPC Spec 7.0, please see fuelRange</description>
</param>
<param name="instantFuelConsumption" type="Boolean" mandatory="false">
<description>The instantaneous fuel consumption in microlitres</description>
</param>
<param name="fuelRange" type="Boolean" mandatory="false">
- <description>The estimate range in KM the vehicle can travel based on fuel level and consumption</description>
+ <description>
+ The fuel type, estimated range in KM, fuel level/capacity and fuel level state for the vehicle.
+ See struct FuelRange for details.
+ </description>
</param>
<param name="externalTemperature" type="Boolean" mandatory="false">
<description>The external temperature in degrees celsius</description>
@@ -6387,8 +6672,11 @@
<param name="vin" type="Boolean" mandatory="false">
<description>Vehicle identification number</description>
</param>
+ <param name="gearStatus" type="Boolean" mandatory="false">
+ <description>See GearStatus</description>
+ </param>
<param name="prndl" type="Boolean" mandatory="false">
- <description>See PRNDL</description>
+ <description>See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`</description>
</param>
<param name="tirePressure" type="Boolean" mandatory="false">
<description>See TireStatus</description>
@@ -6432,6 +6720,15 @@
<param name="cloudAppVehicleID" type="Boolean" mandatory="false">
<description>Parameter used by cloud apps to identify a head unit</description>
</param>
+ <param name="stabilityControlsStatus" type="Boolean" mandatory="false">
+ <description>See StabilityControlsStatus</description>
+ </param>
+ <param name="windowStatus" type="Boolean" mandatory="false">
+ <description>See WindowStatus</description>
+ </param>
+ <param name="handsOffSteering" type="Boolean" mandatory="false">
+ <description>To indicate whether driver hands are off the steering wheel</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
@@ -6463,16 +6760,19 @@
<description>The number of revolutions per minute of the engine</description>
</param>
<param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
+ <description>The fuel level in the tank (percentage). This parameter is deprecated starting RPC Spec 7.0, please see fuelRange</description>
</param>
<param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="false">
- <description>The fuel level state</description>
+ <description>The fuel level state. This parameter is deprecated starting RPC Spec 7.0, please see fuelRange</description>
</param>
<param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="false">
<description>The instantaneous fuel consumption in microlitres</description>
</param>
<param name="fuelRange" type="Common.FuelRange" minsize="0" maxsize="100" array="true" mandatory="false">
- <description>The estimate range in KM the vehicle can travel based on fuel level and consumption</description>
+ <description>
+ The fuel type, estimated range in KM, fuel level/capacity and fuel level state for the vehicle.
+ See struct FuelRange for details.
+ </description>
</param>
<param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false">
<description>The external temperature in degrees celsius</description>
@@ -6483,8 +6783,11 @@
<param name="vin" type="String" maxlength="17" mandatory="false">
<description>Vehicle identification number</description>
</param>
+ <param name="gearStatus" type="Common.GearStatus" mandatory="false">
+ <description>See GearStatus</description>
+ </param>
<param name="prndl" type="Common.PRNDL" mandatory="false">
- <description>See PRNDL</description>
+ <description>See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`</description>
</param>
<param name="tirePressure" type="Common.TireStatus" mandatory="false">
<description>See TireStatus</description>
@@ -6528,6 +6831,15 @@
<param name="cloudAppVehicleID" type="String" mandatory="false">
<description>Parameter used by cloud apps to identify a head unit</description>
</param>
+ <param name="stabilityControlsStatus" type="Common.StabilityControlsStatus" mandatory="false">
+ <description>See StabilityControlsStatus</description>
+ </param>
+ <param name="windowStatus" type="Common.WindowStatus" array="true" minsize="0" maxsize="100" mandatory="false">
+ <description>See WindowStatus</description>
+ </param>
+ <param name="handsOffSteering" type="Boolean" mandatory="false">
+ <description>To indicate whether driver hands are off the steering wheel</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Common.ECallInfo" mandatory="false">
@@ -6560,16 +6872,19 @@
<description>The number of revolutions per minute of the engine</description>
</param>
<param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="false">
- <description>The fuel level in the tank (percentage)</description>
+ <description>The fuel level in the tank (percentage). This parameter is deprecated starting RPC Spec 7.0, please see fuelRange</description>
</param>
<param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="false">
- <description>The fuel level state</description>
+ <description>The fuel level state. This parameter is deprecated starting RPC Spec 7.0, please see fuelRange</description>
</param>
<param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="false">
<description>The instantaneous fuel consumption in microlitres</description>
</param>
<param name="fuelRange" type="Common.FuelRange" minsize="0" maxsize="100" array="true" mandatory="false">
- <description>The estimate range in KM the vehicle can travel based on fuel level and consumption</description>
+ <description>
+ The fuel type, estimated range in KM, fuel level/capacity and fuel level state for the vehicle.
+ See struct FuelRange for details.
+ </description>
</param>
<param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false">
<description>The external temperature in degrees celsius</description>
@@ -6580,8 +6895,11 @@
<param name="vin" type="String" maxlength="17" mandatory="false">
<description>Vehicle identification number.</description>
</param>
+ <param name="gearStatus" type="Common.GearStatus" mandatory="false">
+ <description>See GearStatus</description>
+ </param>
<param name="prndl" type="Common.PRNDL" mandatory="false">
- <description>See PRNDL</description>
+ <description>See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`</description>
</param>
<param name="tirePressure" type="Common.TireStatus" mandatory="false">
<description>See TireStatus</description>
@@ -6625,6 +6943,15 @@
<param name="engineOilLife" type="Float" minvalue="0" maxvalue="100" mandatory="false">
<description>The estimated percentage of remaining oil life of the engine.</description>
</param>
+ <param name="stabilityControlsStatus" type="Common.StabilityControlsStatus" mandatory="false">
+ <description>See StabilityControlsStatus</description>
+ </param>
+ <param name="windowStatus" type="Common.WindowStatus" array="true" minsize="0" maxsize="100" mandatory="false">
+ <description>See WindowStatus</description>
+ </param>
+ <param name="handsOffSteering" type="Boolean" mandatory="false">
+ <description>To indicate whether driver hands are off the steering wheel</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Common.ECallInfo" mandatory="false">
diff --git a/src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h b/src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h
index cb0ea8aa11..1999da987f 100644
--- a/src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h
+++ b/src/components/media_manager/include/media_manager/audio/audio_stream_sender_thread.h
@@ -46,22 +46,6 @@ class ApplicationManager;
namespace media_manager {
-typedef enum {
- SR_INVALID = -1,
- SR_8KHZ = 0,
- SR_16KHZ = 1,
- SR_22KHZ = 2,
- SR_44KHZ = 3
-} SamplingRate;
-
-typedef enum {
- ACQ_INVALID = -1,
- ACQ_8_BIT = 0,
- ACQ_16_BIT = 1
-} AudioCaptureQuality;
-
-typedef enum { AT_INVALID = -1, AT_PCM = 0 } AudioType;
-
// AudioPassThru
typedef struct {
std::vector<uint8_t> binary_data;
diff --git a/src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h b/src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h
index 7daf9c7add..9e0a8b5123 100644
--- a/src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h
+++ b/src/components/media_manager/include/media_manager/audio/from_mic_recorder_adapter.h
@@ -34,6 +34,7 @@
#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_AUDIO_FROM_MIC_RECORDER_ADAPTER_H_
#include <string>
+#include "interfaces/MOBILE_API.h"
#include "media_manager/media_adapter_impl.h"
namespace threads {
@@ -52,12 +53,19 @@ class FromMicRecorderAdapter : public MediaAdapterImpl {
void StopActivity(int32_t application_key);
bool is_app_performing_activity(int32_t application_key) const;
void set_output_file(const std::string& output_file);
- void set_duration(int32_t duration);
+ DEPRECATED void set_duration(int32_t duration);
+ void set_config(mobile_apis::SamplingRate::eType sampling_rate,
+ mobile_apis::BitsPerSample::eType bits_per_sample,
+ mobile_apis::AudioType::eType audio_type,
+ int32_t duration);
private:
threads::Thread* recorder_thread_;
std::string output_file_;
const int32_t kDefaultDuration;
+ mobile_apis::SamplingRate::eType sampling_rate_;
+ mobile_apis::BitsPerSample::eType bits_per_sample_;
+ mobile_apis::AudioType::eType audio_type_;
int32_t duration_;
DISALLOW_COPY_AND_ASSIGN(FromMicRecorderAdapter);
};
diff --git a/src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h b/src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h
index e6b54cc487..89c298f280 100644
--- a/src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h
+++ b/src/components/media_manager/include/media_manager/audio/from_mic_to_file_recorder_thread.h
@@ -37,6 +37,7 @@
#include <net/if.h>
#include <string>
+#include "interfaces/MOBILE_API.h"
#include "utils/lock.h"
#include "utils/threads/thread.h"
#include "utils/threads/thread_delegate.h"
@@ -45,7 +46,15 @@ namespace media_manager {
class FromMicToFileRecorderThread : public threads::ThreadDelegate {
public:
- FromMicToFileRecorderThread(const std::string& output_file, int32_t duration);
+ FromMicToFileRecorderThread(
+ const std::string& output_file,
+ int32_t duration,
+ mobile_apis::SamplingRate::eType sampling_rate =
+ mobile_apis::SamplingRate::INVALID_ENUM,
+ mobile_apis::BitsPerSample::eType bits_per_sample =
+ mobile_apis::BitsPerSample::INVALID_ENUM,
+ mobile_apis::AudioType::eType audio_type =
+ mobile_apis::AudioType::INVALID_ENUM);
~FromMicToFileRecorderThread();
void threadMain();
@@ -67,6 +76,8 @@ class FromMicToFileRecorderThread : public threads::ThreadDelegate {
sync_primitives::Lock stopFlagLock_;
std::string outputFileName_, durationString_;
+ mobile_apis::SamplingRate::eType samplingRate_;
+ mobile_apis::BitsPerSample::eType bitsPerSample_;
typedef struct {
GstElement* pipeline;
@@ -77,6 +88,10 @@ class FromMicToFileRecorderThread : public threads::ThreadDelegate {
void deinitArgs();
void psleep(void* timeout);
+ // create_caps_string() creates a string which is fed to capsfilter's "caps"
+ // property. The string specifies audio format. example:
+ // "audio/x-raw,format=(string)S16LE,rate=44100,channels=1"
+ std::string create_caps_string();
class SleepThreadDelegate : public threads::ThreadDelegate {
public:
diff --git a/src/components/media_manager/include/media_manager/media_manager_impl.h b/src/components/media_manager/include/media_manager/media_manager_impl.h
index 408fa12655..8d60cd0e54 100644
--- a/src/components/media_manager/include/media_manager/media_manager_impl.h
+++ b/src/components/media_manager/include/media_manager/media_manager_impl.h
@@ -33,9 +33,9 @@
#ifndef SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_MANAGER_IMPL_H_
#define SRC_COMPONENTS_MEDIA_MANAGER_INCLUDE_MEDIA_MANAGER_MEDIA_MANAGER_IMPL_H_
-#include <chrono>
#include <map>
#include <string>
+#include "interfaces/MOBILE_API.h"
#include "media_manager/media_adapter_impl.h"
#include "media_manager/media_adapter_listener.h"
#include "media_manager/media_manager.h"
@@ -62,16 +62,23 @@ class MediaManagerImpl : public MediaManager,
virtual void PlayA2DPSource(int32_t application_key);
virtual void StopA2DPSource(int32_t application_key);
- virtual void StartMicrophoneRecording(int32_t application_key,
- const std::string& outputFileName,
- int32_t duration);
+ DEPRECATED virtual void StartMicrophoneRecording(
+ int32_t application_key,
+ const std::string& outputFileName,
+ int32_t duration);
+ virtual void StartMicrophoneRecording(
+ int32_t application_key,
+ const std::string& outputFileName,
+ int32_t duration,
+ mobile_apis::SamplingRate::eType sampling_rate,
+ mobile_apis::BitsPerSample::eType bits_per_sample,
+ mobile_apis::AudioType::eType audio_type);
virtual void StopMicrophoneRecording(int32_t application_key);
virtual void StartStreaming(int32_t application_key,
protocol_handler::ServiceType service_type);
virtual void StopStreaming(int32_t application_key,
protocol_handler::ServiceType service_type);
-
virtual void SetProtocolHandler(
protocol_handler::ProtocolHandler* protocol_handler);
virtual void OnMessageReceived(
@@ -82,8 +89,6 @@ class MediaManagerImpl : public MediaManager,
virtual const MediaManagerSettings& settings() const OVERRIDE;
- virtual uint32_t DataSizeToMilliseconds(uint64_t data_size) const OVERRIDE;
-
#ifdef BUILD_TESTS
void set_mock_a2dp_player(MediaAdapter* media_adapter);
void set_mock_mic_listener(MediaListenerPtr media_listener);
@@ -109,12 +114,6 @@ class MediaManagerImpl : public MediaManager,
std::map<protocol_handler::ServiceType, MediaAdapterImplPtr> streamer_;
std::map<protocol_handler::ServiceType, MediaListenerPtr> streamer_listener_;
- uint32_t bits_per_sample_;
- uint32_t sampling_rate_;
- uint64_t stream_data_size_;
- std::chrono::time_point<std::chrono::system_clock>
- socket_audio_stream_start_time_;
-
application_manager::ApplicationManager& application_manager_;
private:
diff --git a/src/components/media_manager/include/media_manager/streamer_adapter.h b/src/components/media_manager/include/media_manager/streamer_adapter.h
index a35e680b6a..15f21bb924 100644
--- a/src/components/media_manager/include/media_manager/streamer_adapter.h
+++ b/src/components/media_manager/include/media_manager/streamer_adapter.h
@@ -87,7 +87,7 @@ class StreamerAdapter : public MediaAdapterImpl {
};
private:
- int32_t current_application_;
+ std::atomic_int current_application_;
utils::MessageQueue<protocol_handler::RawMessagePtr> messages_;
Streamer* streamer_;
diff --git a/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc b/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc
index 581997f610..a2c088c8a1 100644
--- a/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc
+++ b/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc
@@ -43,7 +43,7 @@
namespace media_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "MediaManager")
+SDL_CREATE_LOG_VARIABLE("MediaManager")
const static size_t BUFSIZE = 32;
@@ -77,7 +77,7 @@ A2DPSourcePlayerAdapter::A2DPSourcePlayerAdapter(
A2DPSourcePlayerAdapter::~A2DPSourcePlayerAdapter() {
for (SourcesMap::iterator it = sources_.begin(); sources_.end() != it; ++it) {
Pair pair = it->second;
- pair.first->join();
+ pair.first->Stop(threads::Thread::kThreadSoftStop);
delete pair.second;
threads::DeleteThread(pair.first);
}
@@ -85,9 +85,8 @@ A2DPSourcePlayerAdapter::~A2DPSourcePlayerAdapter() {
}
void A2DPSourcePlayerAdapter::StartActivity(int32_t application_key) {
- LOG4CXX_INFO(
- logger_,
- "Starting a2dp playing music for " << application_key << " application.");
+ SDL_LOG_INFO("Starting a2dp playing music for " << application_key
+ << " application.");
if (application_key != current_application_) {
current_application_ = application_key;
@@ -105,21 +104,20 @@ void A2DPSourcePlayerAdapter::StartActivity(int32_t application_key) {
threads::Thread* new_activity =
threads::CreateThread(mac_address.c_str(), delegate);
sources_[application_key] = Pair(new_activity, delegate);
- new_activity->start();
+ new_activity->Start();
}
}
void A2DPSourcePlayerAdapter::StopActivity(int32_t application_key) {
- LOG4CXX_INFO(
- logger_,
- "Stopping 2dp playing for " << application_key << " application.");
+ SDL_LOG_INFO("Stopping 2dp playing for " << application_key
+ << " application.");
if (application_key != current_application_) {
return;
}
SourcesMap::iterator it = sources_.find(application_key);
if (sources_.end() != it) {
Pair pair = it->second;
- pair.first->join();
+ pair.first->Stop(threads::Thread::kThreadSoftStop);
delete pair.second;
threads::DeleteThread(pair.first);
current_application_ = 0;
@@ -142,7 +140,7 @@ A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::A2DPSourcePlayerThread(
: threads::ThreadDelegate(), device_(device) {}
void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::freeStreams() {
- LOG4CXX_INFO(logger_, "Free streams in A2DPSourcePlayerThread.");
+ SDL_LOG_INFO("Free streams in A2DPSourcePlayerThread.");
if (s_in) {
pa_simple_free(s_in);
}
@@ -158,7 +156,7 @@ void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::exitThreadMain() {
}
void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::threadMain() {
- LOG4CXX_INFO(logger_, "Main thread of A2DPSourcePlayerThread.");
+ SDL_LOG_INFO("Main thread of A2DPSourcePlayerThread.");
{
sync_primitives::AutoLock auto_lock(should_be_stopped_lock_);
@@ -169,9 +167,9 @@ void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::threadMain() {
const char* a2dpSource = device_.c_str();
- LOG4CXX_DEBUG(logger_, device_);
+ SDL_LOG_DEBUG(device_);
- LOG4CXX_DEBUG(logger_, "Creating streams");
+ SDL_LOG_DEBUG("Creating streams");
/* Create a new playback stream */
if (!(s_out = pa_simple_new(NULL,
@@ -183,7 +181,7 @@ void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::threadMain() {
NULL,
NULL,
&error))) {
- LOG4CXX_ERROR(logger_, "pa_simple_new() failed: " << pa_strerror(error));
+ SDL_LOG_ERROR("pa_simple_new() failed: " << pa_strerror(error));
freeStreams();
return;
}
@@ -197,12 +195,12 @@ void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::threadMain() {
NULL,
NULL,
&error))) {
- LOG4CXX_ERROR(logger_, "pa_simple_new() failed: " << pa_strerror(error));
+ SDL_LOG_ERROR("pa_simple_new() failed: " << pa_strerror(error));
freeStreams();
return;
}
- LOG4CXX_DEBUG(logger_, "Entering main loop");
+ SDL_LOG_DEBUG("Entering main loop");
for (;;) {
uint8_t buf[BUFSIZE];
@@ -210,30 +208,27 @@ void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::threadMain() {
pa_usec_t latency;
if ((latency = pa_simple_get_latency(s_in, &error)) == (pa_usec_t)-1) {
- LOG4CXX_ERROR(logger_,
- "pa_simple_get_latency() failed: " << pa_strerror(error));
+ SDL_LOG_ERROR("pa_simple_get_latency() failed: " << pa_strerror(error));
break;
}
- // LOG4CXX_INFO(logger_, "In: " << static_cast<float>(latency));
+ // SDL_LOG_INFO( "In: " << static_cast<float>(latency));
if ((latency = pa_simple_get_latency(s_out, &error)) == (pa_usec_t)-1) {
- LOG4CXX_ERROR(logger_,
- "pa_simple_get_latency() failed: " << pa_strerror(error));
+ SDL_LOG_ERROR("pa_simple_get_latency() failed: " << pa_strerror(error));
break;
}
- // LOG4CXX_INFO(logger_, "Out: " << static_cast<float>(latency));
+ // SDL_LOG_INFO( "Out: " << static_cast<float>(latency));
if (pa_simple_read(s_in, buf, sizeof(buf), &error) < 0) {
- LOG4CXX_ERROR(logger_, "read() failed: " << strerror(error));
+ SDL_LOG_ERROR("read() failed: " << strerror(error));
break;
}
/* ... and play it */
if (pa_simple_write(s_out, buf, sizeof(buf), &error) < 0) {
- LOG4CXX_ERROR(logger_,
- "pa_simple_write() failed: " << pa_strerror(error));
+ SDL_LOG_ERROR("pa_simple_write() failed: " << pa_strerror(error));
break;
}
@@ -251,7 +246,7 @@ void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::threadMain() {
/* Make sure that every single sample was played */
if (pa_simple_drain(s_out, &error) < 0) {
- LOG4CXX_ERROR(logger_, "pa_simple_drain() failed: " << pa_strerror(error));
+ SDL_LOG_ERROR("pa_simple_drain() failed: " << pa_strerror(error));
freeStreams();
return;
}
diff --git a/src/components/media_manager/src/audio/audio_stream_sender_thread.cc b/src/components/media_manager/src/audio/audio_stream_sender_thread.cc
index 078841f2a4..ea35d61554 100644
--- a/src/components/media_manager/src/audio/audio_stream_sender_thread.cc
+++ b/src/components/media_manager/src/audio/audio_stream_sender_thread.cc
@@ -70,7 +70,7 @@ const uint32_t kMqueueMessageSize = 4095;
// the files.
static const uint32_t kRIFFHeaderSize = 44;
-CREATE_LOGGERPTR_GLOBAL(logger_, "MediaManager")
+SDL_CREATE_LOG_VARIABLE("MediaManager")
AudioStreamSenderThread::AudioStreamSenderThread(
const std::string& fileName,
@@ -83,13 +83,13 @@ AudioStreamSenderThread::AudioStreamSenderThread(
, shouldBeStoped_lock_()
, shouldBeStoped_cv_()
, application_manager_(app_mngr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
AudioStreamSenderThread::~AudioStreamSenderThread() {}
void AudioStreamSenderThread::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
offset_ = kRIFFHeaderSize;
@@ -101,30 +101,30 @@ void AudioStreamSenderThread::threadMain() {
}
void AudioStreamSenderThread::sendAudioChunkToMobile() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<uint8_t> binaryData;
std::vector<uint8_t>::iterator from;
std::vector<uint8_t>::iterator to;
if (!file_system::ReadBinaryFile(fileName_, binaryData)) {
- LOG4CXX_ERROR(logger_, "Unable to read file." << fileName_);
+ SDL_LOG_ERROR("Unable to read file." << fileName_);
return;
}
if (binaryData.empty()) {
- LOG4CXX_ERROR(logger_, "Binary data is empty.");
+ SDL_LOG_ERROR("Binary data is empty.");
return;
}
- LOG4CXX_INFO(logger_, "offset = " << offset_);
+ SDL_LOG_INFO("offset = " << offset_);
from = binaryData.begin() + offset_;
to = binaryData.end();
if (from < binaryData.end() /*from != binaryData.end()*/) {
- LOG4CXX_INFO(logger_, "from != binaryData.end()");
+ SDL_LOG_INFO("from != binaryData.end()");
offset_ = offset_ + to - from;
std::vector<uint8_t> data(from, to);
@@ -140,12 +140,12 @@ void AudioStreamSenderThread::sendAudioChunkToMobile() {
void AudioStreamSenderThread::SendAudioPassThroughNotification(
uint32_t session_key, std::vector<uint8_t>& binary_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!application_manager_.is_audio_pass_thru_active()) {
- LOG4CXX_ERROR(logger_,
- "Trying to send PassThroughNotification"
- " when PassThrough is not active");
+ SDL_LOG_ERROR(
+ "Trying to send PassThroughNotification"
+ " when PassThrough is not active");
return;
}
@@ -157,11 +157,11 @@ void AudioStreamSenderThread::SendAudioPassThroughNotification(
std::make_shared<smart_objects::SmartObject>();
if (!on_audio_pass) {
- LOG4CXX_ERROR(logger_, "OnAudioPassThru NULL pointer");
+ SDL_LOG_ERROR("OnAudioPassThru NULL pointer");
return;
}
- LOG4CXX_DEBUG(logger_, "Fill smart object");
+ SDL_LOG_DEBUG("Fill smart object");
(*on_audio_pass)[strings::params][strings::message_type] =
application_manager::MessageType::kNotification;
@@ -171,13 +171,13 @@ void AudioStreamSenderThread::SendAudioPassThroughNotification(
(*on_audio_pass)[strings::params][strings::function_id] =
mobile_apis::FunctionID::OnAudioPassThruID;
- LOG4CXX_DEBUG(logger_, "Fill binary data");
+ SDL_LOG_DEBUG("Fill binary data");
// binary data
(*on_audio_pass)[strings::params][strings::binary_data] =
smart_objects::SmartObject(data.binary_data);
- LOG4CXX_DEBUG(logger_, "After fill binary data");
- LOG4CXX_DEBUG(logger_, "Send data");
+ SDL_LOG_DEBUG("After fill binary data");
+ SDL_LOG_DEBUG("Send data");
application_manager_.GetRPCService().ManageMobileCommand(
on_audio_pass, application_manager::commands::Command::SOURCE_SDL);
}
@@ -195,7 +195,7 @@ void AudioStreamSenderThread::setShouldBeStopped(bool should_stop) {
}
void AudioStreamSenderThread::exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
setShouldBeStopped(true);
}
diff --git a/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc b/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc
index e55efed4ce..68018028ae 100644
--- a/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc
+++ b/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc
@@ -32,62 +32,67 @@
#include "media_manager/audio/from_mic_recorder_adapter.h"
#include <string>
+#include "interfaces/MOBILE_API.h"
#include "media_manager/audio/from_mic_to_file_recorder_thread.h"
#include "utils/logger.h"
#include "utils/threads/thread.h"
namespace media_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "MediaManager")
+SDL_CREATE_LOG_VARIABLE("MediaManager")
FromMicRecorderAdapter::FromMicRecorderAdapter()
: recorder_thread_(NULL)
, output_file_("default_recorded_audio.wav")
, kDefaultDuration(1000)
+ , sampling_rate_(mobile_apis::SamplingRate::INVALID_ENUM)
+ , bits_per_sample_(mobile_apis::BitsPerSample::INVALID_ENUM)
+ , audio_type_(mobile_apis::AudioType::INVALID_ENUM)
, duration_(kDefaultDuration) {}
FromMicRecorderAdapter::~FromMicRecorderAdapter() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (recorder_thread_) {
- recorder_thread_->join();
- delete recorder_thread_->delegate();
+ recorder_thread_->Stop(threads::Thread::kThreadSoftStop);
+ delete recorder_thread_->GetDelegate();
threads::DeleteThread(recorder_thread_);
}
}
void FromMicRecorderAdapter::StartActivity(int32_t application_key) {
- LOG4CXX_DEBUG(logger_, "Start with app " << application_key);
+ SDL_LOG_DEBUG("Start with app " << application_key);
if (application_key == current_application_) {
- LOG4CXX_WARN(logger_,
- "Running recording from mic for " << current_application_);
+ SDL_LOG_WARN("Running recording from mic for " << current_application_);
return;
}
// Todd: No gstreamer recorder thread
if (!recorder_thread_) {
FromMicToFileRecorderThread* thread_delegate =
- new FromMicToFileRecorderThread(output_file_, duration_);
+ new FromMicToFileRecorderThread(output_file_,
+ duration_,
+ sampling_rate_,
+ bits_per_sample_,
+ audio_type_);
recorder_thread_ = threads::CreateThread("MicrophoneRec", thread_delegate);
}
if (NULL != recorder_thread_) {
- recorder_thread_->start();
+ recorder_thread_->Start();
current_application_ = application_key;
}
}
void FromMicRecorderAdapter::StopActivity(int32_t application_key) {
- LOG4CXX_INFO(logger_,
- "FromMicRecorderAdapter::StopActivity " << application_key);
+ SDL_LOG_INFO("FromMicRecorderAdapter::StopActivity " << application_key);
if (application_key != current_application_) {
- LOG4CXX_WARN(logger_,
- "Running activity on other app key " << current_application_);
+ SDL_LOG_WARN("Running activity on other app key " << current_application_);
return;
}
if (recorder_thread_) {
- recorder_thread_->join();
- delete recorder_thread_->delegate();
+ recorder_thread_->Stop(threads::Thread::kThreadSoftStop);
+ delete recorder_thread_->GetDelegate();
threads::DeleteThread(recorder_thread_);
recorder_thread_ = NULL;
}
@@ -107,4 +112,15 @@ void FromMicRecorderAdapter::set_duration(int32_t duration) {
duration_ = duration;
}
+void FromMicRecorderAdapter::set_config(
+ mobile_apis::SamplingRate::eType sampling_rate,
+ mobile_apis::BitsPerSample::eType bits_per_sample,
+ mobile_apis::AudioType::eType audio_type,
+ int32_t duration) {
+ sampling_rate_ = sampling_rate;
+ bits_per_sample_ = bits_per_sample;
+ audio_type_ = audio_type;
+ duration_ = duration;
+}
+
} // namespace media_manager
diff --git a/src/components/media_manager/src/audio/from_mic_recorder_listener.cc b/src/components/media_manager/src/audio/from_mic_recorder_listener.cc
index 721229b250..377834b05f 100644
--- a/src/components/media_manager/src/audio/from_mic_recorder_listener.cc
+++ b/src/components/media_manager/src/audio/from_mic_recorder_listener.cc
@@ -37,7 +37,7 @@
namespace media_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "MediaManager")
+SDL_CREATE_LOG_VARIABLE("MediaManager")
FromMicRecorderListener::FromMicRecorderListener(
const std::string& file_name,
@@ -48,10 +48,10 @@ FromMicRecorderListener::FromMicRecorderListener(
, application_manager_(app_mngr) {}
FromMicRecorderListener::~FromMicRecorderListener() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (reader_) {
- reader_->join();
- delete reader_->delegate();
+ reader_->Stop(threads::Thread::kThreadSoftStop);
+ delete reader_->GetDelegate();
threads::DeleteThread(reader_);
}
}
@@ -63,9 +63,8 @@ void FromMicRecorderListener::OnErrorReceived(int32_t application_key,
const DataForListener& data) {}
void FromMicRecorderListener::OnActivityStarted(int32_t application_key) {
- LOG4CXX_INFO(
- logger_,
- "FromMicRecorderListener::OnActivityStarted " << application_key);
+ SDL_LOG_INFO("FromMicRecorderListener::OnActivityStarted "
+ << application_key);
if (application_key == current_application_) {
return;
}
@@ -75,23 +74,21 @@ void FromMicRecorderListener::OnActivityStarted(int32_t application_key) {
reader_ = threads::CreateThread("RecorderSender", thread_delegate);
}
if (reader_) {
- reader_->start();
+ reader_->Start();
current_application_ = application_key;
}
}
void FromMicRecorderListener::OnActivityEnded(int32_t application_key) {
- LOG4CXX_INFO(logger_,
- "FromMicRecorderListener::OnActivityEnded " << application_key);
+ SDL_LOG_INFO("FromMicRecorderListener::OnActivityEnded " << application_key);
if (application_key != current_application_) {
- LOG4CXX_WARN(logger_,
- "Not performing activity on " << application_key << " but on "
+ SDL_LOG_WARN("Not performing activity on " << application_key << " but on "
<< current_application_);
return;
}
if (reader_) {
- reader_->join();
- delete reader_->delegate();
+ reader_->Stop(threads::Thread::kThreadSoftStop);
+ delete reader_->GetDelegate();
threads::DeleteThread(reader_);
reader_ = NULL;
}
diff --git a/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc b/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc
index a34bdd3f09..d2634214fa 100644
--- a/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc
+++ b/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc
@@ -34,11 +34,12 @@
#include <unistd.h>
#include <cstring>
#include <sstream>
+#include "interfaces/MOBILE_API.h"
#include "utils/logger.h"
namespace media_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "MediaManager")
+SDL_CREATE_LOG_VARIABLE("MediaManager")
GMainLoop* FromMicToFileRecorderThread::loop = NULL;
@@ -46,35 +47,42 @@ GMainLoop* FromMicToFileRecorderThread::loop = NULL;
static const int kNumAudioChannels = 1;
FromMicToFileRecorderThread::FromMicToFileRecorderThread(
- const std::string& output_file, int32_t duration)
+ const std::string& output_file,
+ int32_t duration,
+ mobile_apis::SamplingRate::eType sampling_rate,
+ mobile_apis::BitsPerSample::eType bits_per_sample,
+ mobile_apis::AudioType::eType audio_type)
: threads::ThreadDelegate()
, argc_(5)
, argv_(NULL)
, oKey_("-o")
, tKey_("-t")
, sleepThread_(NULL)
- , outputFileName_(output_file) {
- LOG4CXX_AUTO_TRACE(logger_);
+ , outputFileName_(output_file)
+ , samplingRate_(sampling_rate)
+ , bitsPerSample_(bits_per_sample) {
+ SDL_LOG_AUTO_TRACE();
set_record_duration(duration);
+ // audio_type is not used as we always employ LPCM
}
FromMicToFileRecorderThread::~FromMicToFileRecorderThread() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (sleepThread_) {
- sleepThread_->join();
- delete sleepThread_->delegate();
+ sleepThread_->Stop(threads::Thread::kThreadSoftStop);
+ delete sleepThread_->GetDelegate();
threads::DeleteThread(sleepThread_);
}
}
void FromMicToFileRecorderThread::set_output_file(
const std::string& output_file) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
outputFileName_ = output_file;
}
void FromMicToFileRecorderThread::set_record_duration(int32_t duration) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::stringstream stringStream;
stringStream << duration / 1000;
@@ -82,7 +90,7 @@ void FromMicToFileRecorderThread::set_record_duration(int32_t duration) {
}
void FromMicToFileRecorderThread::initArgs() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
argv_ = new gchar*[argc_];
@@ -100,7 +108,7 @@ void FromMicToFileRecorderThread::initArgs() {
}
void FromMicToFileRecorderThread::deinitArgs() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (argv_) {
for (int32_t i = 0; i < argc_; i++) {
@@ -112,7 +120,7 @@ void FromMicToFileRecorderThread::deinitArgs() {
}
void FromMicToFileRecorderThread::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
{
sync_primitives::AutoLock auto_lock(stopFlagLock_);
@@ -178,9 +186,9 @@ void FromMicToFileRecorderThread::threadMain() {
g_error("Must supply destination (-d FILE)\n");
}
- LOG4CXX_TRACE(logger_, "Reading from device: " << device);
- LOG4CXX_TRACE(logger_, "Saving pipeline output to: " << outfile);
- LOG4CXX_TRACE(logger_, "Duration set to: " << duration);
+ SDL_LOG_TRACE("Reading from device: " << device);
+ SDL_LOG_TRACE("Saving pipeline output to: " << outfile);
+ SDL_LOG_TRACE("Duration set to: " << duration);
// Initialize gstreamer and setup the main loop information
gst_init(&argc, &argv);
@@ -205,9 +213,11 @@ void FromMicToFileRecorderThread::threadMain() {
wavenc = gst_element_factory_make("wavenc", "wavenc0");
filesink = gst_element_factory_make("filesink", "filesink0");
- // create a capability to downmix the recorded audio to monaural
- audiocaps = gst_caps_new_simple(
- "audio/x-raw", "channels", G_TYPE_INT, kNumAudioChannels, NULL);
+ // Create a capability to specify audio format. It also downmixes the recorded
+ // audio to monaural.
+ std::string caps_string = create_caps_string();
+ SDL_LOG_DEBUG("Using audio caps: " << caps_string);
+ audiocaps = gst_caps_from_string(caps_string.c_str());
// Assert that all the elements were created
if (!alsasrc || !audioconvert || !capsfilter || !wavenc || !filesink ||
@@ -238,7 +248,7 @@ void FromMicToFileRecorderThread::threadMain() {
gst_element_set_state(pipeline, GST_STATE_PLAYING);
- LOG4CXX_TRACE(logger_, "Initializing pipeline ...");
+ SDL_LOG_TRACE("Initializing pipeline ...");
while (GST_STATE(pipeline) != GST_STATE_PLAYING) {
bool shouldBeStoped;
{
@@ -256,7 +266,7 @@ void FromMicToFileRecorderThread::threadMain() {
return;
}
}
- LOG4CXX_TRACE(logger_, "Pipeline started ...\n");
+ SDL_LOG_TRACE("Pipeline started ...\n");
// Start up a timer for the pipeline
if (duration > 0) {
@@ -266,7 +276,7 @@ void FromMicToFileRecorderThread::threadMain() {
sleepThread_ =
threads::CreateThread("SleepThread", new SleepThreadDelegate(timeout));
- sleepThread_->start();
+ sleepThread_->Start();
}
loop = g_main_loop_new(NULL, FALSE);
@@ -275,7 +285,7 @@ void FromMicToFileRecorderThread::threadMain() {
gst_element_set_state(pipeline, GST_STATE_NULL);
- LOG4CXX_TRACE(logger_, "Deleting pipeline\n");
+ SDL_LOG_TRACE("Deleting pipeline\n");
gst_object_unref(GST_OBJECT(pipeline));
g_main_loop_unref(loop);
g_option_context_free(context);
@@ -285,12 +295,55 @@ void FromMicToFileRecorderThread::threadMain() {
loop = NULL;
}
+std::string FromMicToFileRecorderThread::create_caps_string() {
+ SDL_LOG_AUTO_TRACE();
+
+ std::stringstream ss;
+ ss << "audio/x-raw";
+
+ switch (bitsPerSample_) {
+ case mobile_apis::BitsPerSample::BitsPerSample_8_BIT:
+ // format is 8-bit unsigned
+ ss << ",format=(string)U8";
+ break;
+ case mobile_apis::BitsPerSample::BitsPerSample_16_BIT:
+ // format is 16-bit signed, in little endian
+ ss << ",format=(string)S16LE";
+ break;
+ default:
+ // do not specify the format; use system default
+ break;
+ }
+
+ switch (samplingRate_) {
+ case mobile_apis::SamplingRate::SamplingRate_8KHZ:
+ ss << ",rate=8000";
+ break;
+ case mobile_apis::SamplingRate::SamplingRate_16KHZ:
+ ss << ",rate=16000";
+ break;
+ case mobile_apis::SamplingRate::SamplingRate_22KHZ:
+ ss << ",rate=22050";
+ break;
+ case mobile_apis::SamplingRate::SamplingRate_44KHZ:
+ ss << ",rate=44100";
+ break;
+ default:
+ // do not specify the sampling rate; use system default
+ break;
+ }
+
+ ss << ",channels=" << kNumAudioChannels;
+
+ return ss.str();
+}
+
FromMicToFileRecorderThread::SleepThreadDelegate::SleepThreadDelegate(
GstTimeout timeout)
: threads::ThreadDelegate(), timeout_(timeout) {}
void FromMicToFileRecorderThread::SleepThreadDelegate::threadMain() {
- LOG4CXX_TRACE(logger_, "Sleep for " << timeout_.duration << " seconds");
+ SDL_LOG_TRACE("Sleep for " << timeout_.duration << " seconds");
sleep(timeout_.duration);
@@ -302,21 +355,21 @@ void FromMicToFileRecorderThread::SleepThreadDelegate::threadMain() {
}
void FromMicToFileRecorderThread::exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (NULL != loop) {
if (g_main_loop_is_running(loop)) {
- LOG4CXX_TRACE(logger_, "Quit loop\n");
+ SDL_LOG_TRACE("Quit loop\n");
g_main_loop_quit(loop);
}
}
if (sleepThread_) {
- LOG4CXX_DEBUG(logger_, "Stop sleep thread\n");
+ SDL_LOG_DEBUG("Stop sleep thread\n");
sleepThread_->stop();
}
- LOG4CXX_TRACE(logger_, "Set should be stopped flag\n");
+ SDL_LOG_TRACE("Set should be stopped flag\n");
sync_primitives::AutoLock auto_lock(stopFlagLock_);
shouldBeStoped_ = true;
}
diff --git a/src/components/media_manager/src/file_streamer_adapter.cc b/src/components/media_manager/src/file_streamer_adapter.cc
index 7761e13601..301b093829 100644
--- a/src/components/media_manager/src/file_streamer_adapter.cc
+++ b/src/components/media_manager/src/file_streamer_adapter.cc
@@ -36,7 +36,7 @@
namespace media_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "FileStreamerAdapter")
+SDL_CREATE_LOG_VARIABLE("FileStreamerAdapter")
FileStreamerAdapter::FileStreamerAdapter(const std::string& file_name,
const std::string& app_storage_folder)
@@ -56,24 +56,24 @@ FileStreamerAdapter::FileStreamer::FileStreamer(
FileStreamerAdapter::FileStreamer::~FileStreamer() {}
bool FileStreamerAdapter::FileStreamer::Connect() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!file_system::CreateDirectoryRecursively(app_storage_folder_)) {
- LOG4CXX_ERROR(logger_, "Cannot create app folder");
+ SDL_LOG_ERROR("Cannot create app folder");
return false;
}
file_stream_ = file_system::Open(file_name_);
if (!file_stream_) {
- LOG4CXX_ERROR(logger_, "Cannot open file stream " << file_name_);
+ SDL_LOG_ERROR("Cannot open file stream " << file_name_);
return false;
}
- LOG4CXX_INFO(logger_, "File " << file_name_ << " was successfuly opened");
+ SDL_LOG_INFO("File " << file_name_ << " was successfuly opened");
return true;
}
void FileStreamerAdapter::FileStreamer::Disconnect() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (file_stream_) {
file_system::Close(file_stream_);
delete file_stream_;
@@ -84,18 +84,18 @@ void FileStreamerAdapter::FileStreamer::Disconnect() {
bool FileStreamerAdapter::FileStreamer::Send(
protocol_handler::RawMessagePtr msg) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!file_stream_) {
- LOG4CXX_ERROR(logger_, "File stream not found " << file_name_);
+ SDL_LOG_ERROR("File stream not found " << file_name_);
return false;
}
if (!file_system::Write(file_stream_, msg->data(), msg->data_size())) {
- LOG4CXX_ERROR(logger_, "Failed writing data to file " << file_name_);
+ SDL_LOG_ERROR("Failed writing data to file " << file_name_);
return false;
}
- LOG4CXX_INFO(logger_, "Streamer::sent " << msg->data_size());
+ SDL_LOG_INFO("Streamer::sent " << msg->data_size());
return true;
}
diff --git a/src/components/media_manager/src/media_adapter_impl.cc b/src/components/media_manager/src/media_adapter_impl.cc
index cf15a7af97..119a08d88b 100644
--- a/src/components/media_manager/src/media_adapter_impl.cc
+++ b/src/components/media_manager/src/media_adapter_impl.cc
@@ -35,7 +35,7 @@
namespace media_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "MediaManager")
+SDL_CREATE_LOG_VARIABLE("MediaManager")
MediaAdapterImpl::MediaAdapterImpl() : current_application_(0) {}
@@ -44,12 +44,12 @@ MediaAdapterImpl::~MediaAdapterImpl() {
}
void MediaAdapterImpl::AddListener(const MediaListenerPtr& listener) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
media_listeners_.insert(listener);
}
void MediaAdapterImpl::RemoveListener(const MediaListenerPtr& listener) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
media_listeners_.erase(listener);
}
diff --git a/src/components/media_manager/src/media_manager_impl.cc b/src/components/media_manager/src/media_manager_impl.cc
index b04381605d..6f0a67b0c9 100644
--- a/src/components/media_manager/src/media_manager_impl.cc
+++ b/src/components/media_manager/src/media_manager_impl.cc
@@ -35,7 +35,6 @@
#include "application_manager/application_impl.h"
#include "application_manager/application_manager.h"
#include "application_manager/message_helper.h"
-#include "application_manager/smart_object_keys.h"
#include "media_manager/audio/from_mic_recorder_listener.h"
#include "media_manager/streamer_listener.h"
#include "protocol_handler/protocol_handler.h"
@@ -56,7 +55,7 @@
namespace media_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "MediaManager")
+SDL_CREATE_LOG_VARIABLE("MediaManager")
MediaManagerImpl::MediaManagerImpl(
application_manager::ApplicationManager& application_manager,
@@ -65,9 +64,6 @@ MediaManagerImpl::MediaManagerImpl(
, protocol_handler_(NULL)
, a2dp_player_(NULL)
, from_mic_recorder_(NULL)
- , bits_per_sample_(16)
- , sampling_rate_(16000)
- , stream_data_size_(0ull)
, application_manager_(application_manager) {
Init();
}
@@ -116,10 +112,10 @@ void MediaManagerImpl::set_mock_streamer_listener(
void MediaManagerImpl::Init() {
using namespace protocol_handler;
- LOG4CXX_INFO(logger_, "MediaManagerImpl::Init()");
+ SDL_LOG_INFO("MediaManagerImpl::Init()");
#if defined(EXTENDED_MEDIA_MODE)
- LOG4CXX_INFO(logger_, "Called Init with default configuration.");
+ SDL_LOG_INFO("Called Init with default configuration.");
from_mic_recorder_ = new FromMicRecorderAdapter();
#endif
@@ -164,27 +160,10 @@ void MediaManagerImpl::Init() {
streamer_[ServiceType::kAudio]->AddListener(
streamer_listener_[ServiceType::kAudio]);
}
-
- if (application_manager_.hmi_capabilities().pcm_stream_capabilities()) {
- const auto pcm_caps =
- application_manager_.hmi_capabilities().pcm_stream_capabilities();
-
- if (pcm_caps->keyExists(application_manager::strings::bits_per_sample)) {
- bits_per_sample_ =
- pcm_caps->getElement(application_manager::strings::bits_per_sample)
- .asUInt();
- }
-
- if (pcm_caps->keyExists(application_manager::strings::sampling_rate)) {
- sampling_rate_ =
- pcm_caps->getElement(application_manager::strings::sampling_rate)
- .asUInt();
- }
- }
}
void MediaManagerImpl::PlayA2DPSource(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
#if defined(EXTENDED_MEDIA_MODE)
if (!a2dp_player_ && protocol_handler_) {
@@ -199,7 +178,7 @@ void MediaManagerImpl::PlayA2DPSource(int32_t application_key) {
}
void MediaManagerImpl::StopA2DPSource(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (a2dp_player_) {
a2dp_player_->StopActivity(application_key);
}
@@ -208,8 +187,22 @@ void MediaManagerImpl::StopA2DPSource(int32_t application_key) {
void MediaManagerImpl::StartMicrophoneRecording(int32_t application_key,
const std::string& output_file,
int32_t duration) {
- LOG4CXX_INFO(logger_,
- "MediaManagerImpl::StartMicrophoneRecording to " << output_file);
+ StartMicrophoneRecording(application_key,
+ output_file,
+ duration,
+ mobile_apis::SamplingRate::INVALID_ENUM,
+ mobile_apis::BitsPerSample::INVALID_ENUM,
+ mobile_apis::AudioType::INVALID_ENUM);
+}
+
+void MediaManagerImpl::StartMicrophoneRecording(
+ int32_t application_key,
+ const std::string& output_file,
+ int32_t duration,
+ mobile_apis::SamplingRate::eType sampling_rate,
+ mobile_apis::BitsPerSample::eType bits_per_sample,
+ mobile_apis::AudioType::eType audio_type) {
+ SDL_LOG_INFO("MediaManagerImpl::StartMicrophoneRecording to " << output_file);
application_manager::ApplicationSharedPtr app =
application_manager_.application(application_key);
std::string file_path = settings().app_storage_folder();
@@ -223,16 +216,16 @@ void MediaManagerImpl::StartMicrophoneRecording(int32_t application_key,
(static_cast<FromMicRecorderAdapter*>(from_mic_recorder_))
->set_output_file(file_path);
(static_cast<FromMicRecorderAdapter*>(from_mic_recorder_))
- ->set_duration(duration);
+ ->set_config(sampling_rate, bits_per_sample, audio_type, duration);
from_mic_recorder_->StartActivity(application_key);
}
#else
if (file_system::FileExists(file_path)) {
- LOG4CXX_INFO(logger_, "File " << output_file << " exists, removing");
+ SDL_LOG_INFO("File " << output_file << " exists, removing");
if (file_system::DeleteFile(file_path)) {
- LOG4CXX_INFO(logger_, "File " << output_file << " removed");
+ SDL_LOG_INFO("File " << output_file << " removed");
} else {
- LOG4CXX_WARN(logger_, "Could not remove file " << output_file);
+ SDL_LOG_WARN("Could not remove file " << output_file);
}
}
const std::string record_file_source = settings().app_resource_folder() +
@@ -241,21 +234,20 @@ void MediaManagerImpl::StartMicrophoneRecording(int32_t application_key,
std::vector<uint8_t> buf;
if (file_system::ReadBinaryFile(record_file_source, buf)) {
if (file_system::Write(file_path, buf)) {
- LOG4CXX_INFO(
- logger_,
- "File " << record_file_source << " copied to " << output_file);
+ SDL_LOG_INFO("File " << record_file_source << " copied to "
+ << output_file);
} else {
- LOG4CXX_WARN(logger_, "Could not write to file " << output_file);
+ SDL_LOG_WARN("Could not write to file " << output_file);
}
} else {
- LOG4CXX_WARN(logger_, "Could not read file " << record_file_source);
+ SDL_LOG_WARN("Could not read file " << record_file_source);
}
#endif
from_mic_listener_->OnActivityStarted(application_key);
}
void MediaManagerImpl::StopMicrophoneRecording(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
#if defined(EXTENDED_MEDIA_MODE)
if (from_mic_recorder_) {
from_mic_recorder_->StopActivity(application_key);
@@ -273,7 +265,7 @@ void MediaManagerImpl::StopMicrophoneRecording(int32_t application_key) {
void MediaManagerImpl::StartStreaming(
int32_t application_key, protocol_handler::ServiceType service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (streamer_[service_type]) {
streamer_[service_type]->StartActivity(application_key);
@@ -282,9 +274,7 @@ void MediaManagerImpl::StartStreaming(
void MediaManagerImpl::StopStreaming(
int32_t application_key, protocol_handler::ServiceType service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
-
- stream_data_size_ = 0ull;
+ SDL_LOG_AUTO_TRACE();
if (streamer_[service_type]) {
streamer_[service_type]->StopActivity(application_key);
@@ -301,47 +291,29 @@ void MediaManagerImpl::OnMessageReceived(
using namespace protocol_handler;
using namespace application_manager;
using namespace helpers;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const uint32_t streaming_app_id = message->connection_key();
const ServiceType service_type = message->service_type();
if (Compare<ServiceType, NEQ, ALL>(
service_type, ServiceType::kMobileNav, ServiceType::kAudio)) {
- LOG4CXX_DEBUG(logger_, "Unsupported service type in MediaManager");
+ SDL_LOG_DEBUG("Unsupported service type in MediaManager");
return;
}
if (!application_manager_.CanAppStream(streaming_app_id, service_type)) {
application_manager_.ForbidStreaming(streaming_app_id, service_type);
- LOG4CXX_ERROR(logger_,
- "The application is trying to stream when it should not."
- " service type: "
- << service_type);
+ SDL_LOG_ERROR(
+ "The application is trying to stream when it should not."
+ " service type: "
+ << service_type);
return;
}
ApplicationSharedPtr app = application_manager_.application(streaming_app_id);
if (app) {
- if (ServiceType::kAudio == service_type &&
- "socket" == settings().audio_server_type()) {
- if (stream_data_size_ == 0) {
- socket_audio_stream_start_time_ = std::chrono::system_clock::now();
- }
-
- stream_data_size_ += message->data_size();
- uint32_t ms_for_all_data = DataSizeToMilliseconds(stream_data_size_);
- uint32_t ms_since_stream_start =
- std::chrono::duration_cast<std::chrono::milliseconds>(
- std::chrono::system_clock::now() -
- socket_audio_stream_start_time_)
- .count();
- uint32_t ms_stream_remaining = ms_for_all_data - ms_since_stream_start;
-
- app->WakeUpStreaming(service_type, ms_stream_remaining);
- } else {
- app->WakeUpStreaming(service_type);
- }
+ app->WakeUpStreaming(service_type);
streamer_[service_type]->SendData(streaming_app_id, message);
}
}
@@ -364,21 +336,17 @@ void MediaManagerImpl::FramesProcessed(int32_t application_key,
auto video_stream = std::dynamic_pointer_cast<StreamerAdapter>(
streamer_[protocol_handler::ServiceType::kMobileNav]);
- if (audio_stream.use_count() != 0 &&
- "pipe" == settings().audio_server_type()) {
+ if (audio_stream.use_count() != 0) {
size_t audio_queue_size = audio_stream->GetMsgQueueSize();
- LOG4CXX_DEBUG(logger_,
- "# Messages in audio queue = " << audio_queue_size);
+ SDL_LOG_DEBUG("# Messages in audio queue = " << audio_queue_size);
if (audio_queue_size > 0) {
app->WakeUpStreaming(protocol_handler::ServiceType::kAudio);
}
}
- if (video_stream.use_count() != 0 &&
- "pipe" == settings().video_server_type()) {
+ if (video_stream.use_count() != 0) {
size_t video_queue_size = video_stream->GetMsgQueueSize();
- LOG4CXX_DEBUG(logger_,
- "# Messages in video queue = " << video_queue_size);
+ SDL_LOG_DEBUG("# Messages in video queue = " << video_queue_size);
if (video_queue_size > 0) {
app->WakeUpStreaming(protocol_handler::ServiceType::kMobileNav);
}
@@ -390,10 +358,4 @@ const MediaManagerSettings& MediaManagerImpl::settings() const {
return settings_;
}
-uint32_t MediaManagerImpl::DataSizeToMilliseconds(uint64_t data_size) const {
- constexpr uint16_t latency_compensation = 500;
- return 1000 * data_size / (sampling_rate_ * bits_per_sample_ / 8) +
- latency_compensation;
-}
-
} // namespace media_manager
diff --git a/src/components/media_manager/src/pipe_streamer_adapter.cc b/src/components/media_manager/src/pipe_streamer_adapter.cc
index bda106721f..5e4c87c73d 100644
--- a/src/components/media_manager/src/pipe_streamer_adapter.cc
+++ b/src/components/media_manager/src/pipe_streamer_adapter.cc
@@ -40,7 +40,7 @@
namespace media_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "PipeStreamerAdapter")
+SDL_CREATE_LOG_VARIABLE("PipeStreamerAdapter")
PipeStreamerAdapter::PipeStreamerAdapter(const std::string& named_pipe_path,
const std::string& app_storage_folder)
@@ -58,54 +58,51 @@ PipeStreamerAdapter::PipeStreamer::PipeStreamer(
, app_storage_folder_(app_storage_folder)
, pipe_fd_(0) {
if (!file_system::CreateDirectoryRecursively(app_storage_folder_)) {
- LOG4CXX_ERROR(logger_,
- "Cannot create app storage folder " << app_storage_folder_);
+ SDL_LOG_ERROR("Cannot create app storage folder " << app_storage_folder_);
return;
}
if ((mkfifo(named_pipe_path_.c_str(), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) <
0) &&
(errno != EEXIST)) {
- LOG4CXX_ERROR(logger_, "Cannot create pipe " << named_pipe_path_);
+ SDL_LOG_ERROR("Cannot create pipe " << named_pipe_path_);
} else {
- LOG4CXX_INFO(logger_,
- "Pipe " << named_pipe_path_ << " was successfully created");
+ SDL_LOG_INFO("Pipe " << named_pipe_path_ << " was successfully created");
}
}
PipeStreamerAdapter::PipeStreamer::~PipeStreamer() {
if (0 == unlink(named_pipe_path_.c_str())) {
- LOG4CXX_INFO(logger_, "Pipe " << named_pipe_path_ << " was removed");
+ SDL_LOG_INFO("Pipe " << named_pipe_path_ << " was removed");
} else {
- LOG4CXX_ERROR(logger_, "Error removing pipe " << named_pipe_path_);
+ SDL_LOG_ERROR("Error removing pipe " << named_pipe_path_);
}
}
bool PipeStreamerAdapter::PipeStreamer::Connect() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
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_);
+ SDL_LOG_ERROR("Cannot open pipe for writing " << named_pipe_path_);
return false;
}
- LOG4CXX_INFO(
- logger_,
- "Pipe " << named_pipe_path_ << " was successfuly opened for writing");
+ SDL_LOG_INFO("Pipe " << named_pipe_path_
+ << " was successfuly opened for writing");
return true;
}
void PipeStreamerAdapter::PipeStreamer::Disconnect() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (0 == close(pipe_fd_)) {
- LOG4CXX_INFO(logger_, "Pipe " << named_pipe_path_ << " was closed");
+ SDL_LOG_INFO("Pipe " << named_pipe_path_ << " was closed");
} else {
- LOG4CXX_ERROR(logger_, "Error closing pipe " << named_pipe_path_);
+ SDL_LOG_ERROR("Error closing pipe " << named_pipe_path_);
}
}
bool PipeStreamerAdapter::PipeStreamer::Send(
protocol_handler::RawMessagePtr msg) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
fd_set wfds;
FD_ZERO(&wfds);
FD_SET(pipe_fd_, &wfds);
@@ -118,41 +115,36 @@ bool PipeStreamerAdapter::PipeStreamer::Send(
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));
+ SDL_LOG_ERROR("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));
+ SDL_LOG_ERROR("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_
+ SDL_LOG_ERROR("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");
+ SDL_LOG_WARN("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());
+ SDL_LOG_INFO("Streamer::sent " << msg->data_size());
return true;
}
diff --git a/src/components/media_manager/src/socket_streamer_adapter.cc b/src/components/media_manager/src/socket_streamer_adapter.cc
index 624e388a0c..2f10a29c7d 100644
--- a/src/components/media_manager/src/socket_streamer_adapter.cc
+++ b/src/components/media_manager/src/socket_streamer_adapter.cc
@@ -42,7 +42,7 @@
namespace media_manager {
-CREATE_LOGGERPTR_GLOBAL(logger, "SocketStreamerAdapter")
+SDL_CREATE_LOG_VARIABLE("SocketStreamerAdapter")
SocketStreamerAdapter::SocketStreamerAdapter(const std::string& ip,
const uint16_t port,
@@ -67,17 +67,17 @@ SocketStreamerAdapter::SocketStreamer::SocketStreamer(
SocketStreamerAdapter::SocketStreamer::~SocketStreamer() {}
bool SocketStreamerAdapter::SocketStreamer::Connect() {
- LOG4CXX_AUTO_TRACE(logger);
+ SDL_LOG_AUTO_TRACE();
socket_fd_ = socket(AF_INET, SOCK_STREAM, 0);
if (0 >= socket_fd_) {
- LOG4CXX_ERROR(logger, "Unable to create socket");
+ SDL_LOG_ERROR("Unable to create socket");
return false;
}
int32_t optval = 1;
if (-1 == setsockopt(
socket_fd_, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof optval)) {
- LOG4CXX_ERROR(logger, "Unable to set sockopt");
+ SDL_LOG_ERROR("Unable to set sockopt");
return false;
}
@@ -88,23 +88,23 @@ bool SocketStreamerAdapter::SocketStreamer::Connect() {
if (-1 == bind(socket_fd_,
reinterpret_cast<struct sockaddr*>(&serv_addr_),
sizeof(serv_addr_))) {
- LOG4CXX_ERROR(logger, "Unable to bind");
+ SDL_LOG_ERROR("Unable to bind");
return false;
}
if (-1 == listen(socket_fd_, 5)) {
- LOG4CXX_ERROR(logger, "Unable to listen");
+ SDL_LOG_ERROR("Unable to listen");
return false;
}
send_socket_fd_ = accept(socket_fd_, NULL, NULL);
if (0 >= send_socket_fd_) {
- LOG4CXX_ERROR(logger, "Unable to accept");
+ SDL_LOG_ERROR("Unable to accept");
return false;
}
is_first_frame_ = true;
- LOG4CXX_INFO(logger, "Client connected: " << send_socket_fd_);
+ SDL_LOG_INFO("Client connected: " << send_socket_fd_);
return true;
}
@@ -113,7 +113,7 @@ void SocketStreamerAdapter::SocketStreamer::Close() {
}
void SocketStreamerAdapter::SocketStreamer::Disconnect() {
- LOG4CXX_AUTO_TRACE(logger);
+ SDL_LOG_AUTO_TRACE();
if (0 < send_socket_fd_) {
shutdown(send_socket_fd_, SHUT_RDWR);
close(send_socket_fd_);
@@ -128,12 +128,12 @@ void SocketStreamerAdapter::SocketStreamer::Disconnect() {
bool SocketStreamerAdapter::SocketStreamer::Send(
protocol_handler::RawMessagePtr msg) {
- LOG4CXX_AUTO_TRACE(logger);
+ SDL_LOG_AUTO_TRACE();
ssize_t ret;
if (is_first_frame_) {
ret = send(send_socket_fd_, header_.c_str(), header_.size(), MSG_NOSIGNAL);
if (static_cast<uint32_t>(ret) != header_.size()) {
- LOG4CXX_ERROR(logger, "Unable to send data to socket");
+ SDL_LOG_ERROR("Unable to send data to socket");
return false;
}
is_first_frame_ = false;
@@ -141,16 +141,15 @@ bool SocketStreamerAdapter::SocketStreamer::Send(
ret = send(send_socket_fd_, msg->data(), msg->data_size(), MSG_NOSIGNAL);
if (-1 == ret) {
- LOG4CXX_ERROR(logger, "Unable to send data to socket");
+ SDL_LOG_ERROR("Unable to send data to socket");
return false;
}
if (static_cast<uint32_t>(ret) != msg->data_size()) {
- LOG4CXX_WARN(logger,
- "Couldn't send all the data to socket " << send_socket_fd_);
+ SDL_LOG_WARN("Couldn't send all the data to socket " << send_socket_fd_);
}
- LOG4CXX_INFO(logger, "Streamer::sent " << msg->data_size());
+ SDL_LOG_INFO("Streamer::sent " << msg->data_size());
return true;
}
diff --git a/src/components/media_manager/src/streamer_adapter.cc b/src/components/media_manager/src/streamer_adapter.cc
index 3ef12e3ed5..8dedd56ea5 100644
--- a/src/components/media_manager/src/streamer_adapter.cc
+++ b/src/components/media_manager/src/streamer_adapter.cc
@@ -35,7 +35,7 @@
namespace media_manager {
-CREATE_LOGGERPTR_GLOBAL(logger, "StreamerAdapter")
+SDL_CREATE_LOG_VARIABLE("StreamerAdapter")
StreamerAdapter::StreamerAdapter(Streamer* const streamer)
: current_application_(0), messages_(), streamer_(streamer), thread_(NULL) {
@@ -47,24 +47,22 @@ StreamerAdapter::~StreamerAdapter() {
if (streamer_) {
streamer_->Close();
}
- thread_->join();
+ thread_->Stop(threads::Thread::kThreadSoftStop);
delete streamer_;
threads::DeleteThread(thread_);
}
void StreamerAdapter::StartActivity(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger);
+ SDL_LOG_AUTO_TRACE();
if (is_app_performing_activity(application_key)) {
- LOG4CXX_WARN(logger,
- "Activity for application: " << application_key
+ SDL_LOG_WARN("Activity for application: " << application_key
<< " has been already started");
return;
}
- messages_.Reset();
DCHECK(thread_);
const size_t kStackSize = 16384;
- thread_->start(threads::ThreadOptions(kStackSize));
+ thread_->Start(threads::ThreadOptions(kStackSize));
for (std::set<MediaListenerPtr>::iterator it = media_listeners_.begin();
media_listeners_.end() != it;
@@ -79,16 +77,16 @@ size_t StreamerAdapter::GetMsgQueueSize() {
}
void StreamerAdapter::StopActivity(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger);
+ SDL_LOG_AUTO_TRACE();
if (!is_app_performing_activity(application_key)) {
- LOG4CXX_WARN(logger,
- "Activity for application: " << application_key
+ SDL_LOG_WARN("Activity for application: " << application_key
<< " has not been started");
return;
}
- DCHECK(thread_);
- thread_->stop();
+ DCHECK(streamer_);
+ streamer_->exitThreadMain();
+ messages_.Reset();
for (std::set<MediaListenerPtr>::iterator it = media_listeners_.begin();
media_listeners_.end() != it;
@@ -100,10 +98,9 @@ void StreamerAdapter::StopActivity(int32_t application_key) {
void StreamerAdapter::SendData(int32_t application_key,
const ::protocol_handler::RawMessagePtr msg) {
- LOG4CXX_AUTO_TRACE(logger);
+ SDL_LOG_AUTO_TRACE();
if (!is_app_performing_activity(application_key)) {
- LOG4CXX_ERROR(logger,
- "Activity for application: " << application_key
+ SDL_LOG_ERROR("Activity for application: " << application_key
<< " has not been started");
return;
}
@@ -123,13 +120,13 @@ StreamerAdapter::Streamer::Streamer(StreamerAdapter* const adapter)
StreamerAdapter::Streamer::~Streamer() {}
void StreamerAdapter::Streamer::threadMain() {
- LOG4CXX_AUTO_TRACE(logger);
+ SDL_LOG_AUTO_TRACE();
if (!adapter_) {
- LOG4CXX_ERROR(logger, "Null pointer to adapter");
+ SDL_LOG_ERROR("Null pointer to adapter");
return;
}
if (!Connect()) {
- LOG4CXX_ERROR(logger, "Unable to connect");
+ SDL_LOG_ERROR("Unable to connect");
return;
}
stop_flag_ = false;
@@ -138,25 +135,24 @@ void StreamerAdapter::Streamer::threadMain() {
while (!adapter_->messages_.empty()) {
protocol_handler::RawMessagePtr msg;
if (!adapter_->messages_.pop(msg)) {
- LOG4CXX_ERROR(logger, "Empty message queue");
+ SDL_LOG_ERROR("Empty message queue");
continue;
}
if (!msg) {
- LOG4CXX_ERROR(logger, "Null pointer message");
+ SDL_LOG_ERROR("Null pointer message");
continue;
}
if (!Send(msg)) {
- LOG4CXX_ERROR(logger, "Unable to send. Disconnecting");
+ SDL_LOG_ERROR("Unable to send. Disconnecting");
Disconnect();
return;
}
static int32_t messages_for_session = 0;
++messages_for_session;
- LOG4CXX_DEBUG(logger,
- "Handling map streaming message. This is "
- << messages_for_session << " message for "
- << adapter_->current_application_);
+ SDL_LOG_DEBUG("Handling map streaming message. This is "
+ << messages_for_session << " message for "
+ << adapter_->current_application_);
std::set<MediaListenerPtr>::iterator it =
adapter_->media_listeners_.begin();
for (; adapter_->media_listeners_.end() != it; ++it) {
@@ -169,7 +165,7 @@ void StreamerAdapter::Streamer::threadMain() {
}
void StreamerAdapter::Streamer::exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger);
+ SDL_LOG_AUTO_TRACE();
stop_flag_ = true;
if (adapter_) {
adapter_->messages_.Shutdown();
diff --git a/src/components/media_manager/src/streamer_listener.cc b/src/components/media_manager/src/streamer_listener.cc
index 2d6c3bc984..13f6162e76 100644
--- a/src/components/media_manager/src/streamer_listener.cc
+++ b/src/components/media_manager/src/streamer_listener.cc
@@ -36,7 +36,7 @@
namespace media_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "MediaManager")
+SDL_CREATE_LOG_VARIABLE("MediaManager")
StreamerListener::StreamerListener(MediaManager& media_manager)
: current_application_(0), media_manager_(media_manager) {}
@@ -52,24 +52,22 @@ void StreamerListener::OnDataReceived(int32_t application_key,
void StreamerListener::OnErrorReceived(int32_t application_key,
const DataForListener& data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
void StreamerListener::OnActivityStarted(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (current_application_ == application_key) {
- LOG4CXX_WARN(logger_,
- "Already performing activity for " << application_key);
+ SDL_LOG_WARN("Already performing activity for " << application_key);
return;
}
current_application_ = application_key;
}
void StreamerListener::OnActivityEnded(int32_t application_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (current_application_ != application_key) {
- LOG4CXX_WARN(logger_,
- "Already not performing activity for " << application_key);
+ SDL_LOG_WARN("Already not performing activity for " << application_key);
return;
}
current_application_ = 0;
diff --git a/src/components/media_manager/src/video/video_stream_to_file_adapter.cc b/src/components/media_manager/src/video/video_stream_to_file_adapter.cc
index d907211d16..83bcb8662c 100644
--- a/src/components/media_manager/src/video/video_stream_to_file_adapter.cc
+++ b/src/components/media_manager/src/video/video_stream_to_file_adapter.cc
@@ -37,7 +37,7 @@
namespace media_manager {
-CREATE_LOGGERPTR_GLOBAL(logger, "VideoStreamToFileAdapter")
+SDL_CREATE_LOG_VARIABLE("VideoStreamToFileAdapter")
VideoStreamToFileAdapter::VideoStreamToFileAdapter(const std::string& file_name)
: file_name_(file_name)
@@ -47,32 +47,31 @@ VideoStreamToFileAdapter::VideoStreamToFileAdapter(const std::string& file_name)
}
VideoStreamToFileAdapter::~VideoStreamToFileAdapter() {
- LOG4CXX_AUTO_TRACE(logger);
+ SDL_LOG_AUTO_TRACE();
if ((0 != current_application_) && (is_ready_)) {
StopActivity(current_application_);
}
- thread_->join();
- delete thread_->delegate();
+ thread_->Stop(threads::Thread::kThreadSoftStop);
+ delete thread_->GetDelegate();
threads::DeleteThread(thread_);
}
void VideoStreamToFileAdapter::Init() {
- if (thread_->is_running()) {
- LOG4CXX_DEBUG(logger, "Start sending thread");
+ if (thread_->IsRunning()) {
+ SDL_LOG_DEBUG("Start sending thread");
const size_t kStackSize = 16384;
- thread_->start(threads::ThreadOptions(kStackSize));
+ thread_->Start(threads::ThreadOptions(kStackSize));
} else {
- LOG4CXX_WARN(logger, "thread is already running");
+ SDL_LOG_WARN("thread is already running");
}
}
void VideoStreamToFileAdapter::SendData(
int32_t application_key, const ::protocol_handler::RawMessagePtr message) {
- LOG4CXX_INFO(logger,
- "VideoStreamToFileAdapter::SendData " << application_key);
+ SDL_LOG_INFO("VideoStreamToFileAdapter::SendData " << application_key);
if (application_key != current_application_) {
- LOG4CXX_WARN(logger, "Wrong application " << application_key);
+ SDL_LOG_WARN("Wrong application " << application_key);
return;
}
@@ -82,11 +81,10 @@ void VideoStreamToFileAdapter::SendData(
}
void VideoStreamToFileAdapter::StartActivity(int32_t application_key) {
- LOG4CXX_INFO(logger,
- "VideoStreamToFileAdapter::StartActivity " << application_key);
+ SDL_LOG_INFO("VideoStreamToFileAdapter::StartActivity " << application_key);
if (application_key == current_application_) {
- LOG4CXX_WARN(
- logger, "Already running video stream to file for " << application_key);
+ SDL_LOG_WARN("Already running video stream to file for "
+ << application_key);
return;
}
@@ -101,11 +99,10 @@ void VideoStreamToFileAdapter::StartActivity(int32_t application_key) {
}
void VideoStreamToFileAdapter::StopActivity(int32_t application_key) {
- LOG4CXX_INFO(logger,
- "VideoStreamToFileAdapter::StopActivity " << application_key);
+ SDL_LOG_INFO("VideoStreamToFileAdapter::StopActivity " << application_key);
if (application_key != current_application_) {
- LOG4CXX_WARN(
- logger, "Performing activity for another key " << current_application_);
+ SDL_LOG_WARN("Performing activity for another key "
+ << current_application_);
return;
}
@@ -133,7 +130,7 @@ VideoStreamToFileAdapter::Streamer::~Streamer() {
}
void VideoStreamToFileAdapter::Streamer::threadMain() {
- LOG4CXX_AUTO_TRACE(logger);
+ SDL_LOG_AUTO_TRACE();
open();
@@ -141,7 +138,7 @@ void VideoStreamToFileAdapter::Streamer::threadMain() {
while (!server_->messages_.empty()) {
::protocol_handler::RawMessagePtr msg = server_->messages_.pop();
if (!msg) {
- LOG4CXX_ERROR(logger, "Null pointer message");
+ SDL_LOG_ERROR("Null pointer message");
continue;
}
@@ -157,7 +154,7 @@ void VideoStreamToFileAdapter::Streamer::threadMain() {
messsages_for_session);
}
} else {
- LOG4CXX_WARN(logger, "Can't open File stream! " << server_->file_name_);
+ SDL_LOG_WARN("Can't open File stream! " << server_->file_name_);
}
}
server_->messages_.wait();
@@ -167,22 +164,22 @@ void VideoStreamToFileAdapter::Streamer::threadMain() {
}
void VideoStreamToFileAdapter::Streamer::exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger);
+ SDL_LOG_AUTO_TRACE();
stop_flag_ = true;
server_->messages_.Shutdown();
}
void VideoStreamToFileAdapter::Streamer::open() {
- LOG4CXX_INFO(logger, "Streamer::open()" << server_->file_name_.c_str());
+ SDL_LOG_INFO("Streamer::open()" << server_->file_name_.c_str());
DCHECK(file_system::CreateDirectoryRecursively(
profile::Profile::instance()->app_storage_folder()));
file_stream_ = file_system::Open(server_->file_name_);
if (!file_stream_) {
- LOG4CXX_WARN(logger, "Can't open file stream! " << server_->file_name_);
+ SDL_LOG_WARN("Can't open file stream! " << server_->file_name_);
} else {
- LOG4CXX_INFO(logger, "file_stream_ opened :" << file_stream_);
+ SDL_LOG_INFO("file_stream_ opened :" << file_stream_);
}
}
diff --git a/src/components/media_manager/test/media_manager_impl_test.cc b/src/components/media_manager/test/media_manager_impl_test.cc
index 627e2f57ed..a64faabe91 100644
--- a/src/components/media_manager/test/media_manager_impl_test.cc
+++ b/src/components/media_manager/test/media_manager_impl_test.cc
@@ -35,7 +35,6 @@
#include "application_manager/message.h"
#include "application_manager/mock_application.h"
#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_hmi_capabilities.h"
#include "application_manager/resumption/resume_ctrl.h"
#include "application_manager/state_controller.h"
#include "gmock/gmock.h"
@@ -110,10 +109,6 @@ class MediaManagerImplTest : public ::testing::Test {
.WillByDefault(ReturnRef(kDefaultValue));
ON_CALL(mock_media_manager_settings_, audio_server_type())
.WillByDefault(ReturnRef(kDefaultValue));
- ON_CALL(mock_hmi_capabilities_, pcm_stream_capabilities())
- .WillByDefault(Return(nullptr));
- ON_CALL(app_mngr_, hmi_capabilities())
- .WillByDefault(ReturnRef(mock_hmi_capabilities_));
mock_app_ = std::make_shared<MockApp>();
media_manager_impl_.reset(
new MediaManagerImpl(app_mngr_, mock_media_manager_settings_));
@@ -181,7 +176,7 @@ class MediaManagerImplTest : public ::testing::Test {
.WillOnce(Return(true));
EXPECT_CALL(app_mngr_, application(kConnectionKey))
.WillOnce(Return(mock_app_));
- EXPECT_CALL(*mock_app_, WakeUpStreaming(service_type, 0ull));
+ EXPECT_CALL(*mock_app_, WakeUpStreaming(service_type));
MockMediaAdapterImplPtr mock_media_streamer =
std::make_shared<MockMediaAdapterImpl>();
media_manager_impl_->set_mock_streamer(service_type, mock_media_streamer);
@@ -211,7 +206,6 @@ class MediaManagerImplTest : public ::testing::Test {
const ::testing::NiceMock<MockMediaManagerSettings>
mock_media_manager_settings_;
std::shared_ptr<MediaManagerImpl> media_manager_impl_;
- application_manager_test::MockHMICapabilities mock_hmi_capabilities_;
};
TEST_F(MediaManagerImplTest,
@@ -331,7 +325,12 @@ TEST_F(MediaManagerImplTest,
EXPECT_EQ(data[i], result[i]);
}
media_manager_impl_->StartMicrophoneRecording(
- kApplicationKey, kOutputFile, kDuration);
+ kApplicationKey,
+ kOutputFile,
+ kDuration,
+ mobile_apis::SamplingRate::SamplingRate_8KHZ,
+ mobile_apis::BitsPerSample::BitsPerSample_8_BIT,
+ mobile_apis::AudioType::PCM);
EXPECT_TRUE(RemoveDirectory(kResourceFolder, true));
EXPECT_TRUE(RemoveDirectory(kStorageFolder, true));
}
@@ -342,7 +341,12 @@ TEST_F(MediaManagerImplTest,
media_manager_impl_->set_mock_mic_listener(media_adapter_listener_mock_);
EXPECT_FALSE(FileExists(kOutputFilePath));
media_manager_impl_->StartMicrophoneRecording(
- kApplicationKey, kOutputFile, kDuration);
+ kApplicationKey,
+ kOutputFile,
+ kDuration,
+ mobile_apis::SamplingRate::SamplingRate_8KHZ,
+ mobile_apis::BitsPerSample::BitsPerSample_8_BIT,
+ mobile_apis::AudioType::PCM);
}
TEST_F(MediaManagerImplTest,
@@ -358,7 +362,12 @@ TEST_F(MediaManagerImplTest,
media_manager_impl_->set_mock_mic_listener(media_adapter_listener_mock_);
EXPECT_TRUE(FileExists(kOutputFilePath));
media_manager_impl_->StartMicrophoneRecording(
- kApplicationKey, kOutputFile, kDuration);
+ kApplicationKey,
+ kOutputFile,
+ kDuration,
+ mobile_apis::SamplingRate::SamplingRate_8KHZ,
+ mobile_apis::BitsPerSample::BitsPerSample_8_BIT,
+ mobile_apis::AudioType::PCM);
chmod(kOutputFilePath.c_str(), S_IWUSR);
EXPECT_TRUE(RemoveDirectory(kStorageFolder, 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 b826f4e5ce..12fe8f10cd 100644
--- a/src/components/policy/policy_external/include/policy/cache_manager.h
+++ b/src/components/policy/policy_external/include/policy/cache_manager.h
@@ -309,13 +309,8 @@ class CacheManager : public CacheManagerInterface {
void GetUpdateUrls(const uint32_t service_type,
EndpointUrls& out_end_points) const OVERRIDE;
- /**
- * @brief Gets allowed number of notifications
- * depending on application priority.
- * @param priority Priority of application
- */
virtual rpc::policy_table_interface_base::NumberOfNotificationsType
- GetNotificationsNumber(const std::string& priority);
+ GetNotificationsNumber(const std::string& priority, const bool is_subtle);
/**
* @brief Gets priority for given application
@@ -597,6 +592,12 @@ class CacheManager : public CacheManagerInterface {
bool* out_app_permissions_changed);
/**
+ * @brief Set preloaded_pt flag value in policy table
+ * @param is_preloaded value to set
+ */
+ void SetPreloadedPtFlag(const bool is_preloaded) OVERRIDE;
+
+ /**
* @brief Records information about head unit system to PT
* @return bool Success of operation
*/
@@ -605,6 +606,12 @@ class CacheManager : public CacheManagerInterface {
const std::string& language);
/**
+ * @brief Get information about last ccpu_version from PT
+ * @return ccpu_version from PT
+ */
+ std::string GetCCPUVersionFromPT() const;
+
+ /**
* @brief Checks, if specific head unit is present in PT
* @return boot Suceess, if present, otherwise - false
*/
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 3e3de694d6..8ed46e0c72 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
@@ -342,9 +342,10 @@ class CacheManagerInterface {
* @brief Get allowed number of notifications
* depending on application priority.
* @param priority Priority of application
+ * @param is_subtle If true, get the number of allowed subtle notifications
*/
virtual policy_table::NumberOfNotificationsType GetNotificationsNumber(
- const std::string& priority) = 0;
+ const std::string& priority, const bool is_subtle) = 0;
/**
* @brief Get priority for given application
@@ -638,6 +639,12 @@ class CacheManagerInterface {
bool* out_app_permissions_changed) = 0;
/**
+ * @brief Set preloaded_pt flag value in policy table
+ * @param is_preloaded value to set
+ */
+ virtual void SetPreloadedPtFlag(const bool is_preloaded) = 0;
+
+ /**
* @brief Records information about head unit system to PT
* @return bool Success of operation
*/
@@ -646,6 +653,12 @@ class CacheManagerInterface {
const std::string& language) = 0;
/**
+ * @brief Get information about last ccpu_version from PT
+ * @return ccpu_version from PT
+ */
+ virtual std::string GetCCPUVersionFromPT() const = 0;
+
+ /**
* @brief Checks, if specific head unit is present in PT
* @return boot Suceess, if present, otherwise - false
*/
diff --git a/src/components/policy/policy_external/include/policy/policy_helper.h b/src/components/policy/policy_external/include/policy/policy_helper.h
index 69ba8806d4..87a9228c12 100644
--- a/src/components/policy/policy_external/include/policy/policy_helper.h
+++ b/src/components/policy/policy_external/include/policy/policy_helper.h
@@ -68,13 +68,6 @@ struct CompareGroupName {
const StringsValueType& group_name_;
};
-/*
- * @brief Used for compare of policies parameters mapped with specific
- * application ids
- */
-bool operator!=(const policy_table::ApplicationParams& first,
- const policy_table::ApplicationParams& second);
-
/**
* @brief Helper struct for checking changes of application policies, which
* come with update along with current data snapshot
@@ -393,15 +386,6 @@ FunctionalGroupIDs Merge(const FunctionalGroupIDs& first,
const FunctionalGroupIDs& second);
/**
- * @brief Finds same values
- * @param first First source of values
- * @param second Second source of values
- * @return Same values set, if any found
- */
-FunctionalGroupIDs FindSame(const FunctionalGroupIDs& first,
- const FunctionalGroupIDs& second);
-
-/**
* @brief Unwrap application policies from predefined values to specific policy
* values, i.e. if application has "default", it will be assigned default
* policies
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 5c55be50d1..27ce30bb3d 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
@@ -435,12 +435,18 @@ class PolicyManagerImpl : public PolicyManager {
const std::string& wers_country_code,
const std::string& language) OVERRIDE;
+ void SetPreloadedPtFlag(const bool is_preloaded) OVERRIDE;
+
+ std::string GetCCPUVersionFromPT() const OVERRIDE;
+
/**
* @brief Get number of notification by priority
* @param priority Specified priority
+ * @param is_subtle If true, get the number of allowed subtle notifications
* @return notification number
*/
- uint32_t GetNotificationsNumber(const std::string& priority) const OVERRIDE;
+ uint32_t GetNotificationsNumber(const std::string& priority,
+ const bool is_subtle) const OVERRIDE;
/**
* @brief Allows to update Vehicle Identification Number in policy table.
diff --git a/src/components/policy/policy_external/include/policy/policy_table/types.h b/src/components/policy/policy_external/include/policy/policy_table/types.h
index 11c76bdd68..6b2f05d336 100644
--- a/src/components/policy/policy_external/include/policy/policy_table/types.h
+++ b/src/components/policy/policy_external/include/policy/policy_table/types.h
@@ -382,6 +382,8 @@ struct ModuleConfig : CompositeType {
ServiceEndpoints endpoints;
Optional<ServiceEndpointProperties> endpoint_properties;
NumberOfNotificationsPerMinute notifications_per_minute_by_priority;
+ Optional<NumberOfNotificationsPerMinute>
+ subtle_notifications_per_minute_by_priority;
Optional<String<0, 100> > vehicle_make;
Optional<String<0, 100> > vehicle_model;
Optional<String<0, 4> > vehicle_year;
@@ -485,7 +487,7 @@ struct ConsumerFriendlyMessages : CompositeType {
struct ModuleMeta : CompositeType {
public:
- Optional<String<0, 250> > ccpu_version;
+ Optional<String<0, 500> > ccpu_version;
Optional<String<0, 250> > language;
Optional<String<0, 250> > wers_country_code;
Optional<Integer<uint32_t, 0, ODO_MAX> > pt_exchanged_at_odometer_x;
@@ -652,6 +654,7 @@ struct VehicleDataItem : CompositeType {
Optional<String<0, 255> > until;
Optional<Boolean> removed;
Optional<Boolean> deprecated;
+ Optional<String<0, UINT32_MAX> > defvalue;
Optional<Float<-INT32_MAX, INT32_MAX> > minvalue;
Optional<Float<-INT32_MAX, INT32_MAX> > maxvalue;
Optional<Integer<uint32_t, 0, UINT32_MAX> > minsize;
@@ -680,6 +683,12 @@ struct VehicleDataItem : CompositeType {
* @return true if type is valid.
*/
bool ValidateTypes() const;
+ /**
+ * @brief Validates default value of vehicle data item based
+ * on type, unable to validate enum values
+ * @return true if defvalue is valid.
+ */
+ bool ValidateDefault() const;
bool IsPrimitiveType() const;
bool ValidateNaming(std::string str) const;
diff --git a/src/components/policy/policy_external/include/policy/policy_table_interface_ext.xml b/src/components/policy/policy_external/include/policy/policy_table_interface_ext.xml
index af7effd97f..64eab51870 100644
--- a/src/components/policy/policy_external/include/policy/policy_table_interface_ext.xml
+++ b/src/components/policy/policy_external/include/policy/policy_table_interface_ext.xml
@@ -40,6 +40,7 @@
<element name="beltStatus" />
<element name="electronicParkBrakeStatus" />
<element name="driverBraking" />
+ <element name="gearStatus" />
<element name="prndl" />
<element name="rpm" />
<element name="steeringWheelAngle" />
@@ -50,6 +51,7 @@
<element name="clusterModeStatus" />
<element name="deviceStatus" />
<element name="emergencyEvent" />
+ <element name="stabilityControlsStatus" />
<element name="eCallInfo" />
<element name="abs_State" />
<element name="turnSignal" />
@@ -57,6 +59,7 @@
<element name="tirePressureValue" />
<element name="tpms" />
<element name="cloudAppVehicleID" />
+ <element name="handsOffSteering" />
</enum>
<enum name="AppHMIType">
@@ -173,6 +176,8 @@
<param name="seconds_between_retries" type="SecondsBetweenRetries" />
<param name="endpoints" type="ServiceEndpoints" />
<param name="notifications_per_minute_by_priority" type="NumberOfNotificationsPerMinute" />
+ <param name="subtle_notifications_per_minute_by_priority" type="NumberOfNotificationsPerMinute"
+ mandatory="false" />
<param name="vehicle_make" type="String" maxlength="100"
mandatory="false" />
<param name="vehicle_model" type="String" maxlength="100"
diff --git a/src/components/policy/policy_external/include/policy/sql_pt_queries.h b/src/components/policy/policy_external/include/policy/sql_pt_queries.h
index 8a3ad1f7df..aba08dcca1 100644
--- a/src/components/policy/policy_external/include/policy/sql_pt_queries.h
+++ b/src/components/policy/policy_external/include/policy/sql_pt_queries.h
@@ -52,6 +52,7 @@ extern const std::string kSelectEndpoint;
extern const std::string kSelectModuleConfig;
extern const std::string kSelectEndpoints;
extern const std::string kSelectNotificationsPerMin;
+extern const std::string kSelectSubtleNotificationsPerMin;
extern const std::string kSelectNotificationsPerPriority;
extern const std::string kSelectAppLevels;
extern const std::string kSelectDeviceData;
@@ -93,6 +94,7 @@ extern const std::string kUpdateModuleConfig;
extern const std::string kInsertEndpoint;
extern const std::string kInsertSecondsBetweenRetry;
extern const std::string kInsertNotificationsByPriority;
+extern const std::string kInsertSubtleNotificationsByPriority;
extern const std::string kInsertDeviceData;
extern const std::string kInsertAppLevel;
extern const std::string kDeleteSecondsBetweenRetries;
diff --git a/src/components/policy/policy_external/include/policy/sql_pt_representation.h b/src/components/policy/policy_external/include/policy/sql_pt_representation.h
index 574806b3fb..473022c6c3 100644
--- a/src/components/policy/policy_external/include/policy/sql_pt_representation.h
+++ b/src/components/policy/policy_external/include/policy/sql_pt_representation.h
@@ -250,6 +250,8 @@ class SQLPTRepresentation : public virtual PTRepresentation {
const policy_table::SecondsBetweenRetries& seconds);
bool SaveNumberOfNotificationsPerMinute(
const policy_table::NumberOfNotificationsPerMinute& notifications);
+ bool SaveNumberOfSubtleNotificationsPerMinute(
+ const policy_table::NumberOfNotificationsPerMinute& notifications);
bool SaveMessageType(const std::string& type);
bool SaveLanguage(const std::string& code);
policy_table::VehicleDataItem PopulateVDIFromQuery(
diff --git a/src/components/policy/policy_external/src/access_remote_impl.cc b/src/components/policy/policy_external/src/access_remote_impl.cc
index 26c8c5e38e..037f4551f1 100644
--- a/src/components/policy/policy_external/src/access_remote_impl.cc
+++ b/src/components/policy/policy_external/src/access_remote_impl.cc
@@ -36,7 +36,7 @@
#include "policy/cache_manager.h"
#include "utils/logger.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "PolicyManagerImpl")
+SDL_CREATE_LOG_VARIABLE("PolicyManagerImpl")
using policy_table::DeviceData;
using policy_table::FunctionalGroupings;
@@ -48,11 +48,10 @@ struct ToHMIType {
policy_table::AppHMITypes::value_type operator()(int item) const {
policy_table::AppHMIType type = static_cast<policy_table::AppHMIType>(item);
if (!IsValidEnum(type)) {
- LOG4CXX_WARN(logger_, "HMI type isn't known " << item);
+ SDL_LOG_WARN("HMI type isn't known " << item);
type = policy_table::AHT_DEFAULT;
}
- LOG4CXX_DEBUG(logger_,
- "HMI type: " << item << " - " << EnumToJsonString(type));
+ SDL_LOG_DEBUG("HMI type: " << item << " - " << EnumToJsonString(type));
return policy_table::AppHMITypes::value_type(type);
}
};
@@ -94,7 +93,7 @@ AccessRemoteImpl::AccessRemoteImpl(std::shared_ptr<CacheManager> cache)
bool AccessRemoteImpl::CheckModuleType(const PTString& app_id,
policy_table::ModuleType module) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!cache_->IsApplicationRepresented(app_id)) {
return false;
}
@@ -117,10 +116,10 @@ bool AccessRemoteImpl::IsAllowed(const policy_table::AccessModules& modules,
const std::string& module_name,
const std::string& rpc_name,
RemoteControlParams* input) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
policy_table::AccessModules::const_iterator i = modules.find(module_name);
if (i == modules.end()) {
- LOG4CXX_DEBUG(logger_, "Module " << module_name << " wasn't found");
+ SDL_LOG_DEBUG("Module " << module_name << " wasn't found");
return false;
}
@@ -133,19 +132,19 @@ bool AccessRemoteImpl::IsAllowed(const policy_table::AccessModules& modules,
const policy_table::Strings& parameters = j->second;
return CompareParameters(parameters, input);
}
- LOG4CXX_DEBUG(logger_, "RPC " << rpc_name << " wasn't found");
+ SDL_LOG_DEBUG("RPC " << rpc_name << " wasn't found");
return false;
}
bool AccessRemoteImpl::CompareParameters(
const policy_table::Strings& parameters, RemoteControlParams* input) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (parameters.empty()) {
return true;
}
if (input->empty()) {
- LOG4CXX_DEBUG(logger_, "Input is empty");
+ SDL_LOG_DEBUG("Input is empty");
return false;
}
@@ -157,7 +156,7 @@ bool AccessRemoteImpl::CompareParameters(
void AccessRemoteImpl::SetDefaultHmiTypes(const ApplicationOnDevice& who,
const std::vector<int>& hmi_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
HMIList::mapped_type types;
std::transform(hmi_types.begin(),
hmi_types.end(),
@@ -168,7 +167,7 @@ void AccessRemoteImpl::SetDefaultHmiTypes(const ApplicationOnDevice& who,
const policy_table::AppHMITypes& AccessRemoteImpl::HmiTypes(
const ApplicationOnDevice& who) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (cache_->IsDefaultPolicy(who.app_id)) {
return hmi_types_[who];
} else {
@@ -179,7 +178,7 @@ const policy_table::AppHMITypes& AccessRemoteImpl::HmiTypes(
const policy_table::Strings& AccessRemoteImpl::GetGroups(
const ApplicationOnDevice& who) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->GetGroups(who.app_id);
}
@@ -193,7 +192,7 @@ bool AccessRemoteImpl::IsAppRemoteControl(const ApplicationOnDevice& who) {
bool AccessRemoteImpl::GetPermissionsForApp(const std::string& device_id,
const std::string& app_id,
FunctionalIdType& group_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
GetGroupsIds(device_id, app_id, group_types[kTypeGeneral]);
GetGroupsIds(device_id, kDefaultId, group_types[kTypeDefault]);
GetGroupsIds(
@@ -229,13 +228,13 @@ void AccessRemoteImpl::GetGroupsIds(const std::string& device_id,
FunctionalGroupIDs& groups_ids) {
ApplicationOnDevice who = {device_id, app_id};
const policy_table::Strings& groups = GetGroups(who);
- LOG4CXX_DEBUG(logger_, "Groups Names: " << groups);
+ SDL_LOG_DEBUG("Groups Names: " << groups);
groups_ids.resize(groups.size());
std::transform(groups.begin(),
groups.end(),
groups_ids.begin(),
&CacheManager::GenerateHash);
- LOG4CXX_DEBUG(logger_, "Groups Ids: " << groups_ids);
+ SDL_LOG_DEBUG("Groups Ids: " << groups_ids);
}
bool AccessRemoteImpl::GetModuleTypes(const std::string& application_id,
diff --git a/src/components/policy/policy_external/src/cache_manager.cc b/src/components/policy/policy_external/src/cache_manager.cc
index d8819b6bad..81a5518cb8 100644
--- a/src/components/policy/policy_external/src/cache_manager.cc
+++ b/src/components/policy/policy_external/src/cache_manager.cc
@@ -166,7 +166,8 @@ struct LinkCollector
typedef std::vector<policy_table::UserConsentRecords::key_type>
ApplicationsIds;
- LinkCollector(std::map<std::string, std::string>& links) : links_(links) {}
+ explicit LinkCollector(std::map<std::string, std::string>& links)
+ : links_(links) {}
void operator()(const policy_table::DeviceData::value_type& value) {
using namespace policy_table;
@@ -208,10 +209,12 @@ struct ExternalConsentConsentGroupAppender
};
struct DefaultPolicyUpdater {
- DefaultPolicyUpdater(const policy_table::ApplicationParams& default_params)
+ explicit DefaultPolicyUpdater(
+ const policy_table::ApplicationParams& default_params)
: default_params_(default_params) {}
- void operator()(policy_table::ApplicationPolicies::value_type& pt_value) {
+ void operator()(
+ policy_table::ApplicationPolicies::value_type& pt_value) const {
if (policy::kDefaultId == pt_value.second.get_string()) {
pt_value.second = default_params_;
pt_value.second.set_to_string(policy::kDefaultId);
@@ -226,22 +229,22 @@ struct DefaultPolicyUpdater {
namespace policy {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Policy")
+SDL_CREATE_LOG_VARIABLE("Policy")
-#define CACHE_MANAGER_CHECK(return_value) \
- { \
- if (!pt_) { \
- LOG4CXX_WARN(logger_, "The cache manager is not initialized"); \
- return return_value; \
- } \
+#define CACHE_MANAGER_CHECK(return_value) \
+ { \
+ if (!pt_) { \
+ SDL_LOG_WARN("The cache manager is not initialized"); \
+ return return_value; \
+ } \
}
-#define CACHE_MANAGER_CHECK_VOID() \
- { \
- if (!pt_) { \
- LOG4CXX_WARN(logger_, "The cache manager is not initialized"); \
- return; \
- } \
+#define CACHE_MANAGER_CHECK_VOID() \
+ { \
+ if (!pt_) { \
+ SDL_LOG_WARN("The cache manager is not initialized"); \
+ return; \
+ } \
}
struct LanguageFinder {
@@ -282,16 +285,16 @@ CacheManager::CacheManager(bool in_memory)
}
CacheManager::~CacheManager() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(backuper_locker_);
- backup_thread_->join();
- delete backup_thread_->delegate();
+ backup_thread_->Stop(threads::Thread::kThreadSoftStop);
+ delete backup_thread_->GetDelegate();
threads::DeleteThread(backup_thread_);
}
ConsentPriorityType CacheManager::GetConsentsPriority(
const std::string& device_id, const std::string& application_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ConsentPriorityType prio_type = ConsentPriorityType::kExternalConsentPrio;
CACHE_MANAGER_CHECK(prio_type);
sync_primitives::AutoLock auto_lock(cache_lock_);
@@ -299,7 +302,7 @@ ConsentPriorityType CacheManager::GetConsentsPriority(
pt_->policy_table.device_data->find(device_id);
if (pt_->policy_table.device_data->end() == dev_params_iter) {
- LOG4CXX_DEBUG(logger_, "Device id " << device_id << " not found.");
+ SDL_LOG_DEBUG("Device id " << device_id << " not found.");
return prio_type;
}
@@ -309,8 +312,7 @@ ConsentPriorityType CacheManager::GetConsentsPriority(
dev_par.user_consent_records->find(application_id);
if (dev_par.user_consent_records->end() == app_consent_record) {
- LOG4CXX_DEBUG(logger_,
- "Application id " << application_id << " not found.");
+ SDL_LOG_DEBUG("Application id " << application_id << " not found.");
return prio_type;
}
@@ -327,7 +329,7 @@ const policy_table::Strings& CacheManager::GetGroups(const PTString& app_id) {
}
const policy_table::Strings CacheManager::GetPolicyAppIDs() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
const auto apps = pt_->policy_table.app_policies_section.apps;
@@ -448,13 +450,12 @@ bool CacheManager::GetUserPermissionsForDevice(
const std::string& device_id,
StringArray& consented_groups,
StringArray& disallowed_groups) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
sync_primitives::AutoLock auto_lock(cache_lock_);
policy_table::DeviceData& device_data = *pt_->policy_table.device_data;
if (device_data.end() == device_data.find(device_id)) {
- LOG4CXX_ERROR(logger_,
- "Device with " << device_id << "was not found in PT");
+ SDL_LOG_ERROR("Device with " << device_id << "was not found in PT");
return false;
}
const policy_table::DeviceParams& params = device_data[device_id];
@@ -481,7 +482,7 @@ bool CacheManager::GetUserPermissionsForDevice(
void CacheManager::GetAllAppGroups(const std::string& app_id,
FunctionalGroupIDs& all_group_ids) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
sync_primitives::AutoLock auto_lock(cache_lock_);
@@ -520,7 +521,7 @@ void CacheManager::GetAllAppGroups(const std::string& app_id,
void CacheManager::GetPreConsentedGroups(
const std::string& app_id, FunctionalGroupIDs& preconsented_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
sync_primitives::AutoLock auto_lock(cache_lock_);
if (kDeviceId == app_id) {
@@ -560,7 +561,7 @@ void CacheManager::GetConsentedGroups(const std::string& device_id,
const std::string& app_id,
FunctionalGroupIDs& allowed_groups,
FunctionalGroupIDs& disallowed_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
sync_primitives::AutoLock auto_lock(cache_lock_);
policy_table::DeviceData::iterator dev_params_iter =
@@ -596,12 +597,11 @@ void CacheManager::GetUnconsentedGroups(
const std::string& device_id,
const std::string& policy_app_id,
FunctionalGroupIDs& unconsented_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
if (!IsApplicationRepresented(policy_app_id)) {
- LOG4CXX_WARN(logger_,
- "The application with app_id: " << policy_app_id
+ SDL_LOG_WARN("The application with app_id: " << policy_app_id
<< " is not represented");
return;
}
@@ -680,21 +680,18 @@ void CacheManager::ProcessUpdate(
if (app_id == kDefaultId || app_id == kPreDataConsentId) {
if (new_request_types.is_omitted()) {
- LOG4CXX_INFO(logger_,
- "Application " << app_id
+ SDL_LOG_INFO("Application " << app_id
<< " has omitted RequestTypes."
" Previous values will be kept.");
update_request_types = false;
} else if (new_request_types.empty()) {
if (new_request_types.is_cleaned_up()) {
- LOG4CXX_INFO(logger_,
- "Application " << app_id
+ SDL_LOG_INFO("Application " << app_id
<< " has cleaned up all values."
" Previous values will be kept.");
update_request_types = false;
} else {
- LOG4CXX_INFO(logger_,
- "Application " << app_id
+ SDL_LOG_INFO("Application " << app_id
<< " has empty RequestTypes."
" Any parameter will be allowed.");
}
@@ -721,7 +718,7 @@ void CacheManager::ProcessUpdate(
}
bool CacheManager::ApplyUpdate(const policy_table::Table& update_pt) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
sync_primitives::AutoLock auto_lock(cache_lock_);
pt_->policy_table.functional_groupings =
@@ -812,7 +809,7 @@ policy_table::VehicleDataItems CacheManager::CollectCustomVDItems(
void CacheManager::GetHMIAppTypeAfterUpdate(
std::map<std::string, StringArray>& app_hmi_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
sync_primitives::AutoLock auto_lock(cache_lock_);
policy_table::ApplicationPolicies::const_iterator policy_iter_begin =
@@ -876,7 +873,7 @@ std::string CacheManager::currentDateTime() {
bool CacheManager::GetPermissionsForApp(const std::string& device_id,
const std::string& app_id,
FunctionalIdType& group_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
GetAllAppGroups(app_id, group_types[kTypeGeneral]);
GetAllAppGroups(kDefaultId, group_types[kTypeDefault]);
GetAllAppGroups(kPreDataConsentId, group_types[kTypePreDataConsented]);
@@ -896,7 +893,7 @@ bool CacheManager::GetPermissionsForApp(const std::string& device_id,
bool CacheManager::GetDeviceGroupsFromPolicies(
policy_table::Strings& groups,
policy_table::Strings& preconsented_groups) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
sync_primitives::AutoLock auto_lock(cache_lock_);
groups = pt_->policy_table.app_policies_section.device.groups;
@@ -906,7 +903,7 @@ bool CacheManager::GetDeviceGroupsFromPolicies(
}
bool CacheManager::IsDeviceConsentCached(const std::string& device_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
sync_primitives::AutoLock lock(cached_device_permissions_lock_);
CachedDevicePermissions::const_iterator cached_dev_consent_iter;
@@ -916,7 +913,7 @@ bool CacheManager::IsDeviceConsentCached(const std::string& device_id) const {
DeviceConsent CacheManager::GetCachedDeviceConsent(
const std::string& device_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(cached_device_permissions_lock_);
DeviceConsent result = kDeviceHasNoConsent;
CACHE_MANAGER_CHECK(result);
@@ -930,7 +927,7 @@ DeviceConsent CacheManager::GetCachedDeviceConsent(
void CacheManager::SaveDeviceConsentToCache(const std::string& device_id,
const bool is_allowed) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
sync_primitives::AutoLock lock(cached_device_permissions_lock_);
DeviceConsent result = is_allowed ? kDeviceAllowed : kDeviceDisallowed;
@@ -943,7 +940,7 @@ bool CacheManager::GetPermissionsList(StringArray& perm_list) const {
policy_table::Strings groups;
policy_table::Strings preconsented_groups;
if (!GetDeviceGroupsFromPolicies(groups, preconsented_groups)) {
- LOG4CXX_WARN(logger_, "Can't get device groups from policies.");
+ SDL_LOG_WARN("Can't get device groups from policies.");
return false;
}
@@ -955,8 +952,8 @@ bool CacheManager::GetPermissionsList(StringArray& perm_list) const {
bool CacheManager::HasDeviceSpecifiedConsent(const std::string& device_id,
const bool is_allowed) const {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Device :" << device_id);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Device :" << device_id);
const DeviceConsent current_consent = GetDeviceConsent(device_id);
const bool is_current_device_allowed =
DeviceConsent::kDeviceAllowed == current_consent ? true : false;
@@ -966,15 +963,14 @@ bool CacheManager::HasDeviceSpecifiedConsent(const std::string& device_id,
return false;
}
const std::string consent = is_allowed ? "allowed" : "disallowed";
- LOG4CXX_INFO(
- logger_,
- "DeviceGetDeviceGroupsFromPolicies is already " << consent << ".");
+ SDL_LOG_INFO("DeviceGetDeviceGroupsFromPolicies is already " << consent
+ << ".");
return true;
}
void CacheManager::SetDeviceConsent(const std::string& device_id,
const bool is_allowed) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
if (HasDeviceSpecifiedConsent(device_id, is_allowed)) {
return;
@@ -987,7 +983,7 @@ void CacheManager::SetDeviceConsent(const std::string& device_id,
StringArray list_of_permissions;
if (!GetPermissionsList(list_of_permissions) || list_of_permissions.empty()) {
- LOG4CXX_WARN(logger_, "List of permissions can't be received or empty");
+ SDL_LOG_WARN("List of permissions can't be received or empty");
return;
}
@@ -1003,7 +999,7 @@ void CacheManager::SetDeviceConsent(const std::string& device_id,
if (!SetUserPermissionsForDevice(
device_id, consented_groups, disallowed_groups)) {
- LOG4CXX_WARN(logger_, "Can't set user consent for device");
+ SDL_LOG_WARN("Can't set user consent for device");
return;
}
SaveDeviceConsentToCache(device_id, is_allowed);
@@ -1011,7 +1007,7 @@ void CacheManager::SetDeviceConsent(const std::string& device_id,
DeviceConsent CacheManager::GetDeviceConsent(
const std::string& device_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(kDeviceHasNoConsent);
if (IsDeviceConsentCached(device_id)) {
return GetCachedDeviceConsent(device_id);
@@ -1054,7 +1050,7 @@ DeviceConsent CacheManager::GetDeviceConsent(
bool CacheManager::AddDevice(const std::string& device_id,
const std::string& connection_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
CACHE_MANAGER_CHECK(false);
@@ -1078,14 +1074,14 @@ bool CacheManager::SetDeviceData(const std::string& device_id,
const std::string& carrier,
const uint32_t number_of_ports,
const std::string& connection_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
CACHE_MANAGER_CHECK(false);
if (pt_->policy_table.device_data->end() ==
pt_->policy_table.device_data->find(device_id)) {
- LOG4CXX_ERROR(logger_, "Unable to find mobile device: " << device_id);
+ SDL_LOG_ERROR("Unable to find mobile device: " << device_id);
return false;
}
@@ -1107,7 +1103,7 @@ bool CacheManager::SetUserPermissionsForDevice(
const std::string& device_id,
const StringArray& consented_groups,
const StringArray& disallowed_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
CACHE_MANAGER_CHECK(false);
policy_table::DeviceParams& params =
@@ -1140,7 +1136,7 @@ bool CacheManager::SetUserPermissionsForDevice(
bool CacheManager::ReactOnUserDevConsentForApp(const std::string& app_id,
bool is_device_allowed) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
bool result = true;
if (is_device_allowed) {
@@ -1174,7 +1170,7 @@ void CacheManager::GetGroupNameByHashID(const int32_t group_id,
bool CacheManager::SetUserPermissionsForApp(
const PermissionConsent& permissions, bool* out_app_permissions_changed) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
CACHE_MANAGER_CHECK(false);
std::vector<FunctionalGroupPermission>::const_iterator iter =
@@ -1204,7 +1200,7 @@ bool CacheManager::SetUserPermissionsForApp(
const date_time::TimeDuration tm = date_time::getCurrentTime();
int64_t current_time_msec = date_time::getmSecs(tm);
ucr.consent_last_updated = current_time_msec;
- LOG4CXX_DEBUG(logger_, "Updating consents time " << current_time_msec);
+ SDL_LOG_DEBUG("Updating consents time " << current_time_msec);
}
(*ucr.consent_groups)[group_name] = is_allowed;
@@ -1240,13 +1236,13 @@ void CacheManager::CheckPermissions(const PTString& app_id,
const PTString& hmi_level,
const PTString& rpc,
CheckPermissionResult& result) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
sync_primitives::AutoLock auto_lock(cache_lock_);
if (!IsApplicationRepresented(app_id)) {
- LOG4CXX_ERROR(
- logger_, "Application id " << app_id << " was not found in policy DB.");
+ SDL_LOG_ERROR("Application id " << app_id
+ << " was not found in policy DB.");
return;
}
@@ -1301,16 +1297,14 @@ int CacheManager::IgnitionCyclesBeforeExchange() {
static_cast<int>(
pt_->policy_table.module_config.exchange_after_x_ignition_cycles),
0);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"IgnitionCyclesBeforeExchange limit:" << static_cast<int>(limit));
uint8_t current = 0;
const int last_exch = static_cast<int>(
*pt_->policy_table.module_meta->ignition_cycles_since_last_exchange);
current = std::max(last_exch, 0);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"IgnitionCyclesBeforeExchange current:" << static_cast<int>(current));
return std::max(limit - current, 0);
@@ -1323,16 +1317,16 @@ int CacheManager::KilometersBeforeExchange(int current) {
std::max(static_cast<int>(
pt_->policy_table.module_config.exchange_after_x_kilometers),
0);
- LOG4CXX_DEBUG(logger_, "KilometersBeforeExchange limit:" << limit);
+ SDL_LOG_DEBUG("KilometersBeforeExchange limit:" << limit);
int last = 0;
const int odo_val = static_cast<int>(
*pt_->policy_table.module_meta->pt_exchanged_at_odometer_x);
last = std::max(odo_val, 0);
- LOG4CXX_DEBUG(logger_, "KilometersBeforeExchange last:" << last);
+ SDL_LOG_DEBUG("KilometersBeforeExchange last:" << last);
const int actual = std::max((current - last), 0);
- LOG4CXX_DEBUG(logger_, "KilometersBeforeExchange actual:" << actual);
+ SDL_LOG_DEBUG("KilometersBeforeExchange actual:" << actual);
return std::max(limit - actual, 0);
}
@@ -1343,18 +1337,15 @@ bool CacheManager::SetCountersPassedForSuccessfulUpdate(
switch (counter) {
case KILOMETERS:
*pt_->policy_table.module_meta->pt_exchanged_at_odometer_x = value;
- LOG4CXX_DEBUG(logger_,
- "SetCountersPassedForSuccessfulUpdate km:" << value);
+ SDL_LOG_DEBUG("SetCountersPassedForSuccessfulUpdate km:" << value);
break;
case DAYS_AFTER_EPOCH:
*pt_->policy_table.module_meta->pt_exchanged_x_days_after_epoch = value;
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"SetCountersPassedForSuccessfulUpdate days after epoch:" << value);
break;
default:
- LOG4CXX_ERROR(logger_,
- "Unknown counter was requested to set: " << counter);
+ SDL_LOG_ERROR("Unknown counter was requested to set: " << counter);
return false;
}
@@ -1363,7 +1354,7 @@ bool CacheManager::SetCountersPassedForSuccessfulUpdate(
}
int CacheManager::DaysBeforeExchange(uint16_t current) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(0);
sync_primitives::AutoLock auto_lock(cache_lock_);
@@ -1375,14 +1366,13 @@ int CacheManager::DaysBeforeExchange(uint16_t current) {
}
const uint8_t limit = pt_->policy_table.module_config.exchange_after_x_days;
- LOG4CXX_DEBUG(logger_,
- "Exchange after: " << static_cast<int>(limit) << " days");
+ SDL_LOG_DEBUG("Exchange after: " << static_cast<int>(limit) << " days");
- LOG4CXX_DEBUG(logger_, "Epoch since last update: " << *days_after_epoch);
+ SDL_LOG_DEBUG("Epoch since last update: " << *days_after_epoch);
const uint16_t actual =
std::max(static_cast<uint16_t>(current - *days_after_epoch), uint16_t(0));
- LOG4CXX_DEBUG(logger_, "The days since last update: " << actual);
+ SDL_LOG_DEBUG("The days since last update: " << actual);
return std::max(limit - actual, 0);
}
@@ -1394,7 +1384,7 @@ void CacheManager::IncrementIgnitionCycles() {
*pt_->policy_table.module_meta->ignition_cycles_since_last_exchange);
(*pt_->policy_table.module_meta->ignition_cycles_since_last_exchange) =
ign_val + 1;
- LOG4CXX_DEBUG(logger_, "IncrementIgnitionCycles ignitions:" << ign_val);
+ SDL_LOG_DEBUG("IncrementIgnitionCycles ignitions:" << ign_val);
Backup();
}
@@ -1616,7 +1606,7 @@ void CacheManager::SetHybridAppPreference(
void CacheManager::GetAppServiceParameters(
const std::string& policy_app_id,
policy_table::AppServiceParameters* app_service_parameters) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const policy_table::ApplicationPolicies& policies =
pt_->policy_table.app_policies_section.apps;
policy_table::ApplicationPolicies::const_iterator policy_iter =
@@ -1659,7 +1649,7 @@ const boost::optional<bool> CacheManager::LockScreenDismissalEnabledState()
const boost::optional<std::string>
CacheManager::LockScreenDismissalWarningMessage(
const std::string& language) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
boost::optional<std::string> empty;
CACHE_MANAGER_CHECK(empty);
@@ -1682,7 +1672,7 @@ std::vector<UserFriendlyMessage> CacheManager::GetUserFriendlyMsg(
const std::vector<std::string>& msg_codes,
const std::string& language,
const std::string& active_hmi_language) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<UserFriendlyMessage> result;
CACHE_MANAGER_CHECK(result);
@@ -1699,25 +1689,24 @@ std::vector<UserFriendlyMessage> CacheManager::GetUserFriendlyMsg(
FindLanguage(msg_languages, language);
if (!message_string.is_valid()) {
- LOG4CXX_WARN(logger_,
- "Language "
- << language
- << " haven't been found for message code: " << *it);
+ SDL_LOG_WARN("Language "
+ << language
+ << " haven't been found for message code: " << *it);
policy_table::MessageString active_hmi_language_message_string =
FindLanguage(msg_languages, active_hmi_language);
if (!active_hmi_language_message_string.is_valid()) {
- LOG4CXX_WARN(logger_,
- "Active hmi language "
- << active_hmi_language
- << " haven't been found for message code: " << *it);
+ SDL_LOG_WARN("Active hmi language "
+ << active_hmi_language
+ << " haven't been found for message code: " << *it);
policy_table::MessageString fallback_message_string =
FindLanguage(msg_languages, "en-us");
if (!fallback_message_string.is_valid()) {
- LOG4CXX_ERROR(logger_,
- "No fallback language found for message code: " << *it);
+ SDL_LOG_ERROR("No fallback language found for message code: " << *it);
continue;
}
+ // FIXME (VSemenyuk): message_string will always be overwritten by
+ // active_hmi_language_message_string
message_string = fallback_message_string;
}
message_string = active_hmi_language_message_string;
@@ -1755,10 +1744,10 @@ void CacheManager::GetUpdateUrls(const uint32_t service_type,
void CacheManager::GetUpdateUrls(const std::string& service_type,
EndpointUrls& out_end_points) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
- LOG4CXX_DEBUG(logger_, "Search service value is: " << service_type);
+ SDL_LOG_DEBUG("Search service value is: " << service_type);
sync_primitives::AutoLock auto_lock(cache_lock_);
policy_table::ServiceEndpoints::const_iterator iter =
@@ -1797,15 +1786,19 @@ std::string CacheManager::GetIconUrl(const std::string& policy_app_id) const {
}
rpc::policy_table_interface_base::NumberOfNotificationsType
-CacheManager::GetNotificationsNumber(const std::string& priority) {
+CacheManager::GetNotificationsNumber(const std::string& priority,
+ const bool is_subtle) {
CACHE_MANAGER_CHECK(0);
- typedef rpc::policy_table_interface_base::NumberOfNotificationsPerMinute NNPM;
sync_primitives::AutoLock auto_lock(cache_lock_);
- const NNPM& nnpm =
- pt_->policy_table.module_config.notifications_per_minute_by_priority;
+ const auto& module_config = pt_->policy_table.module_config;
+ const auto& nnpm =
+ is_subtle && module_config.subtle_notifications_per_minute_by_priority
+ .is_initialized()
+ ? *module_config.subtle_notifications_per_minute_by_priority
+ : module_config.notifications_per_minute_by_priority;
- NNPM::const_iterator priority_iter = nnpm.find(priority);
+ auto priority_iter = nnpm.find(priority);
const uint32_t result =
(nnpm.end() != priority_iter ? (*priority_iter).second : 0);
@@ -1837,10 +1830,6 @@ bool CacheManager::GetPriority(const std::string& policy_app_id,
void CacheManager::CheckSnapshotInitialization() {
CACHE_MANAGER_CHECK_VOID();
- if (!snapshot_) {
- LOG4CXX_ERROR(logger_, "Snapshot pointer is not initialized");
- return;
- }
*(snapshot_->policy_table.module_config.preloaded_pt) = false;
@@ -1956,15 +1945,14 @@ 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_);
+ SDL_LOG_AUTO_TRACE();
if (items_before.empty()) {
- LOG4CXX_DEBUG(logger_, "No custom VD items found in policy");
+ SDL_LOG_DEBUG("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");
+ SDL_LOG_DEBUG("All custom VD items were removed after policy update");
return items_before;
}
@@ -1982,19 +1970,18 @@ policy_table::VehicleDataItems CacheManager::CalculateCustomVdItemsDiff(
}
}
- LOG4CXX_DEBUG(logger_,
- "Found " << removed_items.size() << " removed VD items");
+ SDL_LOG_DEBUG("Found " << removed_items.size() << " removed VD items");
return removed_items;
}
void CacheManager::SetRemovedCustomVdItems(
const policy_table::VehicleDataItems& removed_items) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
removed_custom_vd_items_ = removed_items;
}
void CacheManager::PersistData() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (backup_.use_count() != 0) {
if (pt_.use_count() != 0) {
// Comma expression is used to hold the lock only during the constructor
@@ -2054,7 +2041,7 @@ void CacheManager::PersistData() {
#ifdef ENABLE_LOG
policy_table::DeviceData& device_data =
*copy_pt.policy_table.device_data;
- LOG4CXX_DEBUG(logger_, "Device_data size is: " << device_data.size());
+ SDL_LOG_DEBUG("Device_data size is: " << device_data.size());
#endif // ENABLE_LOG
for (; it_device != it_end_device; ++it_device) {
if (is_unpaired_.end() != is_unpaired_.find(it_device->first)) {
@@ -2063,7 +2050,7 @@ void CacheManager::PersistData() {
ex_backup_->SetUnpairedDevice(it_device->first, false);
}
}
- LOG4CXX_DEBUG(logger_, "Device_data size is: " << device_data.size());
+ SDL_LOG_DEBUG("Device_data size is: " << device_data.size());
}
backup_->WriteDb();
}
@@ -2071,14 +2058,14 @@ void CacheManager::PersistData() {
}
void CacheManager::ResetCalculatedPermissions() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(calculated_permissions_lock_);
calculated_permissions_.clear();
}
void CacheManager::ResetCalculatedPermissionsForDevice(
const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(calculated_permissions_lock_);
calculated_permissions_.erase(device_id);
}
@@ -2086,9 +2073,8 @@ void CacheManager::ResetCalculatedPermissionsForDevice(
void CacheManager::AddCalculatedPermissions(const std::string& device_id,
const std::string& policy_app_id,
const Permissions& permissions) {
- LOG4CXX_DEBUG(logger_,
- "AddCalculatedPermissions for device: "
- << device_id << " and app: " << policy_app_id);
+ SDL_LOG_DEBUG("AddCalculatedPermissions for device: "
+ << device_id << " and app: " << policy_app_id);
sync_primitives::AutoLock lock(calculated_permissions_lock_);
calculated_permissions_[device_id][policy_app_id] = permissions;
}
@@ -2096,9 +2082,8 @@ void CacheManager::AddCalculatedPermissions(const std::string& device_id,
bool CacheManager::IsPermissionsCalculated(const std::string& device_id,
const std::string& policy_app_id,
Permissions& permission) {
- LOG4CXX_DEBUG(logger_,
- "IsPermissionsCalculated for device: "
- << device_id << " and app: " << policy_app_id);
+ SDL_LOG_DEBUG("IsPermissionsCalculated for device: "
+ << device_id << " and app: " << policy_app_id);
sync_primitives::AutoLock lock(calculated_permissions_lock_);
CalculatedPermissions::const_iterator it =
calculated_permissions_.find(device_id);
@@ -2141,7 +2126,7 @@ std::shared_ptr<policy_table::Table> CacheManager::GenerateSnapshot() {
bool CacheManager::GetInitialAppData(const std::string& app_id,
StringArray& nicknames,
StringArray& app_hmi_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
sync_primitives::AutoLock auto_lock(cache_lock_);
policy_table::ApplicationPolicies::const_iterator policy_iter =
@@ -2164,7 +2149,7 @@ bool CacheManager::GetInitialAppData(const std::string& app_id,
bool CacheManager::GetFunctionalGroupings(
policy_table::FunctionalGroupings& groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
sync_primitives::AutoLock auto_lock(cache_lock_);
const policy_table::FunctionalGroupings& f_groupings =
@@ -2176,9 +2161,9 @@ bool CacheManager::GetFunctionalGroupings(
int CacheManager::CountUnconsentedGroups(const std::string& policy_app_id,
const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
- LOG4CXX_DEBUG(logger_, "Application id: " << policy_app_id);
+ SDL_LOG_DEBUG("Application id: " << policy_app_id);
int result = 0;
if (kDeviceId != policy_app_id && !IsApplicationRepresented(policy_app_id)) {
return 0;
@@ -2196,9 +2181,9 @@ int CacheManager::CountUnconsentedGroups(const std::string& policy_app_id,
pt_->policy_table.app_policies_section;
policy_table::Strings::iterator app_groups;
- policy_table::Strings::iterator app_groups_end = app_groups;
+ policy_table::Strings::iterator app_groups_end;
policy_table::Strings::iterator app_pre_groups;
- policy_table::Strings::iterator app_pre_groups_end = app_pre_groups;
+ policy_table::Strings::iterator app_pre_groups_end;
if (kDeviceId == policy_app_id) {
app_groups = app_policies_section.device.groups.begin();
@@ -2275,6 +2260,12 @@ int CacheManager::CountUnconsentedGroups(const std::string& policy_app_id,
return result;
}
+void CacheManager::SetPreloadedPtFlag(const bool is_preloaded) {
+ SDL_LOG_AUTO_TRACE();
+ *pt_->policy_table.module_config.preloaded_pt = is_preloaded;
+ Backup();
+}
+
bool CacheManager::SetMetaInfo(const std::string& ccpu_version,
const std::string& wers_country_code,
const std::string& language) {
@@ -2293,13 +2284,19 @@ bool CacheManager::SetMetaInfo(const std::string& ccpu_version,
return true;
}
+std::string CacheManager::GetCCPUVersionFromPT() const {
+ SDL_LOG_AUTO_TRACE();
+ rpc::Optional<policy_table::ModuleMeta>& module_meta =
+ pt_->policy_table.module_meta;
+ return *(module_meta->ccpu_version);
+}
+
bool CacheManager::IsMetaInfoPresent() const {
CACHE_MANAGER_CHECK(false);
- bool result = true;
sync_primitives::AutoLock lock(cache_lock_);
- result = NULL != pt_->policy_table.module_meta->ccpu_version &&
- NULL != pt_->policy_table.module_meta->wers_country_code &&
- NULL != pt_->policy_table.module_meta->language;
+ bool result = NULL != pt_->policy_table.module_meta->ccpu_version &&
+ NULL != pt_->policy_table.module_meta->wers_country_code &&
+ NULL != pt_->policy_table.module_meta->language;
return result;
}
@@ -2312,7 +2309,7 @@ bool CacheManager::SetSystemLanguage(const std::string& language) {
}
bool CacheManager::GetFunctionalGroupNames(FunctionalGroupNames& names) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
sync_primitives::AutoLock auto_lock(cache_lock_);
rpc::policy_table_interface_base::FunctionalGroupings::iterator iter =
@@ -2337,28 +2334,26 @@ bool CacheManager::CleanupUnpairedDevices() {
sync_primitives::AutoLock lock_unpaired(unpaired_lock_);
UnpairedDevices::iterator iter = is_unpaired_.begin();
UnpairedDevices::const_iterator iter_end = is_unpaired_.end();
- LOG4CXX_DEBUG(logger_, "Is_unpaired size is: " << is_unpaired_.size());
+ SDL_LOG_DEBUG("Is_unpaired size is: " << is_unpaired_.size());
for (; iter != iter_end; ++iter) {
// Delete device
if (!pt_->policy_table.device_data.is_initialized()) {
- LOG4CXX_ERROR(logger_, "Device_data section is not initialized.");
+ SDL_LOG_ERROR("Device_data section is not initialized.");
return false;
}
policy_table::DeviceData& device_data = *pt_->policy_table.device_data;
policy_table::DeviceData::iterator it_device = device_data.find(*iter);
if (device_data.end() == it_device) {
- LOG4CXX_INFO(logger_,
- "No device id "
- << *iter << " had been found in device_data section.");
+ SDL_LOG_INFO("No device id "
+ << *iter << " had been found in device_data section.");
return false;
}
- LOG4CXX_DEBUG(logger_, "Device_data size is: " << device_data.size());
+ SDL_LOG_DEBUG("Device_data size is: " << device_data.size());
device_data.erase(it_device);
- LOG4CXX_INFO(
- logger_,
- "Device id " << *iter << " had been deleted from device_data section.");
- LOG4CXX_DEBUG(logger_, "Device_data size is: " << device_data.size());
+ SDL_LOG_INFO("Device id " << *iter
+ << " had been deleted from device_data section.");
+ SDL_LOG_DEBUG("Device_data size is: " << device_data.size());
}
is_unpaired_.clear();
Backup();
@@ -2379,7 +2374,7 @@ void CacheManager::Increment(usage_statistics::GlobalCounterId type) {
++(*pt_->policy_table.usage_and_error_counts->count_of_sync_reboots);
break;
default:
- LOG4CXX_WARN(logger_, "Type global counter is unknown");
+ SDL_LOG_WARN("Type global counter is unknown");
return;
}
Backup();
@@ -2427,7 +2422,7 @@ void CacheManager::Increment(const std::string& app_id,
.count_of_tls_errors;
break;
default:
- LOG4CXX_WARN(logger_, "Type app counter is unknown");
+ SDL_LOG_WARN("Type app counter is unknown");
return;
}
Backup();
@@ -2448,7 +2443,7 @@ void CacheManager::Set(const std::string& app_id,
.app_registration_language_vui = value;
break;
default:
- LOG4CXX_WARN(logger_, "Type app info is unknown");
+ SDL_LOG_WARN("Type app info is unknown");
return;
}
Backup();
@@ -2478,7 +2473,7 @@ void CacheManager::Add(const std::string& app_id,
.minutes_in_hmi_none += minutes;
break;
default:
- LOG4CXX_WARN(logger_, "Type app stopwatch is unknown");
+ SDL_LOG_WARN("Type app stopwatch is unknown");
return;
}
Backup();
@@ -2541,8 +2536,7 @@ bool CacheManager::SetPredataPolicy(const std::string& app_id) {
pt_->policy_table.app_policies_section.apps.find(kPreDataConsentId);
if (pt_->policy_table.app_policies_section.apps.end() == iter) {
- LOG4CXX_ERROR(logger_,
- "Could not set " << kPreDataConsentId
+ SDL_LOG_ERROR("Could not set " << kPreDataConsentId
<< " permissions for app " << app_id);
return false;
}
@@ -2572,20 +2566,18 @@ bool CacheManager::SetUnpairedDevice(const std::string& device_id,
const bool result = pt_->policy_table.device_data->end() !=
pt_->policy_table.device_data->find(device_id);
if (!result) {
- LOG4CXX_DEBUG(logger_,
- "Couldn't set unpaired flag for device id "
- << device_id << " , since it wasn't found.");
+ SDL_LOG_DEBUG("Couldn't set unpaired flag for device id "
+ << device_id << " , since it wasn't found.");
return false;
}
sync_primitives::AutoLock lock(unpaired_lock_);
if (unpaired) {
is_unpaired_.insert(device_id);
- LOG4CXX_DEBUG(logger_, "Unpaired flag was set for device id " << device_id);
+ SDL_LOG_DEBUG("Unpaired flag was set for device id " << device_id);
} else {
is_unpaired_.erase(device_id);
- LOG4CXX_DEBUG(logger_,
- "Unpaired flag was removed for device id " << device_id);
+ SDL_LOG_DEBUG("Unpaired flag was removed for device id " << device_id);
}
return result;
}
@@ -2610,7 +2602,7 @@ bool CacheManager::IsApplicationRepresented(const std::string& app_id) const {
bool CacheManager::Init(const std::string& file_name,
const PolicySettings* settings) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
settings_ = settings;
InitResult init_result = backup_->Init(settings);
ex_backup_ = std::dynamic_pointer_cast<PTExtRepresentation>(backup_);
@@ -2618,7 +2610,7 @@ bool CacheManager::Init(const std::string& file_name,
bool result = true;
switch (init_result) {
case InitResult::EXISTS: {
- LOG4CXX_INFO(logger_, "Policy Table exists, was loaded correctly.");
+ SDL_LOG_INFO("Policy Table exists, was loaded correctly.");
result = LoadFromBackup();
if (result) {
if (!backup_->IsDBVersionActual()) {
@@ -2634,16 +2626,15 @@ bool CacheManager::Init(const std::string& file_name,
}
} break;
case InitResult::SUCCESS: {
- LOG4CXX_INFO(logger_, "Policy Table was inited successfully");
+ SDL_LOG_INFO("Policy Table was inited successfully");
result = LoadFromFile(file_name, *pt_);
std::shared_ptr<policy_table::Table> snapshot = GenerateSnapshot();
result &= snapshot->is_valid();
- LOG4CXX_DEBUG(logger_,
- "Check if snapshot valid: " << std::boolalpha << result);
+ SDL_LOG_DEBUG("Check if snapshot valid: " << std::boolalpha << result);
if (!UnwrapAppPolicies(pt_->policy_table.app_policies_section.apps)) {
- LOG4CXX_ERROR(logger_, "Cannot unwrap application policies");
+ SDL_LOG_ERROR("Cannot unwrap application policies");
}
if (result) {
@@ -2653,14 +2644,13 @@ bool CacheManager::Init(const std::string& file_name,
} else {
rpc::ValidationReport report("policy_table");
snapshot->ReportErrors(&report);
- LOG4CXX_DEBUG(logger_,
- "Validation report: " << rpc::PrettyFormat(report));
+ SDL_LOG_DEBUG("Validation report: " << rpc::PrettyFormat(report));
ex_backup_->RemoveDB();
}
} break;
default: {
result = false;
- LOG4CXX_ERROR(logger_, "Failed to init policy table.");
+ SDL_LOG_ERROR("Failed to init policy table.");
} break;
}
@@ -2712,11 +2702,11 @@ bool CacheManager::LoadFromBackup() {
bool CacheManager::LoadFromFile(const std::string& file_name,
policy_table::Table& table) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Loading policy table from file " << file_name);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Loading policy table from file " << file_name);
BinaryMessage json_string;
if (!file_system::ReadBinaryFile(file_name, json_string)) {
- LOG4CXX_FATAL(logger_, "Failed to read policy table source file.");
+ SDL_LOG_FATAL("Failed to read policy table source file.");
return false;
}
@@ -2725,20 +2715,18 @@ bool CacheManager::LoadFromFile(const std::string& file_name,
std::string json(json_string.begin(), json_string.end());
if (!reader.parse(json, &value)) {
- LOG4CXX_FATAL(logger_, "Preloaded PT is corrupted.");
+ SDL_LOG_FATAL("Preloaded PT is corrupted.");
return false;
}
- LOG4CXX_DEBUG(logger_,
- "Start verification of policy table loaded from file.");
+ SDL_LOG_DEBUG("Start verification of policy table loaded from file.");
sync_primitives::AutoLock locker(cache_lock_);
table = policy_table::Table(&value);
#ifdef ENABLE_LOG
Json::StreamWriterBuilder writer_builder;
- LOG4CXX_DEBUG(logger_,
- "Policy table content loaded:" << Json::writeString(
+ SDL_LOG_DEBUG("Policy table content loaded:" << Json::writeString(
writer_builder, table.ToJsonValue()));
#endif // ENABLE_LOG
@@ -2747,21 +2735,20 @@ bool CacheManager::LoadFromFile(const std::string& file_name,
if (!table.is_valid()) {
rpc::ValidationReport report("policy_table");
table.ReportErrors(&report);
- LOG4CXX_FATAL(logger_,
- "Parsed table is not valid " << rpc::PrettyFormat(report));
+ SDL_LOG_FATAL("Parsed table is not valid " << rpc::PrettyFormat(report));
return false;
}
return true;
}
bool CacheManager::ResetPT(const std::string& file_name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
is_unpaired_.clear();
backuper_->WaitForBackupIsDone();
if (!backup_->RefreshDB()) {
- LOG4CXX_ERROR(logger_, "Can't re-create policy database. Reset failed.");
+ SDL_LOG_ERROR("Can't re-create policy database. Reset failed.");
return false;
}
@@ -2777,25 +2764,22 @@ bool CacheManager::ResetPT(const std::string& file_name) {
policy::RequestType::State CacheManager::GetAppRequestTypesState(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
policy_table::ApplicationPolicies::const_iterator app_policies_iter =
pt_->policy_table.app_policies_section.apps.find(policy_app_id);
if (pt_->policy_table.app_policies_section.apps.end() == app_policies_iter) {
- LOG4CXX_DEBUG(logger_,
- "Can't find request types for app_id " << policy_app_id);
+ SDL_LOG_DEBUG("Can't find request types for app_id " << policy_app_id);
return policy::RequestType::State::UNAVAILABLE;
}
const policy_table::RequestTypes& request_types =
*app_policies_iter->second.RequestType;
if (!request_types.is_initialized()) {
- LOG4CXX_TRACE(logger_,
- "Request types for " << policy_app_id << " are OMITTED");
+ SDL_LOG_TRACE("Request types for " << policy_app_id << " are OMITTED");
return RequestType::State::OMITTED;
}
if (request_types.empty()) {
- LOG4CXX_TRACE(logger_,
- "Request types for " << policy_app_id << " are EMPTY");
+ SDL_LOG_TRACE("Request types for " << policy_app_id << " are EMPTY");
return policy::RequestType::State::EMPTY;
}
return policy::RequestType::State::AVAILABLE;
@@ -2804,19 +2788,17 @@ policy::RequestType::State CacheManager::GetAppRequestTypesState(
void CacheManager::GetAppRequestTypes(
const std::string& policy_app_id,
std::vector<std::string>& request_types) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
sync_primitives::AutoLock auto_lock(cache_lock_);
if (kDeviceId == policy_app_id) {
- LOG4CXX_DEBUG(logger_,
- "Request types not applicable for app_id " << kDeviceId);
+ SDL_LOG_DEBUG("Request types not applicable for app_id " << kDeviceId);
return;
}
policy_table::ApplicationPolicies::iterator policy_iter =
pt_->policy_table.app_policies_section.apps.find(policy_app_id);
if (pt_->policy_table.app_policies_section.apps.end() == policy_iter) {
- LOG4CXX_DEBUG(logger_,
- "Can't find request types for app_id " << policy_app_id);
+ SDL_LOG_DEBUG("Can't find request types for app_id " << policy_app_id);
return;
}
if (policy_iter->second.RequestType.is_initialized()) {
@@ -2829,25 +2811,22 @@ void CacheManager::GetAppRequestTypes(
RequestSubType::State CacheManager::GetAppRequestSubTypesState(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
policy_table::ApplicationPolicies::const_iterator app_policies_iter =
pt_->policy_table.app_policies_section.apps.find(policy_app_id);
if (pt_->policy_table.app_policies_section.apps.end() == app_policies_iter) {
- LOG4CXX_DEBUG(logger_,
- "Can't find request subtypes for app_id " << policy_app_id);
+ SDL_LOG_DEBUG("Can't find request subtypes for app_id " << policy_app_id);
return RequestSubType::State::UNAVAILABLE;
}
const policy_table::RequestSubTypes& request_subtypes =
*app_policies_iter->second.RequestSubType;
if (!request_subtypes.is_initialized()) {
- LOG4CXX_TRACE(logger_,
- "Request subtypes for " << policy_app_id << " are OMITTED");
+ SDL_LOG_TRACE("Request subtypes for " << policy_app_id << " are OMITTED");
return RequestSubType::State::OMITTED;
}
if (request_subtypes.empty()) {
- LOG4CXX_TRACE(logger_,
- "Request subtypes for " << policy_app_id << " are EMPTY");
+ SDL_LOG_TRACE("Request subtypes for " << policy_app_id << " are EMPTY");
return RequestSubType::State::EMPTY;
}
return RequestSubType::State::AVAILABLE;
@@ -2856,19 +2835,17 @@ RequestSubType::State CacheManager::GetAppRequestSubTypesState(
void CacheManager::GetAppRequestSubTypes(
const std::string& policy_app_id,
std::vector<std::string>& request_subtypes) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
if (kDeviceId == policy_app_id) {
- LOG4CXX_DEBUG(logger_,
- "Request subtypes not applicable for app_id " << kDeviceId);
+ SDL_LOG_DEBUG("Request subtypes not applicable for app_id " << kDeviceId);
return;
}
sync_primitives::AutoLock auto_lock(cache_lock_);
policy_table::ApplicationPolicies::iterator policy_iter =
pt_->policy_table.app_policies_section.apps.find(policy_app_id);
if (pt_->policy_table.app_policies_section.apps.end() == policy_iter) {
- LOG4CXX_DEBUG(logger_,
- "Can't find request subtypes for app_id " << policy_app_id);
+ SDL_LOG_DEBUG("Can't find request subtypes for app_id " << policy_app_id);
return;
}
@@ -2879,7 +2856,7 @@ void CacheManager::GetAppRequestSubTypes(
}
const MetaInfo CacheManager::GetMetaInfo() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
MetaInfo meta_info;
meta_info.ccpu_version = *pt_->policy_table.module_meta->ccpu_version;
@@ -2899,7 +2876,7 @@ std::string CacheManager::GetCertificate() const {
}
void CacheManager::SetDecryptedCertificate(const std::string& certificate) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
sync_primitives::AutoLock auto_lock(cache_lock_);
*pt_->policy_table.module_config.certificate = certificate;
@@ -2908,10 +2885,10 @@ void CacheManager::SetDecryptedCertificate(const std::string& certificate) {
bool CacheManager::SetExternalConsentStatus(
const ExternalConsentStatus& status) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
if (status.empty()) {
- LOG4CXX_INFO(logger_, "No ExternalConsent status update.");
+ SDL_LOG_INFO("No ExternalConsent status update.");
return false;
}
@@ -2919,13 +2896,13 @@ bool CacheManager::SetExternalConsentStatus(
}
ExternalConsentStatus CacheManager::GetExternalConsentStatus() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
return ex_backup_->GetExternalConsentStatus();
}
ExternalConsentStatus CacheManager::GetExternalConsentEntities() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
ExternalConsentStatus items;
for (policy_table::FunctionalGroupings::const_iterator it =
@@ -2954,7 +2931,7 @@ ExternalConsentStatus CacheManager::GetExternalConsentEntities() {
GroupsByExternalConsentStatus CacheManager::GetGroupsWithSameEntities(
const ExternalConsentStatus& status) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(policy::GroupsByExternalConsentStatus());
sync_primitives::AutoLock auto_lock(cache_lock_);
GroupsByExternalConsentStatus groups_by_external_consent;
@@ -2968,7 +2945,7 @@ GroupsByExternalConsentStatus CacheManager::GetGroupsWithSameEntities(
}
std::map<std::string, std::string> CacheManager::GetKnownLinksFromPT() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK((std::map<std::string, std::string>()));
std::map<std::string, std::string> links;
sync_primitives::AutoLock auto_lock(cache_lock_);
@@ -3009,7 +2986,7 @@ bool CacheManager::ConsentsSame(
void CacheManager::SetExternalConsentForApp(
const PermissionConsent& permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
sync_primitives::AutoLock auto_lock(cache_lock_);
policy_table::ConsentGroups& external_consent_groups =
@@ -3018,7 +2995,7 @@ void CacheManager::SetExternalConsentForApp(
.external_consent_status_groups;
if (ConsentsSame(external_consent_groups, permissions)) {
- LOG4CXX_DEBUG(logger_, "External consents already have same values.");
+ SDL_LOG_DEBUG("External consents already have same values.");
return;
}
@@ -3038,16 +3015,16 @@ void CacheManager::SetExternalConsentForApp(
const date_time::TimeDuration tm = date_time::getCurrentTime();
int64_t current_time_msec = date_time::getmSecs(tm);
app_consent_records.ext_consent_last_updated = current_time_msec;
- LOG4CXX_DEBUG(logger_, "Updating consents time " << current_time_msec);
+ SDL_LOG_DEBUG("Updating consents time " << current_time_msec);
Backup();
}
bool CacheManager::MergePreloadPT(const std::string& file_name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
policy_table::Table table;
if (!LoadFromFile(file_name, table)) {
- LOG4CXX_DEBUG(logger_, "Unable to load preloaded PT.");
+ SDL_LOG_DEBUG("Unable to load preloaded PT.");
return false;
}
@@ -3069,7 +3046,7 @@ bool CacheManager::MergePreloadPT(const std::string& file_name) {
void CacheManager::MergeMC(const policy_table::PolicyTable& new_pt,
policy_table::PolicyTable& pt) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
policy_table::ModuleConfig copy(pt.module_config);
pt.module_config = new_pt.module_config;
@@ -3080,19 +3057,19 @@ void CacheManager::MergeMC(const policy_table::PolicyTable& new_pt,
void CacheManager::MergeFG(const policy_table::PolicyTable& new_pt,
policy_table::PolicyTable& pt) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
policy_table::FunctionalGroupings::const_iterator it =
new_pt.functional_groupings.begin();
for (; it != new_pt.functional_groupings.end(); ++it) {
- LOG4CXX_DEBUG(logger_, "Merge functional group: " << it->first);
+ SDL_LOG_DEBUG("Merge functional group: " << it->first);
pt.functional_groupings[it->first] = it->second;
}
}
void CacheManager::MergeAP(const policy_table::PolicyTable& new_pt,
policy_table::PolicyTable& pt) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
pt.app_policies_section.device =
const_cast<policy_table::PolicyTable&>(new_pt)
.app_policies_section.device;
@@ -3108,7 +3085,7 @@ void CacheManager::MergeAP(const policy_table::PolicyTable& new_pt,
void CacheManager::MergeCFM(const policy_table::PolicyTable& new_pt,
policy_table::PolicyTable& pt) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (new_pt.consumer_friendly_messages.is_initialized()) {
if (!pt.consumer_friendly_messages.is_initialized()) {
pt.consumer_friendly_messages = new_pt.consumer_friendly_messages;
@@ -3119,9 +3096,9 @@ void CacheManager::MergeCFM(const policy_table::PolicyTable& new_pt,
pt.consumer_friendly_messages->version =
new_pt.consumer_friendly_messages->version;
for (; it != new_pt.consumer_friendly_messages->messages->end(); ++it) {
- LOG4CXX_DEBUG(logger_, "Merge CFM: " << it->first);
+ SDL_LOG_DEBUG("Merge CFM: " << it->first);
if (!(pt.consumer_friendly_messages->messages.is_initialized())) {
- LOG4CXX_DEBUG(logger_, "CFM not initialized.");
+ SDL_LOG_DEBUG("CFM not initialized.");
}
(*pt.consumer_friendly_messages->messages)[it->first] = it->second;
}
@@ -3131,15 +3108,15 @@ void CacheManager::MergeCFM(const policy_table::PolicyTable& new_pt,
void CacheManager::MergeVD(const policy_table::PolicyTable& new_pt,
policy_table::PolicyTable& pt) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
pt.vehicle_data.assign_if_valid(new_pt.vehicle_data);
}
void CacheManager::InitBackupThread() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
backuper_ = new BackgroundBackuper(this);
backup_thread_ = threads::CreateThread("Backup thread", backuper_);
- backup_thread_->start();
+ backup_thread_->Start();
}
const PolicySettings& CacheManager::get_settings() const {
@@ -3150,7 +3127,7 @@ const PolicySettings& CacheManager::get_settings() const {
void CacheManager::OnDeviceSwitching(const std::string& device_id_from,
const std::string& device_id_to) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
auto device_data = *(pt_->policy_table.device_data);
@@ -3163,12 +3140,11 @@ void CacheManager::OnDeviceSwitching(const std::string& device_id_from,
auto& consents_from = *(from->second.user_consent_records);
auto& consents_to = *(to->second.user_consent_records);
- LOG4CXX_DEBUG(logger_,
- "Merging user consents from device: "
- << device_id_from << " to device: " << device_id_to);
+ SDL_LOG_DEBUG("Merging user consents from device: "
+ << device_id_from << " to device: " << device_id_to);
for (auto f = consents_from.begin(); f != consents_from.end(); ++f) {
const auto app_id = f->first;
- LOG4CXX_DEBUG(logger_, "Updating permissions for key: " << app_id);
+ SDL_LOG_DEBUG("Updating permissions for key: " << app_id);
consents_to[app_id] = f->second;
}
}
@@ -3179,26 +3155,26 @@ CacheManager::BackgroundBackuper::BackgroundBackuper(
, backup_is_in_progress_(false)
, stop_flag_(false)
, new_data_available_(false) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
CacheManager::BackgroundBackuper::~BackgroundBackuper() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
void CacheManager::BackgroundBackuper::InternalBackup() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(cache_manager_);
while (new_data_available_) {
new_data_available_ = false;
- LOG4CXX_DEBUG(logger_, "DoBackup");
+ SDL_LOG_DEBUG("DoBackup");
cache_manager_->PersistData();
}
}
void CacheManager::BackgroundBackuper::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(need_backup_lock_);
while (!stop_flag_) {
backup_is_in_progress_.exchange(true);
@@ -3208,7 +3184,7 @@ void CacheManager::BackgroundBackuper::threadMain() {
}
{
- LOG4CXX_DEBUG(logger_, "Backup is done");
+ SDL_LOG_DEBUG("Backup is done");
sync_primitives::AutoLock auto_lock(backup_done_lock_);
backup_is_in_progress_.exchange(false);
backup_done_.Broadcast();
@@ -3218,27 +3194,27 @@ void CacheManager::BackgroundBackuper::threadMain() {
continue;
}
- LOG4CXX_DEBUG(logger_, "Wait for a next backup");
+ SDL_LOG_DEBUG("Wait for a next backup");
backup_notifier_.Wait(need_backup_lock_);
}
}
void CacheManager::BackgroundBackuper::exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(need_backup_lock_);
stop_flag_ = true;
backup_notifier_.NotifyOne();
}
void CacheManager::BackgroundBackuper::DoBackup() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(need_backup_lock_);
new_data_available_ = true;
backup_notifier_.NotifyOne();
}
void CacheManager::BackgroundBackuper::WaitForBackupIsDone() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(backup_done_lock_);
if (backup_is_in_progress_) {
backup_done_.Wait(auto_lock);
@@ -3247,7 +3223,7 @@ void CacheManager::BackgroundBackuper::WaitForBackupIsDone() {
EncryptionRequired CacheManager::GetAppEncryptionRequiredFlag(
const std::string& application) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
return pt_->policy_table.app_policies_section.apps[application]
@@ -3256,14 +3232,14 @@ EncryptionRequired CacheManager::GetAppEncryptionRequiredFlag(
EncryptionRequired CacheManager::GetFunctionalGroupingEncryptionRequiredFlag(
const std::string& functional_group) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
const auto& functional_groupings = pt_->policy_table.functional_groupings;
const auto& grouping_itr = functional_groupings.find(functional_group);
if (grouping_itr == functional_groupings.end()) {
- LOG4CXX_WARN(logger_, "Group " << functional_group << " not found");
+ SDL_LOG_WARN("Group " << functional_group << " not found");
return rpc::Optional<rpc::Boolean>(rpc::Boolean(false));
}
@@ -3273,14 +3249,13 @@ EncryptionRequired CacheManager::GetFunctionalGroupingEncryptionRequiredFlag(
void CacheManager::GetApplicationParams(
const std::string& application_name,
policy_table::ApplicationParams& application_params) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
const auto apps = pt_->policy_table.app_policies_section.apps;
const auto it = apps.find(application_name);
if (apps.end() == it) {
- LOG4CXX_WARN(logger_,
- "Application " << application_name << " was not found");
+ SDL_LOG_WARN("Application " << application_name << " was not found");
return;
}
diff --git a/src/components/policy/policy_external/src/policy_helper.cc b/src/components/policy/policy_external/src/policy_helper.cc
index b8bbb1682c..0dde301d0e 100644
--- a/src/components/policy/policy_external/src/policy_helper.cc
+++ b/src/components/policy/policy_external/src/policy_helper.cc
@@ -44,7 +44,7 @@ namespace custom_str = utils::custom_string;
namespace {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Policy")
+SDL_CREATE_LOG_VARIABLE("Policy")
bool CompareStrings(const StringsValueType& first,
const StringsValueType& second) {
@@ -102,25 +102,6 @@ bool CompareGroupName::operator()(
return !(strcasecmp(gn_.c_str(), gn_compare.c_str()));
}
-bool operator!=(const policy_table::ApplicationParams& first,
- const policy_table::ApplicationParams& second) {
- if (first.groups.size() != second.groups.size()) {
- return true;
- }
- StringsConstItr it_first = first.groups.begin();
- StringsConstItr it_first_end = first.groups.end();
- StringsConstItr it_second = second.groups.begin();
- StringsConstItr it_second_end = second.groups.end();
- for (; it_first != it_first_end; ++it_first) {
- CompareGroupName gp(*it_first);
- StringsConstItr it = std::find_if(it_second, it_second_end, gp);
- if (it_second_end == it) {
- return true;
- }
- }
- return false;
-}
-
CheckAppPolicy::CheckAppPolicy(
PolicyManagerImpl* pm,
const std::shared_ptr<policy_table::Table> update,
@@ -356,7 +337,7 @@ std::vector<FunctionalGroupPermission> policy::CheckAppPolicy::GetRevokedGroups(
FunctionalGroupNames groups_attributes;
if (!pm_->cache_->GetFunctionalGroupNames(groups_attributes)) {
- LOG4CXX_WARN(logger_, "Can't get functional group names");
+ SDL_LOG_WARN("Can't get functional group names");
return std::vector<FunctionalGroupPermission>();
}
@@ -390,7 +371,7 @@ bool CheckAppPolicy::IsKnownAppication(
bool CheckAppPolicy::IsAppRevoked(
const AppPoliciesValueType& app_policy) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Application params are not initialized = application revoked
// i.e. "123":null
return app_policy.second.is_null();
@@ -427,7 +408,7 @@ void CheckAppPolicy::InsertPermission(const std::string& app_id,
auto result = pm_->app_permissions_diff_.insert(
std::make_pair(app_id, permissions_diff));
if (!result.second) {
- LOG4CXX_ERROR(logger_, "App ID: " << app_id << " already exists in map.");
+ SDL_LOG_ERROR("App ID: " << app_id << " already exists in map.");
}
pm_->app_permissions_diff_lock_.Release();
}
@@ -443,8 +424,7 @@ bool CheckAppPolicy::operator()(const AppPoliciesValueType& app_policy) {
AppPermissions permissions_diff(app_id);
if (!IsKnownAppication(app_id)) {
- LOG4CXX_WARN(logger_,
- "Application:" << app_id << " is not present in snapshot.");
+ SDL_LOG_WARN("Application:" << app_id << " is not present in snapshot.");
return true;
}
@@ -469,8 +449,7 @@ bool CheckAppPolicy::operator()(const AppPoliciesValueType& app_policy) {
const bool is_request_type_changed = IsRequestTypeChanged(app_policy);
const bool is_request_subtype_changed = IsRequestSubTypeChanged(app_policy);
if (is_request_type_changed) {
- LOG4CXX_TRACE(logger_,
- "Request types were changed for application: " << app_id);
+ SDL_LOG_TRACE("Request types were changed for application: " << app_id);
SetPendingPermissions(
app_policy, RESULT_REQUEST_TYPE_CHANGED, permissions_diff);
AddResult(app_id, RESULT_REQUEST_TYPE_CHANGED);
@@ -478,8 +457,8 @@ bool CheckAppPolicy::operator()(const AppPoliciesValueType& app_policy) {
(RESULT_NO_CHANGES == result) ? RESULT_REQUEST_TYPE_CHANGED : result;
}
if (is_request_subtype_changed) {
- LOG4CXX_TRACE(
- logger_, "Request subtypes were changed for application: " << app_id);
+ SDL_LOG_TRACE(
+ "Request subtypes were changed for application: " << app_id);
SetPendingPermissions(
app_policy, RESULT_REQUEST_SUBTYPE_CHANGED, permissions_diff);
AddResult(app_id, RESULT_REQUEST_SUBTYPE_CHANGED);
@@ -489,16 +468,14 @@ bool CheckAppPolicy::operator()(const AppPoliciesValueType& app_policy) {
}
if (RESULT_NO_CHANGES == result) {
- LOG4CXX_INFO(
- logger_,
- "Permissions for application:" << app_id << " wasn't changed.");
+ SDL_LOG_INFO("Permissions for application:" << app_id
+ << " wasn't changed.");
AddResult(app_id, result);
return true;
}
- LOG4CXX_INFO(
- logger_,
- "Permissions for application:" << app_id << " have been changed.");
+ SDL_LOG_INFO("Permissions for application:" << app_id
+ << " have been changed.");
if (!IsPredefinedApp(app_policy)) {
SetPendingPermissions(app_policy, result, permissions_diff);
@@ -611,7 +588,6 @@ bool CheckAppPolicy::IsConsentRequired(const std::string& app_id,
return false;
}
- bool is_preconsented = false;
policy_table::Strings::value_type str(group_name);
policy_table::Strings::iterator pre_begin =
update_->policy_table.app_policies_section.apps[app_id]
@@ -622,7 +598,7 @@ bool CheckAppPolicy::IsConsentRequired(const std::string& app_id,
policy_table::Strings::iterator it2 = std::find(pre_begin, pre_end, str);
- is_preconsented = pre_end != it2;
+ bool is_preconsented = pre_end != it2;
return it->second.user_consent_prompt.is_initialized() && !is_preconsented;
}
@@ -677,7 +653,7 @@ bool CheckAppPolicy::IsRequestSubTypeChanged(
bool CheckAppPolicy::IsAppPropertiesProvided(
const AppPoliciesValueType& app_policy) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (app_policy.second.hybrid_app_preference.is_initialized() ||
app_policy.second.endpoint.is_initialized() ||
app_policy.second.enabled.is_initialized() ||
@@ -691,15 +667,14 @@ bool CheckAppPolicy::IsAppPropertiesProvided(
bool CheckAppPolicy::IsAppPropertiesChanged(
const AppPoliciesValueType& app_policy) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!IsAppPropertiesProvided(app_policy)) {
return false;
}
if (!IsKnownAppication(app_policy.first)) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"AppProperties provided for new application: " << app_policy.first);
return true;
}
@@ -710,33 +685,33 @@ bool CheckAppPolicy::IsAppPropertiesChanged(
if (app_policy.second.enabled.is_initialized() &&
app_policy.second.enabled != snapshot_properties.second.enabled) {
- LOG4CXX_DEBUG(logger_, "\"enabled\" was changed");
+ SDL_LOG_DEBUG("\"enabled\" was changed");
return true;
}
if (app_policy.second.endpoint.is_initialized() &&
app_policy.second.endpoint != snapshot_properties.second.endpoint) {
- LOG4CXX_DEBUG(logger_, "\"endpoint\" was changed");
+ SDL_LOG_DEBUG("\"endpoint\" was changed");
return true;
}
if (app_policy.second.hybrid_app_preference.is_initialized() &&
app_policy.second.hybrid_app_preference !=
snapshot_properties.second.hybrid_app_preference) {
- LOG4CXX_DEBUG(logger_, "\"hybrid_app_preference\" was changed");
+ SDL_LOG_DEBUG("\"hybrid_app_preference\" was changed");
return true;
}
if (app_policy.second.auth_token.is_initialized() &&
app_policy.second.auth_token != snapshot_properties.second.auth_token) {
- LOG4CXX_DEBUG(logger_, "\"auth_token\" was changed");
+ SDL_LOG_DEBUG("\"auth_token\" was changed");
return true;
}
if (app_policy.second.cloud_transport_type.is_initialized() &&
app_policy.second.cloud_transport_type !=
snapshot_properties.second.cloud_transport_type) {
- LOG4CXX_DEBUG(logger_, "\"cloud_transport_type\" was changed");
+ SDL_LOG_DEBUG("\"cloud_transport_type\" was changed");
return true;
}
@@ -745,14 +720,14 @@ bool CheckAppPolicy::IsAppPropertiesChanged(
bool CheckAppPolicy::IsEncryptionRequiredFlagChanged(
const AppPoliciesValueType& app_policy) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto get_app_encryption_needed =
[](const std::string& policy_app_id,
policy_table::ApplicationPolicies& policies)
-> rpc::Optional<rpc::Boolean> {
auto it = policies.find(policy_app_id);
if (policies.end() == it) {
- LOG4CXX_WARN(logger_, "App is not present in policies" << policy_app_id);
+ SDL_LOG_WARN("App is not present in policies" << policy_app_id);
return rpc::Optional<rpc::Boolean>(false);
}
return it->second.encryption_required;
@@ -764,7 +739,7 @@ bool CheckAppPolicy::IsEncryptionRequiredFlagChanged(
policy_table::Strings result;
auto it = policies.find(policy_app_id);
if (policies.end() == it) {
- LOG4CXX_WARN(logger_, "App is not present in policies" << policy_app_id);
+ SDL_LOG_WARN("App is not present in policies" << policy_app_id);
return result;
}
auto& groups = it->second.groups;
@@ -772,7 +747,7 @@ bool CheckAppPolicy::IsEncryptionRequiredFlagChanged(
return result;
};
- auto get_app_rpcs = [](const std::string group_name,
+ auto get_app_rpcs = [](const std::string& group_name,
const FunctionalGroupings& groups)
-> rpc::Optional<policy_table::Rpcs> {
auto it = groups.find(group_name);
@@ -957,8 +932,7 @@ void FillNotificationData::UpdateParameters(
// If 'parameters' section is omitted
if (!in_parameters.is_initialized()) {
- if (!does_require_user_consent_ ||
- (does_require_user_consent_ && kAllowedKey == current_key_)) {
+ if (!does_require_user_consent_ || kAllowedKey == current_key_) {
out_parameter.any_parameter_allowed = true;
}
}
@@ -1193,7 +1167,7 @@ void FillFunctionalGroupPermissions(
FunctionalGroupNames& names,
GroupConsent state,
std::vector<FunctionalGroupPermission>& permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
FunctionalGroupIDs::const_iterator it = ids.begin();
FunctionalGroupIDs::const_iterator it_end = ids.end();
for (; it != it_end; ++it) {
@@ -1213,7 +1187,7 @@ bool IsPredefinedApp(const AppPoliciesValueType& app) {
FunctionalGroupIDs ExcludeSame(const FunctionalGroupIDs& from,
const FunctionalGroupIDs& what) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
FunctionalGroupIDs from_copy(from);
FunctionalGroupIDs what_copy(what);
@@ -1235,7 +1209,7 @@ FunctionalGroupIDs ExcludeSame(const FunctionalGroupIDs& from,
FunctionalGroupIDs Merge(const FunctionalGroupIDs& first,
const FunctionalGroupIDs& second) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
FunctionalGroupIDs first_copy(first);
FunctionalGroupIDs second_copy(second);
@@ -1255,33 +1229,11 @@ FunctionalGroupIDs Merge(const FunctionalGroupIDs& first,
return merged;
}
-FunctionalGroupIDs FindSame(const FunctionalGroupIDs& first,
- const FunctionalGroupIDs& second) {
- LOG4CXX_INFO(logger_, "Find same groups");
- FunctionalGroupIDs first_copy(first);
- FunctionalGroupIDs second_copy(second);
-
- std::sort(first_copy.begin(), first_copy.end());
- std::sort(second_copy.begin(), second_copy.end());
-
- FunctionalGroupIDs same;
- std::set_intersection(first_copy.begin(),
- first_copy.end(),
- second_copy.begin(),
- second_copy.end(),
- std::back_inserter(same));
-
- same.resize(
- std::distance(same.begin(), std::unique(same.begin(), same.end())));
-
- return same;
-}
-
bool UnwrapAppPolicies(policy_table::ApplicationPolicies& app_policies) {
policy_table::ApplicationPolicies::iterator it_default =
app_policies.find(kDefaultId);
if (app_policies.end() == it_default) {
- LOG4CXX_ERROR(logger_, "No default application policy found in PTU.");
+ SDL_LOG_ERROR("No default application policy found in PTU.");
return false;
}
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 082d4a37ba..9bcea70803 100644
--- a/src/components/policy/policy_external/src/policy_manager_impl.cc
+++ b/src/components/policy/policy_external/src/policy_manager_impl.cc
@@ -62,7 +62,7 @@ namespace {
struct GroupNamesAppender
: public std::unary_function<void,
const policy::FunctionalGroupPermission&> {
- GroupNamesAppender(policy_table::Strings& names) : names_(names) {}
+ explicit GroupNamesAppender(policy_table::Strings& names) : names_(names) {}
void operator()(const policy::FunctionalGroupPermission& value) {
names_.push_back(value.group_name);
@@ -202,7 +202,7 @@ struct GroupSorter
namespace policy {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Policy")
+SDL_CREATE_LOG_VARIABLE("Policy")
PolicyManagerImpl::PolicyManagerImpl()
: PolicyManager()
@@ -253,15 +253,14 @@ std::shared_ptr<policy_table::Table> PolicyManagerImpl::Parse(
}
void PolicyManagerImpl::CheckTriggers() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const bool exceed_ignition_cycles = ExceededIgnitionCycles();
const bool exceed_days = ExceededDays();
- LOG4CXX_DEBUG(
- logger_,
- "\nDays exceeded: " << std::boolalpha << exceed_days
- << "\nIgnition cycles exceeded: " << std::boolalpha
- << exceed_ignition_cycles);
+ SDL_LOG_DEBUG("\nDays exceeded: " << std::boolalpha << exceed_days
+ << "\nIgnition cycles exceeded: "
+ << std::boolalpha
+ << exceed_ignition_cycles);
if (exceed_ignition_cycles || exceed_days) {
update_status_manager_.ScheduleUpdate();
@@ -428,6 +427,12 @@ void FilterPolicyTable(
FilterInvalidPriorityValues(
module_config.notifications_per_minute_by_priority);
}
+ if (module_config.is_initialized() &&
+ module_config.subtle_notifications_per_minute_by_priority
+ .is_initialized()) {
+ FilterInvalidPriorityValues(
+ *module_config.subtle_notifications_per_minute_by_priority);
+ }
if (pt.app_policies_section.is_initialized()) {
policy_table::ApplicationPolicies& apps = pt.app_policies_section.apps;
@@ -458,15 +463,14 @@ void FilterPolicyTable(
PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT(
const std::string& file, const BinaryMessage& pt_content) {
- LOG4CXX_INFO(logger_, "LoadPT of size " << pt_content.size());
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_INFO("LoadPT of size " << pt_content.size());
+ SDL_LOG_DEBUG(
"PTU content is: " << std::string(pt_content.begin(), pt_content.end()));
// Parse message into table struct
std::shared_ptr<policy_table::Table> pt_update = Parse(pt_content);
if (!pt_update) {
- LOG4CXX_WARN(logger_, "Parsed table pointer is NULL.");
+ SDL_LOG_WARN("Parsed table pointer is NULL.");
return PtProcessingResult::kWrongPtReceived;
}
@@ -475,7 +479,7 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT(
FilterPolicyTable(pt_update->policy_table, current_vd_items);
if (!IsPTValid(pt_update, policy_table::PT_UPDATE)) {
- LOG4CXX_WARN(logger_, "Received policy table update is not valid");
+ SDL_LOG_WARN("Received policy table update is not valid");
return PtProcessingResult::kWrongPtReceived;
}
@@ -485,8 +489,7 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT(
// Get current DB data, since it could be updated during awaiting of PTU
auto policy_table_snapshot = cache_->GenerateSnapshot();
if (!policy_table_snapshot) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed to create snapshot of policy table, trying another exchange");
return PtProcessingResult::kNewPtRequired;
}
@@ -501,8 +504,7 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT(
// Replace current data with updated
if (!cache_->ApplyUpdate(*pt_update)) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Unsuccessful save of updated policy table, trying another exchange");
return PtProcessingResult::kNewPtRequired;
}
@@ -525,10 +527,10 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT(
std::map<std::string, StringArray> app_hmi_types;
cache_->GetHMIAppTypeAfterUpdate(app_hmi_types);
if (!app_hmi_types.empty()) {
- LOG4CXX_INFO(logger_, "app_hmi_types is full calling OnUpdateHMIAppType");
+ SDL_LOG_INFO("app_hmi_types is full calling OnUpdateHMIAppType");
listener_->OnUpdateHMIAppType(app_hmi_types);
} else {
- LOG4CXX_INFO(logger_, "app_hmi_types empty");
+ SDL_LOG_INFO("app_hmi_types empty");
}
std::vector<std::string> enabled_apps;
@@ -541,11 +543,11 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT(
}
void PolicyManagerImpl::OnPTUFinished(const PtProcessingResult ptu_result) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ptu_requested_ = false;
if (PtProcessingResult::kWrongPtReceived == ptu_result) {
- LOG4CXX_DEBUG(logger_, "Wrong PT was received");
+ SDL_LOG_DEBUG("Wrong PT was received");
update_status_manager_.OnWrongUpdateReceived();
return;
}
@@ -555,7 +557,7 @@ void PolicyManagerImpl::OnPTUFinished(const PtProcessingResult ptu_result) {
if (HasApplicationForPTU()) {
update_status_manager_.OnExistedApplicationAdded(true);
} else if (PtProcessingResult::kNewPtRequired == ptu_result) {
- LOG4CXX_DEBUG(logger_, "New PTU interation is required");
+ SDL_LOG_DEBUG("New PTU interation is required");
ForcePTExchange();
return;
}
@@ -565,8 +567,7 @@ void PolicyManagerImpl::OnPTUFinished(const PtProcessingResult ptu_result) {
// If there was a user request for policy table update, it should be started
// right after current update is finished
if (update_status_manager_.IsUpdateRequired()) {
- LOG4CXX_DEBUG(logger_,
- "PTU was successful and new PTU iteration was scheduled");
+ SDL_LOG_DEBUG("PTU was successful and new PTU iteration was scheduled");
StartPTExchange();
return;
}
@@ -577,7 +578,7 @@ void PolicyManagerImpl::OnPTUFinished(const PtProcessingResult ptu_result) {
CheckAppPolicyResults PolicyManagerImpl::CheckPermissionsChanges(
const std::shared_ptr<policy_table::Table> pt_update,
const std::shared_ptr<policy_table::Table> snapshot) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Replace predefined policies with its actual setting, e.g. "123":"default"
// to actual values of default section
@@ -662,13 +663,13 @@ void PolicyManagerImpl::PrepareNotificationData(
const policy_table::Strings& group_names,
const std::vector<FunctionalGroupPermission>& group_permission,
Permissions& notification_data) {
- LOG4CXX_INFO(logger_, "Preparing data for notification.");
+ SDL_LOG_INFO("Preparing data for notification.");
ProcessFunctionalGroup processor(groups, group_permission, notification_data);
std::for_each(group_names.begin(), group_names.end(), processor);
}
std::string PolicyManagerImpl::GetUpdateUrl(int service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
EndpointUrls urls;
GetUpdateUrls(service_type, urls);
@@ -683,28 +684,28 @@ std::string PolicyManagerImpl::GetUpdateUrl(int service_type) {
++index;
} else {
- LOG4CXX_ERROR(logger_, "The endpoint entry is empty");
+ SDL_LOG_ERROR("The endpoint entry is empty");
}
return url;
}
void PolicyManagerImpl::GetUpdateUrls(const std::string& service_type,
EndpointUrls& out_end_points) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
cache_->GetUpdateUrls(service_type, out_end_points);
}
void PolicyManagerImpl::GetUpdateUrls(const uint32_t service_type,
EndpointUrls& out_end_points) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
cache_->GetUpdateUrls(service_type, out_end_points);
}
void PolicyManagerImpl::RequestPTUpdate() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::shared_ptr<policy_table::Table> policy_table_snapshot =
cache_->GenerateSnapshot();
if (!policy_table_snapshot) {
- LOG4CXX_ERROR(logger_, "Failed to create snapshot of policy table");
+ SDL_LOG_ERROR("Failed to create snapshot of policy table");
return;
}
@@ -714,19 +715,19 @@ void PolicyManagerImpl::RequestPTUpdate() {
writer_builder["indentation"] = "";
std::string message_string = Json::writeString(writer_builder, value);
- LOG4CXX_DEBUG(logger_, "Snapshot contents is : " << message_string);
+ SDL_LOG_DEBUG("Snapshot contents is : " << message_string);
BinaryMessage update(message_string.begin(), message_string.end());
ptu_requested_ = true;
listener_->OnSnapshotCreated(
update, RetrySequenceDelaysSeconds(), TimeoutExchangeMSec());
} else {
- LOG4CXX_ERROR(logger_, "Invalid Policy table snapshot - PTUpdate failed");
+ SDL_LOG_ERROR("Invalid Policy table snapshot - PTUpdate failed");
}
}
void PolicyManagerImpl::StartPTExchange() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (ignition_check) {
CheckTriggers();
@@ -735,9 +736,9 @@ void PolicyManagerImpl::StartPTExchange() {
if (update_status_manager_.IsAppsSearchInProgress() &&
update_status_manager_.IsUpdateRequired()) {
- LOG4CXX_INFO(logger_,
- "Starting exchange skipped, since applications "
- "search is in progress.");
+ SDL_LOG_INFO(
+ "Starting exchange skipped, since applications "
+ "search is in progress.");
return;
}
@@ -745,29 +746,29 @@ void PolicyManagerImpl::StartPTExchange() {
if (trigger_ptu_) {
update_status_manager_.ScheduleUpdate();
}
- LOG4CXX_INFO(logger_,
- "Starting exchange skipped, since another exchange "
- "is in progress.");
+ SDL_LOG_INFO(
+ "Starting exchange skipped, since another exchange "
+ "is in progress.");
return;
}
- LOG4CXX_INFO(logger_, "Policy want to call RequestPTUpdate");
+ SDL_LOG_INFO("Policy want to call RequestPTUpdate");
if (listener_) {
- LOG4CXX_INFO(logger_, "Listener CanUpdate");
+ SDL_LOG_INFO("Listener CanUpdate");
if (update_status_manager_.IsUpdateRequired()) {
update_status_manager_.PendingUpdate();
- LOG4CXX_INFO(logger_, "IsUpdateRequired");
+ SDL_LOG_INFO("IsUpdateRequired");
RequestPTUpdate();
}
}
}
void PolicyManagerImpl::OnAppsSearchStarted() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
update_status_manager_.OnAppsSearchStarted();
}
void PolicyManagerImpl::OnAppsSearchCompleted(const bool trigger_ptu) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
update_status_manager_.OnAppsSearchCompleted();
trigger_ptu_ = trigger_ptu;
@@ -796,13 +797,13 @@ const std::vector<std::string> PolicyManagerImpl::GetAppRequestTypes(
RequestType::State PolicyManagerImpl::GetAppRequestTypesState(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->GetAppRequestTypesState(policy_app_id);
}
RequestSubType::State PolicyManagerImpl::GetAppRequestSubTypesState(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->GetAppRequestSubTypesState(policy_app_id);
}
@@ -884,7 +885,7 @@ void PolicyManagerImpl::GetAppServiceParameters(
bool PolicyManagerImpl::UnknownRPCPassthroughAllowed(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->UnknownRPCPassthroughAllowed(policy_app_id);
}
@@ -894,18 +895,15 @@ void PolicyManagerImpl::CheckPermissions(const PTString& device_id,
const PTString& rpc,
const RPCParams& rpc_params,
CheckPermissionResult& result) {
- LOG4CXX_INFO(logger_,
- "CheckPermissions for " << app_id << " and rpc " << rpc
+ SDL_LOG_INFO("CheckPermissions for " << app_id << " and rpc " << rpc
<< " for " << hmi_level << " level.");
Permissions rpc_permissions;
// Check, if there are calculated permission present in cache
if (!cache_->IsPermissionsCalculated(device_id, app_id, rpc_permissions)) {
- LOG4CXX_DEBUG(logger_,
- "IsPermissionsCalculated for device: "
- << device_id << " and app: " << app_id
- << " returns false");
+ SDL_LOG_DEBUG("IsPermissionsCalculated for device: "
+ << device_id << " and app: " << app_id << " returns false");
// Get actual application group permission according to user consents
std::vector<FunctionalGroupPermission> app_group_permissions;
GetPermissionsForApp(device_id, app_id, app_group_permissions);
@@ -928,10 +926,8 @@ void PolicyManagerImpl::CheckPermissions(const PTString& device_id,
cache_->AddCalculatedPermissions(device_id, app_id, rpc_permissions);
} else {
- LOG4CXX_DEBUG(logger_,
- "IsPermissionsCalculated for device: "
- << device_id << " and app: " << app_id
- << " returns true");
+ SDL_LOG_DEBUG("IsPermissionsCalculated for device: "
+ << device_id << " and app: " << app_id << " returns true");
}
if (cache_->IsApplicationRevoked(app_id)) {
@@ -946,7 +942,7 @@ void PolicyManagerImpl::CheckPermissions(const PTString& device_id,
}
const bool known_rpc = rpc_permissions.end() != rpc_permissions.find(rpc);
- LOG4CXX_DEBUG(logger_, "Is known rpc " << (known_rpc ? "true" : "false"));
+ SDL_LOG_DEBUG("Is known rpc " << (known_rpc ? "true" : "false"));
if (!known_rpc) {
// RPC not found in list == disallowed by backend
result.hmi_level_permitted = kRpcDisallowed;
@@ -968,20 +964,18 @@ void PolicyManagerImpl::CheckPermissions(const PTString& device_id,
rpc_permissions[rpc].hmi_permissions[kUserDisallowedKey].find(
hmi_level)) {
// RPC found in allowed == allowed by backend, but disallowed by user
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"RPC found in allowed == allowed by backend, but disallowed by user");
result.hmi_level_permitted = kRpcUserDisallowed;
} else {
- LOG4CXX_DEBUG(logger_,
- "HMI level " << hmi_level << " wasn't found "
+ SDL_LOG_DEBUG("HMI level " << hmi_level << " wasn't found "
<< " for rpc " << rpc << " and appID "
<< app_id);
return;
}
if (kRpcAllowed != result.hmi_level_permitted) {
- LOG4CXX_DEBUG(logger_, "RPC is not allowed. Stop parameters processing.");
+ SDL_LOG_DEBUG("RPC is not allowed. Stop parameters processing.");
result.list_of_allowed_params =
rpc_permissions[rpc].parameter_permissions[kAllowedKey];
@@ -997,7 +991,7 @@ void PolicyManagerImpl::CheckPermissions(const PTString& device_id,
// permissions, so that flag is processed first
if (rpc_permissions[rpc]
.parameter_permissions.any_parameter_disallowed_by_user) {
- LOG4CXX_DEBUG(logger_, "All parameters are disallowed by user.");
+ SDL_LOG_DEBUG("All parameters are disallowed by user.");
result.list_of_disallowed_params = rpc_params;
result.hmi_level_permitted = kRpcUserDisallowed;
return;
@@ -1005,14 +999,14 @@ void PolicyManagerImpl::CheckPermissions(const PTString& device_id,
if (rpc_permissions[rpc]
.parameter_permissions.any_parameter_disallowed_by_policy) {
- LOG4CXX_DEBUG(logger_, "All parameters are disallowed by policy.");
+ SDL_LOG_DEBUG("All parameters are disallowed by policy.");
result.list_of_undefined_params = rpc_params;
result.hmi_level_permitted = kRpcDisallowed;
return;
}
if (rpc_permissions[rpc].parameter_permissions.any_parameter_allowed) {
- LOG4CXX_DEBUG(logger_, "All parameters are allowed.");
+ SDL_LOG_DEBUG("All parameters are allowed.");
result.list_of_allowed_params = rpc_params;
return;
}
@@ -1035,8 +1029,7 @@ void PolicyManagerImpl::CheckPermissions(const PTString& device_id,
RPCParams::const_iterator end = rpc_params.end();
for (; end != parameter; ++parameter) {
if (!result.HasParameter(*parameter)) {
- LOG4CXX_DEBUG(logger_,
- "Parameter " << *parameter
+ SDL_LOG_DEBUG("Parameter " << *parameter
<< " is unknown."
" Adding to undefined list.");
result.list_of_undefined_params.insert(*parameter);
@@ -1044,10 +1037,10 @@ void PolicyManagerImpl::CheckPermissions(const PTString& device_id,
}
if (result.DisallowedInclude(rpc_params)) {
- LOG4CXX_DEBUG(logger_, "All parameters are disallowed.");
+ SDL_LOG_DEBUG("All parameters are disallowed.");
result.hmi_level_permitted = kRpcUserDisallowed;
} else if (!result.IsAnyAllowed(rpc_params)) {
- LOG4CXX_DEBUG(logger_, "There are no parameters allowed.");
+ SDL_LOG_DEBUG("There are no parameters allowed.");
if (!result.list_of_undefined_params.empty()) {
result.hmi_level_permitted = kRpcAllowed;
@@ -1073,12 +1066,12 @@ policy_table::Strings PolicyManagerImpl::GetGroupsNames(
void PolicyManagerImpl::SendNotificationOnPermissionsUpdated(
const std::string& device_id, const std::string& application_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (device_id.empty()) {
- LOG4CXX_WARN(logger_,
- "Couldn't find device info for application id "
- "'" << application_id
- << "'");
+ SDL_LOG_WARN(
+ "Couldn't find device info for application id "
+ "'"
+ << application_id << "'");
return;
}
@@ -1096,8 +1089,7 @@ void PolicyManagerImpl::SendNotificationOnPermissionsUpdated(
app_group_permissions,
notification_data);
- LOG4CXX_INFO(logger_,
- "Send notification for application_id:" << application_id);
+ SDL_LOG_INFO("Send notification for application_id:" << application_id);
const ApplicationOnDevice who = {device_id, application_id};
if (access_remote_->IsAppRemoteControl(who)) {
@@ -1114,27 +1106,27 @@ void PolicyManagerImpl::SendNotificationOnPermissionsUpdated(
}
bool PolicyManagerImpl::CleanupUnpairedDevices() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->CleanupUnpairedDevices();
}
DeviceConsent PolicyManagerImpl::GetUserConsentForDevice(
const std::string& device_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->GetDeviceConsent(device_id);
}
void PolicyManagerImpl::SetUserConsentForDevice(const std::string& device_id,
const bool is_allowed) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Device :" << device_id);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Device :" << device_id);
cache_->SetDeviceConsent(device_id, is_allowed);
if (listener_) {
listener_->OnDeviceConsentChanged(device_id, is_allowed);
} else {
- LOG4CXX_WARN(logger_,
- "Event listener is not initialized. "
- "Can't call OnDeviceConsentChanged");
+ SDL_LOG_WARN(
+ "Event listener is not initialized. "
+ "Can't call OnDeviceConsentChanged");
}
if (is_allowed && listener_->CanUpdate()) {
update_status_manager_.OnDeviceConsented();
@@ -1188,7 +1180,7 @@ bool PolicyManagerImpl::ReactOnUserDevConsentForApp(
bool PolicyManagerImpl::GetInitialAppData(const std::string& application_id,
StringArray* nicknames,
StringArray* app_hmi_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const bool result = nicknames && app_hmi_types;
if (result) {
cache_->GetInitialAppData(application_id, *nicknames, *app_hmi_types);
@@ -1198,23 +1190,23 @@ bool PolicyManagerImpl::GetInitialAppData(const std::string& application_id,
void PolicyManagerImpl::AddDevice(const std::string& device_id,
const std::string& connection_type) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Device: " << device_id);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Device: " << device_id);
if (!cache_->AddDevice(device_id, connection_type)) {
- LOG4CXX_WARN(logger_, "Can't add device.");
+ SDL_LOG_WARN("Can't add device.");
}
}
void PolicyManagerImpl::OnLocalAppAdded() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
update_status_manager_.ScheduleUpdate();
StartPTExchange();
}
void PolicyManagerImpl::SetDeviceInfo(const std::string& device_id,
const DeviceInfo& device_info) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Device :" << device_id);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Device :" << device_id);
if (!cache_->SetDeviceData(device_id,
device_info.hardware,
device_info.firmware_rev,
@@ -1223,7 +1215,7 @@ void PolicyManagerImpl::SetDeviceInfo(const std::string& device_id,
device_info.carrier,
device_info.max_number_rfcom_ports,
device_info.connection_type)) {
- LOG4CXX_WARN(logger_, "Can't set device data.");
+ SDL_LOG_WARN("Can't set device data.");
}
}
@@ -1264,19 +1256,17 @@ PermissionConsent PolicyManagerImpl::EnsureCorrectPermissionConsent(
void PolicyManagerImpl::CheckPendingPermissionsChanges(
const std::string& policy_app_id,
const std::vector<FunctionalGroupPermission>& current_permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(app_permissions_diff_lock_);
PendingPermissions::iterator it_pending =
app_permissions_diff_.find(policy_app_id);
if (app_permissions_diff_.end() == it_pending) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"No pending permissions had been found for appID: " << policy_app_id);
return;
}
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Pending permissions had been found for appID: " << policy_app_id);
// Change appPermissionsConsentNeeded depending on unconsented groups
@@ -1288,16 +1278,14 @@ void PolicyManagerImpl::CheckPendingPermissionsChanges(
for (; it_groups != it_end_groups; ++it_groups) {
if (policy::kGroupUndefined == it_groups->state) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Unconsented groups still present for appID: " << policy_app_id);
it_pending->second.appPermissionsConsentNeeded = true;
return;
}
}
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Unconsented groups not present anymore for appID: " << policy_app_id);
it_pending->second.appPermissionsConsentNeeded = false;
return;
@@ -1307,7 +1295,7 @@ void PolicyManagerImpl::NotifyPermissionsChanges(
const std::string& device_id,
const std::string& policy_app_id,
const std::vector<FunctionalGroupPermission>& app_group_permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Get current functional groups from DB with RPC permissions
policy_table::FunctionalGroupings functional_groups;
cache_->GetFunctionalGroupings(functional_groups);
@@ -1325,7 +1313,7 @@ void PolicyManagerImpl::NotifyPermissionsChanges(
void PolicyManagerImpl::SetUserConsentForApp(
const PermissionConsent& permissions, const NotificationMode mode) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
cache_->ResetCalculatedPermissions();
PermissionConsent verified_permissions =
@@ -1334,20 +1322,19 @@ void PolicyManagerImpl::SetUserConsentForApp(
bool app_permissions_changed = false;
if (!cache_->SetUserPermissionsForApp(verified_permissions,
&app_permissions_changed)) {
- LOG4CXX_WARN(logger_, "Can't set user permissions for application.");
+ SDL_LOG_WARN("Can't set user permissions for application.");
return;
}
if (kSilentMode == mode) {
- LOG4CXX_WARN(logger_,
- "Silent mode is enabled. Application won't be informed.");
+ SDL_LOG_WARN("Silent mode is enabled. Application won't be informed.");
return;
}
if (!app_permissions_changed) {
- LOG4CXX_WARN(logger_,
- "Application already has same consents. "
- "Notificaton won't be sent.");
+ SDL_LOG_WARN(
+ "Application already has same consents. "
+ "Notificaton won't be sent.");
return;
}
@@ -1365,30 +1352,28 @@ void PolicyManagerImpl::SetUserConsentForApp(
}
bool PolicyManagerImpl::IsAllowedRetryCountExceeded() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(retry_sequence_lock_);
- return retry_sequence_index_ > retry_sequence_seconds_.size();
+ return retry_sequence_index_ >= retry_sequence_seconds_.size();
}
void PolicyManagerImpl::IncrementRetryIndex() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(retry_sequence_lock_);
if (!is_ptu_in_progress_) {
- LOG4CXX_TRACE(logger_,
- "First PTU iteration, skipping incrementing retry index");
+ SDL_LOG_TRACE("First PTU iteration, skipping incrementing retry index");
is_ptu_in_progress_ = true;
return;
}
++retry_sequence_index_;
- LOG4CXX_DEBUG(logger_,
- "current retry_sequence_index_ is: " << retry_sequence_index_);
+ SDL_LOG_DEBUG("current retry_sequence_index_ is: " << retry_sequence_index_);
}
void PolicyManagerImpl::RetrySequenceFailed() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
listener_->OnPTUFinished(false);
ResetRetrySequence(ResetRetryCountType::kResetWithStatusUpdate);
@@ -1401,7 +1386,7 @@ void PolicyManagerImpl::RetrySequenceFailed() {
}
void PolicyManagerImpl::ResetTimeout() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (update_status_manager_.IsUpdatePending()) {
uint32_t update_timeout = TimeoutExchangeMSec();
update_status_manager_.ResetTimeout(update_timeout);
@@ -1409,14 +1394,14 @@ void PolicyManagerImpl::ResetTimeout() {
}
void PolicyManagerImpl::OnSystemRequestReceived() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
IncrementRetryIndex();
}
bool PolicyManagerImpl::GetDefaultHmi(const std::string& device_id,
const std::string& policy_app_id,
std::string* default_hmi) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DeviceConsent device_consent = GetUserConsentForDevice(device_id);
const std::string app_id = policy::kDeviceAllowed != device_consent
? kPreDataConsentId
@@ -1426,9 +1411,9 @@ bool PolicyManagerImpl::GetDefaultHmi(const std::string& device_id,
bool PolicyManagerImpl::GetPriority(const std::string& policy_app_id,
std::string* priority) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!priority) {
- LOG4CXX_WARN(logger_, "Input priority parameter is null.");
+ SDL_LOG_WARN("Input priority parameter is null.");
return false;
}
@@ -1447,12 +1432,11 @@ void PolicyManagerImpl::GetUserConsentForApp(
const std::string& device_id,
const std::string& policy_app_id,
std::vector<FunctionalGroupPermission>& permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
FunctionalIdType group_types;
if (!cache_->GetPermissionsForApp(device_id, policy_app_id, group_types)) {
- LOG4CXX_WARN(logger_,
- "Can't get user permissions for app " << policy_app_id);
+ SDL_LOG_WARN("Can't get user permissions for app " << policy_app_id);
return;
}
@@ -1460,7 +1444,7 @@ void PolicyManagerImpl::GetUserConsentForApp(
// automatically allowed and it could not be changed by user
FunctionalGroupNames group_names;
if (!cache_->GetFunctionalGroupNames(group_names)) {
- LOG4CXX_WARN(logger_, "Can't get functional group names");
+ SDL_LOG_WARN("Can't get functional group names");
return;
}
@@ -1510,12 +1494,11 @@ void PolicyManagerImpl::GetPermissionsForApp(
const std::string& device_id,
const std::string& policy_app_id,
std::vector<FunctionalGroupPermission>& permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::string app_id_to_check = policy_app_id;
if (!cache_->IsApplicationRepresented(policy_app_id)) {
- LOG4CXX_WARN(logger_,
- "Application with id " << policy_app_id
+ SDL_LOG_WARN("Application with id " << policy_app_id
<< " is not found within known apps.");
return;
}
@@ -1538,8 +1521,7 @@ void PolicyManagerImpl::GetPermissionsForApp(
cache_->GetPermissionsForApp(device_id, app_id_to_check, group_types);
if (!ret) {
- LOG4CXX_WARN(logger_,
- "Can't get user permissions for app " << policy_app_id);
+ SDL_LOG_WARN("Can't get user permissions for app " << policy_app_id);
return;
}
@@ -1547,14 +1529,14 @@ void PolicyManagerImpl::GetPermissionsForApp(
// automatically allowed and it could not be changed by user
FunctionalGroupNames group_names;
if (!cache_->GetFunctionalGroupNames(group_names)) {
- LOG4CXX_WARN(logger_, "Can't get functional group names");
+ SDL_LOG_WARN("Can't get functional group names");
return;
}
// The "default" and "pre_DataConsent" are auto-allowed groups
// So, check if application in the one of these mode.
if (allowed_by_default) {
- LOG4CXX_INFO(logger_, "Get auto allowed groups");
+ SDL_LOG_INFO("Get auto allowed groups");
GroupType type =
(kDefaultId == app_id_to_check ? kTypeDefault : kTypePreDataConsented);
@@ -1613,7 +1595,7 @@ void PolicyManagerImpl::GetPermissionsForApp(
std::string& PolicyManagerImpl::GetCurrentDeviceId(
const transport_manager::DeviceHandle& device_handle,
const std::string& policy_app_id) const {
- LOG4CXX_INFO(logger_, "GetDeviceInfo");
+ SDL_LOG_INFO("GetDeviceInfo");
last_device_id_ =
listener()->OnCurrentDeviceIdUpdateRequired(device_handle, policy_app_id);
return last_device_id_;
@@ -1623,17 +1605,27 @@ void PolicyManagerImpl::SetSystemLanguage(const std::string& language) {
cache_->SetSystemLanguage(language);
}
+void PolicyManagerImpl::SetPreloadedPtFlag(const bool is_preloaded) {
+ SDL_LOG_AUTO_TRACE();
+ cache_->SetPreloadedPtFlag(is_preloaded);
+}
+
void PolicyManagerImpl::SetSystemInfo(const std::string& ccpu_version,
const std::string& wers_country_code,
const std::string& language) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
cache_->SetMetaInfo(ccpu_version, wers_country_code, language);
}
-uint32_t PolicyManagerImpl::GetNotificationsNumber(
- const std::string& priority) const {
- LOG4CXX_AUTO_TRACE(logger_);
- return cache_->GetNotificationsNumber(priority);
+std::string PolicyManagerImpl::GetCCPUVersionFromPT() const {
+ SDL_LOG_AUTO_TRACE();
+ return cache_->GetCCPUVersionFromPT();
+}
+
+uint32_t PolicyManagerImpl::GetNotificationsNumber(const std::string& priority,
+ const bool is_subtle) const {
+ SDL_LOG_AUTO_TRACE();
+ return cache_->GetNotificationsNumber(priority, is_subtle);
}
bool PolicyManagerImpl::ExceededIgnitionCycles() {
@@ -1645,10 +1637,10 @@ bool PolicyManagerImpl::IsPTValid(
policy_table::PolicyTableType type) const {
policy_table->SetPolicyTableType(type);
if (!policy_table->is_valid()) {
- LOG4CXX_ERROR(logger_, "Policy table is not valid.");
+ SDL_LOG_ERROR("Policy table is not valid.");
rpc::ValidationReport report("policy_table");
policy_table->ReportErrors(&report);
- LOG4CXX_DEBUG(logger_, "Errors: " << rpc::PrettyFormat(report));
+ SDL_LOG_DEBUG("Errors: " << rpc::PrettyFormat(report));
return false;
}
return true;
@@ -1669,12 +1661,12 @@ void PolicyManagerImpl::UpdateAppConsentWithExternalConsent(
const GroupsNames& allowed_groups,
const GroupsNames& disallowed_groups,
const ConsentProcessingPolicy processing_policy) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (allowed_groups.empty() && disallowed_groups.empty()) {
- LOG4CXX_DEBUG(logger_,
- "Allowed and disallowed groups are empty, skipping update by "
- "external user consent.");
+ SDL_LOG_DEBUG(
+ "Allowed and disallowed groups are empty, skipping update by "
+ "external user consent.");
return;
}
@@ -1717,12 +1709,12 @@ void PolicyManagerImpl::UpdateAppConsentWithExternalConsent(
void PolicyManagerImpl::SendOnAppPropertiesChangeNotification(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
listener_->SendOnAppPropertiesChangeNotification(policy_app_id);
}
void PolicyManagerImpl::ResumePendingAppPolicyActions() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
for (auto& notify_system_params : notify_system_list_) {
NotifySystem(notify_system_params.first, notify_system_params.second);
@@ -1752,8 +1744,7 @@ void PolicyManagerImpl::SendPermissionsToApp(
const std::string app_id = app_policy.first;
if (device_id.empty()) {
- LOG4CXX_WARN(logger_,
- "Couldn't find device info for application id: " << app_id);
+ SDL_LOG_WARN("Couldn't find device info for application id: " << app_id);
return;
}
std::vector<FunctionalGroupPermission> group_permissons;
@@ -1771,7 +1762,7 @@ void PolicyManagerImpl::SendPermissionsToApp(
group_permissons,
notification_data);
- LOG4CXX_INFO(logger_, "Send notification for application_id: " << app_id);
+ SDL_LOG_INFO("Send notification for application_id: " << app_id);
listener()->OnPermissionsUpdated(
device_id,
app_id,
@@ -1818,7 +1809,7 @@ bool ConsentStatusComparatorFunc(const ExternalConsentStatusItem& i1,
bool PolicyManagerImpl::IsNeedToUpdateExternalConsentStatus(
const ExternalConsentStatus& new_status) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
typedef std::vector<ExternalConsentStatusItem> ItemV;
const ExternalConsentStatus existing_status =
cache_->GetExternalConsentEntities();
@@ -1829,13 +1820,12 @@ bool PolicyManagerImpl::IsNeedToUpdateExternalConsentStatus(
ItemV difference_v;
difference_v.resize(new_status_v.size() + existing_status_v.size());
- ItemV::iterator ci = difference_v.begin();
- ci = std::set_difference(new_status_v.begin(),
- new_status_v.end(),
- existing_status_v.begin(),
- existing_status_v.end(),
- difference_v.begin(),
- ConsentStatusComparatorFunc);
+ ItemV::iterator ci = std::set_difference(new_status_v.begin(),
+ new_status_v.end(),
+ existing_status_v.begin(),
+ existing_status_v.end(),
+ difference_v.begin(),
+ ConsentStatusComparatorFunc);
difference_v.resize(ci - difference_v.begin());
return !difference_v.empty();
@@ -1843,15 +1833,15 @@ bool PolicyManagerImpl::IsNeedToUpdateExternalConsentStatus(
bool PolicyManagerImpl::SetExternalConsentStatus(
const ExternalConsentStatus& status) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (status.empty()) {
- LOG4CXX_INFO(logger_, "External consent status is empty, skipping update.");
+ SDL_LOG_INFO("External consent status is empty, skipping update.");
return false;
}
if (!cache_->SetExternalConsentStatus(status)) {
- LOG4CXX_WARN(logger_, "Can't set external user consent status.");
+ SDL_LOG_WARN("Can't set external user consent status.");
return false;
}
@@ -1864,7 +1854,7 @@ bool PolicyManagerImpl::SetExternalConsentStatus(
}
ExternalConsentStatus PolicyManagerImpl::GetExternalConsentStatus() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->GetExternalConsentStatus();
}
@@ -1872,7 +1862,7 @@ void PolicyManagerImpl::CalculateGroupsConsentFromExternalConsent(
const GroupsByExternalConsentStatus& groups_by_external_consent,
GroupsNames& out_allowed_groups,
GroupsNames& out_disallowed_groups) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
GroupSorter sorter(out_allowed_groups, out_disallowed_groups);
std::for_each(groups_by_external_consent.begin(),
groups_by_external_consent.end(),
@@ -1890,7 +1880,7 @@ void PolicyManagerImpl::CalculateGroupsConsentFromExternalConsent(
}
bool PolicyManagerImpl::ExceededDays() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
date_time::TimeDuration current_time = date_time::getCurrentTime();
const int kSecondsInDay = 60 * 60 * 24;
@@ -1899,16 +1889,16 @@ bool PolicyManagerImpl::ExceededDays() {
DCHECK(std::numeric_limits<uint16_t>::max() >= days);
if (std::numeric_limits<uint16_t>::max() <= days) {
- LOG4CXX_WARN(logger_, "The days since epoch exceeds maximum value.");
+ SDL_LOG_WARN("The days since epoch exceeds maximum value.");
return false;
}
return 0 == cache_->DaysBeforeExchange(static_cast<uint16_t>(days));
}
void PolicyManagerImpl::KmsChanged(int kilometers) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (0 == cache_->KilometersBeforeExchange(kilometers)) {
- LOG4CXX_INFO(logger_, "Enough kilometers passed to send for PT update.");
+ SDL_LOG_INFO("Enough kilometers passed to send for PT update.");
update_status_manager_.ScheduleUpdate();
StartPTExchange();
PTUpdatedAt(KILOMETERS, kilometers);
@@ -1917,14 +1907,14 @@ void PolicyManagerImpl::KmsChanged(int kilometers) {
const boost::optional<bool> PolicyManagerImpl::LockScreenDismissalEnabledState()
const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->LockScreenDismissalEnabledState();
}
const boost::optional<std::string>
PolicyManagerImpl::LockScreenDismissalWarningMessage(
const std::string& language) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->LockScreenDismissalWarningMessage(language);
}
@@ -1939,7 +1929,7 @@ std::string PolicyManagerImpl::ForcePTExchange() {
}
void policy::PolicyManagerImpl::StopRetrySequence() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (cache_->UpdateRequired()) {
ResetRetrySequence(ResetRetryCountType::kResetWithStatusUpdate);
@@ -1947,7 +1937,7 @@ void policy::PolicyManagerImpl::StopRetrySequence() {
}
std::string PolicyManagerImpl::ForcePTExchangeAtUserRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
update_status_manager_.ScheduleManualUpdate();
StartPTExchange();
return update_status_manager_.StringifiedUpdateStatus();
@@ -1959,7 +1949,7 @@ std::string PolicyManagerImpl::GetPolicyTableStatus() const {
int PolicyManagerImpl::NextRetryTimeout() {
sync_primitives::AutoLock auto_lock(retry_sequence_lock_);
- LOG4CXX_DEBUG(logger_, "Index: " << retry_sequence_index_);
+ SDL_LOG_DEBUG("Index: " << retry_sequence_index_);
int next = 0;
if (!retry_sequence_seconds_.empty() &&
@@ -1979,7 +1969,7 @@ void PolicyManagerImpl::RefreshRetrySequence() {
void PolicyManagerImpl::ResetRetrySequence(
const ResetRetryCountType reset_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(retry_sequence_lock_);
retry_sequence_index_ = 0;
is_ptu_in_progress_ = false;
@@ -1998,15 +1988,14 @@ const std::vector<int> PolicyManagerImpl::RetrySequenceDelaysSeconds() {
}
void PolicyManagerImpl::OnExceededTimeout() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
update_status_manager_.OnUpdateTimeoutOccurs();
}
void PolicyManagerImpl::OnUpdateStarted() {
uint32_t update_timeout = TimeoutExchangeMSec();
- LOG4CXX_DEBUG(logger_,
- "Update timeout will be set to (milisec): " << update_timeout);
+ SDL_LOG_DEBUG("Update timeout will be set to (milisec): " << update_timeout);
send_on_update_sent_out_ =
policy::kUpdating != update_status_manager_.StringifiedUpdateStatus();
@@ -2017,33 +2006,33 @@ void PolicyManagerImpl::OnUpdateStarted() {
}
void PolicyManagerImpl::PTUpdatedAt(Counters counter, int value) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
cache_->SetCountersPassedForSuccessfulUpdate(counter, value);
cache_->ResetIgnitionCycles();
}
void PolicyManagerImpl::Increment(usage_statistics::GlobalCounterId type) {
- LOG4CXX_INFO(logger_, "Increment without app id");
+ SDL_LOG_INFO("Increment without app id");
cache_->Increment(type);
}
void PolicyManagerImpl::Increment(const std::string& app_id,
usage_statistics::AppCounterId type) {
- LOG4CXX_DEBUG(logger_, "Increment " << app_id << " AppCounter: " << type);
+ SDL_LOG_DEBUG("Increment " << app_id << " AppCounter: " << type);
cache_->Increment(app_id, type);
}
void PolicyManagerImpl::Set(const std::string& app_id,
usage_statistics::AppInfoId type,
const std::string& value) {
- LOG4CXX_INFO(logger_, "Set " << app_id);
+ SDL_LOG_INFO("Set " << app_id);
cache_->Set(app_id, type, value);
}
void PolicyManagerImpl::Add(const std::string& app_id,
usage_statistics::AppStopwatchId type,
int32_t timespan_seconds) {
- LOG4CXX_INFO(logger_, "Add " << app_id);
+ SDL_LOG_INFO("Add " << app_id);
cache_->Add(app_id, type, timespan_seconds);
}
@@ -2053,9 +2042,9 @@ bool PolicyManagerImpl::IsApplicationRevoked(const std::string& app_id) const {
bool PolicyManagerImpl::IsConsentNeeded(const std::string& device_id,
const std::string& app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const int count = cache_->CountUnconsentedGroups(app_id, device_id);
- LOG4CXX_DEBUG(logger_, "There are: " << count << " unconsented groups.");
+ SDL_LOG_DEBUG("There are: " << count << " unconsented groups.");
return count != 0;
}
@@ -2097,7 +2086,7 @@ bool PolicyManagerImpl::CanAppStealFocus(const std::string& app_id) const {
void PolicyManagerImpl::MarkUnpairedDevice(const std::string& device_id) {
if (!cache_->SetUnpairedDevice(device_id)) {
- LOG4CXX_DEBUG(logger_, "Could not set unpaired flag for " << device_id);
+ SDL_LOG_DEBUG("Could not set unpaired flag for " << device_id);
return;
}
SetUserConsentForDevice(device_id, false);
@@ -2113,17 +2102,17 @@ void PolicyManagerImpl::OnAppRegisteredOnMobile(
void PolicyManagerImpl::OnDeviceSwitching(const std::string& device_id_from,
const std::string& device_id_to) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
cache_->OnDeviceSwitching(device_id_from, device_id_to);
}
const MetaInfo PolicyManagerImpl::GetMetaInfo() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->GetMetaInfo();
}
std::string PolicyManagerImpl::RetrieveCertificate() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->GetCertificate();
}
@@ -2133,12 +2122,12 @@ bool PolicyManagerImpl::HasCertificate() const {
void PolicyManagerImpl::SetDecryptedCertificate(
const std::string& certificate) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
cache_->SetDecryptedCertificate(certificate);
}
AppIdURL PolicyManagerImpl::GetNextUpdateUrl(const EndpointUrls& urls) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const AppIdURL next_app_url = RetrySequenceUrl(retry_sequence_url_, urls);
@@ -2200,19 +2189,18 @@ StatusNotifier PolicyManagerImpl::AddApplication(
const std::string& device_id,
const std::string& application_id,
const rpc::policy_table_interface_base::AppHmiTypes& hmi_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto device_consent = GetUserConsentForDevice(device_id);
- LOG4CXX_DEBUG(logger_,
- "check_device_id: " << device_id << " check_device_consent: "
+ SDL_LOG_DEBUG("check_device_id: " << device_id << " check_device_consent: "
<< device_consent);
sync_primitives::AutoLock lock(apps_registration_lock_);
if (IsNewApplication(application_id)) {
- LOG4CXX_DEBUG(logger_, "Adding new application");
+ SDL_LOG_DEBUG("Adding new application");
AddNewApplication(device_id, application_id, device_consent);
return std::make_shared<CallStatusChange>(update_status_manager_,
device_consent);
}
- LOG4CXX_DEBUG(logger_, "Promote existed application");
+ SDL_LOG_DEBUG("Promote existed application");
PromoteExistedApplication(device_id, application_id, device_consent);
if (!ptu_requested_) {
update_status_manager_.OnExistedApplicationAdded(cache_->UpdateRequired());
@@ -2227,7 +2215,7 @@ void PolicyManagerImpl::RemoveAppConsentForGroup(
bool PolicyManagerImpl::IsPredataPolicy(
const std::string& policy_app_id) const {
- LOG4CXX_INFO(logger_, "IsPredataApp");
+ SDL_LOG_INFO("IsPredataApp");
return cache_->IsPredataPolicy(policy_app_id);
}
@@ -2244,7 +2232,7 @@ void PolicyManagerImpl::ProcessExternalConsentStatusForApp(
CalculateGroupsConsentFromExternalConsent(
groups_by_status, allowed_groups, disallowed_groups);
- LOG4CXX_DEBUG(logger_, "check device_id: " << device_id);
+ SDL_LOG_DEBUG("check device_id: " << device_id);
UpdateAppConsentWithExternalConsent(device_id,
application_id,
allowed_groups,
@@ -2255,20 +2243,18 @@ void PolicyManagerImpl::ProcessExternalConsentStatusForApp(
void PolicyManagerImpl::AddNewApplication(const std::string& device_id,
const std::string& application_id,
DeviceConsent device_consent) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (kDeviceHasNoConsent == device_consent ||
kDeviceDisallowed == device_consent) {
- LOG4CXX_INFO(logger_,
- "Setting "
- << policy::kPreDataConsentId
- << " permissions for application id: " << application_id);
+ SDL_LOG_INFO("Setting "
+ << policy::kPreDataConsentId
+ << " permissions for application id: " << application_id);
cache_->SetPredataPolicy(application_id);
} else {
- LOG4CXX_INFO(logger_,
- "Setting "
- << policy::kDefaultId
- << " permissions for application id: " << application_id);
+ SDL_LOG_INFO("Setting "
+ << policy::kDefaultId
+ << " permissions for application id: " << application_id);
cache_->SetDefaultPolicy(application_id);
}
@@ -2284,16 +2270,14 @@ void PolicyManagerImpl::PromoteExistedApplication(
DeviceConsent device_consent) {
// If device consent changed to allowed during application being
// disconnected, app permissions should be changed also
- LOG4CXX_DEBUG(logger_,
- "kDeviceAllowed == device_consent: "
- << (kDeviceAllowed == device_consent)
- << " device_consent: " << device_consent);
+ SDL_LOG_DEBUG("kDeviceAllowed == device_consent: "
+ << (kDeviceAllowed == device_consent)
+ << " device_consent: " << device_consent);
if (kDeviceAllowed == device_consent &&
cache_->IsPredataPolicy(application_id)) {
- LOG4CXX_INFO(logger_,
- "Setting "
- << policy::kDefaultId
- << " permissions for application id: " << application_id);
+ SDL_LOG_INFO("Setting "
+ << policy::kDefaultId
+ << " permissions for application id: " << application_id);
cache_->SetDefaultPolicy(application_id);
}
ProcessExternalConsentStatusForApp(
@@ -2306,7 +2290,7 @@ bool PolicyManagerImpl::IsNewApplication(
}
bool PolicyManagerImpl::ResetPT(const std::string& file_name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
cache_->ResetCalculatedPermissions();
const bool result = cache_->ResetPT(file_name);
if (result) {
@@ -2316,19 +2300,17 @@ bool PolicyManagerImpl::ResetPT(const std::string& file_name) {
}
bool PolicyManagerImpl::CheckAppStorageFolder() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::string app_storage_folder = get_settings().app_storage_folder();
- LOG4CXX_DEBUG(logger_, "AppStorageFolder " << app_storage_folder);
+ SDL_LOG_DEBUG("AppStorageFolder " << app_storage_folder);
if (!file_system::DirectoryExists(app_storage_folder)) {
- LOG4CXX_WARN(logger_,
- "Storage directory doesn't exist " << app_storage_folder);
+ SDL_LOG_WARN("Storage directory doesn't exist " << app_storage_folder);
return false;
}
if (!(file_system::IsWritingAllowed(app_storage_folder) &&
file_system::IsReadingAllowed(app_storage_folder))) {
- LOG4CXX_WARN(logger_,
- "Storage directory doesn't have read/write permissions "
- << app_storage_folder);
+ SDL_LOG_WARN("Storage directory doesn't have read/write permissions "
+ << app_storage_folder);
return false;
}
return true;
@@ -2336,10 +2318,10 @@ bool PolicyManagerImpl::CheckAppStorageFolder() const {
bool PolicyManagerImpl::InitPT(const std::string& file_name,
const PolicySettings* settings) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
settings_ = settings;
if (!CheckAppStorageFolder()) {
- LOG4CXX_ERROR(logger_, "Can not read/write into AppStorageFolder");
+ SDL_LOG_ERROR("Can not read/write into AppStorageFolder");
return false;
}
const bool ret = cache_->Init(file_name, settings);
@@ -2359,7 +2341,7 @@ uint32_t PolicyManagerImpl::HeartBeatTimeout(const std::string& app_id) const {
}
void PolicyManagerImpl::SaveUpdateStatusRequired(bool is_update_needed) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!is_update_needed) {
ResetRetrySequence(ResetRetryCountType::kResetInternally);
@@ -2386,21 +2368,21 @@ void PolicyManagerImpl::SetDefaultHmiTypes(
const transport_manager::DeviceHandle& device_handle,
const std::string& application_id,
const std::vector<int>& hmi_types) {
- LOG4CXX_INFO(logger_, "SetDefaultHmiTypes");
+ SDL_LOG_INFO("SetDefaultHmiTypes");
const auto device_id = GetCurrentDeviceId(device_handle, application_id);
ApplicationOnDevice who = {device_id, application_id};
access_remote_->SetDefaultHmiTypes(who, hmi_types);
}
struct HMITypeToInt {
- int operator()(const policy_table::AppHMITypes::value_type item) {
+ int operator()(const policy_table::AppHMITypes::value_type item) const {
return policy_table::AppHMIType(item);
}
};
bool PolicyManagerImpl::GetHMITypes(const std::string& application_id,
std::vector<int>* app_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (cache_->IsDefaultPolicy(application_id)) {
return false;
}
@@ -2417,7 +2399,7 @@ bool PolicyManagerImpl::GetHMITypes(const std::string& application_id,
bool PolicyManagerImpl::CheckModule(const PTString& app_id,
const PTString& module) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
policy_table::ModuleType module_type;
return EnumFromJsonString(module, &module_type) &&
access_remote_->CheckModuleType(app_id, module_type);
@@ -2428,16 +2410,15 @@ void PolicyManagerImpl::SendHMILevelChanged(const ApplicationOnDevice& who) {
if (GetDefaultHmi(who.dev_id, who.app_id, &default_hmi)) {
listener()->OnUpdateHMIStatus(who.dev_id, who.app_id, default_hmi);
} else {
- LOG4CXX_WARN(
- logger_,
- "Couldn't get default HMI level for application " << who.app_id);
+ SDL_LOG_WARN("Couldn't get default HMI level for application "
+ << who.app_id);
}
}
void PolicyManagerImpl::GetPermissions(const std::string device_id,
const std::string application_id,
Permissions* data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(data);
std::vector<FunctionalGroupPermission> app_group_permissions;
GetPermissionsForApp(device_id, application_id, app_group_permissions);
@@ -2512,7 +2493,7 @@ const rpc::Optional<rpc::Boolean> PolicyManagerImpl::GetAppEncryptionRequired(
const std::vector<std::string> PolicyManagerImpl::GetFunctionalGroupsForApp(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace rpc::policy_table_interface_base;
DCHECK(kDeviceId != policy_app_id);
@@ -2532,7 +2513,7 @@ const std::vector<std::string> PolicyManagerImpl::GetFunctionalGroupsForApp(
const std::vector<std::string> PolicyManagerImpl::GetApplicationPolicyIDs()
const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<std::string> policy_app_ids;
const auto apps = cache_->GetPolicyAppIDs();
@@ -2546,14 +2527,14 @@ const std::vector<std::string> PolicyManagerImpl::GetApplicationPolicyIDs()
bool PolicyManagerImpl::FunctionGroupNeedEncryption(
const std::string& policy_group) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
FunctionalGroupings functional_groupings;
cache_->GetFunctionalGroupings(functional_groupings);
const auto& grouping_itr = functional_groupings.find(policy_group);
if (grouping_itr == functional_groupings.end()) {
- LOG4CXX_WARN(logger_, "Group " << policy_group << " not found");
+ SDL_LOG_WARN("Group " << policy_group << " not found");
return false;
}
@@ -2566,7 +2547,7 @@ bool PolicyManagerImpl::FunctionGroupNeedEncryption(
const std::string PolicyManagerImpl::GetPolicyFunctionName(
const uint32_t function_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return policy_table::EnumToJsonString(
static_cast<policy_table::FunctionID>(function_id));
}
@@ -2589,12 +2570,14 @@ const std::vector<std::string> PolicyManagerImpl::GetRPCsForFunctionGroup(
} // namespace policy
-__attribute__((visibility("default"))) policy::PolicyManager* CreateManager() {
+__attribute__((visibility("default"))) policy::PolicyManager* CreateManager(
+ logger::Logger* logger_instance) {
+ logger::Logger::instance(logger_instance);
return new policy::PolicyManagerImpl();
}
+// cppcheck-suppress unusedFunction
__attribute__((visibility("default"))) void DeleteManager(
policy::PolicyManager* pm) {
delete pm;
- DELETE_THREAD_LOGGER(policy::logger_);
}
diff --git a/src/components/policy/policy_external/src/policy_table.cc b/src/components/policy/policy_external/src/policy_table.cc
index 8ca6b698d1..7d82e8b635 100644
--- a/src/components/policy/policy_external/src/policy_table.cc
+++ b/src/components/policy/policy_external/src/policy_table.cc
@@ -38,7 +38,7 @@
namespace policy {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Policy")
+SDL_CREATE_LOG_VARIABLE("Policy")
PolicyTable::PolicyTable() : pt_data_(new SQLPTExtRepresentation()) {}
@@ -46,7 +46,7 @@ PolicyTable::PolicyTable(std::shared_ptr<PTRepresentation> pt_data)
: pt_data_(pt_data) {}
PolicyTable::~PolicyTable() {
- LOG4CXX_INFO(logger_, "Destroying policy table.");
+ SDL_LOG_INFO("Destroying policy table.");
}
} // namespace policy
diff --git a/src/components/policy/policy_external/src/policy_table/types.cc b/src/components/policy/policy_external/src/policy_table/types.cc
index f0ea154f94..243cf98066 100644
--- a/src/components/policy/policy_external/src/policy_table/types.cc
+++ b/src/components/policy/policy_external/src/policy_table/types.cc
@@ -1,5 +1,8 @@
#include "policy/policy_table/types.h"
+
#include <algorithm>
+#include <regex>
+
#include "rpc_base/rpc_base_json_inl.h"
namespace rpc {
@@ -859,6 +862,8 @@ ModuleConfig::ModuleConfig(const Json::Value* value__)
, endpoint_properties(impl::ValueMember(value__, "endpoint_properties"))
, notifications_per_minute_by_priority(
impl::ValueMember(value__, "notifications_per_minute_by_priority"))
+ , subtle_notifications_per_minute_by_priority(impl::ValueMember(
+ value__, "subtle_notifications_per_minute_by_priority"))
, vehicle_make(impl::ValueMember(value__, "vehicle_make"))
, vehicle_model(impl::ValueMember(value__, "vehicle_model"))
, vehicle_year(impl::ValueMember(value__, "vehicle_year"))
@@ -870,7 +875,6 @@ ModuleConfig::ModuleConfig(const Json::Value* value__)
impl::ValueMember(value__, "lock_screen_dismissal_enabled")) {}
void ModuleConfig::SafeCopyFrom(const ModuleConfig& from) {
- exchange_after_x_days = from.exchange_after_x_days;
exchange_after_x_kilometers = from.exchange_after_x_kilometers;
exchange_after_x_days = from.exchange_after_x_days;
exchange_after_x_ignition_cycles = from.exchange_after_x_ignition_cycles;
@@ -882,6 +886,8 @@ void ModuleConfig::SafeCopyFrom(const ModuleConfig& from) {
from.notifications_per_minute_by_priority;
lock_screen_dismissal_enabled = from.lock_screen_dismissal_enabled;
+ subtle_notifications_per_minute_by_priority.assign_if_valid(
+ from.subtle_notifications_per_minute_by_priority);
certificate.assign_if_valid(from.certificate);
vehicle_make.assign_if_valid(from.vehicle_make);
vehicle_model.assign_if_valid(from.vehicle_model);
@@ -910,6 +916,9 @@ Json::Value ModuleConfig::ToJsonValue() const {
impl::WriteJsonField("notifications_per_minute_by_priority",
notifications_per_minute_by_priority,
&result__);
+ impl::WriteJsonField("subtle_notifications_per_minute_by_priority",
+ subtle_notifications_per_minute_by_priority,
+ &result__);
impl::WriteJsonField("vehicle_make", vehicle_make, &result__);
impl::WriteJsonField("vehicle_model", vehicle_model, &result__);
impl::WriteJsonField("vehicle_year", vehicle_year, &result__);
@@ -955,6 +964,9 @@ bool ModuleConfig::is_valid() const {
if (!notifications_per_minute_by_priority.is_valid()) {
return false;
}
+ if (!subtle_notifications_per_minute_by_priority.is_valid()) {
+ return false;
+ }
if (!vehicle_make.is_valid()) {
return false;
}
@@ -1019,6 +1031,9 @@ bool ModuleConfig::struct_empty() const {
if (notifications_per_minute_by_priority.is_initialized()) {
return false;
}
+ if (subtle_notifications_per_minute_by_priority.is_initialized()) {
+ return false;
+ }
if (lock_screen_dismissal_enabled.is_initialized()) {
return false;
}
@@ -1080,6 +1095,11 @@ void ModuleConfig::ReportErrors(rpc::ValidationReport* report__) const {
notifications_per_minute_by_priority.ReportErrors(
&report__->ReportSubobject("notifications_per_minute_by_priority"));
}
+ if (!subtle_notifications_per_minute_by_priority.is_valid()) {
+ subtle_notifications_per_minute_by_priority.ReportErrors(
+ &report__->ReportSubobject(
+ "subtle_notifications_per_minute_by_priority"));
+ }
if (!lock_screen_dismissal_enabled.is_valid()) {
lock_screen_dismissal_enabled.ReportErrors(
&report__->ReportSubobject("lock_screen_dismissal_enabled"));
@@ -1143,6 +1163,7 @@ void ModuleConfig::SetPolicyTableType(PolicyTableType pt_type) {
endpoints.SetPolicyTableType(pt_type);
endpoint_properties.SetPolicyTableType(pt_type);
notifications_per_minute_by_priority.SetPolicyTableType(pt_type);
+ subtle_notifications_per_minute_by_priority.SetPolicyTableType(pt_type);
lock_screen_dismissal_enabled.SetPolicyTableType(pt_type);
vehicle_make.SetPolicyTableType(pt_type);
vehicle_model.SetPolicyTableType(pt_type);
@@ -2198,6 +2219,7 @@ VehicleDataItem::VehicleDataItem(const VehicleDataItem& vehicle_data)
, until(vehicle_data.until)
, removed(vehicle_data.removed)
, deprecated(vehicle_data.deprecated)
+ , defvalue(vehicle_data.defvalue)
, minvalue(vehicle_data.minvalue)
, maxvalue(vehicle_data.maxvalue)
, minsize(vehicle_data.minsize)
@@ -2217,12 +2239,17 @@ VehicleDataItem::VehicleDataItem(const Json::Value* value__)
, until(impl::ValueMember(value__, "until"))
, removed(impl::ValueMember(value__, "removed"))
, deprecated(impl::ValueMember(value__, "deprecated"))
+ , defvalue(static_cast<Json::Value*>(nullptr))
, minvalue(impl::ValueMember(value__, "minvalue"))
, maxvalue(impl::ValueMember(value__, "maxvalue"))
, minsize(impl::ValueMember(value__, "minsize"))
, maxsize(impl::ValueMember(value__, "maxsize"))
, minlength(impl::ValueMember(value__, "minlength"))
- , maxlength(impl::ValueMember(value__, "maxlength")) {}
+ , maxlength(impl::ValueMember(value__, "maxlength")) {
+ if (value__->isMember("defvalue")) {
+ *defvalue = impl::ValueMember(value__, "defvalue")->asString();
+ }
+}
VehicleDataItem::~VehicleDataItem() {}
@@ -2248,6 +2275,7 @@ Json::Value VehicleDataItem::ToJsonValue() const {
impl::WriteJsonField("until", until, &ret);
impl::WriteJsonField("removed", removed, &ret);
impl::WriteJsonField("deprecated", deprecated, &ret);
+ impl::WriteJsonField("defvalue", defvalue, &ret);
impl::WriteJsonField("minvalue", minvalue, &ret);
impl::WriteJsonField("maxvalue", maxvalue, &ret);
impl::WriteJsonField("minsize", minsize, &ret);
@@ -2262,9 +2290,10 @@ bool VehicleDataItem::operator==(const VehicleDataItem& vd) {
mandatory == vd.mandatory && params == vd.params &&
array == vd.array && since == vd.since && until == vd.until &&
removed == vd.removed && deprecated == vd.deprecated &&
- minvalue == vd.minvalue && maxvalue == vd.maxvalue &&
- minsize == vd.minsize && maxsize == vd.maxsize &&
- minlength == vd.minlength && maxlength == vd.maxlength);
+ defvalue == vd.defvalue && minvalue == vd.minvalue &&
+ maxvalue == vd.maxvalue && minsize == vd.minsize &&
+ maxsize == vd.maxsize && minlength == vd.minlength &&
+ maxlength == vd.maxlength);
}
bool VehicleDataItem::is_valid() const {
@@ -2298,6 +2327,9 @@ bool VehicleDataItem::is_valid() const {
if (!deprecated.is_valid()) {
return false;
}
+ if (!(defvalue.is_valid() && ValidateDefault())) {
+ return false;
+ }
if (!minvalue.is_valid()) {
return false;
}
@@ -2354,6 +2386,9 @@ bool VehicleDataItem::struct_not_empty() const {
if (!deprecated.is_initialized()) {
return false;
}
+ if (!defvalue.is_initialized()) {
+ return false;
+ }
if (!minvalue.is_initialized()) {
return false;
}
@@ -2424,6 +2459,13 @@ void VehicleDataItem::ReportErrors(rpc::ValidationReport* report__) const {
if (!deprecated.is_valid()) {
deprecated.ReportErrors(&report__->ReportSubobject("deprecated"));
}
+ if (!defvalue.is_valid()) {
+ defvalue.ReportErrors(&report__->ReportSubobject("defvalue"));
+ }
+ if (!ValidateDefault()) {
+ report__->set_validation_info("Invalid default value: " +
+ std::string(*defvalue));
+ }
if (!minvalue.is_valid()) {
minvalue.ReportErrors(&report__->ReportSubobject("minvalue"));
}
@@ -2456,6 +2498,7 @@ void VehicleDataItem::SetPolicyTableType(PolicyTableType pt_type) {
until.SetPolicyTableType(pt_type);
removed.SetPolicyTableType(pt_type);
deprecated.SetPolicyTableType(pt_type);
+ defvalue.SetPolicyTableType(pt_type);
minvalue.SetPolicyTableType(pt_type);
maxvalue.SetPolicyTableType(pt_type);
minsize.SetPolicyTableType(pt_type);
@@ -2491,6 +2534,46 @@ bool VehicleDataItem::ValidateNaming(std::string str) const {
!contains_spec_chars(str);
}
+bool VehicleDataItem::ValidateDefault() const {
+ if (!defvalue.is_initialized()) {
+ return true;
+ }
+ std::string value = std::string(*defvalue);
+ bool valid = false;
+ if (VehicleDataItem::kInteger == std::string(type)) {
+ // Match int
+ std::regex pattern("^-?\\d+$");
+ bool type_matches = std::regex_match(value, pattern);
+ if (type_matches) {
+ size_t int_value = std::stol(value);
+ valid = (!minvalue.is_initialized() || int_value >= *minvalue) &&
+ (!maxvalue.is_initialized() || int_value <= *maxvalue);
+ }
+ } else if (VehicleDataItem::kFloat == std::string(type) ||
+ VehicleDataItem::kDouble == std::string(type)) {
+ // Match double
+ std::regex pattern("^-?\\d+(\\.\\d+)?$");
+ bool type_matches = std::regex_match(value, pattern);
+ if (type_matches) {
+ double dbl_value = std::stod(value);
+ valid = (!minvalue.is_initialized() || dbl_value >= *minvalue) &&
+ (!maxvalue.is_initialized() || dbl_value <= *maxvalue);
+ }
+ } else if (VehicleDataItem::kString == std::string(type)) {
+ size_t length = value.length();
+ valid = (!minsize.is_initialized() || length >= *minsize) &&
+ (!maxsize.is_initialized() || length <= *maxsize);
+ } else if (VehicleDataItem::kBoolean == std::string(type)) {
+ valid = ("false" == value || "true" == value);
+ } else if (VehicleDataItem::kStruct != std::string(type) &&
+ !IsPrimitiveType()) {
+ // Enum values cannot be validated here
+ valid = true;
+ }
+
+ return valid;
+}
+
bool VehicleDataItem::ValidateTypes() const {
if (VehicleDataItem::kStruct == std::string(type)) {
return params.is_initialized() && !(params->empty()) && params.is_valid();
diff --git a/src/components/policy/policy_external/src/policy_table/validation.cc b/src/components/policy/policy_external/src/policy_table/validation.cc
index 12a79748d7..825fd20b84 100644
--- a/src/components/policy/policy_external/src/policy_table/validation.cc
+++ b/src/components/policy/policy_external/src/policy_table/validation.cc
@@ -14,7 +14,7 @@ bool IsPredefinedApplication(const std::string& app_id) {
namespace rpc {
namespace policy_table_interface_base {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Policy")
+SDL_CREATE_LOG_VARIABLE("Policy")
bool VerifyPredefinedApp(ApplicationPolicies::value_type& app_policies) {
const std::string& app_id = app_policies.first;
@@ -25,18 +25,16 @@ bool VerifyPredefinedApp(ApplicationPolicies::value_type& app_policies) {
RequestTypes& predefined_request_types = *app_policies.second.RequestType;
if (!predefined_request_types.is_valid()) {
- LOG4CXX_WARN(logger_,
- app_id << " policy invalid RequestTypes will be cleaned.");
+ SDL_LOG_WARN(app_id << " policy invalid RequestTypes will be cleaned.");
predefined_request_types.CleanUp();
if (PT_PRELOADED == app_policies.second.GetPolicyTableType() &&
predefined_request_types.is_cleaned_up()) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
app_id << " policy RequestTypes is empty after clean-up. Exiting.");
return false;
}
- LOG4CXX_WARN(logger_, app_id << " request types have cleaned up.");
+ SDL_LOG_WARN(app_id << " request types have cleaned up.");
}
return true;
}
@@ -56,13 +54,13 @@ bool ApplicationPoliciesSection::Validate() const {
// Default and PreData policies are mandatory
if (apps.end() == it_default_policy || apps.end() == it_pre_data_policy) {
- LOG4CXX_ERROR(logger_, "Default or preData policy is not present.");
+ SDL_LOG_ERROR("Default or preData policy is not present.");
return false;
}
// Device policy is mandatory
if (!device.is_initialized()) {
- LOG4CXX_ERROR(logger_, "Device policy is not present.");
+ SDL_LOG_ERROR("Device policy is not present.");
return false;
}
@@ -89,52 +87,48 @@ bool ApplicationPoliciesSection::Validate() const {
continue;
}
- LOG4CXX_TRACE(logger_, "Checking app Request Types...");
+ SDL_LOG_TRACE("Checking app Request Types...");
RequestTypes& app_request_types = *iter->second.RequestType;
if (app_request_types.is_omitted()) {
- LOG4CXX_WARN(logger_,
- "RequestTypes omitted for "
- << app_id << " Will be replaced with default.");
+ SDL_LOG_WARN("RequestTypes omitted for "
+ << app_id << " Will be replaced with default.");
app_request_types = *apps[kDefaultApp].RequestType;
++iter;
continue;
}
if (!app_request_types.is_valid()) {
- LOG4CXX_WARN(
- logger_,
- "Invalid RequestTypes for " << app_id << " Will be cleaned up.");
+ SDL_LOG_WARN("Invalid RequestTypes for " << app_id
+ << " Will be cleaned up.");
app_request_types.CleanUp();
if (app_request_types.is_cleaned_up()) {
if (PT_PRELOADED == pt_type) {
- LOG4CXX_ERROR(logger_,
- "RequestTypes empty after clean-up for "
- << app_id << " Exiting.");
+ SDL_LOG_ERROR("RequestTypes empty after clean-up for "
+ << app_id << " Exiting.");
return false;
}
- LOG4CXX_WARN(logger_,
- "RequestTypes empty after clean-up for "
- << app_id << " Will be replaced with default.");
+ SDL_LOG_WARN("RequestTypes empty after clean-up for "
+ << app_id << " Will be replaced with default.");
app_request_types = *apps[kDefaultApp].RequestType;
}
- LOG4CXX_DEBUG(logger_, "Clean up for " << app_id << " is done.");
+ SDL_LOG_DEBUG("Clean up for " << app_id << " is done.");
++iter;
continue;
}
if (app_request_types.is_empty()) {
- LOG4CXX_WARN(logger_, "RequestTypes is empty for " << app_id);
+ SDL_LOG_WARN("RequestTypes is empty for " << app_id);
}
++iter;
}
- LOG4CXX_TRACE(logger_, "Checking app Request SubTypes...");
+ SDL_LOG_TRACE("Checking app Request SubTypes...");
iter = apps.begin();
while (iter != end_iter) {
if (it_default_policy == iter || it_pre_data_policy == iter) {
@@ -146,9 +140,9 @@ bool ApplicationPoliciesSection::Validate() const {
!app_params.RequestSubType.is_initialized();
if (is_request_subtype_omitted) {
- LOG4CXX_WARN(logger_,
- "App policy RequestSubTypes omitted."
- " Will be replaced with default.");
+ SDL_LOG_WARN(
+ "App policy RequestSubTypes omitted."
+ " Will be replaced with default.");
app_params.RequestSubType = apps[kDefaultApp].RequestSubType;
++iter;
continue;
@@ -156,7 +150,7 @@ bool ApplicationPoliciesSection::Validate() const {
const bool is_request_subtype_empty = app_params.RequestSubType->empty();
if (is_request_subtype_empty) {
- LOG4CXX_WARN(logger_, "App policy RequestSubTypes empty.");
+ SDL_LOG_WARN("App policy RequestSubTypes empty.");
}
++iter;
}
@@ -260,8 +254,7 @@ bool ModuleConfig::Validate() const {
++it_endpoints) {
const URLList& endpoint_list = it_endpoints->second;
if (endpoint_list.end() == endpoint_list.find(kDefaultApp)) {
- LOG4CXX_ERROR(logger_,
- "Endpoint " << it_endpoints->first
+ SDL_LOG_ERROR("Endpoint " << it_endpoints->first
<< "does not contain default group");
return false;
}
@@ -332,9 +325,8 @@ bool VehicleDataItem::Validate() const {
};
if (!ValidateTypes()) {
- LOG4CXX_ERROR(
- logger_,
- "Unknown type: " << std::string(type) << " of " << std::string(key));
+ SDL_LOG_ERROR("Unknown type: " << std::string(type) << " of "
+ << std::string(key));
return false;
}
return true;
diff --git a/src/components/policy/policy_external/src/sql_pt_ext_representation.cc b/src/components/policy/policy_external/src/sql_pt_ext_representation.cc
index c8a1b5d7ea..7147e0949d 100644
--- a/src/components/policy/policy_external/src/sql_pt_ext_representation.cc
+++ b/src/components/policy/policy_external/src/sql_pt_ext_representation.cc
@@ -41,7 +41,7 @@
namespace policy {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Policy")
+SDL_CREATE_LOG_VARIABLE("Policy")
SQLPTExtRepresentation::SQLPTExtRepresentation() {}
SQLPTExtRepresentation::SQLPTExtRepresentation(bool in_memory)
@@ -76,7 +76,7 @@ bool SQLPTExtRepresentation::ResetUserConsent() {
bool SQLPTExtRepresentation::ResetDeviceConsents() {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kResetDeviceConsents)) {
- LOG4CXX_WARN(logger_, "Incorrect delete statement from device_consents.");
+ SDL_LOG_WARN("Incorrect delete statement from device_consents.");
return false;
}
return query.Exec();
@@ -90,10 +90,10 @@ bool SQLPTExtRepresentation::GetUserPermissionsForDevice(
const std::string& device_id,
StringArray* consented_groups,
StringArray* disallowed_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectDeviceConsentedGroup)) {
- LOG4CXX_WARN(logger_, "Incorrect select from device consented groups");
+ SDL_LOG_WARN("Incorrect select from device consented groups");
return false;
}
query.Bind(0, device_id);
@@ -118,9 +118,9 @@ bool SQLPTExtRepresentation::GetPermissionsForApp(
const std::string& device_id,
const std::string& policy_app_id,
FunctionalIdType* group_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!group_types) {
- LOG4CXX_WARN(logger_, "Input parameter for group types is null.");
+ SDL_LOG_WARN("Input parameter for group types is null.");
return false;
}
// Get all app groups for specified device and application
@@ -171,7 +171,7 @@ bool SQLPTExtRepresentation::GetPermissionsForApp(
bool SQLPTExtRepresentation::GetDeviceGroupsFromPolicies(
policy_table::Strings* groups, policy_table::Strings* preconsented_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (groups) {
GatherAppGroup(kDeviceId, groups);
}
@@ -189,17 +189,17 @@ bool SQLPTExtRepresentation::SetDeviceData(const std::string& device_id,
const std::string& carrier,
const uint32_t number_of_ports,
const std::string& connection_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery count_query(db());
if (!count_query.Prepare(sql_pt_ext::kCountDevice)) {
- LOG4CXX_WARN(logger_, "Incorrect statement for count of device.");
+ SDL_LOG_WARN("Incorrect statement for count of device.");
return false;
}
count_query.Bind(0, device_id);
if (!count_query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect count of device.");
+ SDL_LOG_WARN("Incorrect count of device.");
return false;
}
@@ -209,7 +209,7 @@ bool SQLPTExtRepresentation::SetDeviceData(const std::string& device_id,
if (update) {
utils::dbms::SQLQuery update_query(db());
if (!update_query.Prepare(sql_pt_ext::kUpdateDevice)) {
- LOG4CXX_WARN(logger_, "Incorrect statement for udpate device.");
+ SDL_LOG_WARN("Incorrect statement for udpate device.");
return false;
}
@@ -223,7 +223,7 @@ bool SQLPTExtRepresentation::SetDeviceData(const std::string& device_id,
update_query.Bind(7, connection_type);
if (!update_query.Exec() || !update_query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect update for device.");
+ SDL_LOG_WARN("Incorrect update for device.");
return false;
}
@@ -233,7 +233,7 @@ bool SQLPTExtRepresentation::SetDeviceData(const std::string& device_id,
// Insert new data
utils::dbms::SQLQuery insert_query(db());
if (!insert_query.Prepare(sql_pt_ext::kInsertDevice)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for device.");
+ SDL_LOG_WARN("Incorrect insert statement for device.");
return false;
}
@@ -247,7 +247,7 @@ bool SQLPTExtRepresentation::SetDeviceData(const std::string& device_id,
insert_query.Bind(7, connection_type);
if (!insert_query.Exec() || !insert_query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert to device.");
+ SDL_LOG_WARN("Incorrect insert to device.");
return false;
}
@@ -260,17 +260,17 @@ bool SQLPTExtRepresentation::SetUserPermissionsForDevice(
const std::string& device_id,
const StringArray& consented_groups,
const StringArray& disallowed_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery count_query(db());
if (!count_query.Prepare(sql_pt_ext::kCountDeviceConsentGroup)) {
- LOG4CXX_WARN(logger_, "Incorrect count of device consented groups");
+ SDL_LOG_WARN("Incorrect count of device consented groups");
return false;
}
count_query.Bind(0, device_id);
if (!count_query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed count of device consented groups");
+ SDL_LOG_WARN("Failed count of device consented groups");
return false;
}
@@ -281,8 +281,7 @@ bool SQLPTExtRepresentation::SetUserPermissionsForDevice(
// Update old values
if (update) {
if (!query.Prepare(sql_pt_ext::kUpdateDeviceConsentedGroup)) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Incorrect statement for updating consented groups on device");
return false;
}
@@ -298,8 +297,7 @@ bool SQLPTExtRepresentation::SetUserPermissionsForDevice(
query.Bind(3, *it_consented_groups);
// TODO(AOleynik): Get this info from external data
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_,
- "Failed update of device allowed consented groups.");
+ SDL_LOG_WARN("Failed update of device allowed consented groups.");
return false;
}
}
@@ -315,8 +313,7 @@ bool SQLPTExtRepresentation::SetUserPermissionsForDevice(
query.Bind(2, device_id);
query.Bind(3, *it_disallowed_groups);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_,
- "Failed update of device disallowed consented groups.");
+ SDL_LOG_WARN("Failed update of device disallowed consented groups.");
return false;
}
}
@@ -326,8 +323,7 @@ bool SQLPTExtRepresentation::SetUserPermissionsForDevice(
// Insert new values
if (!query.Prepare(sql_pt_ext::kInsertDeviceConsentedGroup)) {
- LOG4CXX_WARN(logger_,
- "Incorrect statement of inserting to device consented groups");
+ SDL_LOG_WARN("Incorrect statement of inserting to device consented groups");
return false;
}
@@ -341,8 +337,7 @@ bool SQLPTExtRepresentation::SetUserPermissionsForDevice(
// TODO(AOleynik): Get this info from external data
query.Bind(3, std::string("GUI"));
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_,
- "Failed insert to device allowed consented groups.");
+ SDL_LOG_WARN("Failed insert to device allowed consented groups.");
return false;
}
}
@@ -357,8 +352,7 @@ bool SQLPTExtRepresentation::SetUserPermissionsForDevice(
query.Bind(2, false);
query.Bind(3);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_,
- "Failed insert to device disallowed consented groups.");
+ SDL_LOG_WARN("Failed insert to device disallowed consented groups.");
return false;
}
}
@@ -376,15 +370,13 @@ bool SQLPTExtRepresentation::ReactOnUserDevConsentForApp(
if (IsPredataPolicy(app_id)) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kHasAppPreloadedGroups)) {
- LOG4CXX_WARN(logger_,
- "Incorrect statement for has app preloaded groups");
+ SDL_LOG_WARN("Incorrect statement for has app preloaded groups");
return false;
}
query.Bind(0, app_id);
query.Bind(1, kPreDataConsentId);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_,
- "Incorrect select for app has predataconsted groups");
+ SDL_LOG_WARN("Incorrect select for app has predataconsted groups");
return false;
}
if (query.GetInteger(0) > 0) {
@@ -408,7 +400,7 @@ bool SQLPTExtRepresentation::ReactOnUserDevConsentForApp(
bool SQLPTExtRepresentation::SetUserPermissionsForApp(
const PermissionConsent& permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// TODO(AOleynik): Handle situation, when no application was specified, i.e.
// general permissions were set
std::vector<FunctionalGroupPermission>::const_iterator it =
@@ -420,7 +412,7 @@ bool SQLPTExtRepresentation::SetUserPermissionsForApp(
for (; it != it_end; ++it) {
utils::dbms::SQLQuery counter(db());
if (!counter.Prepare(sql_pt_ext::kCountAppConsents)) {
- LOG4CXX_WARN(logger_, "Incorrect statement for consent group count.");
+ SDL_LOG_WARN("Incorrect statement for consent group count.");
return false;
}
@@ -428,7 +420,7 @@ bool SQLPTExtRepresentation::SetUserPermissionsForApp(
counter.Bind(1, permissions.policy_app_id);
counter.Bind(2, static_cast<int>((*it).group_id));
if (!counter.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrent count on consent groups.");
+ SDL_LOG_WARN("Incorrent count on consent groups.");
return false;
}
@@ -437,7 +429,7 @@ bool SQLPTExtRepresentation::SetUserPermissionsForApp(
// Update already present consent record
if (update_required) {
if (!query.Prepare(sql_pt_ext::kUpdateGroupPermissions)) {
- LOG4CXX_WARN(logger_, "Incorrect statement for update consent groups.");
+ SDL_LOG_WARN("Incorrect statement for update consent groups.");
return false;
}
@@ -452,9 +444,9 @@ bool SQLPTExtRepresentation::SetUserPermissionsForApp(
query.Bind(4, permissions.device_id);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_,
- "Incorrect update on user defined permissions "
- "for app groups.");
+ SDL_LOG_WARN(
+ "Incorrect update on user defined permissions "
+ "for app groups.");
return false;
}
continue;
@@ -462,8 +454,7 @@ bool SQLPTExtRepresentation::SetUserPermissionsForApp(
// Insert new consent record
if (!query.Prepare(sql_pt_ext::kInsertConsentGroups)) {
- LOG4CXX_WARN(logger_,
- "Incorrect statement for update app group permissions.");
+ SDL_LOG_WARN("Incorrect statement for update app group permissions.");
return false;
}
@@ -478,9 +469,9 @@ bool SQLPTExtRepresentation::SetUserPermissionsForApp(
query.Bind(4, permissions.consent_source);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_,
- "Incorrect insert to user defined permissions "
- "for app groups.");
+ SDL_LOG_WARN(
+ "Incorrect insert to user defined permissions "
+ "for app groups.");
return false;
}
continue;
@@ -493,7 +484,7 @@ std::vector<UserFriendlyMessage> SQLPTExtRepresentation::GetUserFriendlyMsg(
utils::dbms::SQLQuery query(db());
std::vector<UserFriendlyMessage> result;
if (!query.Prepare(sql_pt_ext::kSelectFriendlyMsg)) {
- LOG4CXX_WARN(logger_, "Incorrect statement for select friendly messages.");
+ SDL_LOG_WARN("Incorrect statement for select friendly messages.");
return result;
}
@@ -511,7 +502,7 @@ std::vector<UserFriendlyMessage> SQLPTExtRepresentation::GetUserFriendlyMsg(
query.Bind(1, msg_language);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect select from friendly messages.");
+ SDL_LOG_WARN("Incorrect select from friendly messages.");
return result;
}
@@ -527,9 +518,9 @@ std::vector<UserFriendlyMessage> SQLPTExtRepresentation::GetUserFriendlyMsg(
result.push_back(msg);
if (!query.Reset()) {
- LOG4CXX_WARN(logger_,
- "Failed reset statement for selecting friendly "
- "messages.");
+ SDL_LOG_WARN(
+ "Failed reset statement for selecting friendly "
+ "messages.");
return result;
}
}
@@ -540,7 +531,7 @@ std::vector<UserFriendlyMessage> SQLPTExtRepresentation::GetUserFriendlyMsg(
bool SQLPTExtRepresentation::GatherConsumerFriendlyMessages(
policy_table::ConsumerFriendlyMessages* messages) const {
if (NULL == messages) {
- LOG4CXX_ERROR(logger_, "NULL pointer has been passed to fill");
+ SDL_LOG_ERROR("NULL pointer has been passed to fill");
return false;
}
@@ -583,7 +574,7 @@ bool SQLPTExtRepresentation::GatherConsumerFriendlyMessages(
}
}
} else {
- LOG4CXX_WARN(logger_, "Incorrect statement for select friendly messages.");
+ SDL_LOG_WARN("Incorrect statement for select friendly messages.");
}
return result;
}
@@ -591,10 +582,10 @@ bool SQLPTExtRepresentation::GatherConsumerFriendlyMessages(
bool SQLPTExtRepresentation::SetMetaInfo(const std::string& ccpu_version,
const std::string& wers_country_code,
const std::string& language) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kUpdateMetaParams)) {
- LOG4CXX_WARN(logger_, "Incorrect statement for insert to module meta.");
+ SDL_LOG_WARN("Incorrect statement for insert to module meta.");
return false;
}
@@ -603,22 +594,22 @@ bool SQLPTExtRepresentation::SetMetaInfo(const std::string& ccpu_version,
query.Bind(2, language);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert to module meta.");
+ SDL_LOG_WARN("Incorrect insert to module meta.");
return false;
}
return true;
}
bool SQLPTExtRepresentation::IsMetaInfoPresent() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectMetaParams)) {
- LOG4CXX_WARN(logger_, "Incorrect statement for selecting meta info.");
+ SDL_LOG_WARN("Incorrect statement for selecting meta info.");
return false;
}
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect select from module meta.");
+ SDL_LOG_WARN("Incorrect select from module meta.");
return false;
}
@@ -626,17 +617,17 @@ bool SQLPTExtRepresentation::IsMetaInfoPresent() {
}
bool SQLPTExtRepresentation::SetSystemLanguage(const std::string& language) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kUpdateMetaLanguage)) {
- LOG4CXX_WARN(logger_, "Incorrect statement for update meta language.");
+ SDL_LOG_WARN("Incorrect statement for update meta language.");
return false;
}
query.Bind(0, language);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect update for meta language.");
+ SDL_LOG_WARN("Incorrect update for meta language.");
return false;
}
@@ -645,46 +636,46 @@ bool SQLPTExtRepresentation::SetSystemLanguage(const std::string& language) {
bool SQLPTExtRepresentation::SaveApplicationPoliciesSection(
const policy_table::ApplicationPoliciesSection& policies) {
- LOG4CXX_INFO(logger_, "SaveApplicationPolicies ext");
+ SDL_LOG_INFO("SaveApplicationPolicies ext");
utils::dbms::SQLQuery query_delete(db());
if (!query_delete.Exec(sql_pt::kDeleteAppGroup)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from app_group.");
+ SDL_LOG_WARN("Incorrect delete from app_group.");
return false;
}
utils::dbms::SQLQuery query_delete_preconsented(db());
if (!query_delete_preconsented.Exec(sql_pt_ext::kDeletePreconsentedGroups)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from preconsented_group.");
+ SDL_LOG_WARN("Incorrect delete from preconsented_group.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteApplication)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from application.");
+ SDL_LOG_WARN("Incorrect delete from application.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteRequestType)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from request type.");
+ SDL_LOG_WARN("Incorrect delete from request type.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteRequestSubType)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from request subtype.");
+ SDL_LOG_WARN("Incorrect delete from request subtype.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteAppServiceHandledRpcs)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from handled rpcs.");
+ SDL_LOG_WARN("Incorrect delete from handled rpcs.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteAppServiceNames)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from service names.");
+ SDL_LOG_WARN("Incorrect delete from service names.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteAppServiceTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from handled service types.");
+ SDL_LOG_WARN("Incorrect delete from handled service types.");
return false;
}
@@ -755,7 +746,7 @@ bool SQLPTExtRepresentation::SaveSpecificAppPolicy(
utils::dbms::SQLQuery app_query(db());
if (!app_query.Prepare(sql_pt_ext::kInsertApplication)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement into application.");
+ SDL_LOG_WARN("Incorrect insert statement into application.");
return false;
}
@@ -799,7 +790,7 @@ bool SQLPTExtRepresentation::SaveSpecificAppPolicy(
: app_query.Bind(16);
if (!app_query.Exec() || !app_query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into application.");
+ SDL_LOG_WARN("Incorrect insert into application.");
return false;
}
@@ -843,8 +834,7 @@ bool policy::SQLPTExtRepresentation::SaveDevicePolicy(
const policy_table::DevicePolicy& device) {
utils::dbms::SQLQuery app_query(db());
if (!app_query.Prepare(sql_pt_ext::kInsertApplication)) {
- LOG4CXX_WARN(logger_,
- "Incorrect insert statement into application (device).");
+ SDL_LOG_WARN("Incorrect insert statement into application (device).");
return false;
}
app_query.Bind(0, kDeviceId);
@@ -859,7 +849,7 @@ bool policy::SQLPTExtRepresentation::SaveDevicePolicy(
app_query.Bind(7, 0);
if (!app_query.Exec() || !app_query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into application.");
+ SDL_LOG_WARN("Incorrect insert into application.");
return false;
}
@@ -875,10 +865,10 @@ bool policy::SQLPTExtRepresentation::SaveDevicePolicy(
bool SQLPTExtRepresentation::GatherApplicationPoliciesSection(
policy_table::ApplicationPoliciesSection* policies) const {
- LOG4CXX_INFO(logger_, "Gather applications policies");
+ SDL_LOG_INFO("Gather applications policies");
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectAppPolicies)) {
- LOG4CXX_WARN(logger_, "Incorrect select from app_policies");
+ SDL_LOG_WARN("Incorrect select from app_policies");
return false;
}
@@ -990,7 +980,7 @@ void SQLPTExtRepresentation::GatherPreconsentedGroup(
const std::string& app_id, policy_table::Strings* groups) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectPreconsentedGroups)) {
- LOG4CXX_WARN(logger_, "Incorrect select from preconsented group");
+ SDL_LOG_WARN("Incorrect select from preconsented group");
return;
}
@@ -1002,10 +992,10 @@ void SQLPTExtRepresentation::GatherPreconsentedGroup(
bool SQLPTExtRepresentation::GatherUsageAndErrorCounts(
policy_table::UsageAndErrorCounts* counts) const {
- LOG4CXX_INFO(logger_, "Gather Usage and Error Counts.");
+ SDL_LOG_INFO("Gather Usage and Error Counts.");
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectUsageAndErrorCount) || !query.Exec()) {
- LOG4CXX_INFO(logger_, "Failed select from user_and_error_count");
+ SDL_LOG_INFO("Failed select from user_and_error_count");
return false;
}
@@ -1020,9 +1010,8 @@ bool SQLPTExtRepresentation::GatherAppLevels(
policy_table::AppLevels* apps) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectAppLevels)) {
- LOG4CXX_INFO(logger_,
- "Failed select from app_level. SQLError = "
- << query.LastError().text());
+ SDL_LOG_INFO("Failed select from app_level. SQLError = "
+ << query.LastError().text());
return false;
}
while (query.Next()) {
@@ -1051,10 +1040,10 @@ bool SQLPTExtRepresentation::GatherAppLevels(
void SQLPTExtRepresentation::GatherDeviceData(
policy_table::DeviceData* data) const {
- LOG4CXX_INFO(logger_, "Gather device data.");
+ SDL_LOG_INFO("Gather device data.");
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectDeviceData)) {
- LOG4CXX_WARN(logger_, "Incorrect select statement for device data.");
+ SDL_LOG_WARN("Incorrect select statement for device data.");
return;
}
data->mark_initialized();
@@ -1076,12 +1065,11 @@ void SQLPTExtRepresentation::GatherDeviceData(
void SQLPTExtRepresentation::GatherConsentGroup(
const std::string& device_id,
policy_table::UserConsentRecords* records) const {
- LOG4CXX_INFO(logger_, "Gather consent records.");
+ SDL_LOG_INFO("Gather consent records.");
utils::dbms::SQLQuery query(db());
// Fill data for device
if (!query.Prepare(sql_pt_ext::kSelectDeviceConsentedGroup)) {
- LOG4CXX_WARN(logger_,
- "Incorrect select statement for device consented groups.");
+ SDL_LOG_WARN("Incorrect select statement for device consented groups.");
return;
}
@@ -1107,8 +1095,7 @@ void SQLPTExtRepresentation::GatherConsentGroup(
// Fill data for applications
if (!query.Prepare(sql_pt_ext::kSelectConsentGroup)) {
- LOG4CXX_WARN(logger_,
- "Incorrect select statement for app consented groups.");
+ SDL_LOG_WARN("Incorrect select statement for app consented groups.");
return;
}
@@ -1135,8 +1122,7 @@ void SQLPTExtRepresentation::GatherConsentGroup(
// Fill data for ExternalConsent consents
if (!query.Prepare(sql_pt_ext::kSelectExternalConsentStatusGroup)) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Incorrect select statement for ExternalConsent consented groups.");
return;
}
@@ -1159,31 +1145,31 @@ void SQLPTExtRepresentation::GatherConsentGroup(
bool SQLPTExtRepresentation::SaveDeviceData(
const policy_table::DeviceData& devices) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery drop_device_query(db());
const std::string drop_device = "DELETE FROM `device`";
if (!drop_device_query.Exec(drop_device)) {
- LOG4CXX_WARN(logger_, "Could not clear device table.");
+ SDL_LOG_WARN("Could not clear device table.");
return false;
}
utils::dbms::SQLQuery drop_device_consents_query(db());
const std::string drop_device_consents = "DELETE FROM `device_consent_group`";
if (!drop_device_consents_query.Exec(drop_device_consents)) {
- LOG4CXX_WARN(logger_, "Could not clear device consents.");
+ SDL_LOG_WARN("Could not clear device consents.");
return false;
}
utils::dbms::SQLQuery drop_user_consents_query(db());
const std::string drop_user_consents = "DELETE FROM `consent_group`";
if (!drop_user_consents_query.Exec(drop_user_consents)) {
- LOG4CXX_WARN(logger_, "Could not clear user consents.");
+ SDL_LOG_WARN("Could not clear user consents.");
return false;
}
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kInsertDeviceData)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for device data.");
+ SDL_LOG_WARN("Incorrect insert statement for device data.");
return false;
}
@@ -1200,7 +1186,7 @@ bool SQLPTExtRepresentation::SaveDeviceData(
query.Bind(7, *(it->second.connection_type));
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into device data.");
+ SDL_LOG_WARN("Incorrect insert into device data.");
return false;
}
@@ -1216,7 +1202,7 @@ bool SQLPTExtRepresentation::SaveDeviceData(
bool SQLPTExtRepresentation::SaveConsentGroup(
const std::string& device_id,
const policy_table::UserConsentRecords& records) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
policy_table::UserConsentRecords::const_iterator it = records.begin();
@@ -1230,8 +1216,7 @@ bool SQLPTExtRepresentation::SaveConsentGroup(
for (; it_groups != it_groups_end; ++it_groups) {
if (kDeviceId == it->first) {
if (!query.Prepare(sql_pt_ext::kInsertDeviceConsentedGroup)) {
- LOG4CXX_WARN(logger_,
- "Incorrect insert statement for device consent group.");
+ SDL_LOG_WARN("Incorrect insert statement for device consent group.");
return false;
}
query.Bind(0, device_id);
@@ -1241,16 +1226,13 @@ bool SQLPTExtRepresentation::SaveConsentGroup(
3,
std::string(policy_table::EnumToJsonString(*(it->second.input))));
query.Bind(4, std::string(*(it->second.time_stamp)));
- LOG4CXX_INFO(logger_,
- "Device:"
- << "time stamp "
- << std::string(*(it->second.time_stamp)) << " group "
- << it_groups->first << " consent "
- << it_groups->second);
+ SDL_LOG_INFO("Device:"
+ << "time stamp " << std::string(*(it->second.time_stamp))
+ << " group " << it_groups->first << " consent "
+ << it_groups->second);
} else {
if (!query.Prepare(sql_pt_ext::kInsertConsentGroups)) {
- LOG4CXX_WARN(logger_,
- "Incorrect insert statement for consent group.");
+ SDL_LOG_WARN("Incorrect insert statement for consent group.");
return false;
}
query.Bind(0, device_id);
@@ -1262,16 +1244,14 @@ bool SQLPTExtRepresentation::SaveConsentGroup(
std::string(policy_table::EnumToJsonString(*(it->second.input))));
query.Bind(5, std::string(*(it->second.time_stamp)));
query.Bind(6, (it->second.consent_last_updated));
- LOG4CXX_INFO(logger_,
- "Device:"
- << "time stamp "
- << std::string(*(it->second.time_stamp)) << " group "
- << it_groups->first << " consent "
- << it_groups->second);
+ SDL_LOG_INFO("Device:"
+ << "time stamp " << std::string(*(it->second.time_stamp))
+ << " group " << it_groups->first << " consent "
+ << it_groups->second);
}
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into consent group.");
+ SDL_LOG_WARN("Incorrect insert into consent group.");
return false;
}
}
@@ -1284,8 +1264,7 @@ bool SQLPTExtRepresentation::SaveConsentGroup(
for (; end_external_consent_consent != it_external_consent_consent;
++it_external_consent_consent) {
if (!query.Prepare(sql_pt_ext::kInsertExternalConsentStatusGroups)) {
- LOG4CXX_WARN(logger_,
- "Incorrect insert statement for external consent group.");
+ SDL_LOG_WARN("Incorrect insert statement for external consent group.");
return false;
}
query.Bind(0, device_id);
@@ -1296,14 +1275,13 @@ bool SQLPTExtRepresentation::SaveConsentGroup(
4, std::string(policy_table::EnumToJsonString(*(it->second.input))));
query.Bind(5, std::string(*(it->second.time_stamp)));
query.Bind(6, (it->second.ext_consent_last_updated));
- LOG4CXX_INFO(logger_,
- "Device:"
- << "time stamp " << std::string(*(it->second.time_stamp))
- << " group " << it_external_consent_consent->first
- << " consent " << it_external_consent_consent->second);
+ SDL_LOG_INFO("Device:"
+ << "time stamp " << std::string(*(it->second.time_stamp))
+ << " group " << it_external_consent_consent->first
+ << " consent " << it_external_consent_consent->second);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into external consent group.");
+ SDL_LOG_WARN("Incorrect insert into external consent group.");
return false;
}
} // external_consent_consent_group
@@ -1314,10 +1292,10 @@ bool SQLPTExtRepresentation::SaveConsentGroup(
bool SQLPTExtRepresentation::SavePreconsentedGroup(
const std::string& app_id, const policy_table::Strings& groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kInsertPreconsentedGroups)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for preconsented groups");
+ SDL_LOG_WARN("Incorrect insert statement for preconsented groups");
return false;
}
@@ -1326,7 +1304,7 @@ bool SQLPTExtRepresentation::SavePreconsentedGroup(
query.Bind(0, app_id);
query.Bind(1, *it);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into preconsented groups.");
+ SDL_LOG_WARN("Incorrect insert into preconsented groups.");
return false;
}
}
@@ -1336,7 +1314,7 @@ bool SQLPTExtRepresentation::SavePreconsentedGroup(
void SQLPTExtRepresentation::GatherModuleMeta(
policy_table::ModuleMeta* meta) const {
- LOG4CXX_INFO(logger_, "Gather Module Meta Info");
+ SDL_LOG_INFO("Gather Module Meta Info");
utils::dbms::SQLQuery query(db());
if (query.Prepare(sql_pt_ext::kSelectModuleMeta) && query.Next()) {
*meta->ccpu_version = query.GetString(0);
@@ -1354,19 +1332,19 @@ void SQLPTExtRepresentation::Increment(const std::string& type) const {
std::string update_counter =
"UPDATE `usage_and_error_count` SET `" + type + "` = `" + type + "` + 1";
if (!query.Exec(update_counter)) {
- LOG4CXX_INFO(logger_, "Failed updating global counter");
+ SDL_LOG_INFO("Failed updating global counter");
}
}
bool SQLPTExtRepresentation::IsExistAppLevel(const std::string& app_id) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kCountAppLevel)) {
- LOG4CXX_INFO(logger_, "Incorrect statement of count app_level");
+ SDL_LOG_INFO("Incorrect statement of count app_level");
return false;
}
query.Bind(0, app_id);
if (!query.Exec()) {
- LOG4CXX_INFO(logger_, "Failed count app_level");
+ SDL_LOG_INFO("Failed count app_level");
return false;
}
return query.GetInteger(0) > 0;
@@ -1374,10 +1352,10 @@ bool SQLPTExtRepresentation::IsExistAppLevel(const std::string& app_id) const {
bool SQLPTExtRepresentation::GetAllAppGroups(const std::string& policy_app_id,
FunctionalGroupIDs& all_groups) {
- LOG4CXX_INFO(logger_, "GetAllAppGroups for '" << policy_app_id << "'");
+ SDL_LOG_INFO("GetAllAppGroups for '" << policy_app_id << "'");
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectAppGroupsId)) {
- LOG4CXX_WARN(logger_, "Incorrect statement for select app groups id.");
+ SDL_LOG_WARN("Incorrect statement for select app groups id.");
return false;
}
@@ -1395,10 +1373,10 @@ bool SQLPTExtRepresentation::GetConsentedGroups(
const std::string& device_id,
FunctionalGroupIDs& allowed_groups,
FunctionalGroupIDs& disallowed_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectConsentedGroupsId)) {
- LOG4CXX_WARN(logger_, "Incorrect statement for select consent groups id.");
+ SDL_LOG_WARN("Incorrect statement for select consent groups id.");
return false;
}
@@ -1418,11 +1396,10 @@ bool SQLPTExtRepresentation::GetConsentedGroups(
bool SQLPTExtRepresentation::GetPreconsentedGroups(
const std::string& policy_app_id, FunctionalGroupIDs& preconsented_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectPreconsentedGroupsId)) {
- LOG4CXX_WARN(logger_,
- "Incorrect statement for select preconsented groups id.");
+ SDL_LOG_WARN("Incorrect statement for select preconsented groups id.");
return false;
}
@@ -1437,11 +1414,10 @@ bool SQLPTExtRepresentation::GetPreconsentedGroups(
bool SQLPTExtRepresentation::GetFunctionalGroupNames(
FunctionalGroupNames& names) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectFunctionalGroupNames)) {
- LOG4CXX_WARN(logger_,
- "Incorrect statement for select functional groups names.");
+ SDL_LOG_WARN("Incorrect statement for select functional groups names.");
return false;
}
@@ -1491,12 +1467,12 @@ void SQLPTExtRepresentation::Increment(const std::string& app_id,
"VALUES (?, 1)";
}
if (!query.Prepare(sql_counter)) {
- LOG4CXX_INFO(logger_, "Incorrect statement of update app counter");
+ SDL_LOG_INFO("Incorrect statement of update app counter");
return;
}
query.Bind(0, app_id);
if (!query.Exec()) {
- LOG4CXX_INFO(logger_, "Failed updating app counter");
+ SDL_LOG_INFO("Failed updating app counter");
}
}
@@ -1517,13 +1493,13 @@ void SQLPTExtRepresentation::Set(const std::string& app_id,
"VALUES (?, ?)";
}
if (!query.Prepare(sql_info)) {
- LOG4CXX_INFO(logger_, "Incorrect statement of update app info");
+ SDL_LOG_INFO("Incorrect statement of update app info");
return;
}
query.Bind(0, value);
query.Bind(1, app_id);
if (!query.Exec()) {
- LOG4CXX_INFO(logger_, "Failed updating app info");
+ SDL_LOG_INFO("Failed updating app info");
}
}
@@ -1543,29 +1519,29 @@ void SQLPTExtRepresentation::Add(const std::string& app_id,
"VALUES (?, ?)";
}
if (!query.Prepare(sql_stopwatch)) {
- LOG4CXX_INFO(logger_, "Incorrect statement of update app stopwatch");
+ SDL_LOG_INFO("Incorrect statement of update app stopwatch");
return;
}
query.Bind(0, seconds);
query.Bind(1, app_id);
if (!query.Exec()) {
- LOG4CXX_INFO(logger_, "Failed updating app stopwatch");
+ SDL_LOG_INFO("Failed updating app stopwatch");
}
}
bool SQLPTExtRepresentation::GetDefaultHMI(const std::string& policy_app_id,
std::string* default_hmi) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectDefaultHmi)) {
- LOG4CXX_INFO(logger_, "Incorrect statement for default hmi.");
+ SDL_LOG_INFO("Incorrect statement for default hmi.");
return false;
}
query.Bind(0, policy_app_id);
if (!query.Exec()) {
- LOG4CXX_INFO(logger_, "Error during default hmi getting.");
+ SDL_LOG_INFO("Error during default hmi getting.");
return false;
}
@@ -1583,10 +1559,10 @@ bool SQLPTExtRepresentation::CountUnconsentedGroups(
const std::string& policy_app_id,
const std::string& device_id,
int* result) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kCountUnconsentedGroups)) {
- LOG4CXX_WARN(logger_, "Incorrect select for unconsented groups.");
+ SDL_LOG_WARN("Incorrect select for unconsented groups.");
return false;
}
@@ -1596,7 +1572,7 @@ bool SQLPTExtRepresentation::CountUnconsentedGroups(
query.Bind(3, kPreDataConsentId);
if (!query.Exec()) {
- LOG4CXX_INFO(logger_, "Error during executing unconsented groups.");
+ SDL_LOG_INFO("Error during executing unconsented groups.");
return false;
}
*result = query.GetInteger(0);
@@ -1607,7 +1583,7 @@ bool SQLPTExtRepresentation::IsMsgLanguagePresent(const std::string& message,
const std::string& language) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kHasMsgLanguageCode)) {
- LOG4CXX_WARN(logger_, "Incorrect statement for message language check.");
+ SDL_LOG_WARN("Incorrect statement for message language check.");
return false;
}
@@ -1615,7 +1591,7 @@ bool SQLPTExtRepresentation::IsMsgLanguagePresent(const std::string& message,
query.Bind(1, language);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed to check message language code.");
+ SDL_LOG_WARN("Failed to check message language code.");
return false;
}
@@ -1628,7 +1604,7 @@ bool SQLPTExtRepresentation::SaveMessageString(
const policy_table::MessageString& strings) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertMessageString)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for message.");
+ SDL_LOG_WARN("Incorrect insert statement for message.");
return false;
}
@@ -1651,7 +1627,7 @@ bool SQLPTExtRepresentation::SaveMessageString(
}
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into message.");
+ SDL_LOG_WARN("Incorrect insert into message.");
return false;
}
@@ -1668,7 +1644,7 @@ bool SQLPTExtRepresentation::SaveModuleMeta(
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSaveModuleMeta)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for module_meta.");
+ SDL_LOG_WARN("Incorrect insert statement for module_meta.");
return false;
}
const int64_t odometer = *(meta.pt_exchanged_at_odometer_x);
@@ -1682,7 +1658,7 @@ bool SQLPTExtRepresentation::SaveModuleMeta(
query.Bind(6, *(meta.vin));
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect update for module_meta.");
+ SDL_LOG_WARN("Incorrect update for module_meta.");
return false;
}
@@ -1693,11 +1669,11 @@ bool SQLPTExtRepresentation::SaveAppCounters(
const rpc::policy_table_interface_base::AppLevels& app_levels) {
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDeleteAppLevel)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from app level.");
+ SDL_LOG_WARN("Incorrect delete from app level.");
return false;
}
if (!query.Prepare(sql_pt::kInsertAppLevel)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for app level.");
+ SDL_LOG_WARN("Incorrect insert statement for app level.");
return false;
}
@@ -1721,7 +1697,7 @@ bool SQLPTExtRepresentation::SaveAppCounters(
query.Bind(15, it->second.count_of_tls_errors);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into app level.");
+ SDL_LOG_WARN("Incorrect insert into app level.");
return false;
}
}
@@ -1732,7 +1708,7 @@ bool SQLPTExtRepresentation::SaveGlobalCounters(
const rpc::policy_table_interface_base::UsageAndErrorCounts& counts) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kUpdateGlobalCounters)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for global counters.");
+ SDL_LOG_WARN("Incorrect insert statement for global counters.");
return false;
}
@@ -1741,7 +1717,7 @@ bool SQLPTExtRepresentation::SaveGlobalCounters(
query.Bind(2, *counts.count_of_sync_reboots);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into global counters.");
+ SDL_LOG_WARN("Incorrect insert into global counters.");
return false;
}
@@ -1750,22 +1726,22 @@ bool SQLPTExtRepresentation::SaveGlobalCounters(
bool SQLPTExtRepresentation::CleanupUnpairedDevices(
const DeviceIds& device_ids) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery delete_device_query(db());
if (!delete_device_query.Prepare(sql_pt::kDeleteDevice)) {
- LOG4CXX_WARN(logger_, "Incorrect statement for device delete.");
+ SDL_LOG_WARN("Incorrect statement for device delete.");
return true;
}
utils::dbms::SQLQuery delete_device_consent_query(db());
if (!delete_device_consent_query.Prepare(sql_pt_ext::kDeleteDeviceConsent)) {
- LOG4CXX_WARN(logger_, "Incorrect statement for delete device consent.");
+ SDL_LOG_WARN("Incorrect statement for delete device consent.");
return false;
}
utils::dbms::SQLQuery delete_app_consent_query(db());
if (!delete_app_consent_query.Prepare(sql_pt_ext::kDeleteAppConsent)) {
- LOG4CXX_WARN(logger_, "Incorrect statement for delete app consent.");
+ SDL_LOG_WARN("Incorrect statement for delete app consent.");
return false;
}
@@ -1774,20 +1750,20 @@ bool SQLPTExtRepresentation::CleanupUnpairedDevices(
for (; it != it_end; ++it) {
delete_device_query.Bind(0, (*it));
if (!delete_device_query.Exec() || !delete_device_query.Reset()) {
- LOG4CXX_WARN(logger_, "Failed to delete from device");
+ SDL_LOG_WARN("Failed to delete from device");
return false;
}
delete_device_consent_query.Bind(0, (*it));
if (!delete_device_consent_query.Exec() ||
!delete_device_consent_query.Reset()) {
- LOG4CXX_WARN(logger_, "Failed to delete from device consent.");
+ SDL_LOG_WARN("Failed to delete from device consent.");
return false;
}
delete_app_consent_query.Bind(0, (*it));
if (!delete_app_consent_query.Exec() || !delete_app_consent_query.Reset()) {
- LOG4CXX_WARN(logger_, "Failed to delete from app consent.");
+ SDL_LOG_WARN("Failed to delete from app consent.");
return false;
}
}
@@ -1797,22 +1773,22 @@ bool SQLPTExtRepresentation::CleanupUnpairedDevices(
bool SQLPTExtRepresentation::SetDefaultPolicy(const std::string& app_id) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kDeleteAppGroupByApplicationId)) {
- LOG4CXX_ERROR(logger_, "Incorrect statement to delete from app_group.");
+ SDL_LOG_ERROR("Incorrect statement to delete from app_group.");
return false;
}
query.Bind(0, app_id);
if (!query.Exec()) {
- LOG4CXX_ERROR(logger_, "Failed deleting from app_group.");
+ SDL_LOG_ERROR("Failed deleting from app_group.");
return false;
}
if (!query.Prepare(sql_pt_ext::kDeletePreconsentedGroupsByApplicationId)) {
- LOG4CXX_ERROR(logger_, "Incorrect statement to delete from app_group.");
+ SDL_LOG_ERROR("Incorrect statement to delete from app_group.");
return false;
}
query.Bind(0, app_id);
if (!query.Exec()) {
- LOG4CXX_ERROR(logger_, "Failed deleting from app_group.");
+ SDL_LOG_ERROR("Failed deleting from app_group.");
return false;
}
@@ -1835,26 +1811,25 @@ bool SQLPTExtRepresentation::SetDefaultPolicy(const std::string& app_id) {
}
bool SQLPTExtRepresentation::SetPredataPolicy(const std::string& app_id) {
- LOG4CXX_INFO(logger_,
- "SQLPTExtRepresentation::SetPredataPolicy for " << app_id);
+ SDL_LOG_INFO("SQLPTExtRepresentation::SetPredataPolicy for " << app_id);
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kDeleteAppGroupByApplicationId)) {
- LOG4CXX_ERROR(logger_, "Incorrect statement to delete from app_group.");
+ SDL_LOG_ERROR("Incorrect statement to delete from app_group.");
return false;
}
query.Bind(0, app_id);
if (!query.Exec()) {
- LOG4CXX_ERROR(logger_, "Failed deleting from app_group.");
+ SDL_LOG_ERROR("Failed deleting from app_group.");
return false;
}
if (!query.Prepare(sql_pt_ext::kDeletePreconsentedGroupsByApplicationId)) {
- LOG4CXX_ERROR(logger_, "Incorrect statement to delete from app_group.");
+ SDL_LOG_ERROR("Incorrect statement to delete from app_group.");
return false;
}
query.Bind(0, app_id);
if (!query.Exec()) {
- LOG4CXX_ERROR(logger_, "Failed deleting from app_group.");
+ SDL_LOG_ERROR("Failed deleting from app_group.");
return false;
}
@@ -1878,13 +1853,13 @@ bool SQLPTExtRepresentation::SetPredataPolicy(const std::string& app_id) {
bool SQLPTExtRepresentation::IsPredataPolicy(const std::string& app_id) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectApplicationIsPreData)) {
- LOG4CXX_WARN(logger_, "Incorrect select application is pre_dataConsented");
+ SDL_LOG_WARN("Incorrect select application is pre_dataConsented");
return false;
}
query.Bind(0, app_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed select application is pre_dataConsented");
+ SDL_LOG_WARN("Failed select application is pre_dataConsented");
return false;
}
return query.IsNull(0) ? false : query.GetBoolean(0);
@@ -1892,17 +1867,17 @@ bool SQLPTExtRepresentation::IsPredataPolicy(const std::string& app_id) const {
bool SQLPTExtRepresentation::SetIsPredata(const std::string& app_id,
bool is_pre_data) {
- LOG4CXX_TRACE(logger_, "Set flag is_predata of application");
+ SDL_LOG_TRACE("Set flag is_predata of application");
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kUpdateIsPredata)) {
- LOG4CXX_WARN(logger_, "Incorect statement for updating is_predata");
+ SDL_LOG_WARN("Incorect statement for updating is_predata");
return false;
}
query.Bind(0, is_pre_data);
query.Bind(1, app_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed update is_predata");
+ SDL_LOG_WARN("Failed update is_predata");
return false;
}
return true;
@@ -1910,27 +1885,27 @@ bool SQLPTExtRepresentation::SetIsPredata(const std::string& app_id,
bool SQLPTExtRepresentation::SetUnpairedDevice(const std::string& device_id,
bool unpaired) const {
- LOG4CXX_TRACE(logger_, "Set unpaired device: " << device_id);
+ SDL_LOG_TRACE("Set unpaired device: " << device_id);
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kUpdateUnpairedDevice)) {
- LOG4CXX_WARN(logger_, "Incorect statement for updating unpaired device");
+ SDL_LOG_WARN("Incorect statement for updating unpaired device");
return false;
}
query.Bind(0, unpaired);
query.Bind(1, device_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed update unpaired device");
+ SDL_LOG_WARN("Failed update unpaired device");
return false;
}
return true;
}
bool SQLPTExtRepresentation::UnpairedDevicesList(DeviceIds* device_ids) const {
- LOG4CXX_TRACE(logger_, "Get list of unpaired devices");
+ SDL_LOG_TRACE("Get list of unpaired devices");
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectUnpairedDevices)) {
- LOG4CXX_WARN(logger_, "Incorect statement for selecting unpaired devices");
+ SDL_LOG_WARN("Incorect statement for selecting unpaired devices");
return false;
}
@@ -1943,7 +1918,7 @@ bool SQLPTExtRepresentation::UnpairedDevicesList(DeviceIds* device_ids) const {
bool SQLPTExtRepresentation::SetVINValue(const std::string& value) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kUpdateModuleMetaVinParam)) {
- LOG4CXX_WARN(logger_, "Incorect statement for updating module_meta params");
+ SDL_LOG_WARN("Incorect statement for updating module_meta params");
return false;
}
@@ -1951,18 +1926,17 @@ bool SQLPTExtRepresentation::SetVINValue(const std::string& value) {
const bool result = query.Exec();
if (!result) {
- LOG4CXX_WARN(logger_, "Failed update module_meta");
+ SDL_LOG_WARN("Failed update module_meta");
}
return result;
}
bool SQLPTExtRepresentation::SaveExternalConsentStatus(
const ExternalConsentStatus& status) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kInsertExternalConsentStatus)) {
- LOG4CXX_ERROR(logger_,
- "Incorrect statement for saving external consent status.");
+ SDL_LOG_ERROR("Incorrect statement for saving external consent status.");
return false;
}
@@ -1978,7 +1952,7 @@ bool SQLPTExtRepresentation::SaveExternalConsentStatus(
policy::kStatusOn == it->status_ ? std::string("ON")
: std::string("OFF"));
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_ERROR(logger_, "Error during ExternalConsent status saving.");
+ SDL_LOG_ERROR("Error during ExternalConsent status saving.");
return false;
}
}
@@ -1987,11 +1961,10 @@ bool SQLPTExtRepresentation::SaveExternalConsentStatus(
}
ExternalConsentStatus SQLPTExtRepresentation::GetExternalConsentStatus() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectExternalConsentStatus)) {
- LOG4CXX_ERROR(logger_,
- "Incorrect statement for selecting external consent status.");
+ SDL_LOG_ERROR("Incorrect statement for selecting external consent status.");
return ExternalConsentStatus();
}
@@ -2013,14 +1986,14 @@ bool SQLPTExtRepresentation::RemoveAppConsentForGroup(
const std::string& functional_group_name) const {
utils::dbms::SQLQuery query_group_id(db());
if (!query_group_id.Prepare(sql_pt_ext::kSelectGroupId)) {
- LOG4CXX_WARN(logger_, "Incorect statement for select group name.");
+ SDL_LOG_WARN("Incorect statement for select group name.");
return false;
}
query_group_id.Bind(0, functional_group_name);
if (!query_group_id.Exec()) {
- LOG4CXX_WARN(logger_, "Failed to select group id.");
+ SDL_LOG_WARN("Failed to select group id.");
return false;
}
@@ -2028,7 +2001,7 @@ bool SQLPTExtRepresentation::RemoveAppConsentForGroup(
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kDeleteAppGroupConsent)) {
- LOG4CXX_WARN(logger_, "Incorect statement for remove app consent.");
+ SDL_LOG_WARN("Incorect statement for remove app consent.");
return false;
}
@@ -2036,7 +2009,7 @@ bool SQLPTExtRepresentation::RemoveAppConsentForGroup(
query.Bind(1, id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed to remove app consent.");
+ SDL_LOG_WARN("Failed to remove app consent.");
return false;
}
diff --git a/src/components/policy/policy_external/src/sql_pt_queries.cc b/src/components/policy/policy_external/src/sql_pt_queries.cc
index 4f858637d7..9e69d2cef8 100644
--- a/src/components/policy/policy_external/src/sql_pt_queries.cc
+++ b/src/components/policy/policy_external/src/sql_pt_queries.cc
@@ -113,6 +113,17 @@ const std::string kCreateSchema =
"CREATE INDEX IF NOT EXISTS "
"`notifications_by_priority.fk_notifications_by_priority_priority1_idx` "
" ON `notifications_by_priority`(`priority_value`); "
+ "CREATE TABLE IF NOT EXISTS `subtle_notifications_by_priority`( "
+ " `priority_value` VARCHAR(45) PRIMARY KEY NOT NULL, "
+ " `value` INTEGER NOT NULL, "
+ " CONSTRAINT `fk_subtle_notifications_by_priority_priority1` "
+ " FOREIGN KEY(`priority_value`) "
+ " REFERENCES `priority`(`value`) "
+ "); "
+ "CREATE INDEX IF NOT EXISTS "
+ "`subtle_notifications_by_priority.fk_subtle_notifications_by_priority_"
+ "priority1_idx` "
+ " ON `subtle_notifications_by_priority`(`priority_value`); "
"CREATE TABLE IF NOT EXISTS `language`( "
" `code` VARCHAR(25) PRIMARY KEY NOT NULL "
"); "
@@ -469,6 +480,7 @@ const std::string kCreateSchema =
" `until` VARCHAR(45), "
" `removed` BOOL, "
" `deprecated` BOOL, "
+ " `defvalue` VARCHAR(65535), "
" `minvalue` INTEGER, "
" `maxvalue` INTEGER, "
" `minsize` INTEGER, "
@@ -623,6 +635,10 @@ const std::string kDropSchema =
"DROP INDEX IF EXISTS "
"`notifications_by_priority.fk_notifications_by_priority_priority1_idx`; "
"DROP TABLE IF EXISTS `notifications_by_priority`; "
+ "DROP INDEX IF EXISTS "
+ "`subtle_notifications_by_priority.fk_subtle_notifications_by_priority_"
+ "priority1_idx`; "
+ "DROP TABLE IF EXISTS `subtle_notifications_by_priority`; "
"DROP TABLE IF EXISTS `hmi_level`; "
"DROP TABLE IF EXISTS `hybrid_app_preference`; "
"DROP TABLE IF EXISTS `priority`; "
@@ -664,6 +680,7 @@ const std::string kDeleteData =
"DELETE FROM `message_type`; "
"DELETE FROM `language`; "
"DELETE FROM `notifications_by_priority`; "
+ "DELETE FROM `subtle_notifications_by_priority`; "
"DELETE FROM `hmi_level`; "
"DELETE FROM `priority`; "
"DELETE FROM `functional_group`; "
@@ -743,13 +760,14 @@ const std::string kInsertVehicleDataItem =
" `until`, "
" `removed`, "
" `deprecated`, "
+ " `defvalue`, "
" `minvalue`, "
" `maxvalue`, "
" `minsize`, "
" `maxsize`, "
" `minlength`, "
" `maxlength`) "
- "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ";
+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ";
const std::string kInsertVehicleDataItemParams =
"INSERT INTO `vehicle_data_item_parameters` ("
@@ -875,6 +893,11 @@ const std::string kInsertNotificationsByPriority =
"`value`) "
" VALUES (?, ?)";
+const std::string kInsertSubtleNotificationsByPriority =
+ "INSERT OR REPLACE INTO `subtle_notifications_by_priority` "
+ "(`priority_value`, `value`) "
+ " VALUES (?, ?)";
+
const std::string kInsertDeviceData =
"INSERT OR IGNORE INTO `device` (`id`) VALUES (?)";
@@ -922,6 +945,9 @@ const std::string kSelectEndpoints =
const std::string kSelectNotificationsPerMin =
"SELECT `priority_value`, `value` FROM notifications_by_priority";
+const std::string kSelectSubtleNotificationsPerMin =
+ "SELECT `priority_value`, `value` FROM subtle_notifications_by_priority";
+
const std::string kSelectNotificationsPerPriority =
"SELECT `value` FROM notifications_by_priority WHERE `priority_value` = ? ";
diff --git a/src/components/policy/policy_external/src/sql_pt_representation.cc b/src/components/policy/policy_external/src/sql_pt_representation.cc
index 5e96d0bde0..d4458ef2a5 100644
--- a/src/components/policy/policy_external/src/sql_pt_representation.cc
+++ b/src/components/policy/policy_external/src/sql_pt_representation.cc
@@ -51,7 +51,7 @@
namespace policy {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Policy")
+SDL_CREATE_LOG_VARIABLE("Policy")
namespace dbms = utils::dbms;
@@ -108,9 +108,8 @@ void SQLPTRepresentation::CheckPermissions(const PTString& app_id,
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectRpc)) {
- LOG4CXX_WARN(
- logger_,
- "Incorrect select statement from rpcs" << query.LastError().text());
+ SDL_LOG_WARN("Incorrect select statement from rpcs"
+ << query.LastError().text());
return;
}
query.Bind(0, app_id);
@@ -119,8 +118,7 @@ void SQLPTRepresentation::CheckPermissions(const PTString& app_id,
bool ret = query.Next();
result.hmi_level_permitted = ret ? kRpcAllowed : kRpcDisallowed;
- LOG4CXX_INFO(logger_,
- "Level is " << (result.hmi_level_permitted == kRpcAllowed
+ SDL_LOG_INFO("Level is " << (result.hmi_level_permitted == kRpcAllowed
? "permitted"
: "not permitted"));
std::string parameter;
@@ -141,7 +139,7 @@ bool SQLPTRepresentation::IsPTPreloaded() {
int SQLPTRepresentation::IgnitionCyclesBeforeExchange() {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectIgnitionCycles) || !query.Exec()) {
- LOG4CXX_WARN(logger_, "Can not select ignition cycles");
+ SDL_LOG_WARN("Can not select ignition cycles");
return 0;
}
int limit = query.GetInteger(0);
@@ -157,7 +155,7 @@ int SQLPTRepresentation::IgnitionCyclesBeforeExchange() {
int SQLPTRepresentation::KilometersBeforeExchange(int current) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectKilometers) || !query.Exec()) {
- LOG4CXX_WARN(logger_, "Can not select kilometers");
+ SDL_LOG_WARN("Can not select kilometers");
return 0;
}
int limit = query.GetInteger(0);
@@ -173,17 +171,16 @@ int SQLPTRepresentation::KilometersBeforeExchange(int current) {
bool SQLPTRepresentation::SetCountersPassedForSuccessfulUpdate(
int kilometers, int days_after_epoch) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdateCountersSuccessfulUpdate)) {
- LOG4CXX_WARN(logger_,
- "Wrong update query for counters on successful update.");
+ SDL_LOG_WARN("Wrong update query for counters on successful update.");
return false;
}
query.Bind(0, kilometers);
query.Bind(1, days_after_epoch);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed to update counters on successful update.");
+ SDL_LOG_WARN("Failed to update counters on successful update.");
return false;
}
return true;
@@ -192,7 +189,7 @@ bool SQLPTRepresentation::SetCountersPassedForSuccessfulUpdate(
int SQLPTRepresentation::DaysBeforeExchange(uint16_t current) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectDays) || !query.Exec()) {
- LOG4CXX_WARN(logger_, "Can not select days");
+ SDL_LOG_WARN("Can not select days");
return 0;
}
int limit = query.GetInteger(0);
@@ -212,7 +209,7 @@ int SQLPTRepresentation::DaysBeforeExchange(uint16_t current) {
int SQLPTRepresentation::TimeoutResponse() {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectTimeoutResponse) || !query.Exec()) {
- LOG4CXX_INFO(logger_, "Can not select timeout response for retry sequence");
+ SDL_LOG_INFO("Can not select timeout response for retry sequence");
const int defaultTimeout = 30 * date_time::MILLISECONDS_IN_SECOND;
return defaultTimeout;
}
@@ -222,8 +219,7 @@ int SQLPTRepresentation::TimeoutResponse() {
bool SQLPTRepresentation::SecondsBetweenRetries(std::vector<int>* seconds) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectSecondsBetweenRetries)) {
- LOG4CXX_INFO(logger_,
- "Incorrect select statement from seconds between retries");
+ SDL_LOG_INFO("Incorrect select statement from seconds between retries");
return false;
}
while (query.Next()) {
@@ -246,8 +242,7 @@ std::vector<UserFriendlyMessage> SQLPTRepresentation::GetUserFriendlyMsg(
}
EndpointUrls SQLPTRepresentation::GetUpdateUrls(int service_type) {
- LOG4CXX_INFO(logger_,
- "SQLPTRepresentation::GetUpdateUrls for " << service_type);
+ SDL_LOG_INFO("SQLPTRepresentation::GetUpdateUrls for " << service_type);
utils::dbms::SQLQuery query(db());
EndpointUrls ret;
if (query.Prepare(sql_pt::kSelectEndpoint)) {
@@ -262,23 +257,23 @@ EndpointUrls SQLPTRepresentation::GetUpdateUrls(int service_type) {
ret.push_back(data);
}
} else {
- LOG4CXX_WARN(logger_, "Invalid select endpoints statement.");
+ SDL_LOG_WARN("Invalid select endpoints statement.");
}
return ret;
}
int SQLPTRepresentation::GetNotificationsNumber(const std::string& priority) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectNotificationsPerPriority)) {
- LOG4CXX_WARN(logger_,
- "Incorrect select statement for priority "
- "notification number.");
+ SDL_LOG_WARN(
+ "Incorrect select statement for priority "
+ "notification number.");
return 0;
}
query.Bind(0, priority);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect select from notifications by priority.");
+ SDL_LOG_WARN("Incorrect select from notifications by priority.");
return 0;
}
@@ -291,21 +286,21 @@ int SQLPTRepresentation::GetNotificationsNumber(const std::string& priority) {
bool SQLPTRepresentation::GetPriority(const std::string& policy_app_id,
std::string* priority) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (NULL == priority) {
- LOG4CXX_WARN(logger_, "Input priority parameter is null.");
+ SDL_LOG_WARN("Input priority parameter is null.");
return false;
}
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectPriority)) {
- LOG4CXX_INFO(logger_, "Incorrect statement for priority.");
+ SDL_LOG_INFO("Incorrect statement for priority.");
return false;
}
query.Bind(0, policy_app_id);
if (!query.Exec()) {
- LOG4CXX_INFO(logger_, "Error during select priority.");
+ SDL_LOG_INFO("Error during select priority.");
return false;
}
@@ -321,7 +316,7 @@ bool SQLPTRepresentation::GetPriority(const std::string& policy_app_id,
InitResult SQLPTRepresentation::Init(const PolicySettings* settings) {
settings_ = settings;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
#ifdef BUILD_TESTS
open_counter_ = 0;
#endif // BUILD_TESTS
@@ -334,73 +329,68 @@ InitResult SQLPTRepresentation::Init(const PolicySettings* settings) {
}
#endif // __QNX__
if (!db_->Open()) {
- LOG4CXX_ERROR(logger_, "Failed opening database.");
- LOG4CXX_INFO(logger_, "Starting opening retries.");
+ SDL_LOG_ERROR("Failed opening database.");
+ SDL_LOG_INFO("Starting opening retries.");
const uint16_t attempts = get_settings().attempts_to_open_policy_db();
- LOG4CXX_DEBUG(logger_, "Total attempts number is: " << attempts);
+ SDL_LOG_DEBUG("Total attempts number is: " << attempts);
bool is_opened = false;
const uint16_t open_attempt_timeout_ms =
get_settings().open_attempt_timeout_ms();
const useconds_t sleep_interval_mcsec = open_attempt_timeout_ms * 1000;
- LOG4CXX_DEBUG(logger_,
- "Open attempt timeout(ms) is: " << open_attempt_timeout_ms);
+ SDL_LOG_DEBUG("Open attempt timeout(ms) is: " << open_attempt_timeout_ms);
for (int i = 0; i < attempts; ++i) {
usleep(sleep_interval_mcsec);
- LOG4CXX_INFO(logger_, "Attempt: " << i + 1);
+ SDL_LOG_INFO("Attempt: " << i + 1);
#ifdef BUILD_TESTS
++open_counter_;
#endif // BUILD_TESTS
if (db_->Open()) {
- LOG4CXX_INFO(logger_, "Database opened.");
+ SDL_LOG_INFO("Database opened.");
is_opened = true;
break;
}
}
if (!is_opened) {
- LOG4CXX_ERROR(logger_,
- "Open retry sequence failed. Tried "
- << attempts << " attempts with "
- << open_attempt_timeout_ms
- << " open timeout(ms) for each.");
+ SDL_LOG_ERROR("Open retry sequence failed. Tried "
+ << attempts << " attempts with " << open_attempt_timeout_ms
+ << " open timeout(ms) for each.");
return InitResult::FAIL;
}
}
#ifndef __QNX__
if (!db_->IsReadWrite()) {
- LOG4CXX_ERROR(logger_, "There are no read/write permissions for database");
+ SDL_LOG_ERROR("There are no read/write permissions for database");
return InitResult::FAIL;
}
#endif // __QNX__
utils::dbms::SQLQuery check_pages(db());
if (!check_pages.Prepare(sql_pt::kCheckPgNumber) || !check_pages.Next()) {
- LOG4CXX_WARN(logger_, "Incorrect pragma for page counting.");
+ SDL_LOG_WARN("Incorrect pragma for page counting.");
} else {
if (0 < check_pages.GetInteger(0)) {
utils::dbms::SQLQuery db_check(db());
if (!db_check.Prepare(sql_pt::kCheckDBIntegrity)) {
- LOG4CXX_WARN(logger_, "Incorrect pragma for integrity check.");
+ SDL_LOG_WARN("Incorrect pragma for integrity check.");
} else {
while (db_check.Next()) {
if (db_check.GetString(0).compare("ok") == 0) {
utils::dbms::SQLQuery check_first_run(db());
if (check_first_run.Prepare(sql_pt::kIsFirstRun) &&
check_first_run.Next()) {
- LOG4CXX_INFO(
- logger_,
- "Selecting is first run " << check_first_run.GetBoolean(0));
+ SDL_LOG_INFO("Selecting is first run "
+ << check_first_run.GetBoolean(0));
if (check_first_run.GetBoolean(0)) {
utils::dbms::SQLQuery set_not_first_run(db());
set_not_first_run.Exec(sql_pt::kSetNotFirstRun);
return InitResult::SUCCESS;
}
} else {
- LOG4CXX_WARN(logger_, "Incorrect select is first run");
+ SDL_LOG_WARN("Incorrect select is first run");
}
return InitResult::EXISTS;
} else {
- LOG4CXX_ERROR(logger_,
- "Existing policy table representation is invlaid.");
+ SDL_LOG_ERROR("Existing policy table representation is invlaid.");
// TODO(PV): add handle
return InitResult::FAIL;
}
@@ -410,14 +400,12 @@ InitResult SQLPTRepresentation::Init(const PolicySettings* settings) {
}
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kCreateSchema)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed creating schema of database: " << query.LastError().text());
return InitResult::FAIL;
}
if (!query.Exec(sql_pt::kInsertInitData)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed insert init data to database: " << query.LastError().text());
return InitResult::FAIL;
}
@@ -432,8 +420,7 @@ bool SQLPTRepresentation::Close() {
bool SQLPTRepresentation::Drop() {
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDropSchema)) {
- LOG4CXX_WARN(logger_,
- "Failed dropping database: " << query.LastError().text());
+ SDL_LOG_WARN("Failed dropping database: " << query.LastError().text());
return false;
}
return true;
@@ -446,13 +433,11 @@ void SQLPTRepresentation::WriteDb() {
bool SQLPTRepresentation::Clear() {
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDeleteData)) {
- LOG4CXX_ERROR(logger_,
- "Failed clearing database: " << query.LastError().text());
+ SDL_LOG_ERROR("Failed clearing database: " << query.LastError().text());
return false;
}
if (!query.Exec(sql_pt::kInsertInitData)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed insert init data to database: " << query.LastError().text());
return false;
}
@@ -462,19 +447,16 @@ bool SQLPTRepresentation::Clear() {
bool SQLPTRepresentation::RefreshDB() {
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDropSchema)) {
- LOG4CXX_WARN(logger_,
- "Failed dropping database: " << query.LastError().text());
+ SDL_LOG_WARN("Failed dropping database: " << query.LastError().text());
return false;
}
if (!query.Exec(sql_pt::kCreateSchema)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed creating schema of database: " << query.LastError().text());
return false;
}
if (!query.Exec(sql_pt::kInsertInitData)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed insert init data to database: " << query.LastError().text());
return false;
}
@@ -483,7 +465,7 @@ bool SQLPTRepresentation::RefreshDB() {
std::shared_ptr<policy_table::Table> SQLPTRepresentation::GenerateSnapshot()
const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto table = std::make_shared<policy_table::Table>();
GatherModuleMeta(&*table->policy_table.module_meta);
GatherModuleConfig(&table->policy_table.module_config);
@@ -503,17 +485,17 @@ std::shared_ptr<policy_table::Table> SQLPTRepresentation::GenerateSnapshot()
void SQLPTRepresentation::GatherModuleMeta(
policy_table::ModuleMeta* meta) const {
- LOG4CXX_INFO(logger_, "Gather Module Meta Info");
+ SDL_LOG_INFO("Gather Module Meta Info");
meta->mark_initialized();
// Section Module Meta is empty for SDL specific
}
void SQLPTRepresentation::GatherModuleConfig(
policy_table::ModuleConfig* config) const {
- LOG4CXX_INFO(logger_, "Gather Configuration Info");
+ SDL_LOG_INFO("Gather Configuration Info");
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectModuleConfig) || !query.Next()) {
- LOG4CXX_WARN(logger_, "Incorrect select statement for module config");
+ SDL_LOG_WARN("Incorrect select statement for module config");
} else {
*config->preloaded_pt = query.GetBoolean(0);
config->exchange_after_x_ignition_cycles = query.GetInteger(1);
@@ -532,7 +514,7 @@ void SQLPTRepresentation::GatherModuleConfig(
utils::dbms::SQLQuery endpoints(db());
if (!endpoints.Prepare(sql_pt::kSelectEndpoints)) {
- LOG4CXX_WARN(logger_, "Incorrect select statement for endpoints");
+ SDL_LOG_WARN("Incorrect select statement for endpoints");
} else {
while (endpoints.Next()) {
const std::string& url = endpoints.GetString(0);
@@ -544,7 +526,7 @@ void SQLPTRepresentation::GatherModuleConfig(
utils::dbms::SQLQuery endpoint_properties(db());
if (!endpoint_properties.Prepare(sql_pt::kSelectEndpointProperties)) {
- LOG4CXX_ERROR(logger_, "Incorrect statement for Endpoint properties");
+ SDL_LOG_ERROR("Incorrect statement for Endpoint properties");
} else {
while (endpoint_properties.Next()) {
const std::string& service = endpoint_properties.GetString(0);
@@ -556,17 +538,26 @@ void SQLPTRepresentation::GatherModuleConfig(
utils::dbms::SQLQuery notifications(db());
if (!notifications.Prepare(sql_pt::kSelectNotificationsPerMin)) {
- LOG4CXX_WARN(logger_, "Incorrect select statement for notifications");
+ SDL_LOG_WARN("Incorrect select statement for notifications");
} else {
while (notifications.Next()) {
config->notifications_per_minute_by_priority[notifications.GetString(0)] =
notifications.GetInteger(1);
}
}
+ utils::dbms::SQLQuery subtle_notifications(db());
+ if (!subtle_notifications.Prepare(sql_pt::kSelectSubtleNotificationsPerMin)) {
+ SDL_LOG_WARN("Incorrect select statement for subtle notifications");
+ } else {
+ while (subtle_notifications.Next()) {
+ (*config->subtle_notifications_per_minute_by_priority)
+ [subtle_notifications.GetString(0)] =
+ subtle_notifications.GetInteger(1);
+ }
+ }
utils::dbms::SQLQuery seconds(db());
if (!seconds.Prepare(sql_pt::kSelectSecondsBetweenRetries)) {
- LOG4CXX_INFO(logger_,
- "Incorrect select statement from seconds between retries");
+ SDL_LOG_INFO("Incorrect select statement from seconds between retries");
} else {
while (seconds.Next()) {
config->seconds_between_retries.push_back(seconds.GetInteger(0));
@@ -576,7 +567,7 @@ void SQLPTRepresentation::GatherModuleConfig(
bool SQLPTRepresentation::GatherUsageAndErrorCounts(
policy_table::UsageAndErrorCounts* counts) const {
- LOG4CXX_INFO(logger_, "Gather Usage and Error Counts.");
+ SDL_LOG_INFO("Gather Usage and Error Counts.");
utils::dbms::SQLQuery query(db());
if (query.Prepare(sql_pt::kSelectAppLevels)) {
policy_table::AppLevel app_level_empty;
@@ -590,7 +581,7 @@ bool SQLPTRepresentation::GatherUsageAndErrorCounts(
void SQLPTRepresentation::GatherDeviceData(
policy_table::DeviceData* data) const {
- LOG4CXX_INFO(logger_, "Gather device data.");
+ SDL_LOG_INFO("Gather device data.");
data->mark_initialized();
utils::dbms::SQLQuery query(db());
@@ -605,24 +596,23 @@ void SQLPTRepresentation::GatherDeviceData(
bool SQLPTRepresentation::GatherFunctionalGroupings(
policy_table::FunctionalGroupings* groups) const {
- LOG4CXX_INFO(logger_, "Gather Functional Groupings info");
+ SDL_LOG_INFO("Gather Functional Groupings info");
utils::dbms::SQLQuery func_group(db());
if (!func_group.Prepare(sql_pt::kSelectFunctionalGroups)) {
- LOG4CXX_WARN(logger_, "Incorrect select from functional_groupings");
+ SDL_LOG_WARN("Incorrect select from functional_groupings");
return false;
}
utils::dbms::SQLQuery rpcs(db());
if (!rpcs.Prepare(sql_pt::kSelectAllRpcs)) {
- LOG4CXX_WARN(logger_, "Incorrect select all from rpc");
+ SDL_LOG_WARN("Incorrect select all from rpc");
return false;
}
utils::dbms::SQLQuery external_consent_entities(db());
if (!external_consent_entities.Prepare(
sql_pt::kSelectExternalConsentEntities)) {
- LOG4CXX_WARN(logger_,
- "Incorrect select statement for 'external_consent_entities'.");
+ SDL_LOG_WARN("Incorrect select statement for 'external_consent_entities'.");
return false;
}
@@ -691,10 +681,10 @@ bool SQLPTRepresentation::GatherFunctionalGroupings(
bool SQLPTRepresentation::GatherConsumerFriendlyMessages(
policy_table::ConsumerFriendlyMessages* messages) const {
- LOG4CXX_INFO(logger_, "Gather Consumer Friendly Messages");
+ SDL_LOG_INFO("Gather Consumer Friendly Messages");
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectUserMsgsVersion) || !query.Next()) {
- LOG4CXX_WARN(logger_, "Incorrect select from consumer_friendly_messages");
+ SDL_LOG_WARN("Incorrect select from consumer_friendly_messages");
return false;
}
@@ -732,7 +722,7 @@ bool SQLPTRepresentation::GatherConsumerFriendlyMessages(
}
}
} else {
- LOG4CXX_WARN(logger_, "Incorrect statement for select friendly messages.");
+ SDL_LOG_WARN("Incorrect statement for select friendly messages.");
}
return true;
@@ -740,10 +730,10 @@ bool SQLPTRepresentation::GatherConsumerFriendlyMessages(
bool SQLPTRepresentation::GatherApplicationPoliciesSection(
policy_table::ApplicationPoliciesSection* policies) const {
- LOG4CXX_INFO(logger_, "Gather applications policies");
+ SDL_LOG_INFO("Gather applications policies");
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectAppPolicies)) {
- LOG4CXX_WARN(logger_, "Incorrect select from app_policies");
+ SDL_LOG_WARN("Incorrect select from app_policies");
return false;
}
@@ -844,8 +834,7 @@ bool SQLPTRepresentation::GatherVehicleData(
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectVehicleDataSchemaVersion) ||
!query.Next()) {
- LOG4CXX_ERROR(logger_,
- "Incorrect statement for vehicle data schema version");
+ SDL_LOG_ERROR("Incorrect statement for vehicle data schema version");
return false;
}
*vehicle_data->schema_version = query.GetString(0);
@@ -877,7 +866,7 @@ bool SQLPTRepresentation::GatherVehicleDataItems(
}
bool SQLPTRepresentation::Save(const policy_table::Table& table) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
db_->BeginTransaction();
if (!SaveFunctionalGroupings(table.policy_table.functional_groupings)) {
db_->RollbackTransaction();
@@ -922,23 +911,23 @@ bool SQLPTRepresentation::SaveFunctionalGroupings(
const policy_table::FunctionalGroupings& groups) {
utils::dbms::SQLQuery query_delete(db());
if (!query_delete.Exec(sql_pt::kDeleteRpc)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from rpc.");
+ SDL_LOG_WARN("Incorrect delete from rpc.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteExternalConsentEntities)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from external consent entities.");
+ SDL_LOG_WARN("Incorrect delete from external consent entities.");
return false;
}
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDeleteFunctionalGroup)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from seconds between retries.");
+ SDL_LOG_WARN("Incorrect delete from seconds between retries.");
return false;
}
if (!query.Prepare(sql_pt::kInsertFunctionalGroup)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for functional groups");
+ SDL_LOG_WARN("Incorrect insert statement for functional groups");
return false;
}
@@ -963,7 +952,7 @@ bool SQLPTRepresentation::SaveFunctionalGroupings(
? query.Bind(3, *(groups_it->second.encryption_required))
: query.Bind(3);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into functional groups");
+ SDL_LOG_WARN("Incorrect insert into functional groups");
return false;
}
@@ -997,7 +986,7 @@ bool SQLPTRepresentation::SaveRpcs(int64_t group_id,
utils::dbms::SQLQuery query_parameter(db());
if (!query.Prepare(sql_pt::kInsertRpc) ||
!query_parameter.Prepare(sql_pt::kInsertRpcWithParameter)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for rpc");
+ SDL_LOG_WARN("Incorrect insert statement for rpc");
return false;
}
@@ -1017,7 +1006,7 @@ bool SQLPTRepresentation::SaveRpcs(int64_t group_id,
query_parameter.Bind(2, std::string(*ps_it));
query_parameter.Bind(3, group_id);
if (!query_parameter.Exec() || !query_parameter.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into rpc with parameter");
+ SDL_LOG_WARN("Incorrect insert into rpc with parameter");
return false;
}
}
@@ -1030,7 +1019,7 @@ bool SQLPTRepresentation::SaveRpcs(int64_t group_id,
std::string(policy_table::EnumToJsonString(policy_table::P_EMPTY)));
query_parameter.Bind(3, group_id);
if (!query_parameter.Exec() || !query_parameter.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into rpc with parameter");
+ SDL_LOG_WARN("Incorrect insert into rpc with parameter");
return false;
}
} else {
@@ -1038,7 +1027,7 @@ bool SQLPTRepresentation::SaveRpcs(int64_t group_id,
query.Bind(1, std::string(policy_table::EnumToJsonString(*hmi_it)));
query.Bind(2, group_id);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into rpc");
+ SDL_LOG_WARN("Incorrect insert into rpc");
return false;
}
}
@@ -1052,32 +1041,32 @@ bool SQLPTRepresentation::SaveApplicationPoliciesSection(
const policy_table::ApplicationPoliciesSection& policies) {
utils::dbms::SQLQuery query_delete(db());
if (!query_delete.Exec(sql_pt::kDeleteAppGroup)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from app_group.");
+ SDL_LOG_WARN("Incorrect delete from app_group.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteApplication)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from application.");
+ SDL_LOG_WARN("Incorrect delete from application.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteRequestType)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from request type.");
+ SDL_LOG_WARN("Incorrect delete from request type.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteAppServiceHandledRpcs)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from handled rpcs.");
+ SDL_LOG_WARN("Incorrect delete from handled rpcs.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteAppServiceNames)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from service names.");
+ SDL_LOG_WARN("Incorrect delete from service names.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteAppServiceTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from handled service types.");
+ SDL_LOG_WARN("Incorrect delete from handled service types.");
return false;
}
@@ -1121,8 +1110,7 @@ bool SQLPTRepresentation::SaveSpecificAppPolicy(
const policy_table::ApplicationPolicies::value_type& app) {
utils::dbms::SQLQuery app_query(db());
if (!app_query.Prepare(sql_pt::kInsertApplication)) {
- LOG4CXX_WARN(logger_,
- "Incorrect insert statement into application (device).");
+ SDL_LOG_WARN("Incorrect insert statement into application (device).");
return false;
}
@@ -1162,7 +1150,7 @@ bool SQLPTRepresentation::SaveSpecificAppPolicy(
: app_query.Bind(13);
if (!app_query.Exec() || !app_query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into application.");
+ SDL_LOG_WARN("Incorrect insert into application.");
return false;
}
@@ -1208,7 +1196,7 @@ bool policy::SQLPTRepresentation::SaveDevicePolicy(
const policy_table::DevicePolicy& device) {
utils::dbms::SQLQuery app_query(db());
if (!app_query.Prepare(sql_pt::kInsertApplication)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement into application.");
+ SDL_LOG_WARN("Incorrect insert statement into application.");
return false;
}
@@ -1221,7 +1209,7 @@ bool policy::SQLPTRepresentation::SaveDevicePolicy(
app_query.Bind(5);
if (!app_query.Exec() || !app_query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into application.");
+ SDL_LOG_WARN("Incorrect insert into application.");
return false;
}
@@ -1234,7 +1222,7 @@ bool policy::SQLPTRepresentation::SaveDevicePolicy(
bool SQLPTRepresentation::SaveVehicleDataItems(
const policy_table::VehicleDataItems& vehicle_data_items) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DeleteVehicleDataItems();
for (const auto& item : vehicle_data_items) {
if (!InsertVehicleDataItem(item)) {
@@ -1246,18 +1234,17 @@ bool SQLPTRepresentation::SaveVehicleDataItems(
bool SQLPTRepresentation::SaveVehicleData(
const policy_table::VehicleData& vehicle_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (vehicle_data.is_initialized() &&
vehicle_data.schema_version.is_initialized()) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertVehicleDataSchemaVersion)) {
- LOG4CXX_WARN(logger_,
- "Incorrect insert of schema_version to vehicle_data.");
+ SDL_LOG_WARN("Incorrect insert of schema_version to vehicle_data.");
return false;
}
query.Bind(0, *vehicle_data.schema_version);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Failed to insert schema_version to vehicle_data.");
+ SDL_LOG_WARN("Failed to insert schema_version to vehicle_data.");
return false;
}
}
@@ -1274,20 +1261,19 @@ bool SQLPTRepresentation::SaveAppGroup(
const std::string& app_id, const policy_table::Strings& app_groups) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertAppGroup)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for app group");
+ SDL_LOG_WARN("Incorrect insert statement for app group");
return false;
}
- LOG4CXX_INFO(logger_, "SaveAppGroup");
+ SDL_LOG_INFO("SaveAppGroup");
policy_table::Strings::const_iterator it;
for (it = app_groups.begin(); it != app_groups.end(); ++it) {
std::string ssss = *it;
- LOG4CXX_INFO(logger_, "Group: " << ssss);
+ SDL_LOG_INFO("Group: " << ssss);
query.Bind(0, app_id);
query.Bind(1, *it);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(
- logger_,
- "Incorrect insert into app group." << query.LastError().text());
+ SDL_LOG_WARN("Incorrect insert into app group."
+ << query.LastError().text());
return false;
}
}
@@ -1299,7 +1285,7 @@ bool SQLPTRepresentation::SaveNickname(const std::string& app_id,
const policy_table::Strings& nicknames) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertNickname)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for nickname");
+ SDL_LOG_WARN("Incorrect insert statement for nickname");
return false;
}
@@ -1308,7 +1294,7 @@ bool SQLPTRepresentation::SaveNickname(const std::string& app_id,
query.Bind(0, app_id);
query.Bind(1, *it);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into nickname.");
+ SDL_LOG_WARN("Incorrect insert into nickname.");
return false;
}
}
@@ -1320,7 +1306,7 @@ bool SQLPTRepresentation::SaveAppType(const std::string& app_id,
const policy_table::AppHMITypes& types) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertAppType)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for app type");
+ SDL_LOG_WARN("Incorrect insert statement for app type");
return false;
}
@@ -1329,7 +1315,7 @@ bool SQLPTRepresentation::SaveAppType(const std::string& app_id,
query.Bind(0, app_id);
query.Bind(1, std::string(policy_table::EnumToJsonString(*it)));
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into app type.");
+ SDL_LOG_WARN("Incorrect insert into app type.");
return false;
}
}
@@ -1341,29 +1327,29 @@ bool SQLPTRepresentation::SaveRequestType(
const std::string& app_id, const policy_table::RequestTypes& types) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertRequestType)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for request types.");
+ SDL_LOG_WARN("Incorrect insert statement for request types.");
return false;
}
policy_table::RequestTypes::const_iterator it;
if (!types.empty()) {
- LOG4CXX_WARN(logger_, "Request types not empty.");
+ SDL_LOG_WARN("Request types not empty.");
for (it = types.begin(); it != types.end(); ++it) {
query.Bind(0, app_id);
query.Bind(1, std::string(policy_table::EnumToJsonString(*it)));
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into request types.");
+ SDL_LOG_WARN("Incorrect insert into request types.");
return false;
}
}
} else if (types.is_initialized()) {
- LOG4CXX_WARN(logger_, "Request types empty.");
+ SDL_LOG_WARN("Request types empty.");
query.Bind(0, app_id);
query.Bind(1,
std::string(policy_table::EnumToJsonString(
policy_table::RequestType::RT_EMPTY)));
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into request types.");
+ SDL_LOG_WARN("Incorrect insert into request types.");
return false;
}
}
@@ -1375,29 +1361,29 @@ bool SQLPTRepresentation::SaveRequestSubType(
const policy_table::RequestSubTypes& request_subtypes) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertRequestSubType)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for request subtypes.");
+ SDL_LOG_WARN("Incorrect insert statement for request subtypes.");
return false;
}
policy_table::Strings::const_iterator it;
if (!request_subtypes.empty()) {
- LOG4CXX_TRACE(logger_, "Request subtypes are not empty.");
+ SDL_LOG_TRACE("Request subtypes are not empty.");
for (it = request_subtypes.begin(); it != request_subtypes.end(); ++it) {
query.Bind(0, app_id);
query.Bind(1, *it);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into request subtypes.");
+ SDL_LOG_WARN("Incorrect insert into request subtypes.");
return false;
}
}
} else if (request_subtypes.is_initialized()) {
- LOG4CXX_WARN(logger_, "Request subtypes empty.");
+ SDL_LOG_WARN("Request subtypes empty.");
query.Bind(0, app_id);
query.Bind(1,
std::string(policy_table::EnumToJsonString(
policy_table::RequestType::RT_EMPTY)));
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into request subtypes.");
+ SDL_LOG_WARN("Incorrect insert into request subtypes.");
return false;
}
}
@@ -1407,11 +1393,11 @@ bool SQLPTRepresentation::SaveRequestSubType(
bool SQLPTRepresentation::SaveAppServiceParameters(
const std::string& app_id,
const policy_table::AppServiceParameters& app_service_parameters) {
- LOG4CXX_INFO(logger_, "Save app service parameters");
+ SDL_LOG_INFO("Save app service parameters");
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertAppServiceTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for app service types");
+ SDL_LOG_WARN("Incorrect insert statement for app service types");
return false;
}
policy_table::AppServiceParameters::const_iterator it;
@@ -1424,14 +1410,14 @@ bool SQLPTRepresentation::SaveAppServiceParameters(
query.Bind(1, it->first);
query.Bind(2, app_id);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Insert execute failed for into app service types");
+ SDL_LOG_WARN("Insert execute failed for into app service types");
return false;
}
// Insert app names array into db
utils::dbms::SQLQuery service_name_query(db());
if (!service_name_query.Prepare(sql_pt::kInsertAppServiceNames)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for app service names");
+ SDL_LOG_WARN("Incorrect insert statement for app service names");
return false;
}
@@ -1439,11 +1425,11 @@ bool SQLPTRepresentation::SaveAppServiceParameters(
if (app_service_names.is_initialized() && app_service_names->empty()) {
// App service names is an empty array
- LOG4CXX_DEBUG(logger_, "App Service Names is Empty Array");
+ SDL_LOG_DEBUG("App Service Names is Empty Array");
service_name_query.Bind(0, static_cast<int64_t>(id));
service_name_query.Bind(1);
if (!service_name_query.Exec() || !service_name_query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into empty app service names");
+ SDL_LOG_WARN("Incorrect insert into empty app service names");
return false;
}
} else {
@@ -1454,7 +1440,7 @@ bool SQLPTRepresentation::SaveAppServiceParameters(
service_name_query.Bind(0, static_cast<int64_t>(id));
service_name_query.Bind(1, *names_it);
if (!service_name_query.Exec() || !service_name_query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into app service names");
+ SDL_LOG_WARN("Incorrect insert into app service names");
return false;
}
}
@@ -1463,8 +1449,7 @@ bool SQLPTRepresentation::SaveAppServiceParameters(
// Insert handled rpcs array into db
utils::dbms::SQLQuery handled_rpcs_query(db());
if (!handled_rpcs_query.Prepare(sql_pt::kInsertAppServiceHandledRpcs)) {
- LOG4CXX_WARN(logger_,
- "Incorrect insert statement for app service handled rpcs");
+ SDL_LOG_WARN("Incorrect insert statement for app service handled rpcs");
return false;
}
@@ -1475,7 +1460,7 @@ bool SQLPTRepresentation::SaveAppServiceParameters(
handled_rpcs_query.Bind(0, static_cast<int64_t>(id));
handled_rpcs_query.Bind(1, static_cast<int32_t>(rpc_it->function_id));
if (!handled_rpcs_query.Exec() || !handled_rpcs_query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into app service handled rpcs");
+ SDL_LOG_WARN("Incorrect insert into app service handled rpcs");
return false;
}
}
@@ -1492,7 +1477,7 @@ bool SQLPTRepresentation::SaveModuleConfig(
const policy_table::ModuleConfig& config) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdateModuleConfig)) {
- LOG4CXX_WARN(logger_, "Incorrect update statement for module config");
+ SDL_LOG_WARN("Incorrect update statement for module config");
return false;
}
@@ -1521,7 +1506,7 @@ bool SQLPTRepresentation::SaveModuleConfig(
: query.Bind(10);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect update module config");
+ SDL_LOG_WARN("Incorrect update module config");
return false;
}
@@ -1534,6 +1519,11 @@ bool SQLPTRepresentation::SaveModuleConfig(
return false;
}
+ if (!SaveNumberOfSubtleNotificationsPerMinute(
+ *config.subtle_notifications_per_minute_by_priority)) {
+ return false;
+ }
+
if (!SaveServiceEndpoints(config.endpoints)) {
return false;
}
@@ -1549,12 +1539,12 @@ bool SQLPTRepresentation::SaveServiceEndpoints(
const policy_table::ServiceEndpoints& endpoints) {
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDeleteEndpoint)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from endpoint.");
+ SDL_LOG_WARN("Incorrect delete from endpoint.");
return false;
}
if (!query.Prepare(sql_pt::kInsertEndpoint)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for endpoint");
+ SDL_LOG_WARN("Incorrect insert statement for endpoint");
return false;
}
@@ -1570,7 +1560,7 @@ bool SQLPTRepresentation::SaveServiceEndpoints(
query.Bind(1, *url_it);
query.Bind(2, app_it->first);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into endpoint");
+ SDL_LOG_WARN("Incorrect insert into endpoint");
return false;
}
}
@@ -1584,8 +1574,7 @@ bool SQLPTRepresentation::SaveServiceEndpointProperties(
const policy_table::ServiceEndpointProperties& endpoint_properties) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertEndpointVersion)) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Incorrect insert of endpoint property to endpoint_properties.");
return false;
}
@@ -1595,8 +1584,7 @@ bool SQLPTRepresentation::SaveServiceEndpointProperties(
query.Bind(1, endpoint_property.second.version);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Failed to insert endpoint property into endpoint_properties.");
return false;
}
@@ -1607,13 +1595,13 @@ bool SQLPTRepresentation::SaveServiceEndpointProperties(
bool SQLPTRepresentation::SaveConsumerFriendlyMessages(
const policy_table::ConsumerFriendlyMessages& messages) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// According CRS-2419 If there is no “consumer_friendly_messages” key,
// the current local consumer_friendly_messages section shall be maintained in
// the policy table. So it won't be changed/updated
if (!messages.messages.is_initialized()) {
- LOG4CXX_INFO(logger_, "ConsumerFriendlyMessages messages list is empty");
+ SDL_LOG_INFO("ConsumerFriendlyMessages messages list is empty");
return true;
}
@@ -1624,18 +1612,18 @@ bool SQLPTRepresentation::SaveConsumerFriendlyMessages(
}
if (!delete_query_exec_result) {
- LOG4CXX_WARN(logger_, "Failed to delete messages from DB.");
+ SDL_LOG_WARN("Failed to delete messages from DB.");
return false;
}
if (!query.Prepare(sql_pt::kUpdateVersion)) {
- LOG4CXX_WARN(logger_, "Invalid update messages version statement.");
+ SDL_LOG_WARN("Invalid update messages version statement.");
return false;
}
query.Bind(0, messages.version);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed to update messages version number in DB.");
+ SDL_LOG_WARN("Failed to update messages version number in DB.");
return false;
}
@@ -1662,13 +1650,13 @@ bool SQLPTRepresentation::SaveConsumerFriendlyMessages(
bool SQLPTRepresentation::SaveMessageType(const std::string& type) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertMessageType)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for message type.");
+ SDL_LOG_WARN("Incorrect insert statement for message type.");
return false;
}
query.Bind(0, type);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into message type.");
+ SDL_LOG_WARN("Incorrect insert into message type.");
return false;
}
@@ -1678,13 +1666,13 @@ bool SQLPTRepresentation::SaveMessageType(const std::string& type) {
bool SQLPTRepresentation::SaveLanguage(const std::string& code) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertLanguage)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for language.");
+ SDL_LOG_WARN("Incorrect insert statement for language.");
return false;
}
query.Bind(0, code);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into language.");
+ SDL_LOG_WARN("Incorrect insert into language.");
return false;
}
@@ -1716,22 +1704,25 @@ policy_table::VehicleDataItem SQLPTRepresentation::PopulateVDIFromQuery(
*result.deprecated = query.GetBoolean(8);
}
if (!query.IsNull(9)) {
- *result.minvalue = query.GetInteger(9);
+ *result.defvalue = query.GetString(9);
}
if (!query.IsNull(10)) {
- *result.maxvalue = query.GetInteger(10);
+ *result.minvalue = query.GetInteger(10);
}
if (!query.IsNull(11)) {
- *result.minsize = query.GetUInteger(11);
+ *result.maxvalue = query.GetInteger(11);
}
if (!query.IsNull(12)) {
- *result.maxsize = query.GetUInteger(12);
+ *result.minsize = query.GetUInteger(12);
}
if (!query.IsNull(13)) {
- *result.minlength = query.GetUInteger(13);
+ *result.maxsize = query.GetUInteger(13);
}
if (!query.IsNull(14)) {
- *result.maxlength = query.GetUInteger(14);
+ *result.minlength = query.GetUInteger(14);
+ }
+ if (!query.IsNull(15)) {
+ *result.maxlength = query.GetUInteger(15);
}
result.params->mark_initialized();
@@ -1743,8 +1734,7 @@ policy_table::VehicleDataItems
SQLPTRepresentation::SelectCompositeVehicleDataItems() const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectCompositeVehicleDataItemsKey)) {
- LOG4CXX_ERROR(logger_,
- "Incorrect statement for parameterized vehicle data items");
+ SDL_LOG_ERROR("Incorrect statement for parameterized vehicle data items");
return policy_table::VehicleDataItems();
}
@@ -1756,9 +1746,7 @@ SQLPTRepresentation::SelectCompositeVehicleDataItems() const {
if (!vdi.is_initialized()) {
return policy_table::VehicleDataItems();
}
- for (const auto& item : vdi) {
- result.push_back(item);
- }
+ std::copy(vdi.begin(), vdi.end(), std::back_inserter(result));
}
return result;
@@ -1768,8 +1756,7 @@ policy_table::VehicleDataItems
SQLPTRepresentation::SelectPrimitiveVehicleDataItems() const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectPrimitiveVehicleDataItems)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Incorrect statement for non parameterized vehicle data items");
return policy_table::VehicleDataItems();
}
@@ -1789,17 +1776,15 @@ SQLPTRepresentation::SelectPrimitiveVehicleDataItems() const {
bool SQLPTRepresentation::DeleteVehicleDataItems() const {
utils::dbms::SQLQuery query(db());
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!query.Exec(sql_pt::kDeleteVehicleDataItems)) {
- LOG4CXX_ERROR(logger_,
- "Failed clearing database: " << query.LastError().text());
+ SDL_LOG_ERROR("Failed clearing database: " << query.LastError().text());
return false;
}
if (!query.Exec(sql_pt::kDeleteVehicleDataItemParams)) {
- LOG4CXX_ERROR(logger_,
- "Failed clearing database: " << query.LastError().text());
+ SDL_LOG_ERROR("Failed clearing database: " << query.LastError().text());
return false;
}
return true;
@@ -1817,12 +1802,11 @@ bool SQLPTRepresentation::SaveSecondsBetweenRetries(
const policy_table::SecondsBetweenRetries& seconds) {
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDeleteSecondsBetweenRetries)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from seconds between retries.");
+ SDL_LOG_WARN("Incorrect delete from seconds between retries.");
return false;
}
if (!query.Prepare(sql_pt::kInsertSecondsBetweenRetry)) {
- LOG4CXX_WARN(logger_,
- "Incorrect insert statement for seconds between retries.");
+ SDL_LOG_WARN("Incorrect insert statement for seconds between retries.");
return false;
}
@@ -1830,7 +1814,7 @@ bool SQLPTRepresentation::SaveSecondsBetweenRetries(
query.Bind(0, static_cast<int>(i));
query.Bind(1, seconds[i]);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into seconds between retries.");
+ SDL_LOG_WARN("Incorrect insert into seconds between retries.");
return false;
}
}
@@ -1842,8 +1826,7 @@ bool SQLPTRepresentation::SaveNumberOfNotificationsPerMinute(
const policy_table::NumberOfNotificationsPerMinute& notifications) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertNotificationsByPriority)) {
- LOG4CXX_WARN(logger_,
- "Incorrect insert statement for notifications by priority.");
+ SDL_LOG_WARN("Incorrect insert statement for notifications by priority.");
return false;
}
@@ -1852,7 +1835,28 @@ bool SQLPTRepresentation::SaveNumberOfNotificationsPerMinute(
query.Bind(0, it->first);
query.Bind(1, it->second);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into notifications by priority.");
+ SDL_LOG_WARN("Incorrect insert into notifications by priority.");
+ return false;
+ }
+ }
+
+ return true;
+}
+
+bool SQLPTRepresentation::SaveNumberOfSubtleNotificationsPerMinute(
+ const policy_table::NumberOfNotificationsPerMinute& notifications) {
+ utils::dbms::SQLQuery query(db());
+ if (!query.Prepare(sql_pt::kInsertSubtleNotificationsByPriority)) {
+ SDL_LOG_WARN("Incorrect insert statement for notifications by priority.");
+ return false;
+ }
+
+ policy_table::NumberOfNotificationsPerMinute::const_iterator it;
+ for (it = notifications.begin(); it != notifications.end(); ++it) {
+ query.Bind(0, it->first);
+ query.Bind(1, it->second);
+ if (!query.Exec() || !query.Reset()) {
+ SDL_LOG_WARN("Incorrect insert into notifications by priority.");
return false;
}
}
@@ -1864,7 +1868,7 @@ bool SQLPTRepresentation::SaveDeviceData(
const policy_table::DeviceData& devices) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertDeviceData)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for device data.");
+ SDL_LOG_WARN("Incorrect insert statement for device data.");
return false;
}
@@ -1872,7 +1876,7 @@ bool SQLPTRepresentation::SaveDeviceData(
for (it = devices.begin(); it != devices.end(); ++it) {
query.Bind(0, it->first);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into device data.");
+ SDL_LOG_WARN("Incorrect insert into device data.");
return false;
}
}
@@ -1885,11 +1889,11 @@ bool SQLPTRepresentation::SaveUsageAndErrorCounts(
const_cast<policy_table::UsageAndErrorCounts&>(counts).mark_initialized();
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDeleteAppLevel)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from app level.");
+ SDL_LOG_WARN("Incorrect delete from app level.");
return false;
}
if (!query.Prepare(sql_pt::kInsertAppLevel)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for app level.");
+ SDL_LOG_WARN("Incorrect insert statement for app level.");
return false;
}
@@ -1899,7 +1903,7 @@ bool SQLPTRepresentation::SaveUsageAndErrorCounts(
for (it = app_levels.begin(); it != app_levels.end(); ++it) {
query.Bind(0, it->first);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into app level.");
+ SDL_LOG_WARN("Incorrect insert into app level.");
return false;
}
}
@@ -1909,23 +1913,22 @@ bool SQLPTRepresentation::SaveUsageAndErrorCounts(
void SQLPTRepresentation::IncrementIgnitionCycles() {
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kIncrementIgnitionCycles)) {
- LOG4CXX_WARN(logger_, "Failed incrementing ignition cycles");
+ SDL_LOG_WARN("Failed incrementing ignition cycles");
}
}
void SQLPTRepresentation::ResetIgnitionCycles() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kResetIgnitionCycles)) {
- LOG4CXX_WARN(logger_, "Failed to reset ignition cycles number.");
+ SDL_LOG_WARN("Failed to reset ignition cycles number.");
}
}
bool SQLPTRepresentation::UpdateRequired() const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectFlagUpdateRequired) || !query.Exec()) {
- LOG4CXX_WARN(logger_,
- "Failed select update required flag from module meta");
+ SDL_LOG_WARN("Failed select update required flag from module meta");
return false;
}
return query.GetBoolean(0);
@@ -1936,34 +1939,33 @@ void SQLPTRepresentation::SaveUpdateRequired(bool value) {
// TODO(AOleynik): Quick fix, will be reworked
if (!query.Prepare(/*sql_pt::kUpdateFlagUpdateRequired*/
"UPDATE `module_meta` SET `flag_update_required` = ?")) {
- LOG4CXX_WARN(logger_,
- "Incorrect update into module meta (update_required): "
- << strerror(errno));
+ SDL_LOG_WARN("Incorrect update into module meta (update_required): "
+ << strerror(errno));
return;
}
query.Bind(0, value);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed update module meta (update_required)");
+ SDL_LOG_WARN("Failed update module meta (update_required)");
}
}
bool SQLPTRepresentation::GetInitialAppData(const std::string& app_id,
StringArray* nicknames,
StringArray* app_types) {
- LOG4CXX_INFO(logger_, "Getting initial application data.");
+ SDL_LOG_INFO("Getting initial application data.");
utils::dbms::SQLQuery app_names(db());
if (!app_names.Prepare(sql_pt::kSelectNicknames)) {
- LOG4CXX_WARN(logger_, "Incorrect select from app nicknames");
+ SDL_LOG_WARN("Incorrect select from app nicknames");
return false;
}
utils::dbms::SQLQuery app_hmi_types(db());
if (!app_hmi_types.Prepare(sql_pt::kSelectAppTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect select from app types");
+ SDL_LOG_WARN("Incorrect select from app types");
return false;
}
dbms::SQLQuery module_types(db());
if (!module_types.Prepare(sql_pt::kSelectModuleTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect select from module types");
+ SDL_LOG_WARN("Incorrect select from module types");
return false;
}
@@ -1988,7 +1990,7 @@ bool SQLPTRepresentation::GetInitialAppData(const std::string& app_id,
bool SQLPTRepresentation::GetFunctionalGroupings(
policy_table::FunctionalGroupings& groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return GatherFunctionalGroupings(&groups);
}
@@ -1996,7 +1998,7 @@ bool SQLPTRepresentation::GatherAppType(
const std::string& app_id, policy_table::AppHMITypes* app_types) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectAppTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect select from app types");
+ SDL_LOG_WARN("Incorrect select from app types");
return false;
}
@@ -2016,7 +2018,7 @@ bool SQLPTRepresentation::GatherRequestType(
policy_table::RequestTypes* request_types) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectRequestTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect select from request types.");
+ SDL_LOG_WARN("Incorrect select from request types.");
return false;
}
@@ -2040,7 +2042,7 @@ bool SQLPTRepresentation::GatherRequestSubType(
policy_table::RequestSubTypes* request_subtypes) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectRequestSubTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect select from request subtypes.");
+ SDL_LOG_WARN("Incorrect select from request subtypes.");
return false;
}
@@ -2060,22 +2062,22 @@ bool SQLPTRepresentation::GatherRequestSubType(
bool SQLPTRepresentation::GatherAppServiceParameters(
const std::string& app_id,
policy_table::AppServiceParameters* app_service_parameters) const {
- LOG4CXX_INFO(logger_, "Gather app service info");
+ SDL_LOG_INFO("Gather app service info");
utils::dbms::SQLQuery service_type_query(db());
if (!service_type_query.Prepare(sql_pt::kSelectAppServiceTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect select from service_types");
+ SDL_LOG_WARN("Incorrect select from service_types");
return false;
}
utils::dbms::SQLQuery service_name_query(db());
if (!service_name_query.Prepare(sql_pt::kSelectAppServiceNames)) {
- LOG4CXX_WARN(logger_, "Incorrect select all from app_service_names");
+ SDL_LOG_WARN("Incorrect select all from app_service_names");
return false;
}
utils::dbms::SQLQuery handled_rpcs_query(db());
if (!handled_rpcs_query.Prepare(sql_pt::kSelectAppServiceHandledRpcs)) {
- LOG4CXX_WARN(logger_, "Incorrect select all from app_service_handled_rpcs");
+ SDL_LOG_WARN("Incorrect select all from app_service_handled_rpcs");
return false;
}
@@ -2087,7 +2089,7 @@ bool SQLPTRepresentation::GatherAppServiceParameters(
service_name_query.Bind(0, service_type_id);
while (service_name_query.Next()) {
- LOG4CXX_DEBUG(logger_, "Loading service name");
+ SDL_LOG_DEBUG("Loading service name");
(*app_service_parameters)[service_type].service_names->push_back(
service_name_query.GetString(0));
(*app_service_parameters)[service_type].service_names->mark_initialized();
@@ -2102,11 +2104,11 @@ bool SQLPTRepresentation::GatherAppServiceParameters(
}
if (!service_name_query.Reset()) {
- LOG4CXX_ERROR(logger_, "Could not reset service_name query");
+ SDL_LOG_ERROR("Could not reset service_name query");
return false;
}
if (!handled_rpcs_query.Reset()) {
- LOG4CXX_ERROR(logger_, "Could not reset handled_rpcs query");
+ SDL_LOG_ERROR("Could not reset handled_rpcs query");
return false;
}
}
@@ -2118,7 +2120,7 @@ bool SQLPTRepresentation::GatherNickName(
const std::string& app_id, policy_table::Strings* nicknames) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectNicknames)) {
- LOG4CXX_WARN(logger_, "Incorrect select from app nicknames");
+ SDL_LOG_WARN("Incorrect select from app nicknames");
return false;
}
@@ -2133,7 +2135,7 @@ bool SQLPTRepresentation::GatherAppGroup(
const std::string& app_id, policy_table::Strings* app_groups) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectAppGroups)) {
- LOG4CXX_WARN(logger_, "Incorrect select from app groups");
+ SDL_LOG_WARN("Incorrect select from app groups");
return false;
}
@@ -2146,10 +2148,10 @@ bool SQLPTRepresentation::GatherAppGroup(
bool SQLPTRepresentation::GatherRemoteControlDenied(const std::string& app_id,
bool* denied) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectRemoteControlDenied)) {
- LOG4CXX_WARN(logger_, "Incorrect select remote control flag");
+ SDL_LOG_WARN("Incorrect select remote control flag");
return false;
}
query.Bind(0, app_id);
@@ -2165,7 +2167,7 @@ bool SQLPTRepresentation::GatherModuleType(
const std::string& app_id, policy_table::ModuleTypes* app_types) const {
dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectModuleTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect select from app types");
+ SDL_LOG_WARN("Incorrect select from app types");
return false;
}
@@ -2186,17 +2188,17 @@ bool SQLPTRepresentation::GatherModuleType(
bool SQLPTRepresentation::SaveRemoteControlDenied(const std::string& app_id,
bool deny) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdateRemoteControlDenied)) {
- LOG4CXX_WARN(logger_, "Incorrect update statement for remote control flag");
+ SDL_LOG_WARN("Incorrect update statement for remote control flag");
return false;
}
- LOG4CXX_DEBUG(logger_, "App: " << app_id << std::boolalpha << " - " << deny);
+ SDL_LOG_DEBUG("App: " << app_id << std::boolalpha << " - " << deny);
query.Bind(0, deny);
query.Bind(1, app_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect update remote control flag.");
+ SDL_LOG_WARN("Incorrect update remote control flag.");
return false;
}
return true;
@@ -2206,7 +2208,7 @@ bool SQLPTRepresentation::SaveModuleType(
const std::string& app_id, const policy_table::ModuleTypes& types) {
dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertModuleType)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for module type");
+ SDL_LOG_WARN("Incorrect insert statement for module type");
return false;
}
@@ -2216,10 +2218,9 @@ bool SQLPTRepresentation::SaveModuleType(
query.Bind(0, app_id);
std::string module(policy_table::EnumToJsonString(*it));
query.Bind(1, module);
- LOG4CXX_DEBUG(logger_,
- "Module(app: " << app_id << ", type: " << module << ")");
+ SDL_LOG_DEBUG("Module(app: " << app_id << ", type: " << module << ")");
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into module type.");
+ SDL_LOG_WARN("Incorrect insert into module type.");
return false;
}
}
@@ -2229,21 +2230,21 @@ bool SQLPTRepresentation::SaveModuleType(
std::string(policy_table::EnumToJsonString(
policy_table::ModuleType::MT_EMPTY)));
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into module types.");
+ SDL_LOG_WARN("Incorrect insert into module types.");
return false;
}
} else {
- LOG4CXX_WARN(logger_, "Module Type omitted.");
+ SDL_LOG_WARN("Module Type omitted.");
}
return true;
}
bool SQLPTRepresentation::SaveAccessModule(
TypeAccess access, const policy_table::AccessModules& modules) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertAccessModule)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for access module");
+ SDL_LOG_WARN("Incorrect insert statement for access module");
return false;
}
@@ -2254,12 +2255,12 @@ bool SQLPTRepresentation::SaveAccessModule(
query.Bind(0, name);
query.Bind(1, access);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into access module.");
+ SDL_LOG_WARN("Incorrect insert into access module.");
return false;
}
int id = query.LastInsertId();
if (!query.Reset()) {
- LOG4CXX_WARN(logger_, "Couldn't reset query access module.");
+ SDL_LOG_WARN("Couldn't reset query access module.");
return false;
}
if (!SaveRemoteRpc(id, rpcs)) {
@@ -2271,10 +2272,10 @@ bool SQLPTRepresentation::SaveAccessModule(
bool SQLPTRepresentation::GatherAccessModule(
TypeAccess access, policy_table::AccessModules* modules) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectAccessModules)) {
- LOG4CXX_WARN(logger_, "Incorrect select from access module");
+ SDL_LOG_WARN("Incorrect select from access module");
return false;
}
@@ -2293,10 +2294,10 @@ bool SQLPTRepresentation::GatherAccessModule(
bool SQLPTRepresentation::SaveRemoteRpc(int module_id,
const policy_table::RemoteRpcs& rpcs) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertRemoteRpc)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for remote rpc");
+ SDL_LOG_WARN("Incorrect insert statement for remote rpc");
return false;
}
policy_table::RemoteRpcs::const_iterator i;
@@ -2309,7 +2310,7 @@ bool SQLPTRepresentation::SaveRemoteRpc(int module_id,
query.Bind(1, name);
query.Bind(2);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into remote rpc.");
+ SDL_LOG_WARN("Incorrect insert into remote rpc.");
return false;
}
} else {
@@ -2319,7 +2320,7 @@ bool SQLPTRepresentation::SaveRemoteRpc(int module_id,
query.Bind(1, name);
query.Bind(2, param);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into remote rpc.");
+ SDL_LOG_WARN("Incorrect insert into remote rpc.");
return false;
}
}
@@ -2330,10 +2331,10 @@ bool SQLPTRepresentation::SaveRemoteRpc(int module_id,
bool SQLPTRepresentation::GatherRemoteRpc(
int module_id, policy_table::RemoteRpcs* rpcs) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectRemoteRpcs)) {
- LOG4CXX_WARN(logger_, "Incorrect select from remote rpc");
+ SDL_LOG_WARN("Incorrect select from remote rpc");
return false;
}
@@ -2356,7 +2357,7 @@ bool SQLPTRepresentation::SaveApplicationCustomData(const std::string& app_id,
bool is_predata) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdateApplicationCustomData)) {
- LOG4CXX_WARN(logger_, "Incorrect update in application");
+ SDL_LOG_WARN("Incorrect update in application");
return false;
}
@@ -2366,7 +2367,7 @@ bool SQLPTRepresentation::SaveApplicationCustomData(const std::string& app_id,
query.Bind(3, app_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed update in application");
+ SDL_LOG_WARN("Failed update in application");
return false;
}
@@ -2377,13 +2378,13 @@ bool SQLPTRepresentation::IsApplicationRevoked(
const std::string& app_id) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectApplicationRevoked)) {
- LOG4CXX_WARN(logger_, "Incorrect select from is_revoked of application");
+ SDL_LOG_WARN("Incorrect select from is_revoked of application");
}
query.Bind(0, app_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed select is_revoked of application");
+ SDL_LOG_WARN("Failed select is_revoked of application");
return false;
}
return query.IsNull(0) ? false : query.GetBoolean(0);
@@ -2392,13 +2393,13 @@ bool SQLPTRepresentation::IsApplicationRepresented(
const std::string& app_id) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectApplicationRepresented)) {
- LOG4CXX_WARN(logger_, "Incorrect select application by id");
+ SDL_LOG_WARN("Incorrect select application by id");
return false;
}
query.Bind(0, app_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed select application by id");
+ SDL_LOG_WARN("Failed select application by id");
return false;
}
return query.GetInteger(0) != 0;
@@ -2407,13 +2408,13 @@ bool SQLPTRepresentation::IsApplicationRepresented(
bool SQLPTRepresentation::IsDefaultPolicy(const std::string& app_id) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectApplicationIsDefault)) {
- LOG4CXX_WARN(logger_, "Incorrect select application by id");
+ SDL_LOG_WARN("Incorrect select application by id");
return false;
}
query.Bind(0, app_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed select application by id");
+ SDL_LOG_WARN("Failed select application by id");
return false;
}
return query.IsNull(0) ? false : query.GetBoolean(0);
@@ -2426,12 +2427,12 @@ bool SQLPTRepresentation::IsPredataPolicy(const std::string& app_id) const {
bool SQLPTRepresentation::SetDefaultPolicy(const std::string& app_id) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kDeleteAppGroupByApplicationId)) {
- LOG4CXX_ERROR(logger_, "Incorrect statement to delete from app_group.");
+ SDL_LOG_ERROR("Incorrect statement to delete from app_group.");
return false;
}
query.Bind(0, app_id);
if (!query.Exec()) {
- LOG4CXX_ERROR(logger_, "Failed deleting from app_group.");
+ SDL_LOG_ERROR("Failed deleting from app_group.");
return false;
}
@@ -2476,17 +2477,17 @@ bool SQLPTRepresentation::SetDefaultPolicy(const std::string& app_id) {
bool SQLPTRepresentation::SetIsDefault(const std::string& app_id,
bool is_default) const {
- LOG4CXX_TRACE(logger_, "Set flag is_default of application");
+ SDL_LOG_TRACE("Set flag is_default of application");
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdateIsDefault)) {
- LOG4CXX_WARN(logger_, "Incorect statement for updating is_default");
+ SDL_LOG_WARN("Incorect statement for updating is_default");
return false;
}
query.Bind(0, is_default);
query.Bind(1, app_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed update is_default");
+ SDL_LOG_WARN("Failed update is_default");
return false;
}
return true;
@@ -2497,18 +2498,16 @@ void SQLPTRepresentation::RemoveDB() const {
}
bool SQLPTRepresentation::IsDBVersionActual() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectDBVersion) || !query.Exec()) {
- LOG4CXX_ERROR(logger_,
- "Failed to get DB version: " << query.LastError().text());
+ SDL_LOG_ERROR("Failed to get DB version: " << query.LastError().text());
return false;
}
const int32_t saved_db_version = query.GetInteger(0);
const int32_t current_db_version = GetDBVersion();
- LOG4CXX_DEBUG(logger_,
- "Saved DB version is: " << saved_db_version
+ SDL_LOG_DEBUG("Saved DB version is: " << saved_db_version
<< ". Current DB vesion is: "
<< current_db_version);
@@ -2516,21 +2515,19 @@ bool SQLPTRepresentation::IsDBVersionActual() const {
}
bool SQLPTRepresentation::UpdateDBVersion() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdateDBVersion)) {
- LOG4CXX_ERROR(logger_,
- "Incorrect DB version query: " << query.LastError().text());
+ SDL_LOG_ERROR("Incorrect DB version query: " << query.LastError().text());
return false;
}
const int32_t db_version = GetDBVersion();
- LOG4CXX_DEBUG(logger_, "DB version will be updated to: " << db_version);
+ SDL_LOG_DEBUG("DB version will be updated to: " << db_version);
query.Bind(0, db_version);
if (!query.Exec()) {
- LOG4CXX_ERROR(logger_,
- "DB version getting failed: " << query.LastError().text());
+ SDL_LOG_ERROR("DB version getting failed: " << query.LastError().text());
return false;
}
@@ -2543,9 +2540,8 @@ policy_table::VehicleDataItems SQLPTRepresentation::GetVehicleDataItem(
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectVehicleDataItem)) {
- LOG4CXX_ERROR(logger_,
- "Incorrent select statement of vehicle data item. "
- << query.LastError().text());
+ SDL_LOG_ERROR("Incorrent select statement of vehicle data item. "
+ << query.LastError().text());
return result;
}
@@ -2562,9 +2558,8 @@ policy_table::VehicleDataItems SQLPTRepresentation::GetVehicleDataItem(
if (policy_table::VehicleDataItem::kStruct ==
static_cast<std::string>(vdi.type)) {
if (!param_query.Prepare(sql_pt::kSelectVehicleDataItemParams)) {
- LOG4CXX_ERROR(logger_,
- "Incorrent select statement of vehicle data item. "
- << param_query.LastError().text());
+ SDL_LOG_ERROR("Incorrent select statement of vehicle data item. "
+ << param_query.LastError().text());
return policy_table::VehicleDataItems();
}
@@ -2596,21 +2591,19 @@ bool SQLPTRepresentation::InsertVehicleDataItem(
utils::dbms::SQLQuery query(db());
if (!vehicle_data_item.is_initialized() || !vehicle_data_item.is_valid()) {
- LOG4CXX_ERROR(logger_, "Vehicle data item is not initialized.");
+ SDL_LOG_ERROR("Vehicle data item is not initialized.");
return false;
}
if (VehicleDataItemExists(vehicle_data_item)) {
- LOG4CXX_INFO(logger_,
- static_cast<std::string>(vehicle_data_item.key)
- << " is already stored.");
+ SDL_LOG_INFO(static_cast<std::string>(vehicle_data_item.key)
+ << " is already stored.");
return true;
}
if (!query.Prepare(sql_pt::kInsertVehicleDataItem)) {
- LOG4CXX_ERROR(logger_,
- "Incorrent select statement of vehicle data item. "
- << query.LastError().text());
+ SDL_LOG_ERROR("Incorrent select statement of vehicle data item. "
+ << query.LastError().text());
return false;
}
@@ -2633,30 +2626,32 @@ bool SQLPTRepresentation::InsertVehicleDataItem(
vehicle_data_item.deprecated.is_initialized()
? query.Bind(8, *vehicle_data_item.deprecated)
: query.Bind(8);
- vehicle_data_item.minvalue.is_initialized()
- ? query.Bind(9, *vehicle_data_item.minvalue)
+ vehicle_data_item.defvalue.is_initialized()
+ ? query.Bind(9, *vehicle_data_item.defvalue)
: query.Bind(9);
- vehicle_data_item.maxvalue.is_initialized()
- ? query.Bind(10, *vehicle_data_item.maxvalue)
+ vehicle_data_item.minvalue.is_initialized()
+ ? query.Bind(10, *vehicle_data_item.minvalue)
: query.Bind(10);
- vehicle_data_item.minsize.is_initialized()
- ? query.Bind(11, static_cast<int64_t>(*vehicle_data_item.minsize))
+ vehicle_data_item.maxvalue.is_initialized()
+ ? query.Bind(11, *vehicle_data_item.maxvalue)
: query.Bind(11);
- vehicle_data_item.maxsize.is_initialized()
- ? query.Bind(12, static_cast<int64_t>(*vehicle_data_item.maxsize))
+ vehicle_data_item.minsize.is_initialized()
+ ? query.Bind(12, static_cast<int64_t>(*vehicle_data_item.minsize))
: query.Bind(12);
- vehicle_data_item.minlength.is_initialized()
- ? query.Bind(13, static_cast<int64_t>(*vehicle_data_item.minlength))
+ vehicle_data_item.maxsize.is_initialized()
+ ? query.Bind(13, static_cast<int64_t>(*vehicle_data_item.maxsize))
: query.Bind(13);
- vehicle_data_item.maxlength.is_initialized()
- ? query.Bind(14, static_cast<int64_t>(*vehicle_data_item.maxlength))
+ vehicle_data_item.minlength.is_initialized()
+ ? query.Bind(14, static_cast<int64_t>(*vehicle_data_item.minlength))
: query.Bind(14);
+ vehicle_data_item.maxlength.is_initialized()
+ ? query.Bind(15, static_cast<int64_t>(*vehicle_data_item.maxlength))
+ : query.Bind(15);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_ERROR(logger_,
- "Failed to insert vehicle data item: "
- << static_cast<std::string>(vehicle_data_item.key)
- << ". Error: " << query.LastError().text());
+ SDL_LOG_ERROR("Failed to insert vehicle data item: "
+ << static_cast<std::string>(vehicle_data_item.key)
+ << ". Error: " << query.LastError().text());
return false;
}
@@ -2669,14 +2664,13 @@ bool SQLPTRepresentation::InsertVehicleDataItem(
if (stored_vehicle_data_item_params.end() !=
stored_vehicle_data_item_params.find(param.name)) {
- LOG4CXX_DEBUG(logger_, "Parameter already stored.");
+ SDL_LOG_DEBUG("Parameter already stored.");
continue;
}
if (!query.Prepare(sql_pt::kInsertVehicleDataItemParams)) {
- LOG4CXX_ERROR(logger_,
- "Incorrent select statement of vehicle data item. "
- << query.LastError().text());
+ SDL_LOG_ERROR("Incorrent select statement of vehicle data item. "
+ << query.LastError().text());
return false;
}
@@ -2686,11 +2680,10 @@ bool SQLPTRepresentation::InsertVehicleDataItem(
query.Bind(3, param.key);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed to insert to vehicle data item relations helper table: "
- << static_cast<std::string>(param.key)
- << ". Error: " << query.LastError().text());
+ << static_cast<std::string>(param.key)
+ << ". Error: " << query.LastError().text());
return false;
}
stored_vehicle_data_item_params[param.name] = param.key;
@@ -2704,9 +2697,8 @@ bool SQLPTRepresentation::VehicleDataItemExists(
const policy_table::VehicleDataItem& vehicle_data_item) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectVehicleDataItemWithVersion)) {
- LOG4CXX_ERROR(logger_,
- "Incorrent select statement for vehicle data item. "
- << query.LastError().text());
+ SDL_LOG_ERROR("Incorrent select statement for vehicle data item. "
+ << query.LastError().text());
return false;
}
@@ -2720,10 +2712,9 @@ bool SQLPTRepresentation::VehicleDataItemExists(
: query.Bind(3);
if (!query.Exec()) {
- LOG4CXX_ERROR(logger_,
- "Failed to retrieve vehicle data item: "
- << std::string(vehicle_data_item.key)
- << ". Error: " << query.LastError().text());
+ SDL_LOG_ERROR("Failed to retrieve vehicle data item: "
+ << std::string(vehicle_data_item.key)
+ << ". Error: " << query.LastError().text());
return false;
}
return !query.IsNull(0);
@@ -2747,18 +2738,18 @@ bool SQLPTRepresentation::CopyApplication(const std::string& source,
const std::string& destination) {
utils::dbms::SQLQuery source_app(db());
if (!source_app.Prepare(sql_pt::kSelectApplicationFull)) {
- LOG4CXX_WARN(logger_, "Incorrect select statement from application.");
+ SDL_LOG_WARN("Incorrect select statement from application.");
return false;
}
source_app.Bind(0, source);
if (!source_app.Exec()) {
- LOG4CXX_WARN(logger_, "Failed selecting from application.");
+ SDL_LOG_WARN("Failed selecting from application.");
return false;
}
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertApplicationFull)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement into application full.");
+ SDL_LOG_WARN("Incorrect insert statement into application full.");
return false;
}
query.Bind(0, destination);
@@ -2796,7 +2787,7 @@ bool SQLPTRepresentation::CopyApplication(const std::string& source,
: query.Bind(18, source_app.GetBoolean(17));
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed inserting into application.");
+ SDL_LOG_WARN("Failed inserting into application.");
return false;
}
return true;
@@ -2805,13 +2796,13 @@ bool SQLPTRepresentation::CopyApplication(const std::string& source,
void SQLPTRepresentation::SetPreloaded(bool value) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdatePreloaded)) {
- LOG4CXX_WARN(logger_, "Incorrect statement of updating preloaded.");
+ SDL_LOG_WARN("Incorrect statement of updating preloaded.");
return;
}
query.Bind(0, value);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed updating preloaded.");
+ SDL_LOG_WARN("Failed updating preloaded.");
return;
}
}
@@ -2826,8 +2817,7 @@ bool SQLPTRepresentation::SaveExternalConsentEntities(
ExternalConsentEntitiesType type) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kInsertExternalConsentEntity)) {
- LOG4CXX_WARN(logger_,
- "Incorrect insert statement for external consent entities.");
+ SDL_LOG_WARN("Incorrect insert statement for external consent entities.");
return false;
}
@@ -2844,8 +2834,7 @@ bool SQLPTRepresentation::SaveExternalConsentEntities(
query.Bind(2, it_entity->entity_id);
query.Bind(3, external_consent_entity_type);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_ERROR(logger_,
- "Can't insert '" << external_consent_entity_type
+ SDL_LOG_ERROR("Can't insert '" << external_consent_entity_type
<< "' external consent entity.");
return false;
}
diff --git a/src/components/policy/policy_external/src/update_status_manager.cc b/src/components/policy/policy_external/src/update_status_manager.cc
index d34d1b7817..59b95a405c 100644
--- a/src/components/policy/policy_external/src/update_status_manager.cc
+++ b/src/components/policy/policy_external/src/update_status_manager.cc
@@ -37,7 +37,7 @@
namespace policy {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Policy")
+SDL_CREATE_LOG_VARIABLE("Policy")
UpdateStatusManager::UpdateStatusManager()
: listener_(NULL)
@@ -48,20 +48,20 @@ UpdateStatusManager::UpdateStatusManager()
update_status_thread_delegate_ = new UpdateThreadDelegate(this);
thread_ = threads::CreateThread("UpdateStatusThread",
update_status_thread_delegate_);
- thread_->start();
+ thread_->Start();
}
UpdateStatusManager::~UpdateStatusManager() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(update_status_thread_delegate_);
DCHECK(thread_);
- thread_->join();
+ thread_->Stop(threads::Thread::kThreadSoftStop);
delete update_status_thread_delegate_;
threads::DeleteThread(thread_);
}
void UpdateStatusManager::ProcessEvent(UpdateEvent event) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(status_lock_);
current_status_->ProcessEvent(this, event);
last_processed_event_ = event;
@@ -81,14 +81,14 @@ void UpdateStatusManager::set_listener(PolicyListener* listener) {
}
void UpdateStatusManager::OnUpdateSentOut(uint32_t update_timeout) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(update_status_thread_delegate_);
update_status_thread_delegate_->updateTimeOut(update_timeout);
ProcessEvent(kOnUpdateSentOut);
}
void UpdateStatusManager::OnUpdateTimeoutOccurs() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto& ptu_retry_handler = listener_->ptu_retry_handler();
@@ -103,25 +103,25 @@ void UpdateStatusManager::OnUpdateTimeoutOccurs() {
}
void UpdateStatusManager::OnValidUpdateReceived() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
update_status_thread_delegate_->updateTimeOut(0); // Stop Timer
ProcessEvent(kOnValidUpdateReceived);
}
void UpdateStatusManager::ResetTimeout(uint32_t update_timeout) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
update_status_thread_delegate_->updateTimeOut(
update_timeout); // Restart Timer
}
void UpdateStatusManager::OnWrongUpdateReceived() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
update_status_thread_delegate_->updateTimeOut(0); // Stop Timer
ProcessEvent(kOnWrongUpdateReceived);
}
void UpdateStatusManager::OnResetDefaultPT(bool is_update_required) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (is_update_required) {
ProcessEvent(kOnResetPolicyTableRequireUpdate);
return;
@@ -130,13 +130,13 @@ void UpdateStatusManager::OnResetDefaultPT(bool is_update_required) {
}
void UpdateStatusManager::OnResetRetrySequence() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProcessEvent(kOnResetRetrySequence);
}
void UpdateStatusManager::OnExistedApplicationAdded(
const bool is_update_required) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (is_update_required) {
current_status_.reset(new UpToDateStatus());
ProcessEvent(kScheduleUpdate);
@@ -144,13 +144,13 @@ void UpdateStatusManager::OnExistedApplicationAdded(
}
void UpdateStatusManager::OnNewApplicationAdded(const DeviceConsent consent) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (kDeviceAllowed != consent) {
- LOG4CXX_DEBUG(logger_, "Application registered from non-consented device");
+ SDL_LOG_DEBUG("Application registered from non-consented device");
app_registered_from_non_consented_device_ = true;
return;
}
- LOG4CXX_DEBUG(logger_, "Application registered from consented device");
+ SDL_LOG_DEBUG("Application registered from consented device");
app_registered_from_non_consented_device_ = false;
if (kOnResetRetrySequence == last_processed_event_) {
current_status_.reset(new UpToDateStatus());
@@ -161,7 +161,7 @@ void UpdateStatusManager::OnNewApplicationAdded(const DeviceConsent consent) {
}
void UpdateStatusManager::OnDeviceConsented() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (app_registered_from_non_consented_device_) {
ProcessEvent(kOnNewAppRegistered);
}
@@ -176,17 +176,17 @@ bool UpdateStatusManager::IsUpdatePending() const {
}
void UpdateStatusManager::ScheduleUpdate() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProcessEvent(kScheduleUpdate);
}
void UpdateStatusManager::PendingUpdate() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProcessEvent(kPendingUpdate);
}
void UpdateStatusManager::ScheduleManualUpdate() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProcessEvent(kScheduleManualUpdate);
}
@@ -195,19 +195,19 @@ std::string UpdateStatusManager::StringifiedUpdateStatus() const {
}
void policy::UpdateStatusManager::OnAppsSearchStarted() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(apps_search_in_progress_lock_);
apps_search_in_progress_ = true;
}
void policy::UpdateStatusManager::OnAppsSearchCompleted() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(apps_search_in_progress_lock_);
apps_search_in_progress_ = false;
}
bool policy::UpdateStatusManager::IsAppsSearchInProgress() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(apps_search_in_progress_lock_);
return apps_search_in_progress_;
}
@@ -244,22 +244,22 @@ UpdateStatusManager::UpdateThreadDelegate::UpdateThreadDelegate(
: timeout_(0)
, stop_flag_(false)
, update_status_manager_(update_status_manager) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Create UpdateThreadDelegate");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Create UpdateThreadDelegate");
}
UpdateStatusManager::UpdateThreadDelegate::~UpdateThreadDelegate() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Delete UpdateThreadDelegate");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Delete UpdateThreadDelegate");
}
void UpdateStatusManager::UpdateThreadDelegate::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "UpdateStatusManager thread started (started normal)");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("UpdateStatusManager thread started (started normal)");
sync_primitives::AutoLock auto_lock(state_lock_);
while (false == stop_flag_) {
if (timeout_ > 0) {
- LOG4CXX_DEBUG(logger_, "Timeout is greater then 0");
+ SDL_LOG_DEBUG("Timeout is greater then 0");
sync_primitives::ConditionalVariable::WaitStatus wait_status =
termination_condition_.WaitFor(auto_lock, timeout_);
if (sync_primitives::ConditionalVariable::kTimeout == wait_status) {
@@ -276,16 +276,16 @@ void UpdateStatusManager::UpdateThreadDelegate::threadMain() {
}
void UpdateStatusManager::UpdateThreadDelegate::exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(state_lock_);
stop_flag_ = true;
- LOG4CXX_DEBUG(logger_, "before notify");
+ SDL_LOG_DEBUG("before notify");
termination_condition_.NotifyOne();
}
void UpdateStatusManager::UpdateThreadDelegate::updateTimeOut(
const uint32_t timeout_ms) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(state_lock_);
timeout_ = timeout_ms;
termination_condition_.NotifyOne();
diff --git a/src/components/policy/policy_external/test/CMakeLists.txt b/src/components/policy/policy_external/test/CMakeLists.txt
index 77b1b35973..8f1b8b2539 100644
--- a/src/components/policy/policy_external/test/CMakeLists.txt
+++ b/src/components/policy/policy_external/test/CMakeLists.txt
@@ -48,16 +48,16 @@ set(testLibraries
)
file (GLOB POLICY_TEST_SOURCES
- ${CMAKE_CURRENT_SOURCE_DIR}/policy_manager_impl_test_base.cc
- *.cc)
-
-# Unbuildable
-list (REMOVE_ITEM POLICY_TEST_SOURCES
- ${CMAKE_CURRENT_SOURCE_DIR}/policy_manager_impl_stress_test.cc)
+ ${CMAKE_CURRENT_SOURCE_DIR}/cache_manager_test.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/policy_manager_impl_test.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/sql_pt_ext_representation_test.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/sql_pt_representation_test.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/update_status_manager_test.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/shared_library_test.cc)
create_test("policy_test" "${POLICY_TEST_SOURCES}" "${testLibraries}")
-#Additional test files (json)
-file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/json)
-file(GLOB JSON_TEST_FILES json/*.json)
-file(COPY ${JSON_TEST_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/json)
+#Copy actual sdl_preloaded_pt.json
+file(COPY ${CMAKE_SOURCE_DIR}/src/appMain/sdl_preloaded_pt.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/json/)
+file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/json/sdl_preloaded_pt_for_merge_initial.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/json/)
+file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/json/sdl_preloaded_pt_for_merge_latest.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/json/)
diff --git a/src/components/policy/policy_external/test/cache_manager_test.cc b/src/components/policy/policy_external/test/cache_manager_test.cc
new file mode 100644
index 0000000000..746d0c7221
--- /dev/null
+++ b/src/components/policy/policy_external/test/cache_manager_test.cc
@@ -0,0 +1,2174 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include <fstream>
+#include <string>
+#include <vector>
+
+#include "gtest/gtest.h"
+
+#include "policy/cache_manager.h"
+#include "policy/policy_table/enums.h"
+#include "policy/policy_types.h"
+
+#include "policy/mock_policy_settings.h"
+
+#include "json/reader.h"
+#include "utils/date_time.h"
+#include "utils/file_system.h"
+#include "utils/gen_hash.h"
+#include "utils/jsoncpp_reader_wrapper.h"
+
+namespace test {
+namespace components {
+namespace policy_test {
+
+using namespace policy;
+using namespace rpc::policy_table_interface_base;
+
+using ::testing::_;
+using ::testing::NiceMock;
+using ::testing::ReturnRef;
+
+namespace {
+const std::string kDefaultHMILevel = "NONE";
+const std::string kInvalidApp = "invalid_app";
+const std::string kSdlPreloadedPtJson = "json/sdl_preloaded_pt.json";
+const std::string kValidAppId = "1234";
+const std::string kDeviceNumber = "XXX123456789ZZZ";
+const std::string kAppStorageFolder = "app_storage_folder";
+const std::string kConnectionType = "Bluetooth";
+} // namespace
+
+void ValidateJsonTable(const std::string& string_table,
+ Json::Value& json_table) {
+ utils::JsonReader reader;
+ ASSERT_TRUE(reader.parse(string_table, &json_table));
+}
+
+policy_table::Table CreateCustomPT(const std::string& string_table) {
+ Json::Value json_table(Json::objectValue);
+ ValidateJsonTable(string_table, json_table);
+ policy_table::Table table(&json_table);
+ return table;
+}
+
+class CacheManagerTest : public ::testing::Test {
+ public:
+ CacheManagerTest()
+ : in_memory_(true), cache_manager_(nullptr), pt_(nullptr) {}
+
+ protected:
+ const bool in_memory_;
+ std::shared_ptr<CacheManager> cache_manager_;
+ std::shared_ptr<policy_table::Table> pt_;
+ NiceMock<policy_handler_test::MockPolicySettings> policy_settings_;
+
+ void SetUp() {
+ cache_manager_ = std::make_shared<CacheManager>(in_memory_);
+ pt_ = cache_manager_->GetPT();
+
+ ON_CALL(policy_settings_, app_storage_folder())
+ .WillByDefault(ReturnRef(kAppStorageFolder));
+ }
+};
+
+TEST_F(CacheManagerTest,
+ GetNotificationsNumber_PriorityExists_ReturnNumberFromPT) {
+ std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"module_config\": {"
+ "\"notifications_per_minute_by_priority\": {"
+ "\"EMERGENCY\": 1,"
+ "\"NAVIGATION\": 2,"
+ "\"VOICECOM\": 3,"
+ "\"COMMUNICATION\": 4,"
+ "\"NORMAL\": 5,"
+ "\"NONE\": 6"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ std::string priority = "EMERGENCY";
+ uint32_t notif_number =
+ cache_manager_->GetNotificationsNumber(priority, false);
+ EXPECT_EQ(1u, notif_number);
+
+ priority = "NAVIGATION";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, false);
+ EXPECT_EQ(2u, notif_number);
+
+ priority = "VOICECOM";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, false);
+ EXPECT_EQ(3u, notif_number);
+
+ priority = "COMMUNICATION";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, false);
+ EXPECT_EQ(4u, notif_number);
+
+ priority = "NORMAL";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, false);
+ EXPECT_EQ(5u, notif_number);
+
+ priority = "NONE";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, false);
+ EXPECT_EQ(6u, notif_number);
+}
+
+TEST_F(CacheManagerTest, GetNotificationsNumber_PriorityNotExist_ReturnZero) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"module_config\": {"
+ "\"notifications_per_minute_by_priority\": {"
+ "\"EMERGENCY\": 1,"
+ "\"NAVIGATION\": 2,"
+ "\"VOICECOM\": 3,"
+ "\"COMMUNICATION\": 4,"
+ "\"NORMAL\": 5,"
+ "\"NONE\": 6"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ const std::string priority = "OTHER_PRIORITY";
+ uint32_t notif_number =
+ cache_manager_->GetNotificationsNumber(priority, false);
+ EXPECT_EQ(0u, notif_number);
+}
+
+TEST_F(CacheManagerTest,
+ GetNotificationsNumber_Subtle_PriorityExists_ReturnNumberFromPT) {
+ std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"module_config\": {"
+ "\"subtle_notifications_per_minute_by_priority\": {"
+ "\"EMERGENCY\": 7,"
+ "\"NAVIGATION\": 8,"
+ "\"VOICECOM\": 9,"
+ "\"COMMUNICATION\": 10,"
+ "\"NORMAL\": 11,"
+ "\"NONE\": 12"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ std::string priority = "EMERGENCY";
+ uint32_t notif_number =
+ cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(7u, notif_number);
+
+ priority = "NAVIGATION";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(8u, notif_number);
+
+ priority = "VOICECOM";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(9u, notif_number);
+
+ priority = "COMMUNICATION";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(10u, notif_number);
+
+ priority = "NORMAL";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(11u, notif_number);
+
+ priority = "NONE";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(12u, notif_number);
+}
+
+TEST_F(CacheManagerTest,
+ GetNotificationsNumber_Subtle_PriorityNotExist_ReturnZero) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"module_config\": {"
+ "\"subtle_notifications_per_minute_by_priority\": {"
+ "\"EMERGENCY\": 7,"
+ "\"NAVIGATION\": 8,"
+ "\"VOICECOM\": 9,"
+ "\"COMMUNICATION\": 10,"
+ "\"NORMAL\": 11,"
+ "\"NONE\": 12"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ const std::string priority = "OTHER_PRIORITY";
+ uint32_t notif_number =
+ cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(0u, notif_number);
+}
+
+TEST_F(CacheManagerTest,
+ GetNotificationsNumber_Subtle_FieldNotPresent_UseFallback) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"module_config\": {"
+ "\"notifications_per_minute_by_priority\": {"
+ "\"EMERGENCY\": 1,"
+ "\"NAVIGATION\": 2,"
+ "\"VOICECOM\": 3,"
+ "\"COMMUNICATION\": 4,"
+ "\"NORMAL\": 5,"
+ "\"NONE\": 6"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ std::string priority = "EMERGENCY";
+ uint32_t notif_number =
+ cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(1u, notif_number);
+
+ priority = "NAVIGATION";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(2u, notif_number);
+
+ priority = "VOICECOM";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(3u, notif_number);
+
+ priority = "COMMUNICATION";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(4u, notif_number);
+
+ priority = "NORMAL";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(5u, notif_number);
+
+ priority = "NONE";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(6u, notif_number);
+}
+
+TEST_F(CacheManagerTest,
+ GetConsentsPriority_DeviceIDNotFound_ReturnkExternalConsentPrio) {
+ const auto priority =
+ cache_manager_->GetConsentsPriority(kDeviceNumber, kValidAppId);
+
+ EXPECT_EQ(ConsentPriorityType::kExternalConsentPrio, priority);
+}
+
+TEST_F(CacheManagerTest,
+ GetConsentsPriority_AppIDNotFound_ReturnkExternalConsentPrio) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"device_data\": {"
+ "\"XXX123456789ZZZ\": {"
+ "\"user_consent_records\": {"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ const auto priority =
+ cache_manager_->GetConsentsPriority(kDeviceNumber, kValidAppId);
+ EXPECT_EQ(ConsentPriorityType::kExternalConsentPrio, priority);
+}
+
+TEST_F(CacheManagerTest,
+ GetConsentsPriority_UserConsentHasPriority_ReturnkUserConsentPrio) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"device_data\": {"
+ "\"XXX123456789ZZZ\": {"
+ "\"user_consent_records\": {"
+ "\"1234\": {"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ auto& user_record =
+ (*pt_->policy_table.device_data)[kDeviceNumber].user_consent_records;
+ (*user_record)[kValidAppId].consent_last_updated = 20;
+ (*user_record)[kValidAppId].ext_consent_last_updated = 10;
+
+ const auto priority =
+ cache_manager_->GetConsentsPriority(kDeviceNumber, kValidAppId);
+ EXPECT_EQ(ConsentPriorityType::kUserConsentPrio, priority);
+}
+
+TEST_F(
+ CacheManagerTest,
+ GetConsentsPriority_ExternalConsentHasPriority_ReturnkExternalConsentPrio) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"device_data\": {"
+ "\"XXX123456789ZZZ\": {"
+ "\"user_consent_records\": {"
+ "\"1234\": {"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ (*(*pt_->policy_table.device_data)[kDeviceNumber]
+ .user_consent_records)[kValidAppId]
+ .consent_last_updated = 10;
+ (*(*pt_->policy_table.device_data)[kDeviceNumber]
+ .user_consent_records)[kValidAppId]
+ .ext_consent_last_updated = 20;
+
+ auto priority =
+ cache_manager_->GetConsentsPriority(kDeviceNumber, kValidAppId);
+ EXPECT_EQ(ConsentPriorityType::kExternalConsentPrio, priority);
+}
+
+TEST_F(CacheManagerTest, CanAppKeepContext_DeviceApp_ReturnTrue) {
+ pt_->policy_table.app_policies_section.device.keep_context = true;
+ EXPECT_TRUE(cache_manager_->CanAppKeepContext(kDeviceId));
+}
+
+TEST_F(CacheManagerTest, CanAppKeepContext_ValidApp_ReturnTrue) {
+ pt_->policy_table.app_policies_section.apps[kValidAppId].keep_context = true;
+ EXPECT_TRUE(cache_manager_->CanAppKeepContext(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, CanAppKeepContext_InvalidApp_ReturnFalse) {
+ EXPECT_FALSE(cache_manager_->CanAppKeepContext(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, HeartBeatTimeout_ValueInitialized_ReturnValue) {
+ *pt_->policy_table.app_policies_section.apps[kValidAppId]
+ .heart_beat_timeout_ms = 100u;
+ EXPECT_EQ(100u, cache_manager_->HeartBeatTimeout(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, HeartBeatTimeout_ValueNotInitialized_ReturnZero) {
+ pt_->policy_table.app_policies_section.apps[kValidAppId] = {};
+ EXPECT_EQ(0u, cache_manager_->HeartBeatTimeout(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, HeartBeatTimeout_AppNotRepresented_ReturnZero) {
+ EXPECT_EQ(0u, cache_manager_->HeartBeatTimeout(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, GetHMITypes_NoSuchAppNoHmiTypes_ReturnNull) {
+ EXPECT_EQ(nullptr, cache_manager_->GetHMITypes(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, GetHMITypes_ValidApp_ReturnNotNullPtr) {
+ AppHMITypes hmi_types;
+ hmi_types.push_back(policy_table::AHT_DEFAULT);
+
+ *pt_->policy_table.app_policies_section.apps[kValidAppId].AppHMIType =
+ hmi_types;
+ EXPECT_NE(nullptr, cache_manager_->GetHMITypes(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, CanAppStealFocus_AppIdIsDevice_ReturnTrue) {
+ pt_->policy_table.app_policies_section.device.steal_focus = true;
+ EXPECT_TRUE(cache_manager_->CanAppStealFocus(kDeviceId));
+}
+
+TEST_F(CacheManagerTest, CanAppStealFocus_ValidApp_ReturnTrue) {
+ pt_->policy_table.app_policies_section.apps[kValidAppId].steal_focus = true;
+ EXPECT_TRUE(cache_manager_->CanAppStealFocus(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, CanAppStealFocus_AppNotRepresented_ReturnFalse) {
+ EXPECT_FALSE(cache_manager_->CanAppStealFocus(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, GetDefaultHMI_AppIdIsDevice_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"device\": {"
+ "\"default_hmi\": \"NONE\""
+ "}"
+ "}"
+ "}"
+ "}");
+
+ *pt_ = CreateCustomPT(string_table);
+ std::string returned_hmi_level;
+ const std::string expected_hmi_level("NONE");
+
+ EXPECT_TRUE(cache_manager_->GetDefaultHMI(kDeviceId, returned_hmi_level));
+ EXPECT_EQ(expected_hmi_level, returned_hmi_level);
+}
+
+TEST_F(CacheManagerTest, GetDefaultHMI_ValidApp_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"default_hmi\": \"NONE\""
+ "}"
+ "}"
+ "}"
+ "}");
+
+ *pt_ = CreateCustomPT(string_table);
+ std::string returned_hmi_level;
+ const std::string expected_hmi_level("NONE");
+
+ EXPECT_TRUE(cache_manager_->GetDefaultHMI(kValidAppId, returned_hmi_level));
+ EXPECT_EQ(expected_hmi_level, returned_hmi_level);
+}
+
+TEST_F(CacheManagerTest, GetDefaultHMI_InvalidApp_ReturnFalse) {
+ std::string returned_hmi_level;
+ EXPECT_FALSE(cache_manager_->GetDefaultHMI(kInvalidApp, returned_hmi_level));
+ EXPECT_TRUE(returned_hmi_level.empty());
+}
+
+TEST_F(CacheManagerTest, GetAllAppGroups_AppIdIsDevice_AppendGroupId) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"device\": {"
+ "\"groups\": [\"default\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ FunctionalGroupIDs group_ids;
+
+ cache_manager_->GetAllAppGroups(kDeviceId, group_ids);
+ EXPECT_EQ(1u, group_ids.size());
+}
+
+TEST_F(CacheManagerTest, GetAllAppGroups_InvalidAppId_EmptyVectorOfGroupId) {
+ FunctionalGroupIDs group_ids;
+ cache_manager_->GetAllAppGroups(kInvalidApp, group_ids);
+ EXPECT_TRUE(group_ids.empty());
+}
+
+TEST_F(CacheManagerTest, GetAllAppGroups_ValidAppId_AppendGroupID) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"groups\": [\"default\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ FunctionalGroupIDs group_ids;
+
+ cache_manager_->GetAllAppGroups(kValidAppId, group_ids);
+ EXPECT_EQ(1u, group_ids.size());
+}
+
+TEST_F(CacheManagerTest, ApplyUpdate_ValidPT_ReturnTrue) {
+ std::ifstream ifile(kSdlPreloadedPtJson);
+ ASSERT_TRUE(ifile.good());
+ Json::CharReaderBuilder reader_builder;
+ Json::Value root(Json::objectValue);
+ Json::parseFromStream(reader_builder, ifile, &root, nullptr);
+ ifile.close();
+ policy_table::Table update(&root);
+
+ EXPECT_TRUE(cache_manager_->ApplyUpdate(update));
+ EXPECT_FALSE(cache_manager_->IsPTPreloaded());
+}
+
+TEST_F(CacheManagerTest, AppHasHMIType_NoSuchType_ReturnFalse) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"AppHMIType\": []"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_FALSE(
+ cache_manager_->AppHasHMIType(kValidAppId, policy_table::AHT_DEFAULT));
+}
+
+TEST_F(CacheManagerTest, AppHasHMIType_TypeExists_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"AppHMIType\": [\"AHT_DEFAULT\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_TRUE(
+ cache_manager_->AppHasHMIType(kValidAppId, policy_table::AHT_DEFAULT));
+}
+
+TEST_F(CacheManagerTest, AppHasHMIType_NoSuchApp_ReturnFalse) {
+ EXPECT_FALSE(
+ cache_manager_->AppHasHMIType(kInvalidApp, policy_table::AHT_DEFAULT));
+}
+
+TEST_F(CacheManagerTest, AddDevice_ReturnTrue) {
+ *pt_->policy_table.module_config.preloaded_pt = true;
+ EXPECT_TRUE(cache_manager_->AddDevice(kDeviceNumber, kConnectionType));
+ EXPECT_FALSE(cache_manager_->IsPTPreloaded());
+}
+
+TEST_F(CacheManagerTest, SetDeviceData_NoSuchDevice_ReturnFalse) {
+ EXPECT_FALSE(cache_manager_->SetDeviceData(kDeviceNumber));
+}
+
+TEST_F(CacheManagerTest, SetDeviceData_ValidDevice_ReturnTrue) {
+ EXPECT_TRUE(cache_manager_->AddDevice(kDeviceNumber, kConnectionType));
+ EXPECT_TRUE(cache_manager_->SetDeviceData(kDeviceNumber));
+}
+
+TEST_F(CacheManagerTest, ResetUserConsent_ConsentIsResetted_ReturnTrue) {
+ cache_manager_->AddDevice(kDeviceNumber, kConnectionType);
+ policy_table::DeviceParams& params =
+ (*(pt_->policy_table.device_data))[kDeviceNumber];
+ policy_table::UserConsentRecords user_records;
+ user_records[kDeviceNumber] = policy_table::ConsentRecords();
+ *params.user_consent_records = user_records;
+
+ EXPECT_FALSE((params.user_consent_records)->empty());
+ EXPECT_TRUE(cache_manager_->ResetUserConsent());
+ EXPECT_TRUE((params.user_consent_records)->empty());
+}
+
+TEST_F(CacheManagerTest, SetUserPermissionsForDevice_ReturnTrue) {
+ cache_manager_->AddDevice(kDeviceNumber, kConnectionType);
+
+ StringArray consented_groups;
+ StringArray disallowed_groups;
+ const std::string consented_group("DataConsent-2");
+ const std::string disallowed_group("Navigation-1");
+ consented_groups.push_back(consented_group);
+ disallowed_groups.push_back(disallowed_group);
+
+ EXPECT_TRUE(cache_manager_->SetUserPermissionsForDevice(
+ kDeviceNumber, consented_groups, disallowed_groups));
+
+ StringArray returned_consented_groups;
+ StringArray returned_disallowed_groups;
+ EXPECT_TRUE(cache_manager_->GetUserPermissionsForDevice(
+ kDeviceNumber, returned_consented_groups, returned_disallowed_groups));
+ EXPECT_EQ(consented_groups, returned_consented_groups);
+ EXPECT_EQ(disallowed_groups, returned_disallowed_groups);
+}
+
+TEST_F(CacheManagerTest, GetUserPermissionsForDevice_NoSuchDevice_ReturnFalse) {
+ StringArray consented_groups;
+ StringArray disallowed_groups;
+
+ EXPECT_FALSE(cache_manager_->GetUserPermissionsForDevice(
+ kDeviceNumber, consented_groups, disallowed_groups));
+}
+
+TEST_F(CacheManagerTest, GetPreConsentedGroups_DeviceAppId_GetGroups) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"device\": {"
+ "\"preconsented_groups\": [\"DataConsent-2\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ FunctionalGroupIDs group_ids;
+
+ cache_manager_->GetPreConsentedGroups(kDeviceId, group_ids);
+ EXPECT_EQ(1u, group_ids.size());
+ EXPECT_EQ(cache_manager_->GenerateHash("DataConsent-2"), group_ids[0]);
+}
+
+TEST_F(CacheManagerTest, GetPreConsentedGroups_NoSuchAppId_NoGroups) {
+ FunctionalGroupIDs group_ids;
+
+ cache_manager_->GetPreConsentedGroups(kInvalidApp, group_ids);
+ EXPECT_TRUE(group_ids.empty());
+}
+
+TEST_F(CacheManagerTest, GetPreConsentedGroups_ValidAppId_GetGroups) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"preconsented_groups\": [\"DataConsent-2\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ FunctionalGroupIDs group_ids;
+
+ cache_manager_->GetPreConsentedGroups(kValidAppId, group_ids);
+ EXPECT_EQ(1u, group_ids.size());
+ EXPECT_EQ(cache_manager_->GenerateHash("DataConsent-2"), group_ids[0]);
+}
+
+TEST_F(CacheManagerTest, CheckPermissions_ValidParams_ReturnValidPermission) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"functional_groupings\": {"
+ "\"Base-4\": {"
+ "\"rpcs\": {"
+ "\"AddCommand\": {"
+ "\"hmi_levels\": ["
+ "\"BACKGROUND\","
+ "\"FULL\","
+ "\"LIMITED\""
+ "]"
+ "}"
+ "}"
+ "}"
+ "},"
+ "\"app_policies\": {"
+ "\"default\": {"
+ "\"groups\": ["
+ "\"Base-4\""
+ "]"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ const std::string hmi_level("FULL");
+ const std::string rpc("AddCommand");
+ CheckPermissionResult result;
+
+ cache_manager_->CheckPermissions(kDefaultId, hmi_level, rpc, result);
+ EXPECT_EQ(kRpcAllowed, result.hmi_level_permitted);
+}
+
+TEST_F(CacheManagerTest, CheckPermissions_InvalidApp_ReturnInvalidPermission) {
+ const std::string hmi_level("FULL");
+ const std::string rpc("AddCommand");
+ CheckPermissionResult result;
+ cache_manager_->CheckPermissions(kInvalidApp, hmi_level, rpc, result);
+ EXPECT_EQ(kRpcDisallowed, result.hmi_level_permitted);
+}
+
+TEST_F(CacheManagerTest, GetAppRequestTypesState_GetAllStates) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"RequestType\": [\"PROPRIETARY\"]"
+ "},"
+ "\"default\": {"
+ "\"RequestType\": [],"
+ "},"
+ "\"pre_DataConsent\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_EQ(RequestType::State::EMPTY,
+ cache_manager_->GetAppRequestTypesState(kDefaultId));
+ EXPECT_EQ(RequestType::State::UNAVAILABLE,
+ cache_manager_->GetAppRequestTypesState(kInvalidApp));
+ EXPECT_EQ(RequestType::State::OMITTED,
+ cache_manager_->GetAppRequestTypesState(kPreDataConsentId));
+ EXPECT_EQ(RequestType::State::AVAILABLE,
+ cache_manager_->GetAppRequestTypesState(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, GetAppRequestSubTypesState_GetAllStates) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"RequestSubType\": [\"PROPRIETARY\"]"
+ "},"
+ "\"default\": {"
+ "\"RequestSubType\": [],"
+ "},"
+ "\"pre_DataConsent\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_EQ(RequestSubType::State::EMPTY,
+ cache_manager_->GetAppRequestSubTypesState(kDefaultId));
+ EXPECT_EQ(RequestSubType::State::UNAVAILABLE,
+ cache_manager_->GetAppRequestSubTypesState(kInvalidApp));
+ EXPECT_EQ(RequestSubType::State::OMITTED,
+ cache_manager_->GetAppRequestSubTypesState(kPreDataConsentId));
+ EXPECT_EQ(RequestSubType::State::AVAILABLE,
+ cache_manager_->GetAppRequestSubTypesState(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, IgnitionCyclesBeforeExchange_GetValue) {
+ // if result of computation is positive, method returns difference between
+ // limit from pt and current number of ignition cycles
+ pt_->policy_table.module_config.exchange_after_x_ignition_cycles = 100u;
+ *(pt_->policy_table.module_meta->ignition_cycles_since_last_exchange) = 80u;
+
+ EXPECT_EQ(20, cache_manager_->IgnitionCyclesBeforeExchange());
+
+ // if result of computation is less or equal to zero, method returns 0
+ pt_->policy_table.module_config.exchange_after_x_ignition_cycles = 80u;
+ *(pt_->policy_table.module_meta->ignition_cycles_since_last_exchange) = 100u;
+
+ EXPECT_EQ(0, cache_manager_->IgnitionCyclesBeforeExchange());
+}
+
+TEST_F(CacheManagerTest, KilometersBeforeExchange_GetValue) {
+ // if result of computation is positive, method returns difference between
+ // limit from pt and actual number of kilometers
+ pt_->policy_table.module_config.exchange_after_x_kilometers = 1000u;
+ *(pt_->policy_table.module_meta->pt_exchanged_at_odometer_x) = 500u;
+
+ EXPECT_EQ(600, cache_manager_->KilometersBeforeExchange(900));
+
+ // if result of computation is less or equal to zero, method returns 0
+ pt_->policy_table.module_config.exchange_after_x_kilometers = 500u;
+ *(pt_->policy_table.module_meta->pt_exchanged_at_odometer_x) = 200u;
+
+ EXPECT_EQ(0, cache_manager_->KilometersBeforeExchange(800));
+}
+
+TEST_F(CacheManagerTest,
+ DaysBeforeExchange_DaysNotInitialized_ReturnNegativeOne) {
+ EXPECT_EQ(cache_manager_->DaysBeforeExchange(20), -1);
+}
+
+TEST_F(CacheManagerTest, DaysBeforeExchange_DaysIsInitialized_ReturnValue) {
+ *(pt_->policy_table.module_meta->pt_exchanged_x_days_after_epoch) = 5;
+ pt_->policy_table.module_config.exchange_after_x_days = 30;
+ EXPECT_EQ(15, cache_manager_->DaysBeforeExchange(20));
+}
+
+TEST_F(CacheManagerTest,
+ SetCountersPassedForSuccessfulUpdate_AllPositiveCases_ReturnTrue) {
+ EXPECT_TRUE(cache_manager_->SetCountersPassedForSuccessfulUpdate(
+ Counters::KILOMETERS, 1000));
+ EXPECT_TRUE(cache_manager_->SetCountersPassedForSuccessfulUpdate(
+ Counters::DAYS_AFTER_EPOCH, 20));
+}
+
+TEST_F(CacheManagerTest,
+ GetDeviceConsent_EmptyPermissions_ReturnDeviceAllowed) {
+ cache_manager_->AddDevice(kDeviceNumber, kConnectionType);
+ EXPECT_EQ(kDeviceAllowed, cache_manager_->GetDeviceConsent(kDeviceNumber));
+}
+
+TEST_F(CacheManagerTest, GetPriority_DeviceAppID_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"device\": {"
+ "\"priority\": \"NONE\""
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ std::string returned_priority;
+ EXPECT_TRUE(cache_manager_->GetPriority(kDeviceId, returned_priority));
+
+ const std::string expected_priority("NONE");
+ EXPECT_EQ(expected_priority, returned_priority);
+}
+
+TEST_F(CacheManagerTest, GetPriority_ValidAppID_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"priority\": \"NONE\""
+ "}"
+ "}"
+ "}"
+ "}");
+
+ *pt_ = CreateCustomPT(string_table);
+ std::string returned_priority;
+ EXPECT_TRUE(cache_manager_->GetPriority(kValidAppId, returned_priority));
+
+ const std::string expected_priority("NONE");
+ EXPECT_EQ(expected_priority, returned_priority);
+}
+
+TEST_F(CacheManagerTest, GetPriority_InvalidAppID_ReturnFalse) {
+ std::string priority;
+
+ EXPECT_FALSE(cache_manager_->GetPriority(kInvalidApp, priority));
+ EXPECT_TRUE(priority.empty());
+}
+
+TEST_F(CacheManagerTest, SetDefaultPolicy_DefaultAppExists_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"default\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_TRUE(cache_manager_->SetDefaultPolicy(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, IsDefaultPolicy_DefaultValidApp_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": \"default\""
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_TRUE(cache_manager_->IsDefaultPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, IsDefaultPolicy_InvalidAppId_ReturnFalse) {
+ EXPECT_FALSE(cache_manager_->IsDefaultPolicy(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, IsDefaultPolicy_NotDefaultValidAppId_ReturnFalse) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"priority\": [\"NONE\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_FALSE(cache_manager_->IsDefaultPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, SetIsDefault_InvalidAppId_DefaultNotAssigned) {
+ EXPECT_TRUE(cache_manager_->SetIsDefault(kInvalidApp));
+ EXPECT_FALSE(cache_manager_->IsDefaultPolicy(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, SetIsDefault_ValidAppId_ReturnTrue) {
+ EXPECT_TRUE(cache_manager_->SetIsDefault(kValidAppId));
+ EXPECT_FALSE(cache_manager_->IsDefaultPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, IsPredataPolicy_InvalidAppId_ReturnFalse) {
+ EXPECT_FALSE(cache_manager_->IsPredataPolicy(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, IsPredataPolicy_NotPredataValidAppId_ReturnFalse) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"priority\": [\"NONE\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ EXPECT_FALSE(cache_manager_->IsPredataPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, IsPredataPolicy_PredataValidAppId_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": \"pre_DataConsent\""
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_TRUE(cache_manager_->IsPredataPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, SetPredataPolicy_NoPredataSection_ReturnFalse) {
+ pt_->policy_table.app_policies_section.apps.erase(kPreDataConsentId);
+ EXPECT_FALSE(cache_manager_->SetPredataPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, SetPredataPolicy_ValidPredataSection_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"pre_DataConsent\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_TRUE(cache_manager_->SetPredataPolicy(kValidAppId));
+ EXPECT_TRUE(cache_manager_->IsPredataPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, SetIsPredata_InvalidAppID_PredataNotAssigned) {
+ EXPECT_TRUE(cache_manager_->SetIsPredata(kInvalidApp));
+ EXPECT_FALSE(cache_manager_->IsPredataPolicy(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, SetIsPredata_ValidAppID_PredataIsAssigned) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_TRUE(cache_manager_->SetIsPredata(kValidAppId));
+ EXPECT_TRUE(cache_manager_->IsPredataPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, SetUnpairedDevice_NoSuchDevice_ReturnFalse) {
+ EXPECT_FALSE(cache_manager_->SetUnpairedDevice(kDeviceNumber, true));
+}
+
+TEST_F(CacheManagerTest, SetUnpairedDevice_UnpairedDevice_ReturnTrue) {
+ cache_manager_->AddDevice(kDeviceNumber, "kConnectionType");
+ EXPECT_TRUE(cache_manager_->SetUnpairedDevice(kDeviceNumber, true));
+}
+
+TEST_F(CacheManagerTest, SetUnpairedDevice_NotUnpairedDevice_ReturnTrue) {
+ cache_manager_->AddDevice(kDeviceNumber, "kConnectionType");
+ EXPECT_TRUE(cache_manager_->SetUnpairedDevice(kDeviceNumber, false));
+}
+
+TEST_F(CacheManagerTest, GetHMIAppTypeAfterUpdate_NoAppTypes_MapIsEmpty) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"AppHMIType\": [\"AHT_DEFAULT\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ std::map<std::string, StringArray> app_hmi_types;
+
+ cache_manager_->GetHMIAppTypeAfterUpdate(app_hmi_types);
+ EXPECT_TRUE(!app_hmi_types.empty());
+}
+
+TEST_F(CacheManagerTest,
+ ReactOnUserDevConsentForApp_DeviceNotAllowed_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": \"default\""
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ EXPECT_TRUE(cache_manager_->ReactOnUserDevConsentForApp(kValidAppId, false));
+ EXPECT_TRUE(cache_manager_->IsPredataPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest,
+ ReactOnUserDevConsentForApp_DeviceAllowedWithPredataPolicy_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": \"pre_DataConsent\","
+ "\"default\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ EXPECT_TRUE(cache_manager_->ReactOnUserDevConsentForApp(kValidAppId, true));
+ EXPECT_TRUE(cache_manager_->IsDefaultPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest,
+ ReactOnUserDevConsentForApp_DeviceAllowedAndNoPredataPolicy_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ EXPECT_TRUE(cache_manager_->ReactOnUserDevConsentForApp(kValidAppId, true));
+ EXPECT_FALSE(cache_manager_->IsDefaultPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, CountUnconsentedGroups_InvalidAppID_ReturnZero) {
+ EXPECT_EQ(0,
+ cache_manager_->CountUnconsentedGroups(kInvalidApp, kDeviceNumber));
+}
+
+TEST_F(CacheManagerTest,
+ CountUnconsentedGroups_ValidAppIDIsPredata_ReturnZero) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": \"pre_DataConsent\""
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_EQ(0,
+ cache_manager_->CountUnconsentedGroups(kValidAppId, kDeviceNumber));
+}
+
+TEST_F(CacheManagerTest,
+ CountUnconsentedGroups_ValidAppIDIsDefault_ReturnZero) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": \"default\""
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_EQ(0,
+ cache_manager_->CountUnconsentedGroups(kValidAppId, kDeviceNumber));
+}
+
+TEST_F(
+ CacheManagerTest,
+ CountUnconsentedGroups_AppIDIsDevice_AllGroupsAlreadyConsented_ReturnZero) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"device\": {"
+ "\"groups\": [\"Location-1\"],"
+ "\"preconsented_groups\": [\"Location-1\"],"
+ "}"
+ "},"
+ "\"functional_groupings\": {"
+ "\"Location-1\": {"
+ "\"user_consent_prompt\": \"Location\","
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_EQ(0,
+ cache_manager_->CountUnconsentedGroups(kDeviceId, kDeviceNumber));
+}
+
+TEST_F(CacheManagerTest,
+ CountUnconsentedGroups_ValidAppID_NoSuchDevice_ReturnOneGroup) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"groups\": [\"Location-1\"],"
+ "\"preconsented_groups\": [\"Base-4\"],"
+ "}"
+ "},"
+ "\"functional_groupings\": {"
+ "\"Location-1\": {"
+ "\"user_consent_prompt\": \"Location\","
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_EQ(1,
+ cache_manager_->CountUnconsentedGroups(kValidAppId, kDeviceNumber));
+}
+
+TEST_F(CacheManagerTest,
+ CountUnconsentedGroups_ValidAppID_NoUserConsentRecords_ReturnTwoGroups) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"groups\": [\"Location-1\", \"Notifications\"],"
+ "\"preconsented_groups\": [\"Base-4\"],"
+ "}"
+ "},"
+ "\"functional_groupings\": {"
+ "\"Location-1\": {"
+ "\"user_consent_prompt\": \"Location\","
+ "},"
+ "\"Notifications\": {"
+ "\"user_consent_prompt\": \"Notifications\","
+ "},"
+ "},"
+ "\"device_data\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_EQ(2,
+ cache_manager_->CountUnconsentedGroups(kValidAppId, kDeviceNumber));
+}
+
+TEST_F(
+ CacheManagerTest,
+ CountUnconsentedGroups_ValidAppID_GroupNotInUserConsentRecords_ReturnOneGroup) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"groups\": [\"Location-1\"],"
+ "\"preconsented_groups\": [\"Base-4\"],"
+ "}"
+ "},"
+ "\"functional_groupings\": {"
+ "\"Location-1\": {"
+ "\"user_consent_prompt\": \"Location\","
+ "}"
+ "},"
+ "\"device_data\": {"
+ "\"XXX123456789ZZZ\": {"
+ "\"user_consent_records\": {"
+ "\"1234\": {"
+ "\"consent_groups\":{"
+ "\"Notifications\":{"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_EQ(1,
+ cache_manager_->CountUnconsentedGroups(kValidAppId, kDeviceNumber));
+}
+
+TEST_F(CacheManagerTest, IsMetaInfoPresent_NoMetaInfo_ReturnFalse) {
+ EXPECT_FALSE(cache_manager_->IsMetaInfoPresent());
+}
+
+TEST_F(CacheManagerTest, IsMetaInfoPresent_MetaInfoIsPresent_ReturnTrue) {
+ const std::string ccpu_version("ccpu_version");
+ const std::string country_code("country_code");
+ const std::string language("en-us");
+
+ EXPECT_TRUE(
+ cache_manager_->SetMetaInfo(ccpu_version, country_code, language));
+ EXPECT_TRUE(cache_manager_->IsMetaInfoPresent());
+}
+
+TEST_F(CacheManagerTest, IsApplicationRevoked_InvalidAppID_ReturnFalse) {
+ EXPECT_FALSE(cache_manager_->IsApplicationRevoked(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest,
+ IsApplicationRevoked_ValidAppIDNotRevoked_ReturnFalse) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": \"default\""
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_FALSE(cache_manager_->IsApplicationRevoked(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, IsApplicationRevoked_ValidAppIDIsRevoked_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": \"default\""
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ pt_->policy_table.app_policies_section.apps[kValidAppId].set_to_null();
+
+ EXPECT_TRUE(cache_manager_->IsApplicationRevoked(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, ResetPT_CannotRefreshDB_ReturnFalse) {
+ EXPECT_FALSE(cache_manager_->ResetPT(kSdlPreloadedPtJson));
+}
+
+TEST_F(CacheManagerTest, ResetPT_InvalidFilename_ReturnFalse) {
+ cache_manager_->Init(kSdlPreloadedPtJson, &policy_settings_);
+ const std::string invalid_filename("invalid_filename.json");
+
+ EXPECT_FALSE(cache_manager_->ResetPT(invalid_filename));
+}
+
+TEST_F(CacheManagerTest, ResetPT_InitializedTableAndValidFilename_ReturnTrue) {
+ cache_manager_->Init(kSdlPreloadedPtJson, &policy_settings_);
+ EXPECT_TRUE(cache_manager_->ResetPT(kSdlPreloadedPtJson));
+}
+
+TEST_F(CacheManagerTest, GetAppRequestTypes_DeviceAppID_NoTypes) {
+ std::vector<std::string> request_types;
+ cache_manager_->GetAppRequestTypes(kDeviceId, request_types);
+
+ EXPECT_TRUE(request_types.empty());
+}
+
+TEST_F(CacheManagerTest, GetAppRequestTypes_InvalidAppID_NoTypes) {
+ std::vector<std::string> request_types;
+ cache_manager_->GetAppRequestTypes(kInvalidApp, request_types);
+
+ EXPECT_TRUE(request_types.empty());
+}
+
+TEST_F(CacheManagerTest, GetAppRequestTypes_ValidAppID_AddTypesIfPresent) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"RequestType\": [\"OnSystemRequest\", \"AddCommandRequest\"]"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ std::vector<std::string> request_types;
+
+ cache_manager_->GetAppRequestTypes(kValidAppId, request_types);
+ EXPECT_EQ(2u, request_types.size());
+}
+
+TEST_F(CacheManagerTest, GetInitialAppData_ValidAppID_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"AppHMIType\": [\"AHT_DEFAULT\"],"
+ "\"nicknames\": [\"Test app\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ StringArray nicknames;
+ StringArray app_hmi_types;
+
+ EXPECT_TRUE(
+ cache_manager_->GetInitialAppData(kValidAppId, nicknames, app_hmi_types));
+ EXPECT_FALSE(nicknames.empty());
+ EXPECT_FALSE(app_hmi_types.empty());
+}
+
+TEST_F(CacheManagerTest, GetInitialAppData_InvalidAppId_ReturnTrue) {
+ StringArray nicknames;
+ StringArray app_hmi_types;
+
+ EXPECT_TRUE(
+ cache_manager_->GetInitialAppData(kInvalidApp, nicknames, app_hmi_types));
+ EXPECT_TRUE(nicknames.empty());
+ EXPECT_TRUE(app_hmi_types.empty());
+}
+
+TEST_F(CacheManagerTest, GetAppRequestSubTypes_DeviceAppID_NoTypes) {
+ std::vector<std::string> request_types;
+
+ cache_manager_->GetAppRequestSubTypes(kDeviceId, request_types);
+ EXPECT_TRUE(request_types.empty());
+}
+
+TEST_F(CacheManagerTest, GetAppRequestSubTypes_InvalidAppID_NoTypes) {
+ std::vector<std::string> request_types;
+
+ cache_manager_->GetAppRequestSubTypes(kInvalidApp, request_types);
+ EXPECT_TRUE(request_types.empty());
+}
+
+TEST_F(CacheManagerTest, GetAppRequestSubTypes_ValidAppID_AddSubtype) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"RequestSubType\": [\"Some_subtype\"]"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ std::vector<std::string> request_subtypes;
+
+ cache_manager_->GetAppRequestSubTypes(kValidAppId, request_subtypes);
+ EXPECT_FALSE(request_subtypes.empty());
+}
+
+TEST_F(CacheManagerTest, Init_TableAlreadyExistsNotMerged_ReturnFalse) {
+ EXPECT_TRUE(cache_manager_->Init(kSdlPreloadedPtJson, &policy_settings_));
+ const std::string invalid_filename("invalid_filename.json");
+
+ EXPECT_FALSE(cache_manager_->Init(invalid_filename, &policy_settings_));
+}
+
+TEST_F(CacheManagerTest, Init_TableAlreadyExistsAndIsMerged_ReturnTrue) {
+ const std::string initial_version_of_pt(
+ "json/sdl_preloaded_pt_for_merge_initial.json");
+ const std::string latest_version_of_pt(
+ "json/sdl_preloaded_pt_for_merge_latest.json");
+
+ EXPECT_TRUE(cache_manager_->Init(initial_version_of_pt, &policy_settings_));
+ EXPECT_TRUE(cache_manager_->Init(latest_version_of_pt, &policy_settings_));
+}
+
+TEST_F(CacheManagerTest, GetCertificate_NoCertificateReturnEmptyString) {
+ std::string certificate = cache_manager_->GetCertificate();
+ EXPECT_TRUE(certificate.empty());
+}
+
+TEST_F(CacheManagerTest, GetCertificate_CertificateExists_ReturnCertificate) {
+ const std::string certificate_to_set("some_certificate");
+ cache_manager_->SetDecryptedCertificate(certificate_to_set);
+
+ std::string returned_certificate = cache_manager_->GetCertificate();
+ EXPECT_EQ(certificate_to_set, returned_certificate);
+}
+
+TEST_F(CacheManagerTest, SetExternalConsentStatus_EmptyStatus_ReturnFalse) {
+ EXPECT_FALSE(
+ cache_manager_->SetExternalConsentStatus(ExternalConsentStatus()));
+}
+
+TEST_F(CacheManagerTest, SetExternalConsentStatus_ValidStatus_ReturnTrue) {
+ ExternalConsentStatus consent_status;
+ consent_status.insert(ExternalConsentStatusItem());
+
+ EXPECT_TRUE(cache_manager_->Init(kSdlPreloadedPtJson, &policy_settings_));
+ EXPECT_TRUE(cache_manager_->SetExternalConsentStatus(consent_status));
+}
+
+TEST_F(CacheManagerTest,
+ SetUserPermissionsForApp_PermissionsNotChanged_ReturnTrue) {
+ PermissionConsent perm_consent;
+ perm_consent.device_id = kDeviceNumber;
+ perm_consent.policy_app_id = kValidAppId;
+ const std::string source("VR");
+ perm_consent.consent_source = source;
+
+ const std::string group_name("Notifications");
+ FunctionalGroupPermission group_perm;
+ group_perm.group_alias = group_name;
+ group_perm.group_name = group_name;
+ group_perm.group_id = ::utils::Djb2HashFromString(group_name);
+ group_perm.state = GroupConsent::kGroupUndefined;
+
+ std::vector<FunctionalGroupPermission> groups_permissions;
+ groups_permissions.push_back(group_perm);
+ perm_consent.group_permissions = groups_permissions;
+
+ bool app_permissions_changed;
+ EXPECT_TRUE(cache_manager_->SetUserPermissionsForApp(
+ perm_consent, &app_permissions_changed));
+ EXPECT_FALSE(app_permissions_changed);
+}
+
+TEST_F(CacheManagerTest,
+ SetUserPermissionsForApp_PermissionsIsChanged_ReturnTrue) {
+ PermissionConsent perm_consent;
+ perm_consent.device_id = kDeviceNumber;
+ perm_consent.policy_app_id = kValidAppId;
+ const std::string source("VR");
+ perm_consent.consent_source = source;
+
+ const std::string group_name("Notifications");
+ FunctionalGroupPermission group_perm;
+ group_perm.group_alias = group_name;
+ group_perm.group_name = group_name;
+ group_perm.group_id = ::utils::Djb2HashFromString(group_name);
+ group_perm.state = GroupConsent::kGroupAllowed;
+
+ std::vector<FunctionalGroupPermission> groups_permissions;
+ groups_permissions.push_back(group_perm);
+ perm_consent.group_permissions = groups_permissions;
+
+ bool app_permissions_changed;
+ EXPECT_TRUE(cache_manager_->SetUserPermissionsForApp(
+ perm_consent, &app_permissions_changed));
+ EXPECT_TRUE(app_permissions_changed);
+}
+
+TEST_F(CacheManagerTest, SetDeviceConsent_ConsentIsSetted_DeviceAllowed) {
+ cache_manager_->AddDevice(kDeviceNumber, kConnectionType);
+ StringArray consented_groups, disallowed_groups;
+ const std::string consented_group("DataConsent-2");
+ consented_groups.push_back(consented_group);
+ EXPECT_TRUE(cache_manager_->SetUserPermissionsForDevice(
+ kDeviceNumber, consented_groups, disallowed_groups));
+
+ cache_manager_->SetDeviceConsent(kDeviceNumber, true);
+ EXPECT_EQ(kDeviceAllowed, cache_manager_->GetDeviceConsent(kDeviceNumber));
+}
+
+TEST_F(CacheManagerTest,
+ GetVehicleDataItems_VehicleDataIsInitialized_GotDataItems) {
+ cache_manager_->Init(kSdlPreloadedPtJson, &policy_settings_);
+ const auto items = cache_manager_->GetVehicleDataItems();
+ EXPECT_FALSE(items.empty());
+}
+
+TEST_F(CacheManagerTest,
+ GetVehicleDataItems_VehicleDataNotInitialized_ReturnEmptyVector) {
+ const auto items = cache_manager_->GetVehicleDataItems();
+ EXPECT_TRUE(items.empty());
+}
+
+TEST_F(CacheManagerTest, LockScreenDismissalWarningMessage_ReturnValidMessage) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"consumer_friendly_messages\": {"
+ "\"messages\": {"
+ "\"LockScreenDismissalWarning\": {"
+ "\"languages\": {"
+ "\"en-us\": {"
+ "\"textBody\": \"Swipe down to dismiss, acknowledging that you are not "
+ "the driver\""
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ const std::string expected_msg(
+ "Swipe down to dismiss, acknowledging that you are not the driver");
+ const std::string language("en-us");
+
+ EXPECT_EQ(expected_msg,
+ *cache_manager_->LockScreenDismissalWarningMessage(language));
+}
+
+TEST_F(CacheManagerTest,
+ LockScreenDismissalEnabledState_EnabledInPT_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"module_config\": {"
+ "\"lock_screen_dismissal_enabled\": true"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_TRUE(*cache_manager_->LockScreenDismissalEnabledState());
+}
+
+TEST_F(CacheManagerTest,
+ UnknownRPCPassthroughAllowed_InvalidAppID_ReturnFalse) {
+ EXPECT_FALSE(cache_manager_->UnknownRPCPassthroughAllowed(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, UnknownRPCPassthroughAllowed_ValidAppID_ReturnTrue) {
+ pt_->policy_table.app_policies_section.apps[kValidAppId]
+ .allow_unknown_rpc_passthrough = rpc::Optional<rpc::Boolean>(true);
+ EXPECT_TRUE(cache_manager_->UnknownRPCPassthroughAllowed(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, GetAppProperties_InvalidAppID_ReturnFalse) {
+ AppProperties out_app_properties;
+ EXPECT_FALSE(
+ cache_manager_->GetAppProperties(kInvalidApp, out_app_properties));
+}
+
+TEST_F(CacheManagerTest, GetAppProperties_ValidAppID_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ AppProperties out_app_properties;
+ const std::string endpoint("endpoint");
+ const std::string auth_token("auth_token");
+ const std::string transport_type("transport_type");
+ const std::string hybrid_app_preference("CLOUD");
+
+ cache_manager_->SetAppEndpoint(kValidAppId, endpoint);
+ cache_manager_->SetAppAuthToken(kValidAppId, auth_token);
+ cache_manager_->SetAppCloudTransportType(kValidAppId, transport_type);
+ cache_manager_->SetHybridAppPreference(kValidAppId, hybrid_app_preference);
+ cache_manager_->SetCloudAppEnabled(kValidAppId, true);
+
+ EXPECT_TRUE(
+ cache_manager_->GetAppProperties(kValidAppId, out_app_properties));
+ EXPECT_EQ(endpoint, out_app_properties.endpoint);
+ EXPECT_EQ(auth_token, out_app_properties.auth_token);
+ EXPECT_EQ(transport_type, out_app_properties.transport_type);
+ EXPECT_EQ(hybrid_app_preference, out_app_properties.hybrid_app_preference);
+ EXPECT_TRUE(out_app_properties.enabled);
+}
+
+TEST_F(CacheManagerTest,
+ SetExternalConsentForApp_ConsentsSame_ConsentNotSetted) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"device_data\": {"
+ "\"XXX123456789ZZZ\": {"
+ "\"user_consent_records\": {"
+ "\"1234\": {"
+ "\"external_consent_status_groups\":{"
+ "\"Notifications\":true"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ PermissionConsent perm_consent;
+ perm_consent.device_id = kDeviceNumber;
+ perm_consent.policy_app_id = kValidAppId;
+ const std::string source("VR");
+ perm_consent.consent_source = source;
+
+ const std::string group_name("Notifications");
+ FunctionalGroupPermission group_perm;
+ group_perm.group_alias = group_name;
+ group_perm.group_name = group_name;
+ group_perm.group_id = ::utils::Djb2HashFromString(group_name);
+ group_perm.state = GroupConsent::kGroupAllowed;
+
+ std::vector<FunctionalGroupPermission> groups_permissions;
+ groups_permissions.push_back(group_perm);
+ perm_consent.group_permissions = groups_permissions;
+
+ policy_table::ConsentGroups initial_consent_groups =
+ *(*(*pt_->policy_table.device_data)[kDeviceNumber]
+ .user_consent_records)[kValidAppId]
+ .external_consent_status_groups;
+ cache_manager_->SetExternalConsentForApp(perm_consent);
+
+ policy_table::ConsentGroups updated_consent_groups =
+ *(*(*pt_->policy_table.device_data)[kDeviceNumber]
+ .user_consent_records)[kValidAppId]
+ .external_consent_status_groups;
+ EXPECT_EQ(initial_consent_groups, updated_consent_groups);
+}
+
+TEST_F(CacheManagerTest,
+ SetExternalConsentForApp_ConsentsNewGroup_ConsentIsSetted) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"device_data\": {"
+ "\"XXX123456789ZZZ\": {"
+ "\"user_consent_records\": {"
+ "\"1234\": {"
+ "\"external_consent_status_groups\":{"
+ "\"Notifications\":true"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ PermissionConsent perm_consent;
+ perm_consent.device_id = kDeviceNumber;
+ perm_consent.policy_app_id = kValidAppId;
+ const std::string source("VR");
+ perm_consent.consent_source = source;
+
+ const std::string group_name("Base-4");
+
+ FunctionalGroupPermission group_perm;
+ group_perm.group_alias = group_name;
+ group_perm.group_name = group_name;
+ group_perm.group_id = ::utils::Djb2HashFromString(group_name);
+ group_perm.state = GroupConsent::kGroupAllowed;
+
+ std::vector<FunctionalGroupPermission> groups_permissions;
+ groups_permissions.push_back(group_perm);
+ perm_consent.group_permissions = groups_permissions;
+
+ policy_table::ConsentGroups initial_consent_groups =
+ *(*(*pt_->policy_table.device_data)[kDeviceNumber]
+ .user_consent_records)[kValidAppId]
+ .external_consent_status_groups;
+ cache_manager_->SetExternalConsentForApp(perm_consent);
+
+ policy_table::ConsentGroups updated_consent_groups =
+ *(*(*pt_->policy_table.device_data)[kDeviceNumber]
+ .user_consent_records)[kValidAppId]
+ .external_consent_status_groups;
+ EXPECT_NE(initial_consent_groups, updated_consent_groups);
+}
+
+TEST_F(CacheManagerTest, Add_MinutesAreAdded) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ int result;
+ int seconds;
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .minutes_in_hmi_full = 0;
+ seconds = 60;
+ cache_manager_->Add(kValidAppId, usage_statistics::SECONDS_HMI_FULL, seconds);
+ result = static_cast<int>(
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .minutes_in_hmi_full);
+ EXPECT_EQ(1, result);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .minutes_in_hmi_limited = 0;
+ seconds = 120;
+ cache_manager_->Add(
+ kValidAppId, usage_statistics::SECONDS_HMI_LIMITED, seconds);
+ result = static_cast<int>(
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .minutes_in_hmi_limited);
+ EXPECT_EQ(2, result);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .minutes_in_hmi_background = 0;
+ seconds = 180;
+ cache_manager_->Add(
+ kValidAppId, usage_statistics::SECONDS_HMI_BACKGROUND, seconds);
+ result = static_cast<int>(
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .minutes_in_hmi_background);
+ EXPECT_EQ(3, result);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .minutes_in_hmi_none = 0;
+ seconds = 240;
+ cache_manager_->Add(kValidAppId, usage_statistics::SECONDS_HMI_NONE, seconds);
+ result = static_cast<int>(
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .minutes_in_hmi_none);
+ EXPECT_EQ(4, result);
+}
+
+TEST_F(CacheManagerTest, Set_ValuesAreSetted) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ const std::string language("eng-eng");
+
+ cache_manager_->Set(kValidAppId, usage_statistics::LANGUAGE_GUI, language);
+ EXPECT_EQ(
+ language,
+ std::string(
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .app_registration_language_gui));
+
+ cache_manager_->Set(kValidAppId, usage_statistics::LANGUAGE_VUI, language);
+ EXPECT_EQ(
+ language,
+ std::string(
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .app_registration_language_vui));
+}
+
+TEST_F(CacheManagerTest, Increment_GlobalCounterIsIncremented) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ *pt_->policy_table.usage_and_error_counts->count_of_iap_buffer_full = 0;
+ cache_manager_->Increment(usage_statistics::IAP_BUFFER_FULL);
+ EXPECT_EQ(
+ 1, *pt_->policy_table.usage_and_error_counts->count_of_iap_buffer_full);
+
+ *pt_->policy_table.usage_and_error_counts->count_sync_out_of_memory = 0;
+ cache_manager_->Increment(usage_statistics::SYNC_OUT_OF_MEMORY);
+ EXPECT_EQ(
+ 1, *pt_->policy_table.usage_and_error_counts->count_sync_out_of_memory);
+
+ *pt_->policy_table.usage_and_error_counts->count_of_sync_reboots = 0;
+ cache_manager_->Increment(usage_statistics::SYNC_REBOOTS);
+ EXPECT_EQ(1,
+ *pt_->policy_table.usage_and_error_counts->count_of_sync_reboots);
+}
+
+TEST_F(CacheManagerTest, Increment_AppCounterIsIncremented) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_user_selections = 0;
+ cache_manager_->Increment(kValidAppId, usage_statistics::USER_SELECTIONS);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_user_selections);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rejections_sync_out_of_memory = 0;
+ cache_manager_->Increment(kValidAppId,
+ usage_statistics::REJECTIONS_SYNC_OUT_OF_MEMORY);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rejections_sync_out_of_memory);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rejections_nickname_mismatch = 0;
+ cache_manager_->Increment(kValidAppId,
+ usage_statistics::REJECTIONS_NICKNAME_MISMATCH);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rejections_nickname_mismatch);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rejections_duplicate_name = 0;
+ cache_manager_->Increment(kValidAppId,
+ usage_statistics::REJECTIONS_DUPLICATE_NAME);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rejections_duplicate_name);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rejected_rpc_calls = 0;
+ cache_manager_->Increment(kValidAppId, usage_statistics::REJECTED_RPC_CALLS);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rejected_rpc_calls);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rpcs_sent_in_hmi_none = 0;
+ cache_manager_->Increment(kValidAppId, usage_statistics::RPCS_IN_HMI_NONE);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rpcs_sent_in_hmi_none);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_removals_for_bad_behavior = 0;
+ cache_manager_->Increment(kValidAppId, usage_statistics::REMOVALS_MISBEHAVED);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_removals_for_bad_behavior);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_run_attempts_while_revoked = 0;
+ cache_manager_->Increment(kValidAppId,
+ usage_statistics::RUN_ATTEMPTS_WHILE_REVOKED);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_run_attempts_while_revoked);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_tls_errors = 0;
+ cache_manager_->Increment(kValidAppId, usage_statistics::COUNT_OF_TLS_ERRORS);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_tls_errors);
+}
+
+TEST_F(CacheManagerTest, GetUnconsentedGroups_InvalidAppId_ReturnNoGroups) {
+ FunctionalGroupIDs group_ids;
+ cache_manager_->GetUnconsentedGroups(kDeviceNumber, kInvalidApp, group_ids);
+ EXPECT_TRUE(group_ids.empty());
+}
+
+TEST_F(CacheManagerTest,
+ GetUnconsentedGroups_DeviceApp_NoSuchFunctionalGroup_NoGroups) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"device\": {"
+ "\"groups\": [\"Location-1\"],"
+ "}"
+ "},"
+ "\"functional_groupings\": {"
+ "\"Base-4\": {"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ FunctionalGroupIDs group_ids;
+
+ cache_manager_->GetUnconsentedGroups(kDeviceNumber, kDeviceId, group_ids);
+ EXPECT_TRUE(group_ids.empty());
+}
+
+TEST_F(CacheManagerTest,
+ GetUnconsentedGroups_ValidApp_NoUserConsentsForGroup_NoGroups) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"groups\": [\"Location-1\"]"
+ "}"
+ "},"
+ "\"functional_groupings\": {"
+ "\"Location-1\": {"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ FunctionalGroupIDs group_ids;
+
+ cache_manager_->GetUnconsentedGroups(kDeviceNumber, kValidAppId, group_ids);
+ EXPECT_TRUE(group_ids.empty());
+}
+
+TEST_F(CacheManagerTest,
+ GetUnconsentedGroups_ValidAppId_NoSuchDevice_NoGroups) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"groups\": [\"Location-1\"]"
+ "}"
+ "},"
+ "\"functional_groupings\": {"
+ "\"Location-1\": {"
+ "\"user_consent_prompt\": \"Location\""
+ "}"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ FunctionalGroupIDs group_ids;
+
+ cache_manager_->GetUnconsentedGroups(kDeviceNumber, kValidAppId, group_ids);
+ EXPECT_TRUE(group_ids.empty());
+}
+
+TEST_F(
+ CacheManagerTest,
+ GetUnconsentedGroups_ValidAppId_NoSuchAppInUserConsentRecords_ReturnGroups) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"groups\": [\"Location-1\"],"
+ "}"
+ "},"
+ "\"functional_groupings\": {"
+ "\"Location-1\": {"
+ "\"user_consent_prompt\": \"Location\","
+ "}"
+ "},"
+ "\"device_data\": {"
+ "\"XXX123456789ZZZ\": {"
+ "\"user_consent_records\": {"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ FunctionalGroupIDs group_ids;
+
+ cache_manager_->GetUnconsentedGroups(kDeviceNumber, kValidAppId, group_ids);
+ EXPECT_FALSE(group_ids.empty());
+}
+
+TEST_F(
+ CacheManagerTest,
+ GetUnconsentedGroups_ValidAppId_UserConsentPromptInitialized_ReturnGroups) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"groups\": [\"Location-1\"],"
+ "}"
+ "},"
+ "\"functional_groupings\": {"
+ "\"Location-1\": {"
+ "\"user_consent_prompt\": \"Location\","
+ "}"
+ "},"
+ "\"device_data\": {"
+ "\"XXX123456789ZZZ\": {"
+ "\"user_consent_records\": {"
+ "\"1234\": {"
+ "\"consent_groups\":{"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ FunctionalGroupIDs group_ids;
+
+ cache_manager_->GetUnconsentedGroups(kDeviceNumber, kValidAppId, group_ids);
+ EXPECT_FALSE(group_ids.empty());
+}
+
+TEST_F(CacheManagerTest, GetConsentedGroups_NoSuchDevice_ReturnNoGroups) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"device_data\": {"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ FunctionalGroupIDs allowed_groups;
+ FunctionalGroupIDs disallowed_groups;
+
+ cache_manager_->GetConsentedGroups(
+ kDeviceNumber, kValidAppId, allowed_groups, disallowed_groups);
+ EXPECT_TRUE(allowed_groups.empty());
+ EXPECT_TRUE(disallowed_groups.empty());
+}
+
+TEST_F(CacheManagerTest, GetConsentedGroups_NoAppForDevice_ReturnNoGroups) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"device_data\": {"
+ "\"XXX123456789ZZZ\": {"
+ "\"user_consent_records\": {"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ FunctionalGroupIDs allowed_groups;
+ FunctionalGroupIDs disallowed_groups;
+
+ cache_manager_->GetConsentedGroups(
+ kDeviceNumber, kValidAppId, allowed_groups, disallowed_groups);
+ EXPECT_TRUE(allowed_groups.empty());
+ EXPECT_TRUE(disallowed_groups.empty());
+}
+
+TEST_F(CacheManagerTest, GetConsentedGroups_GroupsExist_ReturnGroups) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"device_data\": {"
+ "\"XXX123456789ZZZ\": {"
+ "\"user_consent_records\": {"
+ "\"1234\": {"
+ "\"consent_groups\":{"
+ "\"Location-1\": true,"
+ "\"Base-4\": false,"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ FunctionalGroupIDs allowed_groups;
+ FunctionalGroupIDs disallowed_groups;
+
+ cache_manager_->GetConsentedGroups(
+ kDeviceNumber, kValidAppId, allowed_groups, disallowed_groups);
+ EXPECT_FALSE(allowed_groups.empty());
+ EXPECT_FALSE(disallowed_groups.empty());
+}
+
+TEST_F(CacheManagerTest, RemoveAppConsentForGroup_GroupIsRemoved) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"groups\": [\"Location-1\"]"
+ "}"
+ "},"
+ "\"functional_groupings\": {"
+ "\"Location-1\": {"
+ "\"user_consent_prompt\": \"Location\""
+ "}"
+ "},"
+ "\"device_data\": {"
+ "\"XXX123456789ZZZ\": {"
+ "\"user_consent_records\": {"
+ "\"1234\": {"
+ "\"consent_groups\":{"
+ "\"Location-1\": true"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ FunctionalGroupIDs allowed_groups_before_removal,
+ disallowed_groups_before_removal;
+ cache_manager_->GetConsentedGroups(kDeviceNumber,
+ kValidAppId,
+ allowed_groups_before_removal,
+ disallowed_groups_before_removal);
+ EXPECT_FALSE(allowed_groups_before_removal.empty());
+
+ FunctionalGroupIDs unconsented_groups_before_removal;
+ cache_manager_->GetUnconsentedGroups(
+ kDeviceNumber, kValidAppId, unconsented_groups_before_removal);
+ EXPECT_TRUE(unconsented_groups_before_removal.empty());
+
+ const std::string group_to_remove("Location-1");
+ cache_manager_->RemoveAppConsentForGroup(kValidAppId, group_to_remove);
+
+ FunctionalGroupIDs allowed_groups_after_removal,
+ disallowed_groups_after_removal;
+ cache_manager_->GetConsentedGroups(kDeviceNumber,
+ kValidAppId,
+ allowed_groups_after_removal,
+ disallowed_groups_after_removal);
+ EXPECT_TRUE(allowed_groups_after_removal.empty());
+
+ FunctionalGroupIDs unconsented_groups_after_removal;
+ cache_manager_->GetUnconsentedGroups(
+ kDeviceNumber, kValidAppId, unconsented_groups_after_removal);
+ EXPECT_FALSE(unconsented_groups_after_removal.empty());
+}
+
+} // namespace policy_test
+} // namespace components
+} // namespace test
diff --git a/src/components/policy/policy_external/test/counter_test.cc b/src/components/policy/policy_external/test/counter_test.cc
deleted file mode 100644
index af166f96ad..0000000000
--- a/src/components/policy/policy_external/test/counter_test.cc
+++ /dev/null
@@ -1,184 +0,0 @@
-/* Copyright (c) 2015, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "policy/usage_statistics/counter.h"
-#include "gtest/gtest.h"
-#include "policy/usage_statistics/mock_statistics_manager.h"
-
-using ::testing::InSequence;
-using ::testing::StrictMock;
-
-namespace test {
-namespace components {
-namespace usage_statistics_test {
-
-using namespace usage_statistics;
-
-TEST(
- StatisticsManagerIncrementMethod1Arg,
- GlobalCounterOverloadedIncrement_CallONCE_StatisticsManagerIncrementCalledONCE) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- GlobalCounter reboots_counter(msm, SYNC_REBOOTS);
-
- // Assert
- EXPECT_CALL(*msm, Increment(SYNC_REBOOTS));
-
- // Act
- ++reboots_counter;
-}
-
-TEST(
- StatisticsManagerIncrementMethod1Arg,
- GlobalCounterOverloadedIncrement_CallTWICE_StatisticsManagerIncrementCalledTWICE) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- GlobalCounter reboots_counter(msm, SYNC_REBOOTS);
-
- // Assert
- EXPECT_CALL(*msm, Increment(SYNC_REBOOTS)).Times(2);
-
- // Act
- ++reboots_counter;
- ++reboots_counter;
-}
-
-TEST(
- StatisticsManagerIncrementMethod2Args,
- AppCounterOverloadedIncrement_CallONCE_StatisticsManagerIncrementCalledONCE) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- AppCounter user_selections_counter(msm, "HelloApp", USER_SELECTIONS);
-
- // Assert
- EXPECT_CALL(*msm, Increment("HelloApp", USER_SELECTIONS));
-
- // Act
- ++user_selections_counter;
-}
-
-TEST(
- StatisticsManagerIncrementMethod2Args,
- AppCounterOverloadedIncrement_CallTWICE_StatisticsManagerIncrementCalledTWICE) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- AppCounter user_selections_counter(msm, "HelloApp", USER_SELECTIONS);
-
- // Assert
- EXPECT_CALL(*msm, Increment("HelloApp", USER_SELECTIONS)).Times(2);
-
- // Act
- ++user_selections_counter;
- ++user_selections_counter;
-}
-//---
-TEST(StatisticsManagerSetMethod,
- AppInfoUpdateMethod_CallONCE_StatisticsManagerSetMethodCalledONCE) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- AppInfo gui_language_info(msm, "HelloApp", LANGUAGE_GUI);
-
- // Assert
- EXPECT_CALL(*msm, Set("HelloApp", LANGUAGE_GUI, "Klingon"));
-
- // Act
- gui_language_info.Update("Klingon");
-}
-
-TEST(StatisticsManagerSetMethod,
- AppInfoUpdateMethod_CallTWICE_StatisticsManagerSetMethodCalledTWICE) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- AppInfo gui_language_info(msm, "HelloApp", LANGUAGE_GUI);
-
- // Assert
- EXPECT_CALL(*msm, Set("HelloApp", LANGUAGE_GUI, "Klingon"));
- EXPECT_CALL(*msm, Set("HelloApp", LANGUAGE_GUI, "UA"));
-
- // Act
- gui_language_info.Update("Klingon");
- gui_language_info.Update("UA");
-}
-
-TEST(StatisticsManagerAddMethod,
- AppStopwatchStartMethod_CallONCE_StatisticsManagerAddMethodCalledONCE) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- const std::uint32_t time_out = 1;
- AppStopwatchImpl hmi_full_stopwatch(msm, "HelloApp", time_out);
-
- hmi_full_stopwatch.Start(SECONDS_HMI_FULL);
- // Assert
- EXPECT_CALL(*msm, Add("HelloApp", SECONDS_HMI_FULL, time_out));
-
- // Act
- hmi_full_stopwatch.WriteTime();
-}
-
-TEST(StatisticsManagerAddMethod,
- AppStopwatchSwitchMethod_Call_StatisticsManagerAddMethodCalled) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- AppStopwatchImpl hmi_full_stopwatch(msm, "HelloApp");
- hmi_full_stopwatch.Start(SECONDS_HMI_FULL);
-
- hmi_full_stopwatch.Switch(SECONDS_HMI_FULL);
- // Assert
- EXPECT_CALL(*msm, Add("HelloApp", SECONDS_HMI_FULL, 60));
-
- // Act
- hmi_full_stopwatch.WriteTime();
-}
-
-TEST(
- StatisticsManagerAddMethod,
- AppStopwatchSwitchMethod_CallAnd1SecSleepAfter_StatisticsManagerAddMethodCalledWith1SecTimespan) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- const std::uint32_t time_out = 1;
- AppStopwatchImpl hmi_full_stopwatch(msm, "HelloApp", time_out);
-
- // Act
- hmi_full_stopwatch.Start(SECONDS_HMI_NONE);
- // Assert
- EXPECT_CALL(*msm, Add("HelloApp", SECONDS_HMI_NONE, time_out));
- // Act
- hmi_full_stopwatch.WriteTime();
-
- hmi_full_stopwatch.Switch(SECONDS_HMI_BACKGROUND);
- // Assert
- EXPECT_CALL(*msm, Add("HelloApp", SECONDS_HMI_BACKGROUND, time_out));
- // Act
- hmi_full_stopwatch.WriteTime();
-}
-} // namespace usage_statistics_test
-} // namespace components
-} // namespace test
diff --git a/src/components/policy/policy_external/test/generated_code_test.cc b/src/components/policy/policy_external/test/generated_code_test.cc
deleted file mode 100644
index 03cfae511b..0000000000
--- a/src/components/policy/policy_external/test/generated_code_test.cc
+++ /dev/null
@@ -1,230 +0,0 @@
-/* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <fstream>
-
-#include "gtest/gtest.h"
-
-#include "json/reader.h"
-#include "json/value.h"
-#include "policy/policy_table/enums.h"
-#include "policy/policy_table/types.h"
-#include "rpc_base/gtest_support.h"
-#include "rpc_base/rpc_base.h"
-
-using rpc::Integer;
-using rpc::policy_table_interface_base::Table;
-
-namespace test {
-namespace components {
-namespace policy_test {
-
-TEST(PolicyGeneratedCodeTest, TestValidPTPreloadJsonIsValid) {
- std::ifstream json_file("json/sdl_preloaded_pt.json");
- ASSERT_TRUE(json_file.is_open());
- Json::Value valid_table;
- Json::CharReaderBuilder reader_builder;
- ASSERT_TRUE(
- Json::parseFromStream(reader_builder, json_file, &valid_table, nullptr));
- Table table(&valid_table);
- table.SetPolicyTableType(rpc::policy_table_interface_base::PT_PRELOADED);
- ASSERT_RPCTYPE_VALID(table);
-}
-
-TEST(PolicyGeneratedCodeTest, TestValidPTUpdateJsonIsValid) {
- std::ifstream json_file("json/valid_sdl_pt_update.json");
- ASSERT_TRUE(json_file.is_open());
- Json::Value valid_table;
- Json::CharReaderBuilder reader_builder;
- ASSERT_TRUE(
- Json::parseFromStream(reader_builder, json_file, &valid_table, nullptr));
- Table table(&valid_table);
- table.SetPolicyTableType(rpc::policy_table_interface_base::PT_UPDATE);
- ASSERT_RPCTYPE_VALID(table);
-}
-
-TEST(PolicyGeneratedCodeTest, IntegerLimitsTest) {
- const int32_t min_value = -5;
- const int32_t max_value = 5;
-
- Integer<int32_t, min_value, max_value> value;
- EXPECT_FALSE(value.is_valid());
-
- value = min_value;
- EXPECT_TRUE(value.is_valid());
-
- value = max_value;
- EXPECT_TRUE(value.is_valid());
-
- value = min_value + max_value;
- EXPECT_TRUE(value.is_valid());
-
- value = min_value - 1;
- EXPECT_FALSE(value.is_valid());
-
- value = max_value + 1;
- EXPECT_FALSE(value.is_valid());
-}
-
-TEST(PolicyGeneratedCodeTest, IntegerConstructionAndAssignmentTest) {
- const int32_t min_value = -5;
- const int32_t max_value = 5;
-
- const Json::Value json_null = Json::Value(Json::nullValue);
- Integer<int32_t, min_value, max_value> value_from_json_null(&json_null);
- EXPECT_FALSE(value_from_json_null.is_valid());
-
- const Json::Value json_string = Json::Value("string");
- Integer<int32_t, min_value, max_value> value_from_json_string(&json_string);
- EXPECT_FALSE(value_from_json_string.is_valid());
-
- const Json::Value json_float = Json::Value(10.5);
- Integer<int32_t, min_value, max_value> value_from_json_float(&json_float);
- EXPECT_FALSE(value_from_json_float.is_valid());
-
- const Json::Value json_int_in_range = Json::Value(4);
- Integer<int32_t, min_value, max_value> value_from_json_int_in_range(
- &json_int_in_range);
- EXPECT_TRUE(value_from_json_int_in_range.is_valid());
-
- const Json::Value json_int_out_of_range = Json::Value(9);
- Integer<int32_t, min_value, max_value> value_from_json_int_out_of_range(
- &json_int_out_of_range);
- EXPECT_FALSE(value_from_json_int_out_of_range.is_valid());
-
- const Json::Value json_zero = Json::Value(0);
- Integer<int32_t, min_value, max_value> value_from_json_zero(&json_zero);
- EXPECT_TRUE(value_from_json_zero.is_valid());
-
- Integer<int32_t, min_value, max_value> invalid_value(&json_string);
- EXPECT_FALSE(invalid_value.is_valid());
- Integer<int32_t, min_value, max_value> reassigned_value = invalid_value;
- EXPECT_FALSE(reassigned_value.is_valid());
-
- Integer<int32_t, min_value, max_value> another_invalid_value(&json_string);
- EXPECT_FALSE(another_invalid_value.is_valid());
- Integer<int32_t, min_value, max_value> valid_value(0);
- EXPECT_TRUE(valid_value.is_valid());
- valid_value = another_invalid_value;
- EXPECT_FALSE(valid_value.is_valid());
-}
-
-TEST(PolicyGeneratedCodeTest, TestConsentsGroup_Validation) {
- using namespace rpc::policy_table_interface_base;
- // Need to validate CCS consents container wrapped with Optional for case w/o
- // specific values assigned since it is of generic 'Map' type which requires
- // to be empty + initialized in order to be valid
- // Also Map type does not have specific validation on PT type
-
- rpc::Optional<ConsentGroups> consent_groups;
-
- EXPECT_TRUE(consent_groups.is_valid());
-
- consent_groups->insert(
- std::make_pair(std::string("Group1"), rpc::Boolean(true)));
-
- EXPECT_TRUE(consent_groups.is_valid());
-
- // Adds more than container maximum size
- for (size_t number = 0; number < 256; ++number) {
- std::stringstream name;
- name << "Group" << number;
- consent_groups->insert(std::make_pair(name.str(), rpc::Boolean(true)));
- }
-
- EXPECT_FALSE(consent_groups.is_valid());
-}
-
-TEST(PolicyGeneratedCodeTest,
- TestConsentRecords_ExternalConsents_PT_Validation) {
- using namespace rpc::policy_table_interface_base;
- ConsentRecords consent_records;
-
- // PT_SNAPSHOT does not care of consents since their type is 'optional'
- // PT_UPDATE and PT_SNAPSHOT have consents as 'omitted' so they must be absent
- consent_records.SetPolicyTableType(PT_UPDATE);
- EXPECT_TRUE(consent_records.is_valid());
-
- consent_records.SetPolicyTableType(PT_PRELOADED);
- EXPECT_TRUE(consent_records.is_valid());
-
- consent_records.SetPolicyTableType(PT_SNAPSHOT);
- EXPECT_TRUE(consent_records.is_valid());
-
- consent_records.external_consent_status_groups->insert(
- std::make_pair(std::string("Group1"), true));
-
- consent_records.external_consent_status_groups->insert(
- std::make_pair(std::string("Group2"), false));
-
- consent_records.SetPolicyTableType(PT_UPDATE);
- EXPECT_FALSE(consent_records.is_valid());
-
- consent_records.SetPolicyTableType(PT_PRELOADED);
- EXPECT_FALSE(consent_records.is_valid());
-
- consent_records.SetPolicyTableType(PT_SNAPSHOT);
- EXPECT_TRUE(consent_records.is_valid());
-}
-
-TEST(PolicyGeneratedCodeTest,
- ExternalConsentEntity_ConstructionValidationTest) {
- using namespace rpc::policy_table_interface_base;
-
- ExternalConsentEntity empty_entity;
- EXPECT_FALSE(empty_entity.is_valid());
-
- const std::string corrent_entity_type_field = "entityType";
- const std::string correct_entity_id_field = "entityID";
-
- Json::Value correct_json_entity;
- correct_json_entity[corrent_entity_type_field] = 1;
- correct_json_entity[correct_entity_id_field] = 2;
-
- ExternalConsentEntity entity_from_correct_json(&correct_json_entity);
- EXPECT_TRUE(entity_from_correct_json.is_valid());
-
- const std::string wrong_entity_id_field = "entityId";
-
- Json::Value wrong_json_entity;
- wrong_json_entity[corrent_entity_type_field] = 1;
- wrong_json_entity[wrong_entity_id_field] = 2;
-
- ExternalConsentEntity entity_from_wrong_json(&wrong_json_entity);
- EXPECT_FALSE(entity_from_wrong_json.is_valid());
-
- ExternalConsentEntity entity_from_valid_ints(1, 2);
- EXPECT_TRUE(entity_from_valid_ints.is_valid());
-}
-
-} // namespace policy_test
-} // namespace components
-} // namespace test
diff --git a/src/components/policy/policy_external/test/include/policy/policy_manager_impl_test_base.h b/src/components/policy/policy_external/test/include/policy/policy_manager_impl_test_base.h
deleted file mode 100644
index 40b57f9ed3..0000000000
--- a/src/components/policy/policy_external/test/include/policy/policy_manager_impl_test_base.h
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
- * Copyright (c) 2016, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef SRC_COMPONENTS_POLICY_POLICY_EXTERNAL_TEST_INCLUDE_POLICY_POLICY_MANAGER_IMPL_TEST_BASE_H_
-#define SRC_COMPONENTS_POLICY_POLICY_EXTERNAL_TEST_INCLUDE_POLICY_POLICY_MANAGER_IMPL_TEST_BASE_H_
-
-#include <string>
-#include <vector>
-
-#include "gtest/gtest.h"
-
-#include "policy/policy_manager_impl.h"
-
-#include "policy/mock_cache_manager.h"
-#include "policy/mock_policy_listener.h"
-#include "policy/mock_policy_settings.h"
-#include "policy/mock_ptu_retry_handler.h"
-#include "policy/mock_update_status_manager.h"
-
-namespace test {
-namespace components {
-namespace policy_test {
-
-using ::policy::PolicyManagerImpl;
-using ::testing::NiceMock;
-
-typedef std::multimap<std::string, policy_table::Rpcs&>
- UserConsentPromptToRpcsConnections;
-
-typedef std::shared_ptr<policy_table::Table> PolicyTableSPtr;
-
-namespace {
-const std::string kSdlPreloadedPtJson = "json/sdl_preloaded_pt.json";
-const std::string kSdlPreloadedPtJson2 = "json/sdl_preloaded_pt1.json";
-const std::string kFilePtUpdateJson = "json/file_pt_update.json";
-const std::string kHmiLevelFull = "FULL";
-const std::string kHmiLevelLimited = "LIMITED";
-const std::string kHmiLevelBackground = "BACKGROUND";
-const std::string kHmiLevelNone = "None";
-
-const std::string kPtuJson = "json/PTU.json";
-const std::string kPtu2Json = "json/PTU2.json";
-const std::string kPtu3Json = "json/PTU3.json";
-const std::string kValidSdlPtUpdateJson = "json/valid_sdl_pt_update.json";
-const std::string kPtuRequestTypeJson = "json/ptu_requestType.json";
-const std::string kPtu2RequestTypeJson = "json/ptu2_requestType.json";
-const std::string kDummyUpdateFileName = "DummyName";
-} // namespace
-
-struct StringsForUpdate {
- std::string new_field_value_;
- std::string new_field_name_;
- std::string new_date_;
-};
-
-char GenRandomChar(char range_from, char range_to);
-struct StringsForUpdate CreateNewRandomData(StringsForUpdate& str);
-void CheckIsParamInList(const ::policy::RPCParams& list,
- const std::string& parameter);
-Json::Value createPTforLoad();
-void InsertRpcParametersInList(::policy::RPCParams& input_params);
-policy_table::AppHmiTypes HmiTypes(const policy_table::AppHMIType hmi_type);
-
-template <typename T>
-void SortAndCheckEquality(std::vector<T> first, std::vector<T> second) {
- ASSERT_EQ(first.size(), second.size());
- std::sort(first.begin(), first.end());
- std::sort(second.begin(), second.end());
-
- EXPECT_TRUE(std::equal(first.begin(), first.end(), second.begin()));
-}
-
-template <typename T>
-std::string NumberToString(T Number) {
- std::ostringstream ss;
- ss << Number;
- return ss.str();
-}
-
-class PolicyManagerImplTest : public ::testing::Test {
- public:
- PolicyManagerImplTest();
-
- protected:
- const std::string unpaired_device_id_;
-
- PolicyManagerImpl* policy_manager_;
- NiceMock<MockCacheManagerInterface>* cache_manager_;
- MockUpdateStatusManager update_manager_;
- NiceMock<MockPolicyListener> listener_;
- NiceMock<MockPTURetryHandler> ptu_retry_handler_;
- PolicyTableSPtr default_pt_snapshot_;
-
- void SetUp() OVERRIDE;
-
- void TearDown() OVERRIDE;
-
- ::testing::AssertionResult IsValid(const policy_table::Table& table);
-};
-
-class PolicyManagerImplTest2 : public ::testing::Test {
- public:
- PolicyManagerImplTest2();
-
- protected:
- const std::string app_id_1_;
- const std::string app_id_2_;
- const std::string app_id_3_;
- const std::string device_id_1_;
- const std::string device_id_2_;
- const std::string application_id_;
- const std::string app_storage_folder_;
- const std::string preloaded_pt_filename_;
- const bool in_memory_;
-
- PolicyManagerImpl* policy_manager_;
- NiceMock<MockPolicyListener> listener_;
- NiceMock<MockPTURetryHandler> ptu_retry_handler_;
- ::policy::StringArray hmi_level_;
- ::policy::StringArray pt_request_types_;
- size_t ptu_request_types_size_;
- uint32_t index_;
- Json::Value ptu_request_types_;
- NiceMock<policy_handler_test::MockPolicySettings> policy_settings_;
-
- void SetUp() OVERRIDE;
-
- ::policy::StringArray JsonToVectorString(
- const Json::Value& PTU_request_types);
-
- const Json::Value GetPTU(const std::string& file_name);
-
- void CreateLocalPT(const std::string& file_name);
-
- void AddRTtoPT(const std::string& update_file_name,
- const std::string& section_name,
- const uint32_t rt_number,
- const uint32_t invalid_rt_number);
-
- void AddRTtoAppSectionPT(const std::string& update_file_name,
- const std::string& section_name,
- const uint32_t rt_number,
- const uint32_t invalid_rt_number);
-
- std::vector<policy_table::RequestType> PushRequestTypesToContainer(
- const ::policy::StringArray& temp_result);
-
- void CheckResultForValidRT();
-
- void CheckResultForInvalidRT();
-
- void FillMultimapFromFunctionalGroupings(
- UserConsentPromptToRpcsConnections& input_multimap,
- policy_table::FunctionalGroupings& fg_table);
-
- void GetFunctionalGroupingsFromManager(
- policy_table::FunctionalGroupings& input_functional_groupings);
-
- void TearDown() OVERRIDE;
-
- void ResetOutputList(::policy::CheckPermissionResult& output);
- // To avoid duplicate test with different json files
- void CheckPermissions_AllParamsAllowed_CheckRpcsInDiffLvls(
- const std::string& update_file);
-
- // To avoid duplicates in tests
- void CheckRpcPermissions(const std::string& rpc_name,
- const PermitResult& expected_permission);
-
- void CheckRpcPermissions(const std::string& app_id,
- const std::string& rpc_name,
- const policy::PermitResult& out_expected_permission);
-
- // To avoid duplicate arrange of test
- void AddSetDeviceData();
-
- // Load Json File and set it as PTU
- void LoadPTUFromJsonFile(const std::string& update_file);
-
- void EmulatePTAppRevoked(const std::string& ptu_name);
-
- std::shared_ptr<policy_table::Table> PreconditionForBasicValidateSnapshot();
-
- template <typename ParentType, typename Value>
- bool IsKeyExisted(const ParentType& parent, const Value& value) const {
- return parent.end() != std::find(parent.begin(), parent.end(), value);
- }
-
- template <typename ParentType>
- bool IsKeyExisted(const ParentType& parent, const std::string& value) const {
- return parent.end() != parent.find(value);
- }
-
- template <typename ParentType, typename KeyType>
- const KeyType& GetKeyData(const ParentType& parent,
- const std::string& key_name) const {
- DCHECK(IsKeyExisted<ParentType>(parent, key_name));
- return parent.find(key_name)->second;
- }
-
- bool CheckPolicyTimeStamp(const std::string& str) const;
-};
-
-class PolicyManagerImplTest_RequestTypes : public ::testing::Test {
- public:
- PolicyManagerImplTest_RequestTypes();
-
- protected:
- const ::policy::StringArray kJsonFiles;
- const std::string kAppId;
- const std::string kDefaultAppId;
- const std::string app_storage_folder_;
- const std::string preloaded_pt_filename_;
-
- std::shared_ptr<PolicyManagerImpl> policy_manager_impl_sptr_;
- NiceMock<MockPolicyListener> listener_;
- NiceMock<policy_handler_test::MockPolicySettings> policy_settings_;
-
- void SetUp() OVERRIDE;
-
- const Json::Value GetPTU(const std::string& file_name);
-
- void RefreshPT(const std::string& preloaded_pt_file,
- const std::string& update_pt_file);
-
- PolicyTableSPtr GetPolicyTableSnapshot();
-
- policy_table::RequestTypes GetRequestTypesForApplication(
- const std::string& app_id);
-
- void CompareAppRequestTypesWithDefault(const std::string& app_id,
- const std::string& ptu_file);
-
- policy_table::RequestTypes CreateDefaultAppPTURequestValues();
-
- policy_table::RequestTypes CreateDefaultAppDatabaseRequestValues();
-
- policy_table::RequestTypes CreatePreDataConsentAppPTURequestValues();
-
- void CompareRequestTypesContainers(
- const policy_table::RequestTypes& expected_data,
- const policy_table::RequestTypes& received_data);
-
- void TearDown() OVERRIDE;
-};
-
-class PolicyManagerImplTest_ExternalConsent : public PolicyManagerImplTest2 {
- public:
- PolicyManagerImplTest_ExternalConsent()
- : PolicyManagerImplTest2()
- , group_name_1_("Group1")
- , group_name_2_("Group2")
- , group_name_3_("Group3") {}
-
- protected:
- void PreconditionExternalConsentPreparePTWithAppGroupsAndConsents();
-
- void PreconditionExternalConsentPreparePTWithAppPolicy();
-
- policy_table::Table PreparePTWithGroupsHavingExternalConsent();
-
- std::string PreparePTUWithNewGroup(const uint32_t type,
- const uint32_t id,
- const std::string& group_name);
-
- const uint32_t type_1_ = 0;
- const uint32_t id_1_ = 1;
- const uint32_t type_2_ = 2;
- const uint32_t id_2_ = 3;
- const uint32_t type_3_ = 4;
- const uint32_t id_3_ = 5;
-
- const std::string group_name_1_;
- const std::string group_name_2_;
- const std::string group_name_3_;
-};
-
-} // namespace policy_test
-} // namespace components
-} // namespace test
-
-#endif // SRC_COMPONENTS_POLICY_POLICY_EXTERNAL_TEST_INCLUDE_POLICY_POLICY_MANAGER_IMPL_TEST_BASE_H_
diff --git a/src/components/policy/policy_external/test/json/PTU.json b/src/components/policy/policy_external/test/json/PTU.json
deleted file mode 100644
index c5f4b90120..0000000000
--- a/src/components/policy/policy_external/test/json/PTU.json
+++ /dev/null
@@ -1,2173 +0,0 @@
-{
- "policy_table": {
- "module_config": {
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [
- 1,
- 5,
- 25,
- 125,
- 625
- ],
- "endpoints": {
- "0x07": {
- "default": [
- "http://x.x.x.x:3000/api/1/policies"
- ]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.019",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?"
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\n\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\n\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. /r Presione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements. /r Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?"
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push"
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app authorization information for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "1234": "default",
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "Base-4"
- ],
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "DataConsent-2"
- ]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ],
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- }
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/PTU2.json b/src/components/policy/policy_external/test/json/PTU2.json
deleted file mode 100644
index 01cca4a6fd..0000000000
--- a/src/components/policy/policy_external/test/json/PTU2.json
+++ /dev/null
@@ -1,2172 +0,0 @@
-{
- "policy_table": {
- "module_config": {
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [
- 1,
- 5,
- 25,
- 125,
- 625
- ],
- "endpoints": {
- "0x07": {
- "default": [
- "http://x.x.x.x:3000/api/1/policies"
- ]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.019",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?"
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\n\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\n\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. /r Presione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements. /r Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?"
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push"
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app authorization information for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "1234": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ],
- "RequestType": []
- },
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "Base-4"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "DataConsent-2"
- ]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ]
- }
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/PTU3.json b/src/components/policy/policy_external/test/json/PTU3.json
deleted file mode 100644
index f48f246114..0000000000
--- a/src/components/policy/policy_external/test/json/PTU3.json
+++ /dev/null
@@ -1,2174 +0,0 @@
-{
- "policy_table": {
- "module_config": {
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [
- 1,
- 5,
- 25,
- 125,
- 625
- ],
- "endpoints": {
- "0x07": {
- "default": [
- "http://x.x.x.x:3000/api/1/policies"
- ]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.019",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?"
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\n\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\n\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. /r Presione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements. /r Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?"
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push"
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app authorization information for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "1234": "default",
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "Base-4"
- ],
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "DataConsent-2"
- ]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ],
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY",
- "INVALID_REQUEST_TYPE"
- ]
- }
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/PTU_default_app.json b/src/components/policy/policy_external/test/json/PTU_default_app.json
deleted file mode 100644
index b036d96b50..0000000000
--- a/src/components/policy/policy_external/test/json/PTU_default_app.json
+++ /dev/null
@@ -1,319 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester", "tester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000,
- "RequestType" : [ "HTTP",
- "LAUNCH_APP",
- "PROPRIETARY" ]
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY",
- "LOCK_SCREEN_ICON_URL"
- ]
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "heart_beat_timeout_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "FILE_RESUME",
- "AUTH_REQUEST",
- "AUTH_CHALLENGE",
- "AUTH_ACK"
- ]
- }
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/PTU_default_app_app_invalid_values_RequestType_array.json b/src/components/policy/policy_external/test/json/PTU_default_app_app_invalid_values_RequestType_array.json
deleted file mode 100644
index 49ed46f16c..0000000000
--- a/src/components/policy/policy_external/test/json/PTU_default_app_app_invalid_values_RequestType_array.json
+++ /dev/null
@@ -1,317 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester", "tester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000,
- "RequestType" : [ "HTTP",
- "LAUNCH_APP",
- "PROPRIETARY" ]
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "IVSU",
- "BREAK_STUFF"
- ]
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "heart_beat_timeout_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "FILE_RESUME",
- "AUTH_REQUEST",
- "AUTH_CHALLENGE",
- "AUTH_ACK"
- ]
- }
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/PTU_default_app_empty_RequestType_array.json b/src/components/policy/policy_external/test/json/PTU_default_app_empty_RequestType_array.json
deleted file mode 100644
index 66af76309a..0000000000
--- a/src/components/policy/policy_external/test/json/PTU_default_app_empty_RequestType_array.json
+++ /dev/null
@@ -1,314 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester", "tester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000,
- "RequestType" : [ "HTTP",
- "LAUNCH_APP",
- "PROPRIETARY" ]
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [ ]
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "heart_beat_timeout_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "FILE_RESUME",
- "AUTH_REQUEST",
- "AUTH_CHALLENGE",
- "AUTH_ACK"
- ]
- }
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/PTU_default_app_omitted_RequestType_array.json b/src/components/policy/policy_external/test/json/PTU_default_app_omitted_RequestType_array.json
deleted file mode 100644
index 0a7c059097..0000000000
--- a/src/components/policy/policy_external/test/json/PTU_default_app_omitted_RequestType_array.json
+++ /dev/null
@@ -1,313 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester", "tester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000,
- "RequestType" : [ "HTTP",
- "LAUNCH_APP",
- "PROPRIETARY" ]
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "heart_beat_timeout_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "FILE_RESUME",
- "AUTH_REQUEST",
- "AUTH_CHALLENGE",
- "AUTH_ACK"
- ]
- }
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/PTU_default_app_one_invalid_value_RequestType_array.json b/src/components/policy/policy_external/test/json/PTU_default_app_one_invalid_value_RequestType_array.json
deleted file mode 100644
index 08f12a21c8..0000000000
--- a/src/components/policy/policy_external/test/json/PTU_default_app_one_invalid_value_RequestType_array.json
+++ /dev/null
@@ -1,320 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester", "tester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000,
- "RequestType" : [ "HTTP",
- "LAUNCH_APP",
- "PROPRIETARY" ]
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "IVSU",
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY",
- "LOCK_SCREEN_ICON_URL"
- ]
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "heart_beat_timeout_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "FILE_RESUME",
- "AUTH_REQUEST",
- "AUTH_CHALLENGE",
- "AUTH_ACK"
- ]
- }
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/PTU_functional_grouping.json b/src/components/policy/policy_external/test/json/PTU_functional_grouping.json
deleted file mode 100644
index 5a8837c0bc..0000000000
--- a/src/components/policy/policy_external/test/json/PTU_functional_grouping.json
+++ /dev/null
@@ -1,11 +0,0 @@
-"Added-Group-1": {
- "rpcs": {
- "AddedFunction1": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- } \ No newline at end of file
diff --git a/src/components/policy/policy_external/test/json/PTU_pre_data_consent_app.json b/src/components/policy/policy_external/test/json/PTU_pre_data_consent_app.json
deleted file mode 100644
index b036d96b50..0000000000
--- a/src/components/policy/policy_external/test/json/PTU_pre_data_consent_app.json
+++ /dev/null
@@ -1,319 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester", "tester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000,
- "RequestType" : [ "HTTP",
- "LAUNCH_APP",
- "PROPRIETARY" ]
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY",
- "LOCK_SCREEN_ICON_URL"
- ]
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "heart_beat_timeout_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "FILE_RESUME",
- "AUTH_REQUEST",
- "AUTH_CHALLENGE",
- "AUTH_ACK"
- ]
- }
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/PTU_pre_data_consent_app_empty_RequestType_array.json b/src/components/policy/policy_external/test/json/PTU_pre_data_consent_app_empty_RequestType_array.json
deleted file mode 100644
index 6aeb637503..0000000000
--- a/src/components/policy/policy_external/test/json/PTU_pre_data_consent_app_empty_RequestType_array.json
+++ /dev/null
@@ -1,314 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester", "tester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000,
- "RequestType" : [ "HTTP",
- "LAUNCH_APP",
- "PROPRIETARY" ]
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY",
- "LOCK_SCREEN_ICON_URL"
- ]
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "heart_beat_timeout_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [ ]
- }
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/PTU_pre_data_consent_app_invalid_values_RequestType_array.json b/src/components/policy/policy_external/test/json/PTU_pre_data_consent_app_invalid_values_RequestType_array.json
deleted file mode 100644
index 8c68aaeb89..0000000000
--- a/src/components/policy/policy_external/test/json/PTU_pre_data_consent_app_invalid_values_RequestType_array.json
+++ /dev/null
@@ -1,315 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester", "tester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000,
- "RequestType" : [ "HTTP",
- "LAUNCH_APP",
- "PROPRIETARY" ]
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "IVSU",
- "BREAK_STUFF"
- ]
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "heart_beat_timeout_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "IVSU",
- "BREAK_STUFF"
- ]
- }
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/PTU_pre_data_consent_app_omitted_RequestType_array.json b/src/components/policy/policy_external/test/json/PTU_pre_data_consent_app_omitted_RequestType_array.json
deleted file mode 100644
index 0ae0761f27..0000000000
--- a/src/components/policy/policy_external/test/json/PTU_pre_data_consent_app_omitted_RequestType_array.json
+++ /dev/null
@@ -1,307 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester", "tester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000,
- "RequestType" : [ "HTTP",
- "LAUNCH_APP",
- "PROPRIETARY" ]
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "heart_beat_timeout_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- }
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/PTU_pre_data_consent_app_one_invalid_value_RequestType_array.json b/src/components/policy/policy_external/test/json/PTU_pre_data_consent_app_one_invalid_value_RequestType_array.json
deleted file mode 100644
index 6b170089fe..0000000000
--- a/src/components/policy/policy_external/test/json/PTU_pre_data_consent_app_one_invalid_value_RequestType_array.json
+++ /dev/null
@@ -1,320 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester", "tester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000,
- "RequestType" : [ "HTTP",
- "LAUNCH_APP",
- "PROPRIETARY" ]
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY",
- "LOCK_SCREEN_ICON_URL"
- ]
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "heart_beat_timeout_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "IVSU",
- "FILE_RESUME",
- "AUTH_REQUEST",
- "AUTH_CHALLENGE",
- "AUTH_ACK"
- ]
- }
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/PTU_with_empty_requestType_array.json b/src/components/policy/policy_external/test/json/PTU_with_empty_requestType_array.json
deleted file mode 100644
index 1e99e7442c..0000000000
--- a/src/components/policy/policy_external/test/json/PTU_with_empty_requestType_array.json
+++ /dev/null
@@ -1,1747 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester", "tester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000,
- "RequestType" : [ ]
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "HTTP",
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "heart_beat_timeout_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- }
- },
- "consumer_friendly_messages" : {
- "messages" : {
- "AppPermissions" : {
- "languages" : {
- "de-de" : {
- "line1" : "Zugriffsanfrage(n)",
- "line2" : "erlauben?",
- "tts" : "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-gb" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-ie" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-us" : {
- "line1" : "Grant Requested",
- "line2" : "Permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press yes to allow or no to deny."
- },
- "es-en" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "es-es" : {
- "line1" : "¿Conceder permisos",
- "line2" : "solicitados?",
- "tts" : "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar."
- },
- "es-mx" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "fr-ca" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "fr-fr" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "it-it" : {
- "line1" : "Concedi autorizzaz.",
- "line2" : "richiesta(e)?",
- "tts" : "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare."
- },
- "nl-nl" : {
- "line1" : "Aangevraagde",
- "line2" : "permissie(s) verlenen?",
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren."
- },
- "pl-pl" : {
- "line1" : "Udzielić żądanych",
- "line2" : "pozwoleń?",
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "line1" : "Conceder permissão",
- "line2" : "solicitada?",
- "tts" : "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar."
- },
- "pt-pt" : {
- "line1" : "Conceder permiss.",
- "line2" : "solicitada(s)?",
- "tts" : "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar."
- },
- "ru-ru" : {
- "line1" : "Предост. заправш.",
- "line2" : "разрешения?",
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны."
- },
- "sv-se" : {
- "line1" : "Vill du ge",
- "line2" : "tillstånd?",
- "tts" : "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka."
- },
- "tr-tr" : {
- "line1" : "İstenen izinler",
- "line2" : "verilsin mi?",
- "tts" : "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否允许请求的",
- "line2" : "权限?",
- "tts" : "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。"
- },
- "zh-tw" : {
- "line1" : "允許",
- "line2" : "授權請求?",
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsHelp" : {
- "languages" : {
- "de-de" : {
- "tts" : "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es" : {
- "tts" : "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it" : {
- "tts" : "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl" : {
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl" : {
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "tts" : "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt" : {
- "tts" : "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru" : {
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se" : {
- "tts" : "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr" : {
- "tts" : "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "tts" : "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw" : {
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked" : {
- "languages" : {
- "de-de" : {
- "tts" : "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it" : {
- "tts" : "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl" : {
- "tts" : "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl" : {
- "tts" : "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br" : {
- "tts" : "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt" : {
- "tts" : "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru" : {
- "tts" : "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se" : {
- "tts" : "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr" : {
- "tts" : "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn" : {
- "tts" : "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw" : {
- "tts" : "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht autorisiert",
- "tts" : "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren."
- },
- "en-au" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-gb" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-us" : {
- "line1" : "Not Authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "es-en" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es" : {
- "line1" : "No autorizada",
- "tts" : "Esta versión de %appName% no está autorizada y no funcionará con SYNC."
- },
- "es-mx" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "it-it" : {
- "line1" : "non autorizzata",
- "tts" : "Questa versione di %appName% non è autorizzata e non funziona con il SYNC."
- },
- "nl-nl" : {
- "line1" : "niet geautoriseerd",
- "tts" : "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC."
- },
- "pl-pl" : {
- "line1" : "brak autoryzacji",
- "tts" : "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC."
- },
- "pt-br" : {
- "line1" : "não autorizado",
- "tts" : "Esta versão do %appName% não tem autorização e não funcionará com o SYNC."
- },
- "pt-pt" : {
- "line1" : "não autorizada",
- "tts" : "Esta versão de %appName% não está autorizada e não funcionará com o SYNC."
- },
- "ru-ru" : {
- "line1" : "не авторизировано",
- "tts" : "Эта версия %appName% не авторизирована и не будет работать с SYNC."
- },
- "sv-se" : {
- "line1" : "är ej godkänd",
- "tts" : "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC."
- },
- "tr-tr" : {
- "line1" : "için izin yok",
- "tts" : "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz."
- },
- "zh-cn" : {
- "line1" : "未得到授权",
- "tts" : "此版本的%appName% 未得到授权,无法在SYNC上使用。"
- },
- "zh-tw" : {
- "line1" : "無授權",
- "tts" : "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。"
- }
- }
- },
- "AppUnsupported" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht unterstützt",
- "tts" : "Diese Version von %appName% wird von SYNC nicht unterstützt."
- },
- "en-au" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-gb" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-ie" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-us" : {
- "line1" : "Not Supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "es-en" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es" : {
- "line1" : "No compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-mx" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "it-it" : {
- "line1" : "non supportata",
- "tts" : "Questa versione di %appName% non è supportata dal SYNC."
- },
- "nl-nl" : {
- "line1" : "niet ondersteund",
- "tts" : "Deze versie van %appName% wordt niet ondersteund door SYNC."
- },
- "pl-pl" : {
- "line1" : "aplikacja nie obsług.",
- "tts" : "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC."
- },
- "pt-br" : {
- "line1" : "não suportado",
- "tts" : "Esta versão do %appName% não é suportada pelo SYNC."
- },
- "pt-pt" : {
- "line1" : "não suportada",
- "tts" : "Esta versão de %appName% não é suportado pelo SYNC."
- },
- "ru-ru" : {
- "line1" : "не поддерживается",
- "tts" : "Эта версия %appName% не поддерживается SYNC."
- },
- "sv-se" : {
- "line1" : "stöds ej",
- "tts" : "SYNC har inte stöd för den här versionen av %appName%."
- },
- "tr-tr" : {
- "line1" : "desteklenmiyor",
- "tts" : "Bu %appName% sürümü SYNC tarafından desteklenmiyor."
- },
- "zh-cn" : {
- "line1" : "不受支持",
- "tts" : "SYNC不支持此版本的%appName%。"
- },
- "zh-tw" : {
- "line1" : "不支援",
- "tts" : "SYNC 不支援此版本的%appName% 。"
- }
- }
- },
- "DataConsent" : {
- "languages" : {
- "en-us" : {
- "line1" : "Enable Mobile Apps",
- "line2" : "on SYNC? (Uses Data)",
- "tts" : "To use mobile apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device's data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Please press yes or no, or help for more information. "
- }
- }
- },
- "DataConsentHelp" : {
- "languages" : {
- "en-us" : {
- "tts" : "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC mobile apps settings menu. See your Owner Guide for more information. "
- }
- }
- },
- "DisableApps" : {
- "languages" : {
- "de-de" : {
- "line1" : "Auto-Update",
- "line2" : "und Mobile Apps deaktivieren",
- "tts" : "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen."
- },
- "en-au" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-gb" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-us" : {
- "line1" : "Disable Auto-Updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es" : {
- "line1" : "¿Desact. actual. auto",
- "line2" : "y apl. móviles?",
- "tts" : "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar."
- },
- "es-mx" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "it-it" : {
- "line1" : "Disabilitare agg. aut.",
- "line2" : "e app mobili?",
- "tts" : "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare."
- },
- "nl-nl" : {
- "line1" : "Auto-updates en mob.",
- "line2" : "apps uitschakelen?",
- "tts" : "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren."
- },
- "pl-pl" : {
- "line1" : "Wył. automat. aktual.",
- "line2" : "i aplikacje mobilne?",
- "tts" : "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować."
- },
- "pt-br" : {
- "line1" : "Desativar atualizações",
- "line2" : "autom. e aplicativos?",
- "tts" : "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar."
- },
- "pt-pt" : {
- "line1" : "Desact. actual. autom.",
- "line2" : "e aplicações móveis?",
- "tts" : "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar."
- },
- "ru-ru" : {
- "line1" : "Откл. автообновления",
- "line2" : "и мобил. прилож.?",
- "tts" : "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены."
- },
- "sv-se" : {
- "line1" : "Avaktiverar autouppdat.",
- "line2" : "och mobilappar?",
- "tts" : "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta."
- },
- "tr-tr" : {
- "line1" : "Oto. güncelleme ve",
- "line2" : "mobil uygul. kapat?",
- "tts" : "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否禁用自动更新和",
- "line2" : "移动应用程序?",
- "tts" : "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。"
- },
- "zh-tw" : {
- "line1" : "停用自動更新",
- "line2" : "和行動應用程式?",
- "tts" : "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。"
- }
- }
- },
- "DrivingCharacteristics" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahreigenschaften",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus."
- },
- "en-au" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-gb" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-us" : {
- "label" : "Driving Characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es" : {
- "label" : "Características de conducción",
- "tts" : "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad."
- },
- "es-mx" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "fr-ca" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "it-it" : {
- "label" : "Caratteristiche di guida",
- "tts" : "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza."
- },
- "nl-nl" : {
- "label" : "Rijkenmerken",
- "tts" : "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus."
- },
- "pl-pl" : {
- "label" : "Informacje dotyczące stylu jazdy",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa."
- },
- "pt-br" : {
- "label" : "Características de condução",
- "tts" : "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança."
- },
- "pt-pt" : {
- "label" : "Características de condução",
- "tts" : "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança."
- },
- "ru-ru" : {
- "label" : "Характеристики движения",
- "tts" : "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности."
- },
- "sv-se" : {
- "label" : "Köregenskaper",
- "tts" : "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus."
- },
- "tr-tr" : {
- "label" : "Sürüş karakteristikleri",
- "tts" : "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu."
- },
- "zh-cn" : {
- "label" : "行驶特性",
- "tts" : "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态"
- },
- "zh-tw" : {
- "label" : "駕駛特性",
- "tts" : "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態"
- }
- }
- },
- "Location" : {
- "languages" : {
- "de-de" : {
- "label" : "GPS und Geschwindigkeit",
- "tts" : "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs."
- },
- "en-au" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-gb" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-ie" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-us" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "es-en" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es" : {
- "label" : "GPS y velocidad",
- "tts" : "Una aplicación puede acceder al GPS y la velocidad del vehículo."
- },
- "es-mx" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "it-it" : {
- "label" : "GPS e velocità",
- "tts" : "Un'app può avere accesso a GPS e velocità del veicolo."
- },
- "nl-nl" : {
- "label" : "Gps en snelheid",
- "tts" : "Een app heeft toegang tot gps en de snelheid van het voertuig."
- },
- "pl-pl" : {
- "label" : "GPS i prędkość",
- "tts" : "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu."
- },
- "pt-br" : {
- "label" : "GPS e velocidade",
- "tts" : "Um aplicativo pode acessar o GPS e a velocidade do veículo."
- },
- "pt-pt" : {
- "label" : "GPS e velocidade",
- "tts" : "Uma aplicação consegue aceder ao GPS e à velocidade do veículo."
- },
- "ru-ru" : {
- "label" : "GPS и скорость",
- "tts" : "Приложение имеет доступ к GPS и скорости автомобиля."
- },
- "sv-se" : {
- "label" : "GPS och hastighet",
- "tts" : "Appen kan komma åt fordonets GPS och hastighetsmätare."
- },
- "tr-tr" : {
- "label" : "GPS ve hız",
- "tts" : "Bu uygulama aracın GPS ve hız bilgilerine erişebilir."
- },
- "zh-cn" : {
- "label" : "GPS 和车速",
- "tts" : "移动应用程序可以访问车辆 GPS 和车速信息。"
- },
- "zh-tw" : {
- "label" : "GPS和車速",
- "tts" : "應用程式可存取車輛的GPS和速度。"
- }
- }
- },
- "Notifications" : {
- "languages" : {
- "de-de" : {
- "label" : "Push-Benachrichtigungen",
- "tts" : "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden."
- },
- "en-au" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-gb" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-ie" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-us" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "es-en" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es" : {
- "label" : "Notificaciones push",
- "tts" : "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano."
- },
- "es-mx" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca" : {
- "label" : "Notifications instantanées",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr" : {
- "label" : "Notifications push",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "it-it" : {
- "label" : "Notifiche push",
- "tts" : "Un'app può inviare notifiche se eseguita in background."
- },
- "nl-nl" : {
- "label" : "Push-meldingen",
- "tts" : "Een app kan meldingen versturen als deze op de achtergrond actief is."
- },
- "pl-pl" : {
- "label" : "Powiadomienia Push",
- "tts" : "Aplikacja może wysyłać powiadomienia, działając w tle."
- },
- "pt-br" : {
- "label" : "Notificações Push",
- "tts" : "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano."
- },
- "pt-pt" : {
- "label" : "Notificações push",
- "tts" : "Uma aplicação consegue enviar notificações quando está activa em segundo plano."
- },
- "ru-ru" : {
- "label" : "Оповещения о пересылке",
- "tts" : "Если приложение работает в фоновом режиме, оно может отправлять оповещения."
- },
- "sv-se" : {
- "label" : "Push-notiser",
- "tts" : "Appen kan skicka meddelanden när den körs i bakgrunden."
- },
- "tr-tr" : {
- "label" : "Anlık bildirimleri",
- "tts" : "Bir uygulama arka planda çalışırken bildirim gönderebilir."
- },
- "zh-cn" : {
- "label" : "推送通知",
- "tts" : "移动应用程序在后台运行时可推送通知。"
- },
- "zh-tw" : {
- "label" : "傳送通知",
- "tts" : "車輛行進時,應用程式可在背景中傳送通知。"
- }
- }
- },
- "SettingDisableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Updates deakt."
- },
- "en-au" : {
- "line1" : "Disable updates"
- },
- "en-gb" : {
- "line1" : "Disable updates"
- },
- "en-ie" : {
- "line1" : "Disable updates"
- },
- "en-us" : {
- "line1" : "Disable Updates"
- },
- "es-en" : {
- "line1" : "Deshab. actual."
- },
- "es-es" : {
- "line1" : "Desact. actual."
- },
- "es-mx" : {
- "line1" : "Deshab. actual."
- },
- "fr-ca" : {
- "line1" : "Désactiver MAJ"
- },
- "fr-fr" : {
- "line1" : "Désactiver màj"
- },
- "it-it" : {
- "line1" : "Disabilita agg."
- },
- "nl-nl" : {
- "line1" : "Upd. uitschak."
- },
- "pl-pl" : {
- "line1" : "Wyłącz aktual."
- },
- "pt-br" : {
- "line1" : "Desat. atualiz."
- },
- "pt-pt" : {
- "line1" : "Desact. actualiz."
- },
- "ru-ru" : {
- "line1" : "Откл. обновл."
- },
- "sv-se" : {
- "line1" : "Inaktivera uppd."
- },
- "tr-tr" : {
- "line1" : "Güncell. Kapat"
- },
- "zh-cn" : {
- "line1" : "禁用更新"
- },
- "zh-tw" : {
- "line1" : "停用更新"
- }
- }
- },
- "SettingEnableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Apps aktivieren"
- },
- "en-au" : {
- "line1" : "Enable Apps"
- },
- "en-gb" : {
- "line1" : "Enable Apps"
- },
- "en-ie" : {
- "line1" : "Enable Apps"
- },
- "en-us" : {
- "line1" : "Enable Apps"
- },
- "es-en" : {
- "line1" : "Hab. aplic."
- },
- "es-es" : {
- "line1" : "Activar apl."
- },
- "es-mx" : {
- "line1" : "Hab. aplic."
- },
- "fr-ca" : {
- "line1" : "Activer app."
- },
- "fr-fr" : {
- "line1" : "Activer app."
- },
- "it-it" : {
- "line1" : "Abilita app"
- },
- "nl-nl" : {
- "line1" : "Apps inschak."
- },
- "pl-pl" : {
- "line1" : "Włącz aplikacje"
- },
- "pt-br" : {
- "line1" : "Ativar aplic."
- },
- "pt-pt" : {
- "line1" : "Activar actualiz."
- },
- "ru-ru" : {
- "line1" : "Вкл. прилож."
- },
- "sv-se" : {
- "line1" : "Aktivera appar"
- },
- "tr-tr" : {
- "line1" : "Uygulamaları aç"
- },
- "zh-cn" : {
- "line1" : "启用应用程序"
- },
- "zh-tw" : {
- "line1" : "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update anford."
- },
- "en-au" : {
- "line1" : "Request update"
- },
- "en-gb" : {
- "line1" : "Request update"
- },
- "en-ie" : {
- "line1" : "Request update"
- },
- "en-us" : {
- "line1" : "Request Update"
- },
- "es-en" : {
- "line1" : "Solicit. actualiz."
- },
- "es-es" : {
- "line1" : "Solicitar actual."
- },
- "es-mx" : {
- "line1" : "Solicit. actualiz."
- },
- "fr-ca" : {
- "line1" : "Demander MAJ"
- },
- "fr-fr" : {
- "line1" : "Demander màj"
- },
- "it-it" : {
- "line1" : "Rich. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Upd. aanvragen"
- },
- "pl-pl" : {
- "line1" : "Zażądaj aktual."
- },
- "pt-br" : {
- "line1" : "Solicitar atualiz."
- },
- "pt-pt" : {
- "line1" : "Solicit. actualiz."
- },
- "ru-ru" : {
- "line1" : "Запрос на обн."
- },
- "sv-se" : {
- "line1" : "Begär uppdat."
- },
- "tr-tr" : {
- "line1" : "Güncelleme iste"
- },
- "zh-cn" : {
- "line1" : "请求更新"
- },
- "zh-tw" : {
- "line1" : "請求更新"
- }
- }
- },
- "StatusNeeded" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update benötigt"
- },
- "en-au" : {
- "line1" : "Update needed"
- },
- "en-gb" : {
- "line1" : "Update needed"
- },
- "en-ie" : {
- "line1" : "Update needed"
- },
- "en-us" : {
- "line1" : "Update Needed"
- },
- "es-en" : {
- "line1" : "Actualiz. neces."
- },
- "es-es" : {
- "line1" : "Actu. necesaria"
- },
- "es-mx" : {
- "line1" : "Actualiz. neces."
- },
- "fr-ca" : {
- "line1" : "Màj requise"
- },
- "fr-fr" : {
- "line1" : "Mise à jour requise"
- },
- "it-it" : {
- "line1" : "Necess. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Update nodig"
- },
- "pl-pl" : {
- "line1" : "Potrzeba aktual."
- },
- "pt-br" : {
- "line1" : "Atualiz. necess."
- },
- "pt-pt" : {
- "line1" : "Actual. necess."
- },
- "ru-ru" : {
- "line1" : "Необх. обновл."
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs"
- },
- "tr-tr" : {
- "line1" : "Güncellenmeli"
- },
- "zh-cn" : {
- "line1" : "需要进行更新"
- },
- "zh-tw" : {
- "line1" : "需更新"
- }
- }
- },
- "StatusPending" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktualisieren..."
- },
- "en-au" : {
- "line1" : "Updating..."
- },
- "en-gb" : {
- "line1" : "Updating..."
- },
- "en-ie" : {
- "line1" : "Updating..."
- },
- "en-us" : {
- "line1" : "Updating..."
- },
- "es-en" : {
- "line1" : "Actualizando..."
- },
- "es-es" : {
- "line1" : "Actualizando..."
- },
- "es-mx" : {
- "line1" : "Actualizando..."
- },
- "fr-ca" : {
- "line1" : "MAJ en cours..."
- },
- "fr-fr" : {
- "line1" : "Màj en cours..."
- },
- "it-it" : {
- "line1" : "Aggiornamento"
- },
- "nl-nl" : {
- "line1" : "Updaten..."
- },
- "pl-pl" : {
- "line1" : "Aktualizowanie"
- },
- "pt-br" : {
- "line1" : "Atualizando..."
- },
- "pt-pt" : {
- "line1" : "A actualizar..."
- },
- "ru-ru" : {
- "line1" : "Обновление..."
- },
- "sv-se" : {
- "line1" : "Uppdaterar..."
- },
- "tr-tr" : {
- "line1" : "Güncelleniyor..."
- },
- "zh-cn" : {
- "line1" : "正在更新......"
- },
- "zh-tw" : {
- "line1" : "更新中..."
- }
- }
- },
- "StatusUpToDate" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktuelle Version"
- },
- "en-au" : {
- "line1" : "Up-to-date"
- },
- "en-gb" : {
- "line1" : "Up-to-date"
- },
- "en-ie" : {
- "line1" : "Up-to-date"
- },
- "en-us" : {
- "line1" : "Up-To-Date"
- },
- "es-en" : {
- "line1" : "Actualizado"
- },
- "es-es" : {
- "line1" : "Actualizada"
- },
- "es-mx" : {
- "line1" : "Actualizado"
- },
- "fr-ca" : {
- "line1" : "Déjà à jour"
- },
- "fr-fr" : {
- "line1" : "Déjà à jour"
- },
- "it-it" : {
- "line1" : "più recente"
- },
- "nl-nl" : {
- "line1" : "Up-to-date"
- },
- "pl-pl" : {
- "line1" : "Aktualne"
- },
- "pt-br" : {
- "line1" : "Atualizado"
- },
- "pt-pt" : {
- "line1" : "Actualizado"
- },
- "ru-ru" : {
- "line1" : "Обновлено"
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs ej"
- },
- "tr-tr" : {
- "line1" : "Güncel"
- },
- "zh-cn" : {
- "line1" : "最新更新"
- },
- "zh-tw" : {
- "line1" : "更新最新"
- }
- }
- },
- "VehicleInfo" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahrzeuginformationen",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck."
- },
- "en-au" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-gb" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-ie" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-us" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es" : {
- "label" : "Información del vehículo",
- "tts" : "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos."
- },
- "es-mx" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "fr-ca" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus."
- },
- "it-it" : {
- "label" : "Informazioni sul veicolo",
- "tts" : "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici."
- },
- "nl-nl" : {
- "label" : "Voertuiginformatie",
- "tts" : "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning."
- },
- "pl-pl" : {
- "label" : "Informacje o pojeździe",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon."
- },
- "pt-br" : {
- "label" : "Informações sobre o veículo",
- "tts" : "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus."
- },
- "pt-pt" : {
- "label" : "Informações do veículo",
- "tts" : "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus."
- },
- "ru-ru" : {
- "label" : "Информация об автомобиле",
- "tts" : "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин."
- },
- "sv-se" : {
- "label" : "Fordonsinformation",
- "tts" : "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck."
- },
- "tr-tr" : {
- "label" : "Araç bilgisi",
- "tts" : "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı."
- },
- "zh-cn" : {
- "label" : "车辆信息",
- "tts" : "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压."
- },
- "zh-tw" : {
- "label" : "車輛資訊",
- "tts" : "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓."
- }
- }
- }
- },
- "version" : "001.001.015"
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "DrivingCharacteristics-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- },
- "user_consent_prompt" : "DrivingCharacteristics"
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Location-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- }
- },
- "user_consent_prompt" : "Location"
- },
- "Navigation-1" : {
- "rpcs" : {
- "AlertManeuver" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ShowConstantTBT" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UpdateTurnList" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Notifications" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "BACKGROUND" ]
- }
- },
- "user_consent_prompt" : "Notifications"
- },
- "PropriataryData-1" : {
- "rpcs" : {
- "DiagnosticMessage" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GetDTCs" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ReadDID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "VehicleInfo-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- },
- "user_consent_prompt" : "VehicleInfo"
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/PTU_with_invalid_requestType_between_correct.json b/src/components/policy/policy_external/test/json/PTU_with_invalid_requestType_between_correct.json
deleted file mode 100644
index dc40c3a182..0000000000
--- a/src/components/policy/policy_external/test/json/PTU_with_invalid_requestType_between_correct.json
+++ /dev/null
@@ -1,1750 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester", "tester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000,
- "RequestType" : [ "HTTP",
- "IVSU",
- "LAUNCH_APP",
- "PROPRIETARY" ]
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "HTTP",
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "heart_beat_timeout_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- }
- },
- "consumer_friendly_messages" : {
- "messages" : {
- "AppPermissions" : {
- "languages" : {
- "de-de" : {
- "line1" : "Zugriffsanfrage(n)",
- "line2" : "erlauben?",
- "tts" : "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-gb" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-ie" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-us" : {
- "line1" : "Grant Requested",
- "line2" : "Permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press yes to allow or no to deny."
- },
- "es-en" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "es-es" : {
- "line1" : "¿Conceder permisos",
- "line2" : "solicitados?",
- "tts" : "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar."
- },
- "es-mx" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "fr-ca" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "fr-fr" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "it-it" : {
- "line1" : "Concedi autorizzaz.",
- "line2" : "richiesta(e)?",
- "tts" : "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare."
- },
- "nl-nl" : {
- "line1" : "Aangevraagde",
- "line2" : "permissie(s) verlenen?",
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren."
- },
- "pl-pl" : {
- "line1" : "Udzielić żądanych",
- "line2" : "pozwoleń?",
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "line1" : "Conceder permissão",
- "line2" : "solicitada?",
- "tts" : "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar."
- },
- "pt-pt" : {
- "line1" : "Conceder permiss.",
- "line2" : "solicitada(s)?",
- "tts" : "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar."
- },
- "ru-ru" : {
- "line1" : "Предост. заправш.",
- "line2" : "разрешения?",
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны."
- },
- "sv-se" : {
- "line1" : "Vill du ge",
- "line2" : "tillstånd?",
- "tts" : "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka."
- },
- "tr-tr" : {
- "line1" : "İstenen izinler",
- "line2" : "verilsin mi?",
- "tts" : "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否允许请求的",
- "line2" : "权限?",
- "tts" : "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。"
- },
- "zh-tw" : {
- "line1" : "允許",
- "line2" : "授權請求?",
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsHelp" : {
- "languages" : {
- "de-de" : {
- "tts" : "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es" : {
- "tts" : "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it" : {
- "tts" : "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl" : {
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl" : {
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "tts" : "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt" : {
- "tts" : "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru" : {
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se" : {
- "tts" : "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr" : {
- "tts" : "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "tts" : "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw" : {
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked" : {
- "languages" : {
- "de-de" : {
- "tts" : "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it" : {
- "tts" : "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl" : {
- "tts" : "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl" : {
- "tts" : "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br" : {
- "tts" : "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt" : {
- "tts" : "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru" : {
- "tts" : "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se" : {
- "tts" : "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr" : {
- "tts" : "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn" : {
- "tts" : "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw" : {
- "tts" : "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht autorisiert",
- "tts" : "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren."
- },
- "en-au" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-gb" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-us" : {
- "line1" : "Not Authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "es-en" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es" : {
- "line1" : "No autorizada",
- "tts" : "Esta versión de %appName% no está autorizada y no funcionará con SYNC."
- },
- "es-mx" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "it-it" : {
- "line1" : "non autorizzata",
- "tts" : "Questa versione di %appName% non è autorizzata e non funziona con il SYNC."
- },
- "nl-nl" : {
- "line1" : "niet geautoriseerd",
- "tts" : "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC."
- },
- "pl-pl" : {
- "line1" : "brak autoryzacji",
- "tts" : "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC."
- },
- "pt-br" : {
- "line1" : "não autorizado",
- "tts" : "Esta versão do %appName% não tem autorização e não funcionará com o SYNC."
- },
- "pt-pt" : {
- "line1" : "não autorizada",
- "tts" : "Esta versão de %appName% não está autorizada e não funcionará com o SYNC."
- },
- "ru-ru" : {
- "line1" : "не авторизировано",
- "tts" : "Эта версия %appName% не авторизирована и не будет работать с SYNC."
- },
- "sv-se" : {
- "line1" : "är ej godkänd",
- "tts" : "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC."
- },
- "tr-tr" : {
- "line1" : "için izin yok",
- "tts" : "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz."
- },
- "zh-cn" : {
- "line1" : "未得到授权",
- "tts" : "此版本的%appName% 未得到授权,无法在SYNC上使用。"
- },
- "zh-tw" : {
- "line1" : "無授權",
- "tts" : "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。"
- }
- }
- },
- "AppUnsupported" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht unterstützt",
- "tts" : "Diese Version von %appName% wird von SYNC nicht unterstützt."
- },
- "en-au" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-gb" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-ie" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-us" : {
- "line1" : "Not Supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "es-en" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es" : {
- "line1" : "No compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-mx" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "it-it" : {
- "line1" : "non supportata",
- "tts" : "Questa versione di %appName% non è supportata dal SYNC."
- },
- "nl-nl" : {
- "line1" : "niet ondersteund",
- "tts" : "Deze versie van %appName% wordt niet ondersteund door SYNC."
- },
- "pl-pl" : {
- "line1" : "aplikacja nie obsług.",
- "tts" : "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC."
- },
- "pt-br" : {
- "line1" : "não suportado",
- "tts" : "Esta versão do %appName% não é suportada pelo SYNC."
- },
- "pt-pt" : {
- "line1" : "não suportada",
- "tts" : "Esta versão de %appName% não é suportado pelo SYNC."
- },
- "ru-ru" : {
- "line1" : "не поддерживается",
- "tts" : "Эта версия %appName% не поддерживается SYNC."
- },
- "sv-se" : {
- "line1" : "stöds ej",
- "tts" : "SYNC har inte stöd för den här versionen av %appName%."
- },
- "tr-tr" : {
- "line1" : "desteklenmiyor",
- "tts" : "Bu %appName% sürümü SYNC tarafından desteklenmiyor."
- },
- "zh-cn" : {
- "line1" : "不受支持",
- "tts" : "SYNC不支持此版本的%appName%。"
- },
- "zh-tw" : {
- "line1" : "不支援",
- "tts" : "SYNC 不支援此版本的%appName% 。"
- }
- }
- },
- "DataConsent" : {
- "languages" : {
- "en-us" : {
- "line1" : "Enable Mobile Apps",
- "line2" : "on SYNC? (Uses Data)",
- "tts" : "To use mobile apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device's data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Please press yes or no, or help for more information. "
- }
- }
- },
- "DataConsentHelp" : {
- "languages" : {
- "en-us" : {
- "tts" : "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC mobile apps settings menu. See your Owner Guide for more information. "
- }
- }
- },
- "DisableApps" : {
- "languages" : {
- "de-de" : {
- "line1" : "Auto-Update",
- "line2" : "und Mobile Apps deaktivieren",
- "tts" : "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen."
- },
- "en-au" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-gb" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-us" : {
- "line1" : "Disable Auto-Updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es" : {
- "line1" : "¿Desact. actual. auto",
- "line2" : "y apl. móviles?",
- "tts" : "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar."
- },
- "es-mx" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "it-it" : {
- "line1" : "Disabilitare agg. aut.",
- "line2" : "e app mobili?",
- "tts" : "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare."
- },
- "nl-nl" : {
- "line1" : "Auto-updates en mob.",
- "line2" : "apps uitschakelen?",
- "tts" : "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren."
- },
- "pl-pl" : {
- "line1" : "Wył. automat. aktual.",
- "line2" : "i aplikacje mobilne?",
- "tts" : "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować."
- },
- "pt-br" : {
- "line1" : "Desativar atualizações",
- "line2" : "autom. e aplicativos?",
- "tts" : "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar."
- },
- "pt-pt" : {
- "line1" : "Desact. actual. autom.",
- "line2" : "e aplicações móveis?",
- "tts" : "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar."
- },
- "ru-ru" : {
- "line1" : "Откл. автообновления",
- "line2" : "и мобил. прилож.?",
- "tts" : "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены."
- },
- "sv-se" : {
- "line1" : "Avaktiverar autouppdat.",
- "line2" : "och mobilappar?",
- "tts" : "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta."
- },
- "tr-tr" : {
- "line1" : "Oto. güncelleme ve",
- "line2" : "mobil uygul. kapat?",
- "tts" : "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否禁用自动更新和",
- "line2" : "移动应用程序?",
- "tts" : "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。"
- },
- "zh-tw" : {
- "line1" : "停用自動更新",
- "line2" : "和行動應用程式?",
- "tts" : "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。"
- }
- }
- },
- "DrivingCharacteristics" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahreigenschaften",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus."
- },
- "en-au" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-gb" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-us" : {
- "label" : "Driving Characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es" : {
- "label" : "Características de conducción",
- "tts" : "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad."
- },
- "es-mx" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "fr-ca" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "it-it" : {
- "label" : "Caratteristiche di guida",
- "tts" : "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza."
- },
- "nl-nl" : {
- "label" : "Rijkenmerken",
- "tts" : "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus."
- },
- "pl-pl" : {
- "label" : "Informacje dotyczące stylu jazdy",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa."
- },
- "pt-br" : {
- "label" : "Características de condução",
- "tts" : "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança."
- },
- "pt-pt" : {
- "label" : "Características de condução",
- "tts" : "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança."
- },
- "ru-ru" : {
- "label" : "Характеристики движения",
- "tts" : "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности."
- },
- "sv-se" : {
- "label" : "Köregenskaper",
- "tts" : "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus."
- },
- "tr-tr" : {
- "label" : "Sürüş karakteristikleri",
- "tts" : "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu."
- },
- "zh-cn" : {
- "label" : "行驶特性",
- "tts" : "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态"
- },
- "zh-tw" : {
- "label" : "駕駛特性",
- "tts" : "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態"
- }
- }
- },
- "Location" : {
- "languages" : {
- "de-de" : {
- "label" : "GPS und Geschwindigkeit",
- "tts" : "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs."
- },
- "en-au" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-gb" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-ie" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-us" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "es-en" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es" : {
- "label" : "GPS y velocidad",
- "tts" : "Una aplicación puede acceder al GPS y la velocidad del vehículo."
- },
- "es-mx" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "it-it" : {
- "label" : "GPS e velocità",
- "tts" : "Un'app può avere accesso a GPS e velocità del veicolo."
- },
- "nl-nl" : {
- "label" : "Gps en snelheid",
- "tts" : "Een app heeft toegang tot gps en de snelheid van het voertuig."
- },
- "pl-pl" : {
- "label" : "GPS i prędkość",
- "tts" : "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu."
- },
- "pt-br" : {
- "label" : "GPS e velocidade",
- "tts" : "Um aplicativo pode acessar o GPS e a velocidade do veículo."
- },
- "pt-pt" : {
- "label" : "GPS e velocidade",
- "tts" : "Uma aplicação consegue aceder ao GPS e à velocidade do veículo."
- },
- "ru-ru" : {
- "label" : "GPS и скорость",
- "tts" : "Приложение имеет доступ к GPS и скорости автомобиля."
- },
- "sv-se" : {
- "label" : "GPS och hastighet",
- "tts" : "Appen kan komma åt fordonets GPS och hastighetsmätare."
- },
- "tr-tr" : {
- "label" : "GPS ve hız",
- "tts" : "Bu uygulama aracın GPS ve hız bilgilerine erişebilir."
- },
- "zh-cn" : {
- "label" : "GPS 和车速",
- "tts" : "移动应用程序可以访问车辆 GPS 和车速信息。"
- },
- "zh-tw" : {
- "label" : "GPS和車速",
- "tts" : "應用程式可存取車輛的GPS和速度。"
- }
- }
- },
- "Notifications" : {
- "languages" : {
- "de-de" : {
- "label" : "Push-Benachrichtigungen",
- "tts" : "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden."
- },
- "en-au" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-gb" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-ie" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-us" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "es-en" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es" : {
- "label" : "Notificaciones push",
- "tts" : "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano."
- },
- "es-mx" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca" : {
- "label" : "Notifications instantanées",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr" : {
- "label" : "Notifications push",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "it-it" : {
- "label" : "Notifiche push",
- "tts" : "Un'app può inviare notifiche se eseguita in background."
- },
- "nl-nl" : {
- "label" : "Push-meldingen",
- "tts" : "Een app kan meldingen versturen als deze op de achtergrond actief is."
- },
- "pl-pl" : {
- "label" : "Powiadomienia Push",
- "tts" : "Aplikacja może wysyłać powiadomienia, działając w tle."
- },
- "pt-br" : {
- "label" : "Notificações Push",
- "tts" : "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano."
- },
- "pt-pt" : {
- "label" : "Notificações push",
- "tts" : "Uma aplicação consegue enviar notificações quando está activa em segundo plano."
- },
- "ru-ru" : {
- "label" : "Оповещения о пересылке",
- "tts" : "Если приложение работает в фоновом режиме, оно может отправлять оповещения."
- },
- "sv-se" : {
- "label" : "Push-notiser",
- "tts" : "Appen kan skicka meddelanden när den körs i bakgrunden."
- },
- "tr-tr" : {
- "label" : "Anlık bildirimleri",
- "tts" : "Bir uygulama arka planda çalışırken bildirim gönderebilir."
- },
- "zh-cn" : {
- "label" : "推送通知",
- "tts" : "移动应用程序在后台运行时可推送通知。"
- },
- "zh-tw" : {
- "label" : "傳送通知",
- "tts" : "車輛行進時,應用程式可在背景中傳送通知。"
- }
- }
- },
- "SettingDisableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Updates deakt."
- },
- "en-au" : {
- "line1" : "Disable updates"
- },
- "en-gb" : {
- "line1" : "Disable updates"
- },
- "en-ie" : {
- "line1" : "Disable updates"
- },
- "en-us" : {
- "line1" : "Disable Updates"
- },
- "es-en" : {
- "line1" : "Deshab. actual."
- },
- "es-es" : {
- "line1" : "Desact. actual."
- },
- "es-mx" : {
- "line1" : "Deshab. actual."
- },
- "fr-ca" : {
- "line1" : "Désactiver MAJ"
- },
- "fr-fr" : {
- "line1" : "Désactiver màj"
- },
- "it-it" : {
- "line1" : "Disabilita agg."
- },
- "nl-nl" : {
- "line1" : "Upd. uitschak."
- },
- "pl-pl" : {
- "line1" : "Wyłącz aktual."
- },
- "pt-br" : {
- "line1" : "Desat. atualiz."
- },
- "pt-pt" : {
- "line1" : "Desact. actualiz."
- },
- "ru-ru" : {
- "line1" : "Откл. обновл."
- },
- "sv-se" : {
- "line1" : "Inaktivera uppd."
- },
- "tr-tr" : {
- "line1" : "Güncell. Kapat"
- },
- "zh-cn" : {
- "line1" : "禁用更新"
- },
- "zh-tw" : {
- "line1" : "停用更新"
- }
- }
- },
- "SettingEnableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Apps aktivieren"
- },
- "en-au" : {
- "line1" : "Enable Apps"
- },
- "en-gb" : {
- "line1" : "Enable Apps"
- },
- "en-ie" : {
- "line1" : "Enable Apps"
- },
- "en-us" : {
- "line1" : "Enable Apps"
- },
- "es-en" : {
- "line1" : "Hab. aplic."
- },
- "es-es" : {
- "line1" : "Activar apl."
- },
- "es-mx" : {
- "line1" : "Hab. aplic."
- },
- "fr-ca" : {
- "line1" : "Activer app."
- },
- "fr-fr" : {
- "line1" : "Activer app."
- },
- "it-it" : {
- "line1" : "Abilita app"
- },
- "nl-nl" : {
- "line1" : "Apps inschak."
- },
- "pl-pl" : {
- "line1" : "Włącz aplikacje"
- },
- "pt-br" : {
- "line1" : "Ativar aplic."
- },
- "pt-pt" : {
- "line1" : "Activar actualiz."
- },
- "ru-ru" : {
- "line1" : "Вкл. прилож."
- },
- "sv-se" : {
- "line1" : "Aktivera appar"
- },
- "tr-tr" : {
- "line1" : "Uygulamaları aç"
- },
- "zh-cn" : {
- "line1" : "启用应用程序"
- },
- "zh-tw" : {
- "line1" : "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update anford."
- },
- "en-au" : {
- "line1" : "Request update"
- },
- "en-gb" : {
- "line1" : "Request update"
- },
- "en-ie" : {
- "line1" : "Request update"
- },
- "en-us" : {
- "line1" : "Request Update"
- },
- "es-en" : {
- "line1" : "Solicit. actualiz."
- },
- "es-es" : {
- "line1" : "Solicitar actual."
- },
- "es-mx" : {
- "line1" : "Solicit. actualiz."
- },
- "fr-ca" : {
- "line1" : "Demander MAJ"
- },
- "fr-fr" : {
- "line1" : "Demander màj"
- },
- "it-it" : {
- "line1" : "Rich. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Upd. aanvragen"
- },
- "pl-pl" : {
- "line1" : "Zażądaj aktual."
- },
- "pt-br" : {
- "line1" : "Solicitar atualiz."
- },
- "pt-pt" : {
- "line1" : "Solicit. actualiz."
- },
- "ru-ru" : {
- "line1" : "Запрос на обн."
- },
- "sv-se" : {
- "line1" : "Begär uppdat."
- },
- "tr-tr" : {
- "line1" : "Güncelleme iste"
- },
- "zh-cn" : {
- "line1" : "请求更新"
- },
- "zh-tw" : {
- "line1" : "請求更新"
- }
- }
- },
- "StatusNeeded" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update benötigt"
- },
- "en-au" : {
- "line1" : "Update needed"
- },
- "en-gb" : {
- "line1" : "Update needed"
- },
- "en-ie" : {
- "line1" : "Update needed"
- },
- "en-us" : {
- "line1" : "Update Needed"
- },
- "es-en" : {
- "line1" : "Actualiz. neces."
- },
- "es-es" : {
- "line1" : "Actu. necesaria"
- },
- "es-mx" : {
- "line1" : "Actualiz. neces."
- },
- "fr-ca" : {
- "line1" : "Màj requise"
- },
- "fr-fr" : {
- "line1" : "Mise à jour requise"
- },
- "it-it" : {
- "line1" : "Necess. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Update nodig"
- },
- "pl-pl" : {
- "line1" : "Potrzeba aktual."
- },
- "pt-br" : {
- "line1" : "Atualiz. necess."
- },
- "pt-pt" : {
- "line1" : "Actual. necess."
- },
- "ru-ru" : {
- "line1" : "Необх. обновл."
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs"
- },
- "tr-tr" : {
- "line1" : "Güncellenmeli"
- },
- "zh-cn" : {
- "line1" : "需要进行更新"
- },
- "zh-tw" : {
- "line1" : "需更新"
- }
- }
- },
- "StatusPending" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktualisieren..."
- },
- "en-au" : {
- "line1" : "Updating..."
- },
- "en-gb" : {
- "line1" : "Updating..."
- },
- "en-ie" : {
- "line1" : "Updating..."
- },
- "en-us" : {
- "line1" : "Updating..."
- },
- "es-en" : {
- "line1" : "Actualizando..."
- },
- "es-es" : {
- "line1" : "Actualizando..."
- },
- "es-mx" : {
- "line1" : "Actualizando..."
- },
- "fr-ca" : {
- "line1" : "MAJ en cours..."
- },
- "fr-fr" : {
- "line1" : "Màj en cours..."
- },
- "it-it" : {
- "line1" : "Aggiornamento"
- },
- "nl-nl" : {
- "line1" : "Updaten..."
- },
- "pl-pl" : {
- "line1" : "Aktualizowanie"
- },
- "pt-br" : {
- "line1" : "Atualizando..."
- },
- "pt-pt" : {
- "line1" : "A actualizar..."
- },
- "ru-ru" : {
- "line1" : "Обновление..."
- },
- "sv-se" : {
- "line1" : "Uppdaterar..."
- },
- "tr-tr" : {
- "line1" : "Güncelleniyor..."
- },
- "zh-cn" : {
- "line1" : "正在更新......"
- },
- "zh-tw" : {
- "line1" : "更新中..."
- }
- }
- },
- "StatusUpToDate" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktuelle Version"
- },
- "en-au" : {
- "line1" : "Up-to-date"
- },
- "en-gb" : {
- "line1" : "Up-to-date"
- },
- "en-ie" : {
- "line1" : "Up-to-date"
- },
- "en-us" : {
- "line1" : "Up-To-Date"
- },
- "es-en" : {
- "line1" : "Actualizado"
- },
- "es-es" : {
- "line1" : "Actualizada"
- },
- "es-mx" : {
- "line1" : "Actualizado"
- },
- "fr-ca" : {
- "line1" : "Déjà à jour"
- },
- "fr-fr" : {
- "line1" : "Déjà à jour"
- },
- "it-it" : {
- "line1" : "più recente"
- },
- "nl-nl" : {
- "line1" : "Up-to-date"
- },
- "pl-pl" : {
- "line1" : "Aktualne"
- },
- "pt-br" : {
- "line1" : "Atualizado"
- },
- "pt-pt" : {
- "line1" : "Actualizado"
- },
- "ru-ru" : {
- "line1" : "Обновлено"
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs ej"
- },
- "tr-tr" : {
- "line1" : "Güncel"
- },
- "zh-cn" : {
- "line1" : "最新更新"
- },
- "zh-tw" : {
- "line1" : "更新最新"
- }
- }
- },
- "VehicleInfo" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahrzeuginformationen",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck."
- },
- "en-au" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-gb" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-ie" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-us" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es" : {
- "label" : "Información del vehículo",
- "tts" : "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos."
- },
- "es-mx" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "fr-ca" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus."
- },
- "it-it" : {
- "label" : "Informazioni sul veicolo",
- "tts" : "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici."
- },
- "nl-nl" : {
- "label" : "Voertuiginformatie",
- "tts" : "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning."
- },
- "pl-pl" : {
- "label" : "Informacje o pojeździe",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon."
- },
- "pt-br" : {
- "label" : "Informações sobre o veículo",
- "tts" : "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus."
- },
- "pt-pt" : {
- "label" : "Informações do veículo",
- "tts" : "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus."
- },
- "ru-ru" : {
- "label" : "Информация об автомобиле",
- "tts" : "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин."
- },
- "sv-se" : {
- "label" : "Fordonsinformation",
- "tts" : "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck."
- },
- "tr-tr" : {
- "label" : "Araç bilgisi",
- "tts" : "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı."
- },
- "zh-cn" : {
- "label" : "车辆信息",
- "tts" : "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压."
- },
- "zh-tw" : {
- "label" : "車輛資訊",
- "tts" : "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓."
- }
- }
- }
- },
- "version" : "001.001.015"
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "DrivingCharacteristics-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- },
- "user_consent_prompt" : "DrivingCharacteristics"
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Location-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- }
- },
- "user_consent_prompt" : "Location"
- },
- "Navigation-1" : {
- "rpcs" : {
- "AlertManeuver" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ShowConstantTBT" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UpdateTurnList" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Notifications" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "BACKGROUND" ]
- }
- },
- "user_consent_prompt" : "Notifications"
- },
- "PropriataryData-1" : {
- "rpcs" : {
- "DiagnosticMessage" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GetDTCs" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ReadDID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "VehicleInfo-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- },
- "user_consent_prompt" : "VehicleInfo"
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/PTU_with_one_invalid_requestType.json b/src/components/policy/policy_external/test/json/PTU_with_one_invalid_requestType.json
deleted file mode 100644
index 3fcc71ca72..0000000000
--- a/src/components/policy/policy_external/test/json/PTU_with_one_invalid_requestType.json
+++ /dev/null
@@ -1,1747 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester", "tester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000,
- "RequestType" : [ "IVSU" ]
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "HTTP",
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "heart_beat_timeout_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- }
- },
- "consumer_friendly_messages" : {
- "messages" : {
- "AppPermissions" : {
- "languages" : {
- "de-de" : {
- "line1" : "Zugriffsanfrage(n)",
- "line2" : "erlauben?",
- "tts" : "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-gb" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-ie" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-us" : {
- "line1" : "Grant Requested",
- "line2" : "Permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press yes to allow or no to deny."
- },
- "es-en" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "es-es" : {
- "line1" : "¿Conceder permisos",
- "line2" : "solicitados?",
- "tts" : "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar."
- },
- "es-mx" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "fr-ca" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "fr-fr" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "it-it" : {
- "line1" : "Concedi autorizzaz.",
- "line2" : "richiesta(e)?",
- "tts" : "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare."
- },
- "nl-nl" : {
- "line1" : "Aangevraagde",
- "line2" : "permissie(s) verlenen?",
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren."
- },
- "pl-pl" : {
- "line1" : "Udzielić żądanych",
- "line2" : "pozwoleń?",
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "line1" : "Conceder permissão",
- "line2" : "solicitada?",
- "tts" : "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar."
- },
- "pt-pt" : {
- "line1" : "Conceder permiss.",
- "line2" : "solicitada(s)?",
- "tts" : "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar."
- },
- "ru-ru" : {
- "line1" : "Предост. заправш.",
- "line2" : "разрешения?",
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны."
- },
- "sv-se" : {
- "line1" : "Vill du ge",
- "line2" : "tillstånd?",
- "tts" : "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka."
- },
- "tr-tr" : {
- "line1" : "İstenen izinler",
- "line2" : "verilsin mi?",
- "tts" : "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否允许请求的",
- "line2" : "权限?",
- "tts" : "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。"
- },
- "zh-tw" : {
- "line1" : "允許",
- "line2" : "授權請求?",
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsHelp" : {
- "languages" : {
- "de-de" : {
- "tts" : "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es" : {
- "tts" : "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it" : {
- "tts" : "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl" : {
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl" : {
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "tts" : "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt" : {
- "tts" : "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru" : {
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se" : {
- "tts" : "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr" : {
- "tts" : "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "tts" : "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw" : {
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked" : {
- "languages" : {
- "de-de" : {
- "tts" : "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it" : {
- "tts" : "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl" : {
- "tts" : "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl" : {
- "tts" : "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br" : {
- "tts" : "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt" : {
- "tts" : "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru" : {
- "tts" : "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se" : {
- "tts" : "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr" : {
- "tts" : "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn" : {
- "tts" : "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw" : {
- "tts" : "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht autorisiert",
- "tts" : "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren."
- },
- "en-au" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-gb" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-us" : {
- "line1" : "Not Authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "es-en" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es" : {
- "line1" : "No autorizada",
- "tts" : "Esta versión de %appName% no está autorizada y no funcionará con SYNC."
- },
- "es-mx" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "it-it" : {
- "line1" : "non autorizzata",
- "tts" : "Questa versione di %appName% non è autorizzata e non funziona con il SYNC."
- },
- "nl-nl" : {
- "line1" : "niet geautoriseerd",
- "tts" : "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC."
- },
- "pl-pl" : {
- "line1" : "brak autoryzacji",
- "tts" : "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC."
- },
- "pt-br" : {
- "line1" : "não autorizado",
- "tts" : "Esta versão do %appName% não tem autorização e não funcionará com o SYNC."
- },
- "pt-pt" : {
- "line1" : "não autorizada",
- "tts" : "Esta versão de %appName% não está autorizada e não funcionará com o SYNC."
- },
- "ru-ru" : {
- "line1" : "не авторизировано",
- "tts" : "Эта версия %appName% не авторизирована и не будет работать с SYNC."
- },
- "sv-se" : {
- "line1" : "är ej godkänd",
- "tts" : "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC."
- },
- "tr-tr" : {
- "line1" : "için izin yok",
- "tts" : "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz."
- },
- "zh-cn" : {
- "line1" : "未得到授权",
- "tts" : "此版本的%appName% 未得到授权,无法在SYNC上使用。"
- },
- "zh-tw" : {
- "line1" : "無授權",
- "tts" : "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。"
- }
- }
- },
- "AppUnsupported" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht unterstützt",
- "tts" : "Diese Version von %appName% wird von SYNC nicht unterstützt."
- },
- "en-au" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-gb" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-ie" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-us" : {
- "line1" : "Not Supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "es-en" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es" : {
- "line1" : "No compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-mx" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "it-it" : {
- "line1" : "non supportata",
- "tts" : "Questa versione di %appName% non è supportata dal SYNC."
- },
- "nl-nl" : {
- "line1" : "niet ondersteund",
- "tts" : "Deze versie van %appName% wordt niet ondersteund door SYNC."
- },
- "pl-pl" : {
- "line1" : "aplikacja nie obsług.",
- "tts" : "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC."
- },
- "pt-br" : {
- "line1" : "não suportado",
- "tts" : "Esta versão do %appName% não é suportada pelo SYNC."
- },
- "pt-pt" : {
- "line1" : "não suportada",
- "tts" : "Esta versão de %appName% não é suportado pelo SYNC."
- },
- "ru-ru" : {
- "line1" : "не поддерживается",
- "tts" : "Эта версия %appName% не поддерживается SYNC."
- },
- "sv-se" : {
- "line1" : "stöds ej",
- "tts" : "SYNC har inte stöd för den här versionen av %appName%."
- },
- "tr-tr" : {
- "line1" : "desteklenmiyor",
- "tts" : "Bu %appName% sürümü SYNC tarafından desteklenmiyor."
- },
- "zh-cn" : {
- "line1" : "不受支持",
- "tts" : "SYNC不支持此版本的%appName%。"
- },
- "zh-tw" : {
- "line1" : "不支援",
- "tts" : "SYNC 不支援此版本的%appName% 。"
- }
- }
- },
- "DataConsent" : {
- "languages" : {
- "en-us" : {
- "line1" : "Enable Mobile Apps",
- "line2" : "on SYNC? (Uses Data)",
- "tts" : "To use mobile apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device's data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Please press yes or no, or help for more information. "
- }
- }
- },
- "DataConsentHelp" : {
- "languages" : {
- "en-us" : {
- "tts" : "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC mobile apps settings menu. See your Owner Guide for more information. "
- }
- }
- },
- "DisableApps" : {
- "languages" : {
- "de-de" : {
- "line1" : "Auto-Update",
- "line2" : "und Mobile Apps deaktivieren",
- "tts" : "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen."
- },
- "en-au" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-gb" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-us" : {
- "line1" : "Disable Auto-Updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es" : {
- "line1" : "¿Desact. actual. auto",
- "line2" : "y apl. móviles?",
- "tts" : "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar."
- },
- "es-mx" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "it-it" : {
- "line1" : "Disabilitare agg. aut.",
- "line2" : "e app mobili?",
- "tts" : "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare."
- },
- "nl-nl" : {
- "line1" : "Auto-updates en mob.",
- "line2" : "apps uitschakelen?",
- "tts" : "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren."
- },
- "pl-pl" : {
- "line1" : "Wył. automat. aktual.",
- "line2" : "i aplikacje mobilne?",
- "tts" : "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować."
- },
- "pt-br" : {
- "line1" : "Desativar atualizações",
- "line2" : "autom. e aplicativos?",
- "tts" : "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar."
- },
- "pt-pt" : {
- "line1" : "Desact. actual. autom.",
- "line2" : "e aplicações móveis?",
- "tts" : "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar."
- },
- "ru-ru" : {
- "line1" : "Откл. автообновления",
- "line2" : "и мобил. прилож.?",
- "tts" : "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены."
- },
- "sv-se" : {
- "line1" : "Avaktiverar autouppdat.",
- "line2" : "och mobilappar?",
- "tts" : "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta."
- },
- "tr-tr" : {
- "line1" : "Oto. güncelleme ve",
- "line2" : "mobil uygul. kapat?",
- "tts" : "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否禁用自动更新和",
- "line2" : "移动应用程序?",
- "tts" : "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。"
- },
- "zh-tw" : {
- "line1" : "停用自動更新",
- "line2" : "和行動應用程式?",
- "tts" : "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。"
- }
- }
- },
- "DrivingCharacteristics" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahreigenschaften",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus."
- },
- "en-au" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-gb" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-us" : {
- "label" : "Driving Characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es" : {
- "label" : "Características de conducción",
- "tts" : "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad."
- },
- "es-mx" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "fr-ca" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "it-it" : {
- "label" : "Caratteristiche di guida",
- "tts" : "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza."
- },
- "nl-nl" : {
- "label" : "Rijkenmerken",
- "tts" : "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus."
- },
- "pl-pl" : {
- "label" : "Informacje dotyczące stylu jazdy",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa."
- },
- "pt-br" : {
- "label" : "Características de condução",
- "tts" : "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança."
- },
- "pt-pt" : {
- "label" : "Características de condução",
- "tts" : "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança."
- },
- "ru-ru" : {
- "label" : "Характеристики движения",
- "tts" : "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности."
- },
- "sv-se" : {
- "label" : "Köregenskaper",
- "tts" : "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus."
- },
- "tr-tr" : {
- "label" : "Sürüş karakteristikleri",
- "tts" : "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu."
- },
- "zh-cn" : {
- "label" : "行驶特性",
- "tts" : "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态"
- },
- "zh-tw" : {
- "label" : "駕駛特性",
- "tts" : "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態"
- }
- }
- },
- "Location" : {
- "languages" : {
- "de-de" : {
- "label" : "GPS und Geschwindigkeit",
- "tts" : "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs."
- },
- "en-au" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-gb" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-ie" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-us" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "es-en" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es" : {
- "label" : "GPS y velocidad",
- "tts" : "Una aplicación puede acceder al GPS y la velocidad del vehículo."
- },
- "es-mx" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "it-it" : {
- "label" : "GPS e velocità",
- "tts" : "Un'app può avere accesso a GPS e velocità del veicolo."
- },
- "nl-nl" : {
- "label" : "Gps en snelheid",
- "tts" : "Een app heeft toegang tot gps en de snelheid van het voertuig."
- },
- "pl-pl" : {
- "label" : "GPS i prędkość",
- "tts" : "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu."
- },
- "pt-br" : {
- "label" : "GPS e velocidade",
- "tts" : "Um aplicativo pode acessar o GPS e a velocidade do veículo."
- },
- "pt-pt" : {
- "label" : "GPS e velocidade",
- "tts" : "Uma aplicação consegue aceder ao GPS e à velocidade do veículo."
- },
- "ru-ru" : {
- "label" : "GPS и скорость",
- "tts" : "Приложение имеет доступ к GPS и скорости автомобиля."
- },
- "sv-se" : {
- "label" : "GPS och hastighet",
- "tts" : "Appen kan komma åt fordonets GPS och hastighetsmätare."
- },
- "tr-tr" : {
- "label" : "GPS ve hız",
- "tts" : "Bu uygulama aracın GPS ve hız bilgilerine erişebilir."
- },
- "zh-cn" : {
- "label" : "GPS 和车速",
- "tts" : "移动应用程序可以访问车辆 GPS 和车速信息。"
- },
- "zh-tw" : {
- "label" : "GPS和車速",
- "tts" : "應用程式可存取車輛的GPS和速度。"
- }
- }
- },
- "Notifications" : {
- "languages" : {
- "de-de" : {
- "label" : "Push-Benachrichtigungen",
- "tts" : "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden."
- },
- "en-au" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-gb" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-ie" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-us" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "es-en" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es" : {
- "label" : "Notificaciones push",
- "tts" : "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano."
- },
- "es-mx" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca" : {
- "label" : "Notifications instantanées",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr" : {
- "label" : "Notifications push",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "it-it" : {
- "label" : "Notifiche push",
- "tts" : "Un'app può inviare notifiche se eseguita in background."
- },
- "nl-nl" : {
- "label" : "Push-meldingen",
- "tts" : "Een app kan meldingen versturen als deze op de achtergrond actief is."
- },
- "pl-pl" : {
- "label" : "Powiadomienia Push",
- "tts" : "Aplikacja może wysyłać powiadomienia, działając w tle."
- },
- "pt-br" : {
- "label" : "Notificações Push",
- "tts" : "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano."
- },
- "pt-pt" : {
- "label" : "Notificações push",
- "tts" : "Uma aplicação consegue enviar notificações quando está activa em segundo plano."
- },
- "ru-ru" : {
- "label" : "Оповещения о пересылке",
- "tts" : "Если приложение работает в фоновом режиме, оно может отправлять оповещения."
- },
- "sv-se" : {
- "label" : "Push-notiser",
- "tts" : "Appen kan skicka meddelanden när den körs i bakgrunden."
- },
- "tr-tr" : {
- "label" : "Anlık bildirimleri",
- "tts" : "Bir uygulama arka planda çalışırken bildirim gönderebilir."
- },
- "zh-cn" : {
- "label" : "推送通知",
- "tts" : "移动应用程序在后台运行时可推送通知。"
- },
- "zh-tw" : {
- "label" : "傳送通知",
- "tts" : "車輛行進時,應用程式可在背景中傳送通知。"
- }
- }
- },
- "SettingDisableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Updates deakt."
- },
- "en-au" : {
- "line1" : "Disable updates"
- },
- "en-gb" : {
- "line1" : "Disable updates"
- },
- "en-ie" : {
- "line1" : "Disable updates"
- },
- "en-us" : {
- "line1" : "Disable Updates"
- },
- "es-en" : {
- "line1" : "Deshab. actual."
- },
- "es-es" : {
- "line1" : "Desact. actual."
- },
- "es-mx" : {
- "line1" : "Deshab. actual."
- },
- "fr-ca" : {
- "line1" : "Désactiver MAJ"
- },
- "fr-fr" : {
- "line1" : "Désactiver màj"
- },
- "it-it" : {
- "line1" : "Disabilita agg."
- },
- "nl-nl" : {
- "line1" : "Upd. uitschak."
- },
- "pl-pl" : {
- "line1" : "Wyłącz aktual."
- },
- "pt-br" : {
- "line1" : "Desat. atualiz."
- },
- "pt-pt" : {
- "line1" : "Desact. actualiz."
- },
- "ru-ru" : {
- "line1" : "Откл. обновл."
- },
- "sv-se" : {
- "line1" : "Inaktivera uppd."
- },
- "tr-tr" : {
- "line1" : "Güncell. Kapat"
- },
- "zh-cn" : {
- "line1" : "禁用更新"
- },
- "zh-tw" : {
- "line1" : "停用更新"
- }
- }
- },
- "SettingEnableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Apps aktivieren"
- },
- "en-au" : {
- "line1" : "Enable Apps"
- },
- "en-gb" : {
- "line1" : "Enable Apps"
- },
- "en-ie" : {
- "line1" : "Enable Apps"
- },
- "en-us" : {
- "line1" : "Enable Apps"
- },
- "es-en" : {
- "line1" : "Hab. aplic."
- },
- "es-es" : {
- "line1" : "Activar apl."
- },
- "es-mx" : {
- "line1" : "Hab. aplic."
- },
- "fr-ca" : {
- "line1" : "Activer app."
- },
- "fr-fr" : {
- "line1" : "Activer app."
- },
- "it-it" : {
- "line1" : "Abilita app"
- },
- "nl-nl" : {
- "line1" : "Apps inschak."
- },
- "pl-pl" : {
- "line1" : "Włącz aplikacje"
- },
- "pt-br" : {
- "line1" : "Ativar aplic."
- },
- "pt-pt" : {
- "line1" : "Activar actualiz."
- },
- "ru-ru" : {
- "line1" : "Вкл. прилож."
- },
- "sv-se" : {
- "line1" : "Aktivera appar"
- },
- "tr-tr" : {
- "line1" : "Uygulamaları aç"
- },
- "zh-cn" : {
- "line1" : "启用应用程序"
- },
- "zh-tw" : {
- "line1" : "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update anford."
- },
- "en-au" : {
- "line1" : "Request update"
- },
- "en-gb" : {
- "line1" : "Request update"
- },
- "en-ie" : {
- "line1" : "Request update"
- },
- "en-us" : {
- "line1" : "Request Update"
- },
- "es-en" : {
- "line1" : "Solicit. actualiz."
- },
- "es-es" : {
- "line1" : "Solicitar actual."
- },
- "es-mx" : {
- "line1" : "Solicit. actualiz."
- },
- "fr-ca" : {
- "line1" : "Demander MAJ"
- },
- "fr-fr" : {
- "line1" : "Demander màj"
- },
- "it-it" : {
- "line1" : "Rich. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Upd. aanvragen"
- },
- "pl-pl" : {
- "line1" : "Zażądaj aktual."
- },
- "pt-br" : {
- "line1" : "Solicitar atualiz."
- },
- "pt-pt" : {
- "line1" : "Solicit. actualiz."
- },
- "ru-ru" : {
- "line1" : "Запрос на обн."
- },
- "sv-se" : {
- "line1" : "Begär uppdat."
- },
- "tr-tr" : {
- "line1" : "Güncelleme iste"
- },
- "zh-cn" : {
- "line1" : "请求更新"
- },
- "zh-tw" : {
- "line1" : "請求更新"
- }
- }
- },
- "StatusNeeded" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update benötigt"
- },
- "en-au" : {
- "line1" : "Update needed"
- },
- "en-gb" : {
- "line1" : "Update needed"
- },
- "en-ie" : {
- "line1" : "Update needed"
- },
- "en-us" : {
- "line1" : "Update Needed"
- },
- "es-en" : {
- "line1" : "Actualiz. neces."
- },
- "es-es" : {
- "line1" : "Actu. necesaria"
- },
- "es-mx" : {
- "line1" : "Actualiz. neces."
- },
- "fr-ca" : {
- "line1" : "Màj requise"
- },
- "fr-fr" : {
- "line1" : "Mise à jour requise"
- },
- "it-it" : {
- "line1" : "Necess. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Update nodig"
- },
- "pl-pl" : {
- "line1" : "Potrzeba aktual."
- },
- "pt-br" : {
- "line1" : "Atualiz. necess."
- },
- "pt-pt" : {
- "line1" : "Actual. necess."
- },
- "ru-ru" : {
- "line1" : "Необх. обновл."
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs"
- },
- "tr-tr" : {
- "line1" : "Güncellenmeli"
- },
- "zh-cn" : {
- "line1" : "需要进行更新"
- },
- "zh-tw" : {
- "line1" : "需更新"
- }
- }
- },
- "StatusPending" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktualisieren..."
- },
- "en-au" : {
- "line1" : "Updating..."
- },
- "en-gb" : {
- "line1" : "Updating..."
- },
- "en-ie" : {
- "line1" : "Updating..."
- },
- "en-us" : {
- "line1" : "Updating..."
- },
- "es-en" : {
- "line1" : "Actualizando..."
- },
- "es-es" : {
- "line1" : "Actualizando..."
- },
- "es-mx" : {
- "line1" : "Actualizando..."
- },
- "fr-ca" : {
- "line1" : "MAJ en cours..."
- },
- "fr-fr" : {
- "line1" : "Màj en cours..."
- },
- "it-it" : {
- "line1" : "Aggiornamento"
- },
- "nl-nl" : {
- "line1" : "Updaten..."
- },
- "pl-pl" : {
- "line1" : "Aktualizowanie"
- },
- "pt-br" : {
- "line1" : "Atualizando..."
- },
- "pt-pt" : {
- "line1" : "A actualizar..."
- },
- "ru-ru" : {
- "line1" : "Обновление..."
- },
- "sv-se" : {
- "line1" : "Uppdaterar..."
- },
- "tr-tr" : {
- "line1" : "Güncelleniyor..."
- },
- "zh-cn" : {
- "line1" : "正在更新......"
- },
- "zh-tw" : {
- "line1" : "更新中..."
- }
- }
- },
- "StatusUpToDate" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktuelle Version"
- },
- "en-au" : {
- "line1" : "Up-to-date"
- },
- "en-gb" : {
- "line1" : "Up-to-date"
- },
- "en-ie" : {
- "line1" : "Up-to-date"
- },
- "en-us" : {
- "line1" : "Up-To-Date"
- },
- "es-en" : {
- "line1" : "Actualizado"
- },
- "es-es" : {
- "line1" : "Actualizada"
- },
- "es-mx" : {
- "line1" : "Actualizado"
- },
- "fr-ca" : {
- "line1" : "Déjà à jour"
- },
- "fr-fr" : {
- "line1" : "Déjà à jour"
- },
- "it-it" : {
- "line1" : "più recente"
- },
- "nl-nl" : {
- "line1" : "Up-to-date"
- },
- "pl-pl" : {
- "line1" : "Aktualne"
- },
- "pt-br" : {
- "line1" : "Atualizado"
- },
- "pt-pt" : {
- "line1" : "Actualizado"
- },
- "ru-ru" : {
- "line1" : "Обновлено"
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs ej"
- },
- "tr-tr" : {
- "line1" : "Güncel"
- },
- "zh-cn" : {
- "line1" : "最新更新"
- },
- "zh-tw" : {
- "line1" : "更新最新"
- }
- }
- },
- "VehicleInfo" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahrzeuginformationen",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck."
- },
- "en-au" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-gb" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-ie" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-us" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es" : {
- "label" : "Información del vehículo",
- "tts" : "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos."
- },
- "es-mx" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "fr-ca" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus."
- },
- "it-it" : {
- "label" : "Informazioni sul veicolo",
- "tts" : "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici."
- },
- "nl-nl" : {
- "label" : "Voertuiginformatie",
- "tts" : "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning."
- },
- "pl-pl" : {
- "label" : "Informacje o pojeździe",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon."
- },
- "pt-br" : {
- "label" : "Informações sobre o veículo",
- "tts" : "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus."
- },
- "pt-pt" : {
- "label" : "Informações do veículo",
- "tts" : "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus."
- },
- "ru-ru" : {
- "label" : "Информация об автомобиле",
- "tts" : "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин."
- },
- "sv-se" : {
- "label" : "Fordonsinformation",
- "tts" : "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck."
- },
- "tr-tr" : {
- "label" : "Araç bilgisi",
- "tts" : "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı."
- },
- "zh-cn" : {
- "label" : "车辆信息",
- "tts" : "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压."
- },
- "zh-tw" : {
- "label" : "車輛資訊",
- "tts" : "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓."
- }
- }
- }
- },
- "version" : "001.001.015"
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "DrivingCharacteristics-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- },
- "user_consent_prompt" : "DrivingCharacteristics"
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Location-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- }
- },
- "user_consent_prompt" : "Location"
- },
- "Navigation-1" : {
- "rpcs" : {
- "AlertManeuver" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ShowConstantTBT" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UpdateTurnList" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Notifications" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "BACKGROUND" ]
- }
- },
- "user_consent_prompt" : "Notifications"
- },
- "PropriataryData-1" : {
- "rpcs" : {
- "DiagnosticMessage" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GetDTCs" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ReadDID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "VehicleInfo-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- },
- "user_consent_prompt" : "VehicleInfo"
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/PTU_without_requestType_field.json b/src/components/policy/policy_external/test/json/PTU_without_requestType_field.json
deleted file mode 100644
index 03a5e8d203..0000000000
--- a/src/components/policy/policy_external/test/json/PTU_without_requestType_field.json
+++ /dev/null
@@ -1,1746 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester", "tester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "RequestType": [
- "HTTP",
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "heart_beat_timeout_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- }
- },
- "consumer_friendly_messages" : {
- "messages" : {
- "AppPermissions" : {
- "languages" : {
- "de-de" : {
- "line1" : "Zugriffsanfrage(n)",
- "line2" : "erlauben?",
- "tts" : "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-gb" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-ie" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-us" : {
- "line1" : "Grant Requested",
- "line2" : "Permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press yes to allow or no to deny."
- },
- "es-en" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "es-es" : {
- "line1" : "¿Conceder permisos",
- "line2" : "solicitados?",
- "tts" : "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar."
- },
- "es-mx" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "fr-ca" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "fr-fr" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "it-it" : {
- "line1" : "Concedi autorizzaz.",
- "line2" : "richiesta(e)?",
- "tts" : "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare."
- },
- "nl-nl" : {
- "line1" : "Aangevraagde",
- "line2" : "permissie(s) verlenen?",
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren."
- },
- "pl-pl" : {
- "line1" : "Udzielić żądanych",
- "line2" : "pozwoleń?",
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "line1" : "Conceder permissão",
- "line2" : "solicitada?",
- "tts" : "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar."
- },
- "pt-pt" : {
- "line1" : "Conceder permiss.",
- "line2" : "solicitada(s)?",
- "tts" : "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar."
- },
- "ru-ru" : {
- "line1" : "Предост. заправш.",
- "line2" : "разрешения?",
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны."
- },
- "sv-se" : {
- "line1" : "Vill du ge",
- "line2" : "tillstånd?",
- "tts" : "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka."
- },
- "tr-tr" : {
- "line1" : "İstenen izinler",
- "line2" : "verilsin mi?",
- "tts" : "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否允许请求的",
- "line2" : "权限?",
- "tts" : "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。"
- },
- "zh-tw" : {
- "line1" : "允許",
- "line2" : "授權請求?",
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsHelp" : {
- "languages" : {
- "de-de" : {
- "tts" : "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es" : {
- "tts" : "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it" : {
- "tts" : "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl" : {
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl" : {
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "tts" : "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt" : {
- "tts" : "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru" : {
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se" : {
- "tts" : "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr" : {
- "tts" : "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "tts" : "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw" : {
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked" : {
- "languages" : {
- "de-de" : {
- "tts" : "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it" : {
- "tts" : "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl" : {
- "tts" : "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl" : {
- "tts" : "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br" : {
- "tts" : "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt" : {
- "tts" : "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru" : {
- "tts" : "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se" : {
- "tts" : "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr" : {
- "tts" : "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn" : {
- "tts" : "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw" : {
- "tts" : "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht autorisiert",
- "tts" : "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren."
- },
- "en-au" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-gb" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-us" : {
- "line1" : "Not Authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "es-en" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es" : {
- "line1" : "No autorizada",
- "tts" : "Esta versión de %appName% no está autorizada y no funcionará con SYNC."
- },
- "es-mx" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "it-it" : {
- "line1" : "non autorizzata",
- "tts" : "Questa versione di %appName% non è autorizzata e non funziona con il SYNC."
- },
- "nl-nl" : {
- "line1" : "niet geautoriseerd",
- "tts" : "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC."
- },
- "pl-pl" : {
- "line1" : "brak autoryzacji",
- "tts" : "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC."
- },
- "pt-br" : {
- "line1" : "não autorizado",
- "tts" : "Esta versão do %appName% não tem autorização e não funcionará com o SYNC."
- },
- "pt-pt" : {
- "line1" : "não autorizada",
- "tts" : "Esta versão de %appName% não está autorizada e não funcionará com o SYNC."
- },
- "ru-ru" : {
- "line1" : "не авторизировано",
- "tts" : "Эта версия %appName% не авторизирована и не будет работать с SYNC."
- },
- "sv-se" : {
- "line1" : "är ej godkänd",
- "tts" : "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC."
- },
- "tr-tr" : {
- "line1" : "için izin yok",
- "tts" : "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz."
- },
- "zh-cn" : {
- "line1" : "未得到授权",
- "tts" : "此版本的%appName% 未得到授权,无法在SYNC上使用。"
- },
- "zh-tw" : {
- "line1" : "無授權",
- "tts" : "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。"
- }
- }
- },
- "AppUnsupported" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht unterstützt",
- "tts" : "Diese Version von %appName% wird von SYNC nicht unterstützt."
- },
- "en-au" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-gb" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-ie" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-us" : {
- "line1" : "Not Supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "es-en" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es" : {
- "line1" : "No compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-mx" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "it-it" : {
- "line1" : "non supportata",
- "tts" : "Questa versione di %appName% non è supportata dal SYNC."
- },
- "nl-nl" : {
- "line1" : "niet ondersteund",
- "tts" : "Deze versie van %appName% wordt niet ondersteund door SYNC."
- },
- "pl-pl" : {
- "line1" : "aplikacja nie obsług.",
- "tts" : "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC."
- },
- "pt-br" : {
- "line1" : "não suportado",
- "tts" : "Esta versão do %appName% não é suportada pelo SYNC."
- },
- "pt-pt" : {
- "line1" : "não suportada",
- "tts" : "Esta versão de %appName% não é suportado pelo SYNC."
- },
- "ru-ru" : {
- "line1" : "не поддерживается",
- "tts" : "Эта версия %appName% не поддерживается SYNC."
- },
- "sv-se" : {
- "line1" : "stöds ej",
- "tts" : "SYNC har inte stöd för den här versionen av %appName%."
- },
- "tr-tr" : {
- "line1" : "desteklenmiyor",
- "tts" : "Bu %appName% sürümü SYNC tarafından desteklenmiyor."
- },
- "zh-cn" : {
- "line1" : "不受支持",
- "tts" : "SYNC不支持此版本的%appName%。"
- },
- "zh-tw" : {
- "line1" : "不支援",
- "tts" : "SYNC 不支援此版本的%appName% 。"
- }
- }
- },
- "DataConsent" : {
- "languages" : {
- "en-us" : {
- "line1" : "Enable Mobile Apps",
- "line2" : "on SYNC? (Uses Data)",
- "tts" : "To use mobile apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device's data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Please press yes or no, or help for more information. "
- }
- }
- },
- "DataConsentHelp" : {
- "languages" : {
- "en-us" : {
- "tts" : "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC mobile apps settings menu. See your Owner Guide for more information. "
- }
- }
- },
- "DisableApps" : {
- "languages" : {
- "de-de" : {
- "line1" : "Auto-Update",
- "line2" : "und Mobile Apps deaktivieren",
- "tts" : "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen."
- },
- "en-au" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-gb" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-us" : {
- "line1" : "Disable Auto-Updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es" : {
- "line1" : "¿Desact. actual. auto",
- "line2" : "y apl. móviles?",
- "tts" : "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar."
- },
- "es-mx" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "it-it" : {
- "line1" : "Disabilitare agg. aut.",
- "line2" : "e app mobili?",
- "tts" : "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare."
- },
- "nl-nl" : {
- "line1" : "Auto-updates en mob.",
- "line2" : "apps uitschakelen?",
- "tts" : "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren."
- },
- "pl-pl" : {
- "line1" : "Wył. automat. aktual.",
- "line2" : "i aplikacje mobilne?",
- "tts" : "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować."
- },
- "pt-br" : {
- "line1" : "Desativar atualizações",
- "line2" : "autom. e aplicativos?",
- "tts" : "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar."
- },
- "pt-pt" : {
- "line1" : "Desact. actual. autom.",
- "line2" : "e aplicações móveis?",
- "tts" : "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar."
- },
- "ru-ru" : {
- "line1" : "Откл. автообновления",
- "line2" : "и мобил. прилож.?",
- "tts" : "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены."
- },
- "sv-se" : {
- "line1" : "Avaktiverar autouppdat.",
- "line2" : "och mobilappar?",
- "tts" : "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta."
- },
- "tr-tr" : {
- "line1" : "Oto. güncelleme ve",
- "line2" : "mobil uygul. kapat?",
- "tts" : "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否禁用自动更新和",
- "line2" : "移动应用程序?",
- "tts" : "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。"
- },
- "zh-tw" : {
- "line1" : "停用自動更新",
- "line2" : "和行動應用程式?",
- "tts" : "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。"
- }
- }
- },
- "DrivingCharacteristics" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahreigenschaften",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus."
- },
- "en-au" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-gb" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-us" : {
- "label" : "Driving Characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es" : {
- "label" : "Características de conducción",
- "tts" : "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad."
- },
- "es-mx" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "fr-ca" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "it-it" : {
- "label" : "Caratteristiche di guida",
- "tts" : "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza."
- },
- "nl-nl" : {
- "label" : "Rijkenmerken",
- "tts" : "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus."
- },
- "pl-pl" : {
- "label" : "Informacje dotyczące stylu jazdy",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa."
- },
- "pt-br" : {
- "label" : "Características de condução",
- "tts" : "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança."
- },
- "pt-pt" : {
- "label" : "Características de condução",
- "tts" : "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança."
- },
- "ru-ru" : {
- "label" : "Характеристики движения",
- "tts" : "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности."
- },
- "sv-se" : {
- "label" : "Köregenskaper",
- "tts" : "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus."
- },
- "tr-tr" : {
- "label" : "Sürüş karakteristikleri",
- "tts" : "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu."
- },
- "zh-cn" : {
- "label" : "行驶特性",
- "tts" : "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态"
- },
- "zh-tw" : {
- "label" : "駕駛特性",
- "tts" : "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態"
- }
- }
- },
- "Location" : {
- "languages" : {
- "de-de" : {
- "label" : "GPS und Geschwindigkeit",
- "tts" : "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs."
- },
- "en-au" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-gb" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-ie" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-us" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "es-en" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es" : {
- "label" : "GPS y velocidad",
- "tts" : "Una aplicación puede acceder al GPS y la velocidad del vehículo."
- },
- "es-mx" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "it-it" : {
- "label" : "GPS e velocità",
- "tts" : "Un'app può avere accesso a GPS e velocità del veicolo."
- },
- "nl-nl" : {
- "label" : "Gps en snelheid",
- "tts" : "Een app heeft toegang tot gps en de snelheid van het voertuig."
- },
- "pl-pl" : {
- "label" : "GPS i prędkość",
- "tts" : "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu."
- },
- "pt-br" : {
- "label" : "GPS e velocidade",
- "tts" : "Um aplicativo pode acessar o GPS e a velocidade do veículo."
- },
- "pt-pt" : {
- "label" : "GPS e velocidade",
- "tts" : "Uma aplicação consegue aceder ao GPS e à velocidade do veículo."
- },
- "ru-ru" : {
- "label" : "GPS и скорость",
- "tts" : "Приложение имеет доступ к GPS и скорости автомобиля."
- },
- "sv-se" : {
- "label" : "GPS och hastighet",
- "tts" : "Appen kan komma åt fordonets GPS och hastighetsmätare."
- },
- "tr-tr" : {
- "label" : "GPS ve hız",
- "tts" : "Bu uygulama aracın GPS ve hız bilgilerine erişebilir."
- },
- "zh-cn" : {
- "label" : "GPS 和车速",
- "tts" : "移动应用程序可以访问车辆 GPS 和车速信息。"
- },
- "zh-tw" : {
- "label" : "GPS和車速",
- "tts" : "應用程式可存取車輛的GPS和速度。"
- }
- }
- },
- "Notifications" : {
- "languages" : {
- "de-de" : {
- "label" : "Push-Benachrichtigungen",
- "tts" : "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden."
- },
- "en-au" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-gb" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-ie" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-us" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "es-en" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es" : {
- "label" : "Notificaciones push",
- "tts" : "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano."
- },
- "es-mx" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca" : {
- "label" : "Notifications instantanées",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr" : {
- "label" : "Notifications push",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "it-it" : {
- "label" : "Notifiche push",
- "tts" : "Un'app può inviare notifiche se eseguita in background."
- },
- "nl-nl" : {
- "label" : "Push-meldingen",
- "tts" : "Een app kan meldingen versturen als deze op de achtergrond actief is."
- },
- "pl-pl" : {
- "label" : "Powiadomienia Push",
- "tts" : "Aplikacja może wysyłać powiadomienia, działając w tle."
- },
- "pt-br" : {
- "label" : "Notificações Push",
- "tts" : "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano."
- },
- "pt-pt" : {
- "label" : "Notificações push",
- "tts" : "Uma aplicação consegue enviar notificações quando está activa em segundo plano."
- },
- "ru-ru" : {
- "label" : "Оповещения о пересылке",
- "tts" : "Если приложение работает в фоновом режиме, оно может отправлять оповещения."
- },
- "sv-se" : {
- "label" : "Push-notiser",
- "tts" : "Appen kan skicka meddelanden när den körs i bakgrunden."
- },
- "tr-tr" : {
- "label" : "Anlık bildirimleri",
- "tts" : "Bir uygulama arka planda çalışırken bildirim gönderebilir."
- },
- "zh-cn" : {
- "label" : "推送通知",
- "tts" : "移动应用程序在后台运行时可推送通知。"
- },
- "zh-tw" : {
- "label" : "傳送通知",
- "tts" : "車輛行進時,應用程式可在背景中傳送通知。"
- }
- }
- },
- "SettingDisableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Updates deakt."
- },
- "en-au" : {
- "line1" : "Disable updates"
- },
- "en-gb" : {
- "line1" : "Disable updates"
- },
- "en-ie" : {
- "line1" : "Disable updates"
- },
- "en-us" : {
- "line1" : "Disable Updates"
- },
- "es-en" : {
- "line1" : "Deshab. actual."
- },
- "es-es" : {
- "line1" : "Desact. actual."
- },
- "es-mx" : {
- "line1" : "Deshab. actual."
- },
- "fr-ca" : {
- "line1" : "Désactiver MAJ"
- },
- "fr-fr" : {
- "line1" : "Désactiver màj"
- },
- "it-it" : {
- "line1" : "Disabilita agg."
- },
- "nl-nl" : {
- "line1" : "Upd. uitschak."
- },
- "pl-pl" : {
- "line1" : "Wyłącz aktual."
- },
- "pt-br" : {
- "line1" : "Desat. atualiz."
- },
- "pt-pt" : {
- "line1" : "Desact. actualiz."
- },
- "ru-ru" : {
- "line1" : "Откл. обновл."
- },
- "sv-se" : {
- "line1" : "Inaktivera uppd."
- },
- "tr-tr" : {
- "line1" : "Güncell. Kapat"
- },
- "zh-cn" : {
- "line1" : "禁用更新"
- },
- "zh-tw" : {
- "line1" : "停用更新"
- }
- }
- },
- "SettingEnableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Apps aktivieren"
- },
- "en-au" : {
- "line1" : "Enable Apps"
- },
- "en-gb" : {
- "line1" : "Enable Apps"
- },
- "en-ie" : {
- "line1" : "Enable Apps"
- },
- "en-us" : {
- "line1" : "Enable Apps"
- },
- "es-en" : {
- "line1" : "Hab. aplic."
- },
- "es-es" : {
- "line1" : "Activar apl."
- },
- "es-mx" : {
- "line1" : "Hab. aplic."
- },
- "fr-ca" : {
- "line1" : "Activer app."
- },
- "fr-fr" : {
- "line1" : "Activer app."
- },
- "it-it" : {
- "line1" : "Abilita app"
- },
- "nl-nl" : {
- "line1" : "Apps inschak."
- },
- "pl-pl" : {
- "line1" : "Włącz aplikacje"
- },
- "pt-br" : {
- "line1" : "Ativar aplic."
- },
- "pt-pt" : {
- "line1" : "Activar actualiz."
- },
- "ru-ru" : {
- "line1" : "Вкл. прилож."
- },
- "sv-se" : {
- "line1" : "Aktivera appar"
- },
- "tr-tr" : {
- "line1" : "Uygulamaları aç"
- },
- "zh-cn" : {
- "line1" : "启用应用程序"
- },
- "zh-tw" : {
- "line1" : "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update anford."
- },
- "en-au" : {
- "line1" : "Request update"
- },
- "en-gb" : {
- "line1" : "Request update"
- },
- "en-ie" : {
- "line1" : "Request update"
- },
- "en-us" : {
- "line1" : "Request Update"
- },
- "es-en" : {
- "line1" : "Solicit. actualiz."
- },
- "es-es" : {
- "line1" : "Solicitar actual."
- },
- "es-mx" : {
- "line1" : "Solicit. actualiz."
- },
- "fr-ca" : {
- "line1" : "Demander MAJ"
- },
- "fr-fr" : {
- "line1" : "Demander màj"
- },
- "it-it" : {
- "line1" : "Rich. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Upd. aanvragen"
- },
- "pl-pl" : {
- "line1" : "Zażądaj aktual."
- },
- "pt-br" : {
- "line1" : "Solicitar atualiz."
- },
- "pt-pt" : {
- "line1" : "Solicit. actualiz."
- },
- "ru-ru" : {
- "line1" : "Запрос на обн."
- },
- "sv-se" : {
- "line1" : "Begär uppdat."
- },
- "tr-tr" : {
- "line1" : "Güncelleme iste"
- },
- "zh-cn" : {
- "line1" : "请求更新"
- },
- "zh-tw" : {
- "line1" : "請求更新"
- }
- }
- },
- "StatusNeeded" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update benötigt"
- },
- "en-au" : {
- "line1" : "Update needed"
- },
- "en-gb" : {
- "line1" : "Update needed"
- },
- "en-ie" : {
- "line1" : "Update needed"
- },
- "en-us" : {
- "line1" : "Update Needed"
- },
- "es-en" : {
- "line1" : "Actualiz. neces."
- },
- "es-es" : {
- "line1" : "Actu. necesaria"
- },
- "es-mx" : {
- "line1" : "Actualiz. neces."
- },
- "fr-ca" : {
- "line1" : "Màj requise"
- },
- "fr-fr" : {
- "line1" : "Mise à jour requise"
- },
- "it-it" : {
- "line1" : "Necess. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Update nodig"
- },
- "pl-pl" : {
- "line1" : "Potrzeba aktual."
- },
- "pt-br" : {
- "line1" : "Atualiz. necess."
- },
- "pt-pt" : {
- "line1" : "Actual. necess."
- },
- "ru-ru" : {
- "line1" : "Необх. обновл."
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs"
- },
- "tr-tr" : {
- "line1" : "Güncellenmeli"
- },
- "zh-cn" : {
- "line1" : "需要进行更新"
- },
- "zh-tw" : {
- "line1" : "需更新"
- }
- }
- },
- "StatusPending" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktualisieren..."
- },
- "en-au" : {
- "line1" : "Updating..."
- },
- "en-gb" : {
- "line1" : "Updating..."
- },
- "en-ie" : {
- "line1" : "Updating..."
- },
- "en-us" : {
- "line1" : "Updating..."
- },
- "es-en" : {
- "line1" : "Actualizando..."
- },
- "es-es" : {
- "line1" : "Actualizando..."
- },
- "es-mx" : {
- "line1" : "Actualizando..."
- },
- "fr-ca" : {
- "line1" : "MAJ en cours..."
- },
- "fr-fr" : {
- "line1" : "Màj en cours..."
- },
- "it-it" : {
- "line1" : "Aggiornamento"
- },
- "nl-nl" : {
- "line1" : "Updaten..."
- },
- "pl-pl" : {
- "line1" : "Aktualizowanie"
- },
- "pt-br" : {
- "line1" : "Atualizando..."
- },
- "pt-pt" : {
- "line1" : "A actualizar..."
- },
- "ru-ru" : {
- "line1" : "Обновление..."
- },
- "sv-se" : {
- "line1" : "Uppdaterar..."
- },
- "tr-tr" : {
- "line1" : "Güncelleniyor..."
- },
- "zh-cn" : {
- "line1" : "正在更新......"
- },
- "zh-tw" : {
- "line1" : "更新中..."
- }
- }
- },
- "StatusUpToDate" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktuelle Version"
- },
- "en-au" : {
- "line1" : "Up-to-date"
- },
- "en-gb" : {
- "line1" : "Up-to-date"
- },
- "en-ie" : {
- "line1" : "Up-to-date"
- },
- "en-us" : {
- "line1" : "Up-To-Date"
- },
- "es-en" : {
- "line1" : "Actualizado"
- },
- "es-es" : {
- "line1" : "Actualizada"
- },
- "es-mx" : {
- "line1" : "Actualizado"
- },
- "fr-ca" : {
- "line1" : "Déjà à jour"
- },
- "fr-fr" : {
- "line1" : "Déjà à jour"
- },
- "it-it" : {
- "line1" : "più recente"
- },
- "nl-nl" : {
- "line1" : "Up-to-date"
- },
- "pl-pl" : {
- "line1" : "Aktualne"
- },
- "pt-br" : {
- "line1" : "Atualizado"
- },
- "pt-pt" : {
- "line1" : "Actualizado"
- },
- "ru-ru" : {
- "line1" : "Обновлено"
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs ej"
- },
- "tr-tr" : {
- "line1" : "Güncel"
- },
- "zh-cn" : {
- "line1" : "最新更新"
- },
- "zh-tw" : {
- "line1" : "更新最新"
- }
- }
- },
- "VehicleInfo" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahrzeuginformationen",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck."
- },
- "en-au" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-gb" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-ie" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-us" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es" : {
- "label" : "Información del vehículo",
- "tts" : "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos."
- },
- "es-mx" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "fr-ca" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus."
- },
- "it-it" : {
- "label" : "Informazioni sul veicolo",
- "tts" : "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici."
- },
- "nl-nl" : {
- "label" : "Voertuiginformatie",
- "tts" : "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning."
- },
- "pl-pl" : {
- "label" : "Informacje o pojeździe",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon."
- },
- "pt-br" : {
- "label" : "Informações sobre o veículo",
- "tts" : "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus."
- },
- "pt-pt" : {
- "label" : "Informações do veículo",
- "tts" : "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus."
- },
- "ru-ru" : {
- "label" : "Информация об автомобиле",
- "tts" : "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин."
- },
- "sv-se" : {
- "label" : "Fordonsinformation",
- "tts" : "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck."
- },
- "tr-tr" : {
- "label" : "Araç bilgisi",
- "tts" : "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı."
- },
- "zh-cn" : {
- "label" : "车辆信息",
- "tts" : "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压."
- },
- "zh-tw" : {
- "label" : "車輛資訊",
- "tts" : "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓."
- }
- }
- }
- },
- "version" : "001.001.015"
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "DrivingCharacteristics-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- },
- "user_consent_prompt" : "DrivingCharacteristics"
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Location-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- }
- },
- "user_consent_prompt" : "Location"
- },
- "Navigation-1" : {
- "rpcs" : {
- "AlertManeuver" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ShowConstantTBT" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UpdateTurnList" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Notifications" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "BACKGROUND" ]
- }
- },
- "user_consent_prompt" : "Notifications"
- },
- "PropriataryData-1" : {
- "rpcs" : {
- "DiagnosticMessage" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GetDTCs" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ReadDID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "VehicleInfo-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- },
- "user_consent_prompt" : "VehicleInfo"
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_reqestType_between_valid.json b/src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_reqestType_between_valid.json
deleted file mode 100644
index b5dd0bfff5..0000000000
--- a/src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_reqestType_between_valid.json
+++ /dev/null
@@ -1,1964 +0,0 @@
- {
- "policy_table": {
- "module_config": {
- "preloaded_pt": true,
- "preloaded_date": "2015-02-12",
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 70,
- "seconds_between_retries": [1,
- 5,
- 25,
- 125,
- 625],
- "endpoints": {
- "0x07": {
- "default": ["http://x.x.x.x:3000/api/1/policies"]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "AddSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Alert": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EndAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GenericResponse": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnButtonEvent": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnButtonPress": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnDriverDistraction": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PerformAudioPassThru": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PerformInteraction": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ResetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ScrollableMessage": {
- "hmi_levels": ["FULL"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SetMediaClockTimer": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "Show": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Slider": {
- "hmi_levels": ["FULL"]
- },
- "Speak": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "SubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnsubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": ["BACKGROUND"]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GetDTCs": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ReadDID": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ShowConstantTBT": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "UpdateTurnList": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.019",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?"
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\n\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\n\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. /r Presione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements. /r Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?"
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push"
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app authorization information for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["Base-4"],
- "RequestType": [
- "QUERY_APPS",
- "IVSU",
- "PROPRIETARY"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["DataConsent-2"]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["BaseBeforeDataConsent"],
- "RequestType": ["HTTP"]
- }
- }
- }
- }
diff --git a/src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_requestType.json b/src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_requestType.json
deleted file mode 100644
index 8fa8e6f3d0..0000000000
--- a/src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_requestType.json
+++ /dev/null
@@ -1,1962 +0,0 @@
- {
- "policy_table": {
- "module_config": {
- "preloaded_pt": true,
- "preloaded_date": "2015-02-12",
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 70,
- "seconds_between_retries": [1,
- 5,
- 25,
- 125,
- 625],
- "endpoints": {
- "0x07": {
- "default": ["http://x.x.x.x:3000/api/1/policies"]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "AddSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Alert": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EndAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GenericResponse": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnButtonEvent": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnButtonPress": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnDriverDistraction": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PerformAudioPassThru": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PerformInteraction": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ResetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ScrollableMessage": {
- "hmi_levels": ["FULL"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SetMediaClockTimer": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "Show": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Slider": {
- "hmi_levels": ["FULL"]
- },
- "Speak": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "SubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnsubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": ["BACKGROUND"]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GetDTCs": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ReadDID": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ShowConstantTBT": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "UpdateTurnList": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.019",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?"
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\n\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\n\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. /r Presione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements. /r Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?"
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push"
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app authorization information for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["Base-4"],
- "RequestType": [
- "IVSU"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["DataConsent-2"]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["BaseBeforeDataConsent"],
- "RequestType": ["HTTP"]
- }
- }
- }
- }
diff --git a/src/components/policy/policy_external/test/json/preloadedPT_with_several_invalid_default_requestTypes.json b/src/components/policy/policy_external/test/json/preloadedPT_with_several_invalid_default_requestTypes.json
deleted file mode 100644
index 589cdc7a81..0000000000
--- a/src/components/policy/policy_external/test/json/preloadedPT_with_several_invalid_default_requestTypes.json
+++ /dev/null
@@ -1,1963 +0,0 @@
- {
- "policy_table": {
- "module_config": {
- "preloaded_pt": true,
- "preloaded_date": "2015-02-12",
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 70,
- "seconds_between_retries": [1,
- 5,
- 25,
- 125,
- 625],
- "endpoints": {
- "0x07": {
- "default": ["http://x.x.x.x:3000/api/1/policies"]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "AddSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Alert": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EndAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GenericResponse": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnButtonEvent": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnButtonPress": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnDriverDistraction": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PerformAudioPassThru": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PerformInteraction": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ResetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ScrollableMessage": {
- "hmi_levels": ["FULL"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SetMediaClockTimer": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "Show": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Slider": {
- "hmi_levels": ["FULL"]
- },
- "Speak": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "SubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnsubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": ["BACKGROUND"]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GetDTCs": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ReadDID": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ShowConstantTBT": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "UpdateTurnList": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.019",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?"
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\n\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\n\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. /r Presione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements. /r Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?"
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push"
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app authorization information for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["Base-4"],
- "RequestType": [
- "IVSU1",
- "IVSU2"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["DataConsent-2"]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["BaseBeforeDataConsent"],
- "RequestType": ["HTTP"]
- }
- }
- }
- }
diff --git a/src/components/policy/policy_external/test/json/ptu2_requestType.json b/src/components/policy/policy_external/test/json/ptu2_requestType.json
deleted file mode 100644
index 9b580b2a08..0000000000
--- a/src/components/policy/policy_external/test/json/ptu2_requestType.json
+++ /dev/null
@@ -1,2635 +0,0 @@
-{
- "policy_table" : {
- "module_config": {
- "preloaded_date": "2015-12-02",
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [
- 1,
- 5,
- 25,
- 125,
- 625
- ],
- "endpoints": {
- "0x07": {
- "default": [
- "http://x.x.x.x:3000/api/1/policies"
- ]
- },
- "0x04": {
- "default": [
- "http://x.x.x.x:3000/api/1/softwareUpdate"
- ]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "VOICECOM": 20,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "FULL",
- "LIMITED",
- "BACKGROUND"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "FULL",
- "LIMITED",
- "BACKGROUND"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "FULL",
- "LIMITED",
- "BACKGROUND"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "PropriataryData-2": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "ProprietaryData-3": {
- "rpcs": {
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Base-6": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnTBTClientState": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "OnKeyboardInputOnlyGroup": {
- "rpcs": {
- "OnKeyboardInput": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "OnTouchEventOnlyGroup": {
- "rpcs": {
- "OnTouchEvent": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "DiagnosticMessageOnly": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- },
- "SendLocation": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "BackgroundAPT": {
- "rpcs": {
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.021",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. \n\nSi presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\r\n\r\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-mx": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. \n\nLas actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. \n\nPresione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements.\r\n\r\nVeuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information."
- },
- "es-mx": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "EMERGENCY",
- "default_hmi": "LIMITED",
- "groups": [
- "Base-4"
- ],
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "DataConsent-2"
- ],
- "preconsented_groups": [
- "BaseBeforeDataConsent"
- ]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ],
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- },
- "123454321": {
- "keep_context" : false,
- "steal_focus" : false,
- "priority"
- : "NONE",
- "default_hmi"
- : "NONE",
- "groups" :
- ["BaseBeforeDataConsent"],
- "RequestType" :[
- "TRAFFIC_MESSAGE_CHANNEL",
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- }
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/ptu_requestType.json b/src/components/policy/policy_external/test/json/ptu_requestType.json
deleted file mode 100644
index 8d18a9e336..0000000000
--- a/src/components/policy/policy_external/test/json/ptu_requestType.json
+++ /dev/null
@@ -1,2625 +0,0 @@
-{
- "policy_table": {
- "module_config": {
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [
- 1,
- 5,
- 25,
- 125,
- 625
- ],
- "endpoints": {
- "0x07": {
- "default": [
- "http://x.x.x.x:3000/api/1/policies"
- ]
- },
- "0x04": {
- "default": [
- "http://x.x.x.x:3000/api/1/softwareUpdate"
- ]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "VOICECOM": 20,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "FULL",
- "LIMITED",
- "BACKGROUND"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "FULL",
- "LIMITED",
- "BACKGROUND"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "FULL",
- "LIMITED",
- "BACKGROUND"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "PropriataryData-2": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "ProprietaryData-3": {
- "rpcs": {
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Base-6": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnTBTClientState": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "OnKeyboardInputOnlyGroup": {
- "rpcs": {
- "OnKeyboardInput": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "OnTouchEventOnlyGroup": {
- "rpcs": {
- "OnTouchEvent": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "DiagnosticMessageOnly": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- },
- "SendLocation": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "BackgroundAPT": {
- "rpcs": {
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.021",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. \n\nSi presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\r\n\r\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-mx": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. \n\nLas actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. \n\nPresione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements.\r\n\r\nVeuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information."
- },
- "es-mx": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "123454321": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ],
- "RequestType": [
- "PROPRIETARY"
- ]
- },
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "Base-4"
- ],
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "DataConsent-2"
- ]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ],
- "RequestType": [
- "PROPRIETARY"
- ]
- }
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/sdl_preloaded_pt.json b/src/components/policy/policy_external/test/json/sdl_preloaded_pt.json
deleted file mode 100644
index ad264c8518..0000000000
--- a/src/components/policy/policy_external/test/json/sdl_preloaded_pt.json
+++ /dev/null
@@ -1,1965 +0,0 @@
- {
- "policy_table": {
- "module_config": {
- "preloaded_pt": true,
- "preloaded_date": "2015-02-12",
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 70,
- "seconds_between_retries": [1,
- 5,
- 25,
- 125,
- 625],
- "endpoints": {
- "0x07": {
- "default": ["http://x.x.x.x:3000/api/1/policies"]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "PROJECTION": 15,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "AddSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Alert": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EndAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GenericResponse": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnButtonEvent": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnButtonPress": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnDriverDistraction": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PerformAudioPassThru": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PerformInteraction": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ResetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ScrollableMessage": {
- "hmi_levels": ["FULL"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SetMediaClockTimer": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "Show": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Slider": {
- "hmi_levels": ["FULL"]
- },
- "Speak": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "SubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnsubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": ["BACKGROUND"]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GetDTCs": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ReadDID": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ShowConstantTBT": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "UpdateTurnList": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.019",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?"
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\n\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\n\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. /r Presione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements. /r Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?"
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push"
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app authorization information for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["Base-4"],
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["DataConsent-2"]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["BaseBeforeDataConsent"],
- "RequestType": ["HTTP"]
- }
- }
- }
- }
diff --git a/src/components/policy/policy_external/test/json/sdl_preloaded_pt_for_merge_initial.json b/src/components/policy/policy_external/test/json/sdl_preloaded_pt_for_merge_initial.json
new file mode 100644
index 0000000000..c949575190
--- /dev/null
+++ b/src/components/policy/policy_external/test/json/sdl_preloaded_pt_for_merge_initial.json
@@ -0,0 +1,2452 @@
+
+{
+ "policy_table" :
+ {
+ "app_policies" :
+ {
+ "default" :
+ {
+ "default_hmi" : "NONE",
+ "groups" : [ "Base-4" ],
+ "keep_context" : false,
+ "priority" : "NONE",
+ "steal_focus" : false
+ },
+ "device" :
+ {
+ "default_hmi" : "NONE",
+ "groups" : [ "DataConsent-2" ],
+ "keep_context" : false,
+ "priority" : "NONE",
+ "steal_focus" : false
+ },
+ "pre_DataConsent" :
+ {
+ "default_hmi" : "BACKGROUND",
+ "groups" : [ "BaseBeforeDataConsent" ],
+ "keep_context" : false,
+ "priority" : "EMERGENCY",
+ "steal_focus" : false
+ }
+ },
+ "consumer_friendly_messages" :
+ {
+ "messages" :
+ {
+ "AppPermissions" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Zugriffsanfrage(n)",
+ "line2" : "erlauben?",
+ "tts" : "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
+ },
+ "en-au" :
+ {
+ "line1" : "Grant requested",
+ "line2" : "permission(s)?",
+ "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
+ },
+ "en-gb" :
+ {
+ "line1" : "Grant requested",
+ "line2" : "permission(s)?",
+ "textBody" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu.",
+ "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny."
+ },
+ "en-ie" :
+ {
+ "line1" : "Grant requested",
+ "line2" : "permission(s)?",
+ "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
+ },
+ "en-us" :
+ {
+ "line1" : "Grant Requested",
+ "line2" : "Permission(s)?",
+ "textBody" : "The %appName% App is requesting permission to use the following: %functionalGroupLabels%.\r\n\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. I agree and consent.",
+ "tts" : "%appName% is requesting permission to use the following: %functionalGroupLabels%.\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. Please press yes to allow or no to deny."
+ },
+ "es-en" :
+ {
+ "line1" : "¿Otorgar permiso(s)",
+ "line2" : "solicitado(s)?",
+ "textBody" : "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior.",
+ "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
+ },
+ "es-es" :
+ {
+ "line1" : "¿Conceder permisos",
+ "line2" : "solicitados?",
+ "tts" : "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar."
+ },
+ "es-mx" :
+ {
+ "line1" : "¿Otorgar permiso(s)",
+ "line2" : "solicitado(s)?",
+ "textBody" : "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior.",
+ "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Accorder permission(s)",
+ "line2" : "demandée(s)",
+ "textBody" : "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\n\r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. J’accepte et je consens.",
+ "tts" : "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
+ },
+ "fr-fr" :
+ {
+ "line1" : "Accorder permission(s)",
+ "line2" : "demandée(s)",
+ "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
+ },
+ "it-it" :
+ {
+ "line1" : "Concedi autorizzaz.",
+ "line2" : "richiesta(e)?",
+ "tts" : "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare."
+ },
+ "nl-nl" :
+ {
+ "line1" : "Aangevraagde",
+ "line2" : "permissie(s) verlenen?",
+ "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren."
+ },
+ "pl-pl" :
+ {
+ "line1" : "Udzielić żądanych",
+ "line2" : "pozwoleń?",
+ "tts" : "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania."
+ },
+ "pt-br" :
+ {
+ "line1" : "Conceder permissão",
+ "line2" : "solicitada?",
+ "tts" : "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Conceder permiss.",
+ "line2" : "solicitada(s)?",
+ "tts" : "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Предост. заправш.",
+ "line2" : "разрешения?",
+ "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны."
+ },
+ "sv-se" :
+ {
+ "line1" : "Vill du ge",
+ "line2" : "tillstånd?",
+ "tts" : "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka."
+ },
+ "tr-tr" :
+ {
+ "line1" : "İstenen izinler",
+ "line2" : "verilsin mi?",
+ "tts" : "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın."
+ },
+ "zh-cn" :
+ {
+ "line1" : "是否允许请求的",
+ "line2" : "权限?",
+ "tts" : "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。"
+ },
+ "zh-tw" :
+ {
+ "line1" : "允許",
+ "line2" : "授權請求?",
+ "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。"
+ }
+ }
+ },
+ "AppPermissionsHelp" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "tts" : "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
+ },
+ "en-au" :
+ {
+ "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
+ },
+ "en-gb" :
+ {
+ "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
+ },
+ "en-ie" :
+ {
+ "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
+ },
+ "en-us" :
+ {
+ "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
+ },
+ "es-en" :
+ {
+ "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
+ },
+ "es-es" :
+ {
+ "tts" : "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
+ },
+ "es-mx" :
+ {
+ "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
+ },
+ "fr-ca" :
+ {
+ "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
+ },
+ "fr-fr" :
+ {
+ "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
+ },
+ "it-it" :
+ {
+ "tts" : "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
+ },
+ "nl-nl" :
+ {
+ "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
+ },
+ "pl-pl" :
+ {
+ "tts" : "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
+ },
+ "pt-br" :
+ {
+ "tts" : "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
+ },
+ "pt-pt" :
+ {
+ "tts" : "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
+ },
+ "ru-ru" :
+ {
+ "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
+ },
+ "sv-se" :
+ {
+ "tts" : "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
+ },
+ "tr-tr" :
+ {
+ "tts" : "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
+ },
+ "zh-cn" :
+ {
+ "tts" : "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
+ },
+ "zh-tw" :
+ {
+ "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
+ }
+ }
+ },
+ "AppPermissionsRevoked" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "tts" : "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
+ },
+ "en-au" :
+ {
+ "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
+ },
+ "en-gb" :
+ {
+ "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
+ },
+ "en-ie" :
+ {
+ "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
+ },
+ "en-us" :
+ {
+ "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
+ },
+ "es-en" :
+ {
+ "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
+ },
+ "es-es" :
+ {
+ "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
+ },
+ "es-mx" :
+ {
+ "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
+ },
+ "fr-ca" :
+ {
+ "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
+ },
+ "fr-fr" :
+ {
+ "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
+ },
+ "it-it" :
+ {
+ "tts" : "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
+ },
+ "nl-nl" :
+ {
+ "tts" : "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
+ },
+ "pl-pl" :
+ {
+ "tts" : "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
+ },
+ "pt-br" :
+ {
+ "tts" : "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
+ },
+ "pt-pt" :
+ {
+ "tts" : "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
+ },
+ "ru-ru" :
+ {
+ "tts" : "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
+ },
+ "sv-se" :
+ {
+ "tts" : "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
+ },
+ "tr-tr" :
+ {
+ "tts" : "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
+ },
+ "zh-cn" :
+ {
+ "tts" : "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
+ },
+ "zh-tw" :
+ {
+ "tts" : "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
+ }
+ }
+ },
+ "AppUnauthorized" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "nicht autorisiert",
+ "tts" : "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren."
+ },
+ "en-au" :
+ {
+ "line1" : "not authorized",
+ "tts" : "This version of %appName% is not authorized and will not work with SYNC."
+ },
+ "en-gb" :
+ {
+ "line1" : "not authorized",
+ "textBody" : "This version of %appName% is not authorized and will not work with SYNC.",
+ "tts" : "This version of %appName% is not authorized and will not work with SYNC."
+ },
+ "en-ie" :
+ {
+ "line1" : "not authorized",
+ "tts" : "This version of %appName% is not authorized and will not work with SYNC."
+ },
+ "en-us" :
+ {
+ "line1" : "Not Authorized",
+ "textBody" : "This version of %appName% is no longer authorized to work with Mobile Apps. Please update to the latest version of %appName%.",
+ "tts" : "This version of %appName% is not authorized and will not work with SYNC."
+ },
+ "es-en" :
+ {
+ "line1" : "no autorizada",
+ "textBody" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
+ "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
+ },
+ "es-es" :
+ {
+ "line1" : "No autorizada",
+ "tts" : "Esta versión de %appName% no está autorizada y no funcionará con SYNC."
+ },
+ "es-mx" :
+ {
+ "line1" : "no autorizada",
+ "textBody" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
+ "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
+ },
+ "fr-ca" :
+ {
+ "line1" : "non autorisée",
+ "textBody" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
+ "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
+ },
+ "fr-fr" :
+ {
+ "line1" : "non autorisée",
+ "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
+ },
+ "it-it" :
+ {
+ "line1" : "non autorizzata",
+ "tts" : "Questa versione di %appName% non è autorizzata e non funziona con il SYNC."
+ },
+ "nl-nl" :
+ {
+ "line1" : "niet geautoriseerd",
+ "tts" : "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC."
+ },
+ "pl-pl" :
+ {
+ "line1" : "brak autoryzacji",
+ "tts" : "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC."
+ },
+ "pt-br" :
+ {
+ "line1" : "não autorizado",
+ "tts" : "Esta versão do %appName% não tem autorização e não funcionará com o SYNC."
+ },
+ "pt-pt" :
+ {
+ "line1" : "não autorizada",
+ "tts" : "Esta versão de %appName% não está autorizada e não funcionará com o SYNC."
+ },
+ "ru-ru" :
+ {
+ "line1" : "не авторизировано",
+ "tts" : "Эта версия %appName% не авторизирована и не будет работать с SYNC."
+ },
+ "sv-se" :
+ {
+ "line1" : "är ej godkänd",
+ "tts" : "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC."
+ },
+ "tr-tr" :
+ {
+ "line1" : "için izin yok",
+ "tts" : "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz."
+ },
+ "zh-cn" :
+ {
+ "line1" : "未得到授权",
+ "tts" : "此版本的%appName% 未得到授权,无法在SYNC上使用。"
+ },
+ "zh-tw" :
+ {
+ "line1" : "無授權",
+ "tts" : "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。"
+ }
+ }
+ },
+ "AppUnsupported" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "nicht unterstützt",
+ "tts" : "Diese Version von %appName% wird von SYNC nicht unterstützt."
+ },
+ "en-au" :
+ {
+ "line1" : "not supported",
+ "tts" : "This version of %appName% is not supported by SYNC."
+ },
+ "en-gb" :
+ {
+ "line1" : "not supported",
+ "textBody" : "This version of %appName% is not supported by SYNC.",
+ "tts" : "This version of %appName% is not supported by SYNC."
+ },
+ "en-ie" :
+ {
+ "line1" : "not supported",
+ "tts" : "This version of %appName% is not supported by SYNC."
+ },
+ "en-us" :
+ {
+ "line1" : "Not Supported",
+ "textBody" : "Your version of %appName% is not supported by SYNC.",
+ "tts" : "This version of %appName% is not supported by SYNC."
+ },
+ "es-en" :
+ {
+ "line1" : "no compatible",
+ "textBody" : "Esta versión de %appName% no es compatible con SYNC.",
+ "tts" : "Esta versión de %appName% no es compatible con SYNC."
+ },
+ "es-es" :
+ {
+ "line1" : "No compatible",
+ "tts" : "Esta versión de %appName% no es compatible con SYNC."
+ },
+ "es-mx" :
+ {
+ "line1" : "no compatible",
+ "textBody" : "Esta versión de %appName% no es compatible con SYNC.",
+ "tts" : "Esta versión de %appName% no es compatible con SYNC."
+ },
+ "fr-ca" :
+ {
+ "line1" : "incompatible",
+ "textBody" : "Cette version de %appName% n’est pas prise en charge par SYNC.",
+ "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
+ },
+ "fr-fr" :
+ {
+ "line1" : "incompatible",
+ "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
+ },
+ "it-it" :
+ {
+ "line1" : "non supportata",
+ "tts" : "Questa versione di %appName% non è supportata dal SYNC."
+ },
+ "nl-nl" :
+ {
+ "line1" : "niet ondersteund",
+ "tts" : "Deze versie van %appName% wordt niet ondersteund door SYNC."
+ },
+ "pl-pl" :
+ {
+ "line1" : "aplikacja nie obsług.",
+ "tts" : "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC."
+ },
+ "pt-br" :
+ {
+ "line1" : "não suportado",
+ "tts" : "Esta versão do %appName% não é suportada pelo SYNC."
+ },
+ "pt-pt" :
+ {
+ "line1" : "não suportada",
+ "tts" : "Esta versão de %appName% não é suportado pelo SYNC."
+ },
+ "ru-ru" :
+ {
+ "line1" : "не поддерживается",
+ "tts" : "Эта версия %appName% не поддерживается SYNC."
+ },
+ "sv-se" :
+ {
+ "line1" : "stöds ej",
+ "tts" : "SYNC har inte stöd för den här versionen av %appName%."
+ },
+ "tr-tr" :
+ {
+ "line1" : "desteklenmiyor",
+ "tts" : "Bu %appName% sürümü SYNC tarafından desteklenmiyor."
+ },
+ "zh-cn" :
+ {
+ "line1" : "不受支持",
+ "tts" : "SYNC不支持此版本的%appName%。"
+ },
+ "zh-tw" :
+ {
+ "line1" : "不支援",
+ "tts" : "SYNC 不支援此版本的%appName% 。"
+ }
+ }
+ },
+ "DataConsent" :
+ {
+ "languages" :
+ {
+ "en-gb" :
+ {
+ "textBody" : "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
+ },
+ "en-us" :
+ {
+ "line1" : "Enable Mobile Apps",
+ "line2" : "on SYNC? (Uses Data)",
+ "textBody" : "Would you like to enable Mobile Apps on SYNC?\r\n\r\nIf you enable the use of mobile apps from your mobile device on SYNC, you agree that SYNC can periodically use your device’s data plan to send and receive data that keeps your settings current and enables app functionality. Data sent to Ford U.S. includes your VIN and SYNC module number. Standard rates may apply.\r\n\r\nTo change settings or turn off later, visit the SYNC mobile apps settings menu. See Owner Guide for more information. I agree and consent."
+ },
+ "es-mx" :
+ {
+ "textBody" : "Si permite el uso de apps de su móvil vía SYNC®, acepta que SYNC® puede utilizar el plan de datos de su equipo para enviar y recibir info para actualizar su configuración y permitir la funcionalidad de la app. Datos enviados a Ford US incluyen VIN y # de módulo de SYNC®. Cargos a su plan de datos pueden aplicar. \r\n\r\nPara cambiar la config. de SYNC® o apagarlo, acceda a Menú de configuración de apps. Vea la Guía del Propietario para más info. Estoy de acuerdo y acepto lo anterior."
+ },
+ "fr-ca" :
+ {
+ "textBody" : "Si vous activez les applications mobiles sur SYNC, vous acceptez que SYNC utilise votre forfait de données afin de maintenir vos réglages à jour et assurer la pleine fonctionnalité. Parmi les données envoyées à Ford US, notons le NIV et le numéro de module SYNC. Des frais de base peuvent s’appliquer. \r\n\r\nPour modifier les réglages ou désactiver les applications, consultez le menu des réglages des applications de SYNC. Voir le Manuel du propriétaire. J’accepte et je consens."
+ }
+ }
+ },
+ "DataConsentHelp" :
+ {
+ "languages" :
+ {
+ "en-us" :
+ {
+ "textBody" : "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information."
+ },
+ "es-mx" :
+ {
+ "textBody" : "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
+ },
+ "fr-ca" :
+ {
+ "textBody" : "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
+ }
+ }
+ },
+ "DisableApps" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Auto-Update",
+ "line2" : "und Mobile Apps deaktivieren",
+ "tts" : "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen."
+ },
+ "en-au" :
+ {
+ "line1" : "Disable auto-updates",
+ "line2" : "and Mobile Apps?",
+ "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
+ },
+ "en-gb" :
+ {
+ "line1" : "Disable auto-updates",
+ "line2" : "and Mobile Apps?",
+ "textBody" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
+ "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
+ },
+ "en-ie" :
+ {
+ "line1" : "Disable auto-updates",
+ "line2" : "and Mobile Apps?",
+ "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
+ },
+ "en-us" :
+ {
+ "line1" : "Disable Auto-Updates",
+ "line2" : "and Mobile Apps?",
+ "textBody" : "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel.",
+ "tts" : "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
+ },
+ "es-en" :
+ {
+ "line1" : "¿Deshab. actualiz.",
+ "line2" : "autom. y aplic. móv.?",
+ "textBody" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
+ "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
+ },
+ "es-es" :
+ {
+ "line1" : "¿Desact. actual. auto",
+ "line2" : "y apl. móviles?",
+ "tts" : "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar."
+ },
+ "es-mx" :
+ {
+ "line1" : "¿Deshab. actualiz.",
+ "line2" : "autom. y aplic. móv.?",
+ "textBody" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
+ "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Désactiver màj autom.",
+ "line2" : "et app. mobiles?",
+ "textBody" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
+ "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
+ },
+ "fr-fr" :
+ {
+ "line1" : "Désactiver màj autom.",
+ "line2" : "et app. mobiles?",
+ "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
+ },
+ "it-it" :
+ {
+ "line1" : "Disabilitare agg. aut.",
+ "line2" : "e app mobili?",
+ "tts" : "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare."
+ },
+ "nl-nl" :
+ {
+ "line1" : "Auto-updates en mob.",
+ "line2" : "apps uitschakelen?",
+ "tts" : "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren."
+ },
+ "pl-pl" :
+ {
+ "line1" : "Wył. automat. aktual.",
+ "line2" : "i aplikacje mobilne?",
+ "tts" : "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować."
+ },
+ "pt-br" :
+ {
+ "line1" : "Desativar atualizações",
+ "line2" : "autom. e aplicativos?",
+ "tts" : "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Desact. actual. autom.",
+ "line2" : "e aplicações móveis?",
+ "tts" : "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Откл. автообновления",
+ "line2" : "и мобил. прилож.?",
+ "tts" : "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены."
+ },
+ "sv-se" :
+ {
+ "line1" : "Avaktiverar autouppdat.",
+ "line2" : "och mobilappar?",
+ "tts" : "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta."
+ },
+ "tr-tr" :
+ {
+ "line1" : "Oto. güncelleme ve",
+ "line2" : "mobil uygul. kapat?",
+ "tts" : "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın."
+ },
+ "zh-cn" :
+ {
+ "line1" : "是否禁用自动更新和",
+ "line2" : "移动应用程序?",
+ "tts" : "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。"
+ },
+ "zh-tw" :
+ {
+ "line1" : "停用自動更新",
+ "line2" : "和行動應用程式?",
+ "tts" : "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。"
+ }
+ }
+ },
+ "DrivingCharacteristics" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "label" : "Fahreigenschaften",
+ "tts" : "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus."
+ },
+ "en-au" :
+ {
+ "label" : "Driving characteristics",
+ "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
+ },
+ "en-gb" :
+ {
+ "label" : "Driving characteristics",
+ "textBody" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
+ "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
+ },
+ "en-ie" :
+ {
+ "label" : "Driving characteristics",
+ "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
+ },
+ "en-us" :
+ {
+ "label" : "Driving Characteristics",
+ "textBody" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM.",
+ "tts" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM."
+ },
+ "es-en" :
+ {
+ "label" : "Características del manejo",
+ "textBody" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
+ "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
+ },
+ "es-es" :
+ {
+ "label" : "Características de conducción",
+ "tts" : "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad."
+ },
+ "es-mx" :
+ {
+ "label" : "Características del manejo",
+ "textBody" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio.",
+ "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio."
+ },
+ "fr-ca" :
+ {
+ "label" : "Caractéristiques de conduite",
+ "textBody" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage.",
+ "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage."
+ },
+ "fr-fr" :
+ {
+ "label" : "Caractéristiques de conduite",
+ "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
+ },
+ "it-it" :
+ {
+ "label" : "Caratteristiche di guida",
+ "tts" : "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza."
+ },
+ "nl-nl" :
+ {
+ "label" : "Rijkenmerken",
+ "tts" : "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus."
+ },
+ "pl-pl" :
+ {
+ "label" : "Informacje dotyczące stylu jazdy",
+ "tts" : "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa."
+ },
+ "pt-br" :
+ {
+ "label" : "Características de condução",
+ "line1" : "Caract. Condução",
+ "tts" : "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança."
+ },
+ "pt-pt" :
+ {
+ "label" : "Características de condução",
+ "tts" : "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança."
+ },
+ "ru-ru" :
+ {
+ "label" : "Характеристики движения",
+ "tts" : "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности."
+ },
+ "sv-se" :
+ {
+ "label" : "Köregenskaper",
+ "tts" : "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus."
+ },
+ "tr-tr" :
+ {
+ "label" : "Sürüş karakteristikleri",
+ "tts" : "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu."
+ },
+ "zh-cn" :
+ {
+ "label" : "行驶特性",
+ "tts" : "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态"
+ },
+ "zh-tw" :
+ {
+ "label" : "駕駛特性",
+ "tts" : "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態"
+ }
+ }
+ },
+ "Location" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "label" : "GPS und Geschwindigkeit",
+ "tts" : "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs."
+ },
+ "en-au" :
+ {
+ "label" : "GPS and speed",
+ "tts" : "An app can access vehicle GPS and speed."
+ },
+ "en-gb" :
+ {
+ "label" : "GPS and speed",
+ "textBody" : "An app can access vehicle GPS and speed.",
+ "tts" : "An app can access vehicle GPS and speed."
+ },
+ "en-ie" :
+ {
+ "label" : "GPS and speed",
+ "tts" : "An app can access vehicle GPS and speed."
+ },
+ "en-us" :
+ {
+ "label" : "GPS and Speed",
+ "textBody" : "An app can access vehicle GPS and speed.",
+ "tts" : "An app can access vehicle GPS and speed."
+ },
+ "es-en" :
+ {
+ "label" : "GPS y velocidad",
+ "textBody" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
+ "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
+ },
+ "es-es" :
+ {
+ "label" : "GPS y velocidad",
+ "tts" : "Una aplicación puede acceder al GPS y la velocidad del vehículo."
+ },
+ "es-mx" :
+ {
+ "label" : "GPS y velocidad",
+ "textBody" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
+ "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
+ },
+ "fr-ca" :
+ {
+ "label" : "GPS et Vitesse",
+ "textBody" : "Une application peut accéder au GPS et à la vitesse du véhicule.",
+ "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
+ },
+ "fr-fr" :
+ {
+ "label" : "GPS et vitesse",
+ "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
+ },
+ "it-it" :
+ {
+ "label" : "GPS e velocità",
+ "tts" : "Un'app può avere accesso a GPS e velocità del veicolo."
+ },
+ "nl-nl" :
+ {
+ "label" : "Gps en snelheid",
+ "tts" : "Een app heeft toegang tot gps en de snelheid van het voertuig."
+ },
+ "pl-pl" :
+ {
+ "label" : "GPS i prędkość",
+ "tts" : "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu."
+ },
+ "pt-br" :
+ {
+ "label" : "GPS e velocidade",
+ "tts" : "Um aplicativo pode acessar o GPS e a velocidade do veículo."
+ },
+ "pt-pt" :
+ {
+ "label" : "GPS e velocidade",
+ "tts" : "Uma aplicação consegue aceder ao GPS e à velocidade do veículo."
+ },
+ "ru-ru" :
+ {
+ "label" : "GPS и скорость",
+ "tts" : "Приложение имеет доступ к GPS и скорости автомобиля."
+ },
+ "sv-se" :
+ {
+ "label" : "GPS och hastighet",
+ "tts" : "Appen kan komma åt fordonets GPS och hastighetsmätare."
+ },
+ "tr-tr" :
+ {
+ "label" : "GPS ve hız",
+ "tts" : "Bu uygulama aracın GPS ve hız bilgilerine erişebilir."
+ },
+ "zh-cn" :
+ {
+ "label" : "GPS 和车速",
+ "tts" : "移动应用程序可以访问车辆 GPS 和车速信息。"
+ },
+ "zh-tw" :
+ {
+ "label" : "GPS和車速",
+ "tts" : "應用程式可存取車輛的GPS和速度。"
+ }
+ }
+ },
+ "Notifications" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "label" : "Push-Benachrichtigungen",
+ "tts" : "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden."
+ },
+ "en-au" :
+ {
+ "label" : "Push notifications",
+ "tts" : "An app can send notifications when running in the background."
+ },
+ "en-gb" :
+ {
+ "label" : "Push notifications",
+ "textBody" : "An app can send notifications when running in the background.",
+ "tts" : "An app can send notifications when running in the background."
+ },
+ "en-ie" :
+ {
+ "label" : "Push notifications",
+ "tts" : "An app can send notifications when running in the background."
+ },
+ "en-us" :
+ {
+ "label" : "Push Notifications",
+ "textBody" : "An app can send notifications when running in the background.",
+ "tts" : "An app can send notifications when running in the background."
+ },
+ "es-en" :
+ {
+ "label" : "Notificaciones tipo Push",
+ "textBody" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
+ "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
+ },
+ "es-es" :
+ {
+ "label" : "Notificaciones push",
+ "tts" : "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano."
+ },
+ "es-mx" :
+ {
+ "label" : "Notificaciones tipo Push",
+ "textBody" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
+ "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
+ },
+ "fr-ca" :
+ {
+ "label" : "Notifications Instantanées",
+ "textBody" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
+ "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
+ },
+ "fr-fr" :
+ {
+ "label" : "Notifications push",
+ "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
+ },
+ "it-it" :
+ {
+ "label" : "Notifiche push",
+ "tts" : "Un'app può inviare notifiche se eseguita in background."
+ },
+ "nl-nl" :
+ {
+ "label" : "Push-meldingen",
+ "tts" : "Een app kan meldingen versturen als deze op de achtergrond actief is."
+ },
+ "pl-pl" :
+ {
+ "label" : "Powiadomienia Push",
+ "tts" : "Aplikacja może wysyłać powiadomienia, działając w tle."
+ },
+ "pt-br" :
+ {
+ "label" : "Notificações Push",
+ "line1" : "Notificações",
+ "tts" : "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano."
+ },
+ "pt-pt" :
+ {
+ "label" : "Notificações push",
+ "tts" : "Uma aplicação consegue enviar notificações quando está activa em segundo plano."
+ },
+ "ru-ru" :
+ {
+ "label" : "Оповещения о пересылке",
+ "tts" : "Если приложение работает в фоновом режиме, оно может отправлять оповещения."
+ },
+ "sv-se" :
+ {
+ "label" : "Push-notiser",
+ "tts" : "Appen kan skicka meddelanden när den körs i bakgrunden."
+ },
+ "tr-tr" :
+ {
+ "label" : "Anlık bildirimleri",
+ "tts" : "Bir uygulama arka planda çalışırken bildirim gönderebilir."
+ },
+ "zh-cn" :
+ {
+ "label" : "推送通知",
+ "tts" : "移动应用程序在后台运行时可推送通知。"
+ },
+ "zh-tw" :
+ {
+ "label" : "傳送通知",
+ "tts" : "車輛行進時,應用程式可在背景中傳送通知。"
+ }
+ }
+ },
+ "SettingAppPermissions" :
+ {
+ "languages" :
+ {
+ "en-us" :
+ {
+ "textBody" : "Change %AppName%’s functionality and use of data as described below. See App terms of service and privacy policies."
+ },
+ "es-mx" :
+ {
+ "textBody" : "Para cambiar la funcionalidad de %appName% y usar los datos como se describe más adelante. Consulte los términos de servicio y políticas de privacidad de la App."
+ },
+ "fr-ca" :
+ {
+ "textBody" : "Pour modifier la fonctionnalité de %appName% et l’usage des données comme décrit ci-dessous. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application."
+ }
+ }
+ },
+ "SettingDisableUpdates" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Updates deakt."
+ },
+ "en-au" :
+ {
+ "line1" : "Disable updates"
+ },
+ "en-gb" :
+ {
+ "line1" : "Disable updates"
+ },
+ "en-ie" :
+ {
+ "line1" : "Disable updates"
+ },
+ "en-us" :
+ {
+ "line1" : "Disable Updates",
+ "textBody" : "Disable Updates"
+ },
+ "es-en" :
+ {
+ "line1" : "Deshab. actual.",
+ "textBody" : "Deshab. actual."
+ },
+ "es-es" :
+ {
+ "line1" : "Desact. actual."
+ },
+ "es-mx" :
+ {
+ "line1" : "Deshab. actual.",
+ "textBody" : "Deshab. actual."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Désactiver MAJ",
+ "textBody" : "Désactiver MAJ"
+ },
+ "fr-fr" :
+ {
+ "line1" : "Désactiver màj"
+ },
+ "it-it" :
+ {
+ "line1" : "Disabilita agg."
+ },
+ "nl-nl" :
+ {
+ "line1" : "Upd. uitschak."
+ },
+ "pl-pl" :
+ {
+ "line1" : "Wyłącz aktual."
+ },
+ "pt-br" :
+ {
+ "line1" : "Desat. atualiz."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Desact. actualiz."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Откл. обновл."
+ },
+ "sv-se" :
+ {
+ "line1" : "Inaktivera uppd."
+ },
+ "tr-tr" :
+ {
+ "line1" : "Güncell. Kapat"
+ },
+ "zh-cn" :
+ {
+ "line1" : "禁用更新"
+ },
+ "zh-tw" :
+ {
+ "line1" : "停用更新"
+ }
+ }
+ },
+ "SettingEnableUpdates" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Apps aktivieren"
+ },
+ "en-au" :
+ {
+ "line1" : "Enable Apps"
+ },
+ "en-gb" :
+ {
+ "line1" : "Enable Apps"
+ },
+ "en-ie" :
+ {
+ "line1" : "Enable Apps"
+ },
+ "en-us" :
+ {
+ "line1" : "Enable Apps"
+ },
+ "es-en" :
+ {
+ "line1" : "Hab. aplic."
+ },
+ "es-es" :
+ {
+ "line1" : "Activar apl."
+ },
+ "es-mx" :
+ {
+ "line1" : "Hab. aplic."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Activer app.",
+ "textBody" : "Activer app."
+ },
+ "fr-fr" :
+ {
+ "line1" : "Activer app."
+ },
+ "it-it" :
+ {
+ "line1" : "Abilita app"
+ },
+ "nl-nl" :
+ {
+ "line1" : "Apps inschak."
+ },
+ "pl-pl" :
+ {
+ "line1" : "Włącz aplikacje"
+ },
+ "pt-br" :
+ {
+ "line1" : "Ativar aplic."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Activar actualiz."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Вкл. прилож."
+ },
+ "sv-se" :
+ {
+ "line1" : "Aktivera appar"
+ },
+ "tr-tr" :
+ {
+ "line1" : "Uygulamaları aç"
+ },
+ "zh-cn" :
+ {
+ "line1" : "启用应用程序"
+ },
+ "zh-tw" :
+ {
+ "line1" : "啟用應用程式"
+ }
+ }
+ },
+ "SettingUpdateAuto" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Update anford."
+ },
+ "en-au" :
+ {
+ "line1" : "Request update"
+ },
+ "en-gb" :
+ {
+ "line1" : "Request update"
+ },
+ "en-ie" :
+ {
+ "line1" : "Request update"
+ },
+ "en-us" :
+ {
+ "line1" : "Request Update",
+ "textBody" : "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
+ },
+ "es-en" :
+ {
+ "line1" : "Solicit. actualiz.",
+ "textBody" : "Solicit. actualiz."
+ },
+ "es-es" :
+ {
+ "line1" : "Solicitar actual."
+ },
+ "es-mx" :
+ {
+ "line1" : "Solicit. actualiz.",
+ "textBody" : "Solicit. actualiz."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Demander MAJ",
+ "textBody" : "Demander MAJ"
+ },
+ "fr-fr" :
+ {
+ "line1" : "Demander màj"
+ },
+ "it-it" :
+ {
+ "line1" : "Rich. aggiorn."
+ },
+ "nl-nl" :
+ {
+ "line1" : "Upd. aanvragen"
+ },
+ "pl-pl" :
+ {
+ "line1" : "Zażądaj aktual."
+ },
+ "pt-br" :
+ {
+ "line1" : "Solicitar atualiz."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Solicit. actualiz."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Запрос на обн."
+ },
+ "sv-se" :
+ {
+ "line1" : "Begär uppdat."
+ },
+ "tr-tr" :
+ {
+ "line1" : "Güncelleme iste"
+ },
+ "zh-cn" :
+ {
+ "line1" : "请求更新"
+ },
+ "zh-tw" :
+ {
+ "line1" : "請求更新"
+ }
+ }
+ },
+ "StatusNeeded" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Update benötigt"
+ },
+ "en-au" :
+ {
+ "line1" : "Update needed"
+ },
+ "en-gb" :
+ {
+ "line1" : "Update needed",
+ "textBody" : "Update needed"
+ },
+ "en-ie" :
+ {
+ "line1" : "Update needed"
+ },
+ "en-us" :
+ {
+ "line1" : "Update Needed",
+ "textBody" : "Update Needed"
+ },
+ "es-en" :
+ {
+ "line1" : "Actualiz. neces.",
+ "textBody" : "Actualiz. neces."
+ },
+ "es-es" :
+ {
+ "line1" : "Actu. necesaria"
+ },
+ "es-mx" :
+ {
+ "line1" : "Actualiz. neces.",
+ "textBody" : "Actualiz. neces."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Màj requise",
+ "textBody" : "Màj requise"
+ },
+ "fr-fr" :
+ {
+ "line1" : "Mise à jour requise"
+ },
+ "it-it" :
+ {
+ "line1" : "Necess. aggiorn."
+ },
+ "nl-nl" :
+ {
+ "line1" : "Update nodig"
+ },
+ "pl-pl" :
+ {
+ "line1" : "Potrzeba aktual."
+ },
+ "pt-br" :
+ {
+ "line1" : "Atualiz. necess."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Actual. necess."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Необх. обновл."
+ },
+ "sv-se" :
+ {
+ "line1" : "Uppdat. krävs"
+ },
+ "tr-tr" :
+ {
+ "line1" : "Güncellenmeli"
+ },
+ "zh-cn" :
+ {
+ "line1" : "需要进行更新"
+ },
+ "zh-tw" :
+ {
+ "line1" : "需更新"
+ }
+ }
+ },
+ "StatusPending" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Aktualisieren..."
+ },
+ "en-au" :
+ {
+ "line1" : "Updating..."
+ },
+ "en-gb" :
+ {
+ "line1" : "Updating...",
+ "textBody" : "Updating..."
+ },
+ "en-ie" :
+ {
+ "line1" : "Updating..."
+ },
+ "en-us" :
+ {
+ "line1" : "Updating...",
+ "textBody" : "Updating..."
+ },
+ "es-en" :
+ {
+ "line1" : "Actualizando...",
+ "textBody" : "Actualizando..."
+ },
+ "es-es" :
+ {
+ "line1" : "Actualizando..."
+ },
+ "es-mx" :
+ {
+ "line1" : "Actualizando...",
+ "textBody" : "Actualizando..."
+ },
+ "fr-ca" :
+ {
+ "line1" : "MAJ en cours...",
+ "textBody" : "MAJ en cours..."
+ },
+ "fr-fr" :
+ {
+ "line1" : "Màj en cours..."
+ },
+ "it-it" :
+ {
+ "line1" : "Aggiornamento"
+ },
+ "nl-nl" :
+ {
+ "line1" : "Updaten..."
+ },
+ "pl-pl" :
+ {
+ "line1" : "Aktualizowanie"
+ },
+ "pt-br" :
+ {
+ "line1" : "Atualizando..."
+ },
+ "pt-pt" :
+ {
+ "line1" : "A actualizar..."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Обновление..."
+ },
+ "sv-se" :
+ {
+ "line1" : "Uppdaterar..."
+ },
+ "tr-tr" :
+ {
+ "line1" : "Güncelleniyor..."
+ },
+ "zh-cn" :
+ {
+ "line1" : "正在更新......"
+ },
+ "zh-tw" :
+ {
+ "line1" : "更新中..."
+ }
+ }
+ },
+ "StatusUpToDate" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Aktuelle Version"
+ },
+ "en-au" :
+ {
+ "line1" : "Up-to-date"
+ },
+ "en-gb" :
+ {
+ "line1" : "Up-to-date",
+ "textBody" : "Up-to-date"
+ },
+ "en-ie" :
+ {
+ "line1" : "Up-to-date"
+ },
+ "en-us" :
+ {
+ "line1" : "Up-To-Date",
+ "textBody" : "Up-To-Date"
+ },
+ "es-en" :
+ {
+ "line1" : "Actualizado",
+ "textBody" : "Actualizado"
+ },
+ "es-es" :
+ {
+ "line1" : "Actualizada"
+ },
+ "es-mx" :
+ {
+ "line1" : "Actualizado",
+ "textBody" : "Actualizado"
+ },
+ "fr-ca" :
+ {
+ "line1" : "Déjà à jour",
+ "textBody" : "Déjà à jour"
+ },
+ "fr-fr" :
+ {
+ "line1" : "Déjà à jour"
+ },
+ "it-it" :
+ {
+ "line1" : "più recente"
+ },
+ "nl-nl" :
+ {
+ "line1" : "Up-to-date"
+ },
+ "pl-pl" :
+ {
+ "line1" : "Aktualne"
+ },
+ "pt-br" :
+ {
+ "line1" : "Atualizado"
+ },
+ "pt-pt" :
+ {
+ "line1" : "Actualizado"
+ },
+ "ru-ru" :
+ {
+ "line1" : "Обновлено"
+ },
+ "sv-se" :
+ {
+ "line1" : "Uppdat. krävs ej"
+ },
+ "tr-tr" :
+ {
+ "line1" : "Güncel"
+ },
+ "zh-cn" :
+ {
+ "line1" : "最新更新"
+ },
+ "zh-tw" :
+ {
+ "line1" : "更新最新"
+ }
+ }
+ },
+ "VehicleInfo" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "label" : "Fahrzeuginformationen",
+ "tts" : "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck."
+ },
+ "en-au" :
+ {
+ "label" : "Vehicle information",
+ "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
+ },
+ "en-gb" :
+ {
+ "label" : "Vehicle information",
+ "textBody" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
+ "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
+ },
+ "en-ie" :
+ {
+ "label" : "Vehicle information",
+ "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
+ },
+ "en-us" :
+ {
+ "label" : "Vehicle Information",
+ "textBody" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure.",
+ "tts" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure."
+ },
+ "es-en" :
+ {
+ "label" : "Información del vehículo",
+ "textBody" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
+ "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
+ },
+ "es-es" :
+ {
+ "label" : "Información del vehículo",
+ "tts" : "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos."
+ },
+ "es-mx" :
+ {
+ "label" : "Información del Vehículo",
+ "textBody" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos.",
+ "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos."
+ },
+ "fr-ca" :
+ {
+ "label" : "Renseignements du Véhicule",
+ "textBody" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus.",
+ "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus."
+ },
+ "fr-fr" :
+ {
+ "label" : "Renseignements du véhicule",
+ "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus."
+ },
+ "it-it" :
+ {
+ "label" : "Informazioni sul veicolo",
+ "tts" : "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici."
+ },
+ "nl-nl" :
+ {
+ "label" : "Voertuiginformatie",
+ "tts" : "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning."
+ },
+ "pl-pl" :
+ {
+ "label" : "Informacje o pojeździe",
+ "tts" : "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon."
+ },
+ "pt-br" :
+ {
+ "label" : "Informações sobre o veículo",
+ "line1" : "Inform. Veículo",
+ "tts" : "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus."
+ },
+ "pt-pt" :
+ {
+ "label" : "Informações do veículo",
+ "tts" : "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus."
+ },
+ "ru-ru" :
+ {
+ "label" : "Информация об автомобиле",
+ "tts" : "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин."
+ },
+ "sv-se" :
+ {
+ "label" : "Fordonsinformation",
+ "tts" : "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck."
+ },
+ "tr-tr" :
+ {
+ "label" : "Araç bilgisi",
+ "tts" : "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı."
+ },
+ "zh-cn" :
+ {
+ "label" : "车辆信息",
+ "tts" : "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压."
+ },
+ "zh-tw" :
+ {
+ "label" : "車輛資訊",
+ "tts" : "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓."
+ }
+ }
+ }
+ },
+ "version" : "001.001.023"
+ },
+ "functional_groupings" :
+ {
+ "BackgroundAPT" :
+ {
+ "rpcs" :
+ {
+ "EndAudioPassThru" :
+ {
+ "hmi_levels" : [ "BACKGROUND" ]
+ },
+ "OnAudioPassThru" :
+ {
+ "hmi_levels" : [ "BACKGROUND" ]
+ },
+ "PerformAudioPassThru" :
+ {
+ "hmi_levels" : [ "BACKGROUND" ]
+ }
+ }
+ },
+ "Base-4" :
+ {
+ "rpcs" :
+ {
+ "AddCommand" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "AddSubMenu" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "Alert" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ },
+ "ChangeRegistration" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "CreateInteractionChoiceSet" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "DeleteCommand" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "DeleteFile" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "DeleteInteractionChoiceSet" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "DeleteSubMenu" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "EncodedSyncPData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "EndAudioPassThru" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "GenericResponse" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "ListFiles" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnAppInterfaceUnregistered" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnAudioPassThru" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "OnButtonEvent" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "OnButtonPress" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "OnCommand" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "OnDriverDistraction" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "OnEncodedSyncPData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnHMIStatus" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnHashChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnLanguageChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnPermissionsChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnSystemRequest" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "PerformAudioPassThru" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ },
+ "PerformInteraction" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ },
+ "PutFile" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "RegisterAppInterface" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "ResetGlobalProperties" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "ScrollableMessage" :
+ {
+ "hmi_levels" : [ "FULL" ]
+ },
+ "SetAppIcon" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetDisplayLayout" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetGlobalProperties" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetMediaClockTimer" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "Show" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "Slider" :
+ {
+ "hmi_levels" : [ "FULL" ]
+ },
+ "Speak" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ },
+ "SubscribeButton" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "SystemRequest" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "UnregisterAppInterface" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "UnsubscribeButton" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "BaseBeforeDataConsent" :
+ {
+ "rpcs" :
+ {
+ "ChangeRegistration" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "DeleteFile" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "EncodedSyncPData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "ListFiles" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnAppInterfaceUnregistered" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnEncodedSyncPData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnHMIStatus" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnHashChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnLanguageChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnPermissionsChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnSystemRequest" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "PutFile" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "RegisterAppInterface" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "ResetGlobalProperties" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetAppIcon" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetDisplayLayout" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetGlobalProperties" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SystemRequest" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "UnregisterAppInterface" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ }
+ }
+ },
+ "DataConsent-2" :
+ {
+ "rpcs" : null,
+ "user_consent_prompt" : "DataConsent"
+ },
+ "DiagnosticMessageOnly" :
+ {
+ "rpcs" :
+ {
+ "DiagnosticMessage" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "DialNumberOnly" :
+ {
+ "rpcs" :
+ {
+ "DialNumber" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "DrivingCharacteristics-3" :
+ {
+ "rpcs" :
+ {
+ "GetVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "accPedalPosition",
+ "beltStatus",
+ "electronicParkBrakeStatus",
+ "driverBraking",
+ "myKey",
+ "prndl",
+ "rpm",
+ "steeringWheelAngle",
+ "handsOffSteering"
+ ]
+ },
+ "OnVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "accPedalPosition",
+ "beltStatus",
+ "electronicParkBrakeStatus",
+ "driverBraking",
+ "myKey",
+ "prndl",
+ "rpm",
+ "steeringWheelAngle",
+ "handsOffSteering"
+ ]
+ },
+ "SubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "accPedalPosition",
+ "beltStatus",
+ "electronicParkBrakeStatus",
+ "driverBraking",
+ "myKey",
+ "prndl",
+ "rpm",
+ "steeringWheelAngle",
+ "handsOffSteering"
+ ]
+ },
+ "UnsubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "accPedalPosition",
+ "beltStatus",
+ "electronicParkBrakeStatus",
+ "driverBraking",
+ "myKey",
+ "prndl",
+ "rpm",
+ "steeringWheelAngle",
+ "handsOffSteering"
+ ]
+ }
+ },
+ "user_consent_prompt" : "DrivingCharacteristics"
+ },
+ "Emergency-1" :
+ {
+ "rpcs" :
+ {
+ "GetVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "airbagStatus", "clusterModeStatus", "eCallInfo", "emergencyEvent" ]
+ },
+ "OnVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "airbagStatus", "clusterModeStatus", "eCallInfo", "emergencyEvent" ]
+ },
+ "SubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "airbagStatus", "clusterModeStatus", "eCallInfo", "emergencyEvent" ]
+ },
+ "UnsubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "airbagStatus", "clusterModeStatus", "eCallInfo", "emergencyEvent" ]
+ }
+ }
+ },
+ "Location-1" :
+ {
+ "rpcs" :
+ {
+ "GetVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "gps", "speed" ]
+ },
+ "OnVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "gps", "speed" ]
+ },
+ "SubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "gps", "speed" ]
+ },
+ "UnsubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "gps", "speed" ]
+ }
+ },
+ "user_consent_prompt" : "Location"
+ },
+ "Navigation-1" :
+ {
+ "rpcs" :
+ {
+ "AlertManeuver" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "ShowConstantTBT" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "UpdateTurnList" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "Notifications" :
+ {
+ "rpcs" :
+ {
+ "Alert" :
+ {
+ "hmi_levels" : [ "BACKGROUND" ]
+ }
+ },
+ "user_consent_prompt" : "Notifications"
+ },
+ "Notifications-45" :
+ {
+ "rpcs" :
+ {
+ "MWTAA" :
+ {
+ "hmi_levels" : [ "LIMITED" ]
+ }
+ },
+ "user_consent_prompt" : "Notifications-45"
+ },
+ "Notifications-73" :
+ {
+ "rpcs" :
+ {
+ "STEHV" :
+ {
+ "hmi_levels" : [ "FULL" ]
+ }
+ },
+ "user_consent_prompt" : "Notifications-73"
+ },
+ "OnKeyboardInputOnlyGroup" :
+ {
+ "rpcs" :
+ {
+ "OnKeyboardInput" :
+ {
+ "hmi_levels" : [ "FULL" ]
+ }
+ }
+ },
+ "OnTouchEventOnlyGroup" :
+ {
+ "rpcs" :
+ {
+ "OnTouchEvent" :
+ {
+ "hmi_levels" : [ "FULL" ]
+ }
+ }
+ },
+ "PropriataryData-1" :
+ {
+ "rpcs" :
+ {
+ "DiagnosticMessage" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "GetDTCs" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "ReadDID" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "PropriataryData-2" :
+ {
+ "rpcs" :
+ {
+ "DiagnosticMessage" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "GetDTCs" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "ReadDID" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "ProprietaryData-3" :
+ {
+ "rpcs" :
+ {
+ "GetDTCs" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "ReadDID" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "SendLocation" :
+ {
+ "rpcs" :
+ {
+ "SendLocation" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "SendLocationOnly" :
+ {
+ "rpcs" :
+ {
+ "SendLocation" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "VehicleInfo-3" :
+ {
+ "rpcs" :
+ {
+ "GetVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "bodyInformation",
+ "deviceStatus",
+ "engineOilLife",
+ "engineTorque",
+ "externalTemperature",
+ "turnSignal",
+ "fuelLevel",
+ "fuelLevel_State",
+ "headLampStatus",
+ "instantFuelConsumption",
+ "fuelRange",
+ "cloudAppVehicleID",
+ "odometer",
+ "tirePressure",
+ "vin",
+ "wiperStatus",
+ "stabilityControlsStatus"
+ ]
+ },
+ "OnVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "bodyInformation",
+ "deviceStatus",
+ "engineOilLife",
+ "engineTorque",
+ "externalTemperature",
+ "turnSignal",
+ "fuelLevel",
+ "fuelLevel_State",
+ "headLampStatus",
+ "instantFuelConsumption",
+ "fuelRange",
+ "cloudAppVehicleID",
+ "odometer",
+ "tirePressure",
+ "vin",
+ "wiperStatus",
+ "stabilityControlsStatus"
+ ]
+ },
+ "SubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "bodyInformation",
+ "deviceStatus",
+ "engineOilLife",
+ "engineTorque",
+ "externalTemperature",
+ "turnSignal",
+ "fuelLevel",
+ "fuelLevel_State",
+ "headLampStatus",
+ "instantFuelConsumption",
+ "fuelRange",
+ "cloudAppVehicleID",
+ "odometer",
+ "tirePressure",
+ "wiperStatus",
+ "stabilityControlsStatus"
+ ]
+ },
+ "UnsubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "bodyInformation",
+ "deviceStatus",
+ "engineOilLife",
+ "engineTorque",
+ "externalTemperature",
+ "turnSignal",
+ "fuelLevel",
+ "fuelLevel_State",
+ "headLampStatus",
+ "instantFuelConsumption",
+ "fuelRange",
+ "cloudAppVehicleID",
+ "odometer",
+ "tirePressure",
+ "wiperStatus",
+ "stabilityControlsStatus"
+ ]
+ }
+ },
+ "user_consent_prompt" : "VehicleInfo"
+ }
+ },
+ "module_config" :
+ {
+ "endpoints" :
+ {
+ "0x04" :
+ {
+ "default" : [ "http://x.x.x.x:3000/api/1/softwareUpdate" ]
+ },
+ "0x07" :
+ {
+ "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
+ }
+ },
+ "exchange_after_x_days" : 20,
+ "exchange_after_x_ignition_cycles" : 100,
+ "exchange_after_x_kilometers" : 1800,
+ "notifications_per_minute_by_priority" :
+ {
+ "COMMUNICATION" : 6,
+ "EMERGENCY" : 60,
+ "NAVIGATION" : 15,
+ "PROJECTION" : 15,
+ "NONE" : 0,
+ "NORMAL" : 4,
+ "VOICECOM" : 20
+ },
+ "subtle_notifications_per_minute_by_priority":
+ {
+ "COMMUNICATION": 15,
+ "EMERGENCY": 60,
+ "NAVIGATION": 20,
+ "PROJECTION": 20,
+ "NONE": 0,
+ "NORMAL": 10,
+ "VOICECOM": 30
+ },
+ "preloaded_date" : "2012-12-15",
+ "preloaded_pt" : true,
+ "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
+ "timeout_after_x_seconds" : 60
+ }
+ }
+}
diff --git a/src/components/policy/policy_external/test/json/sdl_preloaded_pt_for_merge_latest.json b/src/components/policy/policy_external/test/json/sdl_preloaded_pt_for_merge_latest.json
new file mode 100644
index 0000000000..81c2093c72
--- /dev/null
+++ b/src/components/policy/policy_external/test/json/sdl_preloaded_pt_for_merge_latest.json
@@ -0,0 +1,2448 @@
+
+{
+ "policy_table" :
+ {
+ "app_policies" :
+ {
+ "default" :
+ {
+ "default_hmi" : "NONE",
+ "groups" : [ "Base-4" ],
+ "keep_context" : false,
+ "priority" : "NONE",
+ "steal_focus" : false
+ },
+ "device" :
+ {
+ "default_hmi" : "NONE",
+ "groups" : [ "DataConsent-2" ],
+ "keep_context" : false,
+ "priority" : "NONE",
+ "steal_focus" : false
+ },
+ "pre_DataConsent" :
+ {
+ "default_hmi" : "BACKGROUND",
+ "groups" : [ "BaseBeforeDataConsent" ],
+ "keep_context" : false,
+ "priority" : "EMERGENCY",
+ "steal_focus" : false
+ }
+ },
+ "consumer_friendly_messages" :
+ {
+ "messages" :
+ {
+ "AppPermissions" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Zugriffsanfrage(n)",
+ "line2" : "erlauben?",
+ "tts" : "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
+ },
+ "en-au" :
+ {
+ "line1" : "Grant requested",
+ "line2" : "permission(s)?",
+ "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
+ },
+ "en-gb" :
+ {
+ "line1" : "Grant requested",
+ "line2" : "permission(s)?",
+ "textBody" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu.",
+ "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny."
+ },
+ "en-ie" :
+ {
+ "line1" : "Grant requested",
+ "line2" : "permission(s)?",
+ "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
+ },
+ "en-us" :
+ {
+ "line1" : "Grant Requested",
+ "line2" : "Permission(s)?",
+ "textBody" : "The %appName% App is requesting permission to use the following: %functionalGroupLabels%.\r\n\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. I agree and consent.",
+ "tts" : "%appName% is requesting permission to use the following: %functionalGroupLabels%.\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. Please press yes to allow or no to deny."
+ },
+ "es-en" :
+ {
+ "line1" : "¿Otorgar permiso(s)",
+ "line2" : "solicitado(s)?",
+ "textBody" : "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior.",
+ "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
+ },
+ "es-es" :
+ {
+ "line1" : "¿Conceder permisos",
+ "line2" : "solicitados?",
+ "tts" : "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar."
+ },
+ "es-mx" :
+ {
+ "line1" : "¿Otorgar permiso(s)",
+ "line2" : "solicitado(s)?",
+ "textBody" : "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior.",
+ "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Accorder permission(s)",
+ "line2" : "demandée(s)",
+ "textBody" : "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\n\r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. J’accepte et je consens.",
+ "tts" : "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
+ },
+ "fr-fr" :
+ {
+ "line1" : "Accorder permission(s)",
+ "line2" : "demandée(s)",
+ "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
+ },
+ "it-it" :
+ {
+ "line1" : "Concedi autorizzaz.",
+ "line2" : "richiesta(e)?",
+ "tts" : "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare."
+ },
+ "nl-nl" :
+ {
+ "line1" : "Aangevraagde",
+ "line2" : "permissie(s) verlenen?",
+ "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren."
+ },
+ "pl-pl" :
+ {
+ "line1" : "Udzielić żądanych",
+ "line2" : "pozwoleń?",
+ "tts" : "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania."
+ },
+ "pt-br" :
+ {
+ "line1" : "Conceder permissão",
+ "line2" : "solicitada?",
+ "tts" : "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Conceder permiss.",
+ "line2" : "solicitada(s)?",
+ "tts" : "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Предост. заправш.",
+ "line2" : "разрешения?",
+ "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны."
+ },
+ "sv-se" :
+ {
+ "line1" : "Vill du ge",
+ "line2" : "tillstånd?",
+ "tts" : "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka."
+ },
+ "tr-tr" :
+ {
+ "line1" : "İstenen izinler",
+ "line2" : "verilsin mi?",
+ "tts" : "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın."
+ },
+ "zh-cn" :
+ {
+ "line1" : "是否允许请求的",
+ "line2" : "权限?",
+ "tts" : "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。"
+ },
+ "zh-tw" :
+ {
+ "line1" : "允許",
+ "line2" : "授權請求?",
+ "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。"
+ }
+ }
+ },
+ "AppPermissionsHelp" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "tts" : "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
+ },
+ "en-au" :
+ {
+ "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
+ },
+ "en-gb" :
+ {
+ "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
+ },
+ "en-ie" :
+ {
+ "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
+ },
+ "en-us" :
+ {
+ "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
+ },
+ "es-en" :
+ {
+ "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
+ },
+ "es-es" :
+ {
+ "tts" : "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
+ },
+ "es-mx" :
+ {
+ "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
+ },
+ "fr-ca" :
+ {
+ "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
+ },
+ "fr-fr" :
+ {
+ "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
+ },
+ "it-it" :
+ {
+ "tts" : "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
+ },
+ "nl-nl" :
+ {
+ "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
+ },
+ "pl-pl" :
+ {
+ "tts" : "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
+ },
+ "pt-br" :
+ {
+ "tts" : "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
+ },
+ "pt-pt" :
+ {
+ "tts" : "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
+ },
+ "ru-ru" :
+ {
+ "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
+ },
+ "sv-se" :
+ {
+ "tts" : "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
+ },
+ "tr-tr" :
+ {
+ "tts" : "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
+ },
+ "zh-cn" :
+ {
+ "tts" : "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
+ },
+ "zh-tw" :
+ {
+ "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
+ }
+ }
+ },
+ "AppPermissionsRevoked" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "tts" : "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
+ },
+ "en-au" :
+ {
+ "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
+ },
+ "en-gb" :
+ {
+ "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
+ },
+ "en-ie" :
+ {
+ "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
+ },
+ "en-us" :
+ {
+ "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
+ },
+ "es-en" :
+ {
+ "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
+ },
+ "es-es" :
+ {
+ "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
+ },
+ "es-mx" :
+ {
+ "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
+ },
+ "fr-ca" :
+ {
+ "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
+ },
+ "fr-fr" :
+ {
+ "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
+ },
+ "it-it" :
+ {
+ "tts" : "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
+ },
+ "nl-nl" :
+ {
+ "tts" : "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
+ },
+ "pl-pl" :
+ {
+ "tts" : "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
+ },
+ "pt-br" :
+ {
+ "tts" : "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
+ },
+ "pt-pt" :
+ {
+ "tts" : "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
+ },
+ "ru-ru" :
+ {
+ "tts" : "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
+ },
+ "sv-se" :
+ {
+ "tts" : "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
+ },
+ "tr-tr" :
+ {
+ "tts" : "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
+ },
+ "zh-cn" :
+ {
+ "tts" : "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
+ },
+ "zh-tw" :
+ {
+ "tts" : "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
+ }
+ }
+ },
+ "AppUnauthorized" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "nicht autorisiert",
+ "tts" : "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren."
+ },
+ "en-au" :
+ {
+ "line1" : "not authorized",
+ "tts" : "This version of %appName% is not authorized and will not work with SYNC."
+ },
+ "en-gb" :
+ {
+ "line1" : "not authorized",
+ "textBody" : "This version of %appName% is not authorized and will not work with SYNC.",
+ "tts" : "This version of %appName% is not authorized and will not work with SYNC."
+ },
+ "en-ie" :
+ {
+ "line1" : "not authorized",
+ "tts" : "This version of %appName% is not authorized and will not work with SYNC."
+ },
+ "en-us" :
+ {
+ "line1" : "Not Authorized",
+ "textBody" : "This version of %appName% is no longer authorized to work with Mobile Apps. Please update to the latest version of %appName%.",
+ "tts" : "This version of %appName% is not authorized and will not work with SYNC."
+ },
+ "es-en" :
+ {
+ "line1" : "no autorizada",
+ "textBody" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
+ "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
+ },
+ "es-es" :
+ {
+ "line1" : "No autorizada",
+ "tts" : "Esta versión de %appName% no está autorizada y no funcionará con SYNC."
+ },
+ "es-mx" :
+ {
+ "line1" : "no autorizada",
+ "textBody" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
+ "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
+ },
+ "fr-ca" :
+ {
+ "line1" : "non autorisée",
+ "textBody" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
+ "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
+ },
+ "fr-fr" :
+ {
+ "line1" : "non autorisée",
+ "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
+ },
+ "it-it" :
+ {
+ "line1" : "non autorizzata",
+ "tts" : "Questa versione di %appName% non è autorizzata e non funziona con il SYNC."
+ },
+ "nl-nl" :
+ {
+ "line1" : "niet geautoriseerd",
+ "tts" : "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC."
+ },
+ "pl-pl" :
+ {
+ "line1" : "brak autoryzacji",
+ "tts" : "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC."
+ },
+ "pt-br" :
+ {
+ "line1" : "não autorizado",
+ "tts" : "Esta versão do %appName% não tem autorização e não funcionará com o SYNC."
+ },
+ "pt-pt" :
+ {
+ "line1" : "não autorizada",
+ "tts" : "Esta versão de %appName% não está autorizada e não funcionará com o SYNC."
+ },
+ "ru-ru" :
+ {
+ "line1" : "не авторизировано",
+ "tts" : "Эта версия %appName% не авторизирована и не будет работать с SYNC."
+ },
+ "sv-se" :
+ {
+ "line1" : "är ej godkänd",
+ "tts" : "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC."
+ },
+ "tr-tr" :
+ {
+ "line1" : "için izin yok",
+ "tts" : "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz."
+ },
+ "zh-cn" :
+ {
+ "line1" : "未得到授权",
+ "tts" : "此版本的%appName% 未得到授权,无法在SYNC上使用。"
+ },
+ "zh-tw" :
+ {
+ "line1" : "無授權",
+ "tts" : "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。"
+ }
+ }
+ },
+ "AppUnsupported" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "nicht unterstützt",
+ "tts" : "Diese Version von %appName% wird von SYNC nicht unterstützt."
+ },
+ "en-au" :
+ {
+ "line1" : "not supported",
+ "tts" : "This version of %appName% is not supported by SYNC."
+ },
+ "en-gb" :
+ {
+ "line1" : "not supported",
+ "textBody" : "This version of %appName% is not supported by SYNC.",
+ "tts" : "This version of %appName% is not supported by SYNC."
+ },
+ "en-ie" :
+ {
+ "line1" : "not supported",
+ "tts" : "This version of %appName% is not supported by SYNC."
+ },
+ "en-us" :
+ {
+ "line1" : "Not Supported",
+ "textBody" : "Your version of %appName% is not supported by SYNC.",
+ "tts" : "This version of %appName% is not supported by SYNC."
+ },
+ "es-en" :
+ {
+ "line1" : "no compatible",
+ "textBody" : "Esta versión de %appName% no es compatible con SYNC.",
+ "tts" : "Esta versión de %appName% no es compatible con SYNC."
+ },
+ "es-es" :
+ {
+ "line1" : "No compatible",
+ "tts" : "Esta versión de %appName% no es compatible con SYNC."
+ },
+ "es-mx" :
+ {
+ "line1" : "no compatible",
+ "textBody" : "Esta versión de %appName% no es compatible con SYNC.",
+ "tts" : "Esta versión de %appName% no es compatible con SYNC."
+ },
+ "fr-ca" :
+ {
+ "line1" : "incompatible",
+ "textBody" : "Cette version de %appName% n’est pas prise en charge par SYNC.",
+ "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
+ },
+ "fr-fr" :
+ {
+ "line1" : "incompatible",
+ "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
+ },
+ "it-it" :
+ {
+ "line1" : "non supportata",
+ "tts" : "Questa versione di %appName% non è supportata dal SYNC."
+ },
+ "nl-nl" :
+ {
+ "line1" : "niet ondersteund",
+ "tts" : "Deze versie van %appName% wordt niet ondersteund door SYNC."
+ },
+ "pl-pl" :
+ {
+ "line1" : "aplikacja nie obsług.",
+ "tts" : "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC."
+ },
+ "pt-br" :
+ {
+ "line1" : "não suportado",
+ "tts" : "Esta versão do %appName% não é suportada pelo SYNC."
+ },
+ "pt-pt" :
+ {
+ "line1" : "não suportada",
+ "tts" : "Esta versão de %appName% não é suportado pelo SYNC."
+ },
+ "ru-ru" :
+ {
+ "line1" : "не поддерживается",
+ "tts" : "Эта версия %appName% не поддерживается SYNC."
+ },
+ "sv-se" :
+ {
+ "line1" : "stöds ej",
+ "tts" : "SYNC har inte stöd för den här versionen av %appName%."
+ },
+ "tr-tr" :
+ {
+ "line1" : "desteklenmiyor",
+ "tts" : "Bu %appName% sürümü SYNC tarafından desteklenmiyor."
+ },
+ "zh-cn" :
+ {
+ "line1" : "不受支持",
+ "tts" : "SYNC不支持此版本的%appName%。"
+ },
+ "zh-tw" :
+ {
+ "line1" : "不支援",
+ "tts" : "SYNC 不支援此版本的%appName% 。"
+ }
+ }
+ },
+ "DataConsent" :
+ {
+ "languages" :
+ {
+ "en-gb" :
+ {
+ "textBody" : "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
+ },
+ "en-us" :
+ {
+ "line1" : "Enable Mobile Apps",
+ "line2" : "on SYNC? (Uses Data)",
+ "textBody" : "Would you like to enable Mobile Apps on SYNC?\r\n\r\nIf you enable the use of mobile apps from your mobile device on SYNC, you agree that SYNC can periodically use your device’s data plan to send and receive data that keeps your settings current and enables app functionality. Data sent to Ford U.S. includes your VIN and SYNC module number. Standard rates may apply.\r\n\r\nTo change settings or turn off later, visit the SYNC mobile apps settings menu. See Owner Guide for more information. I agree and consent."
+ },
+ "es-mx" :
+ {
+ "textBody" : "Si permite el uso de apps de su móvil vía SYNC®, acepta que SYNC® puede utilizar el plan de datos de su equipo para enviar y recibir info para actualizar su configuración y permitir la funcionalidad de la app. Datos enviados a Ford US incluyen VIN y # de módulo de SYNC®. Cargos a su plan de datos pueden aplicar. \r\n\r\nPara cambiar la config. de SYNC® o apagarlo, acceda a Menú de configuración de apps. Vea la Guía del Propietario para más info. Estoy de acuerdo y acepto lo anterior."
+ },
+ "fr-ca" :
+ {
+ "textBody" : "Si vous activez les applications mobiles sur SYNC, vous acceptez que SYNC utilise votre forfait de données afin de maintenir vos réglages à jour et assurer la pleine fonctionnalité. Parmi les données envoyées à Ford US, notons le NIV et le numéro de module SYNC. Des frais de base peuvent s’appliquer. \r\n\r\nPour modifier les réglages ou désactiver les applications, consultez le menu des réglages des applications de SYNC. Voir le Manuel du propriétaire. J’accepte et je consens."
+ }
+ }
+ },
+ "DataConsentHelp" :
+ {
+ "languages" :
+ {
+ "en-us" :
+ {
+ "textBody" : "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information."
+ },
+ "es-mx" :
+ {
+ "textBody" : "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
+ },
+ "fr-ca" :
+ {
+ "textBody" : "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
+ }
+ }
+ },
+ "DisableApps" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Auto-Update",
+ "line2" : "und Mobile Apps deaktivieren",
+ "tts" : "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen."
+ },
+ "en-au" :
+ {
+ "line1" : "Disable auto-updates",
+ "line2" : "and Mobile Apps?",
+ "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
+ },
+ "en-gb" :
+ {
+ "line1" : "Disable auto-updates",
+ "line2" : "and Mobile Apps?",
+ "textBody" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
+ "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
+ },
+ "en-ie" :
+ {
+ "line1" : "Disable auto-updates",
+ "line2" : "and Mobile Apps?",
+ "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
+ },
+ "en-us" :
+ {
+ "line1" : "Disable Auto-Updates",
+ "line2" : "and Mobile Apps?",
+ "textBody" : "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel.",
+ "tts" : "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
+ },
+ "es-en" :
+ {
+ "line1" : "¿Deshab. actualiz.",
+ "line2" : "autom. y aplic. móv.?",
+ "textBody" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
+ "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
+ },
+ "es-es" :
+ {
+ "line1" : "¿Desact. actual. auto",
+ "line2" : "y apl. móviles?",
+ "tts" : "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar."
+ },
+ "es-mx" :
+ {
+ "line1" : "¿Deshab. actualiz.",
+ "line2" : "autom. y aplic. móv.?",
+ "textBody" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
+ "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Désactiver màj autom.",
+ "line2" : "et app. mobiles?",
+ "textBody" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
+ "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
+ },
+ "fr-fr" :
+ {
+ "line1" : "Désactiver màj autom.",
+ "line2" : "et app. mobiles?",
+ "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
+ },
+ "it-it" :
+ {
+ "line1" : "Disabilitare agg. aut.",
+ "line2" : "e app mobili?",
+ "tts" : "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare."
+ },
+ "nl-nl" :
+ {
+ "line1" : "Auto-updates en mob.",
+ "line2" : "apps uitschakelen?",
+ "tts" : "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren."
+ },
+ "pl-pl" :
+ {
+ "line1" : "Wył. automat. aktual.",
+ "line2" : "i aplikacje mobilne?",
+ "tts" : "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować."
+ },
+ "pt-br" :
+ {
+ "line1" : "Desativar atualizações",
+ "line2" : "autom. e aplicativos?",
+ "tts" : "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Desact. actual. autom.",
+ "line2" : "e aplicações móveis?",
+ "tts" : "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Откл. автообновления",
+ "line2" : "и мобил. прилож.?",
+ "tts" : "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены."
+ },
+ "sv-se" :
+ {
+ "line1" : "Avaktiverar autouppdat.",
+ "line2" : "och mobilappar?",
+ "tts" : "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta."
+ },
+ "tr-tr" :
+ {
+ "line1" : "Oto. güncelleme ve",
+ "line2" : "mobil uygul. kapat?",
+ "tts" : "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın."
+ },
+ "zh-cn" :
+ {
+ "line1" : "是否禁用自动更新和",
+ "line2" : "移动应用程序?",
+ "tts" : "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。"
+ },
+ "zh-tw" :
+ {
+ "line1" : "停用自動更新",
+ "line2" : "和行動應用程式?",
+ "tts" : "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。"
+ }
+ }
+ },
+ "DrivingCharacteristics" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "label" : "Fahreigenschaften",
+ "tts" : "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus."
+ },
+ "en-au" :
+ {
+ "label" : "Driving characteristics",
+ "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
+ },
+ "en-gb" :
+ {
+ "label" : "Driving characteristics",
+ "textBody" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
+ "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
+ },
+ "en-ie" :
+ {
+ "label" : "Driving characteristics",
+ "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
+ },
+ "en-us" :
+ {
+ "label" : "Driving Characteristics",
+ "textBody" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM.",
+ "tts" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM."
+ },
+ "es-en" :
+ {
+ "label" : "Características del manejo",
+ "textBody" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
+ "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
+ },
+ "es-es" :
+ {
+ "label" : "Características de conducción",
+ "tts" : "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad."
+ },
+ "es-mx" :
+ {
+ "label" : "Características del manejo",
+ "textBody" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio.",
+ "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio."
+ },
+ "fr-ca" :
+ {
+ "label" : "Caractéristiques de conduite",
+ "textBody" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage.",
+ "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage."
+ },
+ "fr-fr" :
+ {
+ "label" : "Caractéristiques de conduite",
+ "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
+ },
+ "it-it" :
+ {
+ "label" : "Caratteristiche di guida",
+ "tts" : "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza."
+ },
+ "nl-nl" :
+ {
+ "label" : "Rijkenmerken",
+ "tts" : "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus."
+ },
+ "pl-pl" :
+ {
+ "label" : "Informacje dotyczące stylu jazdy",
+ "tts" : "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa."
+ },
+ "pt-br" :
+ {
+ "label" : "Características de condução",
+ "line1" : "Caract. Condução",
+ "tts" : "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança."
+ },
+ "pt-pt" :
+ {
+ "label" : "Características de condução",
+ "tts" : "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança."
+ },
+ "ru-ru" :
+ {
+ "label" : "Характеристики движения",
+ "tts" : "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности."
+ },
+ "sv-se" :
+ {
+ "label" : "Köregenskaper",
+ "tts" : "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus."
+ },
+ "tr-tr" :
+ {
+ "label" : "Sürüş karakteristikleri",
+ "tts" : "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu."
+ },
+ "zh-cn" :
+ {
+ "label" : "行驶特性",
+ "tts" : "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态"
+ },
+ "zh-tw" :
+ {
+ "label" : "駕駛特性",
+ "tts" : "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態"
+ }
+ }
+ },
+ "Location" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "label" : "GPS und Geschwindigkeit",
+ "tts" : "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs."
+ },
+ "en-au" :
+ {
+ "label" : "GPS and speed",
+ "tts" : "An app can access vehicle GPS and speed."
+ },
+ "en-gb" :
+ {
+ "label" : "GPS and speed",
+ "textBody" : "An app can access vehicle GPS and speed.",
+ "tts" : "An app can access vehicle GPS and speed."
+ },
+ "en-ie" :
+ {
+ "label" : "GPS and speed",
+ "tts" : "An app can access vehicle GPS and speed."
+ },
+ "en-us" :
+ {
+ "label" : "GPS and Speed",
+ "textBody" : "An app can access vehicle GPS and speed.",
+ "tts" : "An app can access vehicle GPS and speed."
+ },
+ "es-en" :
+ {
+ "label" : "GPS y velocidad",
+ "textBody" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
+ "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
+ },
+ "es-es" :
+ {
+ "label" : "GPS y velocidad",
+ "tts" : "Una aplicación puede acceder al GPS y la velocidad del vehículo."
+ },
+ "es-mx" :
+ {
+ "label" : "GPS y velocidad",
+ "textBody" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
+ "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
+ },
+ "fr-ca" :
+ {
+ "label" : "GPS et Vitesse",
+ "textBody" : "Une application peut accéder au GPS et à la vitesse du véhicule.",
+ "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
+ },
+ "fr-fr" :
+ {
+ "label" : "GPS et vitesse",
+ "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
+ },
+ "it-it" :
+ {
+ "label" : "GPS e velocità",
+ "tts" : "Un'app può avere accesso a GPS e velocità del veicolo."
+ },
+ "nl-nl" :
+ {
+ "label" : "Gps en snelheid",
+ "tts" : "Een app heeft toegang tot gps en de snelheid van het voertuig."
+ },
+ "pl-pl" :
+ {
+ "label" : "GPS i prędkość",
+ "tts" : "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu."
+ },
+ "pt-br" :
+ {
+ "label" : "GPS e velocidade",
+ "tts" : "Um aplicativo pode acessar o GPS e a velocidade do veículo."
+ },
+ "pt-pt" :
+ {
+ "label" : "GPS e velocidade",
+ "tts" : "Uma aplicação consegue aceder ao GPS e à velocidade do veículo."
+ },
+ "ru-ru" :
+ {
+ "label" : "GPS и скорость",
+ "tts" : "Приложение имеет доступ к GPS и скорости автомобиля."
+ },
+ "sv-se" :
+ {
+ "label" : "GPS och hastighet",
+ "tts" : "Appen kan komma åt fordonets GPS och hastighetsmätare."
+ },
+ "tr-tr" :
+ {
+ "label" : "GPS ve hız",
+ "tts" : "Bu uygulama aracın GPS ve hız bilgilerine erişebilir."
+ },
+ "zh-cn" :
+ {
+ "label" : "GPS 和车速",
+ "tts" : "移动应用程序可以访问车辆 GPS 和车速信息。"
+ },
+ "zh-tw" :
+ {
+ "label" : "GPS和車速",
+ "tts" : "應用程式可存取車輛的GPS和速度。"
+ }
+ }
+ },
+ "Notifications" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "label" : "Push-Benachrichtigungen",
+ "tts" : "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden."
+ },
+ "en-au" :
+ {
+ "label" : "Push notifications",
+ "tts" : "An app can send notifications when running in the background."
+ },
+ "en-gb" :
+ {
+ "label" : "Push notifications",
+ "textBody" : "An app can send notifications when running in the background.",
+ "tts" : "An app can send notifications when running in the background."
+ },
+ "en-ie" :
+ {
+ "label" : "Push notifications",
+ "tts" : "An app can send notifications when running in the background."
+ },
+ "en-us" :
+ {
+ "label" : "Push Notifications",
+ "textBody" : "An app can send notifications when running in the background.",
+ "tts" : "An app can send notifications when running in the background."
+ },
+ "es-en" :
+ {
+ "label" : "Notificaciones tipo Push",
+ "textBody" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
+ "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
+ },
+ "es-es" :
+ {
+ "label" : "Notificaciones push",
+ "tts" : "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano."
+ },
+ "es-mx" :
+ {
+ "label" : "Notificaciones tipo Push",
+ "textBody" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
+ "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
+ },
+ "fr-ca" :
+ {
+ "label" : "Notifications Instantanées",
+ "textBody" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
+ "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
+ },
+ "fr-fr" :
+ {
+ "label" : "Notifications push",
+ "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
+ },
+ "it-it" :
+ {
+ "label" : "Notifiche push",
+ "tts" : "Un'app può inviare notifiche se eseguita in background."
+ },
+ "nl-nl" :
+ {
+ "label" : "Push-meldingen",
+ "tts" : "Een app kan meldingen versturen als deze op de achtergrond actief is."
+ },
+ "pl-pl" :
+ {
+ "label" : "Powiadomienia Push",
+ "tts" : "Aplikacja może wysyłać powiadomienia, działając w tle."
+ },
+ "pt-br" :
+ {
+ "label" : "Notificações Push",
+ "line1" : "Notificações",
+ "tts" : "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano."
+ },
+ "pt-pt" :
+ {
+ "label" : "Notificações push",
+ "tts" : "Uma aplicação consegue enviar notificações quando está activa em segundo plano."
+ },
+ "ru-ru" :
+ {
+ "label" : "Оповещения о пересылке",
+ "tts" : "Если приложение работает в фоновом режиме, оно может отправлять оповещения."
+ },
+ "sv-se" :
+ {
+ "label" : "Push-notiser",
+ "tts" : "Appen kan skicka meddelanden när den körs i bakgrunden."
+ },
+ "tr-tr" :
+ {
+ "label" : "Anlık bildirimleri",
+ "tts" : "Bir uygulama arka planda çalışırken bildirim gönderebilir."
+ },
+ "zh-cn" :
+ {
+ "label" : "推送通知",
+ "tts" : "移动应用程序在后台运行时可推送通知。"
+ },
+ "zh-tw" :
+ {
+ "label" : "傳送通知",
+ "tts" : "車輛行進時,應用程式可在背景中傳送通知。"
+ }
+ }
+ },
+ "SettingAppPermissions" :
+ {
+ "languages" :
+ {
+ "en-us" :
+ {
+ "textBody" : "Change %AppName%’s functionality and use of data as described below. See App terms of service and privacy policies."
+ },
+ "es-mx" :
+ {
+ "textBody" : "Para cambiar la funcionalidad de %appName% y usar los datos como se describe más adelante. Consulte los términos de servicio y políticas de privacidad de la App."
+ },
+ "fr-ca" :
+ {
+ "textBody" : "Pour modifier la fonctionnalité de %appName% et l’usage des données comme décrit ci-dessous. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application."
+ }
+ }
+ },
+ "SettingDisableUpdates" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Updates deakt."
+ },
+ "en-au" :
+ {
+ "line1" : "Disable updates"
+ },
+ "en-gb" :
+ {
+ "line1" : "Disable updates"
+ },
+ "en-ie" :
+ {
+ "line1" : "Disable updates"
+ },
+ "en-us" :
+ {
+ "line1" : "Disable Updates",
+ "textBody" : "Disable Updates"
+ },
+ "es-en" :
+ {
+ "line1" : "Deshab. actual.",
+ "textBody" : "Deshab. actual."
+ },
+ "es-es" :
+ {
+ "line1" : "Desact. actual."
+ },
+ "es-mx" :
+ {
+ "line1" : "Deshab. actual.",
+ "textBody" : "Deshab. actual."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Désactiver MAJ",
+ "textBody" : "Désactiver MAJ"
+ },
+ "fr-fr" :
+ {
+ "line1" : "Désactiver màj"
+ },
+ "it-it" :
+ {
+ "line1" : "Disabilita agg."
+ },
+ "nl-nl" :
+ {
+ "line1" : "Upd. uitschak."
+ },
+ "pl-pl" :
+ {
+ "line1" : "Wyłącz aktual."
+ },
+ "pt-br" :
+ {
+ "line1" : "Desat. atualiz."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Desact. actualiz."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Откл. обновл."
+ },
+ "sv-se" :
+ {
+ "line1" : "Inaktivera uppd."
+ },
+ "tr-tr" :
+ {
+ "line1" : "Güncell. Kapat"
+ },
+ "zh-cn" :
+ {
+ "line1" : "禁用更新"
+ },
+ "zh-tw" :
+ {
+ "line1" : "停用更新"
+ }
+ }
+ },
+ "SettingEnableUpdates" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Apps aktivieren"
+ },
+ "en-au" :
+ {
+ "line1" : "Enable Apps"
+ },
+ "en-gb" :
+ {
+ "line1" : "Enable Apps"
+ },
+ "en-ie" :
+ {
+ "line1" : "Enable Apps"
+ },
+ "en-us" :
+ {
+ "line1" : "Enable Apps"
+ },
+ "es-en" :
+ {
+ "line1" : "Hab. aplic."
+ },
+ "es-es" :
+ {
+ "line1" : "Activar apl."
+ },
+ "es-mx" :
+ {
+ "line1" : "Hab. aplic."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Activer app.",
+ "textBody" : "Activer app."
+ },
+ "fr-fr" :
+ {
+ "line1" : "Activer app."
+ },
+ "it-it" :
+ {
+ "line1" : "Abilita app"
+ },
+ "nl-nl" :
+ {
+ "line1" : "Apps inschak."
+ },
+ "pl-pl" :
+ {
+ "line1" : "Włącz aplikacje"
+ },
+ "pt-br" :
+ {
+ "line1" : "Ativar aplic."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Activar actualiz."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Вкл. прилож."
+ },
+ "sv-se" :
+ {
+ "line1" : "Aktivera appar"
+ },
+ "tr-tr" :
+ {
+ "line1" : "Uygulamaları aç"
+ },
+ "zh-cn" :
+ {
+ "line1" : "启用应用程序"
+ },
+ "zh-tw" :
+ {
+ "line1" : "啟用應用程式"
+ }
+ }
+ },
+ "SettingUpdateAuto" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Update anford."
+ },
+ "en-au" :
+ {
+ "line1" : "Request update"
+ },
+ "en-gb" :
+ {
+ "line1" : "Request update"
+ },
+ "en-ie" :
+ {
+ "line1" : "Request update"
+ },
+ "en-us" :
+ {
+ "line1" : "Request Update",
+ "textBody" : "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
+ },
+ "es-en" :
+ {
+ "line1" : "Solicit. actualiz.",
+ "textBody" : "Solicit. actualiz."
+ },
+ "es-es" :
+ {
+ "line1" : "Solicitar actual."
+ },
+ "es-mx" :
+ {
+ "line1" : "Solicit. actualiz.",
+ "textBody" : "Solicit. actualiz."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Demander MAJ",
+ "textBody" : "Demander MAJ"
+ },
+ "fr-fr" :
+ {
+ "line1" : "Demander màj"
+ },
+ "it-it" :
+ {
+ "line1" : "Rich. aggiorn."
+ },
+ "nl-nl" :
+ {
+ "line1" : "Upd. aanvragen"
+ },
+ "pl-pl" :
+ {
+ "line1" : "Zażądaj aktual."
+ },
+ "pt-br" :
+ {
+ "line1" : "Solicitar atualiz."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Solicit. actualiz."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Запрос на обн."
+ },
+ "sv-se" :
+ {
+ "line1" : "Begär uppdat."
+ },
+ "tr-tr" :
+ {
+ "line1" : "Güncelleme iste"
+ },
+ "zh-cn" :
+ {
+ "line1" : "请求更新"
+ },
+ "zh-tw" :
+ {
+ "line1" : "請求更新"
+ }
+ }
+ },
+ "StatusNeeded" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Update benötigt"
+ },
+ "en-au" :
+ {
+ "line1" : "Update needed"
+ },
+ "en-gb" :
+ {
+ "line1" : "Update needed",
+ "textBody" : "Update needed"
+ },
+ "en-ie" :
+ {
+ "line1" : "Update needed"
+ },
+ "en-us" :
+ {
+ "line1" : "Update Needed",
+ "textBody" : "Update Needed"
+ },
+ "es-en" :
+ {
+ "line1" : "Actualiz. neces.",
+ "textBody" : "Actualiz. neces."
+ },
+ "es-es" :
+ {
+ "line1" : "Actu. necesaria"
+ },
+ "es-mx" :
+ {
+ "line1" : "Actualiz. neces.",
+ "textBody" : "Actualiz. neces."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Màj requise",
+ "textBody" : "Màj requise"
+ },
+ "fr-fr" :
+ {
+ "line1" : "Mise à jour requise"
+ },
+ "it-it" :
+ {
+ "line1" : "Necess. aggiorn."
+ },
+ "nl-nl" :
+ {
+ "line1" : "Update nodig"
+ },
+ "pl-pl" :
+ {
+ "line1" : "Potrzeba aktual."
+ },
+ "pt-br" :
+ {
+ "line1" : "Atualiz. necess."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Actual. necess."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Необх. обновл."
+ },
+ "sv-se" :
+ {
+ "line1" : "Uppdat. krävs"
+ },
+ "tr-tr" :
+ {
+ "line1" : "Güncellenmeli"
+ },
+ "zh-cn" :
+ {
+ "line1" : "需要进行更新"
+ },
+ "zh-tw" :
+ {
+ "line1" : "需更新"
+ }
+ }
+ },
+ "StatusPending" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Aktualisieren..."
+ },
+ "en-au" :
+ {
+ "line1" : "Updating..."
+ },
+ "en-gb" :
+ {
+ "line1" : "Updating...",
+ "textBody" : "Updating..."
+ },
+ "en-ie" :
+ {
+ "line1" : "Updating..."
+ },
+ "en-us" :
+ {
+ "line1" : "Updating...",
+ "textBody" : "Updating..."
+ },
+ "es-en" :
+ {
+ "line1" : "Actualizando...",
+ "textBody" : "Actualizando..."
+ },
+ "es-es" :
+ {
+ "line1" : "Actualizando..."
+ },
+ "es-mx" :
+ {
+ "line1" : "Actualizando...",
+ "textBody" : "Actualizando..."
+ },
+ "fr-ca" :
+ {
+ "line1" : "MAJ en cours...",
+ "textBody" : "MAJ en cours..."
+ },
+ "fr-fr" :
+ {
+ "line1" : "Màj en cours..."
+ },
+ "it-it" :
+ {
+ "line1" : "Aggiornamento"
+ },
+ "nl-nl" :
+ {
+ "line1" : "Updaten..."
+ },
+ "pl-pl" :
+ {
+ "line1" : "Aktualizowanie"
+ },
+ "pt-br" :
+ {
+ "line1" : "Atualizando..."
+ },
+ "pt-pt" :
+ {
+ "line1" : "A actualizar..."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Обновление..."
+ },
+ "sv-se" :
+ {
+ "line1" : "Uppdaterar..."
+ },
+ "tr-tr" :
+ {
+ "line1" : "Güncelleniyor..."
+ },
+ "zh-cn" :
+ {
+ "line1" : "正在更新......"
+ },
+ "zh-tw" :
+ {
+ "line1" : "更新中..."
+ }
+ }
+ },
+ "StatusUpToDate" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Aktuelle Version"
+ },
+ "en-au" :
+ {
+ "line1" : "Up-to-date"
+ },
+ "en-gb" :
+ {
+ "line1" : "Up-to-date",
+ "textBody" : "Up-to-date"
+ },
+ "en-ie" :
+ {
+ "line1" : "Up-to-date"
+ },
+ "en-us" :
+ {
+ "line1" : "Up-To-Date",
+ "textBody" : "Up-To-Date"
+ },
+ "es-en" :
+ {
+ "line1" : "Actualizado",
+ "textBody" : "Actualizado"
+ },
+ "es-es" :
+ {
+ "line1" : "Actualizada"
+ },
+ "es-mx" :
+ {
+ "line1" : "Actualizado",
+ "textBody" : "Actualizado"
+ },
+ "fr-ca" :
+ {
+ "line1" : "Déjà à jour",
+ "textBody" : "Déjà à jour"
+ },
+ "fr-fr" :
+ {
+ "line1" : "Déjà à jour"
+ },
+ "it-it" :
+ {
+ "line1" : "più recente"
+ },
+ "nl-nl" :
+ {
+ "line1" : "Up-to-date"
+ },
+ "pl-pl" :
+ {
+ "line1" : "Aktualne"
+ },
+ "pt-br" :
+ {
+ "line1" : "Atualizado"
+ },
+ "pt-pt" :
+ {
+ "line1" : "Actualizado"
+ },
+ "ru-ru" :
+ {
+ "line1" : "Обновлено"
+ },
+ "sv-se" :
+ {
+ "line1" : "Uppdat. krävs ej"
+ },
+ "tr-tr" :
+ {
+ "line1" : "Güncel"
+ },
+ "zh-cn" :
+ {
+ "line1" : "最新更新"
+ },
+ "zh-tw" :
+ {
+ "line1" : "更新最新"
+ }
+ }
+ },
+ "VehicleInfo" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "label" : "Fahrzeuginformationen",
+ "tts" : "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck."
+ },
+ "en-au" :
+ {
+ "label" : "Vehicle information",
+ "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
+ },
+ "en-gb" :
+ {
+ "label" : "Vehicle information",
+ "textBody" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
+ "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
+ },
+ "en-ie" :
+ {
+ "label" : "Vehicle information",
+ "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
+ },
+ "en-us" :
+ {
+ "label" : "Vehicle Information",
+ "textBody" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure.",
+ "tts" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure."
+ },
+ "es-en" :
+ {
+ "label" : "Información del vehículo",
+ "textBody" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
+ "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
+ },
+ "es-es" :
+ {
+ "label" : "Información del vehículo",
+ "tts" : "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos."
+ },
+ "es-mx" :
+ {
+ "label" : "Información del Vehículo",
+ "textBody" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos.",
+ "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos."
+ },
+ "fr-ca" :
+ {
+ "label" : "Renseignements du Véhicule",
+ "textBody" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus.",
+ "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus."
+ },
+ "fr-fr" :
+ {
+ "label" : "Renseignements du véhicule",
+ "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus."
+ },
+ "it-it" :
+ {
+ "label" : "Informazioni sul veicolo",
+ "tts" : "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici."
+ },
+ "nl-nl" :
+ {
+ "label" : "Voertuiginformatie",
+ "tts" : "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning."
+ },
+ "pl-pl" :
+ {
+ "label" : "Informacje o pojeździe",
+ "tts" : "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon."
+ },
+ "pt-br" :
+ {
+ "label" : "Informações sobre o veículo",
+ "line1" : "Inform. Veículo",
+ "tts" : "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus."
+ },
+ "pt-pt" :
+ {
+ "label" : "Informações do veículo",
+ "tts" : "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus."
+ },
+ "ru-ru" :
+ {
+ "label" : "Информация об автомобиле",
+ "tts" : "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин."
+ },
+ "sv-se" :
+ {
+ "label" : "Fordonsinformation",
+ "tts" : "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck."
+ },
+ "tr-tr" :
+ {
+ "label" : "Araç bilgisi",
+ "tts" : "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı."
+ },
+ "zh-cn" :
+ {
+ "label" : "车辆信息",
+ "tts" : "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压."
+ },
+ "zh-tw" :
+ {
+ "label" : "車輛資訊",
+ "tts" : "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓."
+ }
+ }
+ }
+ },
+ "version" : "001.001.023"
+ },
+ "functional_groupings" :
+ {
+ "BackgroundAPT" :
+ {
+ "rpcs" :
+ {
+ "EndAudioPassThru" :
+ {
+ "hmi_levels" : [ "BACKGROUND" ]
+ },
+ "OnAudioPassThru" :
+ {
+ "hmi_levels" : [ "BACKGROUND" ]
+ },
+ "PerformAudioPassThru" :
+ {
+ "hmi_levels" : [ "BACKGROUND" ]
+ }
+ }
+ },
+ "Base-4" :
+ {
+ "rpcs" :
+ {
+ "AddCommand" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "AddSubMenu" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "Alert" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ },
+ "ChangeRegistration" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "CreateInteractionChoiceSet" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "DeleteCommand" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "DeleteFile" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "DeleteInteractionChoiceSet" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "DeleteSubMenu" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "EncodedSyncPData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "EndAudioPassThru" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "GenericResponse" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "ListFiles" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnAppInterfaceUnregistered" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnAudioPassThru" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "OnButtonEvent" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "OnButtonPress" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "OnCommand" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "OnDriverDistraction" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "OnEncodedSyncPData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnHMIStatus" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnHashChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnLanguageChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnPermissionsChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnSystemRequest" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "PerformAudioPassThru" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ },
+ "PerformInteraction" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ },
+ "PutFile" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "RegisterAppInterface" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "ResetGlobalProperties" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "ScrollableMessage" :
+ {
+ "hmi_levels" : [ "FULL" ]
+ },
+ "SetAppIcon" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetDisplayLayout" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetGlobalProperties" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetMediaClockTimer" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "Show" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "Slider" :
+ {
+ "hmi_levels" : [ "FULL" ]
+ },
+ "Speak" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ },
+ "SubscribeButton" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "SystemRequest" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "UnregisterAppInterface" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "UnsubscribeButton" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "BaseBeforeDataConsent" :
+ {
+ "rpcs" :
+ {
+ "ChangeRegistration" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "DeleteFile" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "EncodedSyncPData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "ListFiles" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnAppInterfaceUnregistered" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnEncodedSyncPData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnHMIStatus" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnHashChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnLanguageChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnPermissionsChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnSystemRequest" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "PutFile" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "RegisterAppInterface" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "ResetGlobalProperties" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetAppIcon" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetDisplayLayout" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetGlobalProperties" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SystemRequest" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "UnregisterAppInterface" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ }
+ }
+ },
+ "DataConsent-2" :
+ {
+ "rpcs" : null,
+ "user_consent_prompt" : "DataConsent"
+ },
+ "DiagnosticMessageOnly" :
+ {
+ "rpcs" :
+ {
+ "DiagnosticMessage" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "DialNumberOnly" :
+ {
+ "rpcs" :
+ {
+ "DialNumber" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "DrivingCharacteristics-3" :
+ {
+ "rpcs" :
+ {
+ "GetVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "accPedalPosition",
+ "beltStatus",
+ "electronicParkBrakeStatus",
+ "driverBraking",
+ "myKey",
+ "prndl",
+ "rpm",
+ "steeringWheelAngle",
+ "handsOffSteering"
+ ]
+ },
+ "OnVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "accPedalPosition",
+ "beltStatus",
+ "electronicParkBrakeStatus",
+ "driverBraking",
+ "myKey",
+ "prndl",
+ "rpm",
+ "steeringWheelAngle",
+ "handsOffSteering"
+ ]
+ },
+ "SubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "accPedalPosition",
+ "beltStatus",
+ "electronicParkBrakeStatus",
+ "driverBraking",
+ "myKey",
+ "prndl",
+ "rpm",
+ "steeringWheelAngle",
+ "handsOffSteering"
+ ]
+ },
+ "UnsubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "accPedalPosition",
+ "beltStatus",
+ "electronicParkBrakeStatus",
+ "driverBraking",
+ "myKey",
+ "prndl",
+ "rpm",
+ "steeringWheelAngle",
+ "handsOffSteering"
+ ]
+ }
+ },
+ "user_consent_prompt" : "DrivingCharacteristics"
+ },
+ "Emergency-1" :
+ {
+ "rpcs" :
+ {
+ "GetVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "airbagStatus", "clusterModeStatus", "eCallInfo", "emergencyEvent" ]
+ },
+ "OnVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "airbagStatus", "clusterModeStatus", "eCallInfo", "emergencyEvent" ]
+ },
+ "SubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "airbagStatus", "clusterModeStatus", "eCallInfo", "emergencyEvent" ]
+ },
+ "UnsubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "airbagStatus", "clusterModeStatus", "eCallInfo", "emergencyEvent" ]
+ }
+ }
+ },
+ "Location-1" :
+ {
+ "rpcs" :
+ {
+ "GetVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "gps", "speed" ]
+ },
+ "OnVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "gps", "speed" ]
+ },
+ "SubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "gps", "speed" ]
+ },
+ "UnsubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "gps", "speed" ]
+ }
+ },
+ "user_consent_prompt" : "Location"
+ },
+ "Navigation-1" :
+ {
+ "rpcs" :
+ {
+ "AlertManeuver" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "ShowConstantTBT" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "UpdateTurnList" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "Notifications" :
+ {
+ "rpcs" :
+ {
+ "Alert" :
+ {
+ "hmi_levels" : [ "BACKGROUND" ]
+ }
+ },
+ "user_consent_prompt" : "Notifications"
+ },
+ "Notifications-45" :
+ {
+ "rpcs" :
+ {
+ "MWTAA" :
+ {
+ "hmi_levels" : [ "LIMITED" ]
+ }
+ },
+ "user_consent_prompt" : "Notifications-45"
+ },
+ "Notifications-73" :
+ {
+ "rpcs" :
+ {
+ "STEHV" :
+ {
+ "hmi_levels" : [ "FULL" ]
+ }
+ },
+ "user_consent_prompt" : "Notifications-73"
+ },
+ "OnKeyboardInputOnlyGroup" :
+ {
+ "rpcs" :
+ {
+ "OnKeyboardInput" :
+ {
+ "hmi_levels" : [ "FULL" ]
+ }
+ }
+ },
+ "OnTouchEventOnlyGroup" :
+ {
+ "rpcs" :
+ {
+ "OnTouchEvent" :
+ {
+ "hmi_levels" : [ "FULL" ]
+ }
+ }
+ },
+ "PropriataryData-1" :
+ {
+ "rpcs" :
+ {
+ "DiagnosticMessage" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "GetDTCs" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "ReadDID" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "PropriataryData-2" :
+ {
+ "rpcs" :
+ {
+ "DiagnosticMessage" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "GetDTCs" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "ReadDID" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "ProprietaryData-3" :
+ {
+ "rpcs" :
+ {
+ "GetDTCs" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "ReadDID" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "SendLocation" :
+ {
+ "rpcs" :
+ {
+ "SendLocation" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "SendLocationOnly" :
+ {
+ "rpcs" :
+ {
+ "SendLocation" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "VehicleInfo-3" :
+ {
+ "rpcs" :
+ {
+ "GetVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "bodyInformation",
+ "deviceStatus",
+ "engineOilLife",
+ "engineTorque",
+ "externalTemperature",
+ "turnSignal",
+ "fuelLevel",
+ "fuelLevel_State",
+ "headLampStatus",
+ "instantFuelConsumption",
+ "fuelRange",
+ "cloudAppVehicleID",
+ "odometer",
+ "tirePressure",
+ "vin",
+ "wiperStatus"
+ ]
+ },
+ "OnVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "bodyInformation",
+ "deviceStatus",
+ "engineOilLife",
+ "engineTorque",
+ "externalTemperature",
+ "turnSignal",
+ "fuelLevel",
+ "fuelLevel_State",
+ "headLampStatus",
+ "instantFuelConsumption",
+ "fuelRange",
+ "cloudAppVehicleID",
+ "odometer",
+ "tirePressure",
+ "vin",
+ "wiperStatus"
+ ]
+ },
+ "SubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "bodyInformation",
+ "deviceStatus",
+ "engineOilLife",
+ "engineTorque",
+ "externalTemperature",
+ "turnSignal",
+ "fuelLevel",
+ "fuelLevel_State",
+ "headLampStatus",
+ "instantFuelConsumption",
+ "fuelRange",
+ "cloudAppVehicleID",
+ "odometer",
+ "tirePressure",
+ "wiperStatus"
+ ]
+ },
+ "UnsubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "bodyInformation",
+ "deviceStatus",
+ "engineOilLife",
+ "engineTorque",
+ "externalTemperature",
+ "turnSignal",
+ "fuelLevel",
+ "fuelLevel_State",
+ "headLampStatus",
+ "instantFuelConsumption",
+ "fuelRange",
+ "cloudAppVehicleID",
+ "odometer",
+ "tirePressure",
+ "wiperStatus"
+ ]
+ }
+ },
+ "user_consent_prompt" : "VehicleInfo"
+ }
+ },
+ "module_config" :
+ {
+ "endpoints" :
+ {
+ "0x04" :
+ {
+ "default" : [ "http://x.x.x.x:3000/api/1/softwareUpdate" ]
+ },
+ "0x07" :
+ {
+ "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
+ }
+ },
+ "exchange_after_x_days" : 20,
+ "exchange_after_x_ignition_cycles" : 100,
+ "exchange_after_x_kilometers" : 1800,
+ "notifications_per_minute_by_priority" :
+ {
+ "COMMUNICATION" : 6,
+ "EMERGENCY" : 60,
+ "NAVIGATION" : 15,
+ "PROJECTION" : 15,
+ "NONE" : 0,
+ "NORMAL" : 4,
+ "VOICECOM" : 20
+ },
+ "subtle_notifications_per_minute_by_priority":
+ {
+ "COMMUNICATION": 15,
+ "EMERGENCY": 60,
+ "NAVIGATION": 20,
+ "PROJECTION": 20,
+ "NONE": 0,
+ "NORMAL": 10,
+ "VOICECOM": 30
+ },
+ "preloaded_date" : "2012-12-16",
+ "preloaded_pt" : true,
+ "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
+ "timeout_after_x_seconds" : 60
+ }
+ }
+}
diff --git a/src/components/policy/policy_external/test/json/sdl_preloaded_pt_send_location.json b/src/components/policy/policy_external/test/json/sdl_preloaded_pt_send_location.json
deleted file mode 100644
index 87fac7c76c..0000000000
--- a/src/components/policy/policy_external/test/json/sdl_preloaded_pt_send_location.json
+++ /dev/null
@@ -1,2341 +0,0 @@
-{
- "policy_table": {
- "module_config": {
- "preloaded_pt": true,
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 20,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [
- 1,
- 5,
- 25,
- 125,
- 625
- ],
- "endpoints": {
- "0x04": {
- "default": [
- "http://x.x.x.x:3000/api/1/softwareUpdate"
- ]
- },
- "0x07": {
- "default": [
- "http://x.x.x.x:3000/api/1/policies"
- ]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "VOICECOM": 20,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "ProprietaryData-3": {
- "rpcs": {
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "PropriataryData-2": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DiagnosticMessageOnly": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "OnKeyboardInputOnlyGroup": {
- "rpcs": {
- "OnKeyboardInput": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "OnTouchEventOnlyGroup": {
- "rpcs": {
- "OnTouchEvent": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- },
- "SendLocation": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "BackgroundAPT": {
- "rpcs": {
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DialNumberOnly": {
- "rpcs": {
- "DialNumber": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "SendLocationOnly": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.023",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting permission to use the following: %functionalGroupLabels%.\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "The %appName% App is requesting permission to use the following: %functionalGroupLabels%.\r\n\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. I agree and consent."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior."
- },
- "fr-ca": {
- "tts": "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\n\r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. J’accepte et je consens."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with Mobile Apps. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\r\n\r\nIf you enable the use of mobile apps from your mobile device on SYNC, you agree that SYNC can periodically use your device’s data plan to send and receive data that keeps your settings current and enables app functionality. Data sent to Ford U.S. includes your VIN and SYNC module number. Standard rates may apply.\r\n\r\nTo change settings or turn off later, visit the SYNC mobile apps settings menu. See Owner Guide for more information. I agree and consent."
- },
- "es-mx": {
- "textBody": "Si permite el uso de apps de su móvil vía SYNC®, acepta que SYNC® puede utilizar el plan de datos de su equipo para enviar y recibir info para actualizar su configuración y permitir la funcionalidad de la app. Datos enviados a Ford US incluyen VIN y # de módulo de SYNC®. Cargos a su plan de datos pueden aplicar. \r\n\r\nPara cambiar la config. de SYNC® o apagarlo, acceda a Menú de configuración de apps. Vea la Guía del Propietario para más info. Estoy de acuerdo y acepto lo anterior."
- },
- "fr-ca": {
- "textBody": "Si vous activez les applications mobiles sur SYNC, vous acceptez que SYNC utilise votre forfait de données afin de maintenir vos réglages à jour et assurer la pleine fonctionnalité. Parmi les données envoyées à Ford US, notons le NIV et le numéro de module SYNC. Des frais de base peuvent s’appliquer. \r\n\r\nPour modifier les réglages ou désactiver les applications, consultez le menu des réglages des applications de SYNC. Voir le Manuel du propriétaire. J’accepte et je consens."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information."
- },
- "es-mx": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução",
- "line1": "Caract. Condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and Speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et Vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push Notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications Instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push",
- "line1": "Notificações"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingAppPermissions": {
- "languages": {
- "en-us": {
- "textBody": "Change %AppName%’s functionality and use of data as described below. See App terms of service and privacy policies."
- },
- "es-mx": {
- "textBody": "Para cambiar la funcionalidad de %appName% y usar los datos como se describe más adelante. Consulte los términos de servicio y políticas de privacidad de la App."
- },
- "fr-ca": {
- "textBody": "Pour modifier la fonctionnalité de %appName% et l’usage des données comme décrit ci-dessous. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application."
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure.",
- "label": "Vehicle Information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos.",
- "label": "Información del Vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus.",
- "label": "Renseignements du Véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo",
- "line1": "Inform. Veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "Base-4"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "DataConsent-2"
- ]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ]
- }
- }
- }
-} \ No newline at end of file
diff --git a/src/components/policy/policy_external/test/json/sdl_pt_first_update.json b/src/components/policy/policy_external/test/json/sdl_pt_first_update.json
deleted file mode 100644
index 440963ba48..0000000000
--- a/src/components/policy/policy_external/test/json/sdl_pt_first_update.json
+++ /dev/null
@@ -1,1764 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "watchdog_timer_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- }
- },
- "consumer_friendly_messages" : {
- "messages" : {
- "AppPermissions" : {
- "languages" : {
- "de-de" : {
- "line1" : "Zugriffsanfrage(n)",
- "line2" : "erlauben?",
- "tts" : "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-gb" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-ie" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-us" : {
- "line1" : "Grant Requested",
- "line2" : "Permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press yes to allow or no to deny."
- },
- "es-en" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "es-es" : {
- "line1" : "¿Conceder permisos",
- "line2" : "solicitados?",
- "tts" : "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar."
- },
- "es-mx" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "fr-ca" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "fr-fr" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "it-it" : {
- "line1" : "Concedi autorizzaz.",
- "line2" : "richiesta(e)?",
- "tts" : "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare."
- },
- "nl-nl" : {
- "line1" : "Aangevraagde",
- "line2" : "permissie(s) verlenen?",
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren."
- },
- "pl-pl" : {
- "line1" : "Udzielić żądanych",
- "line2" : "pozwoleń?",
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "line1" : "Conceder permissão",
- "line2" : "solicitada?",
- "tts" : "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar."
- },
- "pt-pt" : {
- "line1" : "Conceder permiss.",
- "line2" : "solicitada(s)?",
- "tts" : "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar."
- },
- "ru-ru" : {
- "line1" : "Предост. заправш.",
- "line2" : "разрешения?",
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны."
- },
- "sv-se" : {
- "line1" : "Vill du ge",
- "line2" : "tillstånd?",
- "tts" : "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka."
- },
- "tr-tr" : {
- "line1" : "İstenen izinler",
- "line2" : "verilsin mi?",
- "tts" : "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否允许请求的",
- "line2" : "权限?",
- "tts" : "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。"
- },
- "zh-tw" : {
- "line1" : "允許",
- "line2" : "授權請求?",
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsHelp" : {
- "languages" : {
- "de-de" : {
- "tts" : "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es" : {
- "tts" : "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it" : {
- "tts" : "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl" : {
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl" : {
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "tts" : "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt" : {
- "tts" : "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru" : {
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se" : {
- "tts" : "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr" : {
- "tts" : "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "tts" : "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw" : {
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked" : {
- "languages" : {
- "de-de" : {
- "tts" : "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it" : {
- "tts" : "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl" : {
- "tts" : "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl" : {
- "tts" : "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br" : {
- "tts" : "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt" : {
- "tts" : "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru" : {
- "tts" : "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se" : {
- "tts" : "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr" : {
- "tts" : "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn" : {
- "tts" : "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw" : {
- "tts" : "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht autorisiert",
- "tts" : "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren."
- },
- "en-au" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-gb" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-us" : {
- "line1" : "Not Authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "es-en" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es" : {
- "line1" : "No autorizada",
- "tts" : "Esta versión de %appName% no está autorizada y no funcionará con SYNC."
- },
- "es-mx" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "it-it" : {
- "line1" : "non autorizzata",
- "tts" : "Questa versione di %appName% non è autorizzata e non funziona con il SYNC."
- },
- "nl-nl" : {
- "line1" : "niet geautoriseerd",
- "tts" : "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC."
- },
- "pl-pl" : {
- "line1" : "brak autoryzacji",
- "tts" : "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC."
- },
- "pt-br" : {
- "line1" : "não autorizado",
- "tts" : "Esta versão do %appName% não tem autorização e não funcionará com o SYNC."
- },
- "pt-pt" : {
- "line1" : "não autorizada",
- "tts" : "Esta versão de %appName% não está autorizada e não funcionará com o SYNC."
- },
- "ru-ru" : {
- "line1" : "не авторизировано",
- "tts" : "Эта версия %appName% не авторизирована и не будет работать с SYNC."
- },
- "sv-se" : {
- "line1" : "är ej godkänd",
- "tts" : "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC."
- },
- "tr-tr" : {
- "line1" : "için izin yok",
- "tts" : "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz."
- },
- "zh-cn" : {
- "line1" : "未得到授权",
- "tts" : "此版本的%appName% 未得到授权,无法在SYNC上使用。"
- },
- "zh-tw" : {
- "line1" : "無授權",
- "tts" : "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。"
- }
- }
- },
- "AppUnsupported" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht unterstützt",
- "tts" : "Diese Version von %appName% wird von SYNC nicht unterstützt."
- },
- "en-au" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-gb" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-ie" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-us" : {
- "line1" : "Not Supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "es-en" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es" : {
- "line1" : "No compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-mx" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "it-it" : {
- "line1" : "non supportata",
- "tts" : "Questa versione di %appName% non è supportata dal SYNC."
- },
- "nl-nl" : {
- "line1" : "niet ondersteund",
- "tts" : "Deze versie van %appName% wordt niet ondersteund door SYNC."
- },
- "pl-pl" : {
- "line1" : "aplikacja nie obsług.",
- "tts" : "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC."
- },
- "pt-br" : {
- "line1" : "não suportado",
- "tts" : "Esta versão do %appName% não é suportada pelo SYNC."
- },
- "pt-pt" : {
- "line1" : "não suportada",
- "tts" : "Esta versão de %appName% não é suportado pelo SYNC."
- },
- "ru-ru" : {
- "line1" : "не поддерживается",
- "tts" : "Эта версия %appName% не поддерживается SYNC."
- },
- "sv-se" : {
- "line1" : "stöds ej",
- "tts" : "SYNC har inte stöd för den här versionen av %appName%."
- },
- "tr-tr" : {
- "line1" : "desteklenmiyor",
- "tts" : "Bu %appName% sürümü SYNC tarafından desteklenmiyor."
- },
- "zh-cn" : {
- "line1" : "不受支持",
- "tts" : "SYNC不支持此版本的%appName%。"
- },
- "zh-tw" : {
- "line1" : "不支援",
- "tts" : "SYNC 不支援此版本的%appName% 。"
- }
- }
- },
- "DataConsent" : {
- "languages" : {
- "en-us" : {
- "line1" : "Enable Mobile Apps",
- "line2" : "on SYNC? (Uses Data)",
- "tts" : "To use mobile apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device's data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Please press yes or no, or help for more information. "
- }
- }
- },
- "DataConsentHelp" : {
- "languages" : {
- "en-us" : {
- "tts" : "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC mobile apps settings menu. See your Owner Guide for more information. "
- }
- }
- },
- "DisableApps" : {
- "languages" : {
- "de-de" : {
- "line1" : "Auto-Update",
- "line2" : "und Mobile Apps deaktivieren",
- "tts" : "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen."
- },
- "en-au" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-gb" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-us" : {
- "line1" : "Disable Auto-Updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es" : {
- "line1" : "¿Desact. actual. auto",
- "line2" : "y apl. móviles?",
- "tts" : "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar."
- },
- "es-mx" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "it-it" : {
- "line1" : "Disabilitare agg. aut.",
- "line2" : "e app mobili?",
- "tts" : "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare."
- },
- "nl-nl" : {
- "line1" : "Auto-updates en mob.",
- "line2" : "apps uitschakelen?",
- "tts" : "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren."
- },
- "pl-pl" : {
- "line1" : "Wył. automat. aktual.",
- "line2" : "i aplikacje mobilne?",
- "tts" : "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować."
- },
- "pt-br" : {
- "line1" : "Desativar atualizações",
- "line2" : "autom. e aplicativos?",
- "tts" : "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar."
- },
- "pt-pt" : {
- "line1" : "Desact. actual. autom.",
- "line2" : "e aplicações móveis?",
- "tts" : "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar."
- },
- "ru-ru" : {
- "line1" : "Откл. автообновления",
- "line2" : "и мобил. прилож.?",
- "tts" : "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены."
- },
- "sv-se" : {
- "line1" : "Avaktiverar autouppdat.",
- "line2" : "och mobilappar?",
- "tts" : "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta."
- },
- "tr-tr" : {
- "line1" : "Oto. güncelleme ve",
- "line2" : "mobil uygul. kapat?",
- "tts" : "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否禁用自动更新和",
- "line2" : "移动应用程序?",
- "tts" : "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。"
- },
- "zh-tw" : {
- "line1" : "停用自動更新",
- "line2" : "和行動應用程式?",
- "tts" : "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。"
- }
- }
- },
- "DrivingCharacteristics" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahreigenschaften",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus."
- },
- "en-au" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-gb" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-us" : {
- "label" : "Driving Characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es" : {
- "label" : "Características de conducción",
- "tts" : "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad."
- },
- "es-mx" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "fr-ca" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "it-it" : {
- "label" : "Caratteristiche di guida",
- "tts" : "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza."
- },
- "nl-nl" : {
- "label" : "Rijkenmerken",
- "tts" : "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus."
- },
- "pl-pl" : {
- "label" : "Informacje dotyczące stylu jazdy",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa."
- },
- "pt-br" : {
- "label" : "Características de condução",
- "tts" : "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança."
- },
- "pt-pt" : {
- "label" : "Características de condução",
- "tts" : "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança."
- },
- "ru-ru" : {
- "label" : "Характеристики движения",
- "tts" : "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности."
- },
- "sv-se" : {
- "label" : "Köregenskaper",
- "tts" : "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus."
- },
- "tr-tr" : {
- "label" : "Sürüş karakteristikleri",
- "tts" : "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu."
- },
- "zh-cn" : {
- "label" : "行驶特性",
- "tts" : "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态"
- },
- "zh-tw" : {
- "label" : "駕駛特性",
- "tts" : "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態"
- }
- }
- },
- "Location" : {
- "languages" : {
- "de-de" : {
- "label" : "GPS und Geschwindigkeit",
- "tts" : "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs."
- },
- "en-au" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-gb" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-ie" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-us" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "es-en" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es" : {
- "label" : "GPS y velocidad",
- "tts" : "Una aplicación puede acceder al GPS y la velocidad del vehículo."
- },
- "es-mx" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "it-it" : {
- "label" : "GPS e velocità",
- "tts" : "Un'app può avere accesso a GPS e velocità del veicolo."
- },
- "nl-nl" : {
- "label" : "Gps en snelheid",
- "tts" : "Een app heeft toegang tot gps en de snelheid van het voertuig."
- },
- "pl-pl" : {
- "label" : "GPS i prędkość",
- "tts" : "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu."
- },
- "pt-br" : {
- "label" : "GPS e velocidade",
- "tts" : "Um aplicativo pode acessar o GPS e a velocidade do veículo."
- },
- "pt-pt" : {
- "label" : "GPS e velocidade",
- "tts" : "Uma aplicação consegue aceder ao GPS e à velocidade do veículo."
- },
- "ru-ru" : {
- "label" : "GPS и скорость",
- "tts" : "Приложение имеет доступ к GPS и скорости автомобиля."
- },
- "sv-se" : {
- "label" : "GPS och hastighet",
- "tts" : "Appen kan komma åt fordonets GPS och hastighetsmätare."
- },
- "tr-tr" : {
- "label" : "GPS ve hız",
- "tts" : "Bu uygulama aracın GPS ve hız bilgilerine erişebilir."
- },
- "zh-cn" : {
- "label" : "GPS 和车速",
- "tts" : "移动应用程序可以访问车辆 GPS 和车速信息。"
- },
- "zh-tw" : {
- "label" : "GPS和車速",
- "tts" : "應用程式可存取車輛的GPS和速度。"
- }
- }
- },
- "Notifications" : {
- "languages" : {
- "de-de" : {
- "label" : "Push-Benachrichtigungen",
- "tts" : "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden."
- },
- "en-au" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-gb" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-ie" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-us" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "es-en" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es" : {
- "label" : "Notificaciones push",
- "tts" : "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano."
- },
- "es-mx" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca" : {
- "label" : "Notifications instantanées",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr" : {
- "label" : "Notifications push",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "it-it" : {
- "label" : "Notifiche push",
- "tts" : "Un'app può inviare notifiche se eseguita in background."
- },
- "nl-nl" : {
- "label" : "Push-meldingen",
- "tts" : "Een app kan meldingen versturen als deze op de achtergrond actief is."
- },
- "pl-pl" : {
- "label" : "Powiadomienia Push",
- "tts" : "Aplikacja może wysyłać powiadomienia, działając w tle."
- },
- "pt-br" : {
- "label" : "Notificações Push",
- "tts" : "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano."
- },
- "pt-pt" : {
- "label" : "Notificações push",
- "tts" : "Uma aplicação consegue enviar notificações quando está activa em segundo plano."
- },
- "ru-ru" : {
- "label" : "Оповещения о пересылке",
- "tts" : "Если приложение работает в фоновом режиме, оно может отправлять оповещения."
- },
- "sv-se" : {
- "label" : "Push-notiser",
- "tts" : "Appen kan skicka meddelanden när den körs i bakgrunden."
- },
- "tr-tr" : {
- "label" : "Anlık bildirimleri",
- "tts" : "Bir uygulama arka planda çalışırken bildirim gönderebilir."
- },
- "zh-cn" : {
- "label" : "推送通知",
- "tts" : "移动应用程序在后台运行时可推送通知。"
- },
- "zh-tw" : {
- "label" : "傳送通知",
- "tts" : "車輛行進時,應用程式可在背景中傳送通知。"
- }
- }
- },
- "SettingDisableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Updates deakt."
- },
- "en-au" : {
- "line1" : "Disable updates"
- },
- "en-gb" : {
- "line1" : "Disable updates"
- },
- "en-ie" : {
- "line1" : "Disable updates"
- },
- "en-us" : {
- "line1" : "Disable Updates"
- },
- "es-en" : {
- "line1" : "Deshab. actual."
- },
- "es-es" : {
- "line1" : "Desact. actual."
- },
- "es-mx" : {
- "line1" : "Deshab. actual."
- },
- "fr-ca" : {
- "line1" : "Désactiver MAJ"
- },
- "fr-fr" : {
- "line1" : "Désactiver màj"
- },
- "it-it" : {
- "line1" : "Disabilita agg."
- },
- "nl-nl" : {
- "line1" : "Upd. uitschak."
- },
- "pl-pl" : {
- "line1" : "Wyłącz aktual."
- },
- "pt-br" : {
- "line1" : "Desat. atualiz."
- },
- "pt-pt" : {
- "line1" : "Desact. actualiz."
- },
- "ru-ru" : {
- "line1" : "Откл. обновл."
- },
- "sv-se" : {
- "line1" : "Inaktivera uppd."
- },
- "tr-tr" : {
- "line1" : "Güncell. Kapat"
- },
- "zh-cn" : {
- "line1" : "禁用更新"
- },
- "zh-tw" : {
- "line1" : "停用更新"
- }
- }
- },
- "SettingEnableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Apps aktivieren"
- },
- "en-au" : {
- "line1" : "Enable Apps"
- },
- "en-gb" : {
- "line1" : "Enable Apps"
- },
- "en-ie" : {
- "line1" : "Enable Apps"
- },
- "en-us" : {
- "line1" : "Enable Apps"
- },
- "es-en" : {
- "line1" : "Hab. aplic."
- },
- "es-es" : {
- "line1" : "Activar apl."
- },
- "es-mx" : {
- "line1" : "Hab. aplic."
- },
- "fr-ca" : {
- "line1" : "Activer app."
- },
- "fr-fr" : {
- "line1" : "Activer app."
- },
- "it-it" : {
- "line1" : "Abilita app"
- },
- "nl-nl" : {
- "line1" : "Apps inschak."
- },
- "pl-pl" : {
- "line1" : "Włącz aplikacje"
- },
- "pt-br" : {
- "line1" : "Ativar aplic."
- },
- "pt-pt" : {
- "line1" : "Activar actualiz."
- },
- "ru-ru" : {
- "line1" : "Вкл. прилож."
- },
- "sv-se" : {
- "line1" : "Aktivera appar"
- },
- "tr-tr" : {
- "line1" : "Uygulamaları aç"
- },
- "zh-cn" : {
- "line1" : "启用应用程序"
- },
- "zh-tw" : {
- "line1" : "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update anford."
- },
- "en-au" : {
- "line1" : "Request update"
- },
- "en-gb" : {
- "line1" : "Request update"
- },
- "en-ie" : {
- "line1" : "Request update"
- },
- "en-us" : {
- "line1" : "Request Update"
- },
- "es-en" : {
- "line1" : "Solicit. actualiz."
- },
- "es-es" : {
- "line1" : "Solicitar actual."
- },
- "es-mx" : {
- "line1" : "Solicit. actualiz."
- },
- "fr-ca" : {
- "line1" : "Demander MAJ"
- },
- "fr-fr" : {
- "line1" : "Demander màj"
- },
- "it-it" : {
- "line1" : "Rich. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Upd. aanvragen"
- },
- "pl-pl" : {
- "line1" : "Zażądaj aktual."
- },
- "pt-br" : {
- "line1" : "Solicitar atualiz."
- },
- "pt-pt" : {
- "line1" : "Solicit. actualiz."
- },
- "ru-ru" : {
- "line1" : "Запрос на обн."
- },
- "sv-se" : {
- "line1" : "Begär uppdat."
- },
- "tr-tr" : {
- "line1" : "Güncelleme iste"
- },
- "zh-cn" : {
- "line1" : "请求更新"
- },
- "zh-tw" : {
- "line1" : "請求更新"
- }
- }
- },
- "StatusNeeded" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update benötigt"
- },
- "en-au" : {
- "line1" : "Update needed"
- },
- "en-gb" : {
- "line1" : "Update needed"
- },
- "en-ie" : {
- "line1" : "Update needed"
- },
- "en-us" : {
- "line1" : "Update Needed"
- },
- "es-en" : {
- "line1" : "Actualiz. neces."
- },
- "es-es" : {
- "line1" : "Actu. necesaria"
- },
- "es-mx" : {
- "line1" : "Actualiz. neces."
- },
- "fr-ca" : {
- "line1" : "Màj requise"
- },
- "fr-fr" : {
- "line1" : "Mise à jour requise"
- },
- "it-it" : {
- "line1" : "Necess. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Update nodig"
- },
- "pl-pl" : {
- "line1" : "Potrzeba aktual."
- },
- "pt-br" : {
- "line1" : "Atualiz. necess."
- },
- "pt-pt" : {
- "line1" : "Actual. necess."
- },
- "ru-ru" : {
- "line1" : "Необх. обновл."
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs"
- },
- "tr-tr" : {
- "line1" : "Güncellenmeli"
- },
- "zh-cn" : {
- "line1" : "需要进行更新"
- },
- "zh-tw" : {
- "line1" : "需更新"
- }
- }
- },
- "StatusPending" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktualisieren..."
- },
- "en-au" : {
- "line1" : "Updating..."
- },
- "en-gb" : {
- "line1" : "Updating..."
- },
- "en-ie" : {
- "line1" : "Updating..."
- },
- "en-us" : {
- "line1" : "Updating..."
- },
- "es-en" : {
- "line1" : "Actualizando..."
- },
- "es-es" : {
- "line1" : "Actualizando..."
- },
- "es-mx" : {
- "line1" : "Actualizando..."
- },
- "fr-ca" : {
- "line1" : "MAJ en cours..."
- },
- "fr-fr" : {
- "line1" : "Màj en cours..."
- },
- "it-it" : {
- "line1" : "Aggiornamento"
- },
- "nl-nl" : {
- "line1" : "Updaten..."
- },
- "pl-pl" : {
- "line1" : "Aktualizowanie"
- },
- "pt-br" : {
- "line1" : "Atualizando..."
- },
- "pt-pt" : {
- "line1" : "A actualizar..."
- },
- "ru-ru" : {
- "line1" : "Обновление..."
- },
- "sv-se" : {
- "line1" : "Uppdaterar..."
- },
- "tr-tr" : {
- "line1" : "Güncelleniyor..."
- },
- "zh-cn" : {
- "line1" : "正在更新......"
- },
- "zh-tw" : {
- "line1" : "更新中..."
- }
- }
- },
- "StatusUpToDate" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktuelle Version"
- },
- "en-au" : {
- "line1" : "Up-to-date"
- },
- "en-gb" : {
- "line1" : "Up-to-date"
- },
- "en-ie" : {
- "line1" : "Up-to-date"
- },
- "en-us" : {
- "line1" : "Up-To-Date"
- },
- "es-en" : {
- "line1" : "Actualizado"
- },
- "es-es" : {
- "line1" : "Actualizada"
- },
- "es-mx" : {
- "line1" : "Actualizado"
- },
- "fr-ca" : {
- "line1" : "Déjà à jour"
- },
- "fr-fr" : {
- "line1" : "Déjà à jour"
- },
- "it-it" : {
- "line1" : "più recente"
- },
- "nl-nl" : {
- "line1" : "Up-to-date"
- },
- "pl-pl" : {
- "line1" : "Aktualne"
- },
- "pt-br" : {
- "line1" : "Atualizado"
- },
- "pt-pt" : {
- "line1" : "Actualizado"
- },
- "ru-ru" : {
- "line1" : "Обновлено"
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs ej"
- },
- "tr-tr" : {
- "line1" : "Güncel"
- },
- "zh-cn" : {
- "line1" : "最新更新"
- },
- "zh-tw" : {
- "line1" : "更新最新"
- }
- }
- },
- "VehicleInfo" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahrzeuginformationen",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck."
- },
- "en-au" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-gb" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-ie" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-us" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es" : {
- "label" : "Información del vehículo",
- "tts" : "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos."
- },
- "es-mx" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "fr-ca" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus."
- },
- "it-it" : {
- "label" : "Informazioni sul veicolo",
- "tts" : "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici."
- },
- "nl-nl" : {
- "label" : "Voertuiginformatie",
- "tts" : "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning."
- },
- "pl-pl" : {
- "label" : "Informacje o pojeździe",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon."
- },
- "pt-br" : {
- "label" : "Informações sobre o veículo",
- "tts" : "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus."
- },
- "pt-pt" : {
- "label" : "Informações do veículo",
- "tts" : "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus."
- },
- "ru-ru" : {
- "label" : "Информация об автомобиле",
- "tts" : "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин."
- },
- "sv-se" : {
- "label" : "Fordonsinformation",
- "tts" : "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck."
- },
- "tr-tr" : {
- "label" : "Araç bilgisi",
- "tts" : "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı."
- },
- "zh-cn" : {
- "label" : "车辆信息",
- "tts" : "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压."
- },
- "zh-tw" : {
- "label" : "車輛資訊",
- "tts" : "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓."
- }
- }
- }
- },
- "version" : "001.001.015"
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "DrivingCharacteristics-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- },
- "user_consent_prompt" : "DrivingCharacteristics"
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Location-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- }
- },
- "user_consent_prompt" : "Location"
- },
- "Navigation-1" : {
- "rpcs" : {
- "AlertManeuver" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ShowConstantTBT" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UpdateTurnList" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Notifications" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "BACKGROUND" ]
- }
- },
- "user_consent_prompt" : "Notifications"
- },
- "Notifications-2" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "FULL" ]
- }
- },
- "user_consent_prompt" : "Old_Notifications"
- },
- "Notifications-3" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "LIMITED" ]
- }
- },
- "user_consent_prompt" : "Old_Notifications"
- },
- "Notifications-4" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "NONE" ]
- }
- },
- "user_consent_prompt" : "New_Notifications"
- },
- "PropriataryData-1" : {
- "rpcs" : {
- "DiagnosticMessage" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GetDTCs" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ReadDID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "VehicleInfo-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- },
- "user_consent_prompt" : "VehicleInfo"
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/sdl_pt_second_update.json b/src/components/policy/policy_external/test/json/sdl_pt_second_update.json
deleted file mode 100644
index 5900acbcfb..0000000000
--- a/src/components/policy/policy_external/test/json/sdl_pt_second_update.json
+++ /dev/null
@@ -1,1764 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "watchdog_timer_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- }
- },
- "consumer_friendly_messages" : {
- "messages" : {
- "AppPermissions" : {
- "languages" : {
- "de-de" : {
- "line1" : "Zugriffsanfrage(n)",
- "line2" : "erlauben?",
- "tts" : "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-gb" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-ie" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-us" : {
- "line1" : "Grant Requested",
- "line2" : "Permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press yes to allow or no to deny."
- },
- "es-en" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "es-es" : {
- "line1" : "¿Conceder permisos",
- "line2" : "solicitados?",
- "tts" : "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar."
- },
- "es-mx" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "fr-ca" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "fr-fr" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "it-it" : {
- "line1" : "Concedi autorizzaz.",
- "line2" : "richiesta(e)?",
- "tts" : "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare."
- },
- "nl-nl" : {
- "line1" : "Aangevraagde",
- "line2" : "permissie(s) verlenen?",
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren."
- },
- "pl-pl" : {
- "line1" : "Udzielić żądanych",
- "line2" : "pozwoleń?",
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "line1" : "Conceder permissão",
- "line2" : "solicitada?",
- "tts" : "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar."
- },
- "pt-pt" : {
- "line1" : "Conceder permiss.",
- "line2" : "solicitada(s)?",
- "tts" : "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar."
- },
- "ru-ru" : {
- "line1" : "Предост. заправш.",
- "line2" : "разрешения?",
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны."
- },
- "sv-se" : {
- "line1" : "Vill du ge",
- "line2" : "tillstånd?",
- "tts" : "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka."
- },
- "tr-tr" : {
- "line1" : "İstenen izinler",
- "line2" : "verilsin mi?",
- "tts" : "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否允许请求的",
- "line2" : "权限?",
- "tts" : "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。"
- },
- "zh-tw" : {
- "line1" : "允許",
- "line2" : "授權請求?",
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsHelp" : {
- "languages" : {
- "de-de" : {
- "tts" : "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es" : {
- "tts" : "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it" : {
- "tts" : "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl" : {
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl" : {
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "tts" : "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt" : {
- "tts" : "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru" : {
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se" : {
- "tts" : "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr" : {
- "tts" : "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "tts" : "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw" : {
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked" : {
- "languages" : {
- "de-de" : {
- "tts" : "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it" : {
- "tts" : "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl" : {
- "tts" : "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl" : {
- "tts" : "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br" : {
- "tts" : "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt" : {
- "tts" : "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru" : {
- "tts" : "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se" : {
- "tts" : "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr" : {
- "tts" : "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn" : {
- "tts" : "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw" : {
- "tts" : "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht autorisiert",
- "tts" : "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren."
- },
- "en-au" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-gb" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-us" : {
- "line1" : "Not Authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "es-en" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es" : {
- "line1" : "No autorizada",
- "tts" : "Esta versión de %appName% no está autorizada y no funcionará con SYNC."
- },
- "es-mx" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "it-it" : {
- "line1" : "non autorizzata",
- "tts" : "Questa versione di %appName% non è autorizzata e non funziona con il SYNC."
- },
- "nl-nl" : {
- "line1" : "niet geautoriseerd",
- "tts" : "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC."
- },
- "pl-pl" : {
- "line1" : "brak autoryzacji",
- "tts" : "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC."
- },
- "pt-br" : {
- "line1" : "não autorizado",
- "tts" : "Esta versão do %appName% não tem autorização e não funcionará com o SYNC."
- },
- "pt-pt" : {
- "line1" : "não autorizada",
- "tts" : "Esta versão de %appName% não está autorizada e não funcionará com o SYNC."
- },
- "ru-ru" : {
- "line1" : "не авторизировано",
- "tts" : "Эта версия %appName% не авторизирована и не будет работать с SYNC."
- },
- "sv-se" : {
- "line1" : "är ej godkänd",
- "tts" : "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC."
- },
- "tr-tr" : {
- "line1" : "için izin yok",
- "tts" : "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz."
- },
- "zh-cn" : {
- "line1" : "未得到授权",
- "tts" : "此版本的%appName% 未得到授权,无法在SYNC上使用。"
- },
- "zh-tw" : {
- "line1" : "無授權",
- "tts" : "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。"
- }
- }
- },
- "AppUnsupported" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht unterstützt",
- "tts" : "Diese Version von %appName% wird von SYNC nicht unterstützt."
- },
- "en-au" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-gb" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-ie" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-us" : {
- "line1" : "Not Supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "es-en" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es" : {
- "line1" : "No compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-mx" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "it-it" : {
- "line1" : "non supportata",
- "tts" : "Questa versione di %appName% non è supportata dal SYNC."
- },
- "nl-nl" : {
- "line1" : "niet ondersteund",
- "tts" : "Deze versie van %appName% wordt niet ondersteund door SYNC."
- },
- "pl-pl" : {
- "line1" : "aplikacja nie obsług.",
- "tts" : "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC."
- },
- "pt-br" : {
- "line1" : "não suportado",
- "tts" : "Esta versão do %appName% não é suportada pelo SYNC."
- },
- "pt-pt" : {
- "line1" : "não suportada",
- "tts" : "Esta versão de %appName% não é suportado pelo SYNC."
- },
- "ru-ru" : {
- "line1" : "не поддерживается",
- "tts" : "Эта версия %appName% не поддерживается SYNC."
- },
- "sv-se" : {
- "line1" : "stöds ej",
- "tts" : "SYNC har inte stöd för den här versionen av %appName%."
- },
- "tr-tr" : {
- "line1" : "desteklenmiyor",
- "tts" : "Bu %appName% sürümü SYNC tarafından desteklenmiyor."
- },
- "zh-cn" : {
- "line1" : "不受支持",
- "tts" : "SYNC不支持此版本的%appName%。"
- },
- "zh-tw" : {
- "line1" : "不支援",
- "tts" : "SYNC 不支援此版本的%appName% 。"
- }
- }
- },
- "DataConsent" : {
- "languages" : {
- "en-us" : {
- "line1" : "Enable Mobile Apps",
- "line2" : "on SYNC? (Uses Data)",
- "tts" : "To use mobile apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device's data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Please press yes or no, or help for more information. "
- }
- }
- },
- "DataConsentHelp" : {
- "languages" : {
- "en-us" : {
- "tts" : "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC mobile apps settings menu. See your Owner Guide for more information. "
- }
- }
- },
- "DisableApps" : {
- "languages" : {
- "de-de" : {
- "line1" : "Auto-Update",
- "line2" : "und Mobile Apps deaktivieren",
- "tts" : "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen."
- },
- "en-au" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-gb" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-us" : {
- "line1" : "Disable Auto-Updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es" : {
- "line1" : "¿Desact. actual. auto",
- "line2" : "y apl. móviles?",
- "tts" : "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar."
- },
- "es-mx" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "it-it" : {
- "line1" : "Disabilitare agg. aut.",
- "line2" : "e app mobili?",
- "tts" : "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare."
- },
- "nl-nl" : {
- "line1" : "Auto-updates en mob.",
- "line2" : "apps uitschakelen?",
- "tts" : "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren."
- },
- "pl-pl" : {
- "line1" : "Wył. automat. aktual.",
- "line2" : "i aplikacje mobilne?",
- "tts" : "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować."
- },
- "pt-br" : {
- "line1" : "Desativar atualizações",
- "line2" : "autom. e aplicativos?",
- "tts" : "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar."
- },
- "pt-pt" : {
- "line1" : "Desact. actual. autom.",
- "line2" : "e aplicações móveis?",
- "tts" : "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar."
- },
- "ru-ru" : {
- "line1" : "Откл. автообновления",
- "line2" : "и мобил. прилож.?",
- "tts" : "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены."
- },
- "sv-se" : {
- "line1" : "Avaktiverar autouppdat.",
- "line2" : "och mobilappar?",
- "tts" : "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta."
- },
- "tr-tr" : {
- "line1" : "Oto. güncelleme ve",
- "line2" : "mobil uygul. kapat?",
- "tts" : "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否禁用自动更新和",
- "line2" : "移动应用程序?",
- "tts" : "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。"
- },
- "zh-tw" : {
- "line1" : "停用自動更新",
- "line2" : "和行動應用程式?",
- "tts" : "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。"
- }
- }
- },
- "DrivingCharacteristics" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahreigenschaften",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus."
- },
- "en-au" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-gb" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-us" : {
- "label" : "Driving Characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es" : {
- "label" : "Características de conducción",
- "tts" : "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad."
- },
- "es-mx" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "fr-ca" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "it-it" : {
- "label" : "Caratteristiche di guida",
- "tts" : "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza."
- },
- "nl-nl" : {
- "label" : "Rijkenmerken",
- "tts" : "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus."
- },
- "pl-pl" : {
- "label" : "Informacje dotyczące stylu jazdy",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa."
- },
- "pt-br" : {
- "label" : "Características de condução",
- "tts" : "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança."
- },
- "pt-pt" : {
- "label" : "Características de condução",
- "tts" : "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança."
- },
- "ru-ru" : {
- "label" : "Характеристики движения",
- "tts" : "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности."
- },
- "sv-se" : {
- "label" : "Köregenskaper",
- "tts" : "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus."
- },
- "tr-tr" : {
- "label" : "Sürüş karakteristikleri",
- "tts" : "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu."
- },
- "zh-cn" : {
- "label" : "行驶特性",
- "tts" : "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态"
- },
- "zh-tw" : {
- "label" : "駕駛特性",
- "tts" : "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態"
- }
- }
- },
- "Location" : {
- "languages" : {
- "de-de" : {
- "label" : "GPS und Geschwindigkeit",
- "tts" : "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs."
- },
- "en-au" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-gb" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-ie" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-us" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "es-en" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es" : {
- "label" : "GPS y velocidad",
- "tts" : "Una aplicación puede acceder al GPS y la velocidad del vehículo."
- },
- "es-mx" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "it-it" : {
- "label" : "GPS e velocità",
- "tts" : "Un'app può avere accesso a GPS e velocità del veicolo."
- },
- "nl-nl" : {
- "label" : "Gps en snelheid",
- "tts" : "Een app heeft toegang tot gps en de snelheid van het voertuig."
- },
- "pl-pl" : {
- "label" : "GPS i prędkość",
- "tts" : "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu."
- },
- "pt-br" : {
- "label" : "GPS e velocidade",
- "tts" : "Um aplicativo pode acessar o GPS e a velocidade do veículo."
- },
- "pt-pt" : {
- "label" : "GPS e velocidade",
- "tts" : "Uma aplicação consegue aceder ao GPS e à velocidade do veículo."
- },
- "ru-ru" : {
- "label" : "GPS и скорость",
- "tts" : "Приложение имеет доступ к GPS и скорости автомобиля."
- },
- "sv-se" : {
- "label" : "GPS och hastighet",
- "tts" : "Appen kan komma åt fordonets GPS och hastighetsmätare."
- },
- "tr-tr" : {
- "label" : "GPS ve hız",
- "tts" : "Bu uygulama aracın GPS ve hız bilgilerine erişebilir."
- },
- "zh-cn" : {
- "label" : "GPS 和车速",
- "tts" : "移动应用程序可以访问车辆 GPS 和车速信息。"
- },
- "zh-tw" : {
- "label" : "GPS和車速",
- "tts" : "應用程式可存取車輛的GPS和速度。"
- }
- }
- },
- "Notifications" : {
- "languages" : {
- "de-de" : {
- "label" : "Push-Benachrichtigungen",
- "tts" : "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden."
- },
- "en-au" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-gb" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-ie" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-us" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "es-en" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es" : {
- "label" : "Notificaciones push",
- "tts" : "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano."
- },
- "es-mx" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca" : {
- "label" : "Notifications instantanées",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr" : {
- "label" : "Notifications push",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "it-it" : {
- "label" : "Notifiche push",
- "tts" : "Un'app può inviare notifiche se eseguita in background."
- },
- "nl-nl" : {
- "label" : "Push-meldingen",
- "tts" : "Een app kan meldingen versturen als deze op de achtergrond actief is."
- },
- "pl-pl" : {
- "label" : "Powiadomienia Push",
- "tts" : "Aplikacja może wysyłać powiadomienia, działając w tle."
- },
- "pt-br" : {
- "label" : "Notificações Push",
- "tts" : "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano."
- },
- "pt-pt" : {
- "label" : "Notificações push",
- "tts" : "Uma aplicação consegue enviar notificações quando está activa em segundo plano."
- },
- "ru-ru" : {
- "label" : "Оповещения о пересылке",
- "tts" : "Если приложение работает в фоновом режиме, оно может отправлять оповещения."
- },
- "sv-se" : {
- "label" : "Push-notiser",
- "tts" : "Appen kan skicka meddelanden när den körs i bakgrunden."
- },
- "tr-tr" : {
- "label" : "Anlık bildirimleri",
- "tts" : "Bir uygulama arka planda çalışırken bildirim gönderebilir."
- },
- "zh-cn" : {
- "label" : "推送通知",
- "tts" : "移动应用程序在后台运行时可推送通知。"
- },
- "zh-tw" : {
- "label" : "傳送通知",
- "tts" : "車輛行進時,應用程式可在背景中傳送通知。"
- }
- }
- },
- "SettingDisableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Updates deakt."
- },
- "en-au" : {
- "line1" : "Disable updates"
- },
- "en-gb" : {
- "line1" : "Disable updates"
- },
- "en-ie" : {
- "line1" : "Disable updates"
- },
- "en-us" : {
- "line1" : "Disable Updates"
- },
- "es-en" : {
- "line1" : "Deshab. actual."
- },
- "es-es" : {
- "line1" : "Desact. actual."
- },
- "es-mx" : {
- "line1" : "Deshab. actual."
- },
- "fr-ca" : {
- "line1" : "Désactiver MAJ"
- },
- "fr-fr" : {
- "line1" : "Désactiver màj"
- },
- "it-it" : {
- "line1" : "Disabilita agg."
- },
- "nl-nl" : {
- "line1" : "Upd. uitschak."
- },
- "pl-pl" : {
- "line1" : "Wyłącz aktual."
- },
- "pt-br" : {
- "line1" : "Desat. atualiz."
- },
- "pt-pt" : {
- "line1" : "Desact. actualiz."
- },
- "ru-ru" : {
- "line1" : "Откл. обновл."
- },
- "sv-se" : {
- "line1" : "Inaktivera uppd."
- },
- "tr-tr" : {
- "line1" : "Güncell. Kapat"
- },
- "zh-cn" : {
- "line1" : "禁用更新"
- },
- "zh-tw" : {
- "line1" : "停用更新"
- }
- }
- },
- "SettingEnableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Apps aktivieren"
- },
- "en-au" : {
- "line1" : "Enable Apps"
- },
- "en-gb" : {
- "line1" : "Enable Apps"
- },
- "en-ie" : {
- "line1" : "Enable Apps"
- },
- "en-us" : {
- "line1" : "Enable Apps"
- },
- "es-en" : {
- "line1" : "Hab. aplic."
- },
- "es-es" : {
- "line1" : "Activar apl."
- },
- "es-mx" : {
- "line1" : "Hab. aplic."
- },
- "fr-ca" : {
- "line1" : "Activer app."
- },
- "fr-fr" : {
- "line1" : "Activer app."
- },
- "it-it" : {
- "line1" : "Abilita app"
- },
- "nl-nl" : {
- "line1" : "Apps inschak."
- },
- "pl-pl" : {
- "line1" : "Włącz aplikacje"
- },
- "pt-br" : {
- "line1" : "Ativar aplic."
- },
- "pt-pt" : {
- "line1" : "Activar actualiz."
- },
- "ru-ru" : {
- "line1" : "Вкл. прилож."
- },
- "sv-se" : {
- "line1" : "Aktivera appar"
- },
- "tr-tr" : {
- "line1" : "Uygulamaları aç"
- },
- "zh-cn" : {
- "line1" : "启用应用程序"
- },
- "zh-tw" : {
- "line1" : "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update anford."
- },
- "en-au" : {
- "line1" : "Request update"
- },
- "en-gb" : {
- "line1" : "Request update"
- },
- "en-ie" : {
- "line1" : "Request update"
- },
- "en-us" : {
- "line1" : "Request Update"
- },
- "es-en" : {
- "line1" : "Solicit. actualiz."
- },
- "es-es" : {
- "line1" : "Solicitar actual."
- },
- "es-mx" : {
- "line1" : "Solicit. actualiz."
- },
- "fr-ca" : {
- "line1" : "Demander MAJ"
- },
- "fr-fr" : {
- "line1" : "Demander màj"
- },
- "it-it" : {
- "line1" : "Rich. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Upd. aanvragen"
- },
- "pl-pl" : {
- "line1" : "Zażądaj aktual."
- },
- "pt-br" : {
- "line1" : "Solicitar atualiz."
- },
- "pt-pt" : {
- "line1" : "Solicit. actualiz."
- },
- "ru-ru" : {
- "line1" : "Запрос на обн."
- },
- "sv-se" : {
- "line1" : "Begär uppdat."
- },
- "tr-tr" : {
- "line1" : "Güncelleme iste"
- },
- "zh-cn" : {
- "line1" : "请求更新"
- },
- "zh-tw" : {
- "line1" : "請求更新"
- }
- }
- },
- "StatusNeeded" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update benötigt"
- },
- "en-au" : {
- "line1" : "Update needed"
- },
- "en-gb" : {
- "line1" : "Update needed"
- },
- "en-ie" : {
- "line1" : "Update needed"
- },
- "en-us" : {
- "line1" : "Update Needed"
- },
- "es-en" : {
- "line1" : "Actualiz. neces."
- },
- "es-es" : {
- "line1" : "Actu. necesaria"
- },
- "es-mx" : {
- "line1" : "Actualiz. neces."
- },
- "fr-ca" : {
- "line1" : "Màj requise"
- },
- "fr-fr" : {
- "line1" : "Mise à jour requise"
- },
- "it-it" : {
- "line1" : "Necess. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Update nodig"
- },
- "pl-pl" : {
- "line1" : "Potrzeba aktual."
- },
- "pt-br" : {
- "line1" : "Atualiz. necess."
- },
- "pt-pt" : {
- "line1" : "Actual. necess."
- },
- "ru-ru" : {
- "line1" : "Необх. обновл."
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs"
- },
- "tr-tr" : {
- "line1" : "Güncellenmeli"
- },
- "zh-cn" : {
- "line1" : "需要进行更新"
- },
- "zh-tw" : {
- "line1" : "需更新"
- }
- }
- },
- "StatusPending" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktualisieren..."
- },
- "en-au" : {
- "line1" : "Updating..."
- },
- "en-gb" : {
- "line1" : "Updating..."
- },
- "en-ie" : {
- "line1" : "Updating..."
- },
- "en-us" : {
- "line1" : "Updating..."
- },
- "es-en" : {
- "line1" : "Actualizando..."
- },
- "es-es" : {
- "line1" : "Actualizando..."
- },
- "es-mx" : {
- "line1" : "Actualizando..."
- },
- "fr-ca" : {
- "line1" : "MAJ en cours..."
- },
- "fr-fr" : {
- "line1" : "Màj en cours..."
- },
- "it-it" : {
- "line1" : "Aggiornamento"
- },
- "nl-nl" : {
- "line1" : "Updaten..."
- },
- "pl-pl" : {
- "line1" : "Aktualizowanie"
- },
- "pt-br" : {
- "line1" : "Atualizando..."
- },
- "pt-pt" : {
- "line1" : "A actualizar..."
- },
- "ru-ru" : {
- "line1" : "Обновление..."
- },
- "sv-se" : {
- "line1" : "Uppdaterar..."
- },
- "tr-tr" : {
- "line1" : "Güncelleniyor..."
- },
- "zh-cn" : {
- "line1" : "正在更新......"
- },
- "zh-tw" : {
- "line1" : "更新中..."
- }
- }
- },
- "StatusUpToDate" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktuelle Version"
- },
- "en-au" : {
- "line1" : "Up-to-date"
- },
- "en-gb" : {
- "line1" : "Up-to-date"
- },
- "en-ie" : {
- "line1" : "Up-to-date"
- },
- "en-us" : {
- "line1" : "Up-To-Date"
- },
- "es-en" : {
- "line1" : "Actualizado"
- },
- "es-es" : {
- "line1" : "Actualizada"
- },
- "es-mx" : {
- "line1" : "Actualizado"
- },
- "fr-ca" : {
- "line1" : "Déjà à jour"
- },
- "fr-fr" : {
- "line1" : "Déjà à jour"
- },
- "it-it" : {
- "line1" : "più recente"
- },
- "nl-nl" : {
- "line1" : "Up-to-date"
- },
- "pl-pl" : {
- "line1" : "Aktualne"
- },
- "pt-br" : {
- "line1" : "Atualizado"
- },
- "pt-pt" : {
- "line1" : "Actualizado"
- },
- "ru-ru" : {
- "line1" : "Обновлено"
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs ej"
- },
- "tr-tr" : {
- "line1" : "Güncel"
- },
- "zh-cn" : {
- "line1" : "最新更新"
- },
- "zh-tw" : {
- "line1" : "更新最新"
- }
- }
- },
- "VehicleInfo" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahrzeuginformationen",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck."
- },
- "en-au" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-gb" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-ie" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-us" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es" : {
- "label" : "Información del vehículo",
- "tts" : "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos."
- },
- "es-mx" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "fr-ca" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus."
- },
- "it-it" : {
- "label" : "Informazioni sul veicolo",
- "tts" : "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici."
- },
- "nl-nl" : {
- "label" : "Voertuiginformatie",
- "tts" : "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning."
- },
- "pl-pl" : {
- "label" : "Informacje o pojeździe",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon."
- },
- "pt-br" : {
- "label" : "Informações sobre o veículo",
- "tts" : "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus."
- },
- "pt-pt" : {
- "label" : "Informações do veículo",
- "tts" : "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus."
- },
- "ru-ru" : {
- "label" : "Информация об автомобиле",
- "tts" : "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин."
- },
- "sv-se" : {
- "label" : "Fordonsinformation",
- "tts" : "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck."
- },
- "tr-tr" : {
- "label" : "Araç bilgisi",
- "tts" : "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı."
- },
- "zh-cn" : {
- "label" : "车辆信息",
- "tts" : "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压."
- },
- "zh-tw" : {
- "label" : "車輛資訊",
- "tts" : "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓."
- }
- }
- }
- },
- "version" : "001.001.015"
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "DrivingCharacteristics-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- },
- "user_consent_prompt" : "DrivingCharacteristics"
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Location-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- }
- },
- "user_consent_prompt" : "Location"
- },
- "Navigation-1" : {
- "rpcs" : {
- "AlertManeuver" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ShowConstantTBT" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UpdateTurnList" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Notifications" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "BACKGROUND" ]
- }
- },
- "user_consent_prompt" : "Notifications"
- },
- "Notifications-2" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "FULL" ]
- }
- },
- "user_consent_prompt" : "Old_Notifications"
- },
- "Notifications-3" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "LIMITED" ]
- }
- },
- "user_consent_prompt" : "New_Notifications"
- },
- "Notifications-4" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "NONE" ]
- }
- },
- "user_consent_prompt" : "New_Notifications"
- },
- "PropriataryData-1" : {
- "rpcs" : {
- "DiagnosticMessage" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GetDTCs" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ReadDID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "VehicleInfo-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- },
- "user_consent_prompt" : "VehicleInfo"
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/sdl_pt_update.json b/src/components/policy/policy_external/test/json/sdl_pt_update.json
deleted file mode 100644
index b3affeb91d..0000000000
--- a/src/components/policy/policy_external/test/json/sdl_pt_update.json
+++ /dev/null
@@ -1,1748 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "watchdog_timer_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- }
- },
- "consumer_friendly_messages" : {
- "messages" : {
- "AppPermissions" : {
- "languages" : {
- "de-de" : {
- "line1" : "Zugriffsanfrage(n)",
- "line2" : "erlauben?",
- "tts" : "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-gb" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-ie" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-us" : {
- "line1" : "Grant Requested",
- "line2" : "Permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press yes to allow or no to deny."
- },
- "es-en" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "es-es" : {
- "line1" : "¿Conceder permisos",
- "line2" : "solicitados?",
- "tts" : "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar."
- },
- "es-mx" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "fr-ca" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "fr-fr" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "it-it" : {
- "line1" : "Concedi autorizzaz.",
- "line2" : "richiesta(e)?",
- "tts" : "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare."
- },
- "nl-nl" : {
- "line1" : "Aangevraagde",
- "line2" : "permissie(s) verlenen?",
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren."
- },
- "pl-pl" : {
- "line1" : "Udzielić żądanych",
- "line2" : "pozwoleń?",
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "line1" : "Conceder permissão",
- "line2" : "solicitada?",
- "tts" : "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar."
- },
- "pt-pt" : {
- "line1" : "Conceder permiss.",
- "line2" : "solicitada(s)?",
- "tts" : "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar."
- },
- "ru-ru" : {
- "line1" : "Предост. заправш.",
- "line2" : "разрешения?",
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны."
- },
- "sv-se" : {
- "line1" : "Vill du ge",
- "line2" : "tillstånd?",
- "tts" : "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka."
- },
- "tr-tr" : {
- "line1" : "İstenen izinler",
- "line2" : "verilsin mi?",
- "tts" : "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否允许请求的",
- "line2" : "权限?",
- "tts" : "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。"
- },
- "zh-tw" : {
- "line1" : "允許",
- "line2" : "授權請求?",
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsHelp" : {
- "languages" : {
- "de-de" : {
- "tts" : "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es" : {
- "tts" : "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it" : {
- "tts" : "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl" : {
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl" : {
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "tts" : "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt" : {
- "tts" : "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru" : {
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se" : {
- "tts" : "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr" : {
- "tts" : "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "tts" : "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw" : {
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked" : {
- "languages" : {
- "de-de" : {
- "tts" : "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it" : {
- "tts" : "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl" : {
- "tts" : "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl" : {
- "tts" : "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br" : {
- "tts" : "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt" : {
- "tts" : "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru" : {
- "tts" : "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se" : {
- "tts" : "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr" : {
- "tts" : "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn" : {
- "tts" : "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw" : {
- "tts" : "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht autorisiert",
- "tts" : "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren."
- },
- "en-au" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-gb" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-us" : {
- "line1" : "Not Authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "es-en" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es" : {
- "line1" : "No autorizada",
- "tts" : "Esta versión de %appName% no está autorizada y no funcionará con SYNC."
- },
- "es-mx" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "it-it" : {
- "line1" : "non autorizzata",
- "tts" : "Questa versione di %appName% non è autorizzata e non funziona con il SYNC."
- },
- "nl-nl" : {
- "line1" : "niet geautoriseerd",
- "tts" : "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC."
- },
- "pl-pl" : {
- "line1" : "brak autoryzacji",
- "tts" : "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC."
- },
- "pt-br" : {
- "line1" : "não autorizado",
- "tts" : "Esta versão do %appName% não tem autorização e não funcionará com o SYNC."
- },
- "pt-pt" : {
- "line1" : "não autorizada",
- "tts" : "Esta versão de %appName% não está autorizada e não funcionará com o SYNC."
- },
- "ru-ru" : {
- "line1" : "не авторизировано",
- "tts" : "Эта версия %appName% не авторизирована и не будет работать с SYNC."
- },
- "sv-se" : {
- "line1" : "är ej godkänd",
- "tts" : "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC."
- },
- "tr-tr" : {
- "line1" : "için izin yok",
- "tts" : "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz."
- },
- "zh-cn" : {
- "line1" : "未得到授权",
- "tts" : "此版本的%appName% 未得到授权,无法在SYNC上使用。"
- },
- "zh-tw" : {
- "line1" : "無授權",
- "tts" : "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。"
- }
- }
- },
- "AppUnsupported" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht unterstützt",
- "tts" : "Diese Version von %appName% wird von SYNC nicht unterstützt."
- },
- "en-au" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-gb" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-ie" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-us" : {
- "line1" : "Not Supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "es-en" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es" : {
- "line1" : "No compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-mx" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "it-it" : {
- "line1" : "non supportata",
- "tts" : "Questa versione di %appName% non è supportata dal SYNC."
- },
- "nl-nl" : {
- "line1" : "niet ondersteund",
- "tts" : "Deze versie van %appName% wordt niet ondersteund door SYNC."
- },
- "pl-pl" : {
- "line1" : "aplikacja nie obsług.",
- "tts" : "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC."
- },
- "pt-br" : {
- "line1" : "não suportado",
- "tts" : "Esta versão do %appName% não é suportada pelo SYNC."
- },
- "pt-pt" : {
- "line1" : "não suportada",
- "tts" : "Esta versão de %appName% não é suportado pelo SYNC."
- },
- "ru-ru" : {
- "line1" : "не поддерживается",
- "tts" : "Эта версия %appName% не поддерживается SYNC."
- },
- "sv-se" : {
- "line1" : "stöds ej",
- "tts" : "SYNC har inte stöd för den här versionen av %appName%."
- },
- "tr-tr" : {
- "line1" : "desteklenmiyor",
- "tts" : "Bu %appName% sürümü SYNC tarafından desteklenmiyor."
- },
- "zh-cn" : {
- "line1" : "不受支持",
- "tts" : "SYNC不支持此版本的%appName%。"
- },
- "zh-tw" : {
- "line1" : "不支援",
- "tts" : "SYNC 不支援此版本的%appName% 。"
- }
- }
- },
- "DataConsent" : {
- "languages" : {
- "en-us" : {
- "line1" : "Enable Mobile Apps",
- "line2" : "on SYNC? (Uses Data)",
- "tts" : "To use mobile apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device's data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Please press yes or no, or help for more information. "
- }
- }
- },
- "DataConsentHelp" : {
- "languages" : {
- "en-us" : {
- "tts" : "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC mobile apps settings menu. See your Owner Guide for more information. "
- }
- }
- },
- "DisableApps" : {
- "languages" : {
- "de-de" : {
- "line1" : "Auto-Update",
- "line2" : "und Mobile Apps deaktivieren",
- "tts" : "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen."
- },
- "en-au" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-gb" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-us" : {
- "line1" : "Disable Auto-Updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es" : {
- "line1" : "¿Desact. actual. auto",
- "line2" : "y apl. móviles?",
- "tts" : "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar."
- },
- "es-mx" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "it-it" : {
- "line1" : "Disabilitare agg. aut.",
- "line2" : "e app mobili?",
- "tts" : "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare."
- },
- "nl-nl" : {
- "line1" : "Auto-updates en mob.",
- "line2" : "apps uitschakelen?",
- "tts" : "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren."
- },
- "pl-pl" : {
- "line1" : "Wył. automat. aktual.",
- "line2" : "i aplikacje mobilne?",
- "tts" : "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować."
- },
- "pt-br" : {
- "line1" : "Desativar atualizações",
- "line2" : "autom. e aplicativos?",
- "tts" : "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar."
- },
- "pt-pt" : {
- "line1" : "Desact. actual. autom.",
- "line2" : "e aplicações móveis?",
- "tts" : "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar."
- },
- "ru-ru" : {
- "line1" : "Откл. автообновления",
- "line2" : "и мобил. прилож.?",
- "tts" : "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены."
- },
- "sv-se" : {
- "line1" : "Avaktiverar autouppdat.",
- "line2" : "och mobilappar?",
- "tts" : "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta."
- },
- "tr-tr" : {
- "line1" : "Oto. güncelleme ve",
- "line2" : "mobil uygul. kapat?",
- "tts" : "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否禁用自动更新和",
- "line2" : "移动应用程序?",
- "tts" : "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。"
- },
- "zh-tw" : {
- "line1" : "停用自動更新",
- "line2" : "和行動應用程式?",
- "tts" : "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。"
- }
- }
- },
- "DrivingCharacteristics" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahreigenschaften",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus."
- },
- "en-au" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-gb" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-us" : {
- "label" : "Driving Characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es" : {
- "label" : "Características de conducción",
- "tts" : "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad."
- },
- "es-mx" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "fr-ca" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "it-it" : {
- "label" : "Caratteristiche di guida",
- "tts" : "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza."
- },
- "nl-nl" : {
- "label" : "Rijkenmerken",
- "tts" : "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus."
- },
- "pl-pl" : {
- "label" : "Informacje dotyczące stylu jazdy",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa."
- },
- "pt-br" : {
- "label" : "Características de condução",
- "tts" : "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança."
- },
- "pt-pt" : {
- "label" : "Características de condução",
- "tts" : "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança."
- },
- "ru-ru" : {
- "label" : "Характеристики движения",
- "tts" : "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности."
- },
- "sv-se" : {
- "label" : "Köregenskaper",
- "tts" : "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus."
- },
- "tr-tr" : {
- "label" : "Sürüş karakteristikleri",
- "tts" : "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu."
- },
- "zh-cn" : {
- "label" : "行驶特性",
- "tts" : "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态"
- },
- "zh-tw" : {
- "label" : "駕駛特性",
- "tts" : "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態"
- }
- }
- },
- "Location" : {
- "languages" : {
- "de-de" : {
- "label" : "GPS und Geschwindigkeit",
- "tts" : "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs."
- },
- "en-au" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-gb" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-ie" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-us" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "es-en" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es" : {
- "label" : "GPS y velocidad",
- "tts" : "Una aplicación puede acceder al GPS y la velocidad del vehículo."
- },
- "es-mx" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "it-it" : {
- "label" : "GPS e velocità",
- "tts" : "Un'app può avere accesso a GPS e velocità del veicolo."
- },
- "nl-nl" : {
- "label" : "Gps en snelheid",
- "tts" : "Een app heeft toegang tot gps en de snelheid van het voertuig."
- },
- "pl-pl" : {
- "label" : "GPS i prędkość",
- "tts" : "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu."
- },
- "pt-br" : {
- "label" : "GPS e velocidade",
- "tts" : "Um aplicativo pode acessar o GPS e a velocidade do veículo."
- },
- "pt-pt" : {
- "label" : "GPS e velocidade",
- "tts" : "Uma aplicação consegue aceder ao GPS e à velocidade do veículo."
- },
- "ru-ru" : {
- "label" : "GPS и скорость",
- "tts" : "Приложение имеет доступ к GPS и скорости автомобиля."
- },
- "sv-se" : {
- "label" : "GPS och hastighet",
- "tts" : "Appen kan komma åt fordonets GPS och hastighetsmätare."
- },
- "tr-tr" : {
- "label" : "GPS ve hız",
- "tts" : "Bu uygulama aracın GPS ve hız bilgilerine erişebilir."
- },
- "zh-cn" : {
- "label" : "GPS 和车速",
- "tts" : "移动应用程序可以访问车辆 GPS 和车速信息。"
- },
- "zh-tw" : {
- "label" : "GPS和車速",
- "tts" : "應用程式可存取車輛的GPS和速度。"
- }
- }
- },
- "Notifications" : {
- "languages" : {
- "de-de" : {
- "label" : "Push-Benachrichtigungen",
- "tts" : "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden."
- },
- "en-au" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-gb" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-ie" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-us" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "es-en" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es" : {
- "label" : "Notificaciones push",
- "tts" : "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano."
- },
- "es-mx" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca" : {
- "label" : "Notifications instantanées",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr" : {
- "label" : "Notifications push",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "it-it" : {
- "label" : "Notifiche push",
- "tts" : "Un'app può inviare notifiche se eseguita in background."
- },
- "nl-nl" : {
- "label" : "Push-meldingen",
- "tts" : "Een app kan meldingen versturen als deze op de achtergrond actief is."
- },
- "pl-pl" : {
- "label" : "Powiadomienia Push",
- "tts" : "Aplikacja może wysyłać powiadomienia, działając w tle."
- },
- "pt-br" : {
- "label" : "Notificações Push",
- "tts" : "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano."
- },
- "pt-pt" : {
- "label" : "Notificações push",
- "tts" : "Uma aplicação consegue enviar notificações quando está activa em segundo plano."
- },
- "ru-ru" : {
- "label" : "Оповещения о пересылке",
- "tts" : "Если приложение работает в фоновом режиме, оно может отправлять оповещения."
- },
- "sv-se" : {
- "label" : "Push-notiser",
- "tts" : "Appen kan skicka meddelanden när den körs i bakgrunden."
- },
- "tr-tr" : {
- "label" : "Anlık bildirimleri",
- "tts" : "Bir uygulama arka planda çalışırken bildirim gönderebilir."
- },
- "zh-cn" : {
- "label" : "推送通知",
- "tts" : "移动应用程序在后台运行时可推送通知。"
- },
- "zh-tw" : {
- "label" : "傳送通知",
- "tts" : "車輛行進時,應用程式可在背景中傳送通知。"
- }
- }
- },
- "SettingDisableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Updates deakt."
- },
- "en-au" : {
- "line1" : "Disable updates"
- },
- "en-gb" : {
- "line1" : "Disable updates"
- },
- "en-ie" : {
- "line1" : "Disable updates"
- },
- "en-us" : {
- "line1" : "Disable Updates"
- },
- "es-en" : {
- "line1" : "Deshab. actual."
- },
- "es-es" : {
- "line1" : "Desact. actual."
- },
- "es-mx" : {
- "line1" : "Deshab. actual."
- },
- "fr-ca" : {
- "line1" : "Désactiver MAJ"
- },
- "fr-fr" : {
- "line1" : "Désactiver màj"
- },
- "it-it" : {
- "line1" : "Disabilita agg."
- },
- "nl-nl" : {
- "line1" : "Upd. uitschak."
- },
- "pl-pl" : {
- "line1" : "Wyłącz aktual."
- },
- "pt-br" : {
- "line1" : "Desat. atualiz."
- },
- "pt-pt" : {
- "line1" : "Desact. actualiz."
- },
- "ru-ru" : {
- "line1" : "Откл. обновл."
- },
- "sv-se" : {
- "line1" : "Inaktivera uppd."
- },
- "tr-tr" : {
- "line1" : "Güncell. Kapat"
- },
- "zh-cn" : {
- "line1" : "禁用更新"
- },
- "zh-tw" : {
- "line1" : "停用更新"
- }
- }
- },
- "SettingEnableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Apps aktivieren"
- },
- "en-au" : {
- "line1" : "Enable Apps"
- },
- "en-gb" : {
- "line1" : "Enable Apps"
- },
- "en-ie" : {
- "line1" : "Enable Apps"
- },
- "en-us" : {
- "line1" : "Enable Apps"
- },
- "es-en" : {
- "line1" : "Hab. aplic."
- },
- "es-es" : {
- "line1" : "Activar apl."
- },
- "es-mx" : {
- "line1" : "Hab. aplic."
- },
- "fr-ca" : {
- "line1" : "Activer app."
- },
- "fr-fr" : {
- "line1" : "Activer app."
- },
- "it-it" : {
- "line1" : "Abilita app"
- },
- "nl-nl" : {
- "line1" : "Apps inschak."
- },
- "pl-pl" : {
- "line1" : "Włącz aplikacje"
- },
- "pt-br" : {
- "line1" : "Ativar aplic."
- },
- "pt-pt" : {
- "line1" : "Activar actualiz."
- },
- "ru-ru" : {
- "line1" : "Вкл. прилож."
- },
- "sv-se" : {
- "line1" : "Aktivera appar"
- },
- "tr-tr" : {
- "line1" : "Uygulamaları aç"
- },
- "zh-cn" : {
- "line1" : "启用应用程序"
- },
- "zh-tw" : {
- "line1" : "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update anford."
- },
- "en-au" : {
- "line1" : "Request update"
- },
- "en-gb" : {
- "line1" : "Request update"
- },
- "en-ie" : {
- "line1" : "Request update"
- },
- "en-us" : {
- "line1" : "Request Update"
- },
- "es-en" : {
- "line1" : "Solicit. actualiz."
- },
- "es-es" : {
- "line1" : "Solicitar actual."
- },
- "es-mx" : {
- "line1" : "Solicit. actualiz."
- },
- "fr-ca" : {
- "line1" : "Demander MAJ"
- },
- "fr-fr" : {
- "line1" : "Demander màj"
- },
- "it-it" : {
- "line1" : "Rich. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Upd. aanvragen"
- },
- "pl-pl" : {
- "line1" : "Zażądaj aktual."
- },
- "pt-br" : {
- "line1" : "Solicitar atualiz."
- },
- "pt-pt" : {
- "line1" : "Solicit. actualiz."
- },
- "ru-ru" : {
- "line1" : "Запрос на обн."
- },
- "sv-se" : {
- "line1" : "Begär uppdat."
- },
- "tr-tr" : {
- "line1" : "Güncelleme iste"
- },
- "zh-cn" : {
- "line1" : "请求更新"
- },
- "zh-tw" : {
- "line1" : "請求更新"
- }
- }
- },
- "StatusNeeded" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update benötigt"
- },
- "en-au" : {
- "line1" : "Update needed"
- },
- "en-gb" : {
- "line1" : "Update needed"
- },
- "en-ie" : {
- "line1" : "Update needed"
- },
- "en-us" : {
- "line1" : "Update Needed"
- },
- "es-en" : {
- "line1" : "Actualiz. neces."
- },
- "es-es" : {
- "line1" : "Actu. necesaria"
- },
- "es-mx" : {
- "line1" : "Actualiz. neces."
- },
- "fr-ca" : {
- "line1" : "Màj requise"
- },
- "fr-fr" : {
- "line1" : "Mise à jour requise"
- },
- "it-it" : {
- "line1" : "Necess. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Update nodig"
- },
- "pl-pl" : {
- "line1" : "Potrzeba aktual."
- },
- "pt-br" : {
- "line1" : "Atualiz. necess."
- },
- "pt-pt" : {
- "line1" : "Actual. necess."
- },
- "ru-ru" : {
- "line1" : "Необх. обновл."
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs"
- },
- "tr-tr" : {
- "line1" : "Güncellenmeli"
- },
- "zh-cn" : {
- "line1" : "需要进行更新"
- },
- "zh-tw" : {
- "line1" : "需更新"
- }
- }
- },
- "StatusPending" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktualisieren..."
- },
- "en-au" : {
- "line1" : "Updating..."
- },
- "en-gb" : {
- "line1" : "Updating..."
- },
- "en-ie" : {
- "line1" : "Updating..."
- },
- "en-us" : {
- "line1" : "Updating..."
- },
- "es-en" : {
- "line1" : "Actualizando..."
- },
- "es-es" : {
- "line1" : "Actualizando..."
- },
- "es-mx" : {
- "line1" : "Actualizando..."
- },
- "fr-ca" : {
- "line1" : "MAJ en cours..."
- },
- "fr-fr" : {
- "line1" : "Màj en cours..."
- },
- "it-it" : {
- "line1" : "Aggiornamento"
- },
- "nl-nl" : {
- "line1" : "Updaten..."
- },
- "pl-pl" : {
- "line1" : "Aktualizowanie"
- },
- "pt-br" : {
- "line1" : "Atualizando..."
- },
- "pt-pt" : {
- "line1" : "A actualizar..."
- },
- "ru-ru" : {
- "line1" : "Обновление..."
- },
- "sv-se" : {
- "line1" : "Uppdaterar..."
- },
- "tr-tr" : {
- "line1" : "Güncelleniyor..."
- },
- "zh-cn" : {
- "line1" : "正在更新......"
- },
- "zh-tw" : {
- "line1" : "更新中..."
- }
- }
- },
- "StatusUpToDate" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktuelle Version"
- },
- "en-au" : {
- "line1" : "Up-to-date"
- },
- "en-gb" : {
- "line1" : "Up-to-date"
- },
- "en-ie" : {
- "line1" : "Up-to-date"
- },
- "en-us" : {
- "line1" : "Up-To-Date"
- },
- "es-en" : {
- "line1" : "Actualizado"
- },
- "es-es" : {
- "line1" : "Actualizada"
- },
- "es-mx" : {
- "line1" : "Actualizado"
- },
- "fr-ca" : {
- "line1" : "Déjà à jour"
- },
- "fr-fr" : {
- "line1" : "Déjà à jour"
- },
- "it-it" : {
- "line1" : "più recente"
- },
- "nl-nl" : {
- "line1" : "Up-to-date"
- },
- "pl-pl" : {
- "line1" : "Aktualne"
- },
- "pt-br" : {
- "line1" : "Atualizado"
- },
- "pt-pt" : {
- "line1" : "Actualizado"
- },
- "ru-ru" : {
- "line1" : "Обновлено"
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs ej"
- },
- "tr-tr" : {
- "line1" : "Güncel"
- },
- "zh-cn" : {
- "line1" : "最新更新"
- },
- "zh-tw" : {
- "line1" : "更新最新"
- }
- }
- },
- "VehicleInfo" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahrzeuginformationen",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck."
- },
- "en-au" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-gb" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-ie" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-us" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es" : {
- "label" : "Información del vehículo",
- "tts" : "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos."
- },
- "es-mx" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "fr-ca" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus."
- },
- "it-it" : {
- "label" : "Informazioni sul veicolo",
- "tts" : "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici."
- },
- "nl-nl" : {
- "label" : "Voertuiginformatie",
- "tts" : "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning."
- },
- "pl-pl" : {
- "label" : "Informacje o pojeździe",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon."
- },
- "pt-br" : {
- "label" : "Informações sobre o veículo",
- "tts" : "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus."
- },
- "pt-pt" : {
- "label" : "Informações do veículo",
- "tts" : "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus."
- },
- "ru-ru" : {
- "label" : "Информация об автомобиле",
- "tts" : "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин."
- },
- "sv-se" : {
- "label" : "Fordonsinformation",
- "tts" : "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck."
- },
- "tr-tr" : {
- "label" : "Araç bilgisi",
- "tts" : "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı."
- },
- "zh-cn" : {
- "label" : "车辆信息",
- "tts" : "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压."
- },
- "zh-tw" : {
- "label" : "車輛資訊",
- "tts" : "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓."
- }
- }
- }
- },
- "version" : "001.001.015"
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "DrivingCharacteristics-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- },
- "user_consent_prompt" : "DrivingCharacteristics"
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Location-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- }
- },
- "user_consent_prompt" : "Location"
- },
- "Navigation-1" : {
- "rpcs" : {
- "AlertManeuver" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ShowConstantTBT" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UpdateTurnList" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Notifications" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "BACKGROUND" ]
- }
- },
- "user_consent_prompt" : "Notifications"
- },
- "Notifications2" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "FULL" ]
- }
- },
- "user_consent_prompt" : "Notifications"
- },
- "PropriataryData-1" : {
- "rpcs" : {
- "DiagnosticMessage" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GetDTCs" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ReadDID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "VehicleInfo-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- },
- "user_consent_prompt" : "VehicleInfo"
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_have_params.json b/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_have_params.json
deleted file mode 100644
index 639d0143c8..0000000000
--- a/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_have_params.json
+++ /dev/null
@@ -1,2360 +0,0 @@
-{
- "policy_table" : {
- "module_config": {
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 20,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [
- 1,
- 5,
- 25,
- 125,
- 625
- ],
- "endpoints": {
- "0x04": {
- "default": [
- "http://x.x.x.x:3000/api/1/softwareUpdate"
- ]
- },
- "0x07": {
- "default": [
- "http://x.x.x.x:3000/api/1/policies"
- ]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "VOICECOM": 20,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "ProprietaryData-3": {
- "rpcs": {
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "PropriataryData-2": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DiagnosticMessageOnly": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "OnKeyboardInputOnlyGroup": {
- "rpcs": {
- "OnKeyboardInput": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "OnTouchEventOnlyGroup": {
- "rpcs": {
- "OnTouchEvent": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- },
- "SendLocation": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "longitudeDegrees",
- "latitudeDegrees",
- "locationDescription",
- "phoneNumber"
- ]
- }
- }
- },
- "BackgroundAPT": {
- "rpcs": {
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DialNumberOnly": {
- "rpcs": {
- "DialNumber": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "SendLocationOnly": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "locationName",
- "locationImage",
- "deliveryMode"
- ]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.023",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting permission to use the following: %functionalGroupLabels%.\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "The %appName% App is requesting permission to use the following: %functionalGroupLabels%.\r\n\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. I agree and consent."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior."
- },
- "fr-ca": {
- "tts": "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\n\r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. J’accepte et je consens."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with Mobile Apps. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\r\n\r\nIf you enable the use of mobile apps from your mobile device on SYNC, you agree that SYNC can periodically use your device’s data plan to send and receive data that keeps your settings current and enables app functionality. Data sent to Ford U.S. includes your VIN and SYNC module number. Standard rates may apply.\r\n\r\nTo change settings or turn off later, visit the SYNC mobile apps settings menu. See Owner Guide for more information. I agree and consent."
- },
- "es-mx": {
- "textBody": "Si permite el uso de apps de su móvil vía SYNC®, acepta que SYNC® puede utilizar el plan de datos de su equipo para enviar y recibir info para actualizar su configuración y permitir la funcionalidad de la app. Datos enviados a Ford US incluyen VIN y # de módulo de SYNC®. Cargos a su plan de datos pueden aplicar. \r\n\r\nPara cambiar la config. de SYNC® o apagarlo, acceda a Menú de configuración de apps. Vea la Guía del Propietario para más info. Estoy de acuerdo y acepto lo anterior."
- },
- "fr-ca": {
- "textBody": "Si vous activez les applications mobiles sur SYNC, vous acceptez que SYNC utilise votre forfait de données afin de maintenir vos réglages à jour et assurer la pleine fonctionnalité. Parmi les données envoyées à Ford US, notons le NIV et le numéro de module SYNC. Des frais de base peuvent s’appliquer. \r\n\r\nPour modifier les réglages ou désactiver les applications, consultez le menu des réglages des applications de SYNC. Voir le Manuel du propriétaire. J’accepte et je consens."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information."
- },
- "es-mx": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução",
- "line1": "Caract. Condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and Speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et Vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push Notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications Instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push",
- "line1": "Notificações"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingAppPermissions": {
- "languages": {
- "en-us": {
- "textBody": "Change %AppName%’s functionality and use of data as described below. See App terms of service and privacy policies."
- },
- "es-mx": {
- "textBody": "Para cambiar la funcionalidad de %appName% y usar los datos como se describe más adelante. Consulte los términos de servicio y políticas de privacidad de la App."
- },
- "fr-ca": {
- "textBody": "Pour modifier la fonctionnalité de %appName% et l’usage des données comme décrit ci-dessous. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application."
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure.",
- "label": "Vehicle Information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos.",
- "label": "Información del Vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus.",
- "label": "Renseignements du Véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo",
- "line1": "Inform. Veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "Base-4"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "DataConsent-2"
- ]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ]
- },
- "1234": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NORMAL",
- "default_hmi": "FULL",
- "groups": [
- "SendLocation", "SendLocationOnly"
- ]
- },
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1.json b/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1.json
deleted file mode 100644
index 53216cab3d..0000000000
--- a/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1.json
+++ /dev/null
@@ -1,2362 +0,0 @@
-{
- "policy_table" : {
- "module_config": {
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 20,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [
- 1,
- 5,
- 25,
- 125,
- 625
- ],
- "endpoints": {
- "0x04": {
- "default": [
- "http://x.x.x.x:3000/api/1/softwareUpdate"
- ]
- },
- "0x07": {
- "default": [
- "http://x.x.x.x:3000/api/1/policies"
- ]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "VOICECOM": 20,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "ProprietaryData-3": {
- "rpcs": {
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "PropriataryData-2": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DiagnosticMessageOnly": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "OnKeyboardInputOnlyGroup": {
- "rpcs": {
- "OnKeyboardInput": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "OnTouchEventOnlyGroup": {
- "rpcs": {
- "OnTouchEvent": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- },
- "SendLocation": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "longitudeDegrees",
- "latitudeDegrees",
- "locationName",
- "locationDescription",
- "addressLines",
- "phoneNumber",
- "locationImage",
- "deliveryMode",
- "timeStamp",
- "address"
- ]
- }
- }
- },
- "BackgroundAPT": {
- "rpcs": {
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DialNumberOnly": {
- "rpcs": {
- "DialNumber": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "SendLocationOnly": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ],
- "parameters": []
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.023",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting permission to use the following: %functionalGroupLabels%.\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "The %appName% App is requesting permission to use the following: %functionalGroupLabels%.\r\n\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. I agree and consent."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior."
- },
- "fr-ca": {
- "tts": "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\n\r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. J’accepte et je consens."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with Mobile Apps. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\r\n\r\nIf you enable the use of mobile apps from your mobile device on SYNC, you agree that SYNC can periodically use your device’s data plan to send and receive data that keeps your settings current and enables app functionality. Data sent to Ford U.S. includes your VIN and SYNC module number. Standard rates may apply.\r\n\r\nTo change settings or turn off later, visit the SYNC mobile apps settings menu. See Owner Guide for more information. I agree and consent."
- },
- "es-mx": {
- "textBody": "Si permite el uso de apps de su móvil vía SYNC®, acepta que SYNC® puede utilizar el plan de datos de su equipo para enviar y recibir info para actualizar su configuración y permitir la funcionalidad de la app. Datos enviados a Ford US incluyen VIN y # de módulo de SYNC®. Cargos a su plan de datos pueden aplicar. \r\n\r\nPara cambiar la config. de SYNC® o apagarlo, acceda a Menú de configuración de apps. Vea la Guía del Propietario para más info. Estoy de acuerdo y acepto lo anterior."
- },
- "fr-ca": {
- "textBody": "Si vous activez les applications mobiles sur SYNC, vous acceptez que SYNC utilise votre forfait de données afin de maintenir vos réglages à jour et assurer la pleine fonctionnalité. Parmi les données envoyées à Ford US, notons le NIV et le numéro de module SYNC. Des frais de base peuvent s’appliquer. \r\n\r\nPour modifier les réglages ou désactiver les applications, consultez le menu des réglages des applications de SYNC. Voir le Manuel du propriétaire. J’accepte et je consens."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information."
- },
- "es-mx": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução",
- "line1": "Caract. Condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and Speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et Vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push Notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications Instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push",
- "line1": "Notificações"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingAppPermissions": {
- "languages": {
- "en-us": {
- "textBody": "Change %AppName%’s functionality and use of data as described below. See App terms of service and privacy policies."
- },
- "es-mx": {
- "textBody": "Para cambiar la funcionalidad de %appName% y usar los datos como se describe más adelante. Consulte los términos de servicio y políticas de privacidad de la App."
- },
- "fr-ca": {
- "textBody": "Pour modifier la fonctionnalité de %appName% et l’usage des données comme décrit ci-dessous. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application."
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure.",
- "label": "Vehicle Information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos.",
- "label": "Información del Vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus.",
- "label": "Renseignements du Véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo",
- "line1": "Inform. Veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "Base-4"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "DataConsent-2"
- ]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ]
- },
- "1234": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NORMAL",
- "default_hmi": "FULL",
- "groups": [
- "SendLocation", "SendLocationOnly"
- ]
- },
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1_omitted_in2.json b/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1_omitted_in2.json
deleted file mode 100644
index a529dc9a3b..0000000000
--- a/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1_omitted_in2.json
+++ /dev/null
@@ -1,2350 +0,0 @@
-{
- "policy_table" : {
- "module_config": {
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 20,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [
- 1,
- 5,
- 25,
- 125,
- 625
- ],
- "endpoints": {
- "0x04": {
- "default": [
- "http://x.x.x.x:3000/api/1/softwareUpdate"
- ]
- },
- "0x07": {
- "default": [
- "http://x.x.x.x:3000/api/1/policies"
- ]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "VOICECOM": 20,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "ProprietaryData-3": {
- "rpcs": {
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "PropriataryData-2": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DiagnosticMessageOnly": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "OnKeyboardInputOnlyGroup": {
- "rpcs": {
- "OnKeyboardInput": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "OnTouchEventOnlyGroup": {
- "rpcs": {
- "OnTouchEvent": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- },
- "SendLocation": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "BackgroundAPT": {
- "rpcs": {
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DialNumberOnly": {
- "rpcs": {
- "DialNumber": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "SendLocationOnly": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ],
- "parameters": []
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.023",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting permission to use the following: %functionalGroupLabels%.\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "The %appName% App is requesting permission to use the following: %functionalGroupLabels%.\r\n\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. I agree and consent."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior."
- },
- "fr-ca": {
- "tts": "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\n\r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. J’accepte et je consens."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with Mobile Apps. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\r\n\r\nIf you enable the use of mobile apps from your mobile device on SYNC, you agree that SYNC can periodically use your device’s data plan to send and receive data that keeps your settings current and enables app functionality. Data sent to Ford U.S. includes your VIN and SYNC module number. Standard rates may apply.\r\n\r\nTo change settings or turn off later, visit the SYNC mobile apps settings menu. See Owner Guide for more information. I agree and consent."
- },
- "es-mx": {
- "textBody": "Si permite el uso de apps de su móvil vía SYNC®, acepta que SYNC® puede utilizar el plan de datos de su equipo para enviar y recibir info para actualizar su configuración y permitir la funcionalidad de la app. Datos enviados a Ford US incluyen VIN y # de módulo de SYNC®. Cargos a su plan de datos pueden aplicar. \r\n\r\nPara cambiar la config. de SYNC® o apagarlo, acceda a Menú de configuración de apps. Vea la Guía del Propietario para más info. Estoy de acuerdo y acepto lo anterior."
- },
- "fr-ca": {
- "textBody": "Si vous activez les applications mobiles sur SYNC, vous acceptez que SYNC utilise votre forfait de données afin de maintenir vos réglages à jour et assurer la pleine fonctionnalité. Parmi les données envoyées à Ford US, notons le NIV et le numéro de module SYNC. Des frais de base peuvent s’appliquer. \r\n\r\nPour modifier les réglages ou désactiver les applications, consultez le menu des réglages des applications de SYNC. Voir le Manuel du propriétaire. J’accepte et je consens."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information."
- },
- "es-mx": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução",
- "line1": "Caract. Condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and Speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et Vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push Notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications Instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push",
- "line1": "Notificações"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingAppPermissions": {
- "languages": {
- "en-us": {
- "textBody": "Change %AppName%’s functionality and use of data as described below. See App terms of service and privacy policies."
- },
- "es-mx": {
- "textBody": "Para cambiar la funcionalidad de %appName% y usar los datos como se describe más adelante. Consulte los términos de servicio y políticas de privacidad de la App."
- },
- "fr-ca": {
- "textBody": "Pour modifier la fonctionnalité de %appName% et l’usage des données comme décrit ci-dessous. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application."
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure.",
- "label": "Vehicle Information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos.",
- "label": "Información del Vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus.",
- "label": "Renseignements du Véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo",
- "line1": "Inform. Veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "Base-4"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "DataConsent-2"
- ]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ]
- },
- "1234": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NORMAL",
- "default_hmi": "FULL",
- "groups": [
- "SendLocation", "SendLocationOnly"
- ]
- },
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/sdl_update_pt_send_location.json b/src/components/policy/policy_external/test/json/sdl_update_pt_send_location.json
deleted file mode 100644
index a57791e248..0000000000
--- a/src/components/policy/policy_external/test/json/sdl_update_pt_send_location.json
+++ /dev/null
@@ -1,2349 +0,0 @@
-{
- "policy_table" : {
- "module_config": {
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 20,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [
- 1,
- 5,
- 25,
- 125,
- 625
- ],
- "endpoints": {
- "0x04": {
- "default": [
- "http://x.x.x.x:3000/api/1/softwareUpdate"
- ]
- },
- "0x07": {
- "default": [
- "http://x.x.x.x:3000/api/1/policies"
- ]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "VOICECOM": 20,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "ProprietaryData-3": {
- "rpcs": {
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "PropriataryData-2": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DiagnosticMessageOnly": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "OnKeyboardInputOnlyGroup": {
- "rpcs": {
- "OnKeyboardInput": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "OnTouchEventOnlyGroup": {
- "rpcs": {
- "OnTouchEvent": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- },
- "SendLocation": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "BackgroundAPT": {
- "rpcs": {
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DialNumberOnly": {
- "rpcs": {
- "DialNumber": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "SendLocationOnly": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.023",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting permission to use the following: %functionalGroupLabels%.\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "The %appName% App is requesting permission to use the following: %functionalGroupLabels%.\r\n\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. I agree and consent."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior."
- },
- "fr-ca": {
- "tts": "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\n\r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. J’accepte et je consens."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with Mobile Apps. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\r\n\r\nIf you enable the use of mobile apps from your mobile device on SYNC, you agree that SYNC can periodically use your device’s data plan to send and receive data that keeps your settings current and enables app functionality. Data sent to Ford U.S. includes your VIN and SYNC module number. Standard rates may apply.\r\n\r\nTo change settings or turn off later, visit the SYNC mobile apps settings menu. See Owner Guide for more information. I agree and consent."
- },
- "es-mx": {
- "textBody": "Si permite el uso de apps de su móvil vía SYNC®, acepta que SYNC® puede utilizar el plan de datos de su equipo para enviar y recibir info para actualizar su configuración y permitir la funcionalidad de la app. Datos enviados a Ford US incluyen VIN y # de módulo de SYNC®. Cargos a su plan de datos pueden aplicar. \r\n\r\nPara cambiar la config. de SYNC® o apagarlo, acceda a Menú de configuración de apps. Vea la Guía del Propietario para más info. Estoy de acuerdo y acepto lo anterior."
- },
- "fr-ca": {
- "textBody": "Si vous activez les applications mobiles sur SYNC, vous acceptez que SYNC utilise votre forfait de données afin de maintenir vos réglages à jour et assurer la pleine fonctionnalité. Parmi les données envoyées à Ford US, notons le NIV et le numéro de module SYNC. Des frais de base peuvent s’appliquer. \r\n\r\nPour modifier les réglages ou désactiver les applications, consultez le menu des réglages des applications de SYNC. Voir le Manuel du propriétaire. J’accepte et je consens."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information."
- },
- "es-mx": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução",
- "line1": "Caract. Condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and Speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et Vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push Notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications Instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push",
- "line1": "Notificações"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingAppPermissions": {
- "languages": {
- "en-us": {
- "textBody": "Change %AppName%’s functionality and use of data as described below. See App terms of service and privacy policies."
- },
- "es-mx": {
- "textBody": "Para cambiar la funcionalidad de %appName% y usar los datos como se describe más adelante. Consulte los términos de servicio y políticas de privacidad de la App."
- },
- "fr-ca": {
- "textBody": "Pour modifier la fonctionnalité de %appName% et l’usage des données comme décrit ci-dessous. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application."
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure.",
- "label": "Vehicle Information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos.",
- "label": "Información del Vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus.",
- "label": "Renseignements du Véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo",
- "line1": "Inform. Veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "Base-4"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "DataConsent-2"
- ]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ]
- },
- "1234": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NORMAL",
- "default_hmi": "FULL",
- "groups": [
- "SendLocation"
- ]
- },
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_all_params.json b/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_all_params.json
deleted file mode 100644
index 5a633e7c95..0000000000
--- a/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_all_params.json
+++ /dev/null
@@ -1,2361 +0,0 @@
-{
- "policy_table" : {
- "module_config": {
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 20,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [
- 1,
- 5,
- 25,
- 125,
- 625
- ],
- "endpoints": {
- "0x04": {
- "default": [
- "http://x.x.x.x:3000/api/1/softwareUpdate"
- ]
- },
- "0x07": {
- "default": [
- "http://x.x.x.x:3000/api/1/policies"
- ]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "VOICECOM": 20,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "ProprietaryData-3": {
- "rpcs": {
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "PropriataryData-2": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DiagnosticMessageOnly": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "OnKeyboardInputOnlyGroup": {
- "rpcs": {
- "OnKeyboardInput": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "OnTouchEventOnlyGroup": {
- "rpcs": {
- "OnTouchEvent": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- },
- "SendLocation": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "longitudeDegrees",
- "latitudeDegrees",
- "locationName",
- "locationDescription",
- "addressLines",
- "phoneNumber",
- "locationImage",
- "deliveryMode",
- "timeStamp",
- "address"
- ]
- }
- }
- },
- "BackgroundAPT": {
- "rpcs": {
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DialNumberOnly": {
- "rpcs": {
- "DialNumber": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "SendLocationOnly": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.023",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting permission to use the following: %functionalGroupLabels%.\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "The %appName% App is requesting permission to use the following: %functionalGroupLabels%.\r\n\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. I agree and consent."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior."
- },
- "fr-ca": {
- "tts": "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\n\r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. J’accepte et je consens."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with Mobile Apps. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\r\n\r\nIf you enable the use of mobile apps from your mobile device on SYNC, you agree that SYNC can periodically use your device’s data plan to send and receive data that keeps your settings current and enables app functionality. Data sent to Ford U.S. includes your VIN and SYNC module number. Standard rates may apply.\r\n\r\nTo change settings or turn off later, visit the SYNC mobile apps settings menu. See Owner Guide for more information. I agree and consent."
- },
- "es-mx": {
- "textBody": "Si permite el uso de apps de su móvil vía SYNC®, acepta que SYNC® puede utilizar el plan de datos de su equipo para enviar y recibir info para actualizar su configuración y permitir la funcionalidad de la app. Datos enviados a Ford US incluyen VIN y # de módulo de SYNC®. Cargos a su plan de datos pueden aplicar. \r\n\r\nPara cambiar la config. de SYNC® o apagarlo, acceda a Menú de configuración de apps. Vea la Guía del Propietario para más info. Estoy de acuerdo y acepto lo anterior."
- },
- "fr-ca": {
- "textBody": "Si vous activez les applications mobiles sur SYNC, vous acceptez que SYNC utilise votre forfait de données afin de maintenir vos réglages à jour et assurer la pleine fonctionnalité. Parmi les données envoyées à Ford US, notons le NIV et le numéro de module SYNC. Des frais de base peuvent s’appliquer. \r\n\r\nPour modifier les réglages ou désactiver les applications, consultez le menu des réglages des applications de SYNC. Voir le Manuel du propriétaire. J’accepte et je consens."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information."
- },
- "es-mx": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução",
- "line1": "Caract. Condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and Speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et Vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push Notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications Instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push",
- "line1": "Notificações"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingAppPermissions": {
- "languages": {
- "en-us": {
- "textBody": "Change %AppName%’s functionality and use of data as described below. See App terms of service and privacy policies."
- },
- "es-mx": {
- "textBody": "Para cambiar la funcionalidad de %appName% y usar los datos como se describe más adelante. Consulte los términos de servicio y políticas de privacidad de la App."
- },
- "fr-ca": {
- "textBody": "Pour modifier la fonctionnalité de %appName% et l’usage des données comme décrit ci-dessous. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application."
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure.",
- "label": "Vehicle Information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos.",
- "label": "Información del Vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus.",
- "label": "Renseignements du Véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo",
- "line1": "Inform. Veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "Base-4"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "DataConsent-2"
- ]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ]
- },
- "1234": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NORMAL",
- "default_hmi": "FULL",
- "groups": [
- "SendLocation"
- ]
- },
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_no_params.json b/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_no_params.json
deleted file mode 100644
index 86c121491b..0000000000
--- a/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_no_params.json
+++ /dev/null
@@ -1,2350 +0,0 @@
-{
- "policy_table" : {
- "module_config": {
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 20,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [
- 1,
- 5,
- 25,
- 125,
- 625
- ],
- "endpoints": {
- "0x04": {
- "default": [
- "http://x.x.x.x:3000/api/1/softwareUpdate"
- ]
- },
- "0x07": {
- "default": [
- "http://x.x.x.x:3000/api/1/policies"
- ]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "VOICECOM": 20,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "ProprietaryData-3": {
- "rpcs": {
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "PropriataryData-2": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DiagnosticMessageOnly": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "OnKeyboardInputOnlyGroup": {
- "rpcs": {
- "OnKeyboardInput": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "OnTouchEventOnlyGroup": {
- "rpcs": {
- "OnTouchEvent": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- },
- "SendLocation": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": []
- }
- }
- },
- "BackgroundAPT": {
- "rpcs": {
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DialNumberOnly": {
- "rpcs": {
- "DialNumber": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "SendLocationOnly": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.023",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting permission to use the following: %functionalGroupLabels%.\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "The %appName% App is requesting permission to use the following: %functionalGroupLabels%.\r\n\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. I agree and consent."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior."
- },
- "fr-ca": {
- "tts": "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\n\r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. J’accepte et je consens."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with Mobile Apps. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\r\n\r\nIf you enable the use of mobile apps from your mobile device on SYNC, you agree that SYNC can periodically use your device’s data plan to send and receive data that keeps your settings current and enables app functionality. Data sent to Ford U.S. includes your VIN and SYNC module number. Standard rates may apply.\r\n\r\nTo change settings or turn off later, visit the SYNC mobile apps settings menu. See Owner Guide for more information. I agree and consent."
- },
- "es-mx": {
- "textBody": "Si permite el uso de apps de su móvil vía SYNC®, acepta que SYNC® puede utilizar el plan de datos de su equipo para enviar y recibir info para actualizar su configuración y permitir la funcionalidad de la app. Datos enviados a Ford US incluyen VIN y # de módulo de SYNC®. Cargos a su plan de datos pueden aplicar. \r\n\r\nPara cambiar la config. de SYNC® o apagarlo, acceda a Menú de configuración de apps. Vea la Guía del Propietario para más info. Estoy de acuerdo y acepto lo anterior."
- },
- "fr-ca": {
- "textBody": "Si vous activez les applications mobiles sur SYNC, vous acceptez que SYNC utilise votre forfait de données afin de maintenir vos réglages à jour et assurer la pleine fonctionnalité. Parmi les données envoyées à Ford US, notons le NIV et le numéro de module SYNC. Des frais de base peuvent s’appliquer. \r\n\r\nPour modifier les réglages ou désactiver les applications, consultez le menu des réglages des applications de SYNC. Voir le Manuel du propriétaire. J’accepte et je consens."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information."
- },
- "es-mx": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução",
- "line1": "Caract. Condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and Speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et Vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push Notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications Instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push",
- "line1": "Notificações"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingAppPermissions": {
- "languages": {
- "en-us": {
- "textBody": "Change %AppName%’s functionality and use of data as described below. See App terms of service and privacy policies."
- },
- "es-mx": {
- "textBody": "Para cambiar la funcionalidad de %appName% y usar los datos como se describe más adelante. Consulte los términos de servicio y políticas de privacidad de la App."
- },
- "fr-ca": {
- "textBody": "Pour modifier la fonctionnalité de %appName% et l’usage des données comme décrit ci-dessous. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application."
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure.",
- "label": "Vehicle Information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos.",
- "label": "Información del Vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus.",
- "label": "Renseignements du Véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo",
- "line1": "Inform. Veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "Base-4"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "DataConsent-2"
- ]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ]
- },
- "1234": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NORMAL",
- "default_hmi": "FULL",
- "groups": [
- "SendLocation"
- ]
- },
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_some_params.json b/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_some_params.json
deleted file mode 100644
index 2b57912016..0000000000
--- a/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_some_params.json
+++ /dev/null
@@ -1,2355 +0,0 @@
-{
- "policy_table" : {
- "module_config": {
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 20,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [
- 1,
- 5,
- 25,
- 125,
- 625
- ],
- "endpoints": {
- "0x04": {
- "default": [
- "http://x.x.x.x:3000/api/1/softwareUpdate"
- ]
- },
- "0x07": {
- "default": [
- "http://x.x.x.x:3000/api/1/policies"
- ]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "VOICECOM": 20,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "ProprietaryData-3": {
- "rpcs": {
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "PropriataryData-2": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DiagnosticMessageOnly": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "OnKeyboardInputOnlyGroup": {
- "rpcs": {
- "OnKeyboardInput": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "OnTouchEventOnlyGroup": {
- "rpcs": {
- "OnTouchEvent": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- },
- "SendLocation": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "longitudeDegrees",
- "latitudeDegrees",
- "locationDescription",
- "phoneNumber"
- ]
- }
- }
- },
- "BackgroundAPT": {
- "rpcs": {
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DialNumberOnly": {
- "rpcs": {
- "DialNumber": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "SendLocationOnly": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.023",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting permission to use the following: %functionalGroupLabels%.\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "The %appName% App is requesting permission to use the following: %functionalGroupLabels%.\r\n\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. I agree and consent."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior."
- },
- "fr-ca": {
- "tts": "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\n\r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. J’accepte et je consens."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with Mobile Apps. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\r\n\r\nIf you enable the use of mobile apps from your mobile device on SYNC, you agree that SYNC can periodically use your device’s data plan to send and receive data that keeps your settings current and enables app functionality. Data sent to Ford U.S. includes your VIN and SYNC module number. Standard rates may apply.\r\n\r\nTo change settings or turn off later, visit the SYNC mobile apps settings menu. See Owner Guide for more information. I agree and consent."
- },
- "es-mx": {
- "textBody": "Si permite el uso de apps de su móvil vía SYNC®, acepta que SYNC® puede utilizar el plan de datos de su equipo para enviar y recibir info para actualizar su configuración y permitir la funcionalidad de la app. Datos enviados a Ford US incluyen VIN y # de módulo de SYNC®. Cargos a su plan de datos pueden aplicar. \r\n\r\nPara cambiar la config. de SYNC® o apagarlo, acceda a Menú de configuración de apps. Vea la Guía del Propietario para más info. Estoy de acuerdo y acepto lo anterior."
- },
- "fr-ca": {
- "textBody": "Si vous activez les applications mobiles sur SYNC, vous acceptez que SYNC utilise votre forfait de données afin de maintenir vos réglages à jour et assurer la pleine fonctionnalité. Parmi les données envoyées à Ford US, notons le NIV et le numéro de module SYNC. Des frais de base peuvent s’appliquer. \r\n\r\nPour modifier les réglages ou désactiver les applications, consultez le menu des réglages des applications de SYNC. Voir le Manuel du propriétaire. J’accepte et je consens."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information."
- },
- "es-mx": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução",
- "line1": "Caract. Condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and Speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et Vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push Notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications Instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push",
- "line1": "Notificações"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingAppPermissions": {
- "languages": {
- "en-us": {
- "textBody": "Change %AppName%’s functionality and use of data as described below. See App terms of service and privacy policies."
- },
- "es-mx": {
- "textBody": "Para cambiar la funcionalidad de %appName% y usar los datos como se describe más adelante. Consulte los términos de servicio y políticas de privacidad de la App."
- },
- "fr-ca": {
- "textBody": "Pour modifier la fonctionnalité de %appName% et l’usage des données comme décrit ci-dessous. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application."
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure.",
- "label": "Vehicle Information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos.",
- "label": "Información del Vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus.",
- "label": "Renseignements du Véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo",
- "line1": "Inform. Veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "Base-4"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "DataConsent-2"
- ]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ]
- },
- "1234": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NORMAL",
- "default_hmi": "FULL",
- "groups": [
- "SendLocation"
- ]
- },
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/json/valid_sdl_pt_update.json b/src/components/policy/policy_external/test/json/valid_sdl_pt_update.json
deleted file mode 100644
index acf18c5706..0000000000
--- a/src/components/policy/policy_external/test/json/valid_sdl_pt_update.json
+++ /dev/null
@@ -1,1746 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000,
- "app_services": {
- "MEDIA": {
- "service_names" : ["SDL App", "SDL Music"],
- "handled_rpcs" : [{"function_id": 41}]
- }
- }
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "watchdog_timer_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- }
- },
- "consumer_friendly_messages" : {
- "messages" : {
- "AppPermissions" : {
- "languages" : {
- "de-de" : {
- "line1" : "Zugriffsanfrage(n)",
- "line2" : "erlauben?",
- "tts" : "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-gb" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-ie" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-us" : {
- "line1" : "Grant Requested",
- "line2" : "Permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press yes to allow or no to deny."
- },
- "es-en" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "es-es" : {
- "line1" : "¿Conceder permisos",
- "line2" : "solicitados?",
- "tts" : "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar."
- },
- "es-mx" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "fr-ca" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "fr-fr" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "it-it" : {
- "line1" : "Concedi autorizzaz.",
- "line2" : "richiesta(e)?",
- "tts" : "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare."
- },
- "nl-nl" : {
- "line1" : "Aangevraagde",
- "line2" : "permissie(s) verlenen?",
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren."
- },
- "pl-pl" : {
- "line1" : "Udzielić żądanych",
- "line2" : "pozwoleń?",
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "line1" : "Conceder permissão",
- "line2" : "solicitada?",
- "tts" : "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar."
- },
- "pt-pt" : {
- "line1" : "Conceder permiss.",
- "line2" : "solicitada(s)?",
- "tts" : "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar."
- },
- "ru-ru" : {
- "line1" : "Предост. заправш.",
- "line2" : "разрешения?",
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны."
- },
- "sv-se" : {
- "line1" : "Vill du ge",
- "line2" : "tillstånd?",
- "tts" : "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka."
- },
- "tr-tr" : {
- "line1" : "İstenen izinler",
- "line2" : "verilsin mi?",
- "tts" : "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否允许请求的",
- "line2" : "权限?",
- "tts" : "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。"
- },
- "zh-tw" : {
- "line1" : "允許",
- "line2" : "授權請求?",
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsHelp" : {
- "languages" : {
- "de-de" : {
- "tts" : "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es" : {
- "tts" : "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it" : {
- "tts" : "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl" : {
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl" : {
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "tts" : "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt" : {
- "tts" : "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru" : {
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se" : {
- "tts" : "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr" : {
- "tts" : "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "tts" : "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw" : {
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked" : {
- "languages" : {
- "de-de" : {
- "tts" : "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it" : {
- "tts" : "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl" : {
- "tts" : "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl" : {
- "tts" : "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br" : {
- "tts" : "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt" : {
- "tts" : "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru" : {
- "tts" : "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se" : {
- "tts" : "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr" : {
- "tts" : "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn" : {
- "tts" : "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw" : {
- "tts" : "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht autorisiert",
- "tts" : "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren."
- },
- "en-au" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-gb" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-us" : {
- "line1" : "Not Authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "es-en" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es" : {
- "line1" : "No autorizada",
- "tts" : "Esta versión de %appName% no está autorizada y no funcionará con SYNC."
- },
- "es-mx" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "it-it" : {
- "line1" : "non autorizzata",
- "tts" : "Questa versione di %appName% non è autorizzata e non funziona con il SYNC."
- },
- "nl-nl" : {
- "line1" : "niet geautoriseerd",
- "tts" : "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC."
- },
- "pl-pl" : {
- "line1" : "brak autoryzacji",
- "tts" : "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC."
- },
- "pt-br" : {
- "line1" : "não autorizado",
- "tts" : "Esta versão do %appName% não tem autorização e não funcionará com o SYNC."
- },
- "pt-pt" : {
- "line1" : "não autorizada",
- "tts" : "Esta versão de %appName% não está autorizada e não funcionará com o SYNC."
- },
- "ru-ru" : {
- "line1" : "не авторизировано",
- "tts" : "Эта версия %appName% не авторизирована и не будет работать с SYNC."
- },
- "sv-se" : {
- "line1" : "är ej godkänd",
- "tts" : "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC."
- },
- "tr-tr" : {
- "line1" : "için izin yok",
- "tts" : "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz."
- },
- "zh-cn" : {
- "line1" : "未得到授权",
- "tts" : "此版本的%appName% 未得到授权,无法在SYNC上使用。"
- },
- "zh-tw" : {
- "line1" : "無授權",
- "tts" : "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。"
- }
- }
- },
- "AppUnsupported" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht unterstützt",
- "tts" : "Diese Version von %appName% wird von SYNC nicht unterstützt."
- },
- "en-au" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-gb" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-ie" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-us" : {
- "line1" : "Not Supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "es-en" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es" : {
- "line1" : "No compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-mx" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "it-it" : {
- "line1" : "non supportata",
- "tts" : "Questa versione di %appName% non è supportata dal SYNC."
- },
- "nl-nl" : {
- "line1" : "niet ondersteund",
- "tts" : "Deze versie van %appName% wordt niet ondersteund door SYNC."
- },
- "pl-pl" : {
- "line1" : "aplikacja nie obsług.",
- "tts" : "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC."
- },
- "pt-br" : {
- "line1" : "não suportado",
- "tts" : "Esta versão do %appName% não é suportada pelo SYNC."
- },
- "pt-pt" : {
- "line1" : "não suportada",
- "tts" : "Esta versão de %appName% não é suportado pelo SYNC."
- },
- "ru-ru" : {
- "line1" : "не поддерживается",
- "tts" : "Эта версия %appName% не поддерживается SYNC."
- },
- "sv-se" : {
- "line1" : "stöds ej",
- "tts" : "SYNC har inte stöd för den här versionen av %appName%."
- },
- "tr-tr" : {
- "line1" : "desteklenmiyor",
- "tts" : "Bu %appName% sürümü SYNC tarafından desteklenmiyor."
- },
- "zh-cn" : {
- "line1" : "不受支持",
- "tts" : "SYNC不支持此版本的%appName%。"
- },
- "zh-tw" : {
- "line1" : "不支援",
- "tts" : "SYNC 不支援此版本的%appName% 。"
- }
- }
- },
- "DataConsent" : {
- "languages" : {
- "en-us" : {
- "line1" : "Enable Mobile Apps",
- "line2" : "on SYNC? (Uses Data)",
- "tts" : "To use mobile apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device's data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Please press yes or no, or help for more information. "
- }
- }
- },
- "DataConsentHelp" : {
- "languages" : {
- "en-us" : {
- "tts" : "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC mobile apps settings menu. See your Owner Guide for more information. "
- }
- }
- },
- "DisableApps" : {
- "languages" : {
- "de-de" : {
- "line1" : "Auto-Update",
- "line2" : "und Mobile Apps deaktivieren",
- "tts" : "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen."
- },
- "en-au" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-gb" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-us" : {
- "line1" : "Disable Auto-Updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es" : {
- "line1" : "¿Desact. actual. auto",
- "line2" : "y apl. móviles?",
- "tts" : "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar."
- },
- "es-mx" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "it-it" : {
- "line1" : "Disabilitare agg. aut.",
- "line2" : "e app mobili?",
- "tts" : "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare."
- },
- "nl-nl" : {
- "line1" : "Auto-updates en mob.",
- "line2" : "apps uitschakelen?",
- "tts" : "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren."
- },
- "pl-pl" : {
- "line1" : "Wył. automat. aktual.",
- "line2" : "i aplikacje mobilne?",
- "tts" : "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować."
- },
- "pt-br" : {
- "line1" : "Desativar atualizações",
- "line2" : "autom. e aplicativos?",
- "tts" : "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar."
- },
- "pt-pt" : {
- "line1" : "Desact. actual. autom.",
- "line2" : "e aplicações móveis?",
- "tts" : "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar."
- },
- "ru-ru" : {
- "line1" : "Откл. автообновления",
- "line2" : "и мобил. прилож.?",
- "tts" : "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены."
- },
- "sv-se" : {
- "line1" : "Avaktiverar autouppdat.",
- "line2" : "och mobilappar?",
- "tts" : "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta."
- },
- "tr-tr" : {
- "line1" : "Oto. güncelleme ve",
- "line2" : "mobil uygul. kapat?",
- "tts" : "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否禁用自动更新和",
- "line2" : "移动应用程序?",
- "tts" : "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。"
- },
- "zh-tw" : {
- "line1" : "停用自動更新",
- "line2" : "和行動應用程式?",
- "tts" : "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。"
- }
- }
- },
- "DrivingCharacteristics" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahreigenschaften",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus."
- },
- "en-au" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-gb" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-us" : {
- "label" : "Driving Characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es" : {
- "label" : "Características de conducción",
- "tts" : "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad."
- },
- "es-mx" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "fr-ca" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "it-it" : {
- "label" : "Caratteristiche di guida",
- "tts" : "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza."
- },
- "nl-nl" : {
- "label" : "Rijkenmerken",
- "tts" : "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus."
- },
- "pl-pl" : {
- "label" : "Informacje dotyczące stylu jazdy",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa."
- },
- "pt-br" : {
- "label" : "Características de condução",
- "tts" : "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança."
- },
- "pt-pt" : {
- "label" : "Características de condução",
- "tts" : "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança."
- },
- "ru-ru" : {
- "label" : "Характеристики движения",
- "tts" : "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности."
- },
- "sv-se" : {
- "label" : "Köregenskaper",
- "tts" : "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus."
- },
- "tr-tr" : {
- "label" : "Sürüş karakteristikleri",
- "tts" : "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu."
- },
- "zh-cn" : {
- "label" : "行驶特性",
- "tts" : "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态"
- },
- "zh-tw" : {
- "label" : "駕駛特性",
- "tts" : "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態"
- }
- }
- },
- "Location" : {
- "languages" : {
- "de-de" : {
- "label" : "GPS und Geschwindigkeit",
- "tts" : "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs."
- },
- "en-au" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-gb" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-ie" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-us" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "es-en" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es" : {
- "label" : "GPS y velocidad",
- "tts" : "Una aplicación puede acceder al GPS y la velocidad del vehículo."
- },
- "es-mx" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "it-it" : {
- "label" : "GPS e velocità",
- "tts" : "Un'app può avere accesso a GPS e velocità del veicolo."
- },
- "nl-nl" : {
- "label" : "Gps en snelheid",
- "tts" : "Een app heeft toegang tot gps en de snelheid van het voertuig."
- },
- "pl-pl" : {
- "label" : "GPS i prędkość",
- "tts" : "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu."
- },
- "pt-br" : {
- "label" : "GPS e velocidade",
- "tts" : "Um aplicativo pode acessar o GPS e a velocidade do veículo."
- },
- "pt-pt" : {
- "label" : "GPS e velocidade",
- "tts" : "Uma aplicação consegue aceder ao GPS e à velocidade do veículo."
- },
- "ru-ru" : {
- "label" : "GPS и скорость",
- "tts" : "Приложение имеет доступ к GPS и скорости автомобиля."
- },
- "sv-se" : {
- "label" : "GPS och hastighet",
- "tts" : "Appen kan komma åt fordonets GPS och hastighetsmätare."
- },
- "tr-tr" : {
- "label" : "GPS ve hız",
- "tts" : "Bu uygulama aracın GPS ve hız bilgilerine erişebilir."
- },
- "zh-cn" : {
- "label" : "GPS 和车速",
- "tts" : "移动应用程序可以访问车辆 GPS 和车速信息。"
- },
- "zh-tw" : {
- "label" : "GPS和車速",
- "tts" : "應用程式可存取車輛的GPS和速度。"
- }
- }
- },
- "Notifications" : {
- "languages" : {
- "de-de" : {
- "label" : "Push-Benachrichtigungen",
- "tts" : "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden."
- },
- "en-au" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-gb" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-ie" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-us" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "es-en" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es" : {
- "label" : "Notificaciones push",
- "tts" : "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano."
- },
- "es-mx" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca" : {
- "label" : "Notifications instantanées",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr" : {
- "label" : "Notifications push",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "it-it" : {
- "label" : "Notifiche push",
- "tts" : "Un'app può inviare notifiche se eseguita in background."
- },
- "nl-nl" : {
- "label" : "Push-meldingen",
- "tts" : "Een app kan meldingen versturen als deze op de achtergrond actief is."
- },
- "pl-pl" : {
- "label" : "Powiadomienia Push",
- "tts" : "Aplikacja może wysyłać powiadomienia, działając w tle."
- },
- "pt-br" : {
- "label" : "Notificações Push",
- "tts" : "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano."
- },
- "pt-pt" : {
- "label" : "Notificações push",
- "tts" : "Uma aplicação consegue enviar notificações quando está activa em segundo plano."
- },
- "ru-ru" : {
- "label" : "Оповещения о пересылке",
- "tts" : "Если приложение работает в фоновом режиме, оно может отправлять оповещения."
- },
- "sv-se" : {
- "label" : "Push-notiser",
- "tts" : "Appen kan skicka meddelanden när den körs i bakgrunden."
- },
- "tr-tr" : {
- "label" : "Anlık bildirimleri",
- "tts" : "Bir uygulama arka planda çalışırken bildirim gönderebilir."
- },
- "zh-cn" : {
- "label" : "推送通知",
- "tts" : "移动应用程序在后台运行时可推送通知。"
- },
- "zh-tw" : {
- "label" : "傳送通知",
- "tts" : "車輛行進時,應用程式可在背景中傳送通知。"
- }
- }
- },
- "SettingDisableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Updates deakt."
- },
- "en-au" : {
- "line1" : "Disable updates"
- },
- "en-gb" : {
- "line1" : "Disable updates"
- },
- "en-ie" : {
- "line1" : "Disable updates"
- },
- "en-us" : {
- "line1" : "Disable Updates"
- },
- "es-en" : {
- "line1" : "Deshab. actual."
- },
- "es-es" : {
- "line1" : "Desact. actual."
- },
- "es-mx" : {
- "line1" : "Deshab. actual."
- },
- "fr-ca" : {
- "line1" : "Désactiver MAJ"
- },
- "fr-fr" : {
- "line1" : "Désactiver màj"
- },
- "it-it" : {
- "line1" : "Disabilita agg."
- },
- "nl-nl" : {
- "line1" : "Upd. uitschak."
- },
- "pl-pl" : {
- "line1" : "Wyłącz aktual."
- },
- "pt-br" : {
- "line1" : "Desat. atualiz."
- },
- "pt-pt" : {
- "line1" : "Desact. actualiz."
- },
- "ru-ru" : {
- "line1" : "Откл. обновл."
- },
- "sv-se" : {
- "line1" : "Inaktivera uppd."
- },
- "tr-tr" : {
- "line1" : "Güncell. Kapat"
- },
- "zh-cn" : {
- "line1" : "禁用更新"
- },
- "zh-tw" : {
- "line1" : "停用更新"
- }
- }
- },
- "SettingEnableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Apps aktivieren"
- },
- "en-au" : {
- "line1" : "Enable Apps"
- },
- "en-gb" : {
- "line1" : "Enable Apps"
- },
- "en-ie" : {
- "line1" : "Enable Apps"
- },
- "en-us" : {
- "line1" : "Enable Apps"
- },
- "es-en" : {
- "line1" : "Hab. aplic."
- },
- "es-es" : {
- "line1" : "Activar apl."
- },
- "es-mx" : {
- "line1" : "Hab. aplic."
- },
- "fr-ca" : {
- "line1" : "Activer app."
- },
- "fr-fr" : {
- "line1" : "Activer app."
- },
- "it-it" : {
- "line1" : "Abilita app"
- },
- "nl-nl" : {
- "line1" : "Apps inschak."
- },
- "pl-pl" : {
- "line1" : "Włącz aplikacje"
- },
- "pt-br" : {
- "line1" : "Ativar aplic."
- },
- "pt-pt" : {
- "line1" : "Activar actualiz."
- },
- "ru-ru" : {
- "line1" : "Вкл. прилож."
- },
- "sv-se" : {
- "line1" : "Aktivera appar"
- },
- "tr-tr" : {
- "line1" : "Uygulamaları aç"
- },
- "zh-cn" : {
- "line1" : "启用应用程序"
- },
- "zh-tw" : {
- "line1" : "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update anford."
- },
- "en-au" : {
- "line1" : "Request update"
- },
- "en-gb" : {
- "line1" : "Request update"
- },
- "en-ie" : {
- "line1" : "Request update"
- },
- "en-us" : {
- "line1" : "Request Update"
- },
- "es-en" : {
- "line1" : "Solicit. actualiz."
- },
- "es-es" : {
- "line1" : "Solicitar actual."
- },
- "es-mx" : {
- "line1" : "Solicit. actualiz."
- },
- "fr-ca" : {
- "line1" : "Demander MAJ"
- },
- "fr-fr" : {
- "line1" : "Demander màj"
- },
- "it-it" : {
- "line1" : "Rich. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Upd. aanvragen"
- },
- "pl-pl" : {
- "line1" : "Zażądaj aktual."
- },
- "pt-br" : {
- "line1" : "Solicitar atualiz."
- },
- "pt-pt" : {
- "line1" : "Solicit. actualiz."
- },
- "ru-ru" : {
- "line1" : "Запрос на обн."
- },
- "sv-se" : {
- "line1" : "Begär uppdat."
- },
- "tr-tr" : {
- "line1" : "Güncelleme iste"
- },
- "zh-cn" : {
- "line1" : "请求更新"
- },
- "zh-tw" : {
- "line1" : "請求更新"
- }
- }
- },
- "StatusNeeded" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update benötigt"
- },
- "en-au" : {
- "line1" : "Update needed"
- },
- "en-gb" : {
- "line1" : "Update needed"
- },
- "en-ie" : {
- "line1" : "Update needed"
- },
- "en-us" : {
- "line1" : "Update Needed"
- },
- "es-en" : {
- "line1" : "Actualiz. neces."
- },
- "es-es" : {
- "line1" : "Actu. necesaria"
- },
- "es-mx" : {
- "line1" : "Actualiz. neces."
- },
- "fr-ca" : {
- "line1" : "Màj requise"
- },
- "fr-fr" : {
- "line1" : "Mise à jour requise"
- },
- "it-it" : {
- "line1" : "Necess. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Update nodig"
- },
- "pl-pl" : {
- "line1" : "Potrzeba aktual."
- },
- "pt-br" : {
- "line1" : "Atualiz. necess."
- },
- "pt-pt" : {
- "line1" : "Actual. necess."
- },
- "ru-ru" : {
- "line1" : "Необх. обновл."
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs"
- },
- "tr-tr" : {
- "line1" : "Güncellenmeli"
- },
- "zh-cn" : {
- "line1" : "需要进行更新"
- },
- "zh-tw" : {
- "line1" : "需更新"
- }
- }
- },
- "StatusPending" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktualisieren..."
- },
- "en-au" : {
- "line1" : "Updating..."
- },
- "en-gb" : {
- "line1" : "Updating..."
- },
- "en-ie" : {
- "line1" : "Updating..."
- },
- "en-us" : {
- "line1" : "Updating..."
- },
- "es-en" : {
- "line1" : "Actualizando..."
- },
- "es-es" : {
- "line1" : "Actualizando..."
- },
- "es-mx" : {
- "line1" : "Actualizando..."
- },
- "fr-ca" : {
- "line1" : "MAJ en cours..."
- },
- "fr-fr" : {
- "line1" : "Màj en cours..."
- },
- "it-it" : {
- "line1" : "Aggiornamento"
- },
- "nl-nl" : {
- "line1" : "Updaten..."
- },
- "pl-pl" : {
- "line1" : "Aktualizowanie"
- },
- "pt-br" : {
- "line1" : "Atualizando..."
- },
- "pt-pt" : {
- "line1" : "A actualizar..."
- },
- "ru-ru" : {
- "line1" : "Обновление..."
- },
- "sv-se" : {
- "line1" : "Uppdaterar..."
- },
- "tr-tr" : {
- "line1" : "Güncelleniyor..."
- },
- "zh-cn" : {
- "line1" : "正在更新......"
- },
- "zh-tw" : {
- "line1" : "更新中..."
- }
- }
- },
- "StatusUpToDate" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktuelle Version"
- },
- "en-au" : {
- "line1" : "Up-to-date"
- },
- "en-gb" : {
- "line1" : "Up-to-date"
- },
- "en-ie" : {
- "line1" : "Up-to-date"
- },
- "en-us" : {
- "line1" : "Up-To-Date"
- },
- "es-en" : {
- "line1" : "Actualizado"
- },
- "es-es" : {
- "line1" : "Actualizada"
- },
- "es-mx" : {
- "line1" : "Actualizado"
- },
- "fr-ca" : {
- "line1" : "Déjà à jour"
- },
- "fr-fr" : {
- "line1" : "Déjà à jour"
- },
- "it-it" : {
- "line1" : "più recente"
- },
- "nl-nl" : {
- "line1" : "Up-to-date"
- },
- "pl-pl" : {
- "line1" : "Aktualne"
- },
- "pt-br" : {
- "line1" : "Atualizado"
- },
- "pt-pt" : {
- "line1" : "Actualizado"
- },
- "ru-ru" : {
- "line1" : "Обновлено"
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs ej"
- },
- "tr-tr" : {
- "line1" : "Güncel"
- },
- "zh-cn" : {
- "line1" : "最新更新"
- },
- "zh-tw" : {
- "line1" : "更新最新"
- }
- }
- },
- "VehicleInfo" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahrzeuginformationen",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck."
- },
- "en-au" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-gb" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-ie" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-us" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es" : {
- "label" : "Información del vehículo",
- "tts" : "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos."
- },
- "es-mx" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "fr-ca" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus."
- },
- "it-it" : {
- "label" : "Informazioni sul veicolo",
- "tts" : "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici."
- },
- "nl-nl" : {
- "label" : "Voertuiginformatie",
- "tts" : "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning."
- },
- "pl-pl" : {
- "label" : "Informacje o pojeździe",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon."
- },
- "pt-br" : {
- "label" : "Informações sobre o veículo",
- "tts" : "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus."
- },
- "pt-pt" : {
- "label" : "Informações do veículo",
- "tts" : "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus."
- },
- "ru-ru" : {
- "label" : "Информация об автомобиле",
- "tts" : "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин."
- },
- "sv-se" : {
- "label" : "Fordonsinformation",
- "tts" : "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck."
- },
- "tr-tr" : {
- "label" : "Araç bilgisi",
- "tts" : "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı."
- },
- "zh-cn" : {
- "label" : "车辆信息",
- "tts" : "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压."
- },
- "zh-tw" : {
- "label" : "車輛資訊",
- "tts" : "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓."
- }
- }
- }
- },
- "version" : "001.001.015"
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "DrivingCharacteristics-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- },
- "user_consent_prompt" : "DrivingCharacteristics"
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Location-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- }
- },
- "user_consent_prompt" : "Location"
- },
- "Navigation-1" : {
- "rpcs" : {
- "AlertManeuver" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ShowConstantTBT" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UpdateTurnList" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Notifications" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "BACKGROUND" ]
- }
- },
- "user_consent_prompt" : "Notifications"
- },
- "PropriataryData-1" : {
- "rpcs" : {
- "DiagnosticMessage" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GetDTCs" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ReadDID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "VehicleInfo-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- },
- "user_consent_prompt" : "VehicleInfo"
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_external/test/policy_manager_impl_ptu_test.cc b/src/components/policy/policy_external/test/policy_manager_impl_ptu_test.cc
deleted file mode 100644
index d5be757139..0000000000
--- a/src/components/policy/policy_external/test/policy_manager_impl_ptu_test.cc
+++ /dev/null
@@ -1,1825 +0,0 @@
-/*
- * Copyright (c) 2016, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <stdint.h>
-#include <fstream>
-#include <string>
-#include <vector>
-
-#include "gtest/gtest.h"
-
-#include "policy/policy_manager_impl_test_base.h"
-#include "policy/policy_table/types.h"
-
-#include "json/reader.h"
-#include "utils/date_time.h"
-#include "utils/gen_hash.h"
-
-namespace test {
-namespace components {
-namespace policy_test {
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
-
-TEST_F(PolicyManagerImplTest,
- DISABLED_TiggerPTUForNaviAppInCaseNoCertificateExistsInPolicyTable) {
- EXPECT_CALL(*cache_manager_, GetDeviceConsent(_))
- .WillOnce(Return(kDeviceAllowed));
- const uint32_t type = 0;
- const uint32_t id = 1;
- const EntityStatus status = kStatusOn;
- ExternalConsentStatusItem item(type, id, status);
-
- ExternalConsentStatus external_consent_status;
- external_consent_status.insert(item);
-
- GroupsByExternalConsentStatus group;
- group[item].push_back(std::make_pair<std::string, bool>("group_name", true));
-
- EXPECT_CALL(*cache_manager_, GetExternalConsentStatus())
- .WillOnce(Return(external_consent_status));
-
- EXPECT_CALL(*cache_manager_,
- GetGroupsWithSameEntities(external_consent_status))
- .WillOnce(Return(group));
-
- EXPECT_CALL(*cache_manager_, ResetCalculatedPermissions());
-
- EXPECT_CALL(*cache_manager_, GetPermissionsForApp(_, _, _))
- .WillOnce(Return(true))
- .WillOnce(Return(true));
- EXPECT_CALL(*cache_manager_, GetFunctionalGroupNames(_))
- .WillOnce(Return(true))
- .WillOnce(Return(true));
-
- EXPECT_CALL(*cache_manager_, SetUserPermissionsForApp(_, _))
- .WillOnce(Return(false));
-
- EXPECT_CALL(*cache_manager_, SetExternalConsentForApp(_));
-
- EXPECT_CALL(*cache_manager_, IsPredataPolicy(_)).WillOnce(Return(false));
- EXPECT_CALL(*cache_manager_, IsApplicationRepresented(_))
- .WillOnce(Return(true));
- EXPECT_EQ(policy_manager_->GetPolicyTableStatus(), "UP_TO_DATE");
- policy_manager_->AddApplication(kDefaultDeviceMacAddress,
- kDefaultId,
- HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_EQ(policy_manager_->GetPolicyTableStatus(), "UP_TO_DATE");
-}
-
-TEST_F(PolicyManagerImplTest2, GetNotificationsNumberAfterPTUpdate) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
-
- Json::Value table = createPTforLoad();
- policy_manager_->ForcePTExchange();
- policy_manager_->OnUpdateStarted();
- policy_table::Table update(&table);
- update.SetPolicyTableType(rpc::policy_table_interface_base::PT_UPDATE);
- // Act
- std::string json = table.toStyledString();
- ::policy::BinaryMessage msg(json.begin(), json.end());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- policy_manager_->LoadPT(kFilePtUpdateJson, msg));
- EXPECT_FALSE(policy_manager_->GetCache()->IsPTPreloaded());
-
- EXPECT_CALL(listener_, OnUpdateStatusChanged(_));
- policy_manager_->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-
- std::string priority = "EMERGENCY";
- uint32_t notif_number = policy_manager_->GetNotificationsNumber(priority);
- EXPECT_EQ(1u, notif_number);
-
- priority = "NAVIGATION";
- notif_number = policy_manager_->GetNotificationsNumber(priority);
- EXPECT_EQ(2u, notif_number);
-
- priority = "EMERGENCY";
- notif_number = policy_manager_->GetNotificationsNumber(priority);
- EXPECT_EQ(1u, notif_number);
-
- priority = "VOICECOM";
- notif_number = policy_manager_->GetNotificationsNumber(priority);
- EXPECT_EQ(3u, notif_number);
-
- priority = "NORMAL";
- notif_number = policy_manager_->GetNotificationsNumber(priority);
- EXPECT_EQ(5u, notif_number);
-
- priority = "NONE";
- notif_number = policy_manager_->GetNotificationsNumber(priority);
- EXPECT_EQ(6u, notif_number);
-}
-
-TEST_F(PolicyManagerImplTest2, IsAppRevoked_SetRevokedAppID_ExpectAppRevoked) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
-
- policy_manager_->AddApplication(
- device_id_1_, app_id_1_, HmiTypes(policy_table::AHT_DEFAULT));
-
- std::ifstream ifile(kValidSdlPtUpdateJson);
- Json::CharReaderBuilder reader_builder;
- std::string json;
- Json::Value root(Json::objectValue);
- if (ifile.is_open()) {
- if (Json::parseFromStream(reader_builder, ifile, &root, nullptr)) {
- root["policy_table"]["app_policies"][app_id_1_] = Json::nullValue;
- json = root.toStyledString();
- }
- }
- ifile.close();
-
- ::policy::BinaryMessage msg(json.begin(), json.end());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- policy_manager_->LoadPT(kFilePtUpdateJson, msg));
- policy_manager_->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-
- EXPECT_FALSE(policy_manager_->GetCache()->IsPTPreloaded());
- CheckRpcPermissions(
- app_id_1_, "UnregisterAppInterface", ::policy::kRpcDisallowed);
- EXPECT_TRUE(policy_manager_->IsApplicationRevoked(app_id_1_));
-}
-
-// Related to manual test APPLINK-18792
-TEST_F(PolicyManagerImplTest2, AppRevokedOne_AppRegistered) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- EmulatePTAppRevoked(kPtu2Json);
-
- EXPECT_FALSE(policy_manager_->GetCache()->IsPTPreloaded());
- ASSERT_TRUE(
- (policy_manager_->GetCache())->AddDevice(device_id_2_, "Bluetooth"));
- policy_manager_->AddApplication(
- device_id_2_, application_id_, HmiTypes(policy_table::AHT_DEFAULT));
- // Registration is allowed
- CheckRpcPermissions("RegisterAppInterface", ::policy::kRpcAllowed);
-}
-
-// Related to manual test APPLINK-18794
-TEST_F(PolicyManagerImplTest2, AppRevokedOne_AppRegistered_HMIDefault) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- EmulatePTAppRevoked(kPtu2Json);
-
- EXPECT_FALSE(policy_manager_->GetCache()->IsPTPreloaded());
- policy_manager_->AddApplication(
- device_id_1_, application_id_, HmiTypes(policy_table::AHT_DEFAULT));
-
- std::string default_hmi;
- // Default HMI level is NONE
- EXPECT_TRUE(policy_manager_->GetDefaultHmi(
- device_id_1_, application_id_, &default_hmi));
- EXPECT_EQ("NONE", default_hmi);
-}
-
-TEST_F(PolicyManagerImplTest2,
- CheckPermissions_SetRevokedAppID_ExpectRPCDisallowed) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- policy::CacheManagerInterfaceSPtr cache = policy_manager_->GetCache();
- cache->AddDevice(device_id_1_, "Bluetooth");
- cache->SetDeviceData(device_id_1_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth");
-
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(_, app_id_1_))
- .Times(0);
- ON_CALL(listener_, GetDevicesIds(_))
- .WillByDefault(Return(transport_manager::DeviceList()));
- ON_CALL(listener_, GetDevicesIds(app_id_1_))
- .WillByDefault(Return(transport_manager::DeviceList(1, device_id_1_)));
-
- policy_manager_->SetUserConsentForDevice(device_id_1_, true);
- // Add app from consented device. App will be assigned with default policies
- policy_manager_->AddApplication(
- device_id_1_, app_id_1_, HmiTypes(policy_table::AHT_DEFAULT));
- // Check before action
- policy_table::RpcParameters rpc_parameters;
- rpc_parameters.hmi_levels.push_back(policy_table::HL_FULL);
-
- policy_table::Rpc rpc;
- rpc["Alert"] = rpc_parameters;
-
- ::policy::RPCParams input_params;
- ::policy::CheckPermissionResult output;
-
- policy_manager_->CheckPermissions(
- device_id_1_, app_id_1_, kHmiLevelFull, "Alert", input_params, output);
-
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- ASSERT_TRUE(output.list_of_allowed_params.empty());
- // Act
- std::ifstream ifile(kValidSdlPtUpdateJson);
- Json::CharReaderBuilder reader_builder;
- std::string json;
- Json::Value root(Json::objectValue);
- EXPECT_TRUE(ifile.is_open());
- EXPECT_TRUE(Json::parseFromStream(reader_builder, ifile, &root, nullptr));
- root["policy_table"]["app_policies"][app_id_1_] = Json::nullValue;
- json = root.toStyledString();
- ifile.close();
-
- ::policy::BinaryMessage msg(json.begin(), json.end());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- policy_manager_->LoadPT(kFilePtUpdateJson, msg));
- policy_manager_->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-
- EXPECT_FALSE(cache->IsPTPreloaded());
-
- policy_manager_->CheckPermissions(
- device_id_1_, app_id_1_, kHmiLevelFull, "Alert", input_params, output);
- // Check RPC is disallowed
- EXPECT_EQ(::policy::kRpcDisallowed, output.hmi_level_permitted);
- ASSERT_TRUE(output.list_of_allowed_params.empty());
-}
-
-TEST_F(PolicyManagerImplTest2,
- CheckPermissions_SetAppIDwithPolicies_ExpectRPCAllowed) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- policy_manager_->AddDevice(device_id_1_, "Bluetooth");
- policy::CacheManagerInterfaceSPtr cache = policy_manager_->GetCache();
-
- ASSERT_TRUE(cache->SetDeviceData(device_id_1_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(_, application_id_))
- .Times(0);
-
- ON_CALL(listener_, GetDevicesIds(_))
- .WillByDefault(Return(transport_manager::DeviceList()));
- ON_CALL(listener_, GetDevicesIds(app_id_1_))
- .WillByDefault(Return(transport_manager::DeviceList(1, device_id_1_)));
-
- policy_manager_->SetUserConsentForDevice(device_id_1_, true);
- // Add app from consented device. App will be assigned with default policies
- policy_manager_->AddApplication(
- device_id_1_, application_id_, HmiTypes(policy_table::AHT_MEDIA));
- // Emulate PTU with new policies for app added above
- std::ifstream ifile(kValidSdlPtUpdateJson);
- Json::CharReaderBuilder reader_builder;
- std::string json;
- Json::Value root(Json::objectValue);
- if (ifile.is_open() &&
- Json::parseFromStream(reader_builder, ifile, &root, nullptr)) {
- // Add AppID with policies
- root["policy_table"]["app_policies"][application_id_] =
- Json::Value(Json::objectValue);
- root["policy_table"]["app_policies"][application_id_]["memory_kb"] =
- Json::Value(50);
- root["policy_table"]["app_policies"][application_id_]
- ["heart_beat_timeout_ms"] = Json::Value(100);
- root["policy_table"]["app_policies"][application_id_]["AppHMIType"] =
- Json::Value(Json::arrayValue);
- root["policy_table"]["app_policies"][application_id_]["AppHMIType"][0] =
- Json::Value("MEDIA");
- root["policy_table"]["app_policies"][application_id_]["groups"] =
- Json::Value(Json::arrayValue);
- root["policy_table"]["app_policies"][application_id_]["groups"][0] =
- Json::Value("Base-4");
- root["policy_table"]["app_policies"][application_id_]["priority"] =
- Json::Value("EMERGENCY");
- root["policy_table"]["app_policies"][application_id_]["default_hmi"] =
- Json::Value("FULL");
- root["policy_table"]["app_policies"][application_id_]["keep_context"] =
- Json::Value(true);
- root["policy_table"]["app_policies"][application_id_]["steal_focus"] =
- Json::Value(true);
- root["policy_table"]["app_policies"][application_id_]["certificate"] =
- Json::Value("sign");
- json = root.toStyledString();
- }
- ifile.close();
-
- ::policy::BinaryMessage msg(json.begin(), json.end());
- // Load Json to cache
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- policy_manager_->LoadPT(kFilePtUpdateJson, msg));
- policy_manager_->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-
- EXPECT_FALSE(cache->IsPTPreloaded());
-
- policy_table::RpcParameters rpc_parameters;
- rpc_parameters.hmi_levels.push_back(policy_table::HL_FULL);
-
- policy_table::Rpc rpc;
- rpc["Alert"] = rpc_parameters;
- ::policy::RPCParams input_params;
- ::policy::CheckPermissionResult output;
-
- cache->AddDevice(device_id_1_, "Bluetooth");
- cache->SetDeviceData(device_id_1_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth");
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelFull,
- "Alert",
- input_params,
- output);
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- // Check list of parameters empty
- ASSERT_TRUE(output.list_of_allowed_params.empty());
-}
-
-TEST_F(PolicyManagerImplTest2,
- CheckPermissions_NoParametersInPT_CheckRpcsInDifferentLevels) {
- EXPECT_CALL(listener_, GetDevicesIds(application_id_))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- // Arrange
- AddSetDeviceData();
- LoadPTUFromJsonFile("json/sdl_update_pt_send_location.json");
-
- // Check RPC in each level
- ::policy::RPCParams input_params;
- ::policy::CheckPermissionResult output;
- // Rpc in FULL level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelFull,
- "SendLocation",
- input_params,
- output);
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- ASSERT_TRUE(output.list_of_allowed_params.empty());
-
- // Reset output
- ResetOutputList(output);
-
- // Rpc in LIMITED level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelLimited,
- "SendLocation",
- input_params,
- output);
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- ASSERT_TRUE(output.list_of_allowed_params.empty());
-
- ResetOutputList(output);
-
- // Rpc in BACKGROUND level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelBackground,
- "SendLocation",
- input_params,
- output);
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- ASSERT_TRUE(output.list_of_allowed_params.empty());
-
- ResetOutputList(output);
-
- // Rpc in NONE level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelNone,
- "SendLocation",
- input_params,
- output);
- // Check RPC is disallowed
- EXPECT_EQ(::policy::kRpcDisallowed, output.hmi_level_permitted);
- // Check list of parameters is empty
- ASSERT_TRUE(output.list_of_allowed_params.empty());
-}
-
-TEST_F(
- PolicyManagerImplTest2,
- CheckPermissions_ParamsNotAllowedInPT_AddAppWithAllParams_CheckRpcsInDiffLvls) {
- EXPECT_CALL(listener_, GetDevicesIds(application_id_))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- // Arrange
- AddSetDeviceData();
- // File have empty parameters, so they are forbidden
- LoadPTUFromJsonFile("json/sdl_update_pt_send_location_no_params.json");
-
- // Check RPC in each level
- ::policy::RPCParams input_params;
- InsertRpcParametersInList(input_params);
-
- ::policy::CheckPermissionResult output;
- // Rpc in FULL level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelFull,
- "SendLocation",
- input_params,
- output);
-
- // Group which has RPC does not require user consent, so its auto-allowed for
- // user. Since RPC 'parameters' section is present, but empty, that means
- // 'every parameter is disallowed' in case some parameter(s) will be passed
- // it will be considered as disallowed by policy (assumption, will be
- // clarified).
- EXPECT_EQ(::policy::kRpcDisallowed, output.hmi_level_permitted);
-
- // Check list of allowed parameters is empty
- EXPECT_TRUE(output.list_of_allowed_params.empty());
- EXPECT_EQ(10u, output.list_of_undefined_params.size());
- ResetOutputList(output);
-
- // Rpc in LIMITED level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelLimited,
- "SendLocation",
- input_params,
- output);
-
- EXPECT_EQ(::policy::kRpcDisallowed, output.hmi_level_permitted);
-
- // Check list of allowed parameters is empty
- EXPECT_TRUE(output.list_of_allowed_params.empty());
- EXPECT_EQ(10u, output.list_of_undefined_params.size());
-
- ResetOutputList(output);
-
- // Rpc in BACKGROUND level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelBackground,
- "SendLocation",
- input_params,
- output);
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcDisallowed, output.hmi_level_permitted);
-
- // Check list of allowed parameters is empty
- EXPECT_TRUE(output.list_of_allowed_params.empty());
- EXPECT_EQ(10u, output.list_of_undefined_params.size());
-
- // Reset output
- ResetOutputList(output);
-
- // Rpc in NONE level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelNone,
- "SendLocation",
- input_params,
- output);
-
- EXPECT_EQ(::policy::kRpcDisallowed, output.hmi_level_permitted);
-
- // Check lists of parameters are empty
- EXPECT_TRUE(output.list_of_allowed_params.empty());
- EXPECT_TRUE(output.list_of_disallowed_params.empty());
- EXPECT_TRUE(output.list_of_undefined_params.empty());
-}
-
-TEST_F(PolicyManagerImplTest2,
- CheckPermissions_SomeParamsAllowedInPT_CheckRpcsInDiffLvls) {
- EXPECT_CALL(listener_, GetDevicesIds(application_id_))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- // Arrange
- AddSetDeviceData();
-
- // File have some parameters, so only "longitudeDegrees", "latitudeDegrees",
- //"locationDescription", "phoneNumber" are allowed
- LoadPTUFromJsonFile("json/sdl_update_pt_send_location_some_params.json");
-
- // Check RPC in each level
- ::policy::RPCParams input_params;
- InsertRpcParametersInList(input_params);
-
- ::policy::CheckPermissionResult output;
- // Rpc in FULL level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelFull,
- "SendLocation",
- input_params,
- output);
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
-
- // Check list of allowed parameters is not empty
- ASSERT_FALSE(output.list_of_allowed_params.empty());
- // Check parameters that should be allowed
- CheckIsParamInList(output.list_of_allowed_params, "longitudeDegrees");
- CheckIsParamInList(output.list_of_allowed_params, "latitudeDegrees");
- CheckIsParamInList(output.list_of_allowed_params, "locationDescription");
- CheckIsParamInList(output.list_of_allowed_params, "phoneNumber");
-
- // Parameters that are missing in application assigned groups are considered
- // as disallowed by policy, i.e. w/o defined user consent, so they are put to
- // undefined container.
- ASSERT_FALSE(output.list_of_undefined_params.empty());
- CheckIsParamInList(output.list_of_undefined_params, "locationName");
- CheckIsParamInList(output.list_of_undefined_params, "addressLines");
- CheckIsParamInList(output.list_of_undefined_params, "locationImage");
- CheckIsParamInList(output.list_of_undefined_params, "deliveryMode");
- CheckIsParamInList(output.list_of_undefined_params, "timeStamp");
- CheckIsParamInList(output.list_of_undefined_params, "address");
-
- // Reset output
- output.hmi_level_permitted = ::policy::kRpcDisallowed;
- output.list_of_allowed_params.clear();
- output.list_of_undefined_params.clear();
-
- // Rpc in LIMITED level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelLimited,
- "SendLocation",
- input_params,
- output);
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
-
- // Check list of allowed parameters is not empty
- ASSERT_FALSE(output.list_of_allowed_params.empty());
- // Check parameters that should be allowed
- CheckIsParamInList(output.list_of_allowed_params, "longitudeDegrees");
- CheckIsParamInList(output.list_of_allowed_params, "latitudeDegrees");
- CheckIsParamInList(output.list_of_allowed_params, "locationDescription");
- CheckIsParamInList(output.list_of_allowed_params, "phoneNumber");
-
- ASSERT_FALSE(output.list_of_undefined_params.empty());
- EXPECT_EQ(6u, output.list_of_undefined_params.size());
- // Reset output
- ResetOutputList(output);
-
- // Rpc in BACKGROUND level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelBackground,
- "SendLocation",
- input_params,
- output);
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
-
- // Check parameters that should be allowed
- ASSERT_FALSE(output.list_of_allowed_params.empty());
- CheckIsParamInList(output.list_of_allowed_params, "longitudeDegrees");
- CheckIsParamInList(output.list_of_allowed_params, "latitudeDegrees");
- CheckIsParamInList(output.list_of_allowed_params, "locationDescription");
- CheckIsParamInList(output.list_of_allowed_params, "phoneNumber");
-
- EXPECT_FALSE(output.list_of_undefined_params.empty());
- // Reset output
- ResetOutputList(output);
-
- // Rpc in NONE level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelNone,
- "SendLocation",
- input_params,
- output);
- // Check RPC is disallowed
- EXPECT_EQ(::policy::kRpcDisallowed, output.hmi_level_permitted);
- // Check lists of parameters are empty
- EXPECT_TRUE(output.list_of_allowed_params.empty());
- EXPECT_TRUE(output.list_of_disallowed_params.empty());
- EXPECT_TRUE(output.list_of_undefined_params.empty());
-}
-
-TEST_F(PolicyManagerImplTest2, GetUpdateUrl) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- GetPTU(kValidSdlPtUpdateJson);
- // Check expectations
- const std::string update_url("http://x.x.x.x:3000/api/1/policies");
- EXPECT_EQ(update_url, policy_manager_->GetUpdateUrl(7));
- EXPECT_EQ("", policy_manager_->GetUpdateUrl(4));
-}
-
-// Related to manual test APPLINK-18789
-TEST_F(PolicyManagerImplTest2, GetCorrectStatus_PTUSuccessful) {
- // Precondition
- CreateLocalPT(preloaded_pt_filename_);
- // Check
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
- EXPECT_CALL(listener_, GetDevicesIds(application_id_))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
-
- // Adding changes PT status
- policy_manager_->AddApplication(
- device_id_1_, application_id_, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
- // Before load PT we should send notification about start updating
- policy_manager_->OnUpdateStarted();
- // Update
- GetPTU(kPtu3Json);
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
-}
-
-TEST_F(PolicyManagerImplTest2,
- CheckPermissions_NoParamsInPT_AddAppWithAllParams_CheckRpcsInDiffLvls) {
- // File does not have parameters, so they all are permitted
- CheckPermissions_AllParamsAllowed_CheckRpcsInDiffLvls(
- "json/sdl_update_pt_send_location.json");
-}
-
-TEST_F(PolicyManagerImplTest2,
- CheckPermissions_AllParamsAllowedInPT_CheckRpcsInDiffLvls) {
- // File has permissions for all params
- CheckPermissions_AllParamsAllowed_CheckRpcsInDiffLvls(
- "json/sdl_update_pt_send_location_all_params.json");
-}
-
-TEST_F(PolicyManagerImplTest2,
- CheckPermissions_DiffParamsAllowedInGroups_CheckRpcsInDiffLvls) {
- EXPECT_CALL(listener_, GetDevicesIds(application_id_))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- // Arrange
- AddSetDeviceData();
- // Load Json to cache
- // File have 2 functional groups: SendLocation and SendLocationOnly.
- // They have different parameters.
- // Allowed both groups of parameters
- LoadPTUFromJsonFile("json/sdl_update_pt_2_groups_have_params.json");
-
- // Check RPC in each level
- ::policy::RPCParams input_params;
- InsertRpcParametersInList(input_params);
-
- ::policy::CheckPermissionResult output;
- // Rpc in FULL level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelFull,
- "SendLocation",
- input_params,
- output);
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- // Check list of allowed parameters is not empty
- EXPECT_FALSE(output.list_of_allowed_params.empty());
- EXPECT_EQ(7u, output.list_of_allowed_params.size());
- // Check parameters that should be allowed
- CheckIsParamInList(output.list_of_allowed_params, "longitudeDegrees");
- CheckIsParamInList(output.list_of_allowed_params, "latitudeDegrees");
- CheckIsParamInList(output.list_of_allowed_params, "locationDescription");
- CheckIsParamInList(output.list_of_allowed_params, "phoneNumber");
- CheckIsParamInList(output.list_of_allowed_params, "locationName");
- CheckIsParamInList(output.list_of_allowed_params, "locationImage");
- CheckIsParamInList(output.list_of_allowed_params, "deliveryMode");
-
- EXPECT_TRUE(output.list_of_disallowed_params.empty());
- ResetOutputList(output);
-
- // Rpc in LIMITED level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelLimited,
- "SendLocation",
- input_params,
- output);
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- // Check list of allowed parameters is not empty
- EXPECT_FALSE(output.list_of_allowed_params.empty());
- EXPECT_EQ(7u, output.list_of_allowed_params.size());
- // Check parameters that should be allowed
- CheckIsParamInList(output.list_of_allowed_params, "longitudeDegrees");
- CheckIsParamInList(output.list_of_allowed_params, "latitudeDegrees");
- CheckIsParamInList(output.list_of_allowed_params, "locationDescription");
- CheckIsParamInList(output.list_of_allowed_params, "phoneNumber");
- CheckIsParamInList(output.list_of_allowed_params, "locationName");
- CheckIsParamInList(output.list_of_allowed_params, "locationImage");
- CheckIsParamInList(output.list_of_allowed_params, "deliveryMode");
-
- EXPECT_TRUE(output.list_of_disallowed_params.empty());
- ResetOutputList(output);
-
- // Rpc in BACKGROUND level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelBackground,
- "SendLocation",
- input_params,
- output);
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- // Check list of allowed parameters is not empty
- EXPECT_FALSE(output.list_of_allowed_params.empty());
- EXPECT_EQ(7u, output.list_of_allowed_params.size());
- // Check parameters that should be allowed
- CheckIsParamInList(output.list_of_allowed_params, "longitudeDegrees");
- CheckIsParamInList(output.list_of_allowed_params, "latitudeDegrees");
- CheckIsParamInList(output.list_of_allowed_params, "locationDescription");
- CheckIsParamInList(output.list_of_allowed_params, "phoneNumber");
- CheckIsParamInList(output.list_of_allowed_params, "locationName");
- CheckIsParamInList(output.list_of_allowed_params, "locationImage");
- CheckIsParamInList(output.list_of_allowed_params, "deliveryMode");
-
- EXPECT_TRUE(output.list_of_disallowed_params.empty());
- // Reset output
- ResetOutputList(output);
-
- // Rpc in NONE level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelNone,
- "SendLocation",
- input_params,
- output);
- // Check RPC is disallowed
- EXPECT_EQ(::policy::kRpcDisallowed, output.hmi_level_permitted);
- // Check lists of parameters are empty
- EXPECT_TRUE(output.list_of_allowed_params.empty());
- EXPECT_TRUE(output.list_of_disallowed_params.empty());
- EXPECT_TRUE(output.list_of_undefined_params.empty());
-}
-
-TEST_F(PolicyManagerImplTest2,
- CheckPermissions_ParamsAllowedInOneGroup_CheckRpcsInDiffLvls) {
- // Load Json to cache
- // File have 2 functional groups: SendLocation and SendLocationOnly.
- // They have different parameters. One has dissalowed all params, other -
- // allowed.
-
- // Arrange
- CreateLocalPT("json/sdl_preloaded_pt_send_location.json");
- policy_manager_->AddDevice(device_id_1_, "Bluetooth");
- policy::CacheManagerInterfaceSPtr cache = policy_manager_->GetCache();
- ASSERT_TRUE(cache->SetDeviceData(device_id_1_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
-
- EXPECT_CALL(listener_, GetDevicesIds(application_id_))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- // Add app from consented device. App will be assigned with default policies
- policy_manager_->SetUserConsentForDevice(device_id_1_, true);
- policy_manager_->AddApplication(
- device_id_1_, application_id_, HmiTypes(policy_table::AHT_DEFAULT));
-
- std::ifstream ifile("json/sdl_update_pt_2_groups_no_params_in1.json");
- Json::CharReaderBuilder reader_builder;
- std::string json;
- Json::Value root(Json::objectValue);
- if (ifile.is_open()) {
- Json::parseFromStream(reader_builder, ifile, &root, nullptr);
- }
- json = root.toStyledString();
- ifile.close();
- ::policy::BinaryMessage msg(json.begin(), json.end());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- policy_manager_->LoadPT(kFilePtUpdateJson, msg));
- policy_manager_->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-
- EXPECT_FALSE(cache->IsPTPreloaded());
-
- // Check RPC in each level
- ::policy::RPCParams input_params;
- InsertRpcParametersInList(input_params);
-
- ::policy::CheckPermissionResult output;
- // Rpc in FULL level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelFull,
- "SendLocation",
- input_params,
- output);
-
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- EXPECT_TRUE(output.list_of_undefined_params.empty());
- EXPECT_EQ(10u, output.list_of_allowed_params.size());
- ResetOutputList(output);
-
- // Rpc in LIMITED level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelLimited,
- "SendLocation",
- input_params,
- output);
-
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- EXPECT_TRUE(output.list_of_undefined_params.empty());
- EXPECT_EQ(10u, output.list_of_allowed_params.size());
- ResetOutputList(output);
-
- // Rpc in BACKGROUND level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelBackground,
- "SendLocation",
- input_params,
- output);
-
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- EXPECT_TRUE(output.list_of_undefined_params.empty());
- EXPECT_EQ(10u, output.list_of_allowed_params.size());
- // Reset output
- ResetOutputList(output);
-
- // Rpc in NONE level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelNone,
- "SendLocation",
- input_params,
- output);
-
- EXPECT_EQ(::policy::kRpcDisallowed, output.hmi_level_permitted);
- EXPECT_TRUE(output.list_of_allowed_params.empty());
- EXPECT_TRUE(output.list_of_disallowed_params.empty());
-}
-
-TEST_F(PolicyManagerImplTest2,
- CheckPermissions_ParamOmmittedInOneGroup_CheckRpcsInDiffLvls) {
- // Load Json to cache
- // File have 2 functional groups: SendLocation and SendLocationOnly.
- // They have different parameters. One has dissalowed all params, other -
- // omitted.
-
- // Arrange
- CreateLocalPT("json/sdl_preloaded_pt_send_location.json");
- policy_manager_->AddDevice(device_id_1_, "Bluetooth");
- policy::CacheManagerInterfaceSPtr cache = policy_manager_->GetCache();
- ASSERT_TRUE(cache->SetDeviceData(device_id_1_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
-
- EXPECT_CALL(listener_, GetDevicesIds(application_id_))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- // Add app from consented device. App will be assigned with default policies
- policy_manager_->SetUserConsentForDevice(device_id_1_, true);
- policy_manager_->AddApplication(
- device_id_1_, application_id_, HmiTypes(policy_table::AHT_DEFAULT));
-
- std::ifstream ifile(
- "json/sdl_update_pt_2_groups_no_params_in1_omitted_in2.json");
- Json::CharReaderBuilder reader_builder;
- std::string json;
- Json::Value root(Json::objectValue);
- if (ifile.is_open()) {
- Json::parseFromStream(reader_builder, ifile, &root, nullptr);
- }
- json = root.toStyledString();
- ifile.close();
- ::policy::BinaryMessage msg(json.begin(), json.end());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- policy_manager_->LoadPT(kFilePtUpdateJson, msg));
- policy_manager_->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-
- EXPECT_FALSE(cache->IsPTPreloaded());
-
- // Check RPC in each level
- ::policy::RPCParams input_params;
- InsertRpcParametersInList(input_params);
-
- ::policy::CheckPermissionResult output;
- // Rpc in FULL level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelFull,
- "SendLocation",
- input_params,
- output);
-
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- EXPECT_TRUE(output.list_of_undefined_params.empty());
- EXPECT_EQ(10u, output.list_of_allowed_params.size());
- ResetOutputList(output);
-
- // Rpc in LIMITED level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelLimited,
- "SendLocation",
- input_params,
- output);
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- EXPECT_TRUE(output.list_of_undefined_params.empty());
- EXPECT_EQ(10u, output.list_of_allowed_params.size());
- ResetOutputList(output);
-
- // Rpc in BACKGROUND level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelBackground,
- "SendLocation",
- input_params,
- output);
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- EXPECT_TRUE(output.list_of_undefined_params.empty());
- EXPECT_EQ(10u, output.list_of_allowed_params.size());
- // Reset output
- ResetOutputList(output);
-
- // Rpc in NONE level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelNone,
- "SendLocation",
- input_params,
- output);
- EXPECT_EQ(::policy::kRpcDisallowed, output.hmi_level_permitted);
- EXPECT_TRUE(output.list_of_allowed_params.empty());
- EXPECT_TRUE(output.list_of_disallowed_params.empty());
- EXPECT_TRUE(output.list_of_undefined_params.empty());
-}
-
-TEST_F(PolicyManagerImplTest, LoadPT_SetInvalidUpdatePT_PTIsNotLoaded) {
- // Arrange
- EXPECT_CALL(*cache_manager_, GenerateSnapshot())
- .WillOnce(Return(default_pt_snapshot_));
- policy_manager_->ForcePTExchange();
- policy_manager_->OnUpdateStarted();
- Json::Value table(Json::objectValue);
-
- policy_table::Table update(&table);
- update.SetPolicyTableType(rpc::policy_table_interface_base::PT_UPDATE);
-
- // Assert update is invalid
- ASSERT_FALSE(IsValid(update));
-
- // Act
- std::string json = table.toStyledString();
- ::policy::BinaryMessage msg(json.begin(), json.end());
-
- auto pt = std::make_shared<policy_table::Table>();
- *pt = update;
-
- // Assert
- EXPECT_CALL(*cache_manager_, ApplyUpdate(_)).Times(0);
- EXPECT_CALL(listener_, GetAppName(_)).Times(0);
- EXPECT_CALL(*cache_manager_, SaveUpdateRequired(false)).Times(0);
- EXPECT_CALL(*cache_manager_, TimeoutResponse()).Times(0);
- EXPECT_CALL(*cache_manager_, SecondsBetweenRetries(_)).Times(0);
- EXPECT_CALL(*cache_manager_, GetVehicleDataItems())
- .WillOnce(Return(std::vector<policy_table::VehicleDataItem>()));
- ASSERT_EQ(PolicyManager::PtProcessingResult::kWrongPtReceived,
- policy_manager_->LoadPT(kFilePtUpdateJson, msg));
-
- EXPECT_CALL(*cache_manager_, IsPTPreloaded());
- EXPECT_FALSE(policy_manager_->GetCache()->IsPTPreloaded());
-
- EXPECT_CALL(listener_, OnUpdateStatusChanged(_)).Times(1);
- policy_manager_->OnPTUFinished(
- PolicyManager::PtProcessingResult::kWrongPtReceived);
-}
-
-TEST_F(
- PolicyManagerImplTest2,
- AddApplication_AddExistingApplicationFromDeviceWithoutConsent_ExpectNoUpdateRequired) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
- GetPTU(kValidSdlPtUpdateJson);
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
- // Try to add existing app
- policy_manager_->AddApplication(
- device_id_1_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- // Check no update required
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
-}
-
-uint32_t GetCurrentDaysCount() {
- date_time::TimeDuration current_time = date_time::getCurrentTime();
- const uint32_t kSecondsInDay = 60 * 60 * 24;
- return date_time::getSecs(current_time) / kSecondsInDay;
-}
-
-TEST_F(PolicyManagerImplTest2,
- PTUpdatedAt_DaysNotExceedLimit_ExpectNoUpdateRequired) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- const uint32_t days = GetCurrentDaysCount();
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
-
- GetPTU(kValidSdlPtUpdateJson);
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
-
- policy_manager_->AddApplication(
- device_id_2_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
- ::policy::Counters counter = ::policy::Counters::DAYS_AFTER_EPOCH;
- // Set PT was updated 10 days ago (limit is 30 days for now)
- // So no limit exceeded
- policy_manager_->PTUpdatedAt(counter, days - 10);
- policy_manager_->OnAppRegisteredOnMobile(device_id_2_, app_id_2_);
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
-}
-
-TEST_F(PolicyManagerImplTest2,
- PTUpdatedAt_DaysExceedLimit_ExpectUpdateRequired) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- const uint32_t days = GetCurrentDaysCount();
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
- GetPTU(kValidSdlPtUpdateJson);
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
-
- policy_manager_->AddApplication(
- device_id_2_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
- ::policy::Counters counter = ::policy::Counters::DAYS_AFTER_EPOCH;
- // Set PT was updated 50 days ago (limit is 30 days for now)
- policy_manager_->PTUpdatedAt(counter, days - 50);
- policy_manager_->OnAppRegisteredOnMobile(device_id_2_, app_id_2_);
- EXPECT_EQ("UPDATE_NEEDED", policy_manager_->GetPolicyTableStatus());
-}
-
-TEST_F(
- PolicyManagerImplTest2,
- OnIgnitionCyclesExceeded_SetExceededIgnitionCycles_ExpectUpdateScheduled) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- const uint32_t days = GetCurrentDaysCount();
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
- GetPTU(kValidSdlPtUpdateJson);
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
- // Try to add existing app
- policy_manager_->AddApplication(
- device_id_2_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
- ::policy::Counters counter = ::policy::Counters::DAYS_AFTER_EPOCH;
- // Set PT was updated 10 days ago (limit is 30 days for now)
- // So no limit exceeded
- policy_manager_->PTUpdatedAt(counter, days - 10);
- int ign_cycles =
- (policy_manager_->GetCache())->IgnitionCyclesBeforeExchange();
- // Set ignition cycles to value = 99 (limit is 100 which initiates auto
- // PTExchange)
- for (int i = 0; i < ign_cycles; ++i) {
- policy_manager_->IncrementIgnitionCycles();
- }
- policy_manager_->OnAppRegisteredOnMobile(device_id_2_, app_id_2_);
- // Check update required
- EXPECT_EQ("UPDATE_NEEDED", policy_manager_->GetPolicyTableStatus());
-}
-
-TEST_F(PolicyManagerImplTest2,
- GetUserConsentForApp_SetUserConsentForApp_ExpectReceivedConsentCorrect) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- ASSERT_TRUE(
- (policy_manager_->GetCache())->AddDevice(device_id_2_, "Bluetooth"));
- ASSERT_TRUE((policy_manager_->GetCache())
- ->SetDeviceData(device_id_2_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
-
- ::policy::StringArray consented_groups;
- ::policy::StringArray disallowed_groups;
- consented_groups.push_back(std::string("Notifications"));
- consented_groups.push_back(std::string("Notifications"));
- (policy_manager_->GetCache())
- ->SetUserPermissionsForDevice(
- device_id_2_, consented_groups, disallowed_groups);
- policy_manager_->SetUserConsentForDevice(device_id_2_, true);
- EXPECT_CALL(listener_, GetDevicesIds(app_id_2_))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- policy_manager_->AddApplication(
- device_id_2_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- GetPTU(kValidSdlPtUpdateJson);
-
- ::policy::PermissionConsent perm_consent;
- perm_consent.device_id = device_id_2_;
- perm_consent.policy_app_id = app_id_2_;
- perm_consent.consent_source = "VR";
-
- ::policy::FunctionalGroupPermission group1_perm;
- group1_perm.group_alias = "Notifications";
- group1_perm.group_name = "Notifications";
- group1_perm.group_id = ::utils::Djb2HashFromString("Notifications");
- group1_perm.state = ::policy::GroupConsent::kGroupAllowed;
-
- std::vector< ::policy::FunctionalGroupPermission> groups_permissions;
- groups_permissions.push_back(group1_perm);
- perm_consent.group_permissions = groups_permissions;
-
- policy_manager_->SetUserConsentForApp(perm_consent,
- policy::PolicyManager::kSilentMode);
- policy_manager_->SendNotificationOnPermissionsUpdated(device_id_2_,
- app_id_2_);
- std::vector< ::policy::FunctionalGroupPermission> actual_groups_permissions;
- std::vector< ::policy::FunctionalGroupPermission>::iterator it;
- policy_manager_->GetUserConsentForApp(
- device_id_2_, app_id_2_, actual_groups_permissions);
- uint32_t index = 0;
- for (; index < actual_groups_permissions.size(); ++index) {
- if (actual_groups_permissions[index].group_id == group1_perm.group_id) {
- break;
- }
- }
- // Check
- EXPECT_EQ(group1_perm.group_alias,
- actual_groups_permissions[index].group_alias);
- EXPECT_EQ(group1_perm.group_name,
- actual_groups_permissions[index].group_name);
- EXPECT_EQ(group1_perm.group_id, actual_groups_permissions[index].group_id);
- EXPECT_EQ(group1_perm.state, actual_groups_permissions[index].state);
-}
-
-TEST_F(PolicyManagerImplTest2,
- CanAppKeepContext_SetPoliciesForAppUpdated_ExpectAppCanKeepContext) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- EXPECT_CALL(listener_, GetDevicesIds(app_id_2_))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- policy_manager_->AddApplication(
- device_id_2_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- GetPTU(kValidSdlPtUpdateJson);
- // Check keep context in updated policies for app
- EXPECT_TRUE(policy_manager_->CanAppKeepContext(app_id_2_));
-}
-
-TEST_F(PolicyManagerImplTest2,
- CanAppStealFocus_SetPoliciesForAppUpdated_ExpectAppCanStealFocus) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- EXPECT_CALL(listener_, GetDevicesIds(app_id_2_))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- policy_manager_->AddApplication(
- device_id_2_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- GetPTU(kValidSdlPtUpdateJson);
- // Check keep context in updated policies for app
- EXPECT_TRUE(policy_manager_->CanAppKeepContext(app_id_2_));
-}
-
-TEST_F(
- PolicyManagerImplTest2,
- GetPermissionsForApp_SetUserConsentForApp_ExpectReceivedPermissionsCorrect) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
-
- ASSERT_TRUE(
- (policy_manager_->GetCache())->AddDevice(device_id_2_, "Bluetooth"));
- ASSERT_TRUE((policy_manager_->GetCache())
- ->SetDeviceData(device_id_2_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
-
- ::policy::StringArray consented_groups;
- ::policy::StringArray disallowed_groups;
- consented_groups.push_back(std::string("Notifications"));
- (policy_manager_->GetCache())
- ->SetUserPermissionsForDevice(
- device_id_2_, consented_groups, disallowed_groups);
- policy_manager_->SetUserConsentForDevice(device_id_2_, true);
- EXPECT_CALL(listener_, GetDevicesIds(app_id_2_))
- .WillRepeatedly(Return(transport_manager::DeviceList(1, device_id_2_)));
- policy_manager_->AddApplication(
- device_id_2_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
-
- GetPTU(kValidSdlPtUpdateJson);
- ::policy::PermissionConsent perm_consent;
- perm_consent.device_id = device_id_2_;
- perm_consent.policy_app_id = app_id_2_;
- perm_consent.consent_source = "VR";
-
- ::policy::FunctionalGroupPermission group1_perm;
- group1_perm.group_alias = "Notifications";
- group1_perm.group_name = "Notifications";
- group1_perm.group_id = ::utils::Djb2HashFromString("Notifications");
- group1_perm.state = ::policy::GroupConsent::kGroupAllowed;
-
- std::vector< ::policy::FunctionalGroupPermission> groups_permissions;
- groups_permissions.push_back(group1_perm);
- perm_consent.group_permissions = groups_permissions;
-
- policy_manager_->SetUserConsentForApp(perm_consent,
- policy::PolicyManager::kSilentMode);
- policy_manager_->SendNotificationOnPermissionsUpdated(device_id_2_,
- app_id_2_);
- std::vector< ::policy::FunctionalGroupPermission> actual_groups_permissions;
- std::vector< ::policy::FunctionalGroupPermission>::iterator it;
- policy_manager_->GetPermissionsForApp(
- device_id_2_, app_id_2_, actual_groups_permissions);
- uint32_t index = 0;
- for (; index < actual_groups_permissions.size(); ++index) {
- if (actual_groups_permissions[index].group_id == group1_perm.group_id) {
- break;
- }
- }
- // Check
- EXPECT_EQ(group1_perm.group_alias,
- actual_groups_permissions[index].group_alias);
- EXPECT_EQ(group1_perm.group_name,
- actual_groups_permissions[index].group_name);
- EXPECT_EQ(group1_perm.group_id, actual_groups_permissions[index].group_id);
- EXPECT_EQ(group1_perm.state, actual_groups_permissions[index].state);
-}
-
-TEST_F(
- PolicyManagerImplTest2,
- GetAppRequestTypes_AddApp_UpdateAppPolicies_ExpectReceivedRequestTypesCorrect) {
- // Arrange
- const transport_manager::DeviceHandle handle = 1;
- CreateLocalPT(preloaded_pt_filename_);
- EXPECT_CALL(listener_, GetDevicesIds(app_id_3_))
- .WillRepeatedly(Return(transport_manager::DeviceList(1, device_id_1_)));
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(handle, app_id_3_))
- .WillRepeatedly(Return(device_id_1_));
- policy_manager_->AddApplication(
- device_id_1_, app_id_3_, HmiTypes(policy_table::AHT_DEFAULT));
- ::policy::StringArray app_requests =
- policy_manager_->GetAppRequestTypes(handle, app_id_3_);
- EXPECT_EQ(1u, app_requests.size());
-
- Json::Value root = GetPTU(kPtuRequestTypeJson);
- Json::Value request_Types = Json::Value(Json::arrayValue);
- request_Types =
- root["policy_table"]["app_policies"][app_id_3_]["RequestType"];
- app_requests = policy_manager_->GetAppRequestTypes(handle, app_id_3_);
- EXPECT_EQ(request_Types.size(), app_requests.size());
- // Check nicknames match
- for (uint32_t i = 0; i < request_Types.size(); ++i) {
- EXPECT_EQ(request_Types[i], app_requests[i]);
- }
-}
-
-TEST_F(
- PolicyManagerImplTest2,
- HertBeatTimeout_AddApp_UpdateAppPolicies_ExpectReceivedHertBeatTimeoutCorrect) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- std::shared_ptr<policy_table::Table> pt =
- (policy_manager_->GetCache())->GetPT();
- ::policy_table::PolicyTableType type1 =
- ::policy_table::PolicyTableType::PT_PRELOADED;
- pt->SetPolicyTableType(type1);
- if (!pt->is_valid()) {
- std::cout << "\nPolicy table is not valid."
- << "\n";
- rpc::ValidationReport report("policy_table");
- pt->ReportErrors(&report);
- }
- EXPECT_CALL(listener_, GetDevicesIds(app_id_2_))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- // Add new app
- policy_manager_->AddApplication(
- device_id_2_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- uint32_t result = policy_manager_->HeartBeatTimeout(app_id_2_);
- // By default hertbeat timeout is 0
- EXPECT_EQ(0u, result);
- Json::Value root = GetPTU(kValidSdlPtUpdateJson);
-
- ::policy_table::PolicyTableType type2 =
- ::policy_table::PolicyTableType::PT_UPDATE;
- pt->SetPolicyTableType(type2);
- if (!pt->is_valid()) {
- std::cout << "\nPolicy table is not valid."
- << "\n";
- rpc::ValidationReport report("policy_table");
- pt->ReportErrors(&report);
- }
-
- Json::Value heart_beat_timeout = Json::Value(Json::uintValue);
- heart_beat_timeout =
- root["policy_table"]["app_policies"][app_id_2_]["heart_beat_timeout_ms"];
- result = policy_manager_->HeartBeatTimeout(app_id_2_);
- EXPECT_EQ(heart_beat_timeout.asUInt(), result);
-}
-
-TEST_F(PolicyManagerImplTest2,
- RemoveAppConsentForGroup_SetUserConsentForApp_ExpectAppConsentDeleted) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- ASSERT_TRUE(
- (policy_manager_->GetCache())->AddDevice(device_id_2_, "Bluetooth"));
- ASSERT_TRUE((policy_manager_->GetCache())
- ->SetDeviceData(device_id_2_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
-
- ::policy::StringArray consented_groups;
- ::policy::StringArray disallowed_groups;
- consented_groups.push_back(std::string("Notifications"));
- (policy_manager_->GetCache())
- ->SetUserPermissionsForDevice(
- device_id_2_, consented_groups, disallowed_groups);
- policy_manager_->SetUserConsentForDevice(device_id_2_, true);
- EXPECT_CALL(listener_, GetDevicesIds(app_id_2_))
- .WillRepeatedly(Return(transport_manager::DeviceList(1, device_id_2_)));
- policy_manager_->AddApplication(
- device_id_2_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- GetPTU(kValidSdlPtUpdateJson);
-
- ::policy::PermissionConsent perm_consent;
- perm_consent.device_id = device_id_2_;
- perm_consent.policy_app_id = app_id_2_;
- perm_consent.consent_source = "VR";
-
- ::policy::FunctionalGroupPermission group1_perm;
- group1_perm.group_alias = "Notifications";
- group1_perm.group_name = "Notifications";
- group1_perm.group_id = ::utils::Djb2HashFromString("Notifications");
- group1_perm.state = ::policy::GroupConsent::kGroupAllowed;
-
- std::vector< ::policy::FunctionalGroupPermission> groups_permissions;
- groups_permissions.push_back(group1_perm);
- perm_consent.group_permissions = groups_permissions;
-
- policy_manager_->SetUserConsentForApp(perm_consent,
- policy::PolicyManager::kSilentMode);
- policy_manager_->SendNotificationOnPermissionsUpdated(device_id_2_,
- app_id_2_);
- std::vector< ::policy::FunctionalGroupPermission> actual_groups_permissions;
- std::vector< ::policy::FunctionalGroupPermission>::iterator it;
- policy_manager_->GetPermissionsForApp(
- device_id_2_, app_id_2_, actual_groups_permissions);
- uint32_t index = 0;
- for (; index < actual_groups_permissions.size(); ++index) {
- if (actual_groups_permissions[index].group_id == group1_perm.group_id) {
- break;
- }
- }
- // Check
- EXPECT_EQ(group1_perm.group_alias,
- actual_groups_permissions[index].group_alias);
- EXPECT_EQ(group1_perm.group_name,
- actual_groups_permissions[index].group_name);
- EXPECT_EQ(group1_perm.group_id, actual_groups_permissions[index].group_id);
- EXPECT_EQ(group1_perm.state, actual_groups_permissions[index].state);
- std::shared_ptr<policy_table::Table> pt =
- (policy_manager_->GetCache())->GetPT();
- uint32_t ucr_size = 0;
- ::policy_table::DeviceData& device_data = *pt->policy_table.device_data;
- ::policy_table::DeviceData::const_iterator dev_data_iter =
- device_data.find(device_id_2_);
- if (dev_data_iter != device_data.end()) {
- const ::policy_table::DeviceParams& dev_params = dev_data_iter->second;
- const ::policy_table::UserConsentRecords& ucr =
- *(dev_params.user_consent_records);
- ucr_size = ucr.size();
- ASSERT_GT(ucr_size, 0u);
- ::policy_table::UserConsentRecords::const_iterator ucr_iter =
- ucr.find(app_id_2_);
- if (ucr_iter != ucr.end()) {
- EXPECT_TRUE((*(ucr_iter->second.consent_groups)).find("Notifications") !=
- (*(ucr_iter->second.consent_groups)).end());
- policy_manager_->RemoveAppConsentForGroup(app_id_2_, "Notifications");
- EXPECT_TRUE((*(ucr_iter->second.consent_groups)).find("Notifications") ==
- (*(ucr_iter->second.consent_groups)).end());
- }
- }
-}
-
-TEST_F(PolicyManagerImplTest2,
- SingleInvalidRequestTypeInPTU_ExpectReplaceWithDefaultValues) {
- // Arrange
- const std::string section_name = app_id_2_;
- const transport_manager::DeviceHandle handle = 1;
-
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
-
- // Setting device consent to 'true' in order to have defult application
- // permissions, request type etc.
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(handle, app_id_2_))
- .WillRepeatedly(Return(device_id_1_));
- policy_manager_->SetUserConsentForDevice(device_id_1_, true);
- EXPECT_CALL(listener_, GetDevicesIds(section_name))
- .WillRepeatedly(Return(transport_manager::DeviceList(1, device_id_1_)));
- // Add app
- policy_manager_->AddApplication(
- device_id_1_, section_name, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_CALL(listener_, OnPendingPermissionChange(device_id_1_, section_name));
-
- // PTU has single invalid RequestTypes, which must be dropped and replaced
- // with default RT
- GetPTU("json/PTU_with_one_invalid_requestType.json");
-
- // Get RequestTypes from <app_id> section of app policies after PT update
- ::policy::StringArray app_request_types_after =
- policy_manager_->GetAppRequestTypes(handle, section_name);
-
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(handle, kDefaultId))
- .WillOnce(Return(device_id_1_));
- ::policy::StringArray default_request_types_after =
- policy_manager_->GetAppRequestTypes(handle, kDefaultId);
-
- // Check sizes of Request types of PT and PTU
- EXPECT_EQ(4u, app_request_types_after.size());
-
- ::policy::AppPermissions permissions =
- policy_manager_->GetAppPermissionsChanges(device_id_1_, section_name);
- EXPECT_TRUE(permissions.requestTypeChanged);
-
- policy_table::RequestType temp_res1;
- std::vector<policy_table::RequestType> result1;
- for (uint32_t i = 0; i < app_request_types_after.size(); ++i) {
- if (::rpc::policy_table_interface_base::EnumFromJsonString(
- app_request_types_after[i], &temp_res1)) {
- result1.push_back(temp_res1);
- }
- }
- policy_table::RequestType temp_res2;
- std::vector<policy_table::RequestType> result2;
- for (size_t i = 0; i < default_request_types_after.size(); ++i) {
- if (::rpc::policy_table_interface_base::EnumFromJsonString(
- default_request_types_after[i], &temp_res2)) {
- result2.push_back(temp_res2);
- }
- }
- ASSERT_EQ(result1.size(), result2.size());
- std::sort(result1.begin(), result1.end());
- std::sort(result2.begin(), result2.end());
- // Checks
- EXPECT_TRUE(std::equal(result1.begin(), result1.end(), result2.begin()));
-}
-
-TEST_F(PolicyManagerImplTest2,
- InitPT_LoadPT_ExpectIncrementedCountOfSamePrompts) {
- // Initializing policy_table
- CreateLocalPT(preloaded_pt_filename_);
-
- policy_table::FunctionalGroupings functional_groupings;
- GetFunctionalGroupingsFromManager(functional_groupings);
-
- UserConsentPromptToRpcsConnections initial_functional_groupings_map;
- UserConsentPromptToRpcsConnections updated_functional_groupings_map;
- // Filling initial map
- FillMultimapFromFunctionalGroupings(initial_functional_groupings_map,
- functional_groupings);
-
- // Updating policy_table
- GetPTU("json/sdl_pt_update.json");
- policy_table::FunctionalGroupings updated_functional_groupings;
- GetFunctionalGroupingsFromManager(updated_functional_groupings);
- // Filling updated map
- FillMultimapFromFunctionalGroupings(updated_functional_groupings_map,
- updated_functional_groupings);
-
- // Comparing two multimaps
- // (EXPECT increment count of functionalgroups
- // under key : user_consent_prompt)
- uint32_t count_before_update =
- initial_functional_groupings_map.count("Notifications");
- uint32_t count_after_update =
- updated_functional_groupings_map.count("Notifications");
- EXPECT_EQ(1u, count_before_update);
- EXPECT_EQ(2u, count_after_update);
-}
-
-TEST_F(PolicyManagerImplTest2,
- LoadPT_UpdatePT_ChangingCountsOfDifferentUserConsentPrompts) {
- // Initializing policy_table
- CreateLocalPT(preloaded_pt_filename_);
-
- // First update of policy table
- GetPTU("json/sdl_pt_first_update.json");
- // Geting functional groupings first time
- policy_table::FunctionalGroupings first_functional_groupings;
- GetFunctionalGroupingsFromManager(first_functional_groupings);
- // Filling map first time
- UserConsentPromptToRpcsConnections first_update_functional_groupings_map;
- FillMultimapFromFunctionalGroupings(first_update_functional_groupings_map,
- first_functional_groupings);
-
- // Second update of policy table
- GetPTU("json/sdl_pt_second_update.json");
- // Geting functional groupings second time
- policy_table::FunctionalGroupings second_functional_groupings;
- GetFunctionalGroupingsFromManager(second_functional_groupings);
- // Filling map second time
- UserConsentPromptToRpcsConnections second_update_functional_groupings_map;
- FillMultimapFromFunctionalGroupings(second_update_functional_groupings_map,
- second_functional_groupings);
-
- // Getting counts before second update
- uint32_t first_count_of_old_user_consent_prompt =
- first_update_functional_groupings_map.count("Old_Notifications");
- uint32_t first_count_of_new_user_consent_prompt =
- first_update_functional_groupings_map.count("New_Notifications");
-
- // Getting counts after second update
- uint32_t second_count_of_old_user_consent_prompt =
- second_update_functional_groupings_map.count("Old_Notifications");
- uint32_t second_count_of_new_user_consent_prompt =
- second_update_functional_groupings_map.count("New_Notifications");
-
- // Expect decrement count of old user_consent_prormpt
- EXPECT_GT(first_count_of_old_user_consent_prompt,
- second_count_of_old_user_consent_prompt);
- // Expect increment count of new user_consent_prormpt
- EXPECT_LT(first_count_of_new_user_consent_prompt,
- second_count_of_new_user_consent_prompt);
-}
-
-TEST_F(PolicyManagerImplTest_RequestTypes,
- LoadPT_PTWithOneInvalidRequestTypeValue_RequestTypeValueEQToDefault) {
- // Logic in another function
- CompareAppRequestTypesWithDefault(kAppId, kJsonFiles[0]);
-}
-
-TEST_F(PolicyManagerImplTest_RequestTypes,
- LoadPT_InvalidRequestTypeBetweenCorectValuesInPTU_EraseInvalidValue) {
- // Refresh policy table with invalid RequestType in application
- RefreshPT(preloaded_pt_filename_, kJsonFiles[1]);
- // Correct of Request Types
- policy_table::RequestTypes correct_types;
- correct_types.push_back(policy_table::RequestType::RT_HTTP);
- correct_types.push_back(policy_table::RequestType::RT_LAUNCH_APP);
- correct_types.push_back(policy_table::RequestType::RT_PROPRIETARY);
- // Get <app_id> Request Types
- policy_table::RequestTypes received_types =
- GetRequestTypesForApplication(kAppId);
-
- CompareRequestTypesContainers(correct_types, received_types);
-}
-
-TEST_F(
- PolicyManagerImplTest_RequestTypes,
- LoadPT_AppInUpdateFileHaventRequestTypeField_RequestTypeValueEQToDefault) {
- // Logic in another function
- CompareAppRequestTypesWithDefault(kAppId, kJsonFiles[2]);
-}
-
-TEST_F(PolicyManagerImplTest_RequestTypes,
- LoadPT_RequestTypeArrayHaveNoOneValues_AvalibleAllRequestTypes) {
- // Refresh policy table with invalid RequestType in application
- RefreshPT(preloaded_pt_filename_, kJsonFiles[3]);
-
- // Get <app_id> Request Types
- policy_table::RequestTypes received_types =
- GetRequestTypesForApplication(kAppId);
-
- // Expect
- const size_t correct_size = 0;
- const size_t received_size = received_types.size();
- EXPECT_EQ(correct_size, received_size);
-}
-
-TEST_F(PolicyManagerImplTest_RequestTypes,
- InitPT_DefaultRequestTypeHaveOneInvalidValue_False) {
- // PT have only invalid value in app_policies::default::RequestType
- ON_CALL(policy_settings_, app_storage_folder())
- .WillByDefault(ReturnRef(app_storage_folder_));
- ASSERT_FALSE(
- policy_manager_impl_sptr_->InitPT(kJsonFiles[4], &policy_settings_));
- // Invalid table data with pt_preloaded=true
- EXPECT_TRUE(policy_manager_impl_sptr_->GetCache()->IsPTPreloaded());
-}
-
-TEST_F(PolicyManagerImplTest_RequestTypes,
- InitPT_DefaultRequestTypeHaveSeveralInvalidValues_False) {
- // PT have several only invalid values in app_policies::default::RequestType
- ON_CALL(policy_settings_, app_storage_folder())
- .WillByDefault(ReturnRef(app_storage_folder_));
- ASSERT_FALSE(
- policy_manager_impl_sptr_->InitPT(kJsonFiles[5], &policy_settings_));
- // Invalid table data with pt_preloaded=true
- EXPECT_TRUE(policy_manager_impl_sptr_->GetCache()->IsPTPreloaded());
-}
-
-TEST_F(PolicyManagerImplTest_RequestTypes,
- InitPT_DefaultRequestTypeHaveInvalidValueBetweenCorrect_True) {
- // PT have ["QUERY_APPS", "IVSU", "PROPRIETARY"]
- // In app_policies::default::RequestType
- ON_CALL(policy_settings_, app_storage_folder())
- .WillByDefault(ReturnRef(app_storage_folder_));
- ASSERT_TRUE(
- policy_manager_impl_sptr_->InitPT(kJsonFiles[6], &policy_settings_));
- EXPECT_TRUE(policy_manager_impl_sptr_->GetCache()->IsPTPreloaded());
-
- // Correct of Request Types
- policy_table::RequestTypes correct_types;
- correct_types.push_back(policy_table::RequestType::RT_QUERY_APPS);
- correct_types.push_back(policy_table::RequestType::RT_PROPRIETARY);
-
- // Get default Request Types
- policy_table::RequestTypes received_types =
- GetRequestTypesForApplication(kDefaultAppId);
-
- CompareRequestTypesContainers(correct_types, received_types);
-}
-
-TEST_F(PolicyManagerImplTest_RequestTypes,
- LoadPT_PTDefaultApp_RequestTypeValueEQToUpdate) {
- // Base values of Request Types
- policy_table::RequestTypes correct_types = CreateDefaultAppPTURequestValues();
-
- // Load valid values for RequestType
- RefreshPT(preloaded_pt_filename_, kJsonFiles[7]);
-
- // Get Request Types for "<default>"
- policy_table::RequestTypes received_types =
- GetRequestTypesForApplication(policy::kDefaultId);
-
- CompareRequestTypesContainers(correct_types, received_types);
-}
-
-TEST_F(
- PolicyManagerImplTest_RequestTypes,
- LoadPT_PTDefaultAppInvalidRequestTypeValues_RequestTypeValueEQToDatabase) {
- // Base values of Request Types
- policy_table::RequestTypes correct_types =
- CreateDefaultAppDatabaseRequestValues();
-
- // Load RequestType with invalid values
- RefreshPT(preloaded_pt_filename_, kJsonFiles[8]);
-
- // Get Request Types for "<default>"
- policy_table::RequestTypes received_types =
- GetRequestTypesForApplication(policy::kDefaultId);
-
- CompareRequestTypesContainers(correct_types, received_types);
-}
-
-TEST_F(PolicyManagerImplTest_RequestTypes,
- LoadPT_PTDefaultAppEmptyRequestTypeValues_RequestTypeValueEmpty) {
- // Load RequestType with empty values
- RefreshPT(preloaded_pt_filename_, kJsonFiles[9]);
-
- // Get Request Types for "<default>"
- policy_table::RequestTypes received_types =
- GetRequestTypesForApplication(policy::kDefaultId);
-
- // Expect
- const size_t received_size = received_types.size();
- EXPECT_EQ(0u, received_size);
-}
-
-TEST_F(PolicyManagerImplTest_RequestTypes,
- LoadPT_PTDefaultAppOmittedRequestType_RequestTypeValueEQToDatabase) {
- // Base values of Request Types
- policy_table::RequestTypes correct_types =
- CreateDefaultAppDatabaseRequestValues();
-
- // Load omitted RequestType values
- RefreshPT(preloaded_pt_filename_, kJsonFiles[10]);
-
- // Get Request Types for "<default>"
- policy_table::RequestTypes received_types =
- GetRequestTypesForApplication(policy::kDefaultId);
-
- CompareRequestTypesContainers(correct_types, received_types);
-}
-
-TEST_F(
- PolicyManagerImplTest_RequestTypes,
- LoadPT_PTDefaultAppOneInvalidRequestTypeValue_RequestTypeValueEQValidPT) {
- // Update values of Request Types
- policy_table::RequestTypes correct_types = CreateDefaultAppPTURequestValues();
-
- // Load RequestType with one invalid value
- RefreshPT(preloaded_pt_filename_, kJsonFiles[11]);
-
- // Get Request Types for "<default>"
- policy_table::RequestTypes received_types =
- GetRequestTypesForApplication(policy::kDefaultId);
-
- CompareRequestTypesContainers(correct_types, received_types);
-}
-
-TEST_F(PolicyManagerImplTest_RequestTypes,
- LoadPT_PTPreDataConsentApp_RequestTypeValueEQToUpdate) {
- // Update values of Request Types
- policy_table::RequestTypes correct_types =
- CreatePreDataConsentAppPTURequestValues();
-
- // Load valid values for RequestType
- RefreshPT(preloaded_pt_filename_, kJsonFiles[12]);
-
- // Get Request Types for "<pre_DataConsent>"
- policy_table::RequestTypes received_types =
- GetRequestTypesForApplication(policy::kPreDataConsentId);
-
- CompareRequestTypesContainers(correct_types, received_types);
-}
-
-TEST_F(
- PolicyManagerImplTest_RequestTypes,
- LoadPT_PTPreDataConsentAppInvalidRequestTypeValues_RequestTypeValueEQToDatabase) {
- // Update values of Request Types
- policy_table::RequestTypes correct_types;
- correct_types.push_back(policy_table::RequestType::RT_HTTP);
-
- // Load RequestType with invalid values
- RefreshPT(preloaded_pt_filename_, kJsonFiles[13]);
-
- // Get Request Types for "<pre_DataConsent>"
- policy_table::RequestTypes received_types =
- GetRequestTypesForApplication(policy::kPreDataConsentId);
-
- CompareRequestTypesContainers(correct_types, received_types);
-}
-
-TEST_F(PolicyManagerImplTest_RequestTypes,
- LoadPT_PTPreDataConsentAppEmptyRequestTypeValues_RequestTypeValueEmpty) {
- // Load RequestType with empty values
- RefreshPT(preloaded_pt_filename_, kJsonFiles[14]);
-
- // Get Request Types for "<pre_DataConsent>"
- policy_table::RequestTypes received_types =
- GetRequestTypesForApplication(policy::kPreDataConsentId);
-
- // Expect
- const size_t received_size = received_types.size();
- EXPECT_EQ(0u, received_size);
-}
-
-TEST_F(
- PolicyManagerImplTest_RequestTypes,
- LoadPT_PTPreDataConsentAppOmittedRequestType_RequestTypeValueEQToDatabase) {
- // Base values of Request Types
- policy_table::RequestTypes correct_types;
- correct_types.push_back(policy_table::RequestType::RT_HTTP);
-
- // Load omitted RequestType values
- RefreshPT(preloaded_pt_filename_, kJsonFiles[15]);
-
- // Get Request Types for "<pre_DataConsent>"
- policy_table::RequestTypes received_types =
- GetRequestTypesForApplication(policy::kPreDataConsentId);
-
- CompareRequestTypesContainers(correct_types, received_types);
-}
-
-TEST_F(
- PolicyManagerImplTest_RequestTypes,
- LoadPT_PTPreDataConsentAppOneInvalidRequestTypeValue_RequestTypeValueEQValidPT) {
- // Update values of Request Types
- policy_table::RequestTypes correct_types =
- CreatePreDataConsentAppPTURequestValues();
-
- // Load RequestType with one invalid value
- RefreshPT(preloaded_pt_filename_, kJsonFiles[16]);
-
- // Get Request Types for "<pre_DataConsent>"
- policy_table::RequestTypes received_types =
- GetRequestTypesForApplication(policy::kPreDataConsentId);
-
- CompareRequestTypesContainers(correct_types, received_types);
-}
-
-} // namespace policy_test
-} // namespace components
-} // namespace test
diff --git a/src/components/policy/policy_external/test/policy_manager_impl_snapshot_test.cc b/src/components/policy/policy_external/test/policy_manager_impl_snapshot_test.cc
deleted file mode 100644
index f89a2ce0c7..0000000000
--- a/src/components/policy/policy_external/test/policy_manager_impl_snapshot_test.cc
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * Copyright (c) 2016, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <fstream>
-
-#include "gtest/gtest.h"
-
-#include "policy/policy_manager_impl_test_base.h"
-
-#include "json/json.h"
-
-namespace test {
-namespace components {
-namespace policy_test {
-
-using ::testing::Return;
-
-TEST_F(PolicyManagerImplTest2, UpdatedPreloadedPT_ExpectLPT_IsUpdated) {
- // Arrange necessary pre-conditions
- StringsForUpdate new_data;
- new_data.new_field_name_ = "Notifications-";
- CreateNewRandomData(new_data);
- // Create Initial LocalPT from preloadedPT
- CreateLocalPT(preloaded_pt_filename_);
- // Update preloadedPT
- std::ifstream ifile(preloaded_pt_filename_);
- Json::CharReaderBuilder reader_builder;
- Json::Value root(Json::objectValue);
-
- if (ifile.is_open() &&
- Json::parseFromStream(reader_builder, ifile, &root, nullptr)) {
- root["policy_table"]["module_config"]["preloaded_date"] =
- new_data.new_date_;
- Json::Value val(Json::objectValue);
- Json::Value val2(Json::arrayValue);
- val2[0] = hmi_level_[index_];
- val[new_data.new_field_value_]["hmi_levels"] = val2;
- root["policy_table"]["functional_groupings"][new_data.new_field_name_]
- ["rpcs"] = val;
- root["policy_table"]["functional_groupings"][new_data.new_field_name_]
- ["user_consent_prompt"] = new_data.new_field_name_;
- }
- ifile.close();
-
- std::ofstream ofile(preloaded_pt_filename_);
- ofile << root;
- ofile.flush();
- ofile.close();
-
- // Make PolicyManager to update LocalPT
- policy::CacheManagerInterfaceSPtr cache = policy_manager_->GetCache();
- EXPECT_TRUE(
- policy_manager_->InitPT(preloaded_pt_filename_, &policy_settings_));
- EXPECT_TRUE(cache->IsPTPreloaded());
-
- // Arrange
- std::shared_ptr<policy_table::Table> table = cache->GenerateSnapshot();
- // Get FunctionalGroupings
- policy_table::FunctionalGroupings& fc =
- table->policy_table.functional_groupings;
- // Get RPCs for new added field in functional_group
- policy_table::Rpcs& rpcs = fc[new_data.new_field_name_];
- // Get user consent prompt
- const std::string& ucp = *(rpcs.user_consent_prompt);
- // Get Rpcs
- policy_table::Rpc& rpc = rpcs.rpcs;
- // Get RPC's parameters
- policy_table::RpcParameters& rpc_param = rpc[new_data.new_field_value_];
-
- // Check preloaded date
- EXPECT_EQ(static_cast<std::string>(
- *(table->policy_table.module_config.preloaded_date)),
- new_data.new_date_);
- // Check if new field exists in Local PT
- EXPECT_TRUE(fc.find(new_data.new_field_name_) != fc.end());
- // Check if user_consent_propmp is correct
- EXPECT_EQ(new_data.new_field_name_, ucp);
- // Check if new RPC exists
- EXPECT_TRUE(rpc.find(new_data.new_field_value_) != rpc.end());
- // Check HMI level of new RPC
- EXPECT_EQ(index_, static_cast<uint32_t>(rpc_param.hmi_levels[0]));
- // Check if new field matches field added to preloaded PT
- EXPECT_EQ(std::string((*(fc.find(new_data.new_field_name_))).first),
- new_data.new_field_name_);
-}
-
-TEST_F(PolicyManagerImplTest2,
- SetSystemLanguage_ExpectSystemLanguageSetSuccessfully) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- policy_manager_->SetSystemLanguage("it-it");
- std::shared_ptr<policy_table::Table> pt =
- (policy_manager_->GetCache())->GetPT();
- ::policy_table::ModuleMeta& ModuleMeta = *(pt->policy_table.module_meta);
- EXPECT_EQ("it-it", static_cast<std::string>(*(ModuleMeta.language)));
-}
-
-TEST_F(PolicyManagerImplTest2, SetVINValue_ExpectVINSetSuccessfully) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- std::string vin_code("1FAPP6242VH100001");
- policy_manager_->SetVINValue(vin_code);
- std::shared_ptr<policy_table::Table> pt =
- (policy_manager_->GetCache())->GetPT();
- ::policy_table::ModuleMeta& ModuleMeta = *(pt->policy_table.module_meta);
- EXPECT_EQ(vin_code, static_cast<std::string>(*(ModuleMeta.vin)));
-}
-
-TEST_F(PolicyManagerImplTest2, SetSystemInfo_ExpectSystemInfoSetSuccessfully) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- policy_manager_->SetSystemInfo("4.1.3.B_EB355B", "WAEGB", "ru-ru");
- policy::CacheManagerInterfaceSPtr cache = policy_manager_->GetCache();
- std::shared_ptr<policy_table::Table> pt = cache->GetPT();
- ::policy_table::ModuleMeta& ModuleMeta = *(pt->policy_table.module_meta);
- EXPECT_EQ("ru-ru", static_cast<std::string>(*(ModuleMeta.language)));
- EXPECT_EQ("4.1.3.B_EB355B",
- static_cast<std::string>(*(ModuleMeta.ccpu_version)));
- EXPECT_EQ("WAEGB", static_cast<std::string>(*(ModuleMeta.wers_country_code)));
- EXPECT_FALSE(cache->IsPTPreloaded());
-}
-
-TEST_F(PolicyManagerImplTest2, CleanUnpairedDevice_ExpectDevicesDeleted) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- // Add first device
- ::policy::DeviceInfo dev_info1;
- dev_info1.hardware = "hardware IPX";
- dev_info1.firmware_rev = "v.8.0.1";
- dev_info1.os = "Android";
- dev_info1.os_ver = "4.4.2";
- dev_info1.carrier = "Life";
- dev_info1.max_number_rfcom_ports = 2;
- dev_info1.connection_type = "Bluetooth";
- policy_manager_->AddDevice(device_id_1_, "Bluetooth");
- policy_manager_->SetDeviceInfo(device_id_1_, dev_info1);
-
- // Add second device
- ::policy::DeviceInfo dev_info2;
- dev_info2.hardware = "hardware SPX";
- dev_info2.firmware_rev = "v.6.0.1";
- dev_info2.os = "Android";
- dev_info2.os_ver = "4.1.1";
- dev_info2.carrier = "MTS";
- dev_info2.max_number_rfcom_ports = 2;
- dev_info2.connection_type = "Bluetooth";
- policy_manager_->AddDevice("ZZZ123456789YYY", "Bluetooth");
- policy_manager_->SetDeviceInfo("ZZZ123456789YYY", dev_info2);
-
- // Add third device
- ::policy::DeviceInfo dev_info3;
- dev_info3.hardware = "hardware DNPX";
- dev_info3.firmware_rev = "v.4.0.1";
- dev_info3.os = "Android";
- dev_info3.os_ver = "5.0.1 Lollipop";
- dev_info3.carrier = "Kyivstar";
- dev_info3.max_number_rfcom_ports = 2;
- dev_info3.connection_type = "Bluetooth";
- policy_manager_->AddDevice("AAA123456789RRR", "Bluetooth");
- policy_manager_->SetDeviceInfo("AAA123456789RRR", dev_info3);
-
- std::shared_ptr<policy_table::Table> pt =
- (policy_manager_->GetCache())->GetPT();
- // Try to find first device in PT
- policy_table::DeviceData::const_iterator iter =
- (*(pt->policy_table.device_data)).find(device_id_1_);
- // Check first device successfully added to PT
- ASSERT_TRUE(iter != (*(pt->policy_table.device_data)).end());
-
- // Try to find second device in PT
- iter = (*(pt->policy_table.device_data)).find("ZZZ123456789YYY");
- // Check second device successfully added to PT
- ASSERT_TRUE(iter != (*(pt->policy_table.device_data)).end());
-
- // Try to find third device in PT
- iter = (*(pt->policy_table.device_data)).find("AAA123456789RRR");
- // Check third device successfully added to PT
- ASSERT_TRUE(iter != (*(pt->policy_table.device_data)).end());
-
- policy_manager_->MarkUnpairedDevice(device_id_1_);
- policy_manager_->MarkUnpairedDevice("ZZZ123456789YYY");
- policy_manager_->MarkUnpairedDevice("AAA123456789RRR");
- policy_manager_->CleanupUnpairedDevices();
-
- // Try to find first device in PT
- iter = (*(pt->policy_table.device_data)).find(device_id_1_);
- // Check first device successfully deleted from PT
- ASSERT_TRUE(iter == (*(pt->policy_table.device_data)).end());
-
- // Try to find second device in PT
- iter = (*(pt->policy_table.device_data)).find("ZZZ123456789YYY");
- // Check second device successfully deleted from PT
- ASSERT_TRUE(iter == (*(pt->policy_table.device_data)).end());
-
- // Try to find third device in PT
- iter = (*(pt->policy_table.device_data)).find("AAA123456789RRR");
- // Check third device successfully deleted from PT
- ASSERT_TRUE(iter == (*(pt->policy_table.device_data)).end());
-}
-
-TEST_F(PolicyManagerImplTest2,
- AddValidRequestTypesToPT_default_Section_ExpectRTAdded) {
- // Arrange
- AddRTtoPT(kPtuJson, policy::kDefaultId, 1u, 0);
- CheckResultForValidRT();
-}
-
-TEST_F(PolicyManagerImplTest2,
- AddValidRequestTypeToPT_preDataConsentSection_ExpectRTAdded) {
- // Arrange
- AddRTtoPT(kPtuJson, policy::kPreDataConsentId, 1u, 0u);
- CheckResultForValidRT();
-}
-
-TEST_F(PolicyManagerImplTest2,
- AddInvalidRequestTypeToPT_defaultSection_ExpectIgnored) {
- // Arrange
- AddRTtoPT(kPtu3Json, policy::kDefaultId, 1u, 0u);
- CheckResultForInvalidRT();
-}
-
-TEST_F(PolicyManagerImplTest2,
- AddInvalidRequestTypeToPT_pre_DataConsentSection_ExpectIgnored) {
- // Arrange
- AddRTtoPT(kPtu3Json, policy::kPreDataConsentId, 1u, 1u);
- CheckResultForInvalidRT();
-}
-
-TEST_F(
- PolicyManagerImplTest2,
- AddValidRequestTypeToPT_GetNewAppWithSpecificPoliciesViaPTU_ExpectRTAdded) {
- const std::string& app_id = application_id_;
- const transport_manager::DeviceHandle handle = 1;
-
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- EXPECT_CALL(listener_, GetDevicesIds(app_id))
- .WillRepeatedly(Return(transport_manager::DeviceList(1, device_id_1_)));
- // Add app
- policy_manager_->AddApplication(
- device_id_1_, app_id, HmiTypes(policy_table::AHT_DEFAULT));
- // Check app gets RequestTypes from pre_DataConsent of app_policies
- // section
- pt_request_types_ = policy_manager_->GetAppRequestTypes(handle, app_id);
-
- // Only single item as in pre_DataConsent in preloaded PT
- EXPECT_EQ(1u, pt_request_types_.size());
- EXPECT_CALL(listener_, OnPendingPermissionChange(device_id_1_, app_id))
- .Times(1);
-
- // PTU has RequestTypes as [] - means 'all allowed'
- Json::Value root = GetPTU("json/PTU2.json");
-
- // Setting device consent to 'true' in order to have appropriate application
- // permissions, request type etc.
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(handle, app_id))
- .WillRepeatedly(Return(device_id_1_));
- policy_manager_->SetUserConsentForDevice(device_id_1_, true);
-
- // Get App Request Types from PTU
- ptu_request_types_ =
- root["policy_table"]["app_policies"][app_id]["RequestType"];
- ptu_request_types_size_ = ptu_request_types_.size();
-
- pt_request_types_.clear();
- // Get RequestTypes from <app_id> section of app policies after PT update
- pt_request_types_ = policy_manager_->GetAppRequestTypes(handle, app_id);
-
- // Check sizes of Request types of PT and PTU
- ASSERT_EQ(ptu_request_types_size_, pt_request_types_.size());
-
- ::policy::AppPermissions permissions =
- policy_manager_->GetAppPermissionsChanges(device_id_1_, app_id);
- EXPECT_TRUE(permissions.requestTypeChanged);
-
- ::policy::StringArray result;
- for (uint32_t i = 0; i < ptu_request_types_size_; ++i) {
- result.push_back(ptu_request_types_[i].asString());
- }
- std::sort(pt_request_types_.begin(), pt_request_types_.end());
- std::sort(result.begin(), result.end());
- // Checks
- ASSERT_EQ(pt_request_types_.size(), result.size());
- EXPECT_TRUE(std::equal(
- pt_request_types_.begin(), pt_request_types_.end(), result.begin()));
-}
-
-TEST_F(PolicyManagerImplTest2, AddDevice_RegisterDevice_TRUE) {
- const std::string connection_type = "Bluetooth";
-
- const bool result =
- (policy_manager_->GetCache())->AddDevice(device_id_1_, connection_type);
- // Get Policy table
- const std::shared_ptr<policy_table::Table> policy_table =
- policy_manager_->GetCache()->GetPT();
- // Get preloaded_pt flag from Policy table
- const bool is_preloaded_pt =
- *policy_table->policy_table.module_config.preloaded_pt;
- // Get connection_type from policy_table
- const policy_table::DeviceParams& params =
- (*policy_table->policy_table.device_data)[device_id_1_];
- const std::string expected_connection_type = *params.connection_type;
-
- // Expect
- EXPECT_EQ(connection_type, expected_connection_type);
- // After adding device preloaded_pt must be false
- EXPECT_FALSE(is_preloaded_pt);
- EXPECT_TRUE(result);
-}
-
-} // namespace policy_test
-} // namespace components
-} // namespace test
diff --git a/src/components/policy/policy_external/test/policy_manager_impl_stress_test.cc b/src/components/policy/policy_external/test/policy_manager_impl_stress_test.cc
deleted file mode 100644
index f886108463..0000000000
--- a/src/components/policy/policy_external/test/policy_manager_impl_stress_test.cc
+++ /dev/null
@@ -1,293 +0,0 @@
-/* Copyright (c) 2016, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <fstream>
-#include "gtest/gtest.h"
-#include "mock_policy_listener.h"
-#include "policy/policy_manager_impl.h"
-
-using ::policy::BinaryMessage;
-using ::policy::MockPolicyListener;
-using ::policy::PolicyManagerImpl;
-using ::testing::_;
-
-namespace test {
-namespace components {
-namespace policy_test {
-
-class PolicyManagerImplStressTest : public ::testing::Test {
- protected:
- static const std::string kNameFile;
- static const int kNumberGroups = 3; // 10;
- static const int kNumberFuncs = 4; // 100;
- static const int kNumberApps = 5;
- static const int kNumberAppGroups = 5;
- static PolicyManagerImpl* manager;
- static MockPolicyListener* mock_listener;
-
- static void SetUpTestCase();
- static void TearDownTestCase();
- static void CreateTable(std::ofstream& ofs);
- static void CreateGroups(std::ofstream& ofs);
- static void CreateFuncs(std::ofstream& ofs);
- static void CreateApps(std::ofstream& ofs);
- static void CreateAppGroups(std::ofstream& ofs);
-};
-
-const std::string PolicyManagerImplStressTest::kNameFile =
- "sdl_preloaded_pt.json";
-PolicyManagerImpl* PolicyManagerImplStressTest::manager = 0;
-MockPolicyListener* PolicyManagerImplStressTest::mock_listener = 0;
-
-void PolicyManagerImplStressTest::SetUpTestCase() {
- std::ofstream ofs;
- ofs.open(kNameFile.c_str(), std::ofstream::out);
- CreateTable(ofs);
- ofs.close();
-
- manager = new PolicyManagerImpl();
- mock_listener = new MockPolicyListener();
- manager->set_listener(mock_listener);
-
- ASSERT_TRUE(manager->InitPT(kNameFile));
-}
-
-void PolicyManagerImplStressTest::TearDownTestCase() {
- delete manager;
- delete mock_listener;
- remove(kNameFile.c_str());
-#ifndef __QNX__
- remove("policy.sqlite");
-#endif // __QNX__
-}
-
-void PolicyManagerImplStressTest::CreateGroups(std::ofstream& ofs) {
- std::stringstream ss;
- std::string number;
- for (int i = 0; i < kNumberGroups - 1; ++i) {
- ss << i << std::endl;
- ss >> number;
- ofs << "\"Group-" << number << "\":{\n \t\"rpcs\":{\n";
- CreateFuncs(ofs);
- ofs << "} },\n";
- }
- ss << kNumberGroups - 1 << std::endl;
- ss >> number;
- ofs << "\"Group-" << number << "\":{\n \t\"rpcs\":{\n";
- CreateFuncs(ofs);
- ofs << "} }\n";
-}
-
-void PolicyManagerImplStressTest::CreateFuncs(std::ofstream& ofs) {
- std::string func =
- "{\n"
- "\t\t\"hmi_levels\":["
- "\"BACKGROUND\","
- "\"FULL\","
- "\"LIMITED\""
- "]"
- "}";
-
- std::stringstream ss;
- std::string number;
- for (int i = 0; i < kNumberFuncs - 1; ++i) {
- ss << i << std::endl;
- ss >> number;
- ofs << "\t\"Func-" << number << "\":" << func << ",\n";
- }
- ss << kNumberFuncs - 1 << std::endl;
- ss >> number;
- ofs << "\t\"Func-" << number << "\":" + func;
-}
-
-void PolicyManagerImplStressTest::CreateApps(std::ofstream& ofs) {
- ofs << "\"default\":{\n";
- ofs << "\"keep_context\": true,\n"
- "\"steal_focus\": true,\n"
- "\"priority\": \"NORMAL\",\n"
- "\"default_hmi\": \"FULL\",\n";
- ofs << "\"groups\":["
- "\"Group-1\""
- "]"
- "},\n";
-
- std::stringstream ss;
- std::string number;
- for (int i = 0; i < kNumberApps - 1; ++i) {
- ss << i << std::endl;
- ss >> number;
- ofs << "\"" << number << "\" : {";
- ofs << "\n\"keep_context\": true,\n"
- "\"steal_focus\": true,\n"
- "\"priority\": \"NORMAL\",\n"
- "\"default_hmi\": \"FULL\",\n";
-
- ofs << "\"groups\": ";
- CreateAppGroups(ofs);
- ofs << "},\n";
- }
- ss << kNumberApps - 1 << std::endl;
- ss >> number;
- ofs << "\"" << number << "\" : {";
- ofs << "\n\"keep_context\": true,\n"
- "\"steal_focus\": true,\n"
- "\"priority\": \"NORMAL\",\n"
- "\"default_hmi\": \"FULL\",\n";
-
- ofs << "\"groups\": ";
- CreateAppGroups(ofs);
- ofs << "}\n";
-}
-
-void PolicyManagerImplStressTest::CreateAppGroups(std::ofstream& ofs) {
- ofs << "[";
-
- std::stringstream ss;
- std::string number;
- std::set<int> app_groups;
- for (int i = 0; i < kNumberAppGroups; ++i) {
- app_groups.insert(rand() % kNumberGroups);
- }
-
- std::set<int>::const_iterator i = app_groups.begin();
- ss << *i << std::endl;
- ss >> number;
- ofs << "\"Group-" << number << "\"";
- ++i;
- for (; i != app_groups.end(); ++i) {
- ss << *i << std::endl;
- ss >> number;
- ofs << ",\"Group-" << number << "\"";
- }
- ofs << "]\n";
-}
-
-void PolicyManagerImplStressTest::CreateTable(std::ofstream& ofs) {
- ofs << "{"
- "\"policy_table\":{\n"
- "\"module_config\":{\n"
- "\t\"preloaded_pt\":true,\n"
- "\t\"endpoints\":{\n"
- "\t\t\"default\": {\n"
- "\t\t\t\"default\":["
- "\"http://sdl.net/api\""
- "]\n"
- "\t\t}\n"
- "\t},\n"
-
- "\"notifications_per_minute_by_priority\": {\n"
- "\t\"EMERGENCY\": 60,\n"
- "\t\"NAVIGATION\": 15,\n"
- "\t\"COMMUNICATION\": 6,\n"
- "\t\"NORMAL\": 4,\n"
- "\t\"NONE\": 0\n"
- "},\n"
-
- "\"exchange_after_x_ignition_cycles\": 40,\n"
- "\"exchange_after_x_kilometers\" : 2,\n"
- "\"exchange_after_x_days\" : 23,\n"
- "\"timeout_after_x_seconds\" : 20,\n"
- "\"seconds_between_retries\" : [10, 7, 5, 3, 1]\n"
- "},"
- "\"consumer_friendly_messages\":{\n"
- "\t\"version\":\"001.001.001\",\n"
- "\t\"messages\":{} },\n"
- "\"functional_groupings\":{\n";
-
- CreateGroups(ofs);
-
- ofs << "}, \"app_policies\":{";
-
- CreateApps(ofs);
-
- ofs << "} } }";
-}
-
-TEST_F(PolicyManagerImplStressTest,
- OneCheck_AppAndFunctuionExisting_RpcAllowed) {
- EXPECT_CALL(*mock_listener, OnCurrentDeviceIdUpdateRequired(_));
- ::policy::RPCParams input_params;
- ::policy::CheckPermissionResult output;
- manager->CheckPermissions("2", "FULL", "Func-1", input_params, output);
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
-}
-
-TEST_F(PolicyManagerImplStressTest, NoApp_AppDoesNotExisted_RpcDissallowed) {
- EXPECT_CALL(*mock_listener, OnCurrentDeviceIdUpdateRequired(_));
- ::policy::RPCParams input_params;
- ::policy::CheckPermissionResult output;
- manager->CheckPermissions("150", "FULL", "Func-88", input_params, output);
- EXPECT_EQ(::policy::kRpcDisallowed, output.hmi_level_permitted);
-}
-
-TEST_F(PolicyManagerImplStressTest, NoFunc_FuncDoesNotExisted_RpcDissallowed) {
- EXPECT_CALL(*mock_listener, OnCurrentDeviceIdUpdateRequired(_)).Times(1);
- ::policy::RPCParams input_params;
- ::policy::CheckPermissionResult output;
- manager->CheckPermissions("2", "FULL", "Func-400", input_params, output);
- EXPECT_EQ(::policy::kRpcDisallowed, output.hmi_level_permitted);
-}
-
-TEST_F(PolicyManagerImplStressTest, NoHmi_HMIInLevelNone_RpcDissallowed) {
- EXPECT_CALL(*mock_listener, OnCurrentDeviceIdUpdateRequired(_));
- ::policy::RPCParams input_params;
- ::policy::CheckPermissionResult output;
- manager->CheckPermissions("2", "NONE", "Func-88", input_params, output);
- EXPECT_EQ(::policy::kRpcDisallowed, output.hmi_level_permitted);
-}
-
-TEST_F(PolicyManagerImplStressTest,
- FewChecks_CheckSeveralFunctions_RpcAllowed) {
- EXPECT_CALL(*mock_listener, OnCurrentDeviceIdUpdateRequired(_))
- .Times(kNumberFuncs);
- const int kNumberOfCheckings = kNumberFuncs; // 100;
- std::stringstream ss;
- int app, func;
- std::string app_number, func_number;
- for (int i = 0; i < kNumberOfCheckings; ++i) {
- app = rand() % kNumberApps;
- func = rand() % kNumberFuncs;
- ss << app << std::endl;
- ss >> app_number;
- ss << func << std::endl;
- ss >> func_number;
-
- ::policy::RPCParams input_params;
- ::policy::CheckPermissionResult output;
- manager->CheckPermissions(
- app_number, "FULL", "Func-" + func_number, input_params, output);
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- }
-}
-
-} // namespace policy_test
-} // namespace components
-} // namespace test
diff --git a/src/components/policy/policy_external/test/policy_manager_impl_test.cc b/src/components/policy/policy_external/test/policy_manager_impl_test.cc
index 9e0b61c2dd..4d39e699b5 100644
--- a/src/components/policy/policy_external/test/policy_manager_impl_test.cc
+++ b/src/components/policy/policy_external/test/policy_manager_impl_test.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Ford Motor Company
+ * Copyright (c) 2020, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,1090 +31,886 @@
*/
#include <fstream>
-
#include <utility>
+
#include "gtest/gtest.h"
-#include "json/reader.h"
-#include "policy/policy_manager_impl_test_base.h"
+#include "json/reader.h"
#include "utils/date_time.h"
+#include "utils/file_system.h"
+#include "utils/gen_hash.h"
+#include "utils/jsoncpp_reader_wrapper.h"
-using ::testing::_;
-using ::testing::AtLeast;
-using ::testing::Return;
-using ::testing::SetArgReferee;
+#include "policy/policy_manager.h"
+#include "policy/policy_manager_impl.h"
+
+#include "policy/mock_cache_manager.h"
+#include "policy/mock_policy_listener.h"
+#include "policy/mock_policy_settings.h"
namespace test {
namespace components {
namespace policy_test {
-TEST_F(PolicyManagerImplTest, GetNotificationsNumber) {
- std::string priority = "EMERGENCY";
- uint32_t notif_number = 100;
- EXPECT_CALL(*cache_manager_, GetNotificationsNumber(priority))
- .WillOnce(Return(notif_number));
+using namespace policy;
+using namespace rpc::policy_table_interface_base;
- EXPECT_EQ(notif_number, policy_manager_->GetNotificationsNumber(priority));
-}
+using ::testing::_;
+using ::testing::NiceMock;
+using ::testing::Return;
+using ::testing::ReturnRef;
+
+namespace {
+const std::string kSdlPreloadedPtJson = "json/sdl_preloaded_pt.json";
+const int kServiceTypeInt = 0;
+const std::string kDeviceNumber = "XXX123456789ZZZ";
+const std::string kAppStorageFolder = "app_storage_folder";
+const std::string kValidAppId = "1234";
+} // namespace
+
+class PolicyManagerImplTest : public ::testing::Test {
+ public:
+ PolicyManagerImplTest()
+ : policy_manager_(nullptr), cache_manager_(nullptr), in_memory_(true) {}
+
+ protected:
+ std::shared_ptr<PolicyManagerImpl> policy_manager_;
+ NiceMock<MockCacheManagerInterface>* cache_manager_;
+ NiceMock<MockPolicyListener> listener_;
+ NiceMock<policy_handler_test::MockPolicySettings> policy_settings_;
+ bool in_memory_;
+
+ void SetUp() {
+ policy_manager_ = std::make_shared<PolicyManagerImpl>(in_memory_);
+ cache_manager_ = new NiceMock<MockCacheManagerInterface>();
+ policy_manager_->set_cache_manager(cache_manager_);
+ policy_manager_->set_listener(&listener_);
+
+ ON_CALL(policy_settings_, app_storage_folder())
+ .WillByDefault(ReturnRef(kAppStorageFolder));
+ }
-TEST_F(PolicyManagerImplTest, IncrementGlobalCounter) {
- // Assert
- EXPECT_CALL(*cache_manager_, Increment(usage_statistics::SYNC_REBOOTS));
- policy_manager_->Increment(usage_statistics::SYNC_REBOOTS);
-}
+ ::testing::AssertionResult IsValid(const policy_table::Table& table) {
+ if (table.is_valid()) {
+ return ::testing::AssertionSuccess();
+ } else {
+ ::rpc::ValidationReport report(" - table");
+ table.ReportErrors(&report);
+ return ::testing::AssertionFailure() << ::rpc::PrettyFormat(report);
+ }
+ }
+};
-TEST_F(PolicyManagerImplTest, IncrementAppCounter) {
- // Assert
- EXPECT_CALL(*cache_manager_,
- Increment("12345", usage_statistics::USER_SELECTIONS));
- policy_manager_->Increment("12345", usage_statistics::USER_SELECTIONS);
+TEST_F(PolicyManagerImplTest, InitPT_NoAppStorageFolder_ReturnFalse) {
+ EXPECT_FALSE(policy_manager_->InitPT(kSdlPreloadedPtJson, &policy_settings_));
}
-TEST_F(PolicyManagerImplTest, SetAppInfo) {
- // Assert
- EXPECT_CALL(*cache_manager_,
- Set("12345", usage_statistics::LANGUAGE_GUI, "de-de"));
- policy_manager_->Set("12345", usage_statistics::LANGUAGE_GUI, "de-de");
+TEST_F(PolicyManagerImplTest, InitPT_InitializationNotSuccessful_ReturnFalse) {
+ file_system::CreateDirectory(kAppStorageFolder);
+ EXPECT_CALL(*cache_manager_, Init(kSdlPreloadedPtJson, &policy_settings_))
+ .WillOnce(Return(false));
+ EXPECT_FALSE(policy_manager_->InitPT(kSdlPreloadedPtJson, &policy_settings_));
+ file_system::RemoveDirectory(kAppStorageFolder, true);
}
-TEST_F(PolicyManagerImplTest, AddAppStopwatch) {
- // Assert
- EXPECT_CALL(*cache_manager_,
- Add("12345", usage_statistics::SECONDS_HMI_FULL, 30));
- policy_manager_->Add("12345", usage_statistics::SECONDS_HMI_FULL, 30);
+TEST_F(PolicyManagerImplTest, InitPT_InitializationIsSuccessful_ReturnTrue) {
+ file_system::CreateDirectory(kAppStorageFolder);
+ EXPECT_CALL(*cache_manager_, Init(kSdlPreloadedPtJson, &policy_settings_))
+ .WillOnce(Return(true));
+ EXPECT_TRUE(policy_manager_->InitPT(kSdlPreloadedPtJson, &policy_settings_));
+ file_system::RemoveDirectory(kAppStorageFolder, true);
}
-TEST_F(PolicyManagerImplTest, ResetPT) {
- EXPECT_CALL(*cache_manager_, ResetPT("filename"))
- .WillOnce(Return(true))
- .WillOnce(Return(false));
- EXPECT_CALL(*cache_manager_, IsPTPreloaded())
- .WillOnce(Return(true))
+TEST_F(PolicyManagerImplTest, ResetPT_NoRefreshRetrySequence_ReturnFalse) {
+ EXPECT_CALL(*cache_manager_, ResetCalculatedPermissions());
+ EXPECT_CALL(*cache_manager_, ResetPT(kSdlPreloadedPtJson))
.WillOnce(Return(false));
- EXPECT_CALL(*cache_manager_, ResetCalculatedPermissions()).Times(AtLeast(1));
- EXPECT_CALL(*cache_manager_, TimeoutResponse());
- EXPECT_CALL(*cache_manager_, SecondsBetweenRetries(_));
+ EXPECT_CALL(*cache_manager_, TimeoutResponse()).Times(0);
+ EXPECT_CALL(*cache_manager_, SecondsBetweenRetries(_)).Times(0);
- policy::CacheManagerInterfaceSPtr cache = policy_manager_->GetCache();
- EXPECT_TRUE(policy_manager_->ResetPT("filename"));
- EXPECT_TRUE(cache->IsPTPreloaded());
- EXPECT_FALSE(policy_manager_->ResetPT("filename"));
- EXPECT_FALSE(cache->IsPTPreloaded());
+ EXPECT_FALSE(policy_manager_->ResetPT(kSdlPreloadedPtJson));
}
-TEST_F(PolicyManagerImplTest, LoadPT_SetPT_PTIsLoaded) {
- // Arrange
- EXPECT_CALL(*cache_manager_, DaysBeforeExchange(_))
- .WillOnce(Return(kNonZero));
- ON_CALL(*cache_manager_, GenerateSnapshot())
- .WillByDefault(Return(default_pt_snapshot_));
- policy_manager_->ForcePTExchange();
- policy_manager_->SetSendOnUpdateFlags(true);
- policy_manager_->OnUpdateStarted();
- Json::Value table = createPTforLoad();
-
- policy_table::Table update(&table);
- update.SetPolicyTableType(rpc::policy_table_interface_base::PT_UPDATE);
-
- // Assert
- ASSERT_TRUE(IsValid(update));
-
- EXPECT_CALL(*cache_manager_, GetHMIAppTypeAfterUpdate(_)).Times(AtLeast(1));
-
- // Act
- std::string json = table.toStyledString();
- ::policy::BinaryMessage msg(json.begin(), json.end());
-
- std::shared_ptr<policy_table::Table> snapshot =
- std::make_shared<policy_table::Table>(update.policy_table);
- ON_CALL(*cache_manager_, GenerateSnapshot()).WillByDefault(Return(snapshot));
-
- // Assert
- EXPECT_CALL(*cache_manager_, ApplyUpdate(_)).WillOnce(Return(true));
- EXPECT_CALL(listener_, GetDevicesIds("1234"))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- EXPECT_CALL(*cache_manager_, SaveUpdateRequired(false));
-
- EXPECT_CALL(*cache_manager_, GetVehicleDataItems())
- .WillOnce(Return(std::vector<policy_table::VehicleDataItem>()));
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- policy_manager_->LoadPT(kFilePtUpdateJson, msg));
-
- EXPECT_CALL(*cache_manager_, IsPTPreloaded());
- EXPECT_FALSE(policy_manager_->GetCache()->IsPTPreloaded());
-
+TEST_F(PolicyManagerImplTest, ResetPT_ExecuteRefreshRetrySequence_ReturnTrue) {
+ EXPECT_CALL(*cache_manager_, ResetCalculatedPermissions());
+ EXPECT_CALL(*cache_manager_, ResetPT(kSdlPreloadedPtJson))
+ .WillOnce(Return(true));
EXPECT_CALL(*cache_manager_, TimeoutResponse());
EXPECT_CALL(*cache_manager_, SecondsBetweenRetries(_));
- EXPECT_CALL(listener_, OnUpdateStatusChanged(_));
- policy_manager_->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-}
-TEST_F(PolicyManagerImplTest2,
- KmsChanged_SetExceededKms_ExpectCorrectSchedule) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- ::policy::Counters counter = ::policy::Counters::KILOMETERS;
- policy_manager_->PTUpdatedAt(counter, 50000);
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
- // Set kms changed but not exceed limit
- policy_manager_->KmsChanged(51500);
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
- // Set kms changed and exceed limit
- policy_manager_->KmsChanged(52500);
- EXPECT_EQ("UPDATE_NEEDED", policy_manager_->GetPolicyTableStatus());
-}
-
-TEST_F(PolicyManagerImplTest2, ForcePTExchange_ExpectUpdateNeeded) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
- // Force OT Exchange
- policy_manager_->ForcePTExchange();
- // Check update required
- EXPECT_EQ("UPDATE_NEEDED", policy_manager_->GetPolicyTableStatus());
-}
-
-TEST_F(PolicyManagerImplTest2, ResetRetrySequence) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- policy_manager_->ResetRetrySequence(
- policy::ResetRetryCountType::kResetWithStatusUpdate);
- EXPECT_EQ("UPDATE_NEEDED", policy_manager_->GetPolicyTableStatus());
- policy_manager_->SetSendOnUpdateFlags(false);
- policy_manager_->OnUpdateStarted();
- EXPECT_EQ("UPDATING", policy_manager_->GetPolicyTableStatus());
-}
-
-TEST_F(PolicyManagerImplTest2, TimeOutExchange) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- // Check value taken from PT
- EXPECT_EQ(70000u, policy_manager_->TimeoutExchangeMSec());
+ EXPECT_TRUE(policy_manager_->ResetPT(kSdlPreloadedPtJson));
}
TEST_F(PolicyManagerImplTest,
- RequestPTUpdate_SetPT_GeneratedSnapshotAndPTUpdate) {
- Json::Value table = createPTforLoad();
- std::shared_ptr<policy_table::Table> p_table =
- std::make_shared<policy_table::Table>(&table);
- ASSERT_TRUE(p_table.get());
- p_table->SetPolicyTableType(rpc::policy_table_interface_base::PT_UPDATE);
- EXPECT_TRUE(IsValid(*p_table));
-
- EXPECT_CALL(listener_, OnSnapshotCreated(_, _, _));
- EXPECT_CALL(*cache_manager_, GenerateSnapshot()).WillOnce(Return(p_table));
+ AppNeedEncryption_EncryptionNotRequired_ReturnFalse) {
+ EncryptionRequired encryption_required;
+ *encryption_required = false;
+ EXPECT_CALL(*cache_manager_, GetAppEncryptionRequiredFlag(kValidAppId))
+ .WillOnce(Return(encryption_required));
- policy_manager_->RequestPTUpdate();
-}
-
-TEST_F(PolicyManagerImplTest, RequestPTUpdate_InvalidPT_PTUpdateFail) {
- std::shared_ptr<policy_table::Table> p_table =
- std::make_shared<policy_table::Table>();
- ASSERT_TRUE(p_table.get());
- EXPECT_FALSE(IsValid(*p_table));
-
- EXPECT_CALL(listener_, OnSnapshotCreated(_, _, _)).Times(0);
- EXPECT_CALL(*cache_manager_, GenerateSnapshot()).WillOnce(Return(p_table));
-
- policy_manager_->RequestPTUpdate();
+ EXPECT_FALSE(policy_manager_->AppNeedEncryption(kValidAppId));
}
-TEST_F(PolicyManagerImplTest, RequestPTUpdate_InvalidSnapshot_PTUpdateFail) {
- std::shared_ptr<policy_table::Table> p_table;
- EXPECT_FALSE(p_table);
-
- EXPECT_CALL(listener_, OnSnapshotCreated(_, _, _)).Times(0);
- EXPECT_CALL(*cache_manager_, GenerateSnapshot()).WillOnce(Return(p_table));
-
- policy_manager_->RequestPTUpdate();
-}
-
-TEST_F(PolicyManagerImplTest, ResetUserConsent_ResetOnlyOnce) {
- EXPECT_CALL(*cache_manager_, ResetUserConsent())
- .WillOnce(Return(true))
- .WillOnce(Return(false));
-
- EXPECT_TRUE(policy_manager_->ResetUserConsent());
- EXPECT_FALSE(policy_manager_->ResetUserConsent());
-}
+TEST_F(PolicyManagerImplTest,
+ AppNeedEncryption_EncryptionNotInitialized_ReturnTrue) {
+ EncryptionRequired encryption_required;
+ EXPECT_CALL(*cache_manager_, GetAppEncryptionRequiredFlag(kValidAppId))
+ .WillOnce(Return(encryption_required));
-TEST_F(PolicyManagerImplTest2, GetPolicyTableStatus_ExpectUpToDate) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- // Check
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
+ EXPECT_TRUE(policy_manager_->AppNeedEncryption(kValidAppId));
}
TEST_F(PolicyManagerImplTest,
- SetUpdateStarted_GetPolicyTableStatus_Expect_Updating) {
- // Arrange
- EXPECT_CALL(*cache_manager_, GenerateSnapshot())
- .WillOnce(Return(default_pt_snapshot_));
- policy_manager_->ForcePTExchange();
- EXPECT_CALL(*cache_manager_, SaveUpdateRequired(true));
- policy_manager_->OnUpdateStarted();
- // Check
- EXPECT_EQ("UPDATING", policy_manager_->GetPolicyTableStatus());
-}
+ FunctionGroupNeedEncryption_NoGroups_ReturnFalse) {
+ EXPECT_CALL(*cache_manager_, GetFunctionalGroupings(_));
+ const std::string group("Base-6");
-TEST_F(PolicyManagerImplTest2,
- RetrySequenceDelaysSeconds_Expect_CorrectValues) {
- // Arrange
- std::ifstream ifile(preloaded_pt_filename_);
- Json::CharReaderBuilder reader_builder;
- Json::Value root(Json::objectValue);
- if (ifile.is_open() &&
- Json::parseFromStream(reader_builder, ifile, &root, nullptr)) {
- Json::Value seconds_between_retries = Json::Value(Json::arrayValue);
- seconds_between_retries =
- root["policy_table"]["module_config"]["seconds_between_retries"];
- uint32_t size = seconds_between_retries.size();
- CreateLocalPT(preloaded_pt_filename_);
- std::vector<int> delaySecs = policy_manager_->RetrySequenceDelaysSeconds();
- // Check
- ASSERT_EQ(size, delaySecs.size());
- for (uint32_t i = 0; i < size; ++i) {
- EXPECT_EQ(seconds_between_retries[i], delaySecs[i]);
- }
- }
+ EXPECT_FALSE(policy_manager_->FunctionGroupNeedEncryption(group));
}
-TEST_F(PolicyManagerImplTest2,
- OnExceededTimeout_GetPolicyTableStatus_ExpectUpdateNeeded) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- ON_CALL(ptu_retry_handler_, IsAllowedRetryCountExceeded())
- .WillByDefault(Return(false));
- policy_manager_->ForcePTExchange();
- policy_manager_->OnExceededTimeout();
- // Check
- EXPECT_EQ("UPDATE_NEEDED", policy_manager_->GetPolicyTableStatus());
-}
+TEST_F(PolicyManagerImplTest,
+ CheckPermissions_PermissionsIsCalculatedAndAppRevoked_ReturnRpcAllowed) {
+ const std::string hmi_level = "NONE";
+ const std::string rpc = "OnHMIStatus";
+ RPCParams params;
+ CheckPermissionResult result;
-TEST_F(PolicyManagerImplTest, MarkUnpairedDevice) {
- // Assert
- EXPECT_CALL(*cache_manager_, SetUnpairedDevice(unpaired_device_id_, true))
- .WillOnce(Return(true));
- EXPECT_CALL(*cache_manager_, SetDeviceConsent(unpaired_device_id_, false));
EXPECT_CALL(*cache_manager_,
- HasDeviceSpecifiedConsent(unpaired_device_id_, false))
- .WillRepeatedly(Return(true));
- EXPECT_CALL(*cache_manager_, IgnitionCyclesBeforeExchange());
- EXPECT_CALL(*cache_manager_, DaysBeforeExchange(_));
- // Act
- EXPECT_CALL(*cache_manager_, GenerateSnapshot())
- .WillOnce(Return(default_pt_snapshot_));
- policy_manager_->MarkUnpairedDevice(unpaired_device_id_);
-}
-
-TEST_F(PolicyManagerImplTest2, GetCurrentDeviceId) {
- // Arrange
- const transport_manager::DeviceHandle handle = 1;
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(handle, app_id_2_))
- .Times(1);
- EXPECT_EQ("", policy_manager_->GetCurrentDeviceId(handle, app_id_2_));
-}
-
-TEST_F(PolicyManagerImplTest2, UpdateApplication_AppServices) {
- // Arrange
- std::string kServiceType = "MEDIA";
- CreateLocalPT(preloaded_pt_filename_);
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
- GetPTU("json/valid_sdl_pt_update.json");
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
- // Try to add existing app
- policy_table::AppServiceParameters app_service_parameters =
- policy_table::AppServiceParameters();
- policy_manager_->GetAppServiceParameters(app_id_2_, &app_service_parameters);
-
- ASSERT_FALSE(app_service_parameters.find(kServiceType) ==
- app_service_parameters.end());
-
- auto service_names = *(app_service_parameters[kServiceType].service_names);
-
- ASSERT_TRUE(service_names.is_initialized());
- ASSERT_EQ(service_names.size(), 2u);
- EXPECT_EQ(static_cast<std::string>(service_names[0]), "SDL App");
- EXPECT_EQ(static_cast<std::string>(service_names[1]), "SDL Music");
-
- auto handled_rpcs = app_service_parameters[kServiceType].handled_rpcs;
+ IsPermissionsCalculated(kDeviceNumber, kValidAppId, _))
+ .WillOnce(Return(true));
+ EXPECT_CALL(*cache_manager_, IsApplicationRevoked(kValidAppId))
+ .WillOnce(Return(true));
- ASSERT_TRUE(handled_rpcs.is_initialized());
- EXPECT_EQ(handled_rpcs[0].function_id, 41);
+ policy_manager_->CheckPermissions(
+ kDeviceNumber, kValidAppId, hmi_level, rpc, params, result);
- // Check no update required
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
+ EXPECT_EQ(kRpcAllowed, result.hmi_level_permitted);
}
TEST_F(
- PolicyManagerImplTest_ExternalConsent,
- ExternalConsent_SetExternalConsentStatusWhileAppExists_ExpectUserConsentsUpdateForApp) {
- using namespace policy_table;
- using namespace rpc;
-
- PreconditionExternalConsentPreparePTWithAppGroupsAndConsents();
-
- std::shared_ptr<policy_table::Table> pt =
- policy_manager_->GetCache()->GetPT();
-
- // Checking groups consents before setting ExternalConsent status
- const policy_table::DeviceData::const_iterator device_data =
- pt->policy_table.device_data->find(device_id_1_);
-
- EXPECT_TRUE(pt->policy_table.device_data->end() != device_data);
-
- const UserConsentRecords::const_iterator updated_consent_records =
- device_data->second.user_consent_records->find(app_id_1_);
-
- EXPECT_TRUE(device_data->second.user_consent_records->end() !=
- updated_consent_records);
-
- const ConsentGroups::const_iterator group_1 =
- updated_consent_records->second.consent_groups->find(group_name_1_);
- EXPECT_TRUE(updated_consent_records->second.consent_groups->end() != group_1);
-
- EXPECT_EQ(Boolean(true), group_1->second);
+ PolicyManagerImplTest,
+ CheckPermissions_PermissionsNotCalculatedAndAppRevoked_ReturnRpcDisallowed) {
+ std::string hmi_level = "FULL";
+ std::string rpc = "OnHMIStatus";
+ RPCParams params;
+ CheckPermissionResult result;
- const ConsentGroups::const_iterator group_2 =
- updated_consent_records->second.consent_groups->find(group_name_2_);
-
- EXPECT_TRUE(updated_consent_records->second.consent_groups->end() != group_2);
-
- EXPECT_EQ(Boolean(false), group_2->second);
-
- const ConsentGroups::const_iterator group_3 =
- updated_consent_records->second.consent_groups->find(group_name_3_);
-
- EXPECT_FALSE(updated_consent_records->second.consent_groups->end() !=
- group_3);
-
- // Act - setting new ExternalConsent status
- ExternalConsentStatus status;
- status.insert(ExternalConsentStatusItem(type_1_, id_1_, kStatusOn));
- status.insert(ExternalConsentStatusItem(type_2_, id_2_, kStatusOn));
- status.insert(ExternalConsentStatusItem(type_3_, id_3_, kStatusOn));
-
- EXPECT_CALL(listener_, OnPermissionsUpdated(device_id_1_, app_id_1_, _));
-
- EXPECT_TRUE(policy_manager_->SetExternalConsentStatus(status));
+ EXPECT_CALL(*cache_manager_,
+ IsPermissionsCalculated(kDeviceNumber, kValidAppId, _))
+ .WillOnce(Return(false));
- // Checking groups consent after setting ExternalConsent status
- EXPECT_EQ(Boolean(false), group_1->second);
- EXPECT_EQ(Boolean(true), group_2->second);
+ ON_CALL(*cache_manager_, IsApplicationRepresented(kValidAppId))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, GetDeviceConsent(kDeviceNumber))
+ .WillByDefault(Return(kDeviceAllowed));
+ ON_CALL(*cache_manager_, IsDefaultPolicy(kValidAppId))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, GetPermissionsForApp(kDeviceNumber, kValidAppId, _))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, GetFunctionalGroupNames(_))
+ .WillByDefault(Return(true));
+
+ EXPECT_CALL(*cache_manager_, IsApplicationRevoked(kValidAppId))
+ .WillOnce(Return(true));
- // Check, that no consent has been added for third groups
- const ConsentGroups::const_iterator updated_group_3 =
- updated_consent_records->second.consent_groups->find(group_name_3_);
+ policy_manager_->CheckPermissions(
+ kDeviceNumber, kValidAppId, hmi_level, rpc, params, result);
- EXPECT_FALSE(updated_consent_records->second.consent_groups->end() !=
- updated_group_3);
+ EXPECT_EQ(kRpcDisallowed, result.hmi_level_permitted);
}
-TEST_F(
- PolicyManagerImplTest_ExternalConsent,
- ExternalConsent_SetExternalConsentStatusWhileAppExists_ExpectExternalConsentUpdateForApp) {
- using namespace policy_table;
- using namespace rpc;
-
- PreconditionExternalConsentPreparePTWithAppGroupsAndConsents();
-
- // Act
- std::shared_ptr<policy_table::Table> pt =
- policy_manager_->GetCache()->GetPT();
-
- // Checking ExternalConsent consents before setting new ExternalConsent status
- policy_table::DeviceData::const_iterator updated_device_data =
- pt->policy_table.device_data->find(device_id_1_);
-
- EXPECT_TRUE(pt->policy_table.device_data->end() != updated_device_data);
-
- UserConsentRecords::const_iterator updated_consent_records =
- updated_device_data->second.user_consent_records->find(app_id_1_);
-
- EXPECT_TRUE(updated_device_data->second.user_consent_records->end() !=
- updated_consent_records);
-
- EXPECT_TRUE(
- updated_consent_records->second.external_consent_status_groups->empty());
-
- // Act - setting new ExternalConsent status
- ExternalConsentStatus status;
- status.insert(ExternalConsentStatusItem(type_1_, id_1_, kStatusOn));
- status.insert(ExternalConsentStatusItem(type_2_, id_2_, kStatusOn));
- status.insert(ExternalConsentStatusItem(type_3_, id_3_, kStatusOn));
-
- EXPECT_CALL(listener_, OnPermissionsUpdated(device_id_1_, app_id_1_, _));
-
- EXPECT_TRUE(policy_manager_->SetExternalConsentStatus(status));
-
- // Checking ExternalConsent consents after setting new ExternalConsent status
- const ConsentGroups& external_consent_statuss =
- *updated_consent_records->second.external_consent_status_groups;
-
- const ApplicationPolicies::const_iterator app_parameters =
- pt->policy_table.app_policies_section.apps.find(app_id_1_);
-
- EXPECT_TRUE(pt->policy_table.app_policies_section.apps.end() !=
- app_parameters);
-
- EXPECT_EQ(app_parameters->second.groups.size(),
- external_consent_statuss.size());
-
- const ConsentGroups::const_iterator updated_group_1 =
- external_consent_statuss.find(group_name_1_);
-
- EXPECT_TRUE(external_consent_statuss.end() != updated_group_1);
+TEST_F(PolicyManagerImplTest,
+ CheckPermissions_RpcNotFound_ReturnRpcDisallowed) {
+ const std::string hmi_level = "NONE";
+ const std::string rpc = "OnHMIStatus";
+ RPCParams params;
+ CheckPermissionResult result;
- const ConsentGroups::const_iterator updated_group_2 =
- external_consent_statuss.find(group_name_2_);
+ EXPECT_CALL(*cache_manager_,
+ IsPermissionsCalculated(kDeviceNumber, kValidAppId, _))
+ .WillOnce(Return(true));
+ EXPECT_CALL(*cache_manager_, IsApplicationRevoked(kValidAppId))
+ .WillOnce(Return(false));
- EXPECT_TRUE(external_consent_statuss.end() != updated_group_2);
+ policy_manager_->CheckPermissions(
+ kDeviceNumber, kValidAppId, hmi_level, rpc, params, result);
- EXPECT_EQ(Boolean(false), updated_group_1->second);
- EXPECT_EQ(Boolean(true), updated_group_2->second);
+ EXPECT_EQ(kRpcDisallowed, result.hmi_level_permitted);
}
-TEST_F(
- PolicyManagerImplTest_ExternalConsent,
- ExternalConsent_SetExternalConsentStatusNewAppAddedAfterward_ExpectExternalConsentUpdateForApp) {
- using namespace policy_table;
- using namespace rpc;
-
- PreconditionExternalConsentPreparePTWithAppPolicy();
-
- // Act
- std::shared_ptr<policy_table::Table> pt =
- policy_manager_->GetCache()->GetPT();
-
- ExternalConsentStatus status;
- status.insert(ExternalConsentStatusItem(type_1_, id_1_, kStatusOn));
- status.insert(ExternalConsentStatusItem(type_2_, id_2_, kStatusOn));
- status.insert(ExternalConsentStatusItem(type_3_, id_3_, kStatusOn));
-
- EXPECT_TRUE(policy_manager_->SetExternalConsentStatus(status));
-
- // Checking ExternalConsent consents after setting new ExternalConsent status
- policy_table::DeviceData::const_iterator updated_device_data =
- pt->policy_table.device_data->find(device_id_1_);
-
- EXPECT_FALSE(pt->policy_table.device_data->end() != updated_device_data);
-
- EXPECT_CALL(listener_, OnPermissionsUpdated(device_id_1_, app_id_1_, _));
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(_, app_id_1_))
- .WillRepeatedly(Return(device_id_1_));
-
- policy_manager_->AddApplication(
- device_id_1_, app_id_1_, HmiTypes(policy_table::AHT_DEFAULT));
-
- // Check ExternalConsent consents for application
- updated_device_data = pt->policy_table.device_data->find(device_id_1_);
-
- EXPECT_TRUE(pt->policy_table.device_data->end() != updated_device_data);
-
- UserConsentRecords::const_iterator updated_consent_records =
- updated_device_data->second.user_consent_records->find(app_id_1_);
-
- const ConsentGroups& external_consent_statuss =
- *updated_consent_records->second.external_consent_status_groups;
-
- ApplicationPolicies::const_iterator app_parameters =
- pt->policy_table.app_policies_section.apps.find(app_id_1_);
-
- app_parameters = pt->policy_table.app_policies_section.apps.find(app_id_1_);
-
- EXPECT_TRUE(pt->policy_table.app_policies_section.apps.end() !=
- app_parameters);
-
- EXPECT_EQ(app_parameters->second.groups.size(),
- external_consent_statuss.size());
+TEST_F(PolicyManagerImplTest,
+ GetPermissionsForApp_CannotGetPermissionsForApp_ReturnEmptyVector) {
+ std::vector<FunctionalGroupPermission> permissions;
+
+ ON_CALL(*cache_manager_, IsApplicationRepresented(kValidAppId))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, GetDeviceConsent(kDeviceNumber))
+ .WillByDefault(Return(kDeviceAllowed));
+ ON_CALL(*cache_manager_, IsDefaultPolicy(kValidAppId))
+ .WillByDefault(Return(true));
+ EXPECT_CALL(*cache_manager_,
+ GetPermissionsForApp(kDeviceNumber, kDefaultId, _))
+ .WillOnce(Return(false));
- ConsentGroups::const_iterator updated_group_1 =
- external_consent_statuss.find(group_name_1_);
+ policy_manager_->GetPermissionsForApp(
+ kDeviceNumber, kValidAppId, permissions);
+ EXPECT_TRUE(permissions.empty());
+}
- EXPECT_TRUE(external_consent_statuss.end() != updated_group_1);
+TEST_F(PolicyManagerImplTest,
+ GetPermissionsForApp_NoSuchApp_ReturnEmptyVector) {
+ std::vector<FunctionalGroupPermission> permissions;
- ConsentGroups::const_iterator updated_group_2 =
- external_consent_statuss.find(group_name_2_);
+ EXPECT_CALL(*cache_manager_, IsApplicationRepresented(kValidAppId))
+ .WillOnce(Return(false));
+ policy_manager_->GetPermissionsForApp(
+ kDeviceNumber, kValidAppId, permissions);
+ EXPECT_TRUE(permissions.empty());
+}
- EXPECT_TRUE(external_consent_statuss.end() != updated_group_2);
+TEST_F(PolicyManagerImplTest,
+ GetPermissionsForApp_PredataPolicy_ReturnEmptyVector) {
+ std::vector<FunctionalGroupPermission> permissions;
+
+ ON_CALL(*cache_manager_, IsApplicationRepresented(kValidAppId))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, GetDeviceConsent(kDeviceNumber))
+ .WillByDefault(Return(kDeviceDisallowed));
+ ON_CALL(*cache_manager_, IsPredataPolicy(kValidAppId))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_,
+ GetPermissionsForApp(kDeviceNumber, kPreDataConsentId, _))
+ .WillByDefault(Return(true));
+ EXPECT_CALL(*cache_manager_, GetFunctionalGroupNames(_))
+ .WillOnce(Return(true));
- EXPECT_EQ(Boolean(false), updated_group_1->second);
- EXPECT_EQ(Boolean(true), updated_group_2->second);
+ policy_manager_->GetPermissionsForApp(
+ kDeviceNumber, kValidAppId, permissions);
+ EXPECT_TRUE(permissions.empty());
}
-TEST_F(
- PolicyManagerImplTest_ExternalConsent,
- ExternalConsent_SetExternalConsentStatusNewAppAddedAfterward_ExpectUserConsentsUpdateForApp) {
- using namespace policy_table;
- using namespace rpc;
-
- PreconditionExternalConsentPreparePTWithAppPolicy();
+TEST_F(PolicyManagerImplTest,
+ GetPermissionsForApp_NotPredataOrDefaultPolicy_ReturnEmptyVector) {
+ std::vector<FunctionalGroupPermission> permissions;
+
+ ON_CALL(*cache_manager_, IsApplicationRepresented(kValidAppId))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, GetDeviceConsent(kDeviceNumber))
+ .WillByDefault(Return(kDeviceDisallowed));
+ ON_CALL(*cache_manager_, IsPredataPolicy(kValidAppId))
+ .WillByDefault(Return(false));
+ ON_CALL(*cache_manager_, IsDefaultPolicy(kValidAppId))
+ .WillByDefault(Return(false));
+ ON_CALL(*cache_manager_,
+ GetPermissionsForApp(kDeviceNumber, kPreDataConsentId, _))
+ .WillByDefault(Return(true));
+ EXPECT_CALL(*cache_manager_, GetFunctionalGroupNames(_))
+ .WillOnce(Return(true));
- // Act
- std::shared_ptr<policy_table::Table> pt =
- policy_manager_->GetCache()->GetPT();
+ policy_manager_->GetPermissionsForApp(
+ kDeviceNumber, kValidAppId, permissions);
+ EXPECT_TRUE(permissions.empty());
+}
- ExternalConsentStatus status;
- status.insert(ExternalConsentStatusItem(type_1_, id_1_, kStatusOn));
- status.insert(ExternalConsentStatusItem(type_2_, id_2_, kStatusOn));
- status.insert(ExternalConsentStatusItem(type_3_, id_3_, kStatusOn));
+TEST_F(PolicyManagerImplTest,
+ GetPermissionsForApp_NoFunctionalGroupsNames_ReturnEmptyVector) {
+ std::vector<FunctionalGroupPermission> permissions;
+
+ ON_CALL(*cache_manager_, IsApplicationRepresented(kValidAppId))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, GetDeviceConsent(kDeviceNumber))
+ .WillByDefault(Return(kDeviceDisallowed));
+ ON_CALL(*cache_manager_, IsPredataPolicy(kValidAppId))
+ .WillByDefault(Return(false));
+ ON_CALL(*cache_manager_, IsDefaultPolicy(kValidAppId))
+ .WillByDefault(Return(false));
+ ON_CALL(*cache_manager_,
+ GetPermissionsForApp(kDeviceNumber, kPreDataConsentId, _))
+ .WillByDefault(Return(true));
+ EXPECT_CALL(*cache_manager_, GetFunctionalGroupNames(_))
+ .WillOnce(Return(false));
- EXPECT_TRUE(policy_manager_->SetExternalConsentStatus(status));
+ policy_manager_->GetPermissionsForApp(
+ kDeviceNumber, kValidAppId, permissions);
+ EXPECT_TRUE(permissions.empty());
+}
- // Checking ExternalConsent consents after setting new ExternalConsent status
- policy_table::DeviceData::const_iterator updated_device_data =
- pt->policy_table.device_data->find(device_id_1_);
+TEST_F(PolicyManagerImplTest, LoadPT_InvalidPT_ReturnkWrongPtReceived) {
+ std::vector<policy_table::VehicleDataItem> vehicle_items;
+ std::ifstream ifile(kSdlPreloadedPtJson);
+ ASSERT_TRUE(ifile.good());
- EXPECT_FALSE(pt->policy_table.device_data->end() != updated_device_data);
+ Json::CharReaderBuilder reader_builder;
+ Json::Value root(Json::objectValue);
+ Json::parseFromStream(reader_builder, ifile, &root, nullptr);
+ ifile.close();
+ policy_table::Table update(&root);
+ update.SetPolicyTableType(rpc::policy_table_interface_base::PT_UPDATE);
- EXPECT_CALL(listener_, OnPermissionsUpdated(device_id_1_, app_id_1_, _));
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(_, app_id_1_))
- .WillRepeatedly(Return(device_id_1_));
+ ASSERT_FALSE(IsValid(update));
- policy_manager_->AddApplication(
- device_id_1_, app_id_1_, HmiTypes(policy_table::AHT_DEFAULT));
+ std::string json = root.toStyledString();
+ BinaryMessage msg(json.begin(), json.end());
- // Checking ExternalConsent consents after setting new ExternalConsent status
- ApplicationPolicies::const_iterator app_parameters =
- pt->policy_table.app_policies_section.apps.find(app_id_1_);
+ EXPECT_CALL(*cache_manager_, GetVehicleDataItems())
+ .WillOnce(Return(vehicle_items));
+ EXPECT_CALL(*cache_manager_, SaveUpdateRequired(false)).Times(0);
+ const std::string filename("preloaded_pt.json");
+ EXPECT_EQ(policy_manager_->LoadPT(filename, msg),
+ PolicyManager::PtProcessingResult::kWrongPtReceived);
+}
- EXPECT_TRUE(pt->policy_table.app_policies_section.apps.end() !=
- app_parameters);
+TEST_F(PolicyManagerImplTest,
+ LoadPT_SnapshotNotGenerated_ReturnkNewPtRequired) {
+ std::vector<policy_table::VehicleDataItem> vehicle_items;
+ std::ifstream ifile(kSdlPreloadedPtJson);
- updated_device_data = pt->policy_table.device_data->find(device_id_1_);
+ ASSERT_TRUE(ifile.good());
+ Json::CharReaderBuilder reader_builder;
+ Json::Value root(Json::objectValue);
+ Json::parseFromStream(reader_builder, ifile, &root, nullptr);
+ root["policy_table"]["module_config"].removeMember("preloaded_pt");
+ ifile.close();
+ policy_table::Table update(&root);
- EXPECT_TRUE(pt->policy_table.device_data->end() != updated_device_data);
+ update.SetPolicyTableType(rpc::policy_table_interface_base::PT_UPDATE);
- UserConsentRecords::const_iterator updated_consent_records =
- updated_device_data->second.user_consent_records->find(app_id_1_);
+ ASSERT_TRUE(IsValid(update));
- EXPECT_TRUE(updated_device_data->second.user_consent_records->end() !=
- updated_consent_records);
+ std::string json = root.toStyledString();
+ BinaryMessage msg(json.begin(), json.end());
- const ConsentGroups& external_consent_statuss =
- *updated_consent_records->second.consent_groups;
+ EXPECT_CALL(*cache_manager_, GetVehicleDataItems())
+ .WillOnce(Return(vehicle_items));
+ EXPECT_CALL(*cache_manager_, GenerateSnapshot()).WillOnce(Return(nullptr));
+ const std::string filename("preloaded_pt.json");
+ EXPECT_EQ(policy_manager_->LoadPT(filename, msg),
+ PolicyManager::PtProcessingResult::kNewPtRequired);
+}
- EXPECT_EQ(app_parameters->second.groups.size(),
- external_consent_statuss.size());
+TEST_F(PolicyManagerImplTest, LoadPT_UpdateNotApplied_ReturnkNewPtRequired) {
+ std::vector<policy_table::VehicleDataItem> vehicle_items;
+ std::ifstream ifile(kSdlPreloadedPtJson);
+ ASSERT_TRUE(ifile.good());
- ConsentGroups::const_iterator updated_group_1 =
- external_consent_statuss.find(group_name_1_);
+ Json::CharReaderBuilder reader_builder;
+ Json::Value root(Json::objectValue);
+ Json::parseFromStream(reader_builder, ifile, &root, nullptr);
+ root["policy_table"]["module_config"].removeMember("preloaded_pt");
+ ifile.close();
+ policy_table::Table update(&root);
- EXPECT_TRUE(external_consent_statuss.end() != updated_group_1);
+ update.SetPolicyTableType(rpc::policy_table_interface_base::PT_UPDATE);
- ConsentGroups::const_iterator updated_group_2 =
- external_consent_statuss.find(group_name_2_);
+ ASSERT_TRUE(IsValid(update));
- EXPECT_TRUE(external_consent_statuss.end() != updated_group_2);
+ std::string json = root.toStyledString();
+ BinaryMessage msg(json.begin(), json.end());
- EXPECT_EQ(Boolean(false), updated_group_1->second);
- EXPECT_EQ(Boolean(true), updated_group_2->second);
+ EXPECT_CALL(*cache_manager_, GetVehicleDataItems())
+ .WillOnce(Return(vehicle_items));
+ EXPECT_CALL(*cache_manager_, GenerateSnapshot())
+ .WillOnce(Return(std::make_shared<policy_table::Table>(update)));
+ EXPECT_CALL(*cache_manager_, ApplyUpdate(_)).WillOnce(Return(false));
+ const std::string filename("preloaded_pt.json");
+ EXPECT_EQ(policy_manager_->LoadPT(filename, msg),
+ PolicyManager::PtProcessingResult::kNewPtRequired);
}
-TEST_F(
- PolicyManagerImplTest_ExternalConsent,
- ExternalConsent_SetExternalConsentStatusNewAppPromotedAfterward_ExpectUserConsentsUpdateForApp) {
- using namespace policy_table;
- using namespace rpc;
-
- CreateLocalPT(preloaded_pt_filename_);
- Table t = PreparePTWithGroupsHavingExternalConsent();
+TEST_F(PolicyManagerImplTest, LoadPT_NoHMIAppTypes_ReturnkSuccess) {
+ std::vector<policy_table::VehicleDataItem> vehicle_items;
+ std::ifstream ifile(kSdlPreloadedPtJson);
+ ASSERT_TRUE(ifile.good());
- EXPECT_TRUE(policy_manager_->GetCache()->ApplyUpdate(t));
+ Json::CharReaderBuilder reader_builder;
+ Json::Value root(Json::objectValue);
+ Json::parseFromStream(reader_builder, ifile, &root, nullptr);
+ root["policy_table"]["module_config"].removeMember("preloaded_pt");
+ ifile.close();
+ policy_table::Table update(&root);
- EXPECT_CALL(listener_, OnPermissionsUpdated(device_id_1_, app_id_1_, _));
- EXPECT_CALL(listener_, GetDevicesIds(app_id_1_))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- // First register w/o app having groups to consent
- policy_manager_->AddApplication(
- device_id_1_, app_id_1_, HmiTypes(policy_table::AHT_DEFAULT));
+ update.SetPolicyTableType(rpc::policy_table_interface_base::PT_UPDATE);
- // Act
- std::shared_ptr<policy_table::Table> pt =
- policy_manager_->GetCache()->GetPT();
+ ASSERT_TRUE(IsValid(update));
+ std::string json = root.toStyledString();
+ BinaryMessage msg(json.begin(), json.end());
ExternalConsentStatus status;
- status.insert(ExternalConsentStatusItem(type_1_, id_1_, kStatusOn));
- status.insert(ExternalConsentStatusItem(type_2_, id_2_, kStatusOn));
- status.insert(ExternalConsentStatusItem(type_3_, id_3_, kStatusOn));
-
- EXPECT_TRUE(policy_manager_->SetExternalConsentStatus(status));
-
- // Checking ExternalConsent consents after setting new ExternalConsent status
- policy_table::DeviceData::const_iterator updated_device_data =
- pt->policy_table.device_data->find(device_id_1_);
-
- EXPECT_FALSE(pt->policy_table.device_data->end() != updated_device_data);
-
- ApplicationParams app_params;
- app_params.groups.push_back(group_name_1_);
- app_params.groups.push_back(group_name_2_);
-
- t.policy_table.app_policies_section.apps.insert(
- std::make_pair(app_id_1_, app_params));
-
- // Adding application groups to consent, will be pending untill next
- // registration
- EXPECT_TRUE(policy_manager_->GetCache()->ApplyUpdate(t));
-
- // Second time register w/ app having groups to consent
- policy_manager_->AddApplication(
- device_id_1_, app_id_1_, HmiTypes(policy_table::AHT_DEFAULT));
-
- // Checking ExternalConsent consents after setting new ExternalConsent status
- ApplicationPolicies::const_iterator app_parameters =
- pt->policy_table.app_policies_section.apps.find(app_id_1_);
-
- EXPECT_TRUE(pt->policy_table.app_policies_section.apps.end() !=
- app_parameters);
-
- updated_device_data = pt->policy_table.device_data->find(device_id_1_);
-
- EXPECT_TRUE(pt->policy_table.device_data->end() != updated_device_data);
-
- UserConsentRecords::const_iterator updated_consent_records =
- updated_device_data->second.user_consent_records->find(app_id_1_);
+ GroupsByExternalConsentStatus groups_by_status;
+ std::map<std::string, std::string> known_links;
+ const std::string linked_device("device_1");
+ const std::string linked_app("app_1");
+ known_links[linked_device] = linked_app;
+
+ ON_CALL(*cache_manager_, GetVehicleDataItems())
+ .WillByDefault(Return(vehicle_items));
+ ON_CALL(*cache_manager_, GenerateSnapshot())
+ .WillByDefault(Return(std::make_shared<policy_table::Table>(update)));
+ ON_CALL(*cache_manager_, ApplyUpdate(_)).WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, GetExternalConsentStatus())
+ .WillByDefault(Return(status));
+ ON_CALL(*cache_manager_, GetGroupsWithSameEntities(status))
+ .WillByDefault(Return(groups_by_status));
+ ON_CALL(*cache_manager_, GetKnownLinksFromPT())
+ .WillByDefault(Return(known_links));
+
+ const std::string filename("preloaded_pt.json");
+ EXPECT_EQ(policy_manager_->LoadPT(filename, msg),
+ PolicyManager::PtProcessingResult::kSuccess);
+}
- EXPECT_TRUE(updated_device_data->second.user_consent_records->end() !=
- updated_consent_records);
+TEST_F(PolicyManagerImplTest,
+ AddApplication_NewApplication_ReturnCallStatusChanges) {
+ AppHmiTypes hmi_types;
+ ExternalConsentStatus ext_consent_status;
+ GroupsByExternalConsentStatus groups;
+
+ ON_CALL(*cache_manager_, GetDeviceConsent(kDeviceNumber))
+ .WillByDefault(Return(kDeviceAllowed));
+ ON_CALL(*cache_manager_, IsApplicationRepresented(kValidAppId))
+ .WillByDefault(Return(false));
+ ON_CALL(*cache_manager_, GetExternalConsentStatus())
+ .WillByDefault(Return(ext_consent_status));
+ ON_CALL(*cache_manager_, GetGroupsWithSameEntities(ext_consent_status))
+ .WillByDefault(Return(groups));
- const ConsentGroups& external_consent_statuss =
- *updated_consent_records->second.consent_groups;
+ EXPECT_CALL(*cache_manager_, IsPredataPolicy(kValidAppId)).Times(0);
- EXPECT_EQ(app_parameters->second.groups.size(),
- external_consent_statuss.size());
+ policy_manager_->AddApplication(kDeviceNumber, kValidAppId, hmi_types);
+}
- ConsentGroups::const_iterator updated_group_1 =
- external_consent_statuss.find(group_name_1_);
+TEST_F(PolicyManagerImplTest,
+ AddApplication_ExistedApplication_ReturnCallNothing) {
+ AppHmiTypes hmi_types;
+ ExternalConsentStatus ext_consent_status;
+ GroupsByExternalConsentStatus groups;
+
+ ON_CALL(*cache_manager_, GetDeviceConsent(kDeviceNumber))
+ .WillByDefault(Return(kDeviceAllowed));
+ ON_CALL(*cache_manager_, IsApplicationRepresented(kValidAppId))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, GetExternalConsentStatus())
+ .WillByDefault(Return(ext_consent_status));
+ ON_CALL(*cache_manager_, GetGroupsWithSameEntities(ext_consent_status))
+ .WillByDefault(Return(groups));
+
+ EXPECT_CALL(*cache_manager_, IsPredataPolicy(kValidAppId))
+ .WillOnce(Return(true));
- EXPECT_TRUE(external_consent_statuss.end() != updated_group_1);
+ policy_manager_->AddApplication(kDeviceNumber, kValidAppId, hmi_types);
+}
- ConsentGroups::const_iterator updated_group_2 =
- external_consent_statuss.find(group_name_2_);
+TEST_F(PolicyManagerImplTest,
+ OnPTUFinished_PtuResultIskNewPtRequired_InvokeForcePTExchange) {
+ std::string initial_pt_status = policy_manager_->GetPolicyTableStatus();
- EXPECT_TRUE(external_consent_statuss.end() != updated_group_2);
+ // EXPECT_CALL(listener_, CanUpdate()).WillOnce(Return(true));
+ EXPECT_CALL(*cache_manager_, GenerateSnapshot()).WillOnce(Return(nullptr));
- EXPECT_EQ(Boolean(false), updated_group_1->second);
- EXPECT_EQ(Boolean(true), updated_group_2->second);
+ policy_manager_->OnPTUFinished(
+ PolicyManager::PtProcessingResult::kNewPtRequired);
+ std::string final_pt_status = policy_manager_->GetPolicyTableStatus();
+ EXPECT_NE(initial_pt_status, final_pt_status);
}
TEST_F(
- PolicyManagerImplTest_ExternalConsent,
- ExternalConsent_SetExternalConsentStatusNewAppPromotedAfterward_ExpectExternalConsentUpdateForApp) {
- using namespace policy_table;
- using namespace rpc;
-
- CreateLocalPT(preloaded_pt_filename_);
- Table t = PreparePTWithGroupsHavingExternalConsent();
-
- EXPECT_TRUE(policy_manager_->GetCache()->ApplyUpdate(t));
-
- EXPECT_CALL(listener_, OnPermissionsUpdated(device_id_1_, app_id_1_, _));
-
- // First register w/o app having groups to consent
- policy_manager_->AddApplication(
- device_id_1_, app_id_1_, HmiTypes(policy_table::AHT_DEFAULT));
-
- // Act
- std::shared_ptr<policy_table::Table> pt =
- policy_manager_->GetCache()->GetPT();
-
- ExternalConsentStatus status;
- status.insert(ExternalConsentStatusItem(type_1_, id_1_, kStatusOn));
- status.insert(ExternalConsentStatusItem(type_2_, id_2_, kStatusOn));
- status.insert(ExternalConsentStatusItem(type_3_, id_3_, kStatusOn));
-
- EXPECT_TRUE(policy_manager_->SetExternalConsentStatus(status));
-
- // Checking ExternalConsent consents after setting new ExternalConsent status
- policy_table::DeviceData::const_iterator updated_device_data =
- pt->policy_table.device_data->find(device_id_1_);
-
- EXPECT_FALSE(pt->policy_table.device_data->end() != updated_device_data);
-
- ApplicationParams app_params;
- app_params.groups.push_back(group_name_1_);
- app_params.groups.push_back(group_name_2_);
-
- t.policy_table.app_policies_section.apps.insert(
- std::make_pair(app_id_1_, app_params));
-
- // Adding application groups to consent, will be pending i.e. not consented
- // yet, untill next registration
- EXPECT_TRUE(policy_manager_->GetCache()->ApplyUpdate(t));
-
- // Second time register w/ app having groups to consent
- policy_manager_->AddApplication(
- device_id_1_, app_id_1_, HmiTypes(policy_table::AHT_DEFAULT));
-
- // Check ExternalConsent consents for application
- updated_device_data = pt->policy_table.device_data->find(device_id_1_);
-
- EXPECT_TRUE(pt->policy_table.device_data->end() != updated_device_data);
-
- UserConsentRecords::const_iterator updated_consent_records =
- updated_device_data->second.user_consent_records->find(app_id_1_);
-
- const ConsentGroups& external_consent_statuss =
- *updated_consent_records->second.external_consent_status_groups;
-
- ApplicationPolicies::const_iterator app_parameters =
- pt->policy_table.app_policies_section.apps.find(app_id_1_);
-
- app_parameters = pt->policy_table.app_policies_section.apps.find(app_id_1_);
-
- EXPECT_TRUE(pt->policy_table.app_policies_section.apps.end() !=
- app_parameters);
-
- EXPECT_EQ(app_parameters->second.groups.size(),
- external_consent_statuss.size());
-
- ConsentGroups::const_iterator updated_group_1 =
- external_consent_statuss.find(group_name_1_);
-
- EXPECT_TRUE(external_consent_statuss.end() != updated_group_1);
-
- ConsentGroups::const_iterator updated_group_2 =
- external_consent_statuss.find(group_name_2_);
-
- EXPECT_TRUE(external_consent_statuss.end() != updated_group_2);
-
- EXPECT_EQ(Boolean(false), updated_group_1->second);
- EXPECT_EQ(Boolean(true), updated_group_2->second);
+ PolicyManagerImplTest,
+ OnPTUFinished_PtuResultIskWrongPtReceived_NoPTExchangeAndNoRefreshRetrySequence) {
+ std::string initial_pt_status = policy_manager_->GetPolicyTableStatus();
+
+ EXPECT_CALL(listener_, CanUpdate()).Times(0);
+ EXPECT_CALL(*cache_manager_, TimeoutResponse()).Times(0);
+ EXPECT_CALL(*cache_manager_, SecondsBetweenRetries(_)).Times(0);
+
+ policy_manager_->OnPTUFinished(
+ PolicyManager::PtProcessingResult::kWrongPtReceived);
+ std::string final_pt_status = policy_manager_->GetPolicyTableStatus();
+ EXPECT_EQ(initial_pt_status, final_pt_status);
}
-TEST_F(PolicyManagerImplTest_ExternalConsent,
- ExternalConsent_PTUWithNewGroups_ExpectExternalConsentUpdateForApp) {
- using namespace policy_table;
- using namespace rpc;
-
- PreconditionExternalConsentPreparePTWithAppGroupsAndConsents();
-
- const uint32_t type_4 = 6u;
- const uint32_t id_4 = 7u;
- const std::string group_name_4 = "NewGroup";
-
- // ExternalConsent status has new group, which is not yet assigned to any
- // application
- ExternalConsentStatus status;
- status.insert(ExternalConsentStatusItem(type_1_, id_1_, kStatusOn));
- status.insert(ExternalConsentStatusItem(type_2_, id_2_, kStatusOn));
- status.insert(ExternalConsentStatusItem(type_4, id_4, kStatusOn));
-
- EXPECT_TRUE(policy_manager_->SetExternalConsentStatus(status));
-
- EXPECT_CALL(listener_, OnPermissionsUpdated(device_id_1_, app_id_1_, _));
- EXPECT_CALL(listener_, GetDevicesIds(app_id_1_))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- policy_manager_->AddApplication(
- device_id_1_, app_id_1_, HmiTypes(policy_table::AHT_DEFAULT));
-
- std::shared_ptr<policy_table::Table> pt =
- policy_manager_->GetCache()->GetPT();
-
- // Check ExternalConsent consents for application
- policy_table::DeviceData::const_iterator initial_device_data =
- pt->policy_table.device_data->find(device_id_1_);
-
- EXPECT_TRUE(pt->policy_table.device_data->end() != initial_device_data);
-
- UserConsentRecords::const_iterator initial_consent_records =
- initial_device_data->second.user_consent_records->find(app_id_1_);
-
- EXPECT_TRUE(initial_device_data->second.user_consent_records->end() !=
- initial_consent_records);
-
- const ConsentGroups& external_consent_statuss =
- *initial_consent_records->second.external_consent_status_groups;
-
- ConsentGroups::const_iterator group_1 =
- external_consent_statuss.find(group_name_1_);
-
- EXPECT_TRUE(external_consent_statuss.end() != group_1);
-
- ConsentGroups::const_iterator group_2 =
- external_consent_statuss.find(group_name_2_);
-
- EXPECT_TRUE(external_consent_statuss.end() != group_2);
-
- ConsentGroups::const_iterator group_4 =
- external_consent_statuss.find(group_name_4);
-
- EXPECT_FALSE(external_consent_statuss.end() != group_4);
-
- // Consents for known groups have been done
- EXPECT_EQ(Boolean(false), group_1->second);
- EXPECT_EQ(Boolean(true), group_2->second);
-
- ApplicationPolicies::const_iterator app_parameters =
- pt->policy_table.app_policies_section.apps.find(app_id_1_);
-
- app_parameters = pt->policy_table.app_policies_section.apps.find(app_id_1_);
-
- EXPECT_TRUE(pt->policy_table.app_policies_section.apps.end() !=
- app_parameters);
-
- EXPECT_EQ(app_parameters->second.groups.size(),
- external_consent_statuss.size());
-
- const std::string ptu_json =
- PreparePTUWithNewGroup(type_4, id_4, group_name_4);
-
- const BinaryMessage msg(ptu_json.begin(), ptu_json.end());
-
- ON_CALL(listener_, GetRegisteredLinks(_)).WillByDefault(Return());
+TEST_F(PolicyManagerImplTest,
+ OnPTUFinished_PtuResultIskSuccess_InvokeRefreshRetrySequence) {
+ std::string initial_pt_status = policy_manager_->GetPolicyTableStatus();
- EXPECT_CALL(listener_, OnCertificateUpdated(_));
+ EXPECT_CALL(*cache_manager_, TimeoutResponse());
+ EXPECT_CALL(*cache_manager_, SecondsBetweenRetries(_));
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- policy_manager_->LoadPT("DummyFileName", msg));
policy_manager_->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-
- pt = policy_manager_->GetCache()->GetPT();
-
- policy_table::DeviceData::const_iterator updated_device_data =
- pt->policy_table.device_data->find(device_id_1_);
-
- EXPECT_TRUE(pt->policy_table.device_data->end() != updated_device_data);
-
- UserConsentRecords::const_iterator updated_consent_records =
- updated_device_data->second.user_consent_records->find(app_id_1_);
-
- EXPECT_TRUE(updated_device_data->second.user_consent_records->end() !=
- updated_consent_records);
-
- const ConsentGroups& updated_external_consent_statuss =
- *updated_consent_records->second.external_consent_status_groups;
-
- group_1 = updated_external_consent_statuss.find(group_name_1_);
-
- EXPECT_TRUE(updated_external_consent_statuss.end() != group_1);
-
- group_2 = updated_external_consent_statuss.find(group_name_2_);
-
- EXPECT_TRUE(updated_external_consent_statuss.end() != group_2);
-
- group_4 = updated_external_consent_statuss.find(group_name_4);
-
- EXPECT_TRUE(updated_external_consent_statuss.end() != group_4);
-
- EXPECT_EQ(Boolean(false), group_1->second);
- EXPECT_EQ(Boolean(true), group_2->second);
- EXPECT_EQ(Boolean(false), group_4->second);
-
- app_parameters = pt->policy_table.app_policies_section.apps.find(app_id_1_);
-
- EXPECT_TRUE(pt->policy_table.app_policies_section.apps.end() !=
- app_parameters);
-
- EXPECT_EQ(app_parameters->second.groups.size(),
- external_consent_statuss.size());
+ std::string final_pt_status = policy_manager_->GetPolicyTableStatus();
+ EXPECT_EQ(initial_pt_status, final_pt_status);
}
-TEST_F(PolicyManagerImplTest_ExternalConsent,
- ExternalConsent_PTUWithNewGroups_ExpectUserConsentsUpdateForApp) {
- using namespace policy_table;
- using namespace rpc;
-
- PreconditionExternalConsentPreparePTWithAppGroupsAndConsents();
-
- const uint32_t type_4 = 6u;
- const uint32_t id_4 = 7u;
- const std::string group_name_4 = "NewGroup";
-
- ExternalConsentStatus status;
- status.insert(ExternalConsentStatusItem(type_1_, id_1_, kStatusOn));
- status.insert(ExternalConsentStatusItem(type_2_, id_2_, kStatusOn));
- status.insert(ExternalConsentStatusItem(type_4, id_4, kStatusOn));
+TEST_F(PolicyManagerImplTest, GetUpdateUrl_NoEndpoints_ReturnEmptyString) {
+ EXPECT_CALL(*cache_manager_, GetUpdateUrls(kServiceTypeInt, _));
- EXPECT_TRUE(policy_manager_->SetExternalConsentStatus(status));
+ EXPECT_TRUE((policy_manager_->GetUpdateUrl(kServiceTypeInt)).empty());
+}
- EXPECT_CALL(listener_, OnPermissionsUpdated(device_id_1_, app_id_1_, _));
- EXPECT_CALL(listener_, GetDevicesIds(app_id_1_))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- policy_manager_->AddApplication(
- device_id_1_, app_id_1_, HmiTypes(policy_table::AHT_DEFAULT));
+TEST_F(PolicyManagerImplTest, RequestPTUpdate_PTIsValid_PTIsUpdated) {
+ std::ifstream ifile(kSdlPreloadedPtJson);
+ Json::CharReaderBuilder reader_builder;
+ Json::Value root(Json::objectValue);
+ Json::parseFromStream(reader_builder, ifile, &root, nullptr);
+ root["policy_table"]["consumer_friendly_messages"].removeMember("messages");
+ ifile.close();
+ policy_table::Table update(&root);
+ auto snapshot = std::make_shared<policy_table::Table>();
+ snapshot->policy_table = update.policy_table;
+ if (update.policy_table.vehicle_data.is_initialized()) {
+ snapshot->policy_table.vehicle_data =
+ rpc::Optional<policy_table::VehicleData>();
+ snapshot->policy_table.vehicle_data->mark_initialized();
+ snapshot->policy_table.vehicle_data->schema_version =
+ update.policy_table.vehicle_data->schema_version;
+ }
- std::shared_ptr<policy_table::Table> pt =
- policy_manager_->GetCache()->GetPT();
+ snapshot->SetPolicyTableType(policy_table::PT_SNAPSHOT);
+ ASSERT_TRUE(IsValid(*snapshot));
- // Check ExternalConsent consents for application
- policy_table::DeviceData::const_iterator initial_device_data =
- pt->policy_table.device_data->find(device_id_1_);
+ EXPECT_CALL(*cache_manager_, GenerateSnapshot()).WillOnce(Return(snapshot));
+ EXPECT_CALL(listener_, OnSnapshotCreated(_, _, _));
+ policy_manager_->RequestPTUpdate();
+}
- EXPECT_TRUE(pt->policy_table.device_data->end() != initial_device_data);
+TEST_F(PolicyManagerImplTest, RequestPTUpdate_InvalidPT_PTNotUpdated) {
+ std::ifstream ifile(kSdlPreloadedPtJson);
+ Json::CharReaderBuilder reader_builder;
+ Json::Value root(Json::objectValue);
+ Json::parseFromStream(reader_builder, ifile, &root, nullptr);
+ ifile.close();
+ policy_table::Table update(&root);
+ auto snapshot = std::make_shared<policy_table::Table>();
+ snapshot->policy_table = update.policy_table;
- UserConsentRecords::const_iterator initial_consent_records =
- initial_device_data->second.user_consent_records->find(app_id_1_);
+ snapshot->SetPolicyTableType(policy_table::PT_SNAPSHOT);
+ ASSERT_FALSE(IsValid(*snapshot));
- EXPECT_TRUE(initial_device_data->second.user_consent_records->end() !=
- initial_consent_records);
+ EXPECT_CALL(*cache_manager_, GenerateSnapshot()).WillOnce(Return(snapshot));
+ EXPECT_CALL(listener_, OnSnapshotCreated(_, _, _)).Times(0);
+ policy_manager_->RequestPTUpdate();
+}
- const ConsentGroups& user_consents =
- *initial_consent_records->second.consent_groups;
+TEST_F(PolicyManagerImplTest,
+ SendNotificationOnPermissionsUpdated_EmptyDeviceID_NoNotifications) {
+ EXPECT_CALL(*cache_manager_, IsApplicationRepresented(kValidAppId)).Times(0);
- ConsentGroups::const_iterator group_1 = user_consents.find(group_name_1_);
+ const std::string device_id;
+ policy_manager_->SendNotificationOnPermissionsUpdated(device_id, kValidAppId);
+}
- EXPECT_TRUE(user_consents.end() != group_1);
+TEST_F(
+ PolicyManagerImplTest,
+ SendNotificationOnPermissionsUpdated_ValidAppAndDeviceIDs_PermissionsIsUpdated) {
+ ON_CALL(*cache_manager_, IsApplicationRepresented(kValidAppId))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, GetDeviceConsent(kDeviceNumber))
+ .WillByDefault(Return(kDeviceAllowed));
+ ON_CALL(*cache_manager_, IsDefaultPolicy(kValidAppId))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, GetPermissionsForApp(kDeviceNumber, kValidAppId, _))
+ .WillByDefault(Return(false));
- ConsentGroups::const_iterator group_2 = user_consents.find(group_name_2_);
+ EXPECT_CALL(listener_,
+ OnPermissionsUpdated(kDeviceNumber, kValidAppId, _, _));
+ policy_manager_->SendNotificationOnPermissionsUpdated(kDeviceNumber,
+ kValidAppId);
+}
- EXPECT_TRUE(user_consents.end() != group_2);
+TEST_F(PolicyManagerImplTest, KmsChanged_StartPTExchangeAndUpdatePT) {
+ int kilometers = 1000;
- ConsentGroups::const_iterator group_4 = user_consents.find(group_name_4);
+ EXPECT_CALL(*cache_manager_, KilometersBeforeExchange(kilometers))
+ .WillOnce(Return(0));
- EXPECT_FALSE(user_consents.end() != group_4);
+ std::ifstream ifile(kSdlPreloadedPtJson);
+ Json::CharReaderBuilder reader_builder;
+ Json::Value root(Json::objectValue);
+ Json::parseFromStream(reader_builder, ifile, &root, nullptr);
+ root["policy_table"]["consumer_friendly_messages"].removeMember("messages");
+ ifile.close();
+ policy_table::Table update(&root);
+ auto snapshot = std::make_shared<policy_table::Table>();
+ snapshot->policy_table = update.policy_table;
+ if (update.policy_table.vehicle_data.is_initialized()) {
+ snapshot->policy_table.vehicle_data =
+ rpc::Optional<policy_table::VehicleData>();
+ snapshot->policy_table.vehicle_data->mark_initialized();
+ snapshot->policy_table.vehicle_data->schema_version =
+ update.policy_table.vehicle_data->schema_version;
+ }
- EXPECT_EQ(Boolean(false), group_1->second);
- EXPECT_EQ(Boolean(true), group_2->second);
+ snapshot->SetPolicyTableType(policy_table::PT_SNAPSHOT);
+ ASSERT_TRUE(IsValid(*snapshot));
- ApplicationPolicies::const_iterator app_parameters =
- pt->policy_table.app_policies_section.apps.find(app_id_1_);
+ EXPECT_CALL(*cache_manager_, GenerateSnapshot()).WillOnce(Return(snapshot));
+ EXPECT_CALL(*cache_manager_,
+ SetCountersPassedForSuccessfulUpdate(KILOMETERS, kilometers));
+ EXPECT_CALL(*cache_manager_, ResetIgnitionCycles());
- app_parameters = pt->policy_table.app_policies_section.apps.find(app_id_1_);
+ policy_manager_->KmsChanged(kilometers);
+}
- EXPECT_TRUE(pt->policy_table.app_policies_section.apps.end() !=
- app_parameters);
+TEST_F(PolicyManagerImplTest, KmsChanged_NoPTExchangeAndNotUpdatePT) {
+ int kilometers = 1000;
- EXPECT_EQ(app_parameters->second.groups.size(), user_consents.size());
+ EXPECT_CALL(*cache_manager_, KilometersBeforeExchange(kilometers))
+ .WillOnce(Return(100));
+ EXPECT_CALL(*cache_manager_,
+ SetCountersPassedForSuccessfulUpdate(KILOMETERS, kilometers))
+ .Times(0);
+ EXPECT_CALL(*cache_manager_, ResetIgnitionCycles()).Times(0);
- const std::string ptu_json =
- PreparePTUWithNewGroup(type_4, id_4, group_name_4);
+ policy_manager_->KmsChanged(kilometers);
+}
- const BinaryMessage msg(ptu_json.begin(), ptu_json.end());
+TEST_F(PolicyManagerImplTest,
+ SetExternalConsentStatus_EmptyStatus_ReturnFalse) {
+ ExternalConsentStatus consent_status;
- ON_CALL(listener_, GetRegisteredLinks(_)).WillByDefault(Return());
+ EXPECT_FALSE(policy_manager_->SetExternalConsentStatus(consent_status));
+}
- EXPECT_CALL(listener_, OnCertificateUpdated(_));
+TEST_F(PolicyManagerImplTest,
+ SetExternalConsentStatus_CacheNotSetConsentStatus_ReturnFalse) {
+ ExternalConsentStatus consent_status;
+ consent_status.insert(ExternalConsentStatusItem());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- policy_manager_->LoadPT("DummyFileName", msg));
- policy_manager_->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
+ EXPECT_FALSE(policy_manager_->SetExternalConsentStatus(consent_status));
+}
- pt = policy_manager_->GetCache()->GetPT();
+TEST_F(PolicyManagerImplTest,
+ SetExternalConsentStatus_ConsentStatusIsSettedByCache_ReturnTrue) {
+ ExternalConsentStatus consent_status;
+ consent_status.insert(ExternalConsentStatusItem());
+ GroupsByExternalConsentStatus groups_by_status;
+ std::map<std::string, std::string> known_links;
+ const std::string linked_device("device_1");
+ const std::string linked_app("app_1");
+ known_links[linked_device] = linked_app;
+
+ ON_CALL(*cache_manager_, SetExternalConsentStatus(consent_status))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, GetGroupsWithSameEntities(consent_status))
+ .WillByDefault(Return(groups_by_status));
+ ON_CALL(*cache_manager_, GetKnownLinksFromPT())
+ .WillByDefault(Return(known_links));
+
+ EXPECT_TRUE(policy_manager_->SetExternalConsentStatus(consent_status));
+}
- policy_table::DeviceData::const_iterator updated_device_data =
- pt->policy_table.device_data->find(device_id_1_);
+TEST_F(PolicyManagerImplTest,
+ MarkUnpairedDevice_UnpairedDeviceIsNotSetted_NoUserConsentForDevice) {
+ EXPECT_CALL(*cache_manager_, SetUnpairedDevice(kDeviceNumber, _))
+ .WillOnce(Return(false));
+ EXPECT_CALL(*cache_manager_, SetDeviceConsent(kDeviceNumber, false)).Times(0);
- EXPECT_TRUE(pt->policy_table.device_data->end() != updated_device_data);
+ policy_manager_->MarkUnpairedDevice(kDeviceNumber);
+}
- UserConsentRecords::const_iterator updated_consent_records =
- updated_device_data->second.user_consent_records->find(app_id_1_);
+TEST_F(PolicyManagerImplTest,
+ MarkUnpairedDevice_UnpairedDeviceIsSetted_SetUserConsentForDevice) {
+ EXPECT_CALL(*cache_manager_, SetUnpairedDevice(kDeviceNumber, _))
+ .WillOnce(Return(true));
+ EXPECT_CALL(listener_, CanUpdate()).WillRepeatedly(Return(true));
+ EXPECT_CALL(*cache_manager_, GenerateSnapshot()).WillOnce(Return(nullptr));
- EXPECT_TRUE(updated_device_data->second.user_consent_records->end() !=
- updated_consent_records);
+ policy_manager_->MarkUnpairedDevice(kDeviceNumber);
+}
- const ConsentGroups& updated_user_consents =
- *updated_consent_records->second.consent_groups;
+TEST_F(PolicyManagerImplTest,
+ SetUserConsentForApp_UserPermissionsNotSetted_NotificationIsNotSent) {
+ PermissionConsent perm_consent;
+ perm_consent.device_id = kDeviceNumber;
+ perm_consent.policy_app_id = kValidAppId;
+ const std::string source("VR");
+ perm_consent.consent_source = source;
+
+ const std::string group_name("Notifications");
+ FunctionalGroupPermission group_perm;
+ group_perm.group_alias = group_name;
+ group_perm.group_name = group_name;
+ group_perm.group_id = ::utils::Djb2HashFromString(group_name);
+ group_perm.state = GroupConsent::kGroupAllowed;
+
+ std::vector<FunctionalGroupPermission> groups_permissions;
+ groups_permissions.push_back(group_perm);
+ perm_consent.group_permissions = groups_permissions;
+
+ ON_CALL(*cache_manager_, GetPermissionsForApp(kDeviceNumber, kValidAppId, _))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, GetFunctionalGroupNames(_))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, SetUserPermissionsForApp(_, _))
+ .WillByDefault(Return(false));
- group_1 = updated_user_consents.find(group_name_1_);
+ EXPECT_CALL(*cache_manager_, IsApplicationRepresented(kValidAppId)).Times(0);
- EXPECT_TRUE(updated_user_consents.end() != group_1);
+ policy_manager_->SetUserConsentForApp(perm_consent,
+ PolicyManager::kNotifyApplicationMode);
+}
- group_2 = updated_user_consents.find(group_name_2_);
+TEST_F(PolicyManagerImplTest,
+ SetUserConsentForApp_SilentMode_NotificationIsNotSent) {
+ PermissionConsent perm_consent;
+ perm_consent.device_id = kDeviceNumber;
+ perm_consent.policy_app_id = kValidAppId;
+ const std::string source("VR");
+ perm_consent.consent_source = source;
+
+ const std::string group_name("Notifications");
+ FunctionalGroupPermission group_perm;
+ group_perm.group_alias = group_name;
+ group_perm.group_name = group_name;
+ group_perm.group_id = ::utils::Djb2HashFromString(group_name);
+ group_perm.state = GroupConsent::kGroupAllowed;
+
+ std::vector<FunctionalGroupPermission> groups_permissions;
+ groups_permissions.push_back(group_perm);
+ perm_consent.group_permissions = groups_permissions;
+
+ ON_CALL(*cache_manager_, GetPermissionsForApp(kDeviceNumber, kValidAppId, _))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, GetFunctionalGroupNames(_))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, SetUserPermissionsForApp(_, _))
+ .WillByDefault(Return(true));
+
+ EXPECT_CALL(*cache_manager_, IsApplicationRepresented(kValidAppId)).Times(0);
+
+ policy_manager_->SetUserConsentForApp(perm_consent,
+ PolicyManager::kSilentMode);
+}
- EXPECT_TRUE(updated_user_consents.end() != group_2);
+TEST_F(PolicyManagerImplTest,
+ SetUserConsentForApp_AppPermissionsNotChanged_NotificationIsNotSent) {
+ PermissionConsent perm_consent;
+ perm_consent.device_id = kDeviceNumber;
+ perm_consent.policy_app_id = kValidAppId;
+ const std::string source("VR");
+ perm_consent.consent_source = source;
+
+ const std::string group_name("Notifications");
+ FunctionalGroupPermission group_perm;
+ group_perm.group_alias = group_name;
+ group_perm.group_name = group_name;
+ group_perm.group_id = ::utils::Djb2HashFromString(group_name);
+ group_perm.state = GroupConsent::kGroupAllowed;
+
+ std::vector<FunctionalGroupPermission> groups_permissions;
+ groups_permissions.push_back(group_perm);
+ perm_consent.group_permissions = groups_permissions;
+
+ ON_CALL(*cache_manager_, GetPermissionsForApp(kDeviceNumber, kValidAppId, _))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, GetFunctionalGroupNames(_))
+ .WillByDefault(Return(true));
+ ON_CALL(*cache_manager_, SetUserPermissionsForApp(_, _))
+ .WillByDefault(Return(true));
+
+ EXPECT_CALL(*cache_manager_, IsApplicationRepresented(kValidAppId)).Times(0);
+
+ policy_manager_->SetUserConsentForApp(perm_consent,
+ PolicyManager::kNotifyApplicationMode);
+}
- group_4 = updated_user_consents.find(group_name_4);
+TEST_F(PolicyManagerImplTest,
+ GetUserConsentForApp_NoPermissionsForApp_NoConsent) {
+ std::vector<FunctionalGroupPermission> permissions;
- EXPECT_TRUE(updated_user_consents.end() != group_4);
+ ON_CALL(*cache_manager_, GetPermissionsForApp(kDeviceNumber, kValidAppId, _))
+ .WillByDefault(Return(false));
+ EXPECT_CALL(*cache_manager_, GetFunctionalGroupNames(_)).Times(0);
- EXPECT_EQ(Boolean(false), group_1->second);
- EXPECT_EQ(Boolean(true), group_2->second);
- EXPECT_EQ(Boolean(false), group_4->second);
+ policy_manager_->GetUserConsentForApp(
+ kDeviceNumber, kValidAppId, permissions);
+ EXPECT_TRUE(permissions.empty());
+}
- app_parameters = pt->policy_table.app_policies_section.apps.find(app_id_1_);
+TEST_F(PolicyManagerImplTest,
+ GetUserConsentForApp_NoFunctionalGroupsNames_NoConsent) {
+ std::vector<FunctionalGroupPermission> permissions;
- EXPECT_TRUE(pt->policy_table.app_policies_section.apps.end() !=
- app_parameters);
+ ON_CALL(*cache_manager_, GetPermissionsForApp(kDeviceNumber, kValidAppId, _))
+ .WillByDefault(Return(true));
+ EXPECT_CALL(*cache_manager_, GetFunctionalGroupNames(_))
+ .WillOnce(Return(false));
- EXPECT_EQ(app_parameters->second.groups.size(), user_consents.size());
+ policy_manager_->GetUserConsentForApp(
+ kDeviceNumber, kValidAppId, permissions);
+ EXPECT_TRUE(permissions.empty());
}
TEST_F(
- PolicyManagerImplTest_ExternalConsent,
- ExternalConsent_SetExternalConsentStatusTurnOnThanOff_ExpectExternalConsentUpdateForApp) {
- using namespace policy_table;
- using namespace rpc;
-
- PreconditionExternalConsentPreparePTWithAppGroupsAndConsents();
-
- // Act
- std::shared_ptr<policy_table::Table> pt =
- policy_manager_->GetCache()->GetPT();
-
- // Checking ExternalConsent consents before setting new ExternalConsent status
- policy_table::DeviceData::const_iterator updated_device_data =
- pt->policy_table.device_data->find(device_id_1_);
-
- EXPECT_TRUE(pt->policy_table.device_data->end() != updated_device_data);
-
- UserConsentRecords::const_iterator updated_consent_records =
- updated_device_data->second.user_consent_records->find(app_id_1_);
-
- EXPECT_TRUE(updated_device_data->second.user_consent_records->end() !=
- updated_consent_records);
-
- EXPECT_TRUE(
- updated_consent_records->second.external_consent_status_groups->empty());
-
- // Act - setting new ExternalConsent status
- ExternalConsentStatus status_on;
- status_on.insert(ExternalConsentStatusItem(type_1_, id_1_, kStatusOn));
- status_on.insert(ExternalConsentStatusItem(type_2_, id_2_, kStatusOn));
- status_on.insert(ExternalConsentStatusItem(type_3_, id_3_, kStatusOn));
-
- EXPECT_CALL(listener_, OnPermissionsUpdated(device_id_1_, app_id_1_, _));
-
- EXPECT_TRUE(policy_manager_->SetExternalConsentStatus(status_on));
-
- // Checking ExternalConsent consents after setting new ExternalConsent status
- const ConsentGroups& external_consent_status =
- *updated_consent_records->second.external_consent_status_groups;
-
- ApplicationPolicies::const_iterator app_parameters =
- pt->policy_table.app_policies_section.apps.find(app_id_1_);
-
- EXPECT_TRUE(pt->policy_table.app_policies_section.apps.end() !=
- app_parameters);
-
- EXPECT_EQ(app_parameters->second.groups.size(),
- external_consent_status.size());
-
- ConsentGroups::const_iterator updated_group_1 =
- external_consent_status.find(group_name_1_);
-
- EXPECT_TRUE(external_consent_status.end() != updated_group_1);
-
- ConsentGroups::const_iterator updated_group_2 =
- external_consent_status.find(group_name_2_);
-
- EXPECT_TRUE(external_consent_status.end() != updated_group_2);
-
- EXPECT_EQ(Boolean(false), updated_group_1->second);
- EXPECT_EQ(Boolean(true), updated_group_2->second);
+ PolicyManagerImplTest,
+ ReactOnUserDevConsentForApp_AppPoliciesIsChanged_AppPermissionsNotChanged) {
+ transport_manager::DeviceHandle device_handle;
+ bool is_device_allowed = true;
+
+ ON_CALL(listener_,
+ OnCurrentDeviceIdUpdateRequired(device_handle, kValidAppId))
+ .WillByDefault(Return(kDeviceNumber));
+ ON_CALL(*cache_manager_, GetDeviceConsent(kDeviceNumber))
+ .WillByDefault(Return(kDeviceAllowed));
+ ON_CALL(*cache_manager_,
+ ReactOnUserDevConsentForApp(kValidAppId, is_device_allowed))
+ .WillByDefault(Return(true));
+
+ EXPECT_CALL(listener_,
+ SendOnAppPermissionsChanged(_, kDeviceNumber, kValidAppId))
+ .Times(0);
+ EXPECT_TRUE(policy_manager_->ReactOnUserDevConsentForApp(
+ device_handle, kValidAppId, is_device_allowed));
+}
- // Switching ExternalConsent status off
- ExternalConsentStatus status_off;
- status_off.insert(ExternalConsentStatusItem(type_1_, id_1_, kStatusOff));
- status_off.insert(ExternalConsentStatusItem(type_2_, id_2_, kStatusOff));
- status_off.insert(ExternalConsentStatusItem(type_3_, id_3_, kStatusOff));
+TEST_F(PolicyManagerImplTest,
+ GetInitialAppData_HandleNullPointers_ReturnFalse) {
+ EXPECT_FALSE(
+ policy_manager_->GetInitialAppData(kValidAppId, nullptr, nullptr));
+}
- EXPECT_CALL(listener_, OnPermissionsUpdated(device_id_1_, app_id_1_, _))
- .Times(1);
+TEST_F(PolicyManagerImplTest,
+ GetInitialAppData_HandleValidPointers_ReturnTrue) {
+ StringArray nicknames;
+ StringArray app_hmi_types;
+ ON_CALL(*cache_manager_,
+ GetInitialAppData(kValidAppId, nicknames, app_hmi_types))
+ .WillByDefault(Return(true));
+
+ EXPECT_TRUE(policy_manager_->GetInitialAppData(
+ kValidAppId, &nicknames, &app_hmi_types));
+}
- EXPECT_TRUE(policy_manager_->SetExternalConsentStatus(status_off));
+TEST_F(PolicyManagerImplTest,
+ GetAppPermissionsChanges_NoPermissionsChanges_GeneratePermissions) {
+ EXPECT_CALL(*cache_manager_,
+ CountUnconsentedGroups(kValidAppId, kDeviceNumber));
+ EXPECT_CALL(*cache_manager_, IsApplicationRevoked(kValidAppId));
+ EXPECT_CALL(*cache_manager_, GetPriority(kValidAppId, _));
- updated_group_1 = external_consent_status.find(group_name_1_);
+ policy_manager_->GetAppPermissionsChanges(kDeviceNumber, kValidAppId);
+}
- EXPECT_TRUE(external_consent_status.end() != updated_group_1);
+TEST_F(PolicyManagerImplTest, GetHMITypes_AppIsDefaultPolicy_ReturnFalse) {
+ std::vector<int> app_types;
+ EXPECT_CALL(*cache_manager_, IsDefaultPolicy(kValidAppId))
+ .WillOnce(Return(true));
- updated_group_2 = external_consent_status.find(group_name_2_);
+ EXPECT_FALSE(policy_manager_->GetHMITypes(kValidAppId, &app_types));
+}
- EXPECT_TRUE(external_consent_status.end() != updated_group_2);
+TEST_F(PolicyManagerImplTest, GetHMITypes_NoHmiTypes_ReturnFalse) {
+ std::vector<int> app_types;
+ EXPECT_CALL(*cache_manager_, GetHMITypes(kValidAppId))
+ .WillOnce(Return(nullptr));
+ EXPECT_FALSE(policy_manager_->GetHMITypes(kValidAppId, &app_types));
+}
- EXPECT_EQ(Boolean(true), updated_group_1->second);
- EXPECT_EQ(Boolean(false), updated_group_2->second);
+TEST_F(PolicyManagerImplTest, GetHMITypes_ValidHmiTypes_ReturnTrue) {
+ std::vector<int> app_types;
+ AppHMITypes hmi_types;
+ EXPECT_CALL(*cache_manager_, GetHMITypes(kValidAppId))
+ .WillOnce(Return(&hmi_types));
+ EXPECT_TRUE(policy_manager_->GetHMITypes(kValidAppId, &app_types));
}
} // namespace policy_test
diff --git a/src/components/policy/policy_external/test/policy_manager_impl_test_base.cc b/src/components/policy/policy_external/test/policy_manager_impl_test_base.cc
deleted file mode 100644
index 7c2d231708..0000000000
--- a/src/components/policy/policy_external/test/policy_manager_impl_test_base.cc
+++ /dev/null
@@ -1,970 +0,0 @@
-/*
- * Copyright (c) 2016, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <stdint.h>
-#include <fstream>
-#include <string>
-#include <vector>
-
-#include "policy/policy_manager_impl_test_base.h"
-
-#include "utils/file_system.h"
-
-#include "utils/gen_hash.h"
-#include "utils/jsoncpp_reader_wrapper.h"
-
-#include "policy/mock_pt_ext_representation.h"
-
-namespace test {
-namespace components {
-namespace policy_test {
-
-using ::testing::_;
-using ::testing::ContainerEq;
-using ::testing::Return;
-using ::testing::ReturnRef;
-
-// Help functions
-char GenRandomChar(char range_from, char range_to) {
- if (range_from > range_to) {
- std::swap(range_from, range_to);
- }
- const int range_size = range_to - range_from;
- return rand() % range_size + range_from;
-}
-
-struct StringsForUpdate CreateNewRandomData(StringsForUpdate& str) {
- // Generate random date
- srand(time(NULL));
- unsigned int day = 1 + rand() % 31; // Day from 1 - 31
- unsigned int month = 1 + rand() % 12; // Month from 1 - 12
- unsigned int year = 1985 + rand() % 31; // Year from 1985 - 2015
-
- // Convert date to string
- str.new_date_ = NumberToString(year) + '-' + NumberToString(month) + '-' +
- NumberToString(day);
-
- // Create new field
- unsigned int number = 1 + rand() % 100; // Number from 1 - 100
- str.new_field_name_ += NumberToString(number);
-
- for (unsigned int i = 0; i < 5; ++i) {
- str.new_field_value_ += GenRandomChar('A', 'Z');
- }
- return str;
-}
-
-void CheckIsParamInList(const ::policy::RPCParams& list,
- const std::string& parameter) {
- EXPECT_TRUE(std::find(list.begin(), list.end(), parameter) != list.end())
- << "Parameter not exists: " << parameter;
-}
-
-Json::Value createPTforLoad() {
- const std::string load_table(
- "{"
- "\"policy_table\": {"
- "\"module_config\": {"
- "\"exchange_after_x_ignition_cycles\": 10,"
- "\"exchange_after_x_kilometers\": 100,"
- "\"exchange_after_x_days\": 5,"
- "\"timeout_after_x_seconds\": 500,"
- "\"seconds_between_retries\": [10, 20, 30],"
- "\"endpoints\": {"
- "\"0x00\": {"
- "\"default\": [\"http://ford.com/cloud/default\"]"
- "}"
- "},"
- "\"notifications_per_minute_by_priority\": {"
- "\"EMERGENCY\": 1,"
- "\"NAVIGATION\": 2,"
- "\"VOICECOM\": 3,"
- "\"COMMUNICATION\": 4,"
- "\"NORMAL\": 5,"
- "\"NONE\": 6"
- "},"
- "\"vehicle_make\" : \"MakeT\","
- "\"vehicle_model\" : \"ModelT\","
- "\"vehicle_year\": \"2014\""
- "},"
- "\"app_policies\": {"
- "\"default\": {"
- "\"memory_kb\": 50,"
- "\"heart_beat_timeout_ms\": 100,"
- "\"groups\": [\"default\"],"
- "\"keep_context\": true,"
- "\"steal_focus\": true,"
- "\"priority\": \"EMERGENCY\","
- "\"default_hmi\": \"FULL\","
- "\"certificate\": \"sign\""
- "}, "
- "\"pre_DataConsent\": {"
- "\"memory_kb\": 50,"
- "\"heart_beat_timeout_ms\": 100,"
- "\"groups\": [\"default\"],"
- "\"keep_context\": true,"
- "\"steal_focus\": true,"
- "\"priority\": \"EMERGENCY\","
- "\"default_hmi\": \"FULL\","
- "\"certificate\": \"sign\""
- "}, "
- "\"device\": {"
- "\"memory_kb\": 50,"
- "\"heart_beat_timeout_ms\": 100,"
- "\"groups\": [\"default\"],"
- "\"keep_context\": true,"
- "\"steal_focus\": true,"
- "\"priority\": \"EMERGENCY\","
- "\"default_hmi\": \"FULL\","
- "\"certificate\": \"sign\""
- "},"
- "\"1234\": {"
- "\"memory_kb\": 50,"
- "\"heart_beat_timeout_ms\": 100,"
- "\"groups\": [\"default\"],"
- "\"keep_context\": true,"
- "\"steal_focus\": true,"
- "\"priority\": \"EMERGENCY\","
- "\"default_hmi\": \"FULL\","
- "\"certificate\": \"sign\""
- "}"
- "},"
- "\"consumer_friendly_messages\": {"
- "\"version\": \"1.2\""
- "},"
- "\"functional_groupings\": {"
- "\"default\": {"
- "\"rpcs\": {"
- "\"Update\": {"
- "\"hmi_levels\": [\"FULL\"],"
- "\"parameters\" : [\"speed\"]"
- "}"
- "}"
- "}"
- "}"
- "}"
- "}");
-
- Json::Value table(Json::objectValue);
- utils::JsonReader reader;
- EXPECT_TRUE(reader.parse(load_table, &table));
- return table;
-}
-
-void InsertRpcParametersInList(::policy::RPCParams& input_params) {
- input_params.insert("longitudeDegrees");
- input_params.insert("latitudeDegrees");
- input_params.insert("locationName");
- input_params.insert("locationDescription");
- input_params.insert("addressLines");
- input_params.insert("phoneNumber");
- input_params.insert("locationImage");
- input_params.insert("deliveryMode");
- input_params.insert("timeStamp");
- input_params.insert("address");
-}
-
-policy_table::AppHmiTypes HmiTypes(const policy_table::AppHMIType hmi_type) {
- policy_table::AppHmiTypes hmi_types;
- hmi_types.push_back(hmi_type);
- return hmi_types;
-}
-
-// PolicyManagerImplTest class methods
-PolicyManagerImplTest::PolicyManagerImplTest()
- : unpaired_device_id_("08-00-27-CE-76-FE")
- , policy_manager_(NULL)
- , cache_manager_(NULL) {}
-
-void PolicyManagerImplTest::SetUp() {
- policy_manager_ = new PolicyManagerImpl();
- cache_manager_ = new NiceMock<MockCacheManagerInterface>();
- policy_manager_->set_cache_manager(cache_manager_);
- policy_manager_->set_listener(&listener_);
-
- ON_CALL(*cache_manager_, GetExternalConsentStatus())
- .WillByDefault(Return(ExternalConsentStatus()));
- ON_CALL(*cache_manager_, GetGroupsWithSameEntities(_))
- .WillByDefault(Return(GroupsByExternalConsentStatus()));
- ON_CALL(*cache_manager_, GetKnownLinksFromPT())
- .WillByDefault(Return(std::map<std::string, std::string>()));
- ON_CALL(listener_, GetRegisteredLinks(_)).WillByDefault(Return());
- ON_CALL(listener_, ptu_retry_handler())
- .WillByDefault(ReturnRef(ptu_retry_handler_));
- Json::Value table = createPTforLoad();
- default_pt_snapshot_ = std::make_shared<policy_table::Table>(&table);
-}
-
-void PolicyManagerImplTest::TearDown() {
- delete policy_manager_;
-}
-
-::testing::AssertionResult PolicyManagerImplTest::IsValid(
- const policy_table::Table& table) {
- if (table.is_valid()) {
- return ::testing::AssertionSuccess();
- } else {
- ::rpc::ValidationReport report(" - table");
- table.ReportErrors(&report);
- return ::testing::AssertionFailure() << ::rpc::PrettyFormat(report);
- }
-}
-
-// PolicyManagerImplTest2 class methods
-PolicyManagerImplTest2::PolicyManagerImplTest2()
- : app_id_1_("123456789")
- , app_id_2_("1010101010")
- , app_id_3_("123454321")
- , device_id_1_("XXX123456789ZZZ")
- , device_id_2_("08-00-27-CE-76-FE")
- , application_id_("1234")
- , app_storage_folder_("storage_PolicyManagerImplTest2")
- , preloaded_pt_filename_(kSdlPreloadedPtJson)
- , in_memory_(true)
- , policy_manager_(NULL)
- , ptu_request_types_size_(0u)
- , index_(0u)
- , ptu_request_types_(Json::arrayValue) {}
-
-void PolicyManagerImplTest2::SetUp() {
- ON_CALL(listener_, GetRegisteredLinks(_)).WillByDefault(Return());
- ON_CALL(listener_, ptu_retry_handler())
- .WillByDefault(ReturnRef(ptu_retry_handler_));
- ON_CALL(listener_, GetDevicesIds(_))
- .WillByDefault(Return(transport_manager::DeviceList()));
-
- file_system::CreateDirectory(app_storage_folder_);
-
- policy_manager_ = new PolicyManagerImpl(in_memory_);
- ON_CALL(policy_settings_, app_storage_folder())
- .WillByDefault(ReturnRef(app_storage_folder_));
- policy_manager_->set_listener(&listener_);
- const char* levels[] = {"FULL", "LIMITED", "BACKGROUND", "NONE"};
- hmi_level_.assign(levels, levels + sizeof(levels) / sizeof(levels[0]));
- srand(time(NULL));
- index_ = rand() % 3;
-}
-
-::policy::StringArray PolicyManagerImplTest2::JsonToVectorString(
- const Json::Value& PTU_request_types) {
- ::policy::StringArray result;
- for (uint32_t i = 0; i < PTU_request_types.size(); ++i) {
- result.push_back(PTU_request_types[i].asString());
- }
- return result;
-}
-
-const Json::Value PolicyManagerImplTest2::GetPTU(const std::string& file_name) {
- // Get PTU
- std::ifstream ifile(file_name);
- Json::CharReaderBuilder reader_builder;
- std::string json;
- Json::Value root(Json::objectValue);
- if (ifile.is_open() &&
- Json::parseFromStream(reader_builder, ifile, &root, nullptr)) {
- json = root.toStyledString();
- }
- ifile.close();
- ::policy::BinaryMessage msg(json.begin(), json.end());
- // Load Json to cache
- EXPECT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- policy_manager_->LoadPT(kFilePtUpdateJson, msg));
- policy_manager_->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
- EXPECT_FALSE(policy_manager_->GetCache()->IsPTPreloaded());
- return root;
-}
-
-void PolicyManagerImplTest2::CreateLocalPT(const std::string& file_name) {
- file_system::remove_directory_content(app_storage_folder_);
- ON_CALL(policy_settings_, app_storage_folder())
- .WillByDefault(ReturnRef(app_storage_folder_));
- ASSERT_TRUE(policy_manager_->InitPT(file_name, &policy_settings_));
- EXPECT_TRUE(policy_manager_->GetCache()->IsPTPreloaded());
-}
-
-void PolicyManagerImplTest2::AddRTtoPT(const std::string& update_file_name,
- const std::string& section_name,
- const uint32_t rt_number,
- const uint32_t invalid_rt_number) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- // Get RequestTypes from section of preloaded_pt app_policies
- const transport_manager::DeviceHandle handle = 1;
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(handle, section_name))
- .WillRepeatedly(Return(device_id_1_));
- pt_request_types_ = policy_manager_->GetAppRequestTypes(handle, section_name);
- EXPECT_EQ(rt_number, pt_request_types_.size());
- Json::Value root = GetPTU(update_file_name);
- // Get Request Types from JSON (PTU)
- ptu_request_types_ =
- root["policy_table"]["app_policies"][section_name]["RequestType"];
- ptu_request_types_size_ = ptu_request_types_.size();
- pt_request_types_.clear();
- // Get RequestTypes from section of PT app policies after update
- pt_request_types_ = policy_manager_->GetAppRequestTypes(handle, section_name);
- // Check number of RT in PTU and PT now are equal
- ASSERT_EQ(ptu_request_types_size_ - invalid_rt_number,
- pt_request_types_.size());
-}
-
-void PolicyManagerImplTest2::AddRTtoAppSectionPT(
- const std::string& update_file_name,
- const std::string& section_name,
- const uint32_t rt_number,
- const uint32_t invalid_rt_number) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- const transport_manager::DeviceHandle handle = 1;
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(handle, section_name))
- .WillRepeatedly(Return(device_id_1_));
- // Add app
- policy_manager_->AddApplication(
- device_id_1_, section_name, HmiTypes(policy_table::AHT_DEFAULT));
- // Check app gets RequestTypes from pre_DataConsent of app_policies
- // section
- pt_request_types_ = policy_manager_->GetAppRequestTypes(handle, section_name);
- EXPECT_EQ(rt_number, pt_request_types_.size());
- EXPECT_CALL(listener_, OnPendingPermissionChange(_, section_name)).Times(1);
- Json::Value root = GetPTU(update_file_name);
-
- // Get App Request Types from PTU
- ptu_request_types_ =
- root["policy_table"]["app_policies"][section_name]["RequestType"];
- ptu_request_types_size_ = ptu_request_types_.size();
-
- pt_request_types_.clear();
- // Get RequestTypes from <app_id> section of app policies after PT update
- pt_request_types_ = policy_manager_->GetAppRequestTypes(handle, section_name);
- // Check sizes of Request types of PT and PTU
- ASSERT_EQ(ptu_request_types_size_ - invalid_rt_number,
- pt_request_types_.size());
-
- ::policy::AppPermissions permissions =
- policy_manager_->GetAppPermissionsChanges(device_id_1_, section_name);
- EXPECT_TRUE(permissions.requestTypeChanged);
-}
-
-std::vector<policy_table::RequestType>
-PolicyManagerImplTest2::PushRequestTypesToContainer(
- const ::policy::StringArray& temp_result) {
- policy_table::RequestType filtered_result;
- std::vector<policy_table::RequestType> final_result;
- for (size_t i = 0; i < temp_result.size(); ++i) {
- if (policy_table::EnumFromJsonString(temp_result[i], &filtered_result)) {
- final_result.push_back(filtered_result);
- }
- }
- return final_result;
-}
-
-void PolicyManagerImplTest2::CheckResultForValidRT() {
- // Convert Json Array to ::policy::StringArray
- const ::policy::StringArray& result = JsonToVectorString(ptu_request_types_);
- // Checks
- SortAndCheckEquality(pt_request_types_, result);
-}
-
-void PolicyManagerImplTest2::CheckResultForInvalidRT() {
- // Convert Json Array to ::policy::StringArray
- const ::policy::StringArray& temp_result =
- JsonToVectorString(ptu_request_types_);
- const std::vector<policy_table::RequestType>& result1 =
- PushRequestTypesToContainer(temp_result);
- const std::vector<policy_table::RequestType>& result2 =
- PushRequestTypesToContainer(pt_request_types_);
- // Checks
- SortAndCheckEquality(result1, result2);
-}
-
-void PolicyManagerImplTest2::FillMultimapFromFunctionalGroupings(
- UserConsentPromptToRpcsConnections& input_multimap,
- policy_table::FunctionalGroupings& fg_table) {
- policy_table::FunctionalGroupings::iterator fg_itter = fg_table.begin();
- const policy_table::FunctionalGroupings::iterator fg_itter_end =
- fg_table.end();
- for (; fg_itter != fg_itter_end; ++fg_itter) {
- // RPCS getting
- policy_table::Rpcs& rpcs_ref = fg_itter->second;
- // User_consent_prompt getting
- rpc::Optional<rpc::String<1, 255> >& optional_ref =
- rpcs_ref.user_consent_prompt;
- rpc::String<1, 255>& ucp_string = *optional_ref;
- const std::string& ucp_std_string =
- static_cast<const std::string&>(ucp_string);
- // Multimap inserting
- input_multimap.insert(
- std::pair<std::string, policy_table::Rpcs&>(ucp_std_string, rpcs_ref));
- }
-}
-
-void PolicyManagerImplTest2::GetFunctionalGroupingsFromManager(
- policy_table::FunctionalGroupings& input_functional_groupings) {
- // Get cache
- ::policy::CacheManagerInterfaceSPtr cache = policy_manager_->GetCache();
- // Get table_snapshot
- std::shared_ptr<policy_table::Table> table = cache->GenerateSnapshot();
- // Set functional groupings from policy table
- input_functional_groupings = table->policy_table.functional_groupings;
-}
-
-void PolicyManagerImplTest2::TearDown() {
- delete policy_manager_;
- file_system::RemoveDirectory(app_storage_folder_, true);
-}
-
-void PolicyManagerImplTest2::ResetOutputList(
- ::policy::CheckPermissionResult& output) {
- // Reset output
- output.hmi_level_permitted = ::policy::kRpcDisallowed;
- output.list_of_allowed_params.clear();
- output.list_of_disallowed_params.clear();
- output.list_of_undefined_params.clear();
-}
-// To avoid duplicate test with different json files
-void PolicyManagerImplTest2::
- CheckPermissions_AllParamsAllowed_CheckRpcsInDiffLvls(
- const std::string& update_file) {
- // Arrange
- CreateLocalPT("json/sdl_preloaded_pt_send_location.json");
- policy_manager_->AddDevice(device_id_1_, "Bluetooth");
- policy::CacheManagerInterfaceSPtr cache = policy_manager_->GetCache();
- ASSERT_TRUE(cache->SetDeviceData(device_id_1_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
-
- EXPECT_CALL(listener_, GetDevicesIds(application_id_))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
-
- // Add app from consented device. App will be assigned with default policies
- policy_manager_->SetUserConsentForDevice(device_id_1_, true);
- policy_manager_->AddApplication(
- device_id_1_, application_id_, HmiTypes(policy_table::AHT_DEFAULT));
-
- // Expect all parameters are allowed
- std::ifstream ifile(update_file);
- Json::CharReaderBuilder reader_builder;
- std::string json;
- Json::Value root(Json::objectValue);
- if (ifile.is_open()) {
- Json::parseFromStream(reader_builder, ifile, &root, nullptr);
- }
- json = root.toStyledString();
- ifile.close();
- ::policy::BinaryMessage msg(json.begin(), json.end());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- policy_manager_->LoadPT(kFilePtUpdateJson, msg));
- policy_manager_->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-
- EXPECT_FALSE(cache->IsPTPreloaded());
-
- // Check RPC in each level
- ::policy::RPCParams input_params;
- InsertRpcParametersInList(input_params);
-
- ::policy::CheckPermissionResult output;
- // Rpc in FULL level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelFull,
- "SendLocation",
- input_params,
- output);
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- // Check list of allowed parameters is not empty
- EXPECT_FALSE(output.list_of_allowed_params.empty());
- EXPECT_EQ(10u, output.list_of_allowed_params.size());
- EXPECT_TRUE(output.list_of_disallowed_params.empty());
- ResetOutputList(output);
-
- // Rpc in LIMITED level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelLimited,
- "SendLocation",
- input_params,
- output);
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- // Check list of allowed parameters is not empty
- EXPECT_FALSE(output.list_of_allowed_params.empty());
- EXPECT_EQ(10u, output.list_of_allowed_params.size());
- EXPECT_TRUE(output.list_of_disallowed_params.empty());
- ResetOutputList(output);
-
- // Rpc in BACKGROUND level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelBackground,
- "SendLocation",
- input_params,
- output);
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- // Check list of allowed parameters is not empty
- EXPECT_FALSE(output.list_of_allowed_params.empty());
- EXPECT_EQ(10u, output.list_of_allowed_params.size());
- EXPECT_TRUE(output.list_of_disallowed_params.empty());
- // Reset output
- ResetOutputList(output);
-
- // Rpc in NONE level
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelNone,
- "SendLocation",
- input_params,
- output);
- // Check RPC is disallowed
- EXPECT_EQ(::policy::kRpcDisallowed, output.hmi_level_permitted);
- // Check lists of parameters are empty
- EXPECT_TRUE(output.list_of_allowed_params.empty());
- EXPECT_TRUE(output.list_of_disallowed_params.empty());
- EXPECT_TRUE(output.list_of_undefined_params.empty());
-}
-
-void PolicyManagerImplTest2::CheckRpcPermissions(
- const std::string& rpc_name, const PermitResult& expected_permission) {
- ::policy::RPCParams input_params;
- ::policy::CheckPermissionResult output;
- policy_manager_->CheckPermissions(device_id_1_,
- application_id_,
- kHmiLevelFull,
- rpc_name,
- input_params,
- output);
- EXPECT_EQ(expected_permission, output.hmi_level_permitted);
-}
-
-void PolicyManagerImplTest2::CheckRpcPermissions(
- const std::string& app_id,
- const std::string& rpc_name,
- const policy::PermitResult& out_expected_permission) {
- ::policy::RPCParams input_params;
- ::policy::CheckPermissionResult output;
- policy_manager_->CheckPermissions(
- device_id_1_, app_id, kHmiLevelFull, rpc_name, input_params, output);
- EXPECT_EQ(out_expected_permission, output.hmi_level_permitted);
-}
-
-void PolicyManagerImplTest2::EmulatePTAppRevoked(const std::string& ptu_name) {
- std::ifstream ifile(ptu_name);
- Json::CharReaderBuilder reader_builder;
- std::string json;
- Json::Value root(Json::objectValue);
- if (ifile.is_open() &&
- Json::parseFromStream(reader_builder, ifile, &root, nullptr)) {
- // Emulate application is revoked
- root["policy_table"]["app_policies"]["1234"]["is_revoked"] = 1;
- json = root.toStyledString();
- }
- ifile.close();
-
- ::policy::BinaryMessage msg(json.begin(), json.end());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- policy_manager_->LoadPT(kDummyUpdateFileName, msg));
- policy_manager_->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-}
-
-// To avoid duplicate arrange of test
-void PolicyManagerImplTest2::AddSetDeviceData() {
- CreateLocalPT("json/sdl_preloaded_pt_send_location.json");
- policy_manager_->AddDevice(device_id_1_, "Bluetooth");
- ASSERT_TRUE((policy_manager_->GetCache())
- ->SetDeviceData(device_id_1_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
-
- // Add app from consented device. App will be assigned with default policies
- policy_manager_->SetUserConsentForDevice(device_id_1_, true);
- policy_manager_->AddApplication(
- device_id_1_, application_id_, HmiTypes(policy_table::AHT_DEFAULT));
- (policy_manager_->GetCache())->AddDevice(device_id_1_, "Bluetooth");
-}
-
-// Load Json File and set it as PTU
-void PolicyManagerImplTest2::LoadPTUFromJsonFile(
- const std::string& update_file) {
- // Load Json to cache
- std::ifstream ifile(update_file);
- Json::CharReaderBuilder reader_builder;
- std::string json;
- Json::Value root(Json::objectValue);
- if (ifile.is_open()) {
- Json::parseFromStream(reader_builder, ifile, &root, nullptr);
- }
- json = root.toStyledString();
- ifile.close();
- ::policy::BinaryMessage msg(json.begin(), json.end());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- policy_manager_->LoadPT(kFilePtUpdateJson, msg));
- policy_manager_->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-
- EXPECT_FALSE(policy_manager_->GetCache()->IsPTPreloaded());
-}
-
-// PolicyManagerImplTest_RequestTypes class methods
-PolicyManagerImplTest_RequestTypes::PolicyManagerImplTest_RequestTypes()
- : kJsonFiles{"json/PTU_with_one_invalid_requestType.json",
- "json/PTU_with_invalid_requestType_between_correct.json",
- "json/PTU_without_requestType_field.json",
- "json/PTU_with_empty_requestType_array.json",
- "json/preloadedPT_with_invalid_default_requestType.json",
- "json/preloadedPT_with_several_invalid_default_requestTypes."
- "json",
- "json/"
- "preloadedPT_with_invalid_default_reqestType_between_valid."
- "json",
- "json/PTU_default_app.json",
- "json/"
- "PTU_default_app_app_invalid_values_RequestType_array.json",
- "json/PTU_default_app_empty_RequestType_array.json",
- "json/PTU_default_app_omitted_RequestType_array.json",
- "json/"
- "PTU_default_app_one_invalid_value_RequestType_array.json",
- "json/PTU_pre_data_consent_app.json",
- "json/"
- "PTU_pre_data_consent_app_invalid_values_RequestType_array."
- "json",
- "json/PTU_pre_data_consent_app_empty_RequestType_array.json",
- "json/"
- "PTU_pre_data_consent_app_omitted_RequestType_array.json",
- "json/"
- "PTU_pre_data_consent_app_one_invalid_value_RequestType_"
- "array."
- "json"}
- , kAppId("1010101010")
- , kDefaultAppId(policy::kDefaultId)
- , app_storage_folder_("storage3")
- , preloaded_pt_filename_(kSdlPreloadedPtJson) {}
-
-void PolicyManagerImplTest_RequestTypes::SetUp() {
- ON_CALL(listener_, GetRegisteredLinks(_)).WillByDefault(Return());
- ON_CALL(listener_, GetDevicesIds(_))
- .WillByDefault(Return(transport_manager::DeviceList()));
-
- file_system::CreateDirectory(app_storage_folder_);
- const bool in_memory = true;
- policy_manager_impl_sptr_ = std::make_shared<PolicyManagerImpl>(in_memory);
- policy_manager_impl_sptr_->set_listener(&listener_);
-}
-
-const Json::Value PolicyManagerImplTest_RequestTypes::GetPTU(
- const std::string& file_name) {
- // Get PTU
- std::ifstream ifile(file_name);
- Json::CharReaderBuilder reader_builder;
- std::string json;
- Json::Value root(Json::objectValue);
- if (ifile.is_open() &&
- Json::parseFromStream(reader_builder, ifile, &root, nullptr)) {
- json = root.toStyledString();
- }
- ifile.close();
- ::policy::BinaryMessage msg(json.begin(), json.end());
- // Load Json to cache
- EXPECT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- policy_manager_impl_sptr_->LoadPT(kFilePtUpdateJson, msg));
- policy_manager_impl_sptr_->OnPTUFinished(
- PolicyManager::PtProcessingResult::kSuccess);
-
- EXPECT_FALSE(policy_manager_impl_sptr_->GetCache()->IsPTPreloaded());
- return root;
-}
-
-void PolicyManagerImplTest_RequestTypes::RefreshPT(
- const std::string& preloaded_pt_file, const std::string& update_pt_file) {
- ON_CALL(policy_settings_, app_storage_folder())
- .WillByDefault(ReturnRef(app_storage_folder_));
- ASSERT_TRUE(
- policy_manager_impl_sptr_->InitPT(preloaded_pt_file, &policy_settings_))
- << "can`t load preloaded file";
- EXPECT_TRUE(policy_manager_impl_sptr_->GetCache()->IsPTPreloaded());
- GetPTU(update_pt_file);
-}
-
-PolicyTableSPtr PolicyManagerImplTest_RequestTypes::GetPolicyTableSnapshot() {
- // Get cache
- ::policy::CacheManagerInterfaceSPtr cache =
- policy_manager_impl_sptr_->GetCache();
- // Get and return table_snapshot
- return cache->GenerateSnapshot();
-}
-
-policy_table::RequestTypes
-PolicyManagerImplTest_RequestTypes::GetRequestTypesForApplication(
- const std::string& app_id) {
- // Get table_snapshot
- PolicyTableSPtr table = GetPolicyTableSnapshot();
- // Get request types
- policy_table::PolicyTable& pt = table->policy_table;
- policy_table::ApplicationPolicies& app_policies =
- pt.app_policies_section.apps;
- policy_table::ApplicationPolicies::const_iterator app_iter =
- app_policies.find(app_id);
-
- return *(app_iter->second.RequestType);
-}
-
-void PolicyManagerImplTest_RequestTypes::CompareAppRequestTypesWithDefault(
- const std::string& app_id, const std::string& ptu_file) {
- // Refresh policy table with invalid RequestType in application
- RefreshPT(preloaded_pt_filename_, ptu_file);
-
- // Get <app_id> RequestType array
- policy_table::RequestTypes app_request_types =
- GetRequestTypesForApplication(app_id);
- // Get "default" RequestType array
- policy_table::RequestTypes default_request_types =
- GetRequestTypesForApplication(policy::kDefaultId);
-
- // Expect
- const size_t app_requests_size = app_request_types.size();
- const size_t default_requests_size = default_request_types.size();
- ASSERT_EQ(default_requests_size, app_requests_size);
- EXPECT_THAT(default_request_types, ContainerEq(app_request_types));
-}
-
-policy_table::RequestTypes
-PolicyManagerImplTest_RequestTypes::CreateDefaultAppPTURequestValues() {
- policy_table::RequestTypes request_types;
- request_types.push_back(policy_table::RequestType::RT_QUERY_APPS);
- request_types.push_back(policy_table::RequestType::RT_LAUNCH_APP);
- request_types.push_back(policy_table::RequestType::RT_PROPRIETARY);
- request_types.push_back(policy_table::RequestType::RT_LOCK_SCREEN_ICON_URL);
- return request_types;
-}
-
-policy_table::RequestTypes
-PolicyManagerImplTest_RequestTypes::CreateDefaultAppDatabaseRequestValues() {
- policy_table::RequestTypes request_types;
- request_types.push_back(policy_table::RequestType::RT_QUERY_APPS);
- request_types.push_back(policy_table::RequestType::RT_LAUNCH_APP);
- request_types.push_back(policy_table::RequestType::RT_PROPRIETARY);
- return request_types;
-}
-
-policy_table::RequestTypes
-PolicyManagerImplTest_RequestTypes::CreatePreDataConsentAppPTURequestValues() {
- policy_table::RequestTypes request_types;
- request_types.push_back(policy_table::RequestType::RT_FILE_RESUME);
- request_types.push_back(policy_table::RequestType::RT_AUTH_REQUEST);
- request_types.push_back(policy_table::RequestType::RT_AUTH_CHALLENGE);
- request_types.push_back(policy_table::RequestType::RT_AUTH_ACK);
- return request_types;
-}
-
-void PolicyManagerImplTest_RequestTypes::CompareRequestTypesContainers(
- const policy_table::RequestTypes& expected_data,
- const policy_table::RequestTypes& received_data) {
- const size_t received_size = received_data.size();
- const size_t expected_size = expected_data.size();
- ASSERT_EQ(expected_size, received_size);
- EXPECT_THAT(expected_data, ContainerEq(received_data));
-}
-
-void PolicyManagerImplTest_RequestTypes::TearDown() {
- file_system::RemoveDirectory(app_storage_folder_, true);
-}
-
-void PolicyManagerImplTest_ExternalConsent::
- PreconditionExternalConsentPreparePTWithAppGroupsAndConsents() {
- using namespace policy_table;
- using namespace rpc;
-
- CreateLocalPT(preloaded_pt_filename_);
- Table t = PreparePTWithGroupsHavingExternalConsent();
-
- ApplicationParams app_params;
- app_params.groups.push_back(group_name_1_);
- app_params.groups.push_back(group_name_2_);
-
- t.policy_table.app_policies_section.apps.insert(
- std::make_pair(app_id_1_, app_params));
-
- EXPECT_TRUE(policy_manager_->GetCache()->ApplyUpdate(t));
-
- // User allows first group and disallows second group. Third is kept
- // untouched.
- PermissionConsent permissions;
- permissions.device_id = device_id_1_;
- permissions.policy_app_id = app_id_1_;
-
- FunctionalGroupPermission group_permissions_1;
- group_permissions_1.group_name = group_name_1_;
- group_permissions_1.group_alias = group_name_1_;
- group_permissions_1.group_id = utils::Djb2HashFromString(group_name_1_);
- group_permissions_1.state = kGroupAllowed;
-
- FunctionalGroupPermission group_permissions_2;
- group_permissions_2.group_name = group_name_2_;
- group_permissions_2.group_alias = group_name_2_;
- group_permissions_2.group_id = utils::Djb2HashFromString(group_name_2_);
- group_permissions_2.state = kGroupDisallowed;
-
- permissions.group_permissions.push_back(group_permissions_1);
- permissions.group_permissions.push_back(group_permissions_2);
-
- policy_manager_->SetUserConsentForApp(permissions,
- policy::PolicyManager::kSilentMode);
-}
-
-void PolicyManagerImplTest_ExternalConsent::
- PreconditionExternalConsentPreparePTWithAppPolicy() {
- using namespace policy_table;
- using namespace rpc;
-
- // PT has 3 functional groups with some entities in
- // disallowed_by_external_consent_entities_on/off. Groups consents can be
- // changed.
- CreateLocalPT(preloaded_pt_filename_);
- Table t = PreparePTWithGroupsHavingExternalConsent();
-
- ApplicationParams app_params;
- app_params.groups.push_back(group_name_1_);
- app_params.groups.push_back(group_name_2_);
-
- t.policy_table.app_policies_section.apps.insert(
- std::make_pair(app_id_1_, app_params));
-
- EXPECT_TRUE(policy_manager_->GetCache()->ApplyUpdate(t));
-}
-
-rpc::policy_table_interface_base::Table PolicyManagerImplTest_ExternalConsent::
- PreparePTWithGroupsHavingExternalConsent() {
- using namespace policy_table;
- using namespace rpc;
-
- // PT has 3 functional groups with some entities in
- // disallowed_by_external_consent_entities_on/off. Groups consents can be
- // changed.
-
- ExternalConsentEntity entity_1(type_1_, id_1_);
- ExternalConsentEntity entity_2(type_2_, id_2_);
- ExternalConsentEntity entity_3(type_3_, id_3_);
-
- Rpcs rpcs_1;
- rpcs_1.disallowed_by_external_consent_entities_on->push_back(entity_1);
- *rpcs_1.user_consent_prompt = group_name_1_;
- rpcs_1.rpcs.set_to_null();
-
- Rpcs rpcs_2;
- rpcs_2.disallowed_by_external_consent_entities_off->push_back(entity_2);
- *rpcs_2.user_consent_prompt = group_name_2_;
- rpcs_2.rpcs.set_to_null();
-
- Rpcs rpcs_3;
- rpcs_3.disallowed_by_external_consent_entities_on->push_back(entity_3);
- *rpcs_3.user_consent_prompt = group_name_3_;
- rpcs_3.rpcs.set_to_null();
-
- Table t;
- t.policy_table.functional_groupings.insert(
- std::make_pair(group_name_1_, rpcs_1));
- t.policy_table.functional_groupings.insert(
- std::make_pair(group_name_2_, rpcs_2));
- t.policy_table.functional_groupings.insert(
- std::make_pair(group_name_3_, rpcs_3));
-
- return t;
-}
-
-std::string PolicyManagerImplTest_ExternalConsent::PreparePTUWithNewGroup(
- const uint32_t type, const uint32_t id, const std::string& group_name) {
- using namespace policy_table;
- using namespace rpc;
-
- std::ifstream ifile(preloaded_pt_filename_);
- Json::CharReaderBuilder reader_builder;
- std::string json;
- Json::Value root(Json::objectValue);
- if (ifile.is_open() &&
- Json::parseFromStream(reader_builder, ifile, &root, nullptr)) {
- Table t = PreparePTWithGroupsHavingExternalConsent();
-
- ExternalConsentEntity entity_4(type, id);
-
- Rpcs rpcs_4;
- rpcs_4.disallowed_by_external_consent_entities_on->push_back(entity_4);
- *rpcs_4.user_consent_prompt = group_name;
- rpcs_4.rpcs.set_to_null();
-
- t.policy_table.functional_groupings.insert(
- std::make_pair(group_name, rpcs_4));
-
- ApplicationParams app_params;
- app_params.groups.push_back(group_name_1_);
- app_params.groups.push_back(group_name_2_);
- app_params.groups.push_back(group_name);
- app_params.keep_context = Boolean(true);
- app_params.steal_focus = Boolean(true);
- app_params.default_hmi = HL_FULL;
- app_params.priority = P_EMERGENCY;
-
- t.policy_table.app_policies_section.apps.insert(
- std::make_pair(app_id_1_, app_params));
-
- const Json::Value overriden_table = t.ToJsonValue();
-
- const std::string policy_table_key = "policy_table";
- const std::string functional_groupings_key = "functional_groupings";
- const std::string app_policies_key = "app_policies";
-
- root[policy_table_key][functional_groupings_key] =
- overriden_table[policy_table_key][functional_groupings_key];
-
- root[policy_table_key][app_policies_key][app_id_1_] =
- overriden_table[policy_table_key][app_policies_key][app_id_1_];
-
- root[policy_table_key]["module_config"].removeMember("preloaded_pt");
- root[policy_table_key]["module_config"].removeMember("preloaded_date");
-
- json = root.toStyledString();
- }
- ifile.close();
-
- return json;
-}
-
-} // namespace policy_test
-} // namespace components
-} // namespace test
diff --git a/src/components/policy/policy_external/test/policy_manager_impl_user_consent_test.cc b/src/components/policy/policy_external/test/policy_manager_impl_user_consent_test.cc
deleted file mode 100644
index 1db23260a8..0000000000
--- a/src/components/policy/policy_external/test/policy_manager_impl_user_consent_test.cc
+++ /dev/null
@@ -1,691 +0,0 @@
-/*
- * Copyright (c) 2016, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "gtest/gtest.h"
-
-#include "policy/policy_manager_impl_test_base.h"
-#include "utils/date_time.h"
-#include "utils/macro.h"
-
-namespace test {
-namespace components {
-namespace policy_test {
-
-using ::testing::_;
-using ::testing::Return;
-
-// Tests that use device without Consent
-TEST_F(
- PolicyManagerImplTest2,
- AddApplication_AddNewApplicationFromDeviceWithConsent_ExpectUpdateRequired) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
-
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(_, app_id_1_))
- .WillRepeatedly(Return(device_id_1_));
-
- EXPECT_CALL(listener_, CanUpdate()).WillRepeatedly(Return(true));
-
- policy_manager_->SetUserConsentForDevice(device_id_1_, true);
-
- policy_manager_->AddApplication(
- device_id_1_, app_id_1_, HmiTypes(policy_table::AHT_DEFAULT));
-
- EXPECT_EQ("UPDATE_NEEDED", policy_manager_->GetPolicyTableStatus());
-}
-
-TEST_F(
- PolicyManagerImplTest2,
- AddApplication_AddNewApplicationFromDeviceWithoutConsent_ExpectUpToDate) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
-
- // To set UP_TO_DATE before registration
- GetPTU(kValidSdlPtUpdateJson);
-
- const date_time::TimeDuration current_time = date_time::getCurrentTime();
- const int kSecondsInDay = 60 * 60 * 24;
- const int days_after_epoch = date_time::getSecs(current_time) / kSecondsInDay;
-
- policy_manager_->PTUpdatedAt(DAYS_AFTER_EPOCH, days_after_epoch);
- policy_manager_->PTUpdatedAt(KILOMETERS, 1000);
-
- const transport_manager::DeviceHandle handle = 1;
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(handle, app_id_1_))
- .WillRepeatedly(Return(device_id_1_));
-
- policy_manager_->SetUserConsentForDevice(device_id_1_, false);
-
- policy_manager_->AddApplication(
- device_id_1_, app_id_1_, HmiTypes(policy_table::AHT_DEFAULT));
-
- EXPECT_EQ("UP_TO_DATE", policy_manager_->GetPolicyTableStatus());
-}
-
-TEST_F(
- PolicyManagerImplTest2,
- ReactOnUserDevConsentForApp_AddNewApplicationFromDeviceWithoutConsent_ExpectPreDataConsent) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- const transport_manager::DeviceHandle handle = 1;
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(handle, app_id_1_))
- .WillRepeatedly(Return(device_id_1_));
- policy_manager_->AddApplication(
- device_id_1_, app_id_1_, HmiTypes(policy_table::AHT_DEFAULT));
- ASSERT_TRUE(policy_manager_->IsPredataPolicy(app_id_1_));
- policy_manager_->ReactOnUserDevConsentForApp(handle, app_id_1_, false);
- EXPECT_TRUE(policy_manager_->IsPredataPolicy(app_id_1_));
-}
-
-// Related to manual test APPLINK-18768
-TEST_F(PolicyManagerImplTest2,
- CheckPreDataConsent_AppRegistered_ExpectReceivedRpcPermissionCorrect) {
- // Arrange
- CreateLocalPT(kSdlPreloadedPtJson2);
- ASSERT_TRUE(
- (policy_manager_->GetCache())->AddDevice(device_id_2_, "Bluetooth"));
- policy_manager_->AddApplication(
- device_id_2_, application_id_, HmiTypes(policy_table::AHT_DEFAULT));
-
- // Expect RPCs from pre_dataConsent group are allowed
- // Next checks are equal to BaseBeforeDataConsent_APIs.xml checks from task
- CheckRpcPermissions("ListFiles", ::policy::kRpcAllowed);
- CheckRpcPermissions("PutFile", ::policy::kRpcAllowed);
- CheckRpcPermissions("SetAppIcon", ::policy::kRpcAllowed);
- CheckRpcPermissions("SetGlobalProperties", ::policy::kRpcAllowed);
- CheckRpcPermissions("ResetGlobalProperties", ::policy::kRpcAllowed);
- CheckRpcPermissions("SetDisplayLayout", ::policy::kRpcAllowed);
- CheckRpcPermissions("ListFiles", ::policy::kRpcAllowed);
- CheckRpcPermissions("DeleteFile", ::policy::kRpcAllowed);
-
- // Next checks are equal to NonBaseBeforeDataConsent_APIs.xml checks from task
- CheckRpcPermissions("AddSubMenu", ::policy::kRpcDisallowed);
- CheckRpcPermissions("AddCommand", ::policy::kRpcDisallowed);
- CheckRpcPermissions("DeleteCommand", ::policy::kRpcDisallowed);
- CheckRpcPermissions("DeleteSubMenu", ::policy::kRpcDisallowed);
- CheckRpcPermissions("CreateInteractionChoiceSet", ::policy::kRpcDisallowed);
- CheckRpcPermissions("PerformInteraction", ::policy::kRpcDisallowed);
- CheckRpcPermissions("DeleteInteractionChoiceSet", ::policy::kRpcDisallowed);
- CheckRpcPermissions("Alert", ::policy::kRpcDisallowed);
- CheckRpcPermissions("Show", ::policy::kRpcDisallowed);
- CheckRpcPermissions("Speak", ::policy::kRpcDisallowed);
- CheckRpcPermissions("SetMediaClockTimer", ::policy::kRpcDisallowed);
- CheckRpcPermissions("SubscribeButton", ::policy::kRpcDisallowed);
- CheckRpcPermissions("UnsubscribeButton", ::policy::kRpcDisallowed);
- CheckRpcPermissions("PerformAudioPassThru", ::policy::kRpcDisallowed);
- CheckRpcPermissions("EndAudioPassThru", ::policy::kRpcDisallowed);
- CheckRpcPermissions("SubscribeVehicleData", ::policy::kRpcDisallowed);
- CheckRpcPermissions("UnsubscribeVehicleData", ::policy::kRpcDisallowed);
- CheckRpcPermissions("GetVehicleData", ::policy::kRpcDisallowed);
- CheckRpcPermissions("ReadDID", ::policy::kRpcDisallowed);
- CheckRpcPermissions("GetDTCs", ::policy::kRpcDisallowed);
- CheckRpcPermissions("ScrollableMessage", ::policy::kRpcDisallowed);
- CheckRpcPermissions("Slider", ::policy::kRpcDisallowed);
- CheckRpcPermissions("ShowConstantTBT", ::policy::kRpcDisallowed);
- CheckRpcPermissions("AlertManeuver", ::policy::kRpcDisallowed);
- CheckRpcPermissions("UpdateTurnList", ::policy::kRpcDisallowed);
- CheckRpcPermissions("SendLocation", ::policy::kRpcDisallowed);
- CheckRpcPermissions("GenericRequest", ::policy::kRpcDisallowed);
- CheckRpcPermissions("DialNumber", ::policy::kRpcDisallowed);
-}
-
-// Related to manual tests APPLINK-18763, APPLINK-18764
-TEST_F(PolicyManagerImplTest2, CheckPreDataConsent_GetDefaultHmiLevel_NONE) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- policy_manager_->AddApplication(
- device_id_1_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- std::string default_hmi;
- // Default HMI level is NONE
- policy_manager_->GetDefaultHmi(device_id_1_, app_id_2_, &default_hmi);
- EXPECT_EQ("NONE", default_hmi);
-
- // Default priority level is NONE
- std::string priority1;
- EXPECT_TRUE(policy_manager_->GetPriority(app_id_2_, &priority1));
- EXPECT_EQ("NONE", priority1);
-}
-
-// Related to manual tests APPLINK-18763, APPLINK-18764
-TEST_F(PolicyManagerImplTest2,
- CheckPreDataConsent_GetDefaultHmiLevel_BACKGROUNG) {
- // Arrange
- CreateLocalPT(kSdlPreloadedPtJson2);
- policy_manager_->AddApplication(
- device_id_1_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- std::string default_hmi;
- // Default HMI level is BACKGROUND
- policy_manager_->GetDefaultHmi(device_id_1_, app_id_2_, &default_hmi);
- EXPECT_EQ("BACKGROUND", default_hmi);
- // Default priority level is EMERGENCY
- std::string priority1;
- EXPECT_TRUE(policy_manager_->GetPriority(app_id_2_, &priority1));
- EXPECT_EQ("EMERGENCY", priority1);
-}
-
-TEST_F(
- PolicyManagerImplTest2,
- ReactOnUserDevConsentForApp_AddNewApplicationFromDeviceWithConsent_ExpectDefault) {
- // Arrange
- // RequestTypes for default & preDataConsent are different
- CreateLocalPT("json/ptu_requestType.json");
- const transport_manager::DeviceHandle handle = 1;
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(handle, app_id_1_))
- .WillRepeatedly(Return(device_id_1_));
- policy_manager_->AddApplication(
- device_id_1_, app_id_1_, HmiTypes(policy_table::AHT_DEFAULT));
- ASSERT_TRUE(policy_manager_->IsPredataPolicy(app_id_1_));
- policy_manager_->ReactOnUserDevConsentForApp(handle, app_id_1_, true);
- EXPECT_FALSE(policy_manager_->IsPredataPolicy(app_id_1_));
- // Expect app_id_1_ has default policy
- EXPECT_TRUE((policy_manager_->GetCache())->IsDefaultPolicy(app_id_1_));
-}
-
-TEST_F(
- PolicyManagerImplTest2,
- ReactOnUserDevConsentForApp_AddNewApplicationFromDeviceWithConsent_ExpectPreDataConsent) {
- // Arrange
- // RequestTypes for default & preDataConsent are the same
- CreateLocalPT(kPtu2RequestTypeJson);
- const transport_manager::DeviceHandle handle = 1;
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(handle, app_id_1_))
- .WillRepeatedly(Return(device_id_1_));
- policy_manager_->AddApplication(
- device_id_1_, app_id_1_, HmiTypes(policy_table::AHT_DEFAULT));
- ASSERT_TRUE(policy_manager_->IsPredataPolicy(app_id_1_));
- EXPECT_CALL(listener_, OnPendingPermissionChange(_, app_id_1_)).Times(0);
- policy_manager_->ReactOnUserDevConsentForApp(handle, app_id_1_, true);
- EXPECT_FALSE(policy_manager_->IsPredataPolicy(app_id_1_));
- EXPECT_TRUE((policy_manager_->GetCache())->IsDefaultPolicy(app_id_1_));
-}
-
-TEST_F(
- PolicyManagerImplTest2,
- GetUserConsentForDevice_SetDeviceWithoutConcent_ExpectReceivedConsentCorrect) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- ASSERT_TRUE(
- (policy_manager_->GetCache())->AddDevice(device_id_2_, "Bluetooth"));
- ::policy::DeviceConsent consent =
- policy_manager_->GetUserConsentForDevice(device_id_2_);
- // Check
- EXPECT_EQ(::policy::DeviceConsent::kDeviceHasNoConsent, consent);
-}
-
-TEST_F(PolicyManagerImplTest2,
- GetUserConsentForDevice_SetDeviceAllowed_ExpectReceivedConsentCorrect) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- ASSERT_TRUE(
- (policy_manager_->GetCache())->AddDevice(device_id_2_, "Bluetooth"));
-
- ASSERT_TRUE((policy_manager_->GetCache())
- ->SetDeviceData(device_id_2_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
-
- policy_manager_->SetUserConsentForDevice(device_id_2_, true);
- ::policy::DeviceConsent consent =
- policy_manager_->GetUserConsentForDevice(device_id_2_);
- // Check
- EXPECT_EQ(::policy::DeviceConsent::kDeviceAllowed, consent);
-}
-
-TEST_F(
- PolicyManagerImplTest2,
- GetUserConsentForDevice_SetDeviceDisallowed_ExpectReceivedConsentCorrect) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- ASSERT_TRUE(
- (policy_manager_->GetCache())->AddDevice(device_id_2_, "Bluetooth"));
- ASSERT_TRUE((policy_manager_->GetCache())
- ->SetDeviceData(device_id_2_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
-
- policy_manager_->SetUserConsentForDevice(device_id_2_, false);
- ::policy::DeviceConsent consent =
- policy_manager_->GetUserConsentForDevice(device_id_2_);
- // Check
- EXPECT_EQ(::policy::DeviceConsent::kDeviceDisallowed, consent);
-}
-
-TEST_F(PolicyManagerImplTest2,
- GetDefaultHmi_SetDeviceDisallowed_ExpectReceivedHmiCorrect) {
- // Arrange
- CreateLocalPT(kPtu2RequestTypeJson);
- ASSERT_TRUE(
- (policy_manager_->GetCache())->AddDevice(device_id_2_, "Bluetooth"));
- ASSERT_TRUE((policy_manager_->GetCache())
- ->SetDeviceData(device_id_2_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
-
- policy_manager_->SetUserConsentForDevice(device_id_2_, false);
- ::policy::DeviceConsent consent =
- policy_manager_->GetUserConsentForDevice(device_id_2_);
- // Check
- EXPECT_EQ(::policy::DeviceConsent::kDeviceDisallowed, consent);
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(_, app_id_2_))
- .WillRepeatedly(Return(device_id_2_));
- policy_manager_->AddApplication(
- device_id_2_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- std::string default_hmi;
- policy_manager_->GetDefaultHmi(device_id_2_, app_id_2_, &default_hmi);
- EXPECT_EQ("NONE", default_hmi);
-}
-
-TEST_F(PolicyManagerImplTest2,
- GetDefaultHmi_SetDeviceAllowed_ExpectReceivedHmiCorrect) {
- // Arrange
- CreateLocalPT(kPtu2RequestTypeJson);
- policy_manager_->AddApplication(
- device_id_1_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- // Check if app has preData policy
- EXPECT_TRUE(policy_manager_->IsPredataPolicy(app_id_2_));
- std::string default_hmi1;
- policy_manager_->GetDefaultHmi(device_id_1_, app_id_2_, &default_hmi1);
- EXPECT_EQ("NONE", default_hmi1);
- ASSERT_TRUE(
- (policy_manager_->GetCache())->AddDevice(device_id_2_, "Bluetooth"));
- ASSERT_TRUE((policy_manager_->GetCache())
- ->SetDeviceData(device_id_2_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
- policy_manager_->SetUserConsentForDevice(device_id_2_, true);
- ::policy::DeviceConsent consent =
- policy_manager_->GetUserConsentForDevice(device_id_2_);
- // Check
- EXPECT_EQ(::policy::DeviceConsent::kDeviceAllowed, consent);
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(_, app_id_2_))
- .WillRepeatedly(Return(device_id_2_));
- policy_manager_->AddApplication(
- device_id_2_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_TRUE((policy_manager_->GetCache())->IsDefaultPolicy(app_id_2_));
- std::string default_hmi2;
- policy_manager_->GetDefaultHmi(device_id_2_, app_id_2_, &default_hmi2);
- EXPECT_EQ("LIMITED", default_hmi2);
-}
-
-TEST_F(PolicyManagerImplTest2,
- GetDefaultPriority_SetDeviceAllowed_ExpectReceivedPriorityCorrect) {
- // Arrange
- CreateLocalPT(kPtu2RequestTypeJson);
- policy_manager_->AddApplication(
- device_id_1_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- // Check if app has preData policy
- EXPECT_TRUE(policy_manager_->IsPredataPolicy(app_id_2_));
- std::string priority1;
- EXPECT_TRUE(policy_manager_->GetPriority(app_id_2_, &priority1));
- EXPECT_EQ("NONE", priority1);
- ASSERT_TRUE(
- (policy_manager_->GetCache())->AddDevice(device_id_2_, "Bluetooth"));
- ASSERT_TRUE((policy_manager_->GetCache())
- ->SetDeviceData(device_id_2_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
- policy_manager_->SetUserConsentForDevice(device_id_2_, true);
- ::policy::DeviceConsent consent =
- policy_manager_->GetUserConsentForDevice(device_id_2_);
- // Check
- EXPECT_EQ(::policy::DeviceConsent::kDeviceAllowed, consent);
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(_, app_id_2_))
- .WillRepeatedly(Return(device_id_2_));
- policy_manager_->AddApplication(
- device_id_2_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_TRUE((policy_manager_->GetCache())->IsDefaultPolicy(app_id_2_));
- std::string priority2;
- EXPECT_TRUE(policy_manager_->GetPriority(app_id_2_, &priority2));
- EXPECT_EQ("EMERGENCY", priority2);
-}
-
-TEST_F(PolicyManagerImplTest2,
- GetUserFirendlyMessages_ExpectReceivedCorrectMessages) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- ::policy::StringArray message_code;
- message_code.push_back("SettingEnableUpdates");
- message_code.push_back("AppPermissions");
- const std::string language = "en-us";
- const std::string active_hmi_language = language;
- std::vector< ::policy::UserFriendlyMessage> result =
- policy_manager_->GetUserFriendlyMessages(
- message_code, language, active_hmi_language);
- uint32_t size = result.size();
- EXPECT_GT(size, 0u);
- std::vector< ::policy::UserFriendlyMessage>::iterator result_iter;
- std::shared_ptr<policy_table::Table> pt =
- (policy_manager_->GetCache())->GetPT();
-
- policy_table::ConsumerFriendlyMessages& consumer_friendly_messages =
- *(pt->policy_table.consumer_friendly_messages);
- policy_table::Messages& Messages = *(consumer_friendly_messages.messages);
-
- policy_table::Messages::const_iterator messages_iter = Messages.begin();
- // Loop until end of messages
- for (; messages_iter != Messages.end(); ++messages_iter) {
- if (messages_iter->first == "AppPermissions") {
- for (result_iter = result.begin(); result_iter != result.end();
- ++result_iter) {
- if (result_iter->message_code == "AppPermissions") {
- const policy_table::MessageLanguages& MessageLanguages =
- messages_iter->second;
- const policy_table::Languages& Languages = MessageLanguages.languages;
- policy_table::Languages::const_iterator languages_iter =
- Languages.find("en-us");
- // If necessary language found
- if (languages_iter != Languages.end()) {
- const policy_table::MessageString& MessageString =
- languages_iter->second;
- EXPECT_EQ(static_cast<std::string>(*(MessageString.line1)),
- result_iter->line1);
- EXPECT_EQ(static_cast<std::string>(*(MessageString.line2)),
- result_iter->line2);
- EXPECT_EQ(static_cast<std::string>(*(MessageString.tts)),
- result_iter->tts);
- EXPECT_EQ(static_cast<std::string>(*(MessageString.label)),
- result_iter->label);
- EXPECT_EQ(static_cast<std::string>(*(MessageString.textBody)),
- result_iter->text_body);
- }
- }
- }
- } else if (messages_iter->first == "SettingEnableUpdates") {
- for (result_iter = result.begin(); result_iter != result.end();
- ++result_iter) {
- if (result_iter->message_code == "SettingEnableUpdates") {
- const policy_table::MessageLanguages& MessageLanguages =
- messages_iter->second;
- const policy_table::Languages& Languages = MessageLanguages.languages;
- policy_table::Languages::const_iterator languages_iter =
- Languages.find("en-us");
- // If necessary language found
- if (languages_iter != Languages.end()) {
- const policy_table::MessageString& MessageString2 =
- languages_iter->second;
- EXPECT_EQ(static_cast<std::string>(*(MessageString2.line1)),
- result_iter->line1);
- }
- }
- }
- }
- }
-}
-
-TEST_F(PolicyManagerImplTest2, SetDeviceInfo_ExpectDevInfoAddedToPT) {
- // Arrange
- ::policy::DeviceInfo dev_info;
- std::shared_ptr<policy_table::Table> pt =
- (policy_manager_->GetCache())->GetPT();
- dev_info.hardware = "hardware IPX";
- dev_info.firmware_rev = "v.8.0.1";
- dev_info.os = "Android";
- dev_info.os_ver = "4.4.2";
- dev_info.carrier = "Life";
- dev_info.max_number_rfcom_ports = 2;
- dev_info.connection_type = "Bluetooth";
- policy_manager_->AddDevice(device_id_1_, "Bluetooth");
- policy_manager_->SetDeviceInfo(device_id_1_, dev_info);
- // Find device in PT
- policy_table::DeviceData::const_iterator iter =
- (*(pt->policy_table.device_data)).find(device_id_1_);
- // Checks
- ASSERT_TRUE(iter != (*(pt->policy_table.device_data)).end());
- EXPECT_EQ(static_cast<std::string>(*(*iter).second.hardware),
- dev_info.hardware);
- EXPECT_EQ(static_cast<std::string>(*(*iter).second.firmware_rev),
- dev_info.firmware_rev);
- EXPECT_EQ(static_cast<std::string>(*(*iter).second.os), dev_info.os);
- EXPECT_EQ(static_cast<std::string>(*(*iter).second.os_version),
- dev_info.os_ver);
- EXPECT_EQ(static_cast<std::string>(*(*iter).second.carrier),
- dev_info.carrier);
- EXPECT_EQ(static_cast<std::string>(*(*iter).second.connection_type),
- dev_info.connection_type);
- EXPECT_EQ(static_cast<uint8_t>(*(*iter).second.max_number_rfcom_ports),
- dev_info.max_number_rfcom_ports);
-}
-
-TEST_F(PolicyManagerImplTest2, GetInitialAppData_ExpectReceivedConsentCorrect) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- EXPECT_CALL(listener_, GetDevicesIds(app_id_2_))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- policy_manager_->AddApplication(
- device_id_1_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- ::policy::StringArray app_nicknames;
- ::policy::StringArray app_hmi_types;
- policy_manager_->GetInitialAppData(app_id_2_, &app_nicknames, &app_hmi_types);
- // Expect Empty nicknames and AppHmiTypes
- EXPECT_EQ(0u, app_nicknames.size());
- EXPECT_EQ(0u, app_hmi_types.size());
-
- Json::Value root = GetPTU(kValidSdlPtUpdateJson);
-
- Json::Value appHmiTypes = Json::Value(Json::arrayValue);
- appHmiTypes = root["policy_table"]["app_policies"][app_id_2_]["AppHMIType"];
- const uint32_t appHmiType_size = appHmiTypes.size();
-
- Json::Value appNicknames = Json::Value(Json::arrayValue);
- appNicknames = root["policy_table"]["app_policies"][app_id_2_]["nicknames"];
- const uint32_t appNicknames_size = appNicknames.size();
-
- ::policy::StringArray app_nicknames1;
- ::policy::StringArray app_hmi_types1;
- policy_manager_->GetInitialAppData(
- app_id_2_, &app_nicknames1, &app_hmi_types1);
- const uint32_t nick_names_size = app_nicknames1.size();
- const uint32_t app_hmi_types_size = app_hmi_types1.size();
- ASSERT_EQ(appHmiType_size, app_hmi_types_size);
- ASSERT_EQ(appNicknames_size, nick_names_size);
- ASSERT_GT(nick_names_size, 0u);
- ASSERT_GT(app_hmi_types_size, 0u);
- // Check nicknames match
- for (uint32_t i = 0; i < nick_names_size; ++i) {
- EXPECT_EQ(app_nicknames1[i], appNicknames[i].asString());
- }
- // Check AppHmiTypes match
- for (uint32_t i = 0; i < app_hmi_types_size; ++i) {
- EXPECT_EQ(app_hmi_types1[i], appHmiTypes[i].asString());
- }
-}
-
-TEST_F(
- PolicyManagerImplTest2,
- CanAppKeepContext_AddAppFromUnconsentedDevice_ExpectAppCannotKeepContext) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- policy_manager_->AddApplication(
- device_id_1_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- // Check if app has preData policy
- EXPECT_TRUE(policy_manager_->IsPredataPolicy(app_id_2_));
- // Check keep context in preData policy
- EXPECT_FALSE(policy_manager_->CanAppKeepContext(app_id_2_));
-}
-
-TEST_F(PolicyManagerImplTest2,
- CanAppKeepContext_AddAppFromConsentedDevice_ExpectAppCannotKeepContext) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- ASSERT_TRUE(
- (policy_manager_->GetCache())->AddDevice(device_id_2_, "Bluetooth"));
- policy_manager_->AddApplication(
- device_id_1_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- ASSERT_TRUE((policy_manager_->GetCache())
- ->SetDeviceData(device_id_2_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
- policy_manager_->SetUserConsentForDevice(device_id_2_, true);
- ::policy::DeviceConsent consent =
- policy_manager_->GetUserConsentForDevice(device_id_2_);
- EXPECT_EQ(::policy::DeviceConsent::kDeviceAllowed, consent);
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(_, app_id_2_))
- .WillRepeatedly(Return(device_id_2_));
- policy_manager_->AddApplication(
- device_id_2_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_TRUE((policy_manager_->GetCache())->IsDefaultPolicy(app_id_2_));
- // Check keep context in default policy
- EXPECT_FALSE(policy_manager_->CanAppKeepContext(app_id_2_));
-}
-
-TEST_F(PolicyManagerImplTest2,
- CanAppStealFocus_AddAppFromUnconsentedDevice_ExpectAppCannotStealFocus) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- policy_manager_->AddApplication(
- device_id_1_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- // Check if app has preData policy
- EXPECT_TRUE(policy_manager_->IsPredataPolicy(app_id_2_));
- // Check keep context in preData policy
- EXPECT_FALSE(policy_manager_->CanAppStealFocus(app_id_2_));
-}
-
-TEST_F(PolicyManagerImplTest2,
- CanAppStealFocus_AddAppFromConsentedDevice_ExpectAppCannotStealFocus) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- ASSERT_TRUE(
- (policy_manager_->GetCache())->AddDevice(device_id_2_, "Bluetooth"));
- policy_manager_->AddApplication(
- device_id_1_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- ASSERT_TRUE((policy_manager_->GetCache())
- ->SetDeviceData(device_id_2_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
- policy_manager_->SetUserConsentForDevice(device_id_2_, true);
- ::policy::DeviceConsent consent =
- policy_manager_->GetUserConsentForDevice(device_id_2_);
- EXPECT_EQ(::policy::DeviceConsent::kDeviceAllowed, consent);
- EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(_, app_id_2_))
- .WillRepeatedly(Return(device_id_2_));
- policy_manager_->AddApplication(
- device_id_2_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_TRUE((policy_manager_->GetCache())->IsDefaultPolicy(app_id_2_));
- // Check keep context in default policy
- EXPECT_FALSE(policy_manager_->CanAppStealFocus(app_id_2_));
-}
-
-TEST_F(PolicyManagerImplTest2,
- IsPredataPolicy_SetAppWIthPredataPolicy_ExpectPredataPolicy) {
- // Arrange
- CreateLocalPT(preloaded_pt_filename_);
- policy_manager_->AddApplication(
- device_id_1_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- // Check if app has preData policy
- EXPECT_TRUE(policy_manager_->IsPredataPolicy(app_id_2_));
-}
-
-TEST_F(
- PolicyManagerImplTest2,
- SendNotificationOnPermissionsUpdated_SetDeviceAllowed_ExpectNotificationSent) {
- // Arrange
- CreateLocalPT(kPtu2RequestTypeJson);
- EXPECT_CALL(listener_, GetDevicesIds(app_id_2_)).Times(0);
- policy_manager_->AddApplication(
- device_id_1_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- // Check if app has preData policy
- EXPECT_TRUE(policy_manager_->IsPredataPolicy(app_id_2_));
- std::string default_hmi1;
- policy_manager_->GetDefaultHmi(device_id_1_, app_id_2_, &default_hmi1);
- EXPECT_EQ("NONE", default_hmi1);
- EXPECT_CALL(listener_, OnPermissionsUpdated(device_id_1_, app_id_2_, _))
- .Times(0);
- policy_manager_->SendNotificationOnPermissionsUpdated(device_id_1_,
- app_id_2_);
-
- ASSERT_TRUE(
- (policy_manager_->GetCache())->AddDevice(device_id_2_, "Bluetooth"));
- ASSERT_TRUE((policy_manager_->GetCache())
- ->SetDeviceData(device_id_2_,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
- policy_manager_->SetUserConsentForDevice(device_id_2_, true);
- ::policy::DeviceConsent consent =
- policy_manager_->GetUserConsentForDevice(device_id_2_);
- // Check
- EXPECT_EQ(::policy::DeviceConsent::kDeviceAllowed, consent);
- EXPECT_CALL(listener_, GetDevicesIds(app_id_2_)).Times(0);
- policy_manager_->AddApplication(
- device_id_2_, app_id_2_, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_TRUE((policy_manager_->GetCache())->IsDefaultPolicy(app_id_2_));
- std::string default_hmi2;
- policy_manager_->GetDefaultHmi(device_id_2_, app_id_2_, &default_hmi2);
- EXPECT_EQ("LIMITED", default_hmi2);
- EXPECT_CALL(listener_,
- OnPermissionsUpdated(device_id_2_, app_id_2_, _, default_hmi2));
- policy_manager_->SendNotificationOnPermissionsUpdated(device_id_2_,
- app_id_2_);
-}
-
-} // namespace policy_test
-} // namespace components
-} // namespace test
diff --git a/src/components/policy/policy_external/test/sql_pt_ext_representation_storage_test.cc b/src/components/policy/policy_external/test/sql_pt_ext_representation_storage_test.cc
new file mode 100644
index 0000000000..1ceb5ea1ef
--- /dev/null
+++ b/src/components/policy/policy_external/test/sql_pt_ext_representation_storage_test.cc
@@ -0,0 +1,126 @@
+/* Copyright (c) 2018, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "policy/sql_pt_ext_representation.h"
+
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "policy/mock_policy_settings.h"
+#include "sqlite_wrapper/sql_query.h"
+#include "utils/file_system.h"
+#include "utils/make_shared.h"
+#include "utils/shared_ptr.h"
+
+using namespace ::policy;
+
+using testing::NiceMock;
+using testing::ReturnRef;
+
+namespace test {
+namespace components {
+namespace policy_test {
+
+class SQLPTExtRepresentationStorageTest : public ::testing::Test {
+ public:
+ SQLPTExtRepresentationStorageTest() : reps_(NULL) {}
+
+ protected:
+ const std::string kAppStorageFolder =
+ "storage_SQLPTExtRepresentationStorageTest";
+
+ std::shared_ptr<SQLPTExtRepresentation> reps_;
+ std::shared_ptr<NiceMock<policy_handler_test::MockPolicySettings> >
+ policy_settings_;
+ std::shared_ptr<utils::dbms::SQLQuery> query_wrapper_;
+
+ void SetUp() OVERRIDE {
+ file_system::CreateDirectory(kAppStorageFolder);
+
+ reps_ = std::make_shared<SQLPTExtRepresentation>();
+ ASSERT_TRUE(reps_ != NULL);
+
+ policy_settings_ =
+ std::make_shared<NiceMock<policy_handler_test::MockPolicySettings> >();
+ ON_CALL(*policy_settings_, app_storage_folder())
+ .WillByDefault(ReturnRef(kAppStorageFolder));
+ ASSERT_EQ(SUCCESS, reps_->Init(policy_settings_.get()));
+
+ query_wrapper_ = std::make_shared<utils::dbms::SQLQuery>(reps_->db());
+ ASSERT_TRUE(query_wrapper_ != NULL);
+ }
+
+ void TearDown() OVERRIDE {
+ EXPECT_TRUE(reps_->Drop());
+ EXPECT_TRUE(reps_->Close());
+
+ file_system::remove_directory_content(kAppStorageFolder);
+ file_system::RemoveDirectory(kAppStorageFolder, true);
+ }
+};
+
+TEST_F(
+ SQLPTExtRepresentationStorageTest,
+ CanAppKeepContext_InsertKeepContext_ExpectValuesThatSetInKeepContextParams) {
+ // Arrange
+ const std::string query_delete = "DELETE FROM `application`; ";
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_delete));
+
+ // Act
+ const std::string value_12345 = "12345";
+ const std::string query_insert_12345 =
+ "INSERT INTO `application` (`id`, `memory_kb`,"
+ " `heart_beat_timeout_ms`, `keep_context`) VALUES ('" +
+ value_12345 + "', 5, 10, 1)";
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_12345));
+ EXPECT_FALSE(reps_->CanAppKeepContext("0"));
+ EXPECT_TRUE(reps_->CanAppKeepContext(value_12345));
+
+ // Act
+ const std::string value_123 = "123";
+ const std::string query_insert_123 =
+ "INSERT INTO `application` (`id`, `memory_kb`,"
+ " `heart_beat_timeout_ms`, `keep_context`) VALUES ('" +
+ value_123 + "', 10, 7, 0)";
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_123));
+ EXPECT_FALSE(reps_->CanAppKeepContext(value_123));
+}
+
+} // namespace policy_test
+} // namespace components
+} // namespace test
diff --git a/src/components/policy/policy_external/test/sql_pt_ext_representation_test.cc b/src/components/policy/policy_external/test/sql_pt_ext_representation_test.cc
index 7d40210ba4..97613550f2 100644
--- a/src/components/policy/policy_external/test/sql_pt_ext_representation_test.cc
+++ b/src/components/policy/policy_external/test/sql_pt_ext_representation_test.cc
@@ -65,32 +65,24 @@ class SQLPTExtRepresentationTest : public ::testing::Test {
SQLPTExtRepresentationTest() : reps_(NULL) {}
protected:
- SQLPTExtRepresentation* reps_;
+ std::shared_ptr<SQLPTExtRepresentation> reps_;
policy_handler_test::MockPolicySettings policy_settings_;
- static const string kDatabaseName;
PermissionConsent perm_consent;
FunctionalGroupPermission group1_perm;
FunctionalGroupPermission group2_perm;
- utils::dbms::SQLQuery* query_wrapper_;
- static const bool in_memory_;
- const std::string kAppStorageFolder = "storage_SQLPTExtRepresentationTest";
+ std::shared_ptr<utils::dbms::SQLQuery> query_wrapper_;
void SetUp() OVERRIDE {
- file_system::DeleteFile(kDatabaseName);
- reps_ = new SQLPTExtRepresentation(in_memory_);
+ reps_ = std::make_shared<SQLPTExtRepresentation>(true);
ASSERT_TRUE(reps_ != NULL);
- ON_CALL(policy_settings_, app_storage_folder())
- .WillByDefault(ReturnRef(kAppStorageFolder));
ASSERT_EQ(SUCCESS, reps_->Init(&policy_settings_));
- query_wrapper_ = new utils::dbms::SQLQuery(reps_->db());
+ query_wrapper_ = std::make_shared<utils::dbms::SQLQuery>(reps_->db());
ASSERT_TRUE(query_wrapper_ != NULL);
}
void TearDown() OVERRIDE {
- delete query_wrapper_;
EXPECT_TRUE(reps_->Drop());
EXPECT_TRUE(reps_->Close());
- delete reps_;
}
void FillGroupPermission(
@@ -261,9 +253,6 @@ SQLPTExtRepresentationTest::GetDataInternal(
return table.policy_table.functional_groupings;
}
-const string SQLPTExtRepresentationTest::kDatabaseName = ":memory:";
-const bool SQLPTExtRepresentationTest::in_memory_ = true;
-
::testing::AssertionResult IsValid(const policy_table::Table& table) {
if (table.is_valid()) {
return ::testing::AssertionSuccess();
@@ -317,6 +306,20 @@ TEST_F(SQLPTExtRepresentationTest,
Json::Value(5);
module_config["notifications_per_minute_by_priority"]["none"] =
Json::Value(6);
+ module_config["subtle_notifications_per_minute_by_priority"] =
+ Json::Value(Json::objectValue);
+ module_config["subtle_notifications_per_minute_by_priority"]["emergency"] =
+ Json::Value(7);
+ module_config["subtle_notifications_per_minute_by_priority"]["navigation"] =
+ Json::Value(8);
+ module_config["subtle_notifications_per_minute_by_priority"]["VOICECOMM"] =
+ Json::Value(9);
+ module_config["subtle_notifications_per_minute_by_priority"]
+ ["communication"] = Json::Value(10);
+ module_config["subtle_notifications_per_minute_by_priority"]["normal"] =
+ Json::Value(11);
+ module_config["subtle_notifications_per_minute_by_priority"]["none"] =
+ Json::Value(12);
module_config["vehicle_make"] = Json::Value("MakeT");
module_config["vehicle_model"] = Json::Value("ModelT");
module_config["vehicle_year"] = Json::Value("2014");
diff --git a/src/components/policy/policy_external/test/sql_pt_representation_storage_test.cc b/src/components/policy/policy_external/test/sql_pt_representation_storage_test.cc
new file mode 100644
index 0000000000..7214ecba81
--- /dev/null
+++ b/src/components/policy/policy_external/test/sql_pt_representation_storage_test.cc
@@ -0,0 +1,129 @@
+/* Copyright (c) 2018, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "policy/sql_pt_representation.h"
+
+#include <memory>
+#include <string>
+
+#include "gtest/gtest.h"
+
+#include "policy/mock_policy_settings.h"
+#include "policy/sql_wrapper.h"
+#include "utils/file_system.h"
+
+using testing::NiceMock;
+using testing::ReturnRef;
+
+namespace test {
+namespace components {
+namespace policy_test {
+
+class SQLPTRepresentationStorageTest : public ::testing::Test {
+ protected:
+ const std::string kAppStorageFolder =
+ "storage_SQLPTRepresentationStorageTest";
+
+ std::shared_ptr<policy::SQLPTRepresentation> reps;
+ std::shared_ptr<utils::dbms::SQLQuery> query_wrapper_;
+ std::shared_ptr<policy_handler_test::MockPolicySettings> policy_settings_;
+
+ void SetUp() {
+ file_system::CreateDirectory(kAppStorageFolder);
+
+ reps = std::make_shared<policy::SQLPTRepresentation>();
+ ASSERT_TRUE(reps != NULL);
+
+ policy_settings_ =
+ std::make_shared<NiceMock<policy_handler_test::MockPolicySettings> >();
+ ON_CALL(*policy_settings_, app_storage_folder())
+ .WillByDefault(ReturnRef(kAppStorageFolder));
+ EXPECT_EQ(::policy::SUCCESS, reps->Init(policy_settings_.get()));
+
+ query_wrapper_ = std::make_shared<utils::dbms::SQLQuery>(reps->db());
+ ASSERT_TRUE(query_wrapper_ != NULL);
+ }
+
+ void TearDown() OVERRIDE {
+ EXPECT_TRUE(reps->Drop());
+ EXPECT_TRUE(reps->Close());
+ reps->RemoveDB();
+
+ file_system::remove_directory_content(kAppStorageFolder);
+ file_system::RemoveDirectory(kAppStorageFolder, true);
+ }
+};
+
+TEST_F(
+ SQLPTRepresentationStorageTest,
+ CheckPermissionsAllowed_SetValuesInAppGroupRpcFunctionalGroup_GetEqualParamsInCheckPermissionResult) {
+ // Arrange
+ const std::string value_12345 = "12345";
+ const std::string gps = "gps";
+ const std::string speed = "speed";
+ const std::string query =
+ "INSERT OR REPLACE INTO `application` (`id`, `memory_kb`,"
+ " `heart_beat_timeout_ms`) VALUES ('" +
+ value_12345 +
+ "', 5, 10); "
+ "INSERT OR REPLACE INTO functional_group (`id`, `name`)"
+ " VALUES (1, 'Base-4'); "
+ "INSERT OR REPLACE INTO `app_group` (`application_id`,"
+ " `functional_group_id`) VALUES ('" +
+ value_12345 +
+ "', 1); "
+ "INSERT OR REPLACE INTO `rpc` (`name`, `parameter`, `hmi_level_value`,"
+ " `functional_group_id`) VALUES ('Update', '" +
+ gps +
+ "', 'FULL', 1); "
+ "INSERT OR REPLACE INTO `rpc` (`name`, `parameter`, `hmi_level_value`,"
+ " `functional_group_id`) VALUES ('Update', '" +
+ speed + "', 'FULL', 1);";
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query));
+
+ // Act
+ policy::CheckPermissionResult ret;
+ reps->CheckPermissions(value_12345, "FULL", "Update", ret);
+
+ // Assert
+ EXPECT_TRUE(ret.hmi_level_permitted == ::policy::kRpcAllowed);
+ ASSERT_EQ(2u, ret.list_of_allowed_params.size());
+ EXPECT_TRUE(ret.list_of_allowed_params.end() !=
+ ret.list_of_allowed_params.find(gps));
+ EXPECT_TRUE(ret.list_of_allowed_params.end() !=
+ ret.list_of_allowed_params.find(speed));
+}
+
+} // namespace policy_test
+} // namespace components
+} // namespace test
diff --git a/src/components/policy/policy_external/test/sql_pt_representation_test.cc b/src/components/policy/policy_external/test/sql_pt_representation_test.cc
index 2f85f8dc0a..224c663c52 100644
--- a/src/components/policy/policy_external/test/sql_pt_representation_test.cc
+++ b/src/components/policy/policy_external/test/sql_pt_representation_test.cc
@@ -66,33 +66,22 @@ namespace test {
namespace components {
namespace policy_test {
-namespace {
-const int32_t kPolicyTablesNumber = 27;
-}
-
class SQLPTRepresentationTest : public SQLPTRepresentation,
public ::testing::Test {
- public:
- static const bool in_memory_;
-
protected:
- static SQLPTRepresentation* reps;
- static const std::string kDatabaseName;
- static utils::dbms::SQLQuery* query_wrapper_;
+ static std::shared_ptr<SQLPTRepresentation> reps;
+ static std::shared_ptr<utils::dbms::SQLQuery> query_wrapper_;
// Gtest can show message that this object doesn't destroyed
- static std::unique_ptr<policy_handler_test::MockPolicySettings>
+ static std::shared_ptr<policy_handler_test::MockPolicySettings>
policy_settings_;
static void SetUpTestCase() {
- const std::string kAppStorageFolder = "storage_SQLPTRepresentationTest";
- reps = new SQLPTRepresentation(in_memory_);
+ reps = std::make_shared<SQLPTRepresentation>(true);
ASSERT_TRUE(reps != NULL);
- policy_settings_ = std::unique_ptr<policy_handler_test::MockPolicySettings>(
- new policy_handler_test::MockPolicySettings());
- ON_CALL(*policy_settings_, app_storage_folder())
- .WillByDefault(ReturnRef(kAppStorageFolder));
+ policy_settings_ =
+ std::make_shared<policy_handler_test::MockPolicySettings>();
EXPECT_EQ(::policy::SUCCESS, reps->Init(policy_settings_.get()));
- query_wrapper_ = new utils::dbms::SQLQuery(reps->db());
+ query_wrapper_ = std::make_shared<utils::dbms::SQLQuery>(reps->db());
ASSERT_TRUE(query_wrapper_ != NULL);
}
@@ -101,12 +90,9 @@ class SQLPTRepresentationTest : public SQLPTRepresentation,
}
static void TearDownTestCase() {
- delete query_wrapper_;
EXPECT_TRUE(reps->Drop());
EXPECT_TRUE(reps->Close());
reps->RemoveDB();
- delete reps;
- policy_settings_.reset();
}
virtual utils::dbms::SQLDatabase* db() const {
@@ -259,6 +245,20 @@ class SQLPTRepresentationTest : public SQLPTRepresentation,
Json::Value(5);
module_config["notifications_per_minute_by_priority"]["none"] =
Json::Value(6);
+ module_config["subtle_notifications_per_minute_by_priority"] =
+ Json::Value(Json::objectValue);
+ module_config["subtle_notifications_per_minute_by_priority"]["emergency"] =
+ Json::Value(7);
+ module_config["subtle_notifications_per_minute_by_priority"]["navigation"] =
+ Json::Value(8);
+ module_config["subtle_notifications_per_minute_by_priority"]["VOICECOMM"] =
+ Json::Value(9);
+ module_config["subtle_notifications_per_minute_by_priority"]
+ ["communication"] = Json::Value(10);
+ module_config["subtle_notifications_per_minute_by_priority"]["normal"] =
+ Json::Value(11);
+ module_config["subtle_notifications_per_minute_by_priority"]["none"] =
+ Json::Value(12);
module_config["vehicle_make"] = Json::Value("MakeT");
module_config["vehicle_model"] = Json::Value("ModelT");
module_config["vehicle_year"] = Json::Value("2014");
@@ -343,16 +343,15 @@ class SQLPTRepresentationTest : public SQLPTRepresentation,
}
};
-SQLPTRepresentation* SQLPTRepresentationTest::reps = 0;
-utils::dbms::SQLQuery* SQLPTRepresentationTest::query_wrapper_ = 0;
-const std::string SQLPTRepresentationTest::kDatabaseName = ":memory:";
-const bool SQLPTRepresentationTest::in_memory_ = true;
-std::unique_ptr<policy_handler_test::MockPolicySettings>
- SQLPTRepresentationTest::policy_settings_;
+std::shared_ptr<SQLPTRepresentation> SQLPTRepresentationTest::reps = NULL;
+std::shared_ptr<utils::dbms::SQLQuery> SQLPTRepresentationTest::query_wrapper_ =
+ NULL;
+std::shared_ptr<policy_handler_test::MockPolicySettings>
+ SQLPTRepresentationTest::policy_settings_ = NULL;
class SQLPTRepresentationTest2 : public ::testing::Test {
protected:
- SQLPTRepresentation* reps;
+ std::shared_ptr<SQLPTRepresentation> reps;
NiceMock<policy_handler_test::MockPolicySettings> policy_settings_;
virtual void SetUp() OVERRIDE {
file_system::CreateDirectory(kAppStorageFolder);
@@ -363,13 +362,14 @@ class SQLPTRepresentationTest2 : public ::testing::Test {
.WillByDefault(Return(kOpenAttemptTimeoutMs));
ON_CALL(policy_settings_, attempts_to_open_policy_db())
.WillByDefault(Return(kAttemptsToOpenPolicyDB));
- reps = new SQLPTRepresentation;
+ reps = std::make_shared<SQLPTRepresentation>();
ASSERT_TRUE(reps != NULL);
}
virtual void TearDown() OVERRIDE {
+ chmod(kAppStorageFolder.c_str(), 755);
file_system::RemoveDirectory(kAppStorageFolder, true);
- delete reps;
+ reps.reset();
}
const std::string kAppStorageFolder = "storage123";
const uint16_t kOpenAttemptTimeoutMs = 70u;
@@ -408,6 +408,7 @@ TEST_F(SQLPTRepresentationTest, VehicleDataItem_Store_Complete_Item) {
*message.until = "5.0";
*message.removed = false;
*message.deprecated = false;
+ *message.defvalue = "0";
*message.minvalue = 0;
*message.maxvalue = 255;
*message.minsize = 0;
@@ -499,8 +500,8 @@ TEST_F(SQLPTRepresentationTest,
query.Prepare(query_select);
query.Next();
- // 41 - is current total tables number created by schema
- const int policy_tables_number = 41;
+ // 42 - is current total tables number created by schema
+ const int policy_tables_number = 42;
ASSERT_EQ(policy_tables_number, query.GetInteger(0));
const std::string query_select_count_of_iap_buffer_full =
@@ -1153,17 +1154,11 @@ TEST_F(SQLPTRepresentationTest,
EXPECT_EQ("EMERGENCY", priority);
}
-namespace {
-const std::string kAppStorageFolder = "storage";
-}
TEST(SQLPTRepresentationTest3, Init_InitNewDataBase_ExpectResultSuccess) {
// Arrange
- const bool in_memory_ = true;
NiceMock<policy_handler_test::MockPolicySettings> policy_settings_;
- SQLPTRepresentation reps(in_memory_);
+ SQLPTRepresentation reps(true);
// Checks
- ON_CALL(policy_settings_, app_storage_folder())
- .WillByDefault(ReturnRef(kAppStorageFolder));
EXPECT_EQ(::policy::SUCCESS, reps.Init(&policy_settings_));
EXPECT_EQ(::policy::EXISTS, reps.Init(&policy_settings_));
reps.RemoveDB();
@@ -1185,10 +1180,7 @@ TEST(SQLPTRepresentationTest3,
Close_InitNewDataBaseThenClose_ExpectResultSuccess) {
// Arrange
NiceMock<policy_handler_test::MockPolicySettings> policy_settings_;
- ON_CALL(policy_settings_, app_storage_folder())
- .WillByDefault(ReturnRef(kAppStorageFolder));
- const bool in_memory_ = true;
- SQLPTRepresentation reps(in_memory_);
+ SQLPTRepresentation reps(true);
EXPECT_EQ(::policy::SUCCESS, reps.Init(&policy_settings_));
EXPECT_TRUE(reps.Close());
utils::dbms::SQLError error(utils::dbms::Error::OK);
@@ -1630,9 +1622,8 @@ TEST_F(SQLPTRepresentationTest,
TEST(SQLPTRepresentationTest3, RemoveDB_RemoveDB_ExpectFileDeleted) {
// Arrange
- const bool in_memory_ = true;
policy_handler_test::MockPolicySettings policy_settings_;
- SQLPTRepresentation reps(in_memory_);
+ SQLPTRepresentation reps(true);
EXPECT_EQ(::policy::SUCCESS, reps.Init(&policy_settings_));
EXPECT_EQ(::policy::EXISTS, reps.Init(&policy_settings_));
std::string path = (reps.db())->get_path();
@@ -1736,6 +1727,7 @@ TEST_F(SQLPTRepresentationTest,
EXPECT_EQ(0u, config.seconds_between_retries.size());
EXPECT_EQ(0u, config.endpoints.size());
EXPECT_EQ(0u, config.notifications_per_minute_by_priority.size());
+ EXPECT_EQ(0u, (*config.subtle_notifications_per_minute_by_priority).size());
policy_table::ConsumerFriendlyMessages messages;
GatherConsumerFriendlyMessages(&messages);
@@ -1842,6 +1834,19 @@ TEST_F(SQLPTRepresentationTest,
ASSERT_EQ(4, config.notifications_per_minute_by_priority["communication"]);
ASSERT_EQ(5, config.notifications_per_minute_by_priority["normal"]);
ASSERT_EQ(6, config.notifications_per_minute_by_priority["none"]);
+ ASSERT_EQ(6u, (*config.subtle_notifications_per_minute_by_priority).size());
+ ASSERT_EQ(7,
+ (*config.subtle_notifications_per_minute_by_priority)["emergency"]);
+ ASSERT_EQ(
+ 8, (*config.subtle_notifications_per_minute_by_priority)["navigation"]);
+ ASSERT_EQ(9,
+ (*config.subtle_notifications_per_minute_by_priority)["VOICECOMM"]);
+ ASSERT_EQ(
+ 10,
+ (*config.subtle_notifications_per_minute_by_priority)["communication"]);
+ ASSERT_EQ(11,
+ (*config.subtle_notifications_per_minute_by_priority)["normal"]);
+ ASSERT_EQ(12, (*config.subtle_notifications_per_minute_by_priority)["none"]);
EXPECT_EQ(1u, config.endpoints.size());
policy_table::ServiceEndpoints& service_endpoints = config.endpoints;
EXPECT_EQ("0x00", service_endpoints.begin()->first);
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 00f0adab06..25b4a8bc18 100644
--- a/src/components/policy/policy_regular/include/policy/cache_manager.h
+++ b/src/components/policy/policy_regular/include/policy/cache_manager.h
@@ -292,13 +292,8 @@ class CacheManager : public CacheManagerInterface {
*/
virtual std::string GetIconUrl(const std::string& policy_app_id) const;
- /**
- * @brief Get allowed number of notifications
- * depending on application priority.
- * @param priority Priority of application
- */
virtual rpc::policy_table_interface_base::NumberOfNotificationsType
- GetNotificationsNumber(const std::string& priority);
+ GetNotificationsNumber(const std::string& priority, const bool is_subtle);
/**
* @brief Get priority for given application
@@ -544,6 +539,12 @@ class CacheManager : public CacheManagerInterface {
bool SetUserPermissionsForApp(const PermissionConsent& permissions);
/**
+ * @brief Set preloaded_pt flag value in policy table
+ * @param is_preloaded value to set
+ */
+ void SetPreloadedPtFlag(const bool is_preloaded) OVERRIDE;
+
+ /**
* @brief Records information about head unit system to PT
* @return bool Success of operation
*/
@@ -552,6 +553,12 @@ class CacheManager : public CacheManagerInterface {
const std::string& language);
/**
+ * @brief Get information about last ccpu_version from PT
+ * @return ccpu_version from PT
+ */
+ std::string GetCCPUVersionFromPT() const;
+
+ /**
* @brief Checks, if specific head unit is present in PT
* @return boot Suceess, if present, otherwise - false
*/
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 fc1a6337aa..14130c0316 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
@@ -325,9 +325,10 @@ class CacheManagerInterface {
* @brief Get allowed number of notifications
* depending on application priority.
* @param priority Priority of application
+ * @param is_subtle If true, get the number of allowed subtle notifications
*/
virtual policy_table::NumberOfNotificationsType GetNotificationsNumber(
- const std::string& priority) = 0;
+ const std::string& priority, const bool is_subtle) = 0;
/**
* @brief Get priority for given application
@@ -579,6 +580,12 @@ class CacheManagerInterface {
const PermissionConsent& permissions) = 0;
/**
+ * @brief Set preloaded_pt flag value in policy table
+ * @param is_preloaded value to set
+ */
+ virtual void SetPreloadedPtFlag(const bool is_preloaded) = 0;
+
+ /**
* @brief Records information about head unit system to PT
* @return bool Success of operation
*/
@@ -587,6 +594,12 @@ class CacheManagerInterface {
const std::string& language) = 0;
/**
+ * @brief Get information about last ccpu_version from PT
+ * @return ccpu_version from PT
+ */
+ virtual std::string GetCCPUVersionFromPT() const = 0;
+
+ /**
* @brief Checks, if specific head unit is present in PT
* @return boot Suceess, if present, otherwise - false
*/
diff --git a/src/components/policy/policy_regular/include/policy/policy_helper.h b/src/components/policy/policy_regular/include/policy/policy_helper.h
index d5155cf91b..f01d132049 100644
--- a/src/components/policy/policy_regular/include/policy/policy_helper.h
+++ b/src/components/policy/policy_regular/include/policy/policy_helper.h
@@ -68,13 +68,6 @@ struct CompareGroupName {
};
/*
- * @brief Used for compare of policies parameters mapped with specific
- * application ids
- */
-bool operator!=(const policy_table::ApplicationParams& first,
- const policy_table::ApplicationParams& second);
-
-/*
* @brief Helper struct for checking changes of application policies, which
* come with update along with current data snapshot
* In case of policies changed for some application, current data will be
@@ -257,15 +250,6 @@ FunctionalGroupIDs Merge(const FunctionalGroupIDs& first,
const FunctionalGroupIDs& second);
/**
- * @brief Finds same values
- * @param first First source of values
- * @param second Second source of values
- * @return Same values set, if any found
- */
-FunctionalGroupIDs FindSame(const FunctionalGroupIDs& first,
- const FunctionalGroupIDs& second);
-
-/**
* @brief Unwrap application policies from predefined values to specific policy
* values, i.e. if application has "default", it will be assigned default
* policies
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 b608c6f7ec..dff4802d82 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
@@ -451,12 +451,18 @@ class PolicyManagerImpl : public PolicyManager {
const std::string& wers_country_code,
const std::string& language) OVERRIDE;
+ void SetPreloadedPtFlag(const bool is_preloaded) OVERRIDE;
+
+ std::string GetCCPUVersionFromPT() const OVERRIDE;
+
/**
* @brief Get number of notification by priority
* @param priority Specified priority
+ * @param is_subtle If true, get the number of allowed subtle notifications
* @return notification number
*/
- uint32_t GetNotificationsNumber(const std::string& priority) const OVERRIDE;
+ uint32_t GetNotificationsNumber(const std::string& priority,
+ const bool is_subtle) const OVERRIDE;
/**
* @brief Allows to update Vehicle Identification Number in policy table.
@@ -797,6 +803,11 @@ class PolicyManagerImpl : public PolicyManager {
AppIdURL RetrySequenceUrl(const struct RetrySequenceURL& rs,
const EndpointUrls& urls) const OVERRIDE;
+ /**
+ * @brief Trigger a PTU once on startup if it is required
+ */
+ virtual void TriggerPTUOnStartupIfRequired() OVERRIDE;
+
#ifdef BUILD_TESTS
/**
* @brief Getter for cache_manager instance
@@ -858,7 +869,7 @@ class PolicyManagerImpl : public PolicyManager {
void ResetTimeout() OVERRIDE;
protected:
-#ifdef USE_HMI_PTU_DECRYPTION
+#if defined USE_HMI_PTU_DECRYPTION && defined PROPRIETARY_MODE
/**
* @brief Parse policy table content and convert to PT object
* @param pt_content binary content of PT
diff --git a/src/components/policy/policy_regular/include/policy/policy_table/types.h b/src/components/policy/policy_regular/include/policy/policy_table/types.h
index 2ffbf2e7ec..673f17e32b 100644
--- a/src/components/policy/policy_regular/include/policy/policy_table/types.h
+++ b/src/components/policy/policy_regular/include/policy/policy_table/types.h
@@ -323,6 +323,8 @@ struct ModuleConfig : CompositeType {
ServiceEndpoints endpoints;
Optional<ServiceEndpointProperties> endpoint_properties;
NumberOfNotificationsPerMinute notifications_per_minute_by_priority;
+ Optional<NumberOfNotificationsPerMinute>
+ subtle_notifications_per_minute_by_priority;
Optional<String<1, 100> > vehicle_make;
Optional<String<1, 100> > vehicle_model;
Optional<String<4, 4> > vehicle_year;
@@ -427,6 +429,7 @@ struct ModuleMeta : CompositeType {
Optional<Integer<uint32_t, 0, ODO_MAX> > pt_exchanged_at_odometer_x;
Optional<Integer<uint16_t, 0, 65535> > pt_exchanged_x_days_after_epoch;
Optional<Integer<uint16_t, 0, 65535> > ignition_cycles_since_last_exchange;
+ Optional<String<0, 500> > ccpu_version;
public:
ModuleMeta();
@@ -548,6 +551,7 @@ struct VehicleDataItem : CompositeType {
Optional<String<0, 255> > until;
Optional<Boolean> removed;
Optional<Boolean> deprecated;
+ Optional<String<0, UINT32_MAX> > defvalue;
Optional<Float<-INT32_MAX, INT32_MAX> > minvalue;
Optional<Float<-INT32_MAX, INT32_MAX> > maxvalue;
Optional<Integer<uint32_t, 0, UINT32_MAX> > minsize;
@@ -576,6 +580,12 @@ struct VehicleDataItem : CompositeType {
* @return true if type is valid.
*/
bool ValidateTypes() const;
+ /**
+ * @brief Validates default value of vehicle data item based
+ * on type, unable to validate enum values
+ * @return true if defvalue is valid.
+ */
+ bool ValidateDefault() const;
bool IsPrimitiveType() const;
bool ValidateNaming(std::string str) const;
diff --git a/src/components/policy/policy_regular/include/policy/pt_representation.h b/src/components/policy/policy_regular/include/policy/pt_representation.h
index 467fb4641f..895b4ea6b5 100644
--- a/src/components/policy/policy_regular/include/policy/pt_representation.h
+++ b/src/components/policy/policy_regular/include/policy/pt_representation.h
@@ -152,6 +152,12 @@ class PTRepresentation {
virtual EndpointUrls GetUpdateUrls(int service_type) = 0;
/**
+ * @brief Records information about head unit system to PT
+ * @return bool Success of operation
+ */
+ virtual bool SetMetaInfo(const std::string& ccpu_version) = 0;
+
+ /**
* @brief Get allowed number of notifications
* depending on application priority.
* @param priority Priority of application
diff --git a/src/components/policy/policy_regular/include/policy/sql_pt_queries.h b/src/components/policy/policy_regular/include/policy/sql_pt_queries.h
index 315c30b995..5bf85a4bb5 100644
--- a/src/components/policy/policy_regular/include/policy/sql_pt_queries.h
+++ b/src/components/policy/policy_regular/include/policy/sql_pt_queries.h
@@ -52,6 +52,7 @@ extern const std::string kSelectEndpoint;
extern const std::string kSelectModuleConfig;
extern const std::string kSelectEndpoints;
extern const std::string kSelectNotificationsPerMin;
+extern const std::string kSelectSubtleNotificationsPerMin;
extern const std::string kSelectNotificationsPerPriority;
extern const std::string kSelectAppLevels;
extern const std::string kSelectDeviceData;
@@ -93,6 +94,7 @@ extern const std::string kUpdateModuleConfig;
extern const std::string kInsertEndpoint;
extern const std::string kInsertSecondsBetweenRetry;
extern const std::string kInsertNotificationsByPriority;
+extern const std::string kInsertSubtleNotificationsByPriority;
extern const std::string kInsertDeviceData;
extern const std::string kInsertAppLevel;
extern const std::string kDeleteSecondsBetweenRetries;
@@ -142,6 +144,7 @@ extern const std::string kSelectDBVersion;
extern const std::string kUpdateDBVersion;
extern const std::string kSaveModuleMeta;
extern const std::string kSelectModuleMeta;
+extern const std::string kUpdateMetaParams;
extern const std::string kInsertVehicleDataItem;
extern const std::string kSelectVehicleDataItem;
extern const std::string kDeleteVehicleDataItems;
diff --git a/src/components/policy/policy_regular/include/policy/sql_pt_representation.h b/src/components/policy/policy_regular/include/policy/sql_pt_representation.h
index 5bc49ee973..512bfd6326 100644
--- a/src/components/policy/policy_regular/include/policy/sql_pt_representation.h
+++ b/src/components/policy/policy_regular/include/policy/sql_pt_representation.h
@@ -53,6 +53,7 @@ namespace policy {
class SQLPTRepresentation : public virtual PTRepresentation {
public:
SQLPTRepresentation();
+ explicit SQLPTRepresentation(bool in_memory);
~SQLPTRepresentation();
virtual void CheckPermissions(const PTString& app_id,
const PTString& hmi_level,
@@ -89,7 +90,7 @@ class SQLPTRepresentation : public virtual PTRepresentation {
StringArray* nicknames = NULL,
StringArray* app_hmi_types = NULL);
bool GetFunctionalGroupings(policy_table::FunctionalGroupings& groups);
-
+ bool SetMetaInfo(const std::string& ccpu_version);
#ifdef BUILD_TESTS
uint32_t open_counter() {
return open_counter_;
@@ -248,6 +249,8 @@ class SQLPTRepresentation : public virtual PTRepresentation {
const policy_table::SecondsBetweenRetries& seconds);
bool SaveNumberOfNotificationsPerMinute(
const policy_table::NumberOfNotificationsPerMinute& notifications);
+ bool SaveNumberOfSubtleNotificationsPerMinute(
+ const policy_table::NumberOfNotificationsPerMinute& notifications);
bool SaveMessageType(const std::string& type);
bool SaveLanguage(const std::string& code);
policy_table::VehicleDataItem PopulateVDIFromQuery(
diff --git a/src/components/policy/policy_regular/src/access_remote_impl.cc b/src/components/policy/policy_regular/src/access_remote_impl.cc
index f743a4d56e..439fbcc8d2 100644
--- a/src/components/policy/policy_regular/src/access_remote_impl.cc
+++ b/src/components/policy/policy_regular/src/access_remote_impl.cc
@@ -36,7 +36,7 @@
#include "policy/cache_manager.h"
#include "utils/logger.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "PolicyManagerImpl")
+SDL_CREATE_LOG_VARIABLE("PolicyManagerImpl")
using policy_table::DeviceData;
using policy_table::FunctionalGroupings;
@@ -48,11 +48,10 @@ struct ToHMIType {
policy_table::AppHMITypes::value_type operator()(int item) const {
policy_table::AppHMIType type = static_cast<policy_table::AppHMIType>(item);
if (!IsValidEnum(type)) {
- LOG4CXX_WARN(logger_, "HMI type isn't known " << item);
+ SDL_LOG_WARN("HMI type isn't known " << item);
type = policy_table::AHT_DEFAULT;
}
- LOG4CXX_DEBUG(logger_,
- "HMI type: " << item << " - " << EnumToJsonString(type));
+ SDL_LOG_DEBUG("HMI type: " << item << " - " << EnumToJsonString(type));
return policy_table::AppHMITypes::value_type(type);
}
};
@@ -94,7 +93,7 @@ AccessRemoteImpl::AccessRemoteImpl(std::shared_ptr<CacheManager> cache)
bool AccessRemoteImpl::CheckModuleType(const PTString& app_id,
policy_table::ModuleType module) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!cache_->IsApplicationRepresented(app_id)) {
return false;
}
@@ -117,10 +116,10 @@ bool AccessRemoteImpl::IsAllowed(const policy_table::AccessModules& modules,
const std::string& module_name,
const std::string& rpc_name,
RemoteControlParams* input) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
policy_table::AccessModules::const_iterator i = modules.find(module_name);
if (i == modules.end()) {
- LOG4CXX_DEBUG(logger_, "Module " << module_name << " wasn't found");
+ SDL_LOG_DEBUG("Module " << module_name << " wasn't found");
return false;
}
@@ -133,19 +132,19 @@ bool AccessRemoteImpl::IsAllowed(const policy_table::AccessModules& modules,
const policy_table::Strings& parameters = j->second;
return CompareParameters(parameters, input);
}
- LOG4CXX_DEBUG(logger_, "RPC " << rpc_name << " wasn't found");
+ SDL_LOG_DEBUG("RPC " << rpc_name << " wasn't found");
return false;
}
bool AccessRemoteImpl::CompareParameters(
const policy_table::Strings& parameters, RemoteControlParams* input) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (parameters.empty()) {
return true;
}
if (input->empty()) {
- LOG4CXX_DEBUG(logger_, "Input is empty");
+ SDL_LOG_DEBUG("Input is empty");
return false;
}
@@ -157,7 +156,7 @@ bool AccessRemoteImpl::CompareParameters(
void AccessRemoteImpl::SetDefaultHmiTypes(const ApplicationOnDevice& who,
const std::vector<int>& hmi_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
HMIList::mapped_type types;
std::transform(hmi_types.begin(),
hmi_types.end(),
@@ -168,7 +167,7 @@ void AccessRemoteImpl::SetDefaultHmiTypes(const ApplicationOnDevice& who,
const policy_table::AppHMITypes& AccessRemoteImpl::HmiTypes(
const ApplicationOnDevice& who) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (cache_->IsDefaultPolicy(who.app_id)) {
return hmi_types_[who];
} else {
@@ -180,12 +179,12 @@ const policy_table::AppHMITypes& AccessRemoteImpl::HmiTypes(
const policy_table::Strings& AccessRemoteImpl::GetGroups(
const ApplicationOnDevice& who) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->GetGroups(who.app_id);
}
bool AccessRemoteImpl::IsAppRemoteControl(const ApplicationOnDevice& who) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const policy_table::AppHMITypes& hmi_types = HmiTypes(who);
return std::find(hmi_types.begin(),
hmi_types.end(),
@@ -195,7 +194,7 @@ bool AccessRemoteImpl::IsAppRemoteControl(const ApplicationOnDevice& who) {
bool AccessRemoteImpl::GetPermissionsForApp(const std::string& device_id,
const std::string& app_id,
FunctionalIdType& group_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
GetGroupsIds(device_id, app_id, group_types[kTypeGeneral]);
GetGroupsIds(device_id, kDefaultId, group_types[kTypeDefault]);
GetGroupsIds(
@@ -221,7 +220,7 @@ void AccessRemoteImpl::GetGroupsIds(const std::string& device_id,
groups.end(),
groups_ids.begin(),
&CacheManager::GenerateHash);
- LOG4CXX_DEBUG(logger_, "Groups Ids: " << groups_ids);
+ SDL_LOG_DEBUG("Groups Ids: " << groups_ids);
}
bool AccessRemoteImpl::GetModuleTypes(const std::string& application_id,
diff --git a/src/components/policy/policy_regular/src/cache_manager.cc b/src/components/policy/policy_regular/src/cache_manager.cc
index 28ceec3ccb..8f98996687 100644
--- a/src/components/policy/policy_regular/src/cache_manager.cc
+++ b/src/components/policy/policy_regular/src/cache_manager.cc
@@ -60,26 +60,26 @@ namespace policy_table = rpc::policy_table_interface_base;
namespace policy {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Policy")
+SDL_CREATE_LOG_VARIABLE("Policy")
-#define CACHE_MANAGER_CHECK(return_value) \
- { \
- if (!pt_) { \
- LOG4CXX_WARN(logger_, "The cache manager is not initialized"); \
- return return_value; \
- } \
+#define CACHE_MANAGER_CHECK(return_value) \
+ { \
+ if (!pt_) { \
+ SDL_LOG_WARN("The cache manager is not initialized"); \
+ return return_value; \
+ } \
}
-#define CACHE_MANAGER_CHECK_VOID() \
- { \
- if (!pt_) { \
- LOG4CXX_WARN(logger_, "The cache manager is not initialized"); \
- return; \
- } \
+#define CACHE_MANAGER_CHECK_VOID() \
+ { \
+ if (!pt_) { \
+ SDL_LOG_WARN("The cache manager is not initialized"); \
+ return; \
+ } \
}
struct LanguageFinder {
- LanguageFinder(const std::string& language) : language_(language) {}
+ explicit LanguageFinder(const std::string& language) : language_(language) {}
bool operator()(const policy_table::Languages::value_type& lang) const {
return !strcasecmp(language_.c_str(), lang.first.c_str());
}
@@ -89,10 +89,12 @@ struct LanguageFinder {
};
struct PolicyTableUpdater {
- PolicyTableUpdater(const policy_table::ApplicationParams& default_params)
+ explicit PolicyTableUpdater(
+ const policy_table::ApplicationParams& default_params)
: default_params_(default_params) {}
- void operator()(policy_table::ApplicationPolicies::value_type& pt_value) {
+ void operator()(
+ policy_table::ApplicationPolicies::value_type& pt_value) const {
if (policy::kDefaultId == pt_value.second.get_string()) {
pt_value.second = default_params_;
pt_value.second.set_to_string(policy::kDefaultId);
@@ -110,17 +112,17 @@ CacheManager::CacheManager()
, update_required(false)
, removed_custom_vd_items_()
, settings_(nullptr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
backuper_ = new BackgroundBackuper(this);
backup_thread_ = threads::CreateThread("Backup thread", backuper_);
- backup_thread_->start();
+ backup_thread_->Start();
}
CacheManager::~CacheManager() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(backuper_locker_);
- backup_thread_->join();
- delete backup_thread_->delegate();
+ backup_thread_->Stop(threads::Thread::kThreadSoftStop);
+ delete backup_thread_->GetDelegate();
threads::DeleteThread(backup_thread_);
}
@@ -130,7 +132,7 @@ const policy_table::Strings& CacheManager::GetGroups(const PTString& app_id) {
}
const policy_table::Strings CacheManager::GetPolicyAppIDs() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
const auto apps = pt_->policy_table.app_policies_section.apps;
@@ -204,18 +206,18 @@ bool CacheManager::GetUserPermissionsForDevice(
const std::string& device_id,
StringArray& consented_groups,
StringArray& disallowed_groups) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
return true;
}
void CacheManager::GetAllAppGroups(const std::string& app_id,
FunctionalGroupIDs& all_group_ids) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
if (kDeviceId == app_id) {
- LOG4CXX_INFO(logger_, "Devices doesn't have groups");
+ SDL_LOG_INFO("Devices doesn't have groups");
return;
}
@@ -238,7 +240,7 @@ void CacheManager::GetAllAppGroups(const std::string& app_id,
void CacheManager::GetPreConsentedGroups(
const std::string& app_id, FunctionalGroupIDs& preconsented_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
}
@@ -246,7 +248,7 @@ void CacheManager::GetConsentedGroups(const std::string& device_id,
const std::string& app_id,
FunctionalGroupIDs& allowed_groups,
FunctionalGroupIDs& disallowed_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
}
@@ -254,7 +256,7 @@ void CacheManager::GetUnconsentedGroups(
const std::string& device_id,
const std::string& policy_app_id,
FunctionalGroupIDs& unconsented_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
}
@@ -264,7 +266,7 @@ void CacheManager::RemoveAppConsentForGroup(const std::string& app_id,
}
bool CacheManager::ApplyUpdate(const policy_table::Table& update_pt) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
sync_primitives::AutoLock auto_lock(cache_lock_);
pt_->policy_table.functional_groupings =
@@ -355,7 +357,7 @@ policy_table::VehicleDataItems CacheManager::CollectCustomVDItems(
void CacheManager::GetHMIAppTypeAfterUpdate(
std::map<std::string, StringArray>& app_hmi_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
sync_primitives::AutoLock auto_lock(cache_lock_);
policy_table::ApplicationPolicies::const_iterator policy_iter_begin =
@@ -419,7 +421,7 @@ std::string CacheManager::currentDateTime() {
bool CacheManager::GetPermissionsForApp(const std::string& device_id,
const std::string& app_id,
FunctionalIdType& group_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
GetAllAppGroups(app_id, group_types[kTypeGeneral]);
GetAllAppGroups(kDefaultId, group_types[kTypeDefault]);
GetAllAppGroups(kPreDataConsentId, group_types[kTypePreDataConsented]);
@@ -429,14 +431,14 @@ bool CacheManager::GetPermissionsForApp(const std::string& device_id,
bool CacheManager::GetDeviceGroupsFromPolicies(
policy_table::Strings& groups,
policy_table::Strings& preconsented_groups) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
return true;
}
bool CacheManager::AddDevice(const std::string& device_id,
const std::string& connection_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
CACHE_MANAGER_CHECK(false);
@@ -462,7 +464,7 @@ bool CacheManager::SetDeviceData(const std::string& device_id,
const std::string& carrier,
const uint32_t number_of_ports,
const std::string& connection_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
CACHE_MANAGER_CHECK(false);
@@ -474,7 +476,7 @@ bool CacheManager::SetUserPermissionsForDevice(
const std::string& device_id,
const StringArray& consented_groups,
const StringArray& disallowed_groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
CACHE_MANAGER_CHECK(false);
Backup();
@@ -483,7 +485,7 @@ bool CacheManager::SetUserPermissionsForDevice(
bool CacheManager::ReactOnUserDevConsentForApp(const std::string& app_id,
bool is_device_allowed) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
bool result = true;
Backup();
@@ -509,7 +511,7 @@ void CacheManager::GetGroupNameByHashID(const int32_t group_id,
bool CacheManager::SetUserPermissionsForApp(
const PermissionConsent& permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
CACHE_MANAGER_CHECK(false);
Backup();
@@ -541,7 +543,7 @@ void CacheManager::CheckPermissions(const policy_table::Strings& groups,
const PTString& hmi_level,
const PTString& rpc,
CheckPermissionResult& result) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
sync_primitives::AutoLock auto_lock(cache_lock_);
@@ -600,14 +602,13 @@ int CacheManager::IgnitionCyclesBeforeExchange() {
static_cast<int>(
pt_->policy_table.module_config.exchange_after_x_ignition_cycles),
0);
- LOG4CXX_DEBUG(logger_, "IgnitionCyclesBeforeExchange limit:" << limit);
+ SDL_LOG_DEBUG("IgnitionCyclesBeforeExchange limit:" << limit);
uint8_t current = 0;
const int last_exch = static_cast<int>(
*pt_->policy_table.module_meta->ignition_cycles_since_last_exchange);
current = std::max(last_exch, 0);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"IgnitionCyclesBeforeExchange current:" << static_cast<int>(current));
return std::max(limit - current, 0);
@@ -620,16 +621,16 @@ int CacheManager::KilometersBeforeExchange(int current) {
std::max(static_cast<int>(
pt_->policy_table.module_config.exchange_after_x_kilometers),
0);
- LOG4CXX_DEBUG(logger_, "KilometersBeforeExchange limit:" << limit);
+ SDL_LOG_DEBUG("KilometersBeforeExchange limit:" << limit);
int last = 0;
const int odo_val = static_cast<int>(
*pt_->policy_table.module_meta->pt_exchanged_at_odometer_x);
last = std::max(odo_val, 0);
- LOG4CXX_DEBUG(logger_, "KilometersBeforeExchange last:" << last);
+ SDL_LOG_DEBUG("KilometersBeforeExchange last:" << last);
const int actual = std::max((current - last), 0);
- LOG4CXX_DEBUG(logger_, "KilometersBeforeExchange actual:" << actual);
+ SDL_LOG_DEBUG("KilometersBeforeExchange actual:" << actual);
return std::max(limit - actual, 0);
}
@@ -640,18 +641,15 @@ bool CacheManager::SetCountersPassedForSuccessfulUpdate(
switch (counter) {
case KILOMETERS:
*pt_->policy_table.module_meta->pt_exchanged_at_odometer_x = value;
- LOG4CXX_DEBUG(logger_,
- "SetCountersPassedForSuccessfulUpdate km:" << value);
+ SDL_LOG_DEBUG("SetCountersPassedForSuccessfulUpdate km:" << value);
break;
case DAYS_AFTER_EPOCH:
*pt_->policy_table.module_meta->pt_exchanged_x_days_after_epoch = value;
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"SetCountersPassedForSuccessfulUpdate days after epoch:" << value);
break;
default:
- LOG4CXX_ERROR(logger_,
- "Unknown counter was requested to set: " << counter);
+ SDL_LOG_ERROR("Unknown counter was requested to set: " << counter);
return false;
}
@@ -660,7 +658,7 @@ bool CacheManager::SetCountersPassedForSuccessfulUpdate(
}
int CacheManager::DaysBeforeExchange(int current) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(0);
sync_primitives::AutoLock auto_lock(cache_lock_);
@@ -672,14 +670,13 @@ int CacheManager::DaysBeforeExchange(int current) {
}
const uint8_t limit = pt_->policy_table.module_config.exchange_after_x_days;
- LOG4CXX_DEBUG(logger_,
- "Exchange after: " << static_cast<int>(limit) << " days");
+ SDL_LOG_DEBUG("Exchange after: " << static_cast<int>(limit) << " days");
- LOG4CXX_DEBUG(logger_, "Epoch since last update: " << *days_after_epoch);
+ SDL_LOG_DEBUG("Epoch since last update: " << *days_after_epoch);
const uint16_t actual =
std::max(static_cast<uint16_t>(current - *days_after_epoch), uint16_t(0));
- LOG4CXX_DEBUG(logger_, "The days since last update: " << actual);
+ SDL_LOG_DEBUG("The days since last update: " << actual);
return std::max(limit - actual, 0);
}
@@ -691,7 +688,7 @@ void CacheManager::IncrementIgnitionCycles() {
*pt_->policy_table.module_meta->ignition_cycles_since_last_exchange);
(*pt_->policy_table.module_meta->ignition_cycles_since_last_exchange) =
ign_val + 1;
- LOG4CXX_DEBUG(logger_, "IncrementIgnitionCycles ignitions:" << ign_val);
+ SDL_LOG_DEBUG("IncrementIgnitionCycles ignitions:" << ign_val);
Backup();
}
@@ -914,7 +911,7 @@ void CacheManager::SetHybridAppPreference(
void CacheManager::GetAppServiceParameters(
const std::string& policy_app_id,
policy_table::AppServiceParameters* app_service_parameters) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const policy_table::ApplicationPolicies& policies =
pt_->policy_table.app_policies_section.apps;
policy_table::ApplicationPolicies::const_iterator policy_iter =
@@ -944,24 +941,23 @@ bool CacheManager::UnknownRPCPassthroughAllowed(
const boost::optional<bool> CacheManager::LockScreenDismissalEnabledState()
const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
boost::optional<bool> empty;
CACHE_MANAGER_CHECK(empty);
sync_primitives::AutoLock auto_lock(cache_lock_);
policy_table::ModuleConfig& module_config = pt_->policy_table.module_config;
if (module_config.lock_screen_dismissal_enabled.is_initialized()) {
- LOG4CXX_TRACE(logger_,
- "state = " << *module_config.lock_screen_dismissal_enabled);
+ SDL_LOG_TRACE("state = " << *module_config.lock_screen_dismissal_enabled);
return boost::optional<bool>(*module_config.lock_screen_dismissal_enabled);
}
- LOG4CXX_TRACE(logger_, "state = empty");
+ SDL_LOG_TRACE("state = empty");
return empty;
}
const boost::optional<std::string>
CacheManager::LockScreenDismissalWarningMessage(
const std::string& language) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
boost::optional<std::string> empty;
CACHE_MANAGER_CHECK(empty);
@@ -983,7 +979,7 @@ CacheManager::LockScreenDismissalWarningMessage(
std::vector<UserFriendlyMessage> CacheManager::GetUserFriendlyMsg(
const std::vector<std::string>& msg_codes,
const std::string& language) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<UserFriendlyMessage> result;
CACHE_MANAGER_CHECK(result);
@@ -1003,10 +999,9 @@ std::vector<UserFriendlyMessage> CacheManager::GetUserFriendlyMsg(
msg_languages.languages.begin(), msg_languages.languages.end(), finder);
if (msg_languages.languages.end() == it_language) {
- LOG4CXX_WARN(logger_,
- "Language "
- << language
- << " haven't been found for message code: " << *it);
+ SDL_LOG_WARN("Language "
+ << language
+ << " haven't been found for message code: " << *it);
LanguageFinder fallback_language_finder("en-us");
@@ -1016,8 +1011,7 @@ std::vector<UserFriendlyMessage> CacheManager::GetUserFriendlyMsg(
fallback_language_finder);
if (msg_languages.languages.end() == it_fallback_language) {
- LOG4CXX_ERROR(logger_,
- "No fallback language found for message code: " << *it);
+ SDL_LOG_ERROR("No fallback language found for message code: " << *it);
continue;
}
@@ -1058,10 +1052,10 @@ void CacheManager::GetUpdateUrls(const uint32_t service_type,
void CacheManager::GetUpdateUrls(const std::string& service_type,
EndpointUrls& out_end_points) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
- LOG4CXX_DEBUG(logger_, "Search service value is: " << service_type);
+ SDL_LOG_DEBUG("Search service value is: " << service_type);
sync_primitives::AutoLock auto_lock(cache_lock_);
policy_table::ServiceEndpoints::const_iterator iter =
@@ -1100,17 +1094,21 @@ std::string CacheManager::GetIconUrl(const std::string& policy_app_id) const {
}
rpc::policy_table_interface_base::NumberOfNotificationsType
-CacheManager::GetNotificationsNumber(const std::string& priority) {
+CacheManager::GetNotificationsNumber(const std::string& priority,
+ const bool is_subtle) {
CACHE_MANAGER_CHECK(0);
- typedef rpc::policy_table_interface_base::NumberOfNotificationsPerMinute NNPM;
sync_primitives::AutoLock auto_lock(cache_lock_);
- const NNPM& nnpm =
- pt_->policy_table.module_config.notifications_per_minute_by_priority;
+ const auto& module_config = pt_->policy_table.module_config;
+ const auto& nnpm =
+ is_subtle && module_config.subtle_notifications_per_minute_by_priority
+ .is_initialized()
+ ? *module_config.subtle_notifications_per_minute_by_priority
+ : module_config.notifications_per_minute_by_priority;
- NNPM::const_iterator priority_iter = nnpm.find(priority);
+ auto priority_iter = nnpm.find(priority);
- const rpc::policy_table_interface_base::NumberOfNotificationsType result =
+ const uint32_t result =
(nnpm.end() != priority_iter ? (*priority_iter).second : 0u);
return result;
}
@@ -1140,10 +1138,6 @@ bool CacheManager::GetPriority(const std::string& policy_app_id,
void CacheManager::CheckSnapshotInitialization() {
CACHE_MANAGER_CHECK_VOID();
- if (!snapshot_) {
- LOG4CXX_ERROR(logger_, "Snapshot pointer is not initialized");
- return;
- }
*(snapshot_->policy_table.module_config.preloaded_pt) = false;
@@ -1173,8 +1167,7 @@ void CacheManager::CheckSnapshotInitialization() {
snapshot_->policy_table.consumer_friendly_messages->messages =
rpc::Optional<policy_table::Messages>();
} else {
- LOG4CXX_WARN(logger_,
- "policy_table.consumer_friendly_messages is not initialized");
+ SDL_LOG_WARN("policy_table.consumer_friendly_messages is not initialized");
}
/* policy_table.usage_and_error_counts are required for PTS and
@@ -1252,22 +1245,21 @@ void CacheManager::CheckSnapshotInitialization() {
}
}
} else {
- LOG4CXX_WARN(logger_, "app_level is not initialized");
+ SDL_LOG_WARN("app_level is not initialized");
}
}
policy_table::VehicleDataItems CacheManager::CalculateCustomVdItemsDiff(
const policy_table::VehicleDataItems& items_before,
const policy_table::VehicleDataItems& items_after) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (items_before.empty()) {
- LOG4CXX_DEBUG(logger_, "No custom VD items found in policy");
+ SDL_LOG_DEBUG("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");
+ SDL_LOG_DEBUG("All custom VD items were removed after policy update");
return items_before;
}
@@ -1285,19 +1277,18 @@ policy_table::VehicleDataItems CacheManager::CalculateCustomVdItemsDiff(
}
}
- LOG4CXX_DEBUG(logger_,
- "Found " << removed_items.size() << " removed VD items");
+ SDL_LOG_DEBUG("Found " << removed_items.size() << " removed VD items");
return removed_items;
}
void CacheManager::SetRemovedCustomVdItems(
const policy_table::VehicleDataItems& removed_items) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
removed_custom_vd_items_ = removed_items;
}
void CacheManager::PersistData() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (backup_.use_count() != 0) {
if (pt_.use_count() != 0) {
// Comma expression is used to hold the lock only during the constructor
@@ -1314,8 +1305,6 @@ void CacheManager::PersistData() {
copy_pt.policy_table.app_policies_section.apps.end();
bool is_revoked = false;
- bool is_default_policy;
- bool is_predata_policy;
for (; app_policy_iter != app_policy_iter_end; ++app_policy_iter) {
const std::string app_id = (*app_policy_iter).first;
@@ -1326,7 +1315,7 @@ void CacheManager::PersistData() {
copy_pt.policy_table.app_policies_section.apps[app_id].is_null();
}
- is_default_policy =
+ bool is_default_policy =
copy_pt.policy_table.app_policies_section.apps.end() !=
copy_pt.policy_table.app_policies_section.apps.find(app_id) &&
policy::kDefaultId ==
@@ -1334,7 +1323,7 @@ void CacheManager::PersistData() {
.get_string();
// TODO(AOleynik): Remove this field from DB
- is_predata_policy =
+ bool is_predata_policy =
copy_pt.policy_table.app_policies_section.apps.end() !=
copy_pt.policy_table.app_policies_section.apps.find(app_id) &&
policy::kPreDataConsentId ==
@@ -1346,6 +1335,8 @@ void CacheManager::PersistData() {
is_revoked = false;
}
+ backup_->SetMetaInfo(*(*copy_pt.policy_table.module_meta).ccpu_version);
+
// In case of extended policy the meta info should be backuped as well.
backup_->WriteDb();
}
@@ -1353,7 +1344,7 @@ void CacheManager::PersistData() {
}
void CacheManager::ResetCalculatedPermissions() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(calculated_permissions_lock_);
calculated_permissions_.clear();
}
@@ -1361,9 +1352,8 @@ void CacheManager::ResetCalculatedPermissions() {
void CacheManager::AddCalculatedPermissions(const std::string& device_id,
const std::string& policy_app_id,
const Permissions& permissions) {
- LOG4CXX_DEBUG(logger_,
- "AddCalculatedPermissions for device: "
- << device_id << " and app: " << policy_app_id);
+ SDL_LOG_DEBUG("AddCalculatedPermissions for device: "
+ << device_id << " and app: " << policy_app_id);
sync_primitives::AutoLock lock(calculated_permissions_lock_);
calculated_permissions_[device_id][policy_app_id] = permissions;
}
@@ -1371,9 +1361,8 @@ void CacheManager::AddCalculatedPermissions(const std::string& device_id,
bool CacheManager::IsPermissionsCalculated(const std::string& device_id,
const std::string& policy_app_id,
Permissions& permission) {
- LOG4CXX_DEBUG(logger_,
- "IsPermissionsCalculated for device: "
- << device_id << " and app: " << policy_app_id);
+ SDL_LOG_DEBUG("IsPermissionsCalculated for device: "
+ << device_id << " and app: " << policy_app_id);
sync_primitives::AutoLock lock(calculated_permissions_lock_);
CalculatedPermissions::const_iterator it =
calculated_permissions_.find(device_id);
@@ -1437,7 +1426,7 @@ std::shared_ptr<policy_table::Table> CacheManager::GenerateSnapshot() {
bool CacheManager::GetInitialAppData(const std::string& app_id,
StringArray& nicknames,
StringArray& app_hmi_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
sync_primitives::AutoLock auto_lock(cache_lock_);
policy_table::ApplicationPolicies::const_iterator policy_iter =
@@ -1460,7 +1449,7 @@ bool CacheManager::GetInitialAppData(const std::string& app_id,
bool CacheManager::GetFunctionalGroupings(
policy_table::FunctionalGroupings& groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
sync_primitives::AutoLock auto_lock(cache_lock_);
const policy_table::FunctionalGroupings& f_groupings =
@@ -1472,27 +1461,41 @@ bool CacheManager::GetFunctionalGroupings(
int CacheManager::CountUnconsentedGroups(const std::string& policy_app_id,
const std::string& device_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
- LOG4CXX_DEBUG(logger_, "Application id: " << policy_app_id);
+ SDL_LOG_DEBUG("Application id: " << policy_app_id);
int result = 0;
return result;
}
+void CacheManager::SetPreloadedPtFlag(const bool is_preloaded) {
+ SDL_LOG_AUTO_TRACE();
+ *(pt_->policy_table.module_config.preloaded_pt) = is_preloaded;
+ Backup();
+}
+
bool CacheManager::SetMetaInfo(const std::string& ccpu_version,
const std::string& wers_country_code,
const std::string& language) {
CACHE_MANAGER_CHECK(false);
sync_primitives::AutoLock auto_lock(cache_lock_);
-
+ rpc::Optional<policy_table::ModuleMeta>& module_meta =
+ pt_->policy_table.module_meta;
+ *(module_meta->ccpu_version) = ccpu_version;
// We have to set preloaded flag as false in policy table on any response
// of GetSystemInfo (SDLAQ-CRS-2365)
- *pt_->policy_table.module_config.preloaded_pt = false;
-
+ *(pt_->policy_table.module_config.preloaded_pt) = false;
Backup();
return true;
}
+std::string CacheManager::GetCCPUVersionFromPT() const {
+ SDL_LOG_AUTO_TRACE();
+ rpc::Optional<policy_table::ModuleMeta>& module_meta =
+ pt_->policy_table.module_meta;
+ return *(module_meta->ccpu_version);
+}
+
bool CacheManager::IsMetaInfoPresent() const {
CACHE_MANAGER_CHECK(false);
bool result = true;
@@ -1506,7 +1509,7 @@ bool CacheManager::SetSystemLanguage(const std::string& language) {
}
bool CacheManager::GetFunctionalGroupNames(FunctionalGroupNames& names) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK(false);
sync_primitives::AutoLock auto_lock(cache_lock_);
rpc::policy_table_interface_base::FunctionalGroupings::iterator iter =
@@ -1578,7 +1581,7 @@ void CacheManager::Increment(const std::string& app_id,
.count_of_tls_errors;
break;
default:
- LOG4CXX_WARN(logger_, "Type app counter is unknown");
+ SDL_LOG_WARN("Type app counter is unknown");
return;
}
Backup();
@@ -1599,7 +1602,7 @@ void CacheManager::Set(const std::string& app_id,
.app_registration_language_vui = value;
break;
default:
- LOG4CXX_WARN(logger_, "Type app info is unknown");
+ SDL_LOG_WARN("Type app info is unknown");
return;
}
Backup();
@@ -1629,7 +1632,7 @@ void CacheManager::Add(const std::string& app_id,
.minutes_in_hmi_none += minutes;
break;
default:
- LOG4CXX_WARN(logger_, "Type app stopwatch is unknown");
+ SDL_LOG_WARN("Type app stopwatch is unknown");
return;
}
Backup();
@@ -1686,8 +1689,7 @@ bool CacheManager::SetPredataPolicy(const std::string& app_id) {
pt_->policy_table.app_policies_section.apps.find(kPreDataConsentId);
if (pt_->policy_table.app_policies_section.apps.end() == iter) {
- LOG4CXX_ERROR(logger_,
- "Could not set " << kPreDataConsentId
+ SDL_LOG_ERROR("Could not set " << kPreDataConsentId
<< " permissions for app " << app_id);
return false;
}
@@ -1736,20 +1738,18 @@ bool CacheManager::SetUnpairedDevice(const std::string& device_id,
const bool result = pt_->policy_table.device_data->end() !=
pt_->policy_table.device_data->find(device_id);
if (!result) {
- LOG4CXX_DEBUG(logger_,
- "Couldn't set unpaired flag for device id "
- << device_id << " , since it wasn't found.");
+ SDL_LOG_DEBUG("Couldn't set unpaired flag for device id "
+ << device_id << " , since it wasn't found.");
return false;
}
sync_primitives::AutoLock lock(unpaired_lock_);
if (unpaired) {
is_unpaired_.insert(device_id);
- LOG4CXX_DEBUG(logger_, "Unpaired flag was set for device id " << device_id);
+ SDL_LOG_DEBUG("Unpaired flag was set for device id " << device_id);
} else {
is_unpaired_.erase(device_id);
- LOG4CXX_DEBUG(logger_,
- "Unpaired flag was removed for device id " << device_id);
+ SDL_LOG_DEBUG("Unpaired flag was removed for device id " << device_id);
}
return result;
}
@@ -1773,20 +1773,20 @@ bool CacheManager::IsApplicationRepresented(const std::string& app_id) const {
bool CacheManager::Init(const std::string& file_name,
const PolicySettings* settings) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
settings_ = settings;
InitResult init_result = backup_->Init(settings);
bool result = true;
switch (init_result) {
case InitResult::EXISTS: {
- LOG4CXX_INFO(logger_, "Policy Table exists, was loaded correctly.");
+ SDL_LOG_INFO("Policy Table exists, was loaded correctly.");
result = LoadFromBackup();
if (result) {
if (!backup_->IsDBVersionActual()) {
- LOG4CXX_INFO(logger_, "DB version is NOT actual");
+ SDL_LOG_INFO("DB version is NOT actual");
if (!backup_->RefreshDB()) {
- LOG4CXX_ERROR(logger_, "RefreshDB() failed");
+ SDL_LOG_ERROR("RefreshDB() failed");
return false;
}
backup_->UpdateDBVersion();
@@ -1798,24 +1798,22 @@ bool CacheManager::Init(const std::string& file_name,
}
} break;
case InitResult::SUCCESS: {
- LOG4CXX_INFO(logger_, "Policy Table was inited successfully");
+ SDL_LOG_INFO("Policy Table was inited successfully");
result = LoadFromFile(file_name, *pt_);
std::shared_ptr<policy_table::Table> snapshot = GenerateSnapshot();
result &= snapshot->is_valid();
- LOG4CXX_DEBUG(logger_,
- "Check if snapshot is valid: " << std::boolalpha << result);
+ SDL_LOG_DEBUG("Check if snapshot is valid: " << std::boolalpha << result);
if (!result) {
rpc::ValidationReport report("policy_table");
snapshot->ReportErrors(&report);
- LOG4CXX_DEBUG(logger_,
- "Validation report: " << rpc::PrettyFormat(report));
+ SDL_LOG_DEBUG("Validation report: " << rpc::PrettyFormat(report));
return result;
}
if (!UnwrapAppPolicies(pt_->policy_table.app_policies_section.apps)) {
- LOG4CXX_ERROR(logger_, "Cannot unwrap application policies");
+ SDL_LOG_ERROR("Cannot unwrap application policies");
}
backup_->UpdateDBVersion();
@@ -1823,7 +1821,7 @@ bool CacheManager::Init(const std::string& file_name,
} break;
default: {
result = false;
- LOG4CXX_ERROR(logger_, "Failed to init policy table.");
+ SDL_LOG_ERROR("Failed to init policy table.");
} break;
}
@@ -1833,12 +1831,11 @@ bool CacheManager::Init(const std::string& file_name,
void CacheManager::FillDeviceSpecificData() {}
bool CacheManager::LoadFromBackup() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(cache_lock_);
pt_ = backup_->GenerateSnapshot();
update_required = backup_->UpdateRequired();
- LOG4CXX_DEBUG(logger_,
- "Update required flag from backup: " << std::boolalpha
+ SDL_LOG_DEBUG("Update required flag from backup: " << std::boolalpha
<< update_required);
FillDeviceSpecificData();
@@ -1868,10 +1865,10 @@ void CacheManager::MakeLowerCaseAppNames(policy_table::Table& pt) const {
bool CacheManager::LoadFromFile(const std::string& file_name,
policy_table::Table& table) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
BinaryMessage json_string;
if (!file_system::ReadBinaryFile(file_name, json_string)) {
- LOG4CXX_FATAL(logger_, "Failed to read pt file.");
+ SDL_LOG_FATAL("Failed to read pt file.");
return false;
}
@@ -1884,27 +1881,25 @@ bool CacheManager::LoadFromFile(const std::string& file_name,
std::string json(json_string.begin(), json_string.end());
const size_t json_len = json.length();
if (!reader->parse(json.c_str(), json.c_str() + json_len, &value, &err)) {
- LOG4CXX_FATAL(logger_, "Preloaded PT is corrupted: " << err);
+ SDL_LOG_FATAL("Preloaded PT is corrupted: " << err);
return false;
}
- LOG4CXX_TRACE(logger_, "Start create PT");
+ SDL_LOG_TRACE("Start create PT");
sync_primitives::AutoLock locker(cache_lock_);
table = policy_table::Table(&value);
Json::StreamWriterBuilder writer_builder;
- LOG4CXX_DEBUG(logger_, "PT out:");
- LOG4CXX_DEBUG(logger_,
- Json::writeString(writer_builder, table.ToJsonValue()));
+ SDL_LOG_DEBUG("PT out:");
+ SDL_LOG_DEBUG(Json::writeString(writer_builder, table.ToJsonValue()));
MakeLowerCaseAppNames(table);
if (!table.is_valid()) {
rpc::ValidationReport report("policy_table");
table.ReportErrors(&report);
- LOG4CXX_FATAL(logger_,
- "Parsed table is not valid " << rpc::PrettyFormat(report));
+ SDL_LOG_FATAL("Parsed table is not valid " << rpc::PrettyFormat(report));
return false;
}
@@ -1942,25 +1937,22 @@ int32_t CacheManager::GenerateHash(const std::string& str_to_hash) {
RequestType::State CacheManager::GetAppRequestTypesState(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
policy_table::ApplicationPolicies::iterator app_policies_iter =
pt_->policy_table.app_policies_section.apps.find(policy_app_id);
if (pt_->policy_table.app_policies_section.apps.end() == app_policies_iter) {
- LOG4CXX_DEBUG(logger_,
- "Can't find request types for app_id " << policy_app_id);
+ SDL_LOG_DEBUG("Can't find request types for app_id " << policy_app_id);
return RequestType::State::UNAVAILABLE;
}
const policy_table::RequestTypes& request_types =
*app_policies_iter->second.RequestType;
if (!request_types.is_initialized()) {
- LOG4CXX_DEBUG(logger_,
- "Request types for " << policy_app_id << " are OMITTED");
+ SDL_LOG_DEBUG("Request types for " << policy_app_id << " are OMITTED");
return RequestType::State::OMITTED;
}
if (request_types.empty()) {
- LOG4CXX_DEBUG(logger_,
- "Request types for " << policy_app_id << " are EMPTY");
+ SDL_LOG_DEBUG("Request types for " << policy_app_id << " are EMPTY");
return RequestType::State::EMPTY;
}
return RequestType::State::AVAILABLE;
@@ -1969,19 +1961,17 @@ RequestType::State CacheManager::GetAppRequestTypesState(
void CacheManager::GetAppRequestTypes(
const std::string& policy_app_id,
std::vector<std::string>& request_types) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
sync_primitives::AutoLock auto_lock(cache_lock_);
if (kDeviceId == policy_app_id) {
- LOG4CXX_DEBUG(logger_,
- "Request types not applicable for app_id " << kDeviceId);
+ SDL_LOG_DEBUG("Request types not applicable for app_id " << kDeviceId);
return;
}
policy_table::ApplicationPolicies::iterator policy_iter =
pt_->policy_table.app_policies_section.apps.find(policy_app_id);
if (pt_->policy_table.app_policies_section.apps.end() == policy_iter) {
- LOG4CXX_DEBUG(logger_,
- "Can't find request types for app_id " << policy_app_id);
+ SDL_LOG_DEBUG("Can't find request types for app_id " << policy_app_id);
return;
}
@@ -1993,25 +1983,22 @@ void CacheManager::GetAppRequestTypes(
RequestSubType::State CacheManager::GetAppRequestSubTypesState(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
policy_table::ApplicationPolicies::iterator app_policies_iter =
pt_->policy_table.app_policies_section.apps.find(policy_app_id);
if (pt_->policy_table.app_policies_section.apps.end() == app_policies_iter) {
- LOG4CXX_DEBUG(logger_,
- "Can't find request subtypes for app_id " << policy_app_id);
+ SDL_LOG_DEBUG("Can't find request subtypes for app_id " << policy_app_id);
return RequestSubType::State::UNAVAILABLE;
}
const policy_table::RequestSubTypes& request_subtypes =
*app_policies_iter->second.RequestSubType;
if (!request_subtypes.is_initialized()) {
- LOG4CXX_DEBUG(logger_,
- "Request subtypes for " << policy_app_id << " are OMITTED");
+ SDL_LOG_DEBUG("Request subtypes for " << policy_app_id << " are OMITTED");
return RequestSubType::State::OMITTED;
}
if (request_subtypes.empty()) {
- LOG4CXX_DEBUG(logger_,
- "Request subtypes for " << policy_app_id << " are EMPTY");
+ SDL_LOG_DEBUG("Request subtypes for " << policy_app_id << " are EMPTY");
return RequestSubType::State::EMPTY;
}
return RequestSubType::State::AVAILABLE;
@@ -2020,19 +2007,17 @@ RequestSubType::State CacheManager::GetAppRequestSubTypesState(
void CacheManager::GetAppRequestSubTypes(
const std::string& policy_app_id,
std::vector<std::string>& request_types) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
CACHE_MANAGER_CHECK_VOID();
sync_primitives::AutoLock auto_lock(cache_lock_);
if (kDeviceId == policy_app_id) {
- LOG4CXX_DEBUG(logger_,
- "Request subtypes not applicable for app_id " << kDeviceId);
+ SDL_LOG_DEBUG("Request subtypes not applicable for app_id " << kDeviceId);
return;
}
policy_table::ApplicationPolicies::iterator policy_iter =
pt_->policy_table.app_policies_section.apps.find(policy_app_id);
if (pt_->policy_table.app_policies_section.apps.end() == policy_iter) {
- LOG4CXX_DEBUG(logger_,
- "Can't find request subtypes for app_id " << policy_app_id);
+ SDL_LOG_DEBUG("Can't find request subtypes for app_id " << policy_app_id);
return;
}
@@ -2052,10 +2037,10 @@ std::string CacheManager::GetCertificate() const {
}
bool CacheManager::MergePreloadPT(const std::string& file_name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
policy_table::Table table;
if (!LoadFromFile(file_name, table)) {
- LOG4CXX_DEBUG(logger_, "Unable to load preloaded PT.");
+ SDL_LOG_DEBUG("Unable to load preloaded PT.");
return false;
}
@@ -2077,7 +2062,7 @@ bool CacheManager::MergePreloadPT(const std::string& file_name) {
void CacheManager::MergeMC(const policy_table::PolicyTable& new_pt,
policy_table::PolicyTable& pt) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
policy_table::ModuleConfig copy(pt.module_config);
pt.module_config = new_pt.module_config;
@@ -2088,19 +2073,19 @@ void CacheManager::MergeMC(const policy_table::PolicyTable& new_pt,
void CacheManager::MergeFG(const policy_table::PolicyTable& new_pt,
policy_table::PolicyTable& pt) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
policy_table::FunctionalGroupings::const_iterator it =
new_pt.functional_groupings.begin();
for (; it != new_pt.functional_groupings.end(); ++it) {
- LOG4CXX_DEBUG(logger_, "Merge functional group: " << it->first);
+ SDL_LOG_DEBUG("Merge functional group: " << it->first);
pt.functional_groupings[it->first] = it->second;
}
}
void CacheManager::MergeAP(const policy_table::PolicyTable& new_pt,
policy_table::PolicyTable& pt) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
pt.app_policies_section.device =
const_cast<policy_table::PolicyTable&>(new_pt)
.app_policies_section.device;
@@ -2116,7 +2101,7 @@ void CacheManager::MergeAP(const policy_table::PolicyTable& new_pt,
void CacheManager::MergeCFM(const policy_table::PolicyTable& new_pt,
policy_table::PolicyTable& pt) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (new_pt.consumer_friendly_messages.is_initialized()) {
if (!pt.consumer_friendly_messages.is_initialized()) {
pt.consumer_friendly_messages = new_pt.consumer_friendly_messages;
@@ -2127,9 +2112,9 @@ void CacheManager::MergeCFM(const policy_table::PolicyTable& new_pt,
pt.consumer_friendly_messages->version =
new_pt.consumer_friendly_messages->version;
for (; it != new_pt.consumer_friendly_messages->messages->end(); ++it) {
- LOG4CXX_DEBUG(logger_, "Merge CFM: " << it->first);
+ SDL_LOG_DEBUG("Merge CFM: " << it->first);
if (!(pt.consumer_friendly_messages->messages.is_initialized())) {
- LOG4CXX_DEBUG(logger_, "CFM not initialized.");
+ SDL_LOG_DEBUG("CFM not initialized.");
}
(*pt.consumer_friendly_messages->messages)[it->first] = it->second;
}
@@ -2139,7 +2124,7 @@ void CacheManager::MergeCFM(const policy_table::PolicyTable& new_pt,
void CacheManager::MergeVD(const policy_table::PolicyTable& new_pt,
policy_table::PolicyTable& pt) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
pt.vehicle_data.assign_if_valid(new_pt.vehicle_data);
}
@@ -2151,8 +2136,8 @@ const PolicySettings& CacheManager::get_settings() const {
void CacheManager::OnDeviceSwitching(const std::string& device_id_from,
const std::string& device_id_to) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_INFO(logger_, "Implementation does not support user consents.");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_INFO("Implementation does not support user consents.");
}
CacheManager::BackgroundBackuper::BackgroundBackuper(
@@ -2160,26 +2145,26 @@ CacheManager::BackgroundBackuper::BackgroundBackuper(
: cache_manager_(cache_manager)
, stop_flag_(false)
, new_data_available_(false) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
CacheManager::BackgroundBackuper::~BackgroundBackuper() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
void CacheManager::BackgroundBackuper::InternalBackup() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(cache_manager_);
while (new_data_available_) {
new_data_available_ = false;
- LOG4CXX_DEBUG(logger_, "DoBackup");
+ SDL_LOG_DEBUG("DoBackup");
cache_manager_->PersistData();
}
}
void CacheManager::BackgroundBackuper::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(need_backup_lock_);
while (!stop_flag_) {
{
@@ -2189,20 +2174,20 @@ void CacheManager::BackgroundBackuper::threadMain() {
if (new_data_available_ || stop_flag_) {
continue;
}
- LOG4CXX_DEBUG(logger_, "Wait for a next backup");
+ SDL_LOG_DEBUG("Wait for a next backup");
backup_notifier_.Wait(need_backup_lock_);
}
}
void CacheManager::BackgroundBackuper::exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(need_backup_lock_);
stop_flag_ = true;
backup_notifier_.NotifyOne();
}
void CacheManager::BackgroundBackuper::DoBackup() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(need_backup_lock_);
new_data_available_ = true;
backup_notifier_.NotifyOne();
@@ -2210,7 +2195,7 @@ void CacheManager::BackgroundBackuper::DoBackup() {
EncryptionRequired CacheManager::GetAppEncryptionRequiredFlag(
const std::string& application) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
return pt_->policy_table.app_policies_section.apps[application]
@@ -2219,14 +2204,14 @@ EncryptionRequired CacheManager::GetAppEncryptionRequiredFlag(
EncryptionRequired CacheManager::GetFunctionalGroupingEncryptionRequiredFlag(
const std::string& functional_group) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
const auto& functional_groupings = pt_->policy_table.functional_groupings;
const auto& grouping_itr = functional_groupings.find(functional_group);
if (grouping_itr == functional_groupings.end()) {
- LOG4CXX_WARN(logger_, "Group " << functional_group << " not found");
+ SDL_LOG_WARN("Group " << functional_group << " not found");
return EncryptionRequired(rpc::Boolean(false));
}
@@ -2236,14 +2221,13 @@ EncryptionRequired CacheManager::GetFunctionalGroupingEncryptionRequiredFlag(
void CacheManager::GetApplicationParams(
const std::string& application_name,
policy_table::ApplicationParams& application_params) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(cache_lock_);
const auto apps = pt_->policy_table.app_policies_section.apps;
const auto it = apps.find(application_name);
if (apps.end() == it) {
- LOG4CXX_WARN(logger_,
- "Application " << application_name << " was not found");
+ SDL_LOG_WARN("Application " << application_name << " was not found");
return;
}
diff --git a/src/components/policy/policy_regular/src/policy_helper.cc b/src/components/policy/policy_regular/src/policy_helper.cc
index 08f1fbb177..a5d66fafba 100644
--- a/src/components/policy/policy_regular/src/policy_helper.cc
+++ b/src/components/policy/policy_regular/src/policy_helper.cc
@@ -44,7 +44,7 @@ namespace custom_str = utils::custom_string;
namespace {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Policy")
+SDL_CREATE_LOG_VARIABLE("Policy")
bool CompareStrings(const StringsValueType& first,
const StringsValueType& second) {
@@ -54,9 +54,10 @@ bool CompareStrings(const StringsValueType& first,
}
struct CheckGroupName {
- CheckGroupName(const policy::StringsValueType& value) : value_(value) {}
+ explicit CheckGroupName(const policy::StringsValueType& value)
+ : value_(value) {}
- bool operator()(const FunctionalGroupNames::value_type& value) {
+ bool operator()(const FunctionalGroupNames::value_type& value) const {
return value.second.second == std::string(value_);
}
@@ -101,25 +102,6 @@ bool CompareGroupName::operator()(
return !(strcasecmp(gn_.c_str(), gn_compare.c_str()));
}
-bool operator!=(const policy_table::ApplicationParams& first,
- const policy_table::ApplicationParams& second) {
- if (first.groups.size() != second.groups.size()) {
- return true;
- }
- StringsConstItr it_first = first.groups.begin();
- StringsConstItr it_first_end = first.groups.end();
- StringsConstItr it_second = second.groups.begin();
- StringsConstItr it_second_end = second.groups.end();
- for (; it_first != it_first_end; ++it_first) {
- CompareGroupName gp(*it_first);
- StringsConstItr it = std::find_if(it_second, it_second_end, gp);
- if (it_second_end == it) {
- return true;
- }
- }
- return false;
-}
-
CheckAppPolicy::CheckAppPolicy(
PolicyManagerImpl* pm,
const std::shared_ptr<policy_table::Table> update,
@@ -302,7 +284,7 @@ std::vector<FunctionalGroupPermission> policy::CheckAppPolicy::GetRevokedGroups(
FunctionalGroupNames groups_attributes;
if (!pm_->cache_->GetFunctionalGroupNames(groups_attributes)) {
- LOG4CXX_WARN(logger_, "Can't get functional group names");
+ SDL_LOG_WARN("Can't get functional group names");
return std::vector<FunctionalGroupPermission>();
}
@@ -339,8 +321,7 @@ void policy::CheckAppPolicy::NotifySystem(
auto& listener = *pm_->listener();
const auto devices_ids = listener.GetDevicesIds(app_policy.first);
if (devices_ids.empty()) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Couldn't find device info for application id: " << app_policy.first);
return;
}
@@ -352,7 +333,7 @@ void policy::CheckAppPolicy::NotifySystem(
bool CheckAppPolicy::IsAppRevoked(
const AppPoliciesValueType& app_policy) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Application params are not initialized = application revoked
// i.e. "123":null
return app_policy.second.is_null();
@@ -380,7 +361,7 @@ bool CheckAppPolicy::NicknamesMatch(
void CheckAppPolicy::AddResult(const std::string& app_id,
PermissionsCheckResult result) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto item = std::make_pair(app_id, result);
out_results_.insert(item);
}
@@ -395,8 +376,7 @@ bool CheckAppPolicy::operator()(const AppPoliciesValueType& app_policy) {
}
if (!IsKnownAppication(app_id)) {
- LOG4CXX_WARN(logger_,
- "Application:" << app_id << " is not present in snapshot.");
+ SDL_LOG_WARN("Application:" << app_id << " is not present in snapshot.");
return true;
}
@@ -427,16 +407,14 @@ bool CheckAppPolicy::operator()(const AppPoliciesValueType& app_policy) {
}
}
if (RESULT_NO_CHANGES == result) {
- LOG4CXX_INFO(
- logger_,
- "Permissions for application:" << app_id << " wasn't changed.");
+ SDL_LOG_INFO("Permissions for application:" << app_id
+ << " wasn't changed.");
AddResult(app_id, RESULT_NO_CHANGES);
return true;
}
- LOG4CXX_INFO(
- logger_,
- "Permissions for application:" << app_id << " have been changed.");
+ SDL_LOG_INFO("Permissions for application:" << app_id
+ << " have been changed.");
if (IsPredefinedApp(app_policy)) {
const auto& snapshot_app_policy_begin =
@@ -562,8 +540,7 @@ bool CheckAppPolicy::IsConsentRequired(const std::string& app_id,
return false;
}
- bool is_preconsented = false;
- return it->second.user_consent_prompt.is_initialized() && !is_preconsented;
+ return it->second.user_consent_prompt.is_initialized();
}
bool CheckAppPolicy::IsRequestTypeChanged(
@@ -616,7 +593,7 @@ bool CheckAppPolicy::IsRequestSubTypeChanged(
bool CheckAppPolicy::IsAppPropertiesProvided(
const AppPoliciesValueType& app_policy) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (app_policy.second.hybrid_app_preference.is_initialized() ||
app_policy.second.endpoint.is_initialized() ||
app_policy.second.enabled.is_initialized() ||
@@ -630,15 +607,14 @@ bool CheckAppPolicy::IsAppPropertiesProvided(
bool CheckAppPolicy::IsAppPropertiesChanged(
const AppPoliciesValueType& app_policy) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!IsAppPropertiesProvided(app_policy)) {
return false;
}
if (!IsKnownAppication(app_policy.first)) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"AppProperties provided for new application: " << app_policy.first);
return true;
}
@@ -649,33 +625,33 @@ bool CheckAppPolicy::IsAppPropertiesChanged(
if (app_policy.second.enabled.is_initialized() &&
app_policy.second.enabled != snapshot_properties.second.enabled) {
- LOG4CXX_DEBUG(logger_, "\"enabled\" was changed");
+ SDL_LOG_DEBUG("\"enabled\" was changed");
return true;
}
if (app_policy.second.endpoint.is_initialized() &&
app_policy.second.endpoint != snapshot_properties.second.endpoint) {
- LOG4CXX_DEBUG(logger_, "\"endpoint\" was changed");
+ SDL_LOG_DEBUG("\"endpoint\" was changed");
return true;
}
if (app_policy.second.hybrid_app_preference.is_initialized() &&
app_policy.second.hybrid_app_preference !=
snapshot_properties.second.hybrid_app_preference) {
- LOG4CXX_DEBUG(logger_, "\"hybrid_app_preference\" was changed");
+ SDL_LOG_DEBUG("\"hybrid_app_preference\" was changed");
return true;
}
if (app_policy.second.auth_token.is_initialized() &&
app_policy.second.auth_token != snapshot_properties.second.auth_token) {
- LOG4CXX_DEBUG(logger_, "\"auth_token\" was changed");
+ SDL_LOG_DEBUG("\"auth_token\" was changed");
return true;
}
if (app_policy.second.cloud_transport_type.is_initialized() &&
app_policy.second.cloud_transport_type !=
snapshot_properties.second.cloud_transport_type) {
- LOG4CXX_DEBUG(logger_, "\"cloud_transport_type\" was changed");
+ SDL_LOG_DEBUG("\"cloud_transport_type\" was changed");
return true;
}
@@ -690,7 +666,7 @@ bool CheckAppPolicy::IsEncryptionRequiredFlagChanged(
-> rpc::Optional<rpc::Boolean> {
auto it = policies.find(policy_app_id);
if (policies.end() == it) {
- LOG4CXX_WARN(logger_, "App is not present in policies" << policy_app_id);
+ SDL_LOG_WARN("App is not present in policies " << policy_app_id);
return rpc::Optional<rpc::Boolean>(false);
}
return it->second.encryption_required;
@@ -702,7 +678,7 @@ bool CheckAppPolicy::IsEncryptionRequiredFlagChanged(
policy_table::Strings result;
auto it = policies.find(policy_app_id);
if (policies.end() == it) {
- LOG4CXX_WARN(logger_, "App is not present in policies" << policy_app_id);
+ SDL_LOG_WARN("App is not present in policies " << policy_app_id);
return result;
}
auto& groups = it->second.groups;
@@ -710,7 +686,7 @@ bool CheckAppPolicy::IsEncryptionRequiredFlagChanged(
return result;
};
- auto get_app_rpcs = [](const std::string group_name,
+ auto get_app_rpcs = [](const std::string& group_name,
const FunctionalGroupings& groups)
-> rpc::Optional<policy_table::Rpcs> {
auto it = groups.find(group_name);
@@ -1047,7 +1023,7 @@ void FillFunctionalGroupPermissions(
FunctionalGroupNames& names,
GroupConsent state,
std::vector<FunctionalGroupPermission>& permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
FunctionalGroupIDs::const_iterator it = ids.begin();
FunctionalGroupIDs::const_iterator it_end = ids.end();
for (; it != it_end; ++it) {
@@ -1067,7 +1043,7 @@ bool IsPredefinedApp(const AppPoliciesValueType& app) {
FunctionalGroupIDs ExcludeSame(const FunctionalGroupIDs& from,
const FunctionalGroupIDs& what) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
FunctionalGroupIDs from_copy(from);
FunctionalGroupIDs what_copy(what);
@@ -1089,7 +1065,7 @@ FunctionalGroupIDs ExcludeSame(const FunctionalGroupIDs& from,
FunctionalGroupIDs Merge(const FunctionalGroupIDs& first,
const FunctionalGroupIDs& second) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
FunctionalGroupIDs first_copy(first);
FunctionalGroupIDs second_copy(second);
@@ -1109,28 +1085,6 @@ FunctionalGroupIDs Merge(const FunctionalGroupIDs& first,
return merged;
}
-FunctionalGroupIDs FindSame(const FunctionalGroupIDs& first,
- const FunctionalGroupIDs& second) {
- LOG4CXX_INFO(logger_, "Find same groups");
- FunctionalGroupIDs first_copy(first);
- FunctionalGroupIDs second_copy(second);
-
- std::sort(first_copy.begin(), first_copy.end());
- std::sort(second_copy.begin(), second_copy.end());
-
- FunctionalGroupIDs same;
- std::set_intersection(first_copy.begin(),
- first_copy.end(),
- second_copy.begin(),
- second_copy.end(),
- std::back_inserter(same));
-
- same.resize(
- std::distance(same.begin(), std::unique(same.begin(), same.end())));
-
- return same;
-}
-
bool UnwrapAppPolicies(policy_table::ApplicationPolicies& app_policies) {
policy_table::ApplicationPolicies::iterator it = app_policies.begin();
policy_table::ApplicationPolicies::iterator it_default =
@@ -1142,9 +1096,9 @@ bool UnwrapAppPolicies(policy_table::ApplicationPolicies& app_policies) {
(*it).second = (*it_default).second;
it->second.set_to_string(kDefaultId);
} else {
- LOG4CXX_ERROR(logger_,
- "There is no default application policy was "
- "found in PTU.");
+ SDL_LOG_ERROR(
+ "There is no default application policy was "
+ "found in PTU.");
return false;
}
}
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 b8380b761d..059375322a 100644
--- a/src/components/policy/policy_regular/src/policy_manager_impl.cc
+++ b/src/components/policy/policy_regular/src/policy_manager_impl.cc
@@ -60,7 +60,7 @@ const uint32_t kDefaultRetryTimeoutInMSec =
namespace policy {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Policy")
+SDL_CREATE_LOG_VARIABLE("Policy")
PolicyManagerImpl::PolicyManagerImpl()
: PolicyManager()
@@ -87,7 +87,7 @@ void PolicyManagerImpl::set_listener(PolicyListener* listener) {
update_status_manager_.set_listener(listener);
}
-#ifdef USE_HMI_PTU_DECRYPTION
+#if defined USE_HMI_PTU_DECRYPTION && defined PROPRIETARY_MODE
std::shared_ptr<policy_table::Table> PolicyManagerImpl::Parse(
const BinaryMessage& pt_content) {
@@ -126,15 +126,14 @@ std::shared_ptr<policy_table::Table> PolicyManagerImpl::ParseArray(
#endif
void PolicyManagerImpl::CheckTriggers() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const bool exceed_ignition_cycles = ExceededIgnitionCycles();
const bool exceed_days = ExceededDays();
- LOG4CXX_DEBUG(
- logger_,
- "\nDays exceeded: " << std::boolalpha << exceed_days
- << "\nIgnition cycles exceeded: " << std::boolalpha
- << exceed_ignition_cycles);
+ SDL_LOG_DEBUG("\nDays exceeded: " << std::boolalpha << exceed_days
+ << "\nIgnition cycles exceeded: "
+ << std::boolalpha
+ << exceed_ignition_cycles);
if (exceed_ignition_cycles || exceed_days) {
update_status_manager_.ScheduleUpdate();
@@ -291,6 +290,12 @@ void FilterPolicyTable(
FilterInvalidPriorityValues(
module_config.notifications_per_minute_by_priority);
}
+ if (module_config.is_initialized() &&
+ module_config.subtle_notifications_per_minute_by_priority
+ .is_initialized()) {
+ FilterInvalidPriorityValues(
+ *module_config.subtle_notifications_per_minute_by_priority);
+ }
if (pt.app_policies_section.is_initialized()) {
policy_table::ApplicationPolicies& apps = pt.app_policies_section.apps;
@@ -321,12 +326,11 @@ void FilterPolicyTable(
PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT(
const std::string& file, const BinaryMessage& pt_content) {
- LOG4CXX_INFO(logger_, "LoadPT of size " << pt_content.size());
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_INFO("LoadPT of size " << pt_content.size());
+ SDL_LOG_DEBUG(
"PTU content is: " << std::string(pt_content.begin(), pt_content.end()));
-#ifdef USE_HMI_PTU_DECRYPTION
+#if defined USE_HMI_PTU_DECRYPTION && defined PROPRIETARY_MODE
// Assuemes Policy Table was parsed, formatted, and/or decrypted by
// the HMI after system request before calling OnReceivedPolicyUpdate
// Parse message into table struct
@@ -337,7 +341,7 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT(
std::shared_ptr<policy_table::Table> pt_update = ParseArray(pt_content);
#endif
if (!pt_update) {
- LOG4CXX_WARN(logger_, "Parsed table pointer is NULL.");
+ SDL_LOG_WARN("Parsed table pointer is NULL.");
;
return PtProcessingResult::kWrongPtReceived;
}
@@ -348,13 +352,13 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT(
FilterPolicyTable(pt_update->policy_table, current_vd_items);
if (!IsPTValid(pt_update, policy_table::PT_UPDATE)) {
- LOG4CXX_WARN(logger_, "Received policy table update is not valid");
+ SDL_LOG_WARN("Received policy table update is not valid");
return PtProcessingResult::kWrongPtReceived;
}
// Update finished, no need retry
if (timer_retry_sequence_.is_running()) {
- LOG4CXX_INFO(logger_, "Stop retry sequence");
+ SDL_LOG_INFO("Stop retry sequence");
timer_retry_sequence_.Stop();
}
@@ -365,8 +369,7 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT(
// Get current DB data, since it could be updated during awaiting of PTU
auto policy_table_snapshot = cache_->GenerateSnapshot();
if (!policy_table_snapshot) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed to create snapshot of policy table, trying another exchange");
return PtProcessingResult::kNewPtRequired;
}
@@ -381,8 +384,7 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT(
// Replace current data with updated
if (!cache_->ApplyUpdate(*pt_update)) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Unsuccessful save of updated policy table, trying another exchange");
return PtProcessingResult::kNewPtRequired;
}
@@ -397,10 +399,10 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT(
std::map<std::string, StringArray> app_hmi_types;
cache_->GetHMIAppTypeAfterUpdate(app_hmi_types);
if (!app_hmi_types.empty()) {
- LOG4CXX_INFO(logger_, "app_hmi_types is full calling OnUpdateHMIAppType");
+ SDL_LOG_INFO("app_hmi_types is full calling OnUpdateHMIAppType");
listener_->OnUpdateHMIAppType(app_hmi_types);
} else {
- LOG4CXX_INFO(logger_, "app_hmi_types empty" << pt_content.size());
+ SDL_LOG_INFO("app_hmi_types empty" << pt_content.size());
}
std::vector<std::string> enabled_apps;
@@ -413,10 +415,10 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT(
}
void PolicyManagerImpl::OnPTUFinished(const PtProcessingResult ptu_result) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ptu_requested_ = false;
if (PtProcessingResult::kWrongPtReceived == ptu_result) {
- LOG4CXX_DEBUG(logger_, "Wrong PT was received");
+ SDL_LOG_DEBUG("Wrong PT was received");
update_status_manager_.OnWrongUpdateReceived();
return;
}
@@ -424,7 +426,7 @@ void PolicyManagerImpl::OnPTUFinished(const PtProcessingResult ptu_result) {
update_status_manager_.OnValidUpdateReceived();
if (PtProcessingResult::kNewPtRequired == ptu_result) {
- LOG4CXX_DEBUG(logger_, "New PTU interation is required");
+ SDL_LOG_DEBUG("New PTU interation is required");
ForcePTExchange();
return;
}
@@ -434,8 +436,7 @@ void PolicyManagerImpl::OnPTUFinished(const PtProcessingResult ptu_result) {
// If there was a user request for policy table update, it should be started
// right after current update is finished
if (update_status_manager_.IsUpdateRequired() && HasApplicationForPTU()) {
- LOG4CXX_DEBUG(logger_,
- "PTU was successful and new PTU iteration was scheduled");
+ SDL_LOG_DEBUG("PTU was successful and new PTU iteration was scheduled");
StartPTExchange();
return;
}
@@ -446,7 +447,7 @@ void PolicyManagerImpl::OnPTUFinished(const PtProcessingResult ptu_result) {
void PolicyManagerImpl::ProcessAppPolicyCheckResults(
const CheckAppPolicyResults& results,
const rpc::policy_table_interface_base::ApplicationPolicies& app_policies) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationsPoliciesActions actions_for_apps_policies;
FillActionsForAppPolicies filler(actions_for_apps_policies, app_policies);
@@ -502,12 +503,12 @@ void PolicyManagerImpl::ProcessActionsForAppPolicies(
void PolicyManagerImpl::SendOnAppPropertiesChangeNotification(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
listener_->SendOnAppPropertiesChangeNotification(policy_app_id);
}
void PolicyManagerImpl::ResumePendingAppPolicyActions() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
for (auto& notify_system_params : notify_system_list_) {
NotifySystem(notify_system_params.first, notify_system_params.second);
@@ -560,7 +561,7 @@ void PolicyManagerImpl::SendPermissionsToApp(
CheckAppPolicyResults PolicyManagerImpl::CheckPermissionsChanges(
const std::shared_ptr<policy_table::Table> pt_update,
const std::shared_ptr<policy_table::Table> snapshot) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Replace predefined policies with its actual setting, e.g. "123":"default"
// to actual values of default section
@@ -591,42 +592,45 @@ void PolicyManagerImpl::PrepareNotificationData(
const policy_table::Strings& group_names,
const std::vector<FunctionalGroupPermission>& group_permission,
Permissions& notification_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProcessFunctionalGroup processor(groups, group_permission, notification_data);
std::for_each(group_names.begin(), group_names.end(), processor);
}
void PolicyManagerImpl::GetUpdateUrls(const std::string& service_type,
EndpointUrls& out_end_points) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
cache_->GetUpdateUrls(service_type, out_end_points);
}
void PolicyManagerImpl::GetUpdateUrls(const uint32_t service_type,
EndpointUrls& out_end_points) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
cache_->GetUpdateUrls(service_type, out_end_points);
}
bool PolicyManagerImpl::RequestPTUpdate(const PTUIterationType iteration_type) {
- LOG4CXX_AUTO_TRACE(logger_);
- std::shared_ptr<policy_table::Table> policy_table_snapshot =
- cache_->GenerateSnapshot();
- if (!policy_table_snapshot) {
- LOG4CXX_ERROR(logger_, "Failed to create snapshot of policy table");
- return false;
- }
+ SDL_LOG_AUTO_TRACE();
+ BinaryMessage update;
+ if (PTUIterationType::DefaultIteration == iteration_type) {
+ std::shared_ptr<policy_table::Table> policy_table_snapshot =
+ cache_->GenerateSnapshot();
+ if (!policy_table_snapshot) {
+ SDL_LOG_ERROR("Failed to create snapshot of policy table");
+ return false;
+ }
- IsPTValid(policy_table_snapshot, policy_table::PT_SNAPSHOT);
+ IsPTValid(policy_table_snapshot, policy_table::PT_SNAPSHOT);
- Json::Value value = policy_table_snapshot->ToJsonValue();
- Json::StreamWriterBuilder writer_builder;
- writer_builder["indentation"] = "";
- std::string message_string = Json::writeString(writer_builder, value);
+ Json::Value value = policy_table_snapshot->ToJsonValue();
+ Json::StreamWriterBuilder writer_builder;
+ writer_builder["indentation"] = "";
+ std::string message_string = Json::writeString(writer_builder, value);
- LOG4CXX_DEBUG(logger_, "Snapshot contents is : " << message_string);
+ SDL_LOG_DEBUG("Snapshot contents is : " << message_string);
- BinaryMessage update(message_string.begin(), message_string.end());
+ update = BinaryMessage(message_string.begin(), message_string.end());
+ }
ptu_requested_ = true;
listener_->OnSnapshotCreated(update, iteration_type);
return true;
@@ -638,24 +642,24 @@ std::string PolicyManagerImpl::GetIconUrl(
}
void PolicyManagerImpl::StartPTExchange() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const bool update_required = update_status_manager_.IsUpdateRequired();
if (update_status_manager_.IsAppsSearchInProgress() && update_required) {
update_status_manager_.ScheduleUpdate();
- LOG4CXX_INFO(logger_,
- "Starting exchange skipped, since applications "
- "search is in progress.");
+ SDL_LOG_INFO(
+ "Starting exchange skipped, since applications "
+ "search is in progress.");
return;
}
if (update_status_manager_.IsUpdatePending() && update_required) {
if (trigger_ptu_)
update_status_manager_.ScheduleUpdate();
- LOG4CXX_INFO(logger_,
- "Starting exchange skipped, since another exchange "
- "is in progress.");
+ SDL_LOG_INFO(
+ "Starting exchange skipped, since another exchange "
+ "is in progress.");
return;
}
@@ -673,8 +677,7 @@ void PolicyManagerImpl::StartPTExchange() {
const uint32_t timeout_msec = NextRetryTimeout();
if (timeout_msec) {
- LOG4CXX_DEBUG(logger_,
- "Start retry sequence timeout = " << timeout_msec);
+ SDL_LOG_DEBUG("Start retry sequence timeout = " << timeout_msec);
timer_retry_sequence_.Start(timeout_msec, timer::kPeriodic);
}
}
@@ -683,12 +686,12 @@ void PolicyManagerImpl::StartPTExchange() {
}
void PolicyManagerImpl::OnAppsSearchStarted() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
update_status_manager_.OnAppsSearchStarted();
}
void PolicyManagerImpl::OnAppsSearchCompleted(const bool trigger_ptu) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
update_status_manager_.OnAppsSearchCompleted();
trigger_ptu_ = trigger_ptu;
@@ -700,19 +703,24 @@ void PolicyManagerImpl::OnAppsSearchCompleted(const bool trigger_ptu) {
}
void PolicyManagerImpl::OnLocalAppAdded() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
update_status_manager_.ScheduleUpdate();
StartPTExchange();
}
void PolicyManagerImpl::UpdatePTUReadyAppsCount(const uint32_t new_app_count) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
applications_pending_ptu_count_ = new_app_count;
}
void PolicyManagerImpl::OnAppRegisteredOnMobile(
const std::string& device_id, const std::string& application_id) {
if (application_id != last_registered_policy_app_id_) {
+ if (last_registered_policy_app_id_.empty()) {
+ SDL_LOG_DEBUG("Stopping update after first app is registered");
+ // ResetRetrySequence(ResetRetryCountType::kResetInternally);
+ StopRetrySequence();
+ }
StartPTExchange();
last_registered_policy_app_id_ = application_id;
}
@@ -722,7 +730,7 @@ void PolicyManagerImpl::OnAppRegisteredOnMobile(
void PolicyManagerImpl::OnDeviceSwitching(const std::string& device_id_from,
const std::string& device_id_to) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
cache_->OnDeviceSwitching(device_id_from, device_id_to);
}
@@ -735,13 +743,13 @@ const std::vector<std::string> PolicyManagerImpl::GetAppRequestTypes(
RequestType::State PolicyManagerImpl::GetAppRequestTypesState(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->GetAppRequestTypesState(policy_app_id);
}
RequestSubType::State PolicyManagerImpl::GetAppRequestSubTypesState(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->GetAppRequestSubTypesState(policy_app_id);
}
@@ -822,7 +830,7 @@ void PolicyManagerImpl::GetAppServiceParameters(
bool PolicyManagerImpl::UnknownRPCPassthroughAllowed(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->UnknownRPCPassthroughAllowed(policy_app_id);
}
@@ -832,23 +840,21 @@ void PolicyManagerImpl::CheckPermissions(const PTString& device_id,
const PTString& rpc,
const RPCParams& rpc_params,
CheckPermissionResult& result) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!cache_->IsApplicationRepresented(app_id)) {
- LOG4CXX_WARN(logger_, "Application " << app_id << " isn't exist");
+ SDL_LOG_WARN("Application " << app_id << " isn't exist");
return;
}
- LOG4CXX_INFO(logger_,
- "CheckPermissions for " << app_id << " and rpc " << rpc
+ SDL_LOG_INFO("CheckPermissions for " << app_id << " and rpc " << rpc
<< " for " << hmi_level << " level.");
ApplicationOnDevice who = {device_id, app_id};
policy_table::Strings groups;
if (access_remote_->IsAppRemoteControl(who)) {
groups = access_remote_->GetGroups(who);
- LOG4CXX_INFO(logger_,
- "CheckPermissions for " << app_id << " and rpc " << rpc
+ SDL_LOG_INFO("CheckPermissions for " << app_id << " and rpc " << rpc
<< " for " << hmi_level << " level.");
} else {
groups = cache_->GetGroups(app_id);
@@ -872,7 +878,7 @@ bool PolicyManagerImpl::ResetUserConsent() {
void PolicyManagerImpl::SendNotificationOnPermissionsUpdated(
const std::string& device_id, const std::string& application_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<FunctionalGroupPermission> app_group_permissions;
GetPermissionsForApp(device_id, application_id, app_group_permissions);
@@ -891,8 +897,7 @@ void PolicyManagerImpl::SendNotificationOnPermissionsUpdated(
app_group_permissions,
notification_data);
- LOG4CXX_INFO(logger_,
- "Send notification for application_id: " << application_id);
+ SDL_LOG_INFO("Send notification for application_id: " << application_id);
std::string default_hmi = "NONE";
@@ -908,21 +913,21 @@ void PolicyManagerImpl::SendNotificationOnPermissionsUpdated(
}
bool PolicyManagerImpl::CleanupUnpairedDevices() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// For SDL-specific it doesn't matter
return true;
}
DeviceConsent PolicyManagerImpl::GetUserConsentForDevice(
const std::string& device_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return kDeviceAllowed;
}
void PolicyManagerImpl::SetUserConsentForDevice(const std::string& device_id,
bool is_allowed) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Device :" << device_id);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Device :" << device_id);
DeviceConsent current_consent = GetUserConsentForDevice(device_id);
bool is_current_device_allowed =
DeviceConsent::kDeviceAllowed == current_consent ? true : false;
@@ -932,7 +937,7 @@ void PolicyManagerImpl::SetUserConsentForDevice(const std::string& device_id,
if (DeviceConsent::kDeviceHasNoConsent != current_consent &&
is_current_device_allowed == is_allowed) {
const std::string consent = is_allowed ? "allowed" : "disallowed";
- LOG4CXX_INFO(logger_, "Device is already " << consent << ".");
+ SDL_LOG_INFO("Device is already " << consent << ".");
return;
}
}
@@ -950,7 +955,7 @@ bool PolicyManagerImpl::ReactOnUserDevConsentForApp(
bool PolicyManagerImpl::GetInitialAppData(const std::string& application_id,
StringArray* nicknames,
StringArray* app_hmi_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const bool result = nicknames && app_hmi_types;
if (result) {
cache_->GetInitialAppData(application_id, *nicknames, *app_hmi_types);
@@ -960,17 +965,17 @@ bool PolicyManagerImpl::GetInitialAppData(const std::string& application_id,
void PolicyManagerImpl::AddDevice(const std::string& device_id,
const std::string& connection_type) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Device: " << device_id);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Device: " << device_id);
if (!cache_->AddDevice(device_id, connection_type)) {
- LOG4CXX_WARN(logger_, "Can't add device.");
+ SDL_LOG_WARN("Can't add device.");
}
}
void PolicyManagerImpl::SetDeviceInfo(const std::string& device_id,
const DeviceInfo& device_info) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Device :" << device_id);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Device :" << device_id);
}
PermissionConsent PolicyManagerImpl::EnsureCorrectPermissionConsent(
@@ -1010,19 +1015,17 @@ PermissionConsent PolicyManagerImpl::EnsureCorrectPermissionConsent(
void PolicyManagerImpl::CheckPendingPermissionsChanges(
const std::string& policy_app_id,
const std::vector<FunctionalGroupPermission>& current_permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(app_permissions_diff_lock_);
std::map<std::string, AppPermissions>::iterator it_pending =
app_permissions_diff_.find(policy_app_id);
if (app_permissions_diff_.end() == it_pending) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"No pending permissions had been found for appID: " << policy_app_id);
return;
}
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Pending permissions had been found for appID: " << policy_app_id);
// Change appPermissionsConsentNeeded depending on unconsented groups
@@ -1034,16 +1037,14 @@ void PolicyManagerImpl::CheckPendingPermissionsChanges(
for (; it_groups != it_end_groups; ++it_groups) {
if (policy::kGroupUndefined == it_groups->state) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Unconsented groups still present for appID: " << policy_app_id);
it_pending->second.appPermissionsConsentNeeded = true;
return;
}
}
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Unconsented groups not present anymore for appID: " << policy_app_id);
it_pending->second.appPermissionsConsentNeeded = false;
return;
@@ -1051,13 +1052,13 @@ void PolicyManagerImpl::CheckPendingPermissionsChanges(
void PolicyManagerImpl::SetUserConsentForApp(
const PermissionConsent& permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
bool PolicyManagerImpl::GetDefaultHmi(const std::string& device_id,
const std::string& policy_app_id,
std::string* default_hmi) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const DeviceConsent device_consent = GetUserConsentForDevice(device_id);
const std::string app_id = policy::kDeviceAllowed != device_consent
? kPreDataConsentId
@@ -1067,9 +1068,9 @@ bool PolicyManagerImpl::GetDefaultHmi(const std::string& device_id,
bool PolicyManagerImpl::GetPriority(const std::string& policy_app_id,
std::string* priority) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!priority) {
- LOG4CXX_WARN(logger_, "Input priority parameter is null.");
+ SDL_LOG_WARN("Input priority parameter is null.");
return false;
}
@@ -1085,12 +1086,11 @@ void PolicyManagerImpl::GetUserConsentForApp(
const std::string& device_id,
const std::string& policy_app_id,
std::vector<FunctionalGroupPermission>& permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
FunctionalIdType group_types;
if (!cache_->GetPermissionsForApp(device_id, policy_app_id, group_types)) {
- LOG4CXX_WARN(logger_,
- "Can't get user permissions for app " << policy_app_id);
+ SDL_LOG_WARN("Can't get user permissions for app " << policy_app_id);
return;
}
@@ -1098,7 +1098,7 @@ void PolicyManagerImpl::GetUserConsentForApp(
// automatically allowed and it could not be changed by user
FunctionalGroupNames group_names;
if (!cache_->GetFunctionalGroupNames(group_names)) {
- LOG4CXX_WARN(logger_, "Can't get functional group names");
+ SDL_LOG_WARN("Can't get functional group names");
return;
}
@@ -1133,7 +1133,7 @@ void PolicyManagerImpl::GetPermissionsForApp(
const std::string& device_id,
const std::string& policy_app_id,
std::vector<FunctionalGroupPermission>& permissions) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::string app_id_to_check = policy_app_id;
bool allowed_by_default = false;
@@ -1158,8 +1158,7 @@ void PolicyManagerImpl::GetPermissionsForApp(
}
if (!ret) {
- LOG4CXX_WARN(logger_,
- "Can't get user permissions for app " << policy_app_id);
+ SDL_LOG_WARN("Can't get user permissions for app " << policy_app_id);
return;
}
@@ -1167,14 +1166,14 @@ void PolicyManagerImpl::GetPermissionsForApp(
// automatically allowed and it could not be changed by user
FunctionalGroupNames group_names;
if (!cache_->GetFunctionalGroupNames(group_names)) {
- LOG4CXX_WARN(logger_, "Can't get functional group names");
+ SDL_LOG_WARN("Can't get functional group names");
return;
}
// The "default" and "pre_DataConsent" are auto-allowed groups
// So, check if application in the one of these mode.
if (allowed_by_default) {
- LOG4CXX_INFO(logger_, "Get auto allowed groups");
+ SDL_LOG_INFO("Get auto allowed groups");
GroupType type =
(kDefaultId == app_id_to_check ? kTypeDefault : kTypePreDataConsented);
@@ -1198,7 +1197,7 @@ void PolicyManagerImpl::GetPermissionsForApp(
std::string& PolicyManagerImpl::GetCurrentDeviceId(
const transport_manager::DeviceHandle& device_handle,
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
last_device_id_ =
listener()->OnCurrentDeviceIdUpdateRequired(device_handle, policy_app_id);
return last_device_id_;
@@ -1206,16 +1205,27 @@ std::string& PolicyManagerImpl::GetCurrentDeviceId(
void PolicyManagerImpl::SetSystemLanguage(const std::string& language) {}
+void PolicyManagerImpl::SetPreloadedPtFlag(const bool is_preloaded) {
+ SDL_LOG_AUTO_TRACE();
+ cache_->SetPreloadedPtFlag(is_preloaded);
+}
+
void PolicyManagerImpl::SetSystemInfo(const std::string& ccpu_version,
const std::string& wers_country_code,
const std::string& language) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
+ cache_->SetMetaInfo(ccpu_version, wers_country_code, language);
+}
+
+std::string PolicyManagerImpl::GetCCPUVersionFromPT() const {
+ SDL_LOG_AUTO_TRACE();
+ return cache_->GetCCPUVersionFromPT();
}
-uint32_t PolicyManagerImpl::GetNotificationsNumber(
- const std::string& priority) const {
- LOG4CXX_AUTO_TRACE(logger_);
- return cache_->GetNotificationsNumber(priority);
+uint32_t PolicyManagerImpl::GetNotificationsNumber(const std::string& priority,
+ const bool is_subtle) const {
+ SDL_LOG_AUTO_TRACE();
+ return cache_->GetNotificationsNumber(priority, is_subtle);
}
bool PolicyManagerImpl::ExceededIgnitionCycles() {
@@ -1227,10 +1237,10 @@ bool PolicyManagerImpl::IsPTValid(
policy_table::PolicyTableType type) const {
policy_table->SetPolicyTableType(type);
if (!policy_table->is_valid()) {
- LOG4CXX_ERROR(logger_, "Policy table is not valid.");
+ SDL_LOG_ERROR("Policy table is not valid.");
rpc::ValidationReport report("policy_table");
policy_table->ReportErrors(&report);
- LOG4CXX_DEBUG(logger_, "Errors: " << rpc::PrettyFormat(report));
+ SDL_LOG_DEBUG("Errors: " << rpc::PrettyFormat(report));
return false;
}
return true;
@@ -1242,7 +1252,7 @@ const PolicySettings& PolicyManagerImpl::get_settings() const {
}
bool PolicyManagerImpl::ExceededDays() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
date_time::TimeDuration current_time = date_time::getCurrentTime();
const int kSecondsInDay = 60 * 60 * 24;
@@ -1252,9 +1262,9 @@ bool PolicyManagerImpl::ExceededDays() {
}
void PolicyManagerImpl::KmsChanged(int kilometers) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (0 == cache_->KilometersBeforeExchange(kilometers)) {
- LOG4CXX_INFO(logger_, "Enough kilometers passed to send for PT update.");
+ SDL_LOG_INFO("Enough kilometers passed to send for PT update.");
update_status_manager_.ScheduleUpdate();
StartPTExchange();
PTUpdatedAt(KILOMETERS, kilometers);
@@ -1285,7 +1295,7 @@ std::string PolicyManagerImpl::ForcePTExchange() {
}
void PolicyManagerImpl::StopRetrySequence() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (timer_retry_sequence_.is_running()) {
timer_retry_sequence_.Stop();
@@ -1307,9 +1317,9 @@ std::string PolicyManagerImpl::GetPolicyTableStatus() const {
}
uint32_t PolicyManagerImpl::NextRetryTimeout() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(retry_sequence_lock_);
- LOG4CXX_DEBUG(logger_, "Index: " << retry_sequence_index_);
+ SDL_LOG_DEBUG("Index: " << retry_sequence_index_);
uint32_t next = 0u;
if (retry_sequence_seconds_.empty() ||
retry_sequence_index_ > retry_sequence_seconds_.size()) {
@@ -1333,7 +1343,7 @@ uint32_t PolicyManagerImpl::NextRetryTimeout() {
}
void PolicyManagerImpl::RefreshRetrySequence() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(retry_sequence_lock_);
retry_sequence_timeout_ = cache_->TimeoutResponse();
retry_sequence_seconds_.clear();
@@ -1342,7 +1352,7 @@ void PolicyManagerImpl::RefreshRetrySequence() {
void PolicyManagerImpl::ResetRetrySequence(
const ResetRetryCountType reset_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(retry_sequence_lock_);
retry_sequence_index_ = 0;
retry_sequence_url_ = RetrySequenceURL();
@@ -1371,33 +1381,33 @@ void PolicyManagerImpl::OnUpdateStarted() {
}
void PolicyManagerImpl::PTUpdatedAt(Counters counter, int value) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
cache_->SetCountersPassedForSuccessfulUpdate(counter, value);
cache_->ResetIgnitionCycles();
}
void PolicyManagerImpl::Increment(usage_statistics::GlobalCounterId type) {
- LOG4CXX_INFO(logger_, "Increment without app id");
+ SDL_LOG_INFO("Increment without app id");
cache_->Increment(type);
}
void PolicyManagerImpl::Increment(const std::string& app_id,
usage_statistics::AppCounterId type) {
- LOG4CXX_DEBUG(logger_, "Increment " << app_id << " AppCounter: " << type);
+ SDL_LOG_DEBUG("Increment " << app_id << " AppCounter: " << type);
cache_->Increment(app_id, type);
}
void PolicyManagerImpl::Set(const std::string& app_id,
usage_statistics::AppInfoId type,
const std::string& value) {
- LOG4CXX_INFO(logger_, "Set " << app_id);
+ SDL_LOG_INFO("Set " << app_id);
cache_->Set(app_id, type, value);
}
void PolicyManagerImpl::Add(const std::string& app_id,
usage_statistics::AppStopwatchId type,
int32_t timespan_seconds) {
- LOG4CXX_INFO(logger_, "Add " << app_id);
+ SDL_LOG_INFO("Add " << app_id);
cache_->Add(app_id, type, timespan_seconds);
}
@@ -1407,7 +1417,7 @@ bool PolicyManagerImpl::IsApplicationRevoked(const std::string& app_id) const {
bool PolicyManagerImpl::IsConsentNeeded(const std::string& device_id,
const std::string& app_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return false;
}
@@ -1446,12 +1456,12 @@ bool PolicyManagerImpl::CanAppStealFocus(const std::string& app_id) const {
void PolicyManagerImpl::MarkUnpairedDevice(const std::string& device_id) {}
std::string PolicyManagerImpl::RetrieveCertificate() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->GetCertificate();
}
AppIdURL PolicyManagerImpl::GetNextUpdateUrl(const EndpointUrls& urls) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const AppIdURL next_app_url = RetrySequenceUrl(retry_sequence_url_, urls);
@@ -1514,7 +1524,7 @@ StatusNotifier PolicyManagerImpl::AddApplication(
const std::string& device_id,
const std::string& application_id,
const rpc::policy_table_interface_base::AppHmiTypes& hmi_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto device_consent = GetUserConsentForDevice(device_id);
sync_primitives::AutoLock lock(apps_registration_lock_);
if (IsNewApplication(application_id)) {
@@ -1536,20 +1546,20 @@ void PolicyManagerImpl::RemoveAppConsentForGroup(
bool PolicyManagerImpl::IsPredataPolicy(
const std::string& policy_app_id) const {
- LOG4CXX_INFO(logger_, "IsPredataApp");
+ SDL_LOG_INFO("IsPredataApp");
return cache_->IsPredataPolicy(policy_app_id);
}
void PolicyManagerImpl::AddNewApplication(const std::string& application_id,
DeviceConsent device_consent) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
cache_->SetDefaultPolicy(application_id);
}
void PolicyManagerImpl::PromoteExistedApplication(
const std::string& application_id, DeviceConsent device_consent) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// If device consent changed to allowed during application being
// disconnected, app permissions should be changed also
if (kDeviceAllowed == device_consent &&
@@ -1564,7 +1574,7 @@ bool PolicyManagerImpl::IsNewApplication(
}
bool PolicyManagerImpl::ResetPT(const std::string& file_name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
cache_->ResetCalculatedPermissions();
const bool result = cache_->ResetPT(file_name);
if (result) {
@@ -1574,19 +1584,17 @@ bool PolicyManagerImpl::ResetPT(const std::string& file_name) {
}
bool PolicyManagerImpl::CheckAppStorageFolder() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::string app_storage_folder = get_settings().app_storage_folder();
- LOG4CXX_DEBUG(logger_, "AppStorageFolder " << app_storage_folder);
+ SDL_LOG_DEBUG("AppStorageFolder " << app_storage_folder);
if (!file_system::DirectoryExists(app_storage_folder)) {
- LOG4CXX_WARN(logger_,
- "Storage directory doesn't exist " << app_storage_folder);
+ SDL_LOG_WARN("Storage directory doesn't exist " << app_storage_folder);
return false;
}
if (!(file_system::IsWritingAllowed(app_storage_folder) &&
file_system::IsReadingAllowed(app_storage_folder))) {
- LOG4CXX_WARN(logger_,
- "Storage directory doesn't have read/write permissions "
- << app_storage_folder);
+ SDL_LOG_WARN("Storage directory doesn't have read/write permissions "
+ << app_storage_folder);
return false;
}
return true;
@@ -1594,10 +1602,10 @@ bool PolicyManagerImpl::CheckAppStorageFolder() const {
bool PolicyManagerImpl::InitPT(const std::string& file_name,
const PolicySettings* settings) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
settings_ = settings;
if (!CheckAppStorageFolder()) {
- LOG4CXX_ERROR(logger_, "Can not read/write into AppStorageFolder");
+ SDL_LOG_ERROR("Can not read/write into AppStorageFolder");
return false;
}
const bool ret = cache_->Init(file_name, settings);
@@ -1621,7 +1629,7 @@ uint32_t PolicyManagerImpl::HeartBeatTimeout(const std::string& app_id) const {
}
void PolicyManagerImpl::SaveUpdateStatusRequired(bool is_update_needed) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!is_update_needed) {
ResetRetrySequence(ResetRetryCountType::kResetInternally);
@@ -1635,7 +1643,7 @@ void PolicyManagerImpl::set_cache_manager(
}
void PolicyManagerImpl::ResetTimeout() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (update_status_manager_.IsUpdatePending()) {
if (timer_retry_sequence_.is_running()) {
timer_retry_sequence_.Stop();
@@ -1645,13 +1653,13 @@ void PolicyManagerImpl::ResetTimeout() {
}
void PolicyManagerImpl::OnPTUIterationTimeout() {
- LOG4CXX_DEBUG(logger_, "Start new retry sequence");
+ SDL_LOG_DEBUG("Start new retry sequence");
const bool is_exceeded_retries_count =
(retry_sequence_seconds_.size() < retry_sequence_index_);
if (is_exceeded_retries_count) {
- LOG4CXX_WARN(logger_, "Exceeded allowed PTU retry count");
+ SDL_LOG_WARN("Exceeded allowed PTU retry count");
listener_->OnPTUTimeOut();
ResetRetrySequence(ResetRetryCountType::kResetWithStatusUpdate);
if (timer_retry_sequence_.is_running()) {
@@ -1667,7 +1675,7 @@ void PolicyManagerImpl::OnPTUIterationTimeout() {
update_status_manager_.OnUpdateTimeoutOccurs();
const uint32_t timeout_msec = NextRetryTimeout();
- LOG4CXX_DEBUG(logger_, "New retry sequence timeout = " << timeout_msec);
+ SDL_LOG_DEBUG("New retry sequence timeout = " << timeout_msec);
if (!timeout_msec) {
if (timer_retry_sequence_.is_running()) {
timer_retry_sequence_.Stop();
@@ -1687,7 +1695,7 @@ void PolicyManagerImpl::SetDefaultHmiTypes(
const transport_manager::DeviceHandle& device_handle,
const std::string& application_id,
const std::vector<int>& hmi_types) {
- LOG4CXX_INFO(logger_, "SetDefaultHmiTypes");
+ SDL_LOG_INFO("SetDefaultHmiTypes");
const std::string device_id =
GetCurrentDeviceId(device_handle, application_id);
ApplicationOnDevice who = {device_id, application_id};
@@ -1695,14 +1703,14 @@ void PolicyManagerImpl::SetDefaultHmiTypes(
}
struct HMITypeToInt {
- int operator()(const policy_table::AppHMITypes::value_type item) {
+ int operator()(const policy_table::AppHMITypes::value_type item) const {
return policy_table::AppHMIType(item);
}
};
bool PolicyManagerImpl::GetHMITypes(const std::string& application_id,
std::vector<int>* app_types) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (cache_->IsDefaultPolicy(application_id)) {
return false;
}
@@ -1719,7 +1727,7 @@ bool PolicyManagerImpl::GetHMITypes(const std::string& application_id,
bool PolicyManagerImpl::CheckModule(const PTString& app_id,
const PTString& module) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
policy_table::ModuleType module_type;
return EnumFromJsonString(module, &module_type) &&
access_remote_->CheckModuleType(app_id, module_type);
@@ -1730,16 +1738,15 @@ void PolicyManagerImpl::SendHMILevelChanged(const ApplicationOnDevice& who) {
if (GetDefaultHmi(who.dev_id, who.app_id, &default_hmi)) {
listener()->OnUpdateHMIStatus(who.dev_id, who.app_id, default_hmi);
} else {
- LOG4CXX_WARN(
- logger_,
- "Couldn't get default HMI level for application " << who.app_id);
+ SDL_LOG_WARN("Couldn't get default HMI level for application "
+ << who.app_id);
}
}
void PolicyManagerImpl::GetPermissions(const std::string device_id,
const std::string application_id,
Permissions* data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(data);
std::vector<FunctionalGroupPermission> app_group_permissions;
GetPermissionsForApp(device_id, application_id, app_group_permissions);
@@ -1801,7 +1808,7 @@ void PolicyManagerImpl::set_access_remote(
bool PolicyManagerImpl::AppNeedEncryption(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto encryption_required =
cache_->GetAppEncryptionRequiredFlag(policy_app_id);
@@ -1810,13 +1817,13 @@ bool PolicyManagerImpl::AppNeedEncryption(
const rpc::Optional<rpc::Boolean> PolicyManagerImpl::GetAppEncryptionRequired(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return cache_->GetAppEncryptionRequiredFlag(policy_app_id);
}
const std::vector<std::string> PolicyManagerImpl::GetFunctionalGroupsForApp(
const std::string& policy_app_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
using namespace rpc::policy_table_interface_base;
DCHECK(kDeviceId != policy_app_id);
@@ -1836,7 +1843,7 @@ const std::vector<std::string> PolicyManagerImpl::GetFunctionalGroupsForApp(
const std::vector<std::string> PolicyManagerImpl::GetApplicationPolicyIDs()
const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<std::string> policy_app_ids;
const auto apps = cache_->GetPolicyAppIDs();
@@ -1850,13 +1857,13 @@ const std::vector<std::string> PolicyManagerImpl::GetApplicationPolicyIDs()
bool PolicyManagerImpl::FunctionGroupNeedEncryption(
const std::string& policy_group) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
FunctionalGroupings functional_groupings;
cache_->GetFunctionalGroupings(functional_groupings);
const auto& grouping_itr = functional_groupings.find(policy_group);
if (grouping_itr == functional_groupings.end()) {
- LOG4CXX_WARN(logger_, "Group " << policy_group << " not found");
+ SDL_LOG_WARN("Group " << policy_group << " not found");
return false;
}
@@ -1867,6 +1874,13 @@ bool PolicyManagerImpl::FunctionGroupNeedEncryption(
: false;
}
+void PolicyManagerImpl::TriggerPTUOnStartupIfRequired() {
+ SDL_LOG_AUTO_TRACE();
+ if (ignition_check) {
+ StartPTExchange();
+ }
+}
+
const std::string PolicyManagerImpl::GetPolicyFunctionName(
const uint32_t function_id) const {
return policy_table::EnumToJsonString(
@@ -1891,12 +1905,13 @@ const std::vector<std::string> PolicyManagerImpl::GetRPCsForFunctionGroup(
} // namespace policy
-__attribute__((visibility("default"))) policy::PolicyManager* CreateManager() {
+__attribute__((visibility("default"))) policy::PolicyManager* CreateManager(
+ logger::Logger* logger_instance) {
+ logger::Logger::instance(logger_instance);
return new policy::PolicyManagerImpl();
}
__attribute__((visibility("default"))) void DeleteManager(
policy::PolicyManager* pm) {
delete pm;
- DELETE_THREAD_LOGGER(policy::logger_);
}
diff --git a/src/components/policy/policy_regular/src/policy_table.cc b/src/components/policy/policy_regular/src/policy_table.cc
index b0fa5739da..dd6eef0c45 100644
--- a/src/components/policy/policy_regular/src/policy_table.cc
+++ b/src/components/policy/policy_regular/src/policy_table.cc
@@ -38,7 +38,7 @@
namespace policy {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Policy")
+SDL_CREATE_LOG_VARIABLE("Policy")
PolicyTable::PolicyTable() : pt_data_(new SQLPTRepresentation()) {}
@@ -46,7 +46,7 @@ PolicyTable::PolicyTable(std::shared_ptr<PTRepresentation> pt_data)
: pt_data_(pt_data) {}
PolicyTable::~PolicyTable() {
- LOG4CXX_INFO(logger_, "Destroying policy table.");
+ SDL_LOG_INFO("Destroying policy table.");
}
} // namespace policy
diff --git a/src/components/policy/policy_regular/src/policy_table/types.cc b/src/components/policy/policy_regular/src/policy_table/types.cc
index 3029ebb067..d3473bb2a7 100644
--- a/src/components/policy/policy_regular/src/policy_table/types.cc
+++ b/src/components/policy/policy_regular/src/policy_table/types.cc
@@ -1,5 +1,8 @@
// This file is generated, do not edit
#include "policy/policy_table/types.h"
+
+#include <regex>
+
#include "rpc_base/rpc_base_json_inl.h"
namespace rpc {
@@ -752,6 +755,8 @@ ModuleConfig::ModuleConfig(const Json::Value* value__)
, endpoint_properties(impl::ValueMember(value__, "endpoint_properties"))
, notifications_per_minute_by_priority(
impl::ValueMember(value__, "notifications_per_minute_by_priority"))
+ , subtle_notifications_per_minute_by_priority(impl::ValueMember(
+ value__, "subtle_notifications_per_minute_by_priority"))
, vehicle_make(impl::ValueMember(value__, "vehicle_make"))
, vehicle_model(impl::ValueMember(value__, "vehicle_model"))
, vehicle_year(impl::ValueMember(value__, "vehicle_year"))
@@ -775,6 +780,8 @@ void ModuleConfig::SafeCopyFrom(const ModuleConfig& from) {
lock_screen_dismissal_enabled = from.lock_screen_dismissal_enabled;
+ subtle_notifications_per_minute_by_priority.assign_if_valid(
+ from.subtle_notifications_per_minute_by_priority);
vehicle_make.assign_if_valid(from.vehicle_make);
vehicle_model.assign_if_valid(from.vehicle_model);
vehicle_year.assign_if_valid(from.vehicle_year);
@@ -802,6 +809,9 @@ Json::Value ModuleConfig::ToJsonValue() const {
impl::WriteJsonField("notifications_per_minute_by_priority",
notifications_per_minute_by_priority,
&result__);
+ impl::WriteJsonField("subtle_notifications_per_minute_by_priority",
+ subtle_notifications_per_minute_by_priority,
+ &result__);
impl::WriteJsonField("vehicle_make", vehicle_make, &result__);
impl::WriteJsonField("vehicle_model", vehicle_model, &result__);
impl::WriteJsonField("vehicle_year", vehicle_year, &result__);
@@ -844,6 +854,9 @@ bool ModuleConfig::is_valid() const {
if (!notifications_per_minute_by_priority.is_valid()) {
return false;
}
+ if (!subtle_notifications_per_minute_by_priority.is_valid()) {
+ return false;
+ }
if (!lock_screen_dismissal_enabled.is_valid()) {
return false;
}
@@ -906,6 +919,9 @@ bool ModuleConfig::struct_empty() const {
if (notifications_per_minute_by_priority.is_initialized()) {
return false;
}
+ if (subtle_notifications_per_minute_by_priority.is_initialized()) {
+ return false;
+ }
if (lock_screen_dismissal_enabled.is_initialized()) {
return false;
}
@@ -968,6 +984,11 @@ void ModuleConfig::ReportErrors(rpc::ValidationReport* report__) const {
notifications_per_minute_by_priority.ReportErrors(
&report__->ReportSubobject("notifications_per_minute_by_priority"));
}
+ if (!subtle_notifications_per_minute_by_priority.is_valid()) {
+ subtle_notifications_per_minute_by_priority.ReportErrors(
+ &report__->ReportSubobject(
+ "subtle_notifications_per_minute_by_priority"));
+ }
if (!lock_screen_dismissal_enabled.is_valid()) {
lock_screen_dismissal_enabled.ReportErrors(
&report__->ReportSubobject("lock_screen_dismissal_enabled"));
@@ -1012,6 +1033,7 @@ void ModuleConfig::SetPolicyTableType(PolicyTableType pt_type) {
endpoints.SetPolicyTableType(pt_type);
endpoint_properties.SetPolicyTableType(pt_type);
notifications_per_minute_by_priority.SetPolicyTableType(pt_type);
+ subtle_notifications_per_minute_by_priority.SetPolicyTableType(pt_type);
lock_screen_dismissal_enabled.SetPolicyTableType(pt_type);
vehicle_make.SetPolicyTableType(pt_type);
vehicle_model.SetPolicyTableType(pt_type);
@@ -1274,7 +1296,8 @@ ModuleMeta::ModuleMeta(const Json::Value* value__)
, pt_exchanged_x_days_after_epoch(
impl::ValueMember(value__, "pt_exchanged_x_days_after_epoch"))
, ignition_cycles_since_last_exchange(
- impl::ValueMember(value__, "ignition_cycles_since_last_exchange")) {}
+ impl::ValueMember(value__, "ignition_cycles_since_last_exchange"))
+ , ccpu_version(impl::ValueMember(value__, "ccpu_version")) {}
Json::Value ModuleMeta::ToJsonValue() const {
Json::Value result__(Json::objectValue);
@@ -1293,6 +1316,9 @@ bool ModuleMeta::is_valid() const {
if (struct_empty()) {
return initialization_state__ == kInitialized && Validate();
}
+ if (!ccpu_version.is_valid()) {
+ return false;
+ }
if (!pt_exchanged_at_odometer_x.is_valid()) {
return false;
}
@@ -1310,6 +1336,9 @@ bool ModuleMeta::is_initialized() const {
}
bool ModuleMeta::struct_empty() const {
+ if (ccpu_version.is_initialized()) {
+ return false;
+ }
if (pt_exchanged_at_odometer_x.is_initialized()) {
return false;
}
@@ -1327,6 +1356,9 @@ void ModuleMeta::ReportErrors(rpc::ValidationReport* report__) const {
if (struct_empty()) {
rpc::CompositeType::ReportErrors(report__);
}
+ if (!ccpu_version.is_valid()) {
+ ccpu_version.ReportErrors(&report__->ReportSubobject("ccpu_version"));
+ }
if (!pt_exchanged_at_odometer_x.is_valid()) {
pt_exchanged_at_odometer_x.ReportErrors(
&report__->ReportSubobject("pt_exchanged_at_odometer_x"));
@@ -1647,6 +1679,7 @@ VehicleDataItem::VehicleDataItem(const VehicleDataItem& vehicle_data)
, until(vehicle_data.until)
, removed(vehicle_data.removed)
, deprecated(vehicle_data.deprecated)
+ , defvalue(vehicle_data.defvalue)
, minvalue(vehicle_data.minvalue)
, maxvalue(vehicle_data.maxvalue)
, minsize(vehicle_data.minsize)
@@ -1666,12 +1699,17 @@ VehicleDataItem::VehicleDataItem(const Json::Value* value__)
, until(impl::ValueMember(value__, "until"))
, removed(impl::ValueMember(value__, "removed"))
, deprecated(impl::ValueMember(value__, "deprecated"))
+ , defvalue(static_cast<Json::Value*>(nullptr))
, minvalue(impl::ValueMember(value__, "minvalue"))
, maxvalue(impl::ValueMember(value__, "maxvalue"))
, minsize(impl::ValueMember(value__, "minsize"))
, maxsize(impl::ValueMember(value__, "maxsize"))
, minlength(impl::ValueMember(value__, "minlength"))
- , maxlength(impl::ValueMember(value__, "maxlength")) {}
+ , maxlength(impl::ValueMember(value__, "maxlength")) {
+ if (value__->isMember("defvalue")) {
+ *defvalue = impl::ValueMember(value__, "defvalue")->asString();
+ }
+}
VehicleDataItem::~VehicleDataItem() {}
@@ -1697,6 +1735,7 @@ Json::Value VehicleDataItem::ToJsonValue() const {
impl::WriteJsonField("until", until, &ret);
impl::WriteJsonField("removed", removed, &ret);
impl::WriteJsonField("deprecated", deprecated, &ret);
+ impl::WriteJsonField("defvalue", defvalue, &ret);
impl::WriteJsonField("minvalue", minvalue, &ret);
impl::WriteJsonField("maxvalue", maxvalue, &ret);
impl::WriteJsonField("minsize", minsize, &ret);
@@ -1711,9 +1750,10 @@ bool VehicleDataItem::operator==(const VehicleDataItem& vd) {
mandatory == vd.mandatory && params == vd.params &&
array == vd.array && since == vd.since && until == vd.until &&
removed == vd.removed && deprecated == vd.deprecated &&
- minvalue == vd.minvalue && maxvalue == vd.maxvalue &&
- minsize == vd.minsize && maxsize == vd.maxsize &&
- minlength == vd.minlength && maxlength == vd.maxlength);
+ defvalue == vd.defvalue && minvalue == vd.minvalue &&
+ maxvalue == vd.maxvalue && minsize == vd.minsize &&
+ maxsize == vd.maxsize && minlength == vd.minlength &&
+ maxlength == vd.maxlength);
}
bool VehicleDataItem::is_valid() const {
@@ -1747,6 +1787,9 @@ bool VehicleDataItem::is_valid() const {
if (!deprecated.is_valid()) {
return false;
}
+ if (!(defvalue.is_valid() && ValidateDefault())) {
+ return false;
+ }
if (!minvalue.is_valid()) {
return false;
}
@@ -1803,6 +1846,9 @@ bool VehicleDataItem::struct_not_empty() const {
if (!deprecated.is_initialized()) {
return false;
}
+ if (!defvalue.is_initialized()) {
+ return false;
+ }
if (!minvalue.is_initialized()) {
return false;
}
@@ -1872,6 +1918,13 @@ void VehicleDataItem::ReportErrors(rpc::ValidationReport* report__) const {
if (!deprecated.is_valid()) {
deprecated.ReportErrors(&report__->ReportSubobject("deprecated"));
}
+ if (!defvalue.is_valid()) {
+ defvalue.ReportErrors(&report__->ReportSubobject("defvalue"));
+ }
+ if (!ValidateDefault()) {
+ report__->set_validation_info("Invalid default value: " +
+ std::string(*defvalue));
+ }
if (!minvalue.is_valid()) {
minvalue.ReportErrors(&report__->ReportSubobject("minvalue"));
}
@@ -1904,6 +1957,7 @@ void VehicleDataItem::SetPolicyTableType(PolicyTableType pt_type) {
until.SetPolicyTableType(pt_type);
removed.SetPolicyTableType(pt_type);
deprecated.SetPolicyTableType(pt_type);
+ defvalue.SetPolicyTableType(pt_type);
minvalue.SetPolicyTableType(pt_type);
maxvalue.SetPolicyTableType(pt_type);
minsize.SetPolicyTableType(pt_type);
@@ -1947,6 +2001,46 @@ bool VehicleDataItem::ValidateTypes() const {
return (!(params.is_initialized()) || params->empty());
}
+bool VehicleDataItem::ValidateDefault() const {
+ if (!defvalue.is_initialized()) {
+ return true;
+ }
+ std::string value = std::string(*defvalue);
+ bool valid = false;
+ if (VehicleDataItem::kInteger == std::string(type)) {
+ // Match int
+ std::regex pattern("^-?\\d+$");
+ bool type_matches = std::regex_match(value, pattern);
+ if (type_matches) {
+ size_t int_value = std::stol(value);
+ valid = (!minvalue.is_initialized() || int_value >= *minvalue) &&
+ (!maxvalue.is_initialized() || int_value <= *maxvalue);
+ }
+ } else if (VehicleDataItem::kFloat == std::string(type) ||
+ VehicleDataItem::kDouble == std::string(type)) {
+ // Match double
+ std::regex pattern("^-?\\d+(\\.\\d+)?$");
+ bool type_matches = std::regex_match(value, pattern);
+ if (type_matches) {
+ double dbl_value = std::stod(value);
+ valid = (!minvalue.is_initialized() || dbl_value >= *minvalue) &&
+ (!maxvalue.is_initialized() || dbl_value <= *maxvalue);
+ }
+ } else if (VehicleDataItem::kString == std::string(type)) {
+ size_t length = value.length();
+ valid = (!minsize.is_initialized() || length >= *minsize) &&
+ (!maxsize.is_initialized() || length <= *maxsize);
+ } else if (VehicleDataItem::kBoolean == std::string(type)) {
+ valid = ("false" == value || "true" == value);
+ } else if (VehicleDataItem::kStruct != std::string(type) &&
+ !IsPrimitiveType()) {
+ // Enum values cannot be validated here
+ valid = true;
+ }
+
+ return valid;
+}
+
bool VehicleDataItem::IsPrimitiveType() const {
return helpers::in_range(kPODTypes, std::string(type));
}
diff --git a/src/components/policy/policy_regular/src/policy_table/validation.cc b/src/components/policy/policy_regular/src/policy_table/validation.cc
index 14b6d657c2..dbc44f01ab 100644
--- a/src/components/policy/policy_regular/src/policy_table/validation.cc
+++ b/src/components/policy/policy_regular/src/policy_table/validation.cc
@@ -12,7 +12,7 @@ bool IsTypeInvalid(
namespace rpc {
namespace policy_table_interface_base {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Policy")
+SDL_CREATE_LOG_VARIABLE("Policy")
void RemoveInvalidTypes(RequestTypes& types) {
types.erase(std::remove_if(types.begin(), types.end(), &IsTypeInvalid),
@@ -30,13 +30,13 @@ bool ApplicationPoliciesSection::Validate() const {
// Default and PreData policies are mandatory
if (apps.end() == it_default_policy || apps.end() == it_pre_data_policy) {
- LOG4CXX_ERROR(logger_, "Default or preData policy is not present.");
+ SDL_LOG_ERROR("Default or preData policy is not present.");
return false;
}
// Device policy is mandatory
if (!device.is_initialized()) {
- LOG4CXX_ERROR(logger_, "Device policy is not present.");
+ SDL_LOG_ERROR("Device policy is not present.");
return false;
}
@@ -45,17 +45,15 @@ bool ApplicationPoliciesSection::Validate() const {
return true;
}
- LOG4CXX_TRACE(logger_, "Checking app Request Types...");
+ SDL_LOG_TRACE("Checking app Request Types...");
if (!it_default_policy->second.RequestType.is_valid()) {
- LOG4CXX_WARN(logger_,
- "Default policy RequestTypes are not valid. Will be cleaned.");
+ SDL_LOG_WARN("Default policy RequestTypes are not valid. Will be cleaned.");
RemoveInvalidTypes(*it_default_policy->second.RequestType);
// If preloaded does not have valid default types - validation fails
// Otherwise default will be empty, i.e. all types allowed
if (PT_PRELOADED == pt_type) {
if (it_default_policy->second.RequestType->empty()) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Default policy RequestTypes empty after clean-up. Exiting.");
return false;
}
@@ -78,46 +76,43 @@ bool ApplicationPoliciesSection::Validate() const {
if (PT_PRELOADED == pt_type) {
if (!is_request_type_valid) {
- LOG4CXX_WARN(logger_,
- "App policy RequestTypes are not valid. Will be cleaned.");
+ SDL_LOG_WARN("App policy RequestTypes are not valid. Will be cleaned.");
RemoveInvalidTypes(*app_params.RequestType);
if (app_params.RequestType->empty()) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"App policy RequestTypes empty after clean-up. Exiting.");
return false;
}
}
} else {
if (is_request_type_omitted) {
- LOG4CXX_WARN(logger_,
- "App policy RequestTypes omitted."
- " Will be replaced with default.");
+ SDL_LOG_WARN(
+ "App policy RequestTypes omitted."
+ " Will be replaced with default.");
app_params.RequestType = apps[kDefaultApp].RequestType;
++iter;
continue;
}
if (!is_request_type_valid) {
- LOG4CXX_WARN(logger_,
- "App policy RequestTypes are invalid. Will be cleaned.");
+ SDL_LOG_WARN("App policy RequestTypes are invalid. Will be cleaned.");
RemoveInvalidTypes(*app_params.RequestType);
if (app_params.RequestType->empty()) {
- LOG4CXX_WARN(logger_,
- "App policy RequestTypes empty after clean-up."
- " Will be replaced with default.");
+ SDL_LOG_WARN(
+ "App policy RequestTypes empty after clean-up."
+ " Will be replaced with default.");
app_params.RequestType = apps[kDefaultApp].RequestType;
++iter;
continue;
}
}
if (is_request_type_empty) {
- LOG4CXX_WARN(logger_, "App policy RequestTypes empty.");
+ SDL_LOG_WARN("App policy RequestTypes empty.");
}
}
++iter;
}
- LOG4CXX_TRACE(logger_, "Checking app Request SubTypes...");
+ SDL_LOG_TRACE("Checking app Request SubTypes...");
iter = apps.begin();
while (iter != end_iter) {
if (it_default_policy == iter || it_pre_data_policy == iter) {
@@ -129,9 +124,9 @@ bool ApplicationPoliciesSection::Validate() const {
!app_params.RequestSubType.is_initialized();
if (is_request_subtype_omitted) {
- LOG4CXX_WARN(logger_,
- "App policy RequestSubTypes omitted."
- " Will be replaced with default.");
+ SDL_LOG_WARN(
+ "App policy RequestSubTypes omitted."
+ " Will be replaced with default.");
app_params.RequestSubType = apps[kDefaultApp].RequestSubType;
++iter;
continue;
@@ -139,7 +134,7 @@ bool ApplicationPoliciesSection::Validate() const {
const bool is_request_subtype_empty = app_params.RequestSubType->empty();
if (is_request_subtype_empty) {
- LOG4CXX_WARN(logger_, "App policy RequestSubTypes empty.");
+ SDL_LOG_WARN("App policy RequestSubTypes empty.");
}
++iter;
}
@@ -222,8 +217,7 @@ bool ModuleConfig::Validate() const {
++it_endpoints) {
const URLList& endpoint_list = it_endpoints->second;
if (endpoint_list.end() == endpoint_list.find(kDefaultApp)) {
- LOG4CXX_ERROR(logger_,
- "Endpoint " << it_endpoints->first
+ SDL_LOG_ERROR("Endpoint " << it_endpoints->first
<< "does not contain default group");
return false;
}
@@ -294,9 +288,8 @@ bool VehicleDataItem::Validate() const {
};
if (!ValidateTypes()) {
- LOG4CXX_ERROR(
- logger_,
- "Unknown type: " << std::string(type) << " of " << std::string(key));
+ SDL_LOG_ERROR("Unknown type: " << std::string(type) << " of "
+ << std::string(key));
return false;
}
return true;
diff --git a/src/components/policy/policy_regular/src/sql_pt_queries.cc b/src/components/policy/policy_regular/src/sql_pt_queries.cc
index 79eee10d43..cf9167406f 100644
--- a/src/components/policy/policy_regular/src/sql_pt_queries.cc
+++ b/src/components/policy/policy_regular/src/sql_pt_queries.cc
@@ -59,7 +59,8 @@ const std::string kCreateSchema =
" `pt_exchanged_at_odometer_x` INTEGER NOT NULL DEFAULT 0, "
" `pt_exchanged_x_days_after_epoch` INTEGER NOT NULL DEFAULT 0, "
" `ignition_cycles_since_last_exchange` INTEGER NOT NULL DEFAULT 0, "
- " `flag_update_required` BOOL NOT NULL "
+ " `flag_update_required` BOOL NOT NULL, "
+ " `ccpu_version` VARCHAR(45) "
"); "
"CREATE TABLE IF NOT EXISTS `module_config`( "
" `preloaded_pt` BOOL NOT NULL, "
@@ -102,6 +103,20 @@ const std::string kCreateSchema =
"CREATE TABLE IF NOT EXISTS `language`( "
" `code` VARCHAR(25) PRIMARY KEY NOT NULL "
"); "
+ "CREATE TABLE IF NOT EXISTS `subtle_notifications_by_priority`( "
+ " `priority_value` VARCHAR(45) PRIMARY KEY NOT NULL, "
+ " `value` INTEGER NOT NULL, "
+ " CONSTRAINT `fk_subtle_notifications_by_priority_priority1` "
+ " FOREIGN KEY(`priority_value`) "
+ " REFERENCES `priority`(`value`) "
+ "); "
+ "CREATE INDEX IF NOT EXISTS "
+ "`subtle_notifications_by_priority.fk_subtle_notifications_by_priority_"
+ "priority1_idx` "
+ " ON `subtle_notifications_by_priority`(`priority_value`); "
+ "CREATE TABLE IF NOT EXISTS `language`( "
+ " `code` VARCHAR(25) PRIMARY KEY NOT NULL "
+ "); "
"CREATE TABLE IF NOT EXISTS `message_type`( "
" `name` VARCHAR(45) PRIMARY KEY NOT NULL "
"); "
@@ -433,6 +448,7 @@ const std::string kCreateSchema =
" `until` VARCHAR(45), "
" `removed` BOOL, "
" `deprecated` BOOL, "
+ " `defvalue` VARCHAR(65535), "
" `minvalue` INTEGER, "
" `maxvalue` INTEGER, "
" `minsize` INTEGER, "
@@ -585,6 +601,10 @@ const std::string kDropSchema =
"DROP INDEX IF EXISTS "
"`notifications_by_priority.fk_notifications_by_priority_priority1_idx`; "
"DROP TABLE IF EXISTS `notifications_by_priority`; "
+ "DROP INDEX IF EXISTS "
+ "`subtle_notifications_by_priority.fk_subtle_notifications_by_priority_"
+ "priority1_idx`; "
+ "DROP TABLE IF EXISTS `subtle_notifications_by_priority`; "
"DROP TABLE IF EXISTS `hmi_level`; "
"DROP TABLE IF EXISTS `hybrid_app_preference`; "
"DROP TABLE IF EXISTS `priority`; "
@@ -623,6 +643,7 @@ const std::string kDeleteData =
"DELETE FROM `message_type`; "
"DELETE FROM `language`; "
"DELETE FROM `notifications_by_priority`; "
+ "DELETE FROM `subtle_notifications_by_priority`; "
"DELETE FROM `hmi_level`; "
"DELETE FROM `priority`; "
"DELETE FROM `functional_group`; "
@@ -701,13 +722,14 @@ const std::string kInsertVehicleDataItem =
" `until`, "
" `removed`, "
" `deprecated`, "
+ " `defvalue`, "
" `minvalue`, "
" `maxvalue`, "
" `minsize`, "
" `maxsize`, "
" `minlength`, "
" `maxlength`) "
- "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ";
+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ";
const std::string kInsertVehicleDataItemParams =
"INSERT INTO `vehicle_data_item_parameters` ("
@@ -829,6 +851,11 @@ const std::string kInsertNotificationsByPriority =
"`value`) "
" VALUES (?, ?)";
+const std::string kInsertSubtleNotificationsByPriority =
+ "INSERT OR REPLACE INTO `subtle_notifications_by_priority` "
+ "(`priority_value`, `value`) "
+ " VALUES (?, ?)";
+
const std::string kInsertDeviceData =
"INSERT OR IGNORE INTO `device` (`id`) VALUES (?)";
@@ -864,6 +891,9 @@ const std::string kSelectEndpoints =
const std::string kSelectNotificationsPerMin =
"SELECT `priority_value`, `value` FROM notifications_by_priority";
+const std::string kSelectSubtleNotificationsPerMin =
+ "SELECT `priority_value`, `value` FROM subtle_notifications_by_priority";
+
const std::string kSelectNotificationsPerPriority =
"SELECT `value` FROM notifications_by_priority WHERE `priority_value` = ? ";
@@ -1047,5 +1077,9 @@ const std::string kSaveModuleMeta =
"`ignition_cycles_since_last_exchange` = ? ";
const std::string kSelectModuleMeta = "SELECT* FROM `module_meta`";
+
+const std::string kUpdateMetaParams =
+ "UPDATE `module_meta` SET "
+ "`ccpu_version` = ? ";
} // namespace sql_pt
} // namespace policy
diff --git a/src/components/policy/policy_regular/src/sql_pt_representation.cc b/src/components/policy/policy_regular/src/sql_pt_representation.cc
index c6d0b60f89..7193a06bdb 100644
--- a/src/components/policy/policy_regular/src/sql_pt_representation.cc
+++ b/src/components/policy/policy_regular/src/sql_pt_representation.cc
@@ -49,7 +49,7 @@
namespace policy {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Policy")
+SDL_CREATE_LOG_VARIABLE("Policy")
namespace {
template <typename T, typename K>
@@ -67,7 +67,18 @@ void InsertUnique(K value, T* array) {
const std::string SQLPTRepresentation::kDatabaseName = "policy";
SQLPTRepresentation::SQLPTRepresentation()
- : db_(new utils::dbms::SQLDatabase(kDatabaseName)) {}
+ : db_(new utils::dbms::SQLDatabase(kDatabaseName)) {
+ is_in_memory = false;
+}
+
+SQLPTRepresentation::SQLPTRepresentation(bool in_memory) {
+ is_in_memory = in_memory;
+ if (in_memory) {
+ db_ = new utils::dbms::SQLDatabase();
+ } else {
+ db_ = new utils::dbms::SQLDatabase(kDatabaseName);
+ }
+}
SQLPTRepresentation::~SQLPTRepresentation() {
db_->Close();
@@ -81,9 +92,8 @@ void SQLPTRepresentation::CheckPermissions(const PTString& app_id,
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectRpc)) {
- LOG4CXX_WARN(
- logger_,
- "Incorrect select statement from rpcs" << query.LastError().text());
+ SDL_LOG_WARN("Incorrect select statement from rpcs"
+ << query.LastError().text());
return;
}
query.Bind(0, app_id);
@@ -92,8 +102,7 @@ void SQLPTRepresentation::CheckPermissions(const PTString& app_id,
bool ret = query.Next();
result.hmi_level_permitted = ret ? kRpcAllowed : kRpcDisallowed;
- LOG4CXX_INFO(logger_,
- "Level is " << (result.hmi_level_permitted == kRpcAllowed
+ SDL_LOG_INFO("Level is " << (result.hmi_level_permitted == kRpcAllowed
? "permitted"
: "not permitted"));
std::string parameter;
@@ -114,7 +123,7 @@ bool SQLPTRepresentation::IsPTPreloaded() {
int SQLPTRepresentation::IgnitionCyclesBeforeExchange() {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectIgnitionCycles) || !query.Exec()) {
- LOG4CXX_WARN(logger_, "Can not select ignition cycles");
+ SDL_LOG_WARN("Can not select ignition cycles");
return 0;
}
int limit = query.GetInteger(0);
@@ -130,7 +139,7 @@ int SQLPTRepresentation::IgnitionCyclesBeforeExchange() {
int SQLPTRepresentation::KilometersBeforeExchange(int current) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectKilometers) || !query.Exec()) {
- LOG4CXX_WARN(logger_, "Can not select kilometers");
+ SDL_LOG_WARN("Can not select kilometers");
return 0;
}
int limit = query.GetInteger(0);
@@ -146,17 +155,16 @@ int SQLPTRepresentation::KilometersBeforeExchange(int current) {
bool SQLPTRepresentation::SetCountersPassedForSuccessfulUpdate(
int kilometers, int days_after_epoch) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdateCountersSuccessfulUpdate)) {
- LOG4CXX_WARN(logger_,
- "Wrong update query for counters on successful update.");
+ SDL_LOG_WARN("Wrong update query for counters on successful update.");
return false;
}
query.Bind(0, kilometers);
query.Bind(1, days_after_epoch);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed to update counters on successful update.");
+ SDL_LOG_WARN("Failed to update counters on successful update.");
return false;
}
return true;
@@ -165,7 +173,7 @@ bool SQLPTRepresentation::SetCountersPassedForSuccessfulUpdate(
int SQLPTRepresentation::DaysBeforeExchange(int current) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectDays) || !query.Exec()) {
- LOG4CXX_WARN(logger_, "Can not select days");
+ SDL_LOG_WARN("Can not select days");
return 0;
}
int limit = query.GetInteger(0);
@@ -186,7 +194,7 @@ int SQLPTRepresentation::DaysBeforeExchange(int current) {
int SQLPTRepresentation::TimeoutResponse() {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectTimeoutResponse) || !query.Exec()) {
- LOG4CXX_INFO(logger_, "Can not select timeout response for retry sequence");
+ SDL_LOG_INFO("Can not select timeout response for retry sequence");
const int defaultTimeout = 30 * date_time::MILLISECONDS_IN_SECOND;
return defaultTimeout;
}
@@ -196,8 +204,7 @@ int SQLPTRepresentation::TimeoutResponse() {
bool SQLPTRepresentation::SecondsBetweenRetries(std::vector<int>* seconds) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectSecondsBetweenRetries)) {
- LOG4CXX_INFO(logger_,
- "Incorrect select statement from seconds between retries");
+ SDL_LOG_INFO("Incorrect select statement from seconds between retries");
return false;
}
while (query.Next()) {
@@ -220,8 +227,7 @@ std::vector<UserFriendlyMessage> SQLPTRepresentation::GetUserFriendlyMsg(
}
EndpointUrls SQLPTRepresentation::GetUpdateUrls(int service_type) {
- LOG4CXX_INFO(logger_,
- "SQLPTRepresentation::GetUpdateUrls for " << service_type);
+ SDL_LOG_INFO("SQLPTRepresentation::GetUpdateUrls for " << service_type);
utils::dbms::SQLQuery query(db());
EndpointUrls ret;
if (query.Prepare(sql_pt::kSelectEndpoint)) {
@@ -236,23 +242,23 @@ EndpointUrls SQLPTRepresentation::GetUpdateUrls(int service_type) {
ret.push_back(data);
}
} else {
- LOG4CXX_WARN(logger_, "Invalid select endpoints statement.");
+ SDL_LOG_WARN("Invalid select endpoints statement.");
}
return ret;
}
int SQLPTRepresentation::GetNotificationsNumber(const std::string& priority) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectNotificationsPerPriority)) {
- LOG4CXX_WARN(logger_,
- "Incorrect select statement for priority "
- "notification number.");
+ SDL_LOG_WARN(
+ "Incorrect select statement for priority "
+ "notification number.");
return 0;
}
query.Bind(0, priority);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect select from notifications by priority.");
+ SDL_LOG_WARN("Incorrect select from notifications by priority.");
return 0;
}
@@ -265,21 +271,21 @@ int SQLPTRepresentation::GetNotificationsNumber(const std::string& priority) {
bool SQLPTRepresentation::GetPriority(const std::string& policy_app_id,
std::string* priority) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (NULL == priority) {
- LOG4CXX_WARN(logger_, "Input priority parameter is null.");
+ SDL_LOG_WARN("Input priority parameter is null.");
return false;
}
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectPriority)) {
- LOG4CXX_INFO(logger_, "Incorrect statement for priority.");
+ SDL_LOG_INFO("Incorrect statement for priority.");
return false;
}
query.Bind(0, policy_app_id);
if (!query.Exec()) {
- LOG4CXX_INFO(logger_, "Error during select priority.");
+ SDL_LOG_INFO("Error during select priority.");
return false;
}
@@ -295,82 +301,80 @@ bool SQLPTRepresentation::GetPriority(const std::string& policy_app_id,
InitResult SQLPTRepresentation::Init(const PolicySettings* settings) {
settings_ = settings;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
#ifdef BUILD_TESTS
open_counter_ = 0;
#endif // BUILD_TESTS
- std::string path = get_settings().app_storage_folder();
- if (!path.empty()) {
- db_->set_path(path + "/");
+
+ if (!is_in_memory) {
+ const std::string& path = get_settings().app_storage_folder();
+ if (!path.empty()) {
+ db_->set_path(path + "/");
+ }
}
+
if (!db_->Open()) {
- LOG4CXX_ERROR(logger_, "Failed opening database.");
- LOG4CXX_INFO(logger_, "Starting opening retries.");
+ SDL_LOG_ERROR("Failed opening database.");
+ SDL_LOG_INFO("Starting opening retries.");
const uint16_t attempts = get_settings().attempts_to_open_policy_db();
- LOG4CXX_DEBUG(logger_, "Total attempts number is: " << attempts);
+ SDL_LOG_DEBUG("Total attempts number is: " << attempts);
bool is_opened = false;
const uint16_t open_attempt_timeout_ms =
get_settings().open_attempt_timeout_ms();
const useconds_t sleep_interval_mcsec = open_attempt_timeout_ms * 1000;
- LOG4CXX_DEBUG(logger_,
- "Open attempt timeout(ms) is: " << open_attempt_timeout_ms);
+ SDL_LOG_DEBUG("Open attempt timeout(ms) is: " << open_attempt_timeout_ms);
for (int i = 0; i < attempts; ++i) {
usleep(sleep_interval_mcsec);
- LOG4CXX_INFO(logger_, "Attempt: " << i + 1);
+ SDL_LOG_INFO("Attempt: " << i + 1);
#ifdef BUILD_TESTS
++open_counter_;
#endif // BUILD_TESTS
if (db_->Open()) {
- LOG4CXX_INFO(logger_, "Database opened.");
+ SDL_LOG_INFO("Database opened.");
is_opened = true;
break;
}
}
if (!is_opened) {
- LOG4CXX_ERROR(logger_,
- "Open retry sequence failed. Tried "
- << attempts << " attempts with "
- << open_attempt_timeout_ms
- << " open timeout(ms) for each.");
+ SDL_LOG_ERROR("Open retry sequence failed. Tried "
+ << attempts << " attempts with " << open_attempt_timeout_ms
+ << " open timeout(ms) for each.");
return InitResult::FAIL;
}
}
-#ifndef __QNX__
+
if (!db_->IsReadWrite()) {
- LOG4CXX_ERROR(logger_, "There are no read/write permissions for database");
+ SDL_LOG_ERROR("There are no read/write permissions for database");
return InitResult::FAIL;
}
-#endif // __QNX__
utils::dbms::SQLQuery check_pages(db());
if (!check_pages.Prepare(sql_pt::kCheckPgNumber) || !check_pages.Next()) {
- LOG4CXX_WARN(logger_, "Incorrect pragma for page counting.");
+ SDL_LOG_WARN("Incorrect pragma for page counting.");
} else {
if (0 < check_pages.GetInteger(0)) {
utils::dbms::SQLQuery db_check(db());
if (!db_check.Prepare(sql_pt::kCheckDBIntegrity)) {
- LOG4CXX_WARN(logger_, "Incorrect pragma for integrity check.");
+ SDL_LOG_WARN("Incorrect pragma for integrity check.");
} else {
while (db_check.Next()) {
if (db_check.GetString(0).compare("ok") == 0) {
utils::dbms::SQLQuery check_first_run(db());
if (check_first_run.Prepare(sql_pt::kIsFirstRun) &&
check_first_run.Next()) {
- LOG4CXX_INFO(
- logger_,
- "Selecting is first run " << check_first_run.GetBoolean(0));
+ SDL_LOG_INFO("Selecting is first run "
+ << check_first_run.GetBoolean(0));
if (check_first_run.GetBoolean(0)) {
utils::dbms::SQLQuery set_not_first_run(db());
set_not_first_run.Exec(sql_pt::kSetNotFirstRun);
return InitResult::SUCCESS;
}
} else {
- LOG4CXX_WARN(logger_, "Incorrect select is first run");
+ SDL_LOG_WARN("Incorrect select is first run");
}
return InitResult::EXISTS;
} else {
- LOG4CXX_ERROR(logger_,
- "Existing policy table representation is invlaid.");
+ SDL_LOG_ERROR("Existing policy table representation is invlaid.");
// TODO(PV): add handle
return InitResult::FAIL;
}
@@ -380,14 +384,12 @@ InitResult SQLPTRepresentation::Init(const PolicySettings* settings) {
}
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kCreateSchema)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed creating schema of database: " << query.LastError().text());
return InitResult::FAIL;
}
if (!query.Exec(sql_pt::kInsertInitData)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed insert init data to database: " << query.LastError().text());
return InitResult::FAIL;
}
@@ -402,8 +404,7 @@ bool SQLPTRepresentation::Close() {
bool SQLPTRepresentation::Drop() {
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDropSchema)) {
- LOG4CXX_WARN(logger_,
- "Failed dropping database: " << query.LastError().text());
+ SDL_LOG_WARN("Failed dropping database: " << query.LastError().text());
return false;
}
return true;
@@ -416,13 +417,11 @@ void SQLPTRepresentation::WriteDb() {
bool SQLPTRepresentation::Clear() {
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDeleteData)) {
- LOG4CXX_ERROR(logger_,
- "Failed clearing database: " << query.LastError().text());
+ SDL_LOG_ERROR("Failed clearing database: " << query.LastError().text());
return false;
}
if (!query.Exec(sql_pt::kInsertInitData)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed insert init data to database: " << query.LastError().text());
return false;
}
@@ -432,19 +431,16 @@ bool SQLPTRepresentation::Clear() {
bool SQLPTRepresentation::RefreshDB() {
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDropSchema)) {
- LOG4CXX_WARN(logger_,
- "Failed dropping database: " << query.LastError().text());
+ SDL_LOG_WARN("Failed dropping database: " << query.LastError().text());
return false;
}
if (!query.Exec(sql_pt::kCreateSchema)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed creating schema of database: " << query.LastError().text());
return false;
}
if (!query.Exec(sql_pt::kInsertInitData)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed insert init data to database: " << query.LastError().text());
return false;
}
@@ -453,7 +449,7 @@ bool SQLPTRepresentation::RefreshDB() {
std::shared_ptr<policy_table::Table> SQLPTRepresentation::GenerateSnapshot()
const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto table = std::make_shared<policy_table::Table>();
GatherModuleMeta(&*table->policy_table.module_meta);
GatherModuleConfig(&table->policy_table.module_config);
@@ -473,21 +469,22 @@ std::shared_ptr<policy_table::Table> SQLPTRepresentation::GenerateSnapshot()
void SQLPTRepresentation::GatherModuleMeta(
policy_table::ModuleMeta* meta) const {
- LOG4CXX_INFO(logger_, "Gather Module Meta Info");
+ SDL_LOG_INFO("Gather Module Meta Info");
utils::dbms::SQLQuery query(db());
if (query.Prepare(sql_pt::kSelectModuleMeta) && query.Next()) {
*meta->pt_exchanged_at_odometer_x = query.GetInteger(0);
*meta->pt_exchanged_x_days_after_epoch = query.GetInteger(1);
*meta->ignition_cycles_since_last_exchange = query.GetInteger(2);
+ *meta->ccpu_version = query.GetString(4);
}
}
void SQLPTRepresentation::GatherModuleConfig(
policy_table::ModuleConfig* config) const {
- LOG4CXX_INFO(logger_, "Gather Configuration Info");
+ SDL_LOG_INFO("Gather Configuration Info");
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectModuleConfig) || !query.Next()) {
- LOG4CXX_WARN(logger_, "Incorrect select statement for module config");
+ SDL_LOG_WARN("Incorrect select statement for module config");
} else {
*config->preloaded_pt = query.GetBoolean(0);
config->exchange_after_x_ignition_cycles = query.GetInteger(1);
@@ -505,7 +502,7 @@ void SQLPTRepresentation::GatherModuleConfig(
utils::dbms::SQLQuery endpoints(db());
if (!endpoints.Prepare(sql_pt::kSelectEndpoints)) {
- LOG4CXX_WARN(logger_, "Incorrect select statement for endpoints");
+ SDL_LOG_WARN("Incorrect select statement for endpoints");
} else {
while (endpoints.Next()) {
const std::string& url = endpoints.GetString(0);
@@ -517,7 +514,7 @@ void SQLPTRepresentation::GatherModuleConfig(
utils::dbms::SQLQuery endpoint_properties(db());
if (!endpoint_properties.Prepare(sql_pt::kSelectEndpointProperties)) {
- LOG4CXX_ERROR(logger_, "Incorrect statement for Endpoint properties");
+ SDL_LOG_ERROR("Incorrect statement for Endpoint properties");
} else {
while (endpoint_properties.Next()) {
const std::string& service = endpoint_properties.GetString(0);
@@ -529,17 +526,26 @@ void SQLPTRepresentation::GatherModuleConfig(
utils::dbms::SQLQuery notifications(db());
if (!notifications.Prepare(sql_pt::kSelectNotificationsPerMin)) {
- LOG4CXX_WARN(logger_, "Incorrect select statement for notifications");
+ SDL_LOG_WARN("Incorrect select statement for notifications");
} else {
while (notifications.Next()) {
config->notifications_per_minute_by_priority[notifications.GetString(0)] =
notifications.GetInteger(1);
}
}
+ utils::dbms::SQLQuery subtle_notifications(db());
+ if (!subtle_notifications.Prepare(sql_pt::kSelectSubtleNotificationsPerMin)) {
+ SDL_LOG_WARN("Incorrect select statement for subtle notifications");
+ } else {
+ while (subtle_notifications.Next()) {
+ (*config->subtle_notifications_per_minute_by_priority)
+ [subtle_notifications.GetString(0)] =
+ subtle_notifications.GetInteger(1);
+ }
+ }
utils::dbms::SQLQuery seconds(db());
if (!seconds.Prepare(sql_pt::kSelectSecondsBetweenRetries)) {
- LOG4CXX_INFO(logger_,
- "Incorrect select statement from seconds between retries");
+ SDL_LOG_INFO("Incorrect select statement from seconds between retries");
} else {
while (seconds.Next()) {
config->seconds_between_retries.push_back(seconds.GetInteger(0));
@@ -549,7 +555,7 @@ void SQLPTRepresentation::GatherModuleConfig(
bool SQLPTRepresentation::GatherUsageAndErrorCounts(
policy_table::UsageAndErrorCounts* counts) const {
- LOG4CXX_INFO(logger_, "Gather Usage and Error Counts.");
+ SDL_LOG_INFO("Gather Usage and Error Counts.");
utils::dbms::SQLQuery query(db());
if (query.Prepare(sql_pt::kSelectAppLevels)) {
policy_table::AppLevel app_level;
@@ -566,7 +572,7 @@ bool SQLPTRepresentation::GatherUsageAndErrorCounts(
void SQLPTRepresentation::GatherDeviceData(
policy_table::DeviceData* data) const {
- LOG4CXX_INFO(logger_, "Gather device data.");
+ SDL_LOG_INFO("Gather device data.");
data->mark_initialized();
utils::dbms::SQLQuery query(db());
@@ -582,15 +588,15 @@ void SQLPTRepresentation::GatherDeviceData(
bool SQLPTRepresentation::GatherFunctionalGroupings(
policy_table::FunctionalGroupings* groups) const {
- LOG4CXX_INFO(logger_, "Gather Functional Groupings info");
+ SDL_LOG_INFO("Gather Functional Groupings info");
utils::dbms::SQLQuery functional_group(db());
if (!functional_group.Prepare(sql_pt::kSelectFunctionalGroups)) {
- LOG4CXX_WARN(logger_, "Incorrect select from functional_groupings");
+ SDL_LOG_WARN("Incorrect select from functional_groupings");
return false;
}
utils::dbms::SQLQuery rpcs(db());
if (!rpcs.Prepare(sql_pt::kSelectAllRpcs)) {
- LOG4CXX_WARN(logger_, "Incorrect select all from rpc");
+ SDL_LOG_WARN("Incorrect select all from rpc");
return false;
}
@@ -646,10 +652,10 @@ bool SQLPTRepresentation::GatherFunctionalGroupings(
bool SQLPTRepresentation::GatherConsumerFriendlyMessages(
policy_table::ConsumerFriendlyMessages* messages) const {
- LOG4CXX_INFO(logger_, "Gather Consumer Friendly Messages");
+ SDL_LOG_INFO("Gather Consumer Friendly Messages");
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectUserMsgsVersion) || !query.Next()) {
- LOG4CXX_WARN(logger_, "Incorrect select from consumer_friendly_messages");
+ SDL_LOG_WARN("Incorrect select from consumer_friendly_messages");
return false;
}
@@ -687,18 +693,35 @@ bool SQLPTRepresentation::GatherConsumerFriendlyMessages(
}
}
} else {
- LOG4CXX_WARN(logger_, "Incorrect statement for select friendly messages.");
+ SDL_LOG_WARN("Incorrect statement for select friendly messages.");
}
return true;
}
+bool SQLPTRepresentation::SetMetaInfo(const std::string& ccpu_version) {
+ SDL_LOG_AUTO_TRACE();
+ utils::dbms::SQLQuery query(db());
+ if (!query.Prepare(sql_pt::kUpdateMetaParams)) {
+ SDL_LOG_WARN("Incorrect statement for insert to module meta.");
+ return false;
+ }
+
+ query.Bind(0, ccpu_version);
+
+ if (!query.Exec() || !query.Reset()) {
+ SDL_LOG_WARN("Incorrect insert to module meta.");
+ return false;
+ }
+ return true;
+}
+
bool SQLPTRepresentation::GatherApplicationPoliciesSection(
policy_table::ApplicationPoliciesSection* policies) const {
- LOG4CXX_INFO(logger_, "Gather applications policies");
+ SDL_LOG_INFO("Gather applications policies");
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectAppPolicies)) {
- LOG4CXX_WARN(logger_, "Incorrect select from app_policies");
+ SDL_LOG_WARN("Incorrect select from app_policies");
return false;
}
@@ -801,8 +824,7 @@ bool SQLPTRepresentation::GatherVehicleData(
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectVehicleDataSchemaVersion) ||
!query.Next()) {
- LOG4CXX_ERROR(logger_,
- "Incorrect statement for vehicle data schema version");
+ SDL_LOG_ERROR("Incorrect statement for vehicle data schema version");
return false;
}
*vehicle_data->schema_version = query.GetString(0);
@@ -813,7 +835,7 @@ bool SQLPTRepresentation::GatherVehicleData(
bool SQLPTRepresentation::GatherVehicleDataItems(
policy_table::VehicleDataItems* vehicle_data_items) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto parameterized_vdi = SelectCompositeVehicleDataItems();
if (!parameterized_vdi.is_initialized()) {
return false;
@@ -835,7 +857,7 @@ bool SQLPTRepresentation::GatherVehicleDataItems(
}
bool SQLPTRepresentation::Save(const policy_table::Table& table) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
db_->BeginTransaction();
if (!SaveFunctionalGroupings(table.policy_table.functional_groupings)) {
db_->RollbackTransaction();
@@ -880,17 +902,17 @@ bool SQLPTRepresentation::SaveFunctionalGroupings(
const policy_table::FunctionalGroupings& groups) {
utils::dbms::SQLQuery query_delete(db());
if (!query_delete.Exec(sql_pt::kDeleteRpc)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from rpc.");
+ SDL_LOG_WARN("Incorrect delete from rpc.");
return false;
}
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDeleteFunctionalGroup)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from seconds between retries.");
+ SDL_LOG_WARN("Incorrect delete from seconds between retries.");
return false;
}
if (!query.Prepare(sql_pt::kInsertFunctionalGroup)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for functional groups");
+ SDL_LOG_WARN("Incorrect insert statement for functional groups");
return false;
}
@@ -915,7 +937,7 @@ bool SQLPTRepresentation::SaveFunctionalGroupings(
? query.Bind(3, *(it->second.encryption_required))
: query.Bind(3);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into functional groups");
+ SDL_LOG_WARN("Incorrect insert into functional groups");
return false;
}
@@ -928,12 +950,12 @@ bool SQLPTRepresentation::SaveFunctionalGroupings(
bool SQLPTRepresentation::SaveRpcs(int64_t group_id,
const policy_table::Rpc& rpcs) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
utils::dbms::SQLQuery query_parameter(db());
if (!query.Prepare(sql_pt::kInsertRpc) ||
!query_parameter.Prepare(sql_pt::kInsertRpcWithParameter)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for rpc");
+ SDL_LOG_WARN("Incorrect insert statement for rpc");
return false;
}
@@ -953,7 +975,7 @@ bool SQLPTRepresentation::SaveRpcs(int64_t group_id,
query_parameter.Bind(2, std::string(*ps_it));
query_parameter.Bind(3, group_id);
if (!query_parameter.Exec() || !query_parameter.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into rpc with parameter");
+ SDL_LOG_WARN("Incorrect insert into rpc with parameter");
return false;
}
}
@@ -966,7 +988,7 @@ bool SQLPTRepresentation::SaveRpcs(int64_t group_id,
std::string(policy_table::EnumToJsonString(policy_table::P_EMPTY)));
query_parameter.Bind(3, group_id);
if (!query_parameter.Exec() || !query_parameter.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into rpc with parameter");
+ SDL_LOG_WARN("Incorrect insert into rpc with parameter");
return false;
}
} else {
@@ -974,7 +996,7 @@ bool SQLPTRepresentation::SaveRpcs(int64_t group_id,
query.Bind(1, std::string(policy_table::EnumToJsonString(*hmi_it)));
query.Bind(2, group_id);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into rpc");
+ SDL_LOG_WARN("Incorrect insert into rpc");
return false;
}
}
@@ -988,40 +1010,40 @@ bool SQLPTRepresentation::SaveApplicationPoliciesSection(
const policy_table::ApplicationPoliciesSection& policies) {
utils::dbms::SQLQuery query_delete(db());
if (!query_delete.Exec(sql_pt::kDeleteAppGroup)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from app_group.");
+ SDL_LOG_WARN("Incorrect delete from app_group.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteModuleTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from module_type.");
+ SDL_LOG_WARN("Incorrect delete from module_type.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteApplication)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from application.");
+ SDL_LOG_WARN("Incorrect delete from application.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteRequestType)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from request type.");
+ SDL_LOG_WARN("Incorrect delete from request type.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteRequestSubType)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from request subtype.");
+ SDL_LOG_WARN("Incorrect delete from request subtype.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteAppServiceHandledRpcs)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from handled rpcs.");
+ SDL_LOG_WARN("Incorrect delete from handled rpcs.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteAppServiceNames)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from service names.");
+ SDL_LOG_WARN("Incorrect delete from service names.");
return false;
}
if (!query_delete.Exec(sql_pt::kDeleteAppServiceTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from handled service types.");
+ SDL_LOG_WARN("Incorrect delete from handled service types.");
return false;
}
@@ -1065,8 +1087,7 @@ bool SQLPTRepresentation::SaveSpecificAppPolicy(
const policy_table::ApplicationPolicies::value_type& app) {
utils::dbms::SQLQuery app_query(db());
if (!app_query.Prepare(sql_pt::kInsertApplication)) {
- LOG4CXX_WARN(logger_,
- "Incorrect insert statement into application (device).");
+ SDL_LOG_WARN("Incorrect insert statement into application (device).");
return false;
}
@@ -1106,7 +1127,7 @@ bool SQLPTRepresentation::SaveSpecificAppPolicy(
: app_query.Bind(13);
if (!app_query.Exec() || !app_query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into application.");
+ SDL_LOG_WARN("Incorrect insert into application.");
return false;
}
@@ -1155,7 +1176,7 @@ bool policy::SQLPTRepresentation::SaveDevicePolicy(
const policy_table::DevicePolicy& device) {
utils::dbms::SQLQuery app_query(db());
if (!app_query.Prepare(sql_pt::kInsertApplication)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement into application.");
+ SDL_LOG_WARN("Incorrect insert statement into application.");
return false;
}
@@ -1167,7 +1188,7 @@ bool policy::SQLPTRepresentation::SaveDevicePolicy(
app_query.Bind(4, 0);
app_query.Bind(5);
if (!app_query.Exec() || !app_query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into application.");
+ SDL_LOG_WARN("Incorrect insert into application.");
return false;
}
@@ -1178,20 +1199,19 @@ bool SQLPTRepresentation::SaveAppGroup(
const std::string& app_id, const policy_table::Strings& app_groups) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertAppGroup)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for app group");
+ SDL_LOG_WARN("Incorrect insert statement for app group");
return false;
}
- LOG4CXX_INFO(logger_, "SaveAppGroup");
+ SDL_LOG_INFO("SaveAppGroup");
policy_table::Strings::const_iterator it;
for (it = app_groups.begin(); it != app_groups.end(); ++it) {
std::string ssss = *it;
- LOG4CXX_INFO(logger_, "Group: " << ssss);
+ SDL_LOG_INFO("Group: " << ssss);
query.Bind(0, app_id);
query.Bind(1, *it);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(
- logger_,
- "Incorrect insert into app group." << query.LastError().text());
+ SDL_LOG_WARN("Incorrect insert into app group."
+ << query.LastError().text());
return false;
}
}
@@ -1203,7 +1223,7 @@ bool SQLPTRepresentation::SaveNickname(const std::string& app_id,
const policy_table::Strings& nicknames) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertNickname)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for nickname");
+ SDL_LOG_WARN("Incorrect insert statement for nickname");
return false;
}
@@ -1212,7 +1232,7 @@ bool SQLPTRepresentation::SaveNickname(const std::string& app_id,
query.Bind(0, app_id);
query.Bind(1, *it);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into nickname.");
+ SDL_LOG_WARN("Incorrect insert into nickname.");
return false;
}
}
@@ -1224,7 +1244,7 @@ bool SQLPTRepresentation::SaveAppType(const std::string& app_id,
const policy_table::AppHMITypes& types) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertAppType)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for app type");
+ SDL_LOG_WARN("Incorrect insert statement for app type");
return false;
}
@@ -1233,7 +1253,7 @@ bool SQLPTRepresentation::SaveAppType(const std::string& app_id,
query.Bind(0, app_id);
query.Bind(1, std::string(policy_table::EnumToJsonString(*it)));
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into app type.");
+ SDL_LOG_WARN("Incorrect insert into app type.");
return false;
}
}
@@ -1245,29 +1265,29 @@ bool SQLPTRepresentation::SaveRequestType(
const std::string& app_id, const policy_table::RequestTypes& types) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertRequestType)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for request types.");
+ SDL_LOG_WARN("Incorrect insert statement for request types.");
return false;
}
policy_table::RequestTypes::const_iterator it;
if (!types.empty()) {
- LOG4CXX_WARN(logger_, "Request types not empty.");
+ SDL_LOG_WARN("Request types not empty.");
for (it = types.begin(); it != types.end(); ++it) {
query.Bind(0, app_id);
query.Bind(1, std::string(policy_table::EnumToJsonString(*it)));
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into request types.");
+ SDL_LOG_WARN("Incorrect insert into request types.");
return false;
}
}
} else if (types.is_initialized()) {
- LOG4CXX_WARN(logger_, "Request types empty.");
+ SDL_LOG_WARN("Request types empty.");
query.Bind(0, app_id);
query.Bind(1,
std::string(policy_table::EnumToJsonString(
policy_table::RequestType::RT_EMPTY)));
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into request types.");
+ SDL_LOG_WARN("Incorrect insert into request types.");
return false;
}
}
@@ -1279,29 +1299,29 @@ bool SQLPTRepresentation::SaveRequestSubType(
const policy_table::RequestSubTypes& request_subtypes) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertRequestSubType)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for request subtypes.");
+ SDL_LOG_WARN("Incorrect insert statement for request subtypes.");
return false;
}
policy_table::Strings::const_iterator it;
if (!request_subtypes.empty()) {
- LOG4CXX_TRACE(logger_, "Request subtypes are not empty.");
+ SDL_LOG_TRACE("Request subtypes are not empty.");
for (it = request_subtypes.begin(); it != request_subtypes.end(); ++it) {
query.Bind(0, app_id);
query.Bind(1, *it);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into request subtypes.");
+ SDL_LOG_WARN("Incorrect insert into request subtypes.");
return false;
}
}
} else if (request_subtypes.is_initialized()) {
- LOG4CXX_WARN(logger_, "Request subtypes empty.");
+ SDL_LOG_WARN("Request subtypes empty.");
query.Bind(0, app_id);
query.Bind(1,
std::string(policy_table::EnumToJsonString(
policy_table::RequestType::RT_EMPTY)));
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into request subtypes.");
+ SDL_LOG_WARN("Incorrect insert into request subtypes.");
return false;
}
}
@@ -1311,11 +1331,11 @@ bool SQLPTRepresentation::SaveRequestSubType(
bool SQLPTRepresentation::SaveAppServiceParameters(
const std::string& app_id,
const policy_table::AppServiceParameters& app_service_parameters) {
- LOG4CXX_INFO(logger_, "Save app service parameters");
+ SDL_LOG_INFO("Save app service parameters");
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertAppServiceTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for app service types");
+ SDL_LOG_WARN("Incorrect insert statement for app service types");
return false;
}
policy_table::AppServiceParameters::const_iterator it;
@@ -1328,14 +1348,14 @@ bool SQLPTRepresentation::SaveAppServiceParameters(
query.Bind(1, it->first);
query.Bind(2, app_id);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Insert execute failed for into app service types");
+ SDL_LOG_WARN("Insert execute failed for into app service types");
return false;
}
// Insert app names array into db
utils::dbms::SQLQuery service_name_query(db());
if (!service_name_query.Prepare(sql_pt::kInsertAppServiceNames)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for app service names");
+ SDL_LOG_WARN("Incorrect insert statement for app service names");
return false;
}
@@ -1343,11 +1363,11 @@ bool SQLPTRepresentation::SaveAppServiceParameters(
if (app_service_names.is_initialized() && app_service_names->empty()) {
// App service names is an empty array
- LOG4CXX_DEBUG(logger_, "App Service Names is Empty Array");
+ SDL_LOG_DEBUG("App Service Names is Empty Array");
service_name_query.Bind(0, static_cast<int64_t>(id));
service_name_query.Bind(1);
if (!service_name_query.Exec() || !service_name_query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into empty app service names");
+ SDL_LOG_WARN("Incorrect insert into empty app service names");
return false;
}
} else {
@@ -1358,7 +1378,7 @@ bool SQLPTRepresentation::SaveAppServiceParameters(
service_name_query.Bind(0, static_cast<int64_t>(id));
service_name_query.Bind(1, *names_it);
if (!service_name_query.Exec() || !service_name_query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into app service names");
+ SDL_LOG_WARN("Incorrect insert into app service names");
return false;
}
}
@@ -1367,8 +1387,7 @@ bool SQLPTRepresentation::SaveAppServiceParameters(
// Insert handled rpcs array into db
utils::dbms::SQLQuery handled_rpcs_query(db());
if (!handled_rpcs_query.Prepare(sql_pt::kInsertAppServiceHandledRpcs)) {
- LOG4CXX_WARN(logger_,
- "Incorrect insert statement for app service handled rpcs");
+ SDL_LOG_WARN("Incorrect insert statement for app service handled rpcs");
return false;
}
@@ -1379,7 +1398,7 @@ bool SQLPTRepresentation::SaveAppServiceParameters(
handled_rpcs_query.Bind(0, static_cast<int64_t>(id));
handled_rpcs_query.Bind(1, static_cast<int32_t>(rpc_it->function_id));
if (!handled_rpcs_query.Exec() || !handled_rpcs_query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into app service handled rpcs");
+ SDL_LOG_WARN("Incorrect insert into app service handled rpcs");
return false;
}
}
@@ -1391,7 +1410,7 @@ bool SQLPTRepresentation::SaveModuleMeta(const policy_table::ModuleMeta& meta) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSaveModuleMeta)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for module_meta.");
+ SDL_LOG_WARN("Incorrect insert statement for module_meta.");
return false;
}
const int64_t odometer = *(meta.pt_exchanged_at_odometer_x);
@@ -1401,7 +1420,7 @@ bool SQLPTRepresentation::SaveModuleMeta(const policy_table::ModuleMeta& meta) {
query.Bind(2, *(meta.ignition_cycles_since_last_exchange));
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect update for module_meta.");
+ SDL_LOG_WARN("Incorrect update for module_meta.");
return false;
}
@@ -1412,7 +1431,7 @@ bool SQLPTRepresentation::SaveModuleConfig(
const policy_table::ModuleConfig& config) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdateModuleConfig)) {
- LOG4CXX_WARN(logger_, "Incorrect update statement for module config");
+ SDL_LOG_WARN("Incorrect update statement for module config");
return false;
}
@@ -1435,7 +1454,7 @@ bool SQLPTRepresentation::SaveModuleConfig(
? query.Bind(9, *(config.lock_screen_dismissal_enabled))
: query.Bind(9);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect update module config");
+ SDL_LOG_WARN("Incorrect update module config");
return false;
}
@@ -1448,6 +1467,11 @@ bool SQLPTRepresentation::SaveModuleConfig(
return false;
}
+ if (!SaveNumberOfSubtleNotificationsPerMinute(
+ *config.subtle_notifications_per_minute_by_priority)) {
+ return false;
+ }
+
if (!SaveServiceEndpoints(config.endpoints)) {
return false;
}
@@ -1463,12 +1487,12 @@ bool SQLPTRepresentation::SaveServiceEndpoints(
const policy_table::ServiceEndpoints& endpoints) {
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDeleteEndpoint)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from endpoint.");
+ SDL_LOG_WARN("Incorrect delete from endpoint.");
return false;
}
if (!query.Prepare(sql_pt::kInsertEndpoint)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for endpoint");
+ SDL_LOG_WARN("Incorrect insert statement for endpoint");
return false;
}
@@ -1484,7 +1508,7 @@ bool SQLPTRepresentation::SaveServiceEndpoints(
query.Bind(1, *url_it);
query.Bind(2, app_it->first);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into endpoint");
+ SDL_LOG_WARN("Incorrect insert into endpoint");
return false;
}
}
@@ -1498,8 +1522,7 @@ bool SQLPTRepresentation::SaveServiceEndpointProperties(
const policy_table::ServiceEndpointProperties& endpoint_properties) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertEndpointVersion)) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Incorrect insert of endpoint property to endpoint_properties.");
return false;
}
@@ -1509,8 +1532,7 @@ bool SQLPTRepresentation::SaveServiceEndpointProperties(
query.Bind(1, endpoint_property.second.version);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Failed to insert endpoint property into endpoint_properties.");
return false;
}
@@ -1521,13 +1543,13 @@ bool SQLPTRepresentation::SaveServiceEndpointProperties(
bool SQLPTRepresentation::SaveConsumerFriendlyMessages(
const policy_table::ConsumerFriendlyMessages& messages) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// According CRS-2419 If there is no “consumer_friendly_messages” key,
// the current local consumer_friendly_messages section shall be maintained in
// the policy table. So it won't be changed/updated
if (!messages.messages.is_initialized()) {
- LOG4CXX_INFO(logger_, "ConsumerFriendlyMessages messages list is empty");
+ SDL_LOG_INFO("ConsumerFriendlyMessages messages list is empty");
return true;
}
@@ -1538,18 +1560,18 @@ bool SQLPTRepresentation::SaveConsumerFriendlyMessages(
}
if (!delete_query_exec_result) {
- LOG4CXX_WARN(logger_, "Failed to delete messages from DB.");
+ SDL_LOG_WARN("Failed to delete messages from DB.");
return false;
}
if (!query.Prepare(sql_pt::kUpdateVersion)) {
- LOG4CXX_WARN(logger_, "Invalid update messages version statement.");
+ SDL_LOG_WARN("Invalid update messages version statement.");
return false;
}
query.Bind(0, messages.version);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed to update messages version number in DB.");
+ SDL_LOG_WARN("Failed to update messages version number in DB.");
return false;
}
@@ -1576,13 +1598,13 @@ bool SQLPTRepresentation::SaveConsumerFriendlyMessages(
bool SQLPTRepresentation::SaveMessageType(const std::string& type) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertMessageType)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for message type.");
+ SDL_LOG_WARN("Incorrect insert statement for message type.");
return false;
}
query.Bind(0, type);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into message type.");
+ SDL_LOG_WARN("Incorrect insert into message type.");
return false;
}
@@ -1592,13 +1614,13 @@ bool SQLPTRepresentation::SaveMessageType(const std::string& type) {
bool SQLPTRepresentation::SaveLanguage(const std::string& code) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertLanguage)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for language.");
+ SDL_LOG_WARN("Incorrect insert statement for language.");
return false;
}
query.Bind(0, code);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into language.");
+ SDL_LOG_WARN("Incorrect insert into language.");
return false;
}
@@ -1611,7 +1633,7 @@ bool SQLPTRepresentation::SaveMessageString(
const policy_table::MessageString& strings) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertMessageString)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for message.");
+ SDL_LOG_WARN("Incorrect insert statement for message.");
return false;
}
@@ -1638,7 +1660,7 @@ bool SQLPTRepresentation::SaveMessageString(
}
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into message.");
+ SDL_LOG_WARN("Incorrect insert into message.");
return false;
}
return true;
@@ -1648,12 +1670,11 @@ bool SQLPTRepresentation::SaveSecondsBetweenRetries(
const policy_table::SecondsBetweenRetries& seconds) {
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDeleteSecondsBetweenRetries)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from seconds between retries.");
+ SDL_LOG_WARN("Incorrect delete from seconds between retries.");
return false;
}
if (!query.Prepare(sql_pt::kInsertSecondsBetweenRetry)) {
- LOG4CXX_WARN(logger_,
- "Incorrect insert statement for seconds between retries.");
+ SDL_LOG_WARN("Incorrect insert statement for seconds between retries.");
return false;
}
@@ -1661,7 +1682,7 @@ bool SQLPTRepresentation::SaveSecondsBetweenRetries(
query.Bind(0, static_cast<int>(i));
query.Bind(1, seconds[i]);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into seconds between retries.");
+ SDL_LOG_WARN("Incorrect insert into seconds between retries.");
return false;
}
}
@@ -1673,8 +1694,7 @@ bool SQLPTRepresentation::SaveNumberOfNotificationsPerMinute(
const policy_table::NumberOfNotificationsPerMinute& notifications) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertNotificationsByPriority)) {
- LOG4CXX_WARN(logger_,
- "Incorrect insert statement for notifications by priority.");
+ SDL_LOG_WARN("Incorrect insert statement for notifications by priority.");
return false;
}
@@ -1683,7 +1703,28 @@ bool SQLPTRepresentation::SaveNumberOfNotificationsPerMinute(
query.Bind(0, it->first);
query.Bind(1, it->second);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into notifications by priority.");
+ SDL_LOG_WARN("Incorrect insert into notifications by priority.");
+ return false;
+ }
+ }
+
+ return true;
+}
+
+bool SQLPTRepresentation::SaveNumberOfSubtleNotificationsPerMinute(
+ const policy_table::NumberOfNotificationsPerMinute& notifications) {
+ utils::dbms::SQLQuery query(db());
+ if (!query.Prepare(sql_pt::kInsertSubtleNotificationsByPriority)) {
+ SDL_LOG_WARN("Incorrect insert statement for notifications by priority.");
+ return false;
+ }
+
+ policy_table::NumberOfNotificationsPerMinute::const_iterator it;
+ for (it = notifications.begin(); it != notifications.end(); ++it) {
+ query.Bind(0, it->first);
+ query.Bind(1, it->second);
+ if (!query.Exec() || !query.Reset()) {
+ SDL_LOG_WARN("Incorrect insert into notifications by priority.");
return false;
}
}
@@ -1695,7 +1736,7 @@ bool SQLPTRepresentation::SaveDeviceData(
const policy_table::DeviceData& devices) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertDeviceData)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for device data.");
+ SDL_LOG_WARN("Incorrect insert statement for device data.");
return false;
}
@@ -1703,7 +1744,7 @@ bool SQLPTRepresentation::SaveDeviceData(
for (it = devices.begin(); it != devices.end(); ++it) {
query.Bind(0, it->first);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into device data.");
+ SDL_LOG_WARN("Incorrect insert into device data.");
return false;
}
}
@@ -1716,11 +1757,11 @@ bool SQLPTRepresentation::SaveUsageAndErrorCounts(
const_cast<policy_table::UsageAndErrorCounts&>(counts).mark_initialized();
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDeleteAppLevel)) {
- LOG4CXX_WARN(logger_, "Incorrect delete from app level.");
+ SDL_LOG_WARN("Incorrect delete from app level.");
return false;
}
if (!query.Prepare(sql_pt::kInsertAppLevel)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for app level.");
+ SDL_LOG_WARN("Incorrect insert statement for app level.");
return false;
}
@@ -1731,7 +1772,7 @@ bool SQLPTRepresentation::SaveUsageAndErrorCounts(
query.Bind(0, it->first);
query.Bind(1, it->second.count_of_tls_errors);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into app level.");
+ SDL_LOG_WARN("Incorrect insert into app level.");
return false;
}
}
@@ -1740,18 +1781,17 @@ bool SQLPTRepresentation::SaveUsageAndErrorCounts(
bool SQLPTRepresentation::SaveVehicleData(
const policy_table::VehicleData& vehicle_data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (vehicle_data.is_initialized() &&
vehicle_data.schema_version.is_initialized()) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertVehicleDataSchemaVersion)) {
- LOG4CXX_WARN(logger_,
- "Incorrect insert of schema_version to vehicle_data.");
+ SDL_LOG_WARN("Incorrect insert of schema_version to vehicle_data.");
return false;
}
query.Bind(0, (*vehicle_data.schema_version));
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Failed to insert schema_version to vehicle_data.");
+ SDL_LOG_WARN("Failed to insert schema_version to vehicle_data.");
return false;
}
}
@@ -1766,7 +1806,7 @@ bool SQLPTRepresentation::SaveVehicleData(
bool SQLPTRepresentation::SaveVehicleDataItems(
const policy_table::VehicleDataItems& vehicle_data_items) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DeleteVehicleDataItems();
for (const auto& item : vehicle_data_items) {
if (!InsertVehicleDataItem(item)) {
@@ -1779,23 +1819,22 @@ bool SQLPTRepresentation::SaveVehicleDataItems(
void SQLPTRepresentation::IncrementIgnitionCycles() {
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kIncrementIgnitionCycles)) {
- LOG4CXX_WARN(logger_, "Failed incrementing ignition cycles");
+ SDL_LOG_WARN("Failed incrementing ignition cycles");
}
}
void SQLPTRepresentation::ResetIgnitionCycles() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kResetIgnitionCycles)) {
- LOG4CXX_WARN(logger_, "Failed to reset ignition cycles number.");
+ SDL_LOG_WARN("Failed to reset ignition cycles number.");
}
}
bool SQLPTRepresentation::UpdateRequired() const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectFlagUpdateRequired) || !query.Exec()) {
- LOG4CXX_WARN(logger_,
- "Failed select update required flag from module meta");
+ SDL_LOG_WARN("Failed select update required flag from module meta");
return false;
}
return query.GetBoolean(0);
@@ -1806,29 +1845,28 @@ void SQLPTRepresentation::SaveUpdateRequired(bool value) {
// TODO(AOleynik): Quick fix, will be reworked
if (!query.Prepare(/*sql_pt::kUpdateFlagUpdateRequired*/
"UPDATE `module_meta` SET `flag_update_required` = ?")) {
- LOG4CXX_WARN(logger_,
- "Incorrect update into module meta (update_required): "
- << strerror(errno));
+ SDL_LOG_WARN("Incorrect update into module meta (update_required): "
+ << strerror(errno));
return;
}
query.Bind(0, value);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed update module meta (update_required)");
+ SDL_LOG_WARN("Failed update module meta (update_required)");
}
}
bool SQLPTRepresentation::GetInitialAppData(const std::string& app_id,
StringArray* nicknames,
StringArray* app_types) {
- LOG4CXX_INFO(logger_, "Getting initial application data.");
+ SDL_LOG_INFO("Getting initial application data.");
utils::dbms::SQLQuery app_names(db());
if (!app_names.Prepare(sql_pt::kSelectNicknames)) {
- LOG4CXX_WARN(logger_, "Incorrect select from app nicknames");
+ SDL_LOG_WARN("Incorrect select from app nicknames");
return false;
}
utils::dbms::SQLQuery app_hmi_types(db());
if (!app_hmi_types.Prepare(sql_pt::kSelectAppTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect select from app types");
+ SDL_LOG_WARN("Incorrect select from app types");
return false;
}
app_names.Bind(0, app_id);
@@ -1846,7 +1884,7 @@ bool SQLPTRepresentation::GetInitialAppData(const std::string& app_id,
bool SQLPTRepresentation::GetFunctionalGroupings(
policy_table::FunctionalGroupings& groups) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return GatherFunctionalGroupings(&groups);
}
@@ -1854,7 +1892,7 @@ bool SQLPTRepresentation::GatherAppType(
const std::string& app_id, policy_table::AppHMITypes* app_types) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectAppTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect select from app types");
+ SDL_LOG_WARN("Incorrect select from app types");
return false;
}
@@ -1874,7 +1912,7 @@ bool SQLPTRepresentation::GatherRequestType(
policy_table::RequestTypes* request_types) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectRequestTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect select from request types.");
+ SDL_LOG_WARN("Incorrect select from request types.");
return false;
}
@@ -1898,7 +1936,7 @@ bool SQLPTRepresentation::GatherRequestSubType(
policy_table::RequestSubTypes* request_subtypes) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectRequestSubTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect select from request subtypes.");
+ SDL_LOG_WARN("Incorrect select from request subtypes.");
return false;
}
@@ -1918,22 +1956,22 @@ bool SQLPTRepresentation::GatherRequestSubType(
bool SQLPTRepresentation::GatherAppServiceParameters(
const std::string& app_id,
policy_table::AppServiceParameters* app_service_parameters) const {
- LOG4CXX_INFO(logger_, "Gather app service info");
+ SDL_LOG_INFO("Gather app service info");
utils::dbms::SQLQuery service_type_query(db());
if (!service_type_query.Prepare(sql_pt::kSelectAppServiceTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect select from service_types");
+ SDL_LOG_WARN("Incorrect select from service_types");
return false;
}
utils::dbms::SQLQuery service_name_query(db());
if (!service_name_query.Prepare(sql_pt::kSelectAppServiceNames)) {
- LOG4CXX_WARN(logger_, "Incorrect select all from app_service_names");
+ SDL_LOG_WARN("Incorrect select all from app_service_names");
return false;
}
utils::dbms::SQLQuery handled_rpcs_query(db());
if (!handled_rpcs_query.Prepare(sql_pt::kSelectAppServiceHandledRpcs)) {
- LOG4CXX_WARN(logger_, "Incorrect select all from app_service_handled_rpcs");
+ SDL_LOG_WARN("Incorrect select all from app_service_handled_rpcs");
return false;
}
@@ -1941,12 +1979,12 @@ bool SQLPTRepresentation::GatherAppServiceParameters(
while (service_type_query.Next()) {
const int service_type_id = service_type_query.GetInteger(0);
std::string service_type = service_type_query.GetString(1);
- LOG4CXX_WARN(logger_, "Load service type from pt: " << service_type);
+ SDL_LOG_WARN("Load service type from pt: " << service_type);
(*app_service_parameters)[service_type] = policy_table::AppServiceInfo();
service_name_query.Bind(0, service_type_id);
while (service_name_query.Next()) {
- LOG4CXX_DEBUG(logger_, "Loading service name");
+ SDL_LOG_DEBUG("Loading service name");
(*app_service_parameters)[service_type].service_names->push_back(
service_name_query.GetString(0));
(*app_service_parameters)[service_type].service_names->mark_initialized();
@@ -1961,11 +1999,11 @@ bool SQLPTRepresentation::GatherAppServiceParameters(
}
if (!service_name_query.Reset()) {
- LOG4CXX_ERROR(logger_, "Could not reset service_name query");
+ SDL_LOG_ERROR("Could not reset service_name query");
return false;
}
if (!handled_rpcs_query.Reset()) {
- LOG4CXX_ERROR(logger_, "Could not reset handled_rpcs query");
+ SDL_LOG_ERROR("Could not reset handled_rpcs query");
return false;
}
}
@@ -1977,7 +2015,7 @@ bool SQLPTRepresentation::GatherNickName(
const std::string& app_id, policy_table::Strings* nicknames) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectNicknames)) {
- LOG4CXX_WARN(logger_, "Incorrect select from app nicknames");
+ SDL_LOG_WARN("Incorrect select from app nicknames");
return false;
}
@@ -1992,7 +2030,7 @@ bool SQLPTRepresentation::GatherAppGroup(
const std::string& app_id, policy_table::Strings* app_groups) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectAppGroups)) {
- LOG4CXX_WARN(logger_, "Incorrect select from app groups");
+ SDL_LOG_WARN("Incorrect select from app groups");
return false;
}
@@ -2005,10 +2043,10 @@ bool SQLPTRepresentation::GatherAppGroup(
bool SQLPTRepresentation::GatherRemoteControlDenied(const std::string& app_id,
bool* denied) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectRemoteControlDenied)) {
- LOG4CXX_WARN(logger_, "Incorrect select remote control flag");
+ SDL_LOG_WARN("Incorrect select remote control flag");
return false;
}
query.Bind(0, app_id);
@@ -2024,7 +2062,7 @@ bool SQLPTRepresentation::GatherModuleType(
const std::string& app_id, policy_table::ModuleTypes* app_types) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectModuleTypes)) {
- LOG4CXX_WARN(logger_, "Incorrect select from app types");
+ SDL_LOG_WARN("Incorrect select from app types");
return false;
}
@@ -2045,17 +2083,17 @@ bool SQLPTRepresentation::GatherModuleType(
bool SQLPTRepresentation::SaveRemoteControlDenied(const std::string& app_id,
bool deny) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdateRemoteControlDenied)) {
- LOG4CXX_WARN(logger_, "Incorrect update statement for remote control flag");
+ SDL_LOG_WARN("Incorrect update statement for remote control flag");
return false;
}
- LOG4CXX_DEBUG(logger_, "App: " << app_id << std::boolalpha << " - " << deny);
+ SDL_LOG_DEBUG("App: " << app_id << std::boolalpha << " - " << deny);
query.Bind(0, deny);
query.Bind(1, app_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect update remote control flag.");
+ SDL_LOG_WARN("Incorrect update remote control flag.");
return false;
}
return true;
@@ -2065,7 +2103,7 @@ bool SQLPTRepresentation::SaveModuleType(
const std::string& app_id, const policy_table::ModuleTypes& types) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertModuleType)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for module type");
+ SDL_LOG_WARN("Incorrect insert statement for module type");
return false;
}
@@ -2075,10 +2113,9 @@ bool SQLPTRepresentation::SaveModuleType(
query.Bind(0, app_id);
std::string module(policy_table::EnumToJsonString(*it));
query.Bind(1, module);
- LOG4CXX_DEBUG(logger_,
- "Module(app: " << app_id << ", type: " << module << ")");
+ SDL_LOG_DEBUG("Module(app: " << app_id << ", type: " << module << ")");
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into module type.");
+ SDL_LOG_WARN("Incorrect insert into module type.");
return false;
}
}
@@ -2088,21 +2125,21 @@ bool SQLPTRepresentation::SaveModuleType(
std::string(policy_table::EnumToJsonString(
policy_table::ModuleType::MT_EMPTY)));
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into module types.");
+ SDL_LOG_WARN("Incorrect insert into module types.");
return false;
}
} else {
- LOG4CXX_WARN(logger_, "Module Type omitted.");
+ SDL_LOG_WARN("Module Type omitted.");
}
return true;
}
bool SQLPTRepresentation::SaveAccessModule(
TypeAccess access, const policy_table::AccessModules& modules) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertAccessModule)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for access module");
+ SDL_LOG_WARN("Incorrect insert statement for access module");
return false;
}
@@ -2113,12 +2150,12 @@ bool SQLPTRepresentation::SaveAccessModule(
query.Bind(0, name);
query.Bind(1, access);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into access module.");
+ SDL_LOG_WARN("Incorrect insert into access module.");
return false;
}
int id = query.LastInsertId();
if (!query.Reset()) {
- LOG4CXX_WARN(logger_, "Couldn't reset query access module.");
+ SDL_LOG_WARN("Couldn't reset query access module.");
return false;
}
if (!SaveRemoteRpc(id, rpcs)) {
@@ -2130,10 +2167,10 @@ bool SQLPTRepresentation::SaveAccessModule(
bool SQLPTRepresentation::GatherAccessModule(
TypeAccess access, policy_table::AccessModules* modules) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectAccessModules)) {
- LOG4CXX_WARN(logger_, "Incorrect select from access module");
+ SDL_LOG_WARN("Incorrect select from access module");
return false;
}
@@ -2152,10 +2189,10 @@ bool SQLPTRepresentation::GatherAccessModule(
bool SQLPTRepresentation::SaveRemoteRpc(int module_id,
const policy_table::RemoteRpcs& rpcs) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertRemoteRpc)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement for remote rpc");
+ SDL_LOG_WARN("Incorrect insert statement for remote rpc");
return false;
}
policy_table::RemoteRpcs::const_iterator i;
@@ -2168,7 +2205,7 @@ bool SQLPTRepresentation::SaveRemoteRpc(int module_id,
query.Bind(1, name);
query.Bind(2);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into remote rpc.");
+ SDL_LOG_WARN("Incorrect insert into remote rpc.");
return false;
}
} else {
@@ -2178,7 +2215,7 @@ bool SQLPTRepresentation::SaveRemoteRpc(int module_id,
query.Bind(1, name);
query.Bind(2, param);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_WARN(logger_, "Incorrect insert into remote rpc.");
+ SDL_LOG_WARN("Incorrect insert into remote rpc.");
return false;
}
}
@@ -2189,10 +2226,10 @@ bool SQLPTRepresentation::SaveRemoteRpc(int module_id,
bool SQLPTRepresentation::GatherRemoteRpc(
int module_id, policy_table::RemoteRpcs* rpcs) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectRemoteRpcs)) {
- LOG4CXX_WARN(logger_, "Incorrect select from remote rpc");
+ SDL_LOG_WARN("Incorrect select from remote rpc");
return false;
}
@@ -2215,7 +2252,7 @@ bool SQLPTRepresentation::SaveApplicationCustomData(const std::string& app_id,
bool is_predata) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdateApplicationCustomData)) {
- LOG4CXX_WARN(logger_, "Incorrect update in application");
+ SDL_LOG_WARN("Incorrect update in application");
return false;
}
@@ -2225,7 +2262,7 @@ bool SQLPTRepresentation::SaveApplicationCustomData(const std::string& app_id,
query.Bind(3, app_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed update in application");
+ SDL_LOG_WARN("Failed update in application");
return false;
}
@@ -2236,13 +2273,13 @@ bool SQLPTRepresentation::IsApplicationRevoked(
const std::string& app_id) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectApplicationRevoked)) {
- LOG4CXX_WARN(logger_, "Incorrect select from is_revoked of application");
+ SDL_LOG_WARN("Incorrect select from is_revoked of application");
}
query.Bind(0, app_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed select is_revoked of application");
+ SDL_LOG_WARN("Failed select is_revoked of application");
return false;
}
return query.IsNull(0) ? false : query.GetBoolean(0);
@@ -2251,13 +2288,13 @@ bool SQLPTRepresentation::IsApplicationRepresented(
const std::string& app_id) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectApplicationRepresented)) {
- LOG4CXX_WARN(logger_, "Incorrect select application by id");
+ SDL_LOG_WARN("Incorrect select application by id");
return false;
}
query.Bind(0, app_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed select application by id");
+ SDL_LOG_WARN("Failed select application by id");
return false;
}
return query.GetInteger(0) != 0;
@@ -2266,13 +2303,13 @@ bool SQLPTRepresentation::IsApplicationRepresented(
bool SQLPTRepresentation::IsDefaultPolicy(const std::string& app_id) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectApplicationIsDefault)) {
- LOG4CXX_WARN(logger_, "Incorrect select application by id");
+ SDL_LOG_WARN("Incorrect select application by id");
return false;
}
query.Bind(0, app_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed select application by id");
+ SDL_LOG_WARN("Failed select application by id");
return false;
}
return query.IsNull(0) ? false : query.GetBoolean(0);
@@ -2285,12 +2322,12 @@ bool SQLPTRepresentation::IsPredataPolicy(const std::string& app_id) const {
bool SQLPTRepresentation::SetDefaultPolicy(const std::string& app_id) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kDeleteAppGroupByApplicationId)) {
- LOG4CXX_ERROR(logger_, "Incorrect statement to delete from app_group.");
+ SDL_LOG_ERROR("Incorrect statement to delete from app_group.");
return false;
}
query.Bind(0, app_id);
if (!query.Exec()) {
- LOG4CXX_ERROR(logger_, "Failed deleting from app_group.");
+ SDL_LOG_ERROR("Failed deleting from app_group.");
return false;
}
@@ -2334,17 +2371,17 @@ bool SQLPTRepresentation::SetDefaultPolicy(const std::string& app_id) {
bool SQLPTRepresentation::SetIsDefault(const std::string& app_id,
bool is_default) const {
- LOG4CXX_TRACE(logger_, "Set flag is_default of application");
+ SDL_LOG_TRACE("Set flag is_default of application");
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdateIsDefault)) {
- LOG4CXX_WARN(logger_, "Incorect statement for updating is_default");
+ SDL_LOG_WARN("Incorect statement for updating is_default");
return false;
}
query.Bind(0, is_default);
query.Bind(1, app_id);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed update is_default");
+ SDL_LOG_WARN("Failed update is_default");
return false;
}
return true;
@@ -2355,18 +2392,16 @@ void SQLPTRepresentation::RemoveDB() const {
}
bool SQLPTRepresentation::IsDBVersionActual() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectDBVersion) || !query.Exec()) {
- LOG4CXX_ERROR(logger_,
- "Failed to get DB version: " << query.LastError().text());
+ SDL_LOG_ERROR("Failed to get DB version: " << query.LastError().text());
return false;
}
const int32_t saved_db_version = query.GetInteger(0);
const int32_t current_db_version = GetDBVersion();
- LOG4CXX_DEBUG(logger_,
- "Saved DB version is: " << saved_db_version
+ SDL_LOG_DEBUG("Saved DB version is: " << saved_db_version
<< ". Current DB vesion is: "
<< current_db_version);
@@ -2374,21 +2409,19 @@ bool SQLPTRepresentation::IsDBVersionActual() const {
}
bool SQLPTRepresentation::UpdateDBVersion() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdateDBVersion)) {
- LOG4CXX_ERROR(logger_,
- "Incorrect DB version query: " << query.LastError().text());
+ SDL_LOG_ERROR("Incorrect DB version query: " << query.LastError().text());
return false;
}
const int32_t db_version = GetDBVersion();
- LOG4CXX_DEBUG(logger_, "DB version will be updated to: " << db_version);
+ SDL_LOG_DEBUG("DB version will be updated to: " << db_version);
query.Bind(0, db_version);
if (!query.Exec()) {
- LOG4CXX_ERROR(logger_,
- "DB version getting failed: " << query.LastError().text());
+ SDL_LOG_ERROR("DB version getting failed: " << query.LastError().text());
return false;
}
@@ -2400,31 +2433,25 @@ const int32_t SQLPTRepresentation::GetDBVersion() const {
}
utils::dbms::SQLDatabase* SQLPTRepresentation::db() const {
-#ifdef __QNX__
- utils::dbms::SQLDatabase* db = new utils::dbms::SQLDatabase(kDatabaseName);
- db->Open();
- return db;
-#else
return db_;
-#endif
}
bool SQLPTRepresentation::CopyApplication(const std::string& source,
const std::string& destination) {
utils::dbms::SQLQuery source_app(db());
if (!source_app.Prepare(sql_pt::kSelectApplicationFull)) {
- LOG4CXX_WARN(logger_, "Incorrect select statement from application.");
+ SDL_LOG_WARN("Incorrect select statement from application.");
return false;
}
source_app.Bind(0, source);
if (!source_app.Exec()) {
- LOG4CXX_WARN(logger_, "Failed selecting from application.");
+ SDL_LOG_WARN("Failed selecting from application.");
return false;
}
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertApplicationFull)) {
- LOG4CXX_WARN(logger_, "Incorrect insert statement into application.");
+ SDL_LOG_WARN("Incorrect insert statement into application.");
return false;
}
query.Bind(0, destination);
@@ -2462,7 +2489,7 @@ bool SQLPTRepresentation::CopyApplication(const std::string& source,
: query.Bind(18, source_app.GetBoolean(17));
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed inserting into application.");
+ SDL_LOG_WARN("Failed inserting into application.");
return false;
}
return true;
@@ -2471,13 +2498,13 @@ bool SQLPTRepresentation::CopyApplication(const std::string& source,
void SQLPTRepresentation::SetPreloaded(bool value) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdatePreloaded)) {
- LOG4CXX_WARN(logger_, "Incorrect statement of updating preloaded.");
+ SDL_LOG_WARN("Incorrect statement of updating preloaded.");
return;
}
query.Bind(0, value);
if (!query.Exec()) {
- LOG4CXX_WARN(logger_, "Failed updating preloaded.");
+ SDL_LOG_WARN("Failed updating preloaded.");
return;
}
}
@@ -2490,9 +2517,8 @@ bool SQLPTRepresentation::VehicleDataItemExists(
const policy_table::VehicleDataItem& vehicle_data_item) const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectVehicleDataItemWithVersion)) {
- LOG4CXX_ERROR(logger_,
- "Incorrent select statement for vehicle data item. "
- << query.LastError().text());
+ SDL_LOG_ERROR("Incorrent select statement for vehicle data item. "
+ << query.LastError().text());
return false;
}
@@ -2506,10 +2532,9 @@ bool SQLPTRepresentation::VehicleDataItemExists(
: query.Bind(3);
if (!query.Exec()) {
- LOG4CXX_ERROR(logger_,
- "Failed to retrieve vehicle data item: "
- << std::string(vehicle_data_item.key)
- << ". Error: " << query.LastError().text());
+ SDL_LOG_ERROR("Failed to retrieve vehicle data item: "
+ << std::string(vehicle_data_item.key)
+ << ". Error: " << query.LastError().text());
return false;
}
return !query.IsNull(0);
@@ -2521,9 +2546,8 @@ policy_table::VehicleDataItems SQLPTRepresentation::GetVehicleDataItem(
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectVehicleDataItem)) {
- LOG4CXX_ERROR(logger_,
- "Incorrent select statement of vehicle data item. "
- << query.LastError().text());
+ SDL_LOG_ERROR("Incorrent select statement of vehicle data item. "
+ << query.LastError().text());
return result;
}
@@ -2540,9 +2564,8 @@ policy_table::VehicleDataItems SQLPTRepresentation::GetVehicleDataItem(
if (policy_table::VehicleDataItem::kStruct ==
static_cast<std::string>(vdi.type)) {
if (!param_query.Prepare(sql_pt::kSelectVehicleDataItemParams)) {
- LOG4CXX_ERROR(logger_,
- "Incorrent select statement of vehicle data item. "
- << param_query.LastError().text());
+ SDL_LOG_ERROR("Incorrent select statement of vehicle data item. "
+ << param_query.LastError().text());
return policy_table::VehicleDataItems();
}
@@ -2595,22 +2618,25 @@ policy_table::VehicleDataItem SQLPTRepresentation::PopulateVDIFromQuery(
*result.deprecated = query.GetBoolean(8);
}
if (!query.IsNull(9)) {
- *result.minvalue = query.GetInteger(9);
+ *result.defvalue = query.GetString(9);
}
if (!query.IsNull(10)) {
- *result.maxvalue = query.GetInteger(10);
+ *result.minvalue = query.GetInteger(10);
}
if (!query.IsNull(11)) {
- *result.minsize = query.GetUInteger(11);
+ *result.maxvalue = query.GetInteger(11);
}
if (!query.IsNull(12)) {
- *result.maxsize = query.GetUInteger(12);
+ *result.minsize = query.GetUInteger(12);
}
if (!query.IsNull(13)) {
- *result.minlength = query.GetUInteger(13);
+ *result.maxsize = query.GetUInteger(13);
}
if (!query.IsNull(14)) {
- *result.maxlength = query.GetUInteger(14);
+ *result.minlength = query.GetUInteger(14);
+ }
+ if (!query.IsNull(15)) {
+ *result.maxlength = query.GetUInteger(15);
}
result.params->mark_initialized();
@@ -2623,21 +2649,19 @@ bool SQLPTRepresentation::InsertVehicleDataItem(
utils::dbms::SQLQuery query(db());
if (!vehicle_data_item.is_initialized() || !vehicle_data_item.is_valid()) {
- LOG4CXX_ERROR(logger_, "Vehicle data item is not initialized.");
+ SDL_LOG_ERROR("Vehicle data item is not initialized.");
return false;
}
if (VehicleDataItemExists(vehicle_data_item)) {
- LOG4CXX_INFO(logger_,
- static_cast<std::string>(vehicle_data_item.key)
- << " is already stored.");
+ SDL_LOG_INFO(static_cast<std::string>(vehicle_data_item.key)
+ << " is already stored.");
return true;
}
if (!query.Prepare(sql_pt::kInsertVehicleDataItem)) {
- LOG4CXX_ERROR(logger_,
- "Incorrent select statement of vehicle data item. "
- << query.LastError().text());
+ SDL_LOG_ERROR("Incorrent select statement of vehicle data item. "
+ << query.LastError().text());
return false;
}
@@ -2660,30 +2684,32 @@ bool SQLPTRepresentation::InsertVehicleDataItem(
vehicle_data_item.deprecated.is_initialized()
? query.Bind(8, *vehicle_data_item.deprecated)
: query.Bind(8);
- vehicle_data_item.minvalue.is_initialized()
- ? query.Bind(9, *vehicle_data_item.minvalue)
+ vehicle_data_item.defvalue.is_initialized()
+ ? query.Bind(9, *vehicle_data_item.defvalue)
: query.Bind(9);
- vehicle_data_item.maxvalue.is_initialized()
- ? query.Bind(10, *vehicle_data_item.maxvalue)
+ vehicle_data_item.minvalue.is_initialized()
+ ? query.Bind(10, *vehicle_data_item.minvalue)
: query.Bind(10);
- vehicle_data_item.minsize.is_initialized()
- ? query.Bind(11, static_cast<int64_t>(*vehicle_data_item.minsize))
+ vehicle_data_item.maxvalue.is_initialized()
+ ? query.Bind(11, *vehicle_data_item.maxvalue)
: query.Bind(11);
- vehicle_data_item.maxsize.is_initialized()
- ? query.Bind(12, static_cast<int64_t>(*vehicle_data_item.maxsize))
+ vehicle_data_item.minsize.is_initialized()
+ ? query.Bind(12, static_cast<int64_t>(*vehicle_data_item.minsize))
: query.Bind(12);
- vehicle_data_item.minlength.is_initialized()
- ? query.Bind(13, static_cast<int64_t>(*vehicle_data_item.minlength))
+ vehicle_data_item.maxsize.is_initialized()
+ ? query.Bind(13, static_cast<int64_t>(*vehicle_data_item.maxsize))
: query.Bind(13);
- vehicle_data_item.maxlength.is_initialized()
- ? query.Bind(14, static_cast<int64_t>(*vehicle_data_item.maxlength))
+ vehicle_data_item.minlength.is_initialized()
+ ? query.Bind(14, static_cast<int64_t>(*vehicle_data_item.minlength))
: query.Bind(14);
+ vehicle_data_item.maxlength.is_initialized()
+ ? query.Bind(15, static_cast<int64_t>(*vehicle_data_item.maxlength))
+ : query.Bind(15);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_ERROR(logger_,
- "Failed to insert vehicle data item: "
- << static_cast<std::string>(vehicle_data_item.key)
- << ". Error: " << query.LastError().text());
+ SDL_LOG_ERROR("Failed to insert vehicle data item: "
+ << static_cast<std::string>(vehicle_data_item.key)
+ << ". Error: " << query.LastError().text());
return false;
}
@@ -2696,14 +2722,13 @@ bool SQLPTRepresentation::InsertVehicleDataItem(
if (stored_vehicle_data_item_params.end() !=
stored_vehicle_data_item_params.find(param.name)) {
- LOG4CXX_DEBUG(logger_, "Parameter already stored.");
+ SDL_LOG_DEBUG("Parameter already stored.");
continue;
};
if (!query.Prepare(sql_pt::kInsertVehicleDataItemParams)) {
- LOG4CXX_ERROR(logger_,
- "Incorrent select statement of vehicle data item. "
- << query.LastError().text());
+ SDL_LOG_ERROR("Incorrent select statement of vehicle data item. "
+ << query.LastError().text());
return false;
}
@@ -2713,11 +2738,10 @@ bool SQLPTRepresentation::InsertVehicleDataItem(
query.Bind(3, param.key);
if (!query.Exec() || !query.Reset()) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Failed to insert to vehicle data item relations helper table: "
- << static_cast<std::string>(param.key)
- << ". Error: " << query.LastError().text());
+ << static_cast<std::string>(param.key)
+ << ". Error: " << query.LastError().text());
return false;
}
stored_vehicle_data_item_params[param.name] = param.key;
@@ -2730,10 +2754,9 @@ bool SQLPTRepresentation::InsertVehicleDataItem(
policy_table::VehicleDataItems
SQLPTRepresentation::SelectCompositeVehicleDataItems() const {
utils::dbms::SQLQuery query(db());
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!query.Prepare(sql_pt::kSelectCompositeVehicleDataItemsKey)) {
- LOG4CXX_ERROR(logger_,
- "Incorrect statement for parameterized vehicle data items");
+ SDL_LOG_ERROR("Incorrect statement for parameterized vehicle data items");
return policy_table::VehicleDataItems();
}
@@ -2745,9 +2768,7 @@ SQLPTRepresentation::SelectCompositeVehicleDataItems() const {
if (!vdi.is_initialized()) {
return policy_table::VehicleDataItems();
}
- for (const auto& item : vdi) {
- result.push_back(item);
- }
+ std::copy(vdi.begin(), vdi.end(), std::back_inserter(result));
}
return result;
@@ -2756,10 +2777,9 @@ SQLPTRepresentation::SelectCompositeVehicleDataItems() const {
policy_table::VehicleDataItems
SQLPTRepresentation::SelectPrimitiveVehicleDataItems() const {
utils::dbms::SQLQuery query(db());
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!query.Prepare(sql_pt::kSelectPrimitiveVehicleDataItems)) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Incorrect statement for non parameterized vehicle data items");
return policy_table::VehicleDataItems();
}
@@ -2779,17 +2799,15 @@ SQLPTRepresentation::SelectPrimitiveVehicleDataItems() const {
bool SQLPTRepresentation::DeleteVehicleDataItems() const {
utils::dbms::SQLQuery query(db());
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!query.Exec(sql_pt::kDeleteVehicleDataItems)) {
- LOG4CXX_ERROR(logger_,
- "Failed clearing database: " << query.LastError().text());
+ SDL_LOG_ERROR("Failed clearing database: " << query.LastError().text());
return false;
}
if (!query.Exec(sql_pt::kDeleteVehicleDataItemParams)) {
- LOG4CXX_ERROR(logger_,
- "Failed clearing database: " << query.LastError().text());
+ SDL_LOG_ERROR("Failed clearing database: " << query.LastError().text());
return false;
}
diff --git a/src/components/policy/policy_regular/src/update_status_manager.cc b/src/components/policy/policy_regular/src/update_status_manager.cc
index 1ba3d0f394..9ac51c3f93 100644
--- a/src/components/policy/policy_regular/src/update_status_manager.cc
+++ b/src/components/policy/policy_regular/src/update_status_manager.cc
@@ -36,7 +36,7 @@
namespace policy {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Policy")
+SDL_CREATE_LOG_VARIABLE("Policy")
UpdateStatusManager::UpdateStatusManager()
: listener_(NULL)
@@ -55,7 +55,7 @@ void UpdateStatusManager::ProcessEvent(UpdateEvent event) {
}
void UpdateStatusManager::PendingUpdate() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProcessEvent(kPendingUpdate);
}
@@ -72,27 +72,27 @@ void UpdateStatusManager::set_listener(PolicyListener* listener) {
}
void UpdateStatusManager::OnUpdateSentOut() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProcessEvent(kOnUpdateSentOut);
}
void UpdateStatusManager::OnUpdateTimeoutOccurs() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProcessEvent(kOnUpdateTimeout);
}
void UpdateStatusManager::OnValidUpdateReceived() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProcessEvent(kOnValidUpdateReceived);
}
void UpdateStatusManager::OnWrongUpdateReceived() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProcessEvent(kOnWrongUpdateReceived);
}
void UpdateStatusManager::OnResetDefaultPT(bool is_update_required) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (is_update_required) {
ProcessEvent(kOnResetPolicyTableRequireUpdate);
return;
@@ -101,13 +101,13 @@ void UpdateStatusManager::OnResetDefaultPT(bool is_update_required) {
}
void UpdateStatusManager::OnResetRetrySequence() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProcessEvent(kOnResetRetrySequence);
}
void UpdateStatusManager::OnExistedApplicationAdded(
const bool is_update_required) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (is_update_required) {
current_status_.reset(new UpToDateStatus());
ProcessEvent(kScheduleUpdate);
@@ -115,7 +115,7 @@ void UpdateStatusManager::OnExistedApplicationAdded(
}
void UpdateStatusManager::OnNewApplicationAdded(const DeviceConsent consent) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (kDeviceAllowed != consent) {
app_registered_from_non_consented_device_ = true;
return;
@@ -130,7 +130,7 @@ void UpdateStatusManager::OnNewApplicationAdded(const DeviceConsent consent) {
}
void UpdateStatusManager::OnDeviceConsented() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (app_registered_from_non_consented_device_) {
ProcessEvent(kOnNewAppRegistered);
}
@@ -157,19 +157,19 @@ std::string UpdateStatusManager::StringifiedUpdateStatus() const {
}
void policy::UpdateStatusManager::OnAppsSearchStarted() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(apps_search_in_progress_lock_);
apps_search_in_progress_ = true;
}
void policy::UpdateStatusManager::OnAppsSearchCompleted() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(apps_search_in_progress_lock_);
apps_search_in_progress_ = false;
}
bool policy::UpdateStatusManager::IsAppsSearchInProgress() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(apps_search_in_progress_lock_);
return apps_search_in_progress_;
}
@@ -182,7 +182,7 @@ void UpdateStatusManager::DoTransition() {
current_status_ = next_status_;
next_status_.reset();
- LOG4CXX_DEBUG(logger_, "last_processed_event_ = " << last_processed_event_);
+ SDL_LOG_DEBUG("last_processed_event_ = " << last_processed_event_);
const bool is_update_pending =
policy::StatusProcessingSnapshot == current_status_->get_status();
diff --git a/src/components/policy/policy_regular/test/CMakeLists.txt b/src/components/policy/policy_regular/test/CMakeLists.txt
index 428a056882..d2cd7be224 100644
--- a/src/components/policy/policy_regular/test/CMakeLists.txt
+++ b/src/components/policy/policy_regular/test/CMakeLists.txt
@@ -44,7 +44,15 @@ include_directories(
${POLICY_MOCK_INCLUDE_PATH}/
)
-collect_sources(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}")
+file (GLOB POLICY_TEST_SOURCES
+ ${CMAKE_CURRENT_SOURCE_DIR}/cache_manager_test.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/policy_manager_impl_test.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/access_remote_impl_test.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/sql_pt_representation_test.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/update_status_manager_test.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/vehicle_data_item_type_test.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/shared_library_test.cc
+)
set(LIBRARIES
gmock
@@ -53,20 +61,9 @@ set(LIBRARIES
UsageStatistics
)
-create_test(policy_test "${SOURCES}" "${LIBRARIES}")
+create_test(policy_test "${POLICY_TEST_SOURCES}" "${LIBRARIES}")
-file(COPY valid_sdl_pt_update.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY sdl_preloaded_pt.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY PTU.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY PTU2.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY PTU3.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY PTU4.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY ptu_requestType.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY ptu2_requestType.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY log4cxx.properties DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY smartDeviceLink.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY smartDeviceLink2.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY smartDeviceLink3.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY sdl_pt_first_update.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY sdl_pt_second_update.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY sdl_pt_update.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+#Copy actual sdl_preloaded_pt.json
+file(COPY ${CMAKE_SOURCE_DIR}/src/appMain/sdl_preloaded_pt.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/json/)
+file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/json/sdl_preloaded_pt_for_merge_initial.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/json/)
+file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/json/sdl_preloaded_pt_for_merge_latest.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/json/)
diff --git a/src/components/policy/policy_regular/test/PTU.json b/src/components/policy/policy_regular/test/PTU.json
deleted file mode 100644
index dbf16598f0..0000000000
--- a/src/components/policy/policy_regular/test/PTU.json
+++ /dev/null
@@ -1,1968 +0,0 @@
- {
- "policy_table": {
- "module_config": {
- "preloaded_pt": true,
- "preloaded_date": "2015-12-08",
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [1,
- 5,
- 25,
- 125,
- 625],
- "endpoints": {
- "0x07": {
- "default": ["http://x.x.x.x:3000/api/1/policies"]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "AddSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Alert": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EndAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GenericResponse": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnButtonEvent": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnButtonPress": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnDriverDistraction": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PerformAudioPassThru": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PerformInteraction": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ResetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ScrollableMessage": {
- "hmi_levels": ["FULL"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SetMediaClockTimer": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "Show": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Slider": {
- "hmi_levels": ["FULL"]
- },
- "Speak": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "SubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnsubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": ["BACKGROUND"]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GetDTCs": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ReadDID": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ShowConstantTBT": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "UpdateTurnList": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.019",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?"
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\n\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\n\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. /r Presione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements. /r Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?"
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push"
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app authorization information for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["Base-4"],
- "RequestType": [
- "HTTP",
- "FILE_RESUME"
- ]
- },
- "1234": "default",
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["DataConsent-2"]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["BaseBeforeDataConsent"],
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- }
- }
- }
- } \ No newline at end of file
diff --git a/src/components/policy/policy_regular/test/PTU2.json b/src/components/policy/policy_regular/test/PTU2.json
deleted file mode 100644
index 2c0063f69a..0000000000
--- a/src/components/policy/policy_regular/test/PTU2.json
+++ /dev/null
@@ -1,1973 +0,0 @@
- {
- "policy_table": {
- "module_config": {
- "preloaded_pt": true,
- "preloaded_date": "2015-12-08",
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [1,
- 5,
- 25,
- 125,
- 625],
- "endpoints": {
- "0x07": {
- "default": ["http://x.x.x.x:3000/api/1/policies"]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "AddSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Alert": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EndAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GenericResponse": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnButtonEvent": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnButtonPress": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnDriverDistraction": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PerformAudioPassThru": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PerformInteraction": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ResetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ScrollableMessage": {
- "hmi_levels": ["FULL"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SetMediaClockTimer": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "Show": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Slider": {
- "hmi_levels": ["FULL"]
- },
- "Speak": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "SubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnsubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": ["BACKGROUND"]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GetDTCs": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ReadDID": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ShowConstantTBT": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "UpdateTurnList": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.019",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?"
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\n\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\n\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. /r Presione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements. /r Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?"
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push"
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app authorization information for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["Base-4"]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["DataConsent-2"]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["BaseBeforeDataConsent"]
- },
- "1234": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["BaseBeforeDataConsent"],
- "RequestType": [
- "TRAFFIC_MESSAGE_CHANNEL",
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY",
- "NAVIGATION",
- "MEDIA"
- ]
- }
- }
- }
- }
diff --git a/src/components/policy/policy_regular/test/PTU3.json b/src/components/policy/policy_regular/test/PTU3.json
deleted file mode 100644
index d579fd3e3f..0000000000
--- a/src/components/policy/policy_regular/test/PTU3.json
+++ /dev/null
@@ -1,1970 +0,0 @@
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SetMediaClockTimer": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "Show": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Slider": {
- "hmi_levels": ["FULL"]
- },
- "Speak": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "SubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnsubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "OnVehicleData": {
- {
- "policy_table": {
- "module_config": {
- "preloaded_pt": true,
- "preloaded_date": "2015-12-08",
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [1,
- 5,
- 25,
- 125,
- 625],
- "endpoints": {
- "0x07": {
- "default": ["http://x.x.x.x:3000/api/1/policies"]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "AddSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Alert": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EndAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GenericResponse": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnButtonEvent": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnButtonPress": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnDriverDistraction": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PerformAudioPassThru": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PerformInteraction": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ResetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ScrollableMessage": {
- "hmi_levels": ["FULL"]
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": ["BACKGROUND"]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GetDTCs": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ReadDID": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ShowConstantTBT": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "UpdateTurnList": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.019",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?"
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\n\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\n\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. /r Presione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements. /r Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?"
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push"
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app authorization information for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["Base-4"],
- "RequestType": [
- "HTTP",
- "FILE_RESUMED",
- "INVALID_REQUEST_TYPE"
- ]
- },
- "1234": "default",
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["DataConsent-2"]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["BaseBeforeDataConsent"],
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY",
- "INVALID_REQUEST_TYPE"
- ]
- }
- }
- }
- } \ No newline at end of file
diff --git a/src/components/policy/policy_regular/test/PTU4.json b/src/components/policy/policy_regular/test/PTU4.json
deleted file mode 100644
index 84b6404010..0000000000
--- a/src/components/policy/policy_regular/test/PTU4.json
+++ /dev/null
@@ -1,1974 +0,0 @@
- {
- "policy_table": {
- "module_config": {
- "preloaded_pt": true,
- "preloaded_date": "2015-12-08",
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [1,
- 5,
- 25,
- 125,
- 625],
- "endpoints": {
- "0x07": {
- "default": ["http://x.x.x.x:3000/api/1/policies"]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "AddSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Alert": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EndAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GenericResponse": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnButtonEvent": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnButtonPress": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnDriverDistraction": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PerformAudioPassThru": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PerformInteraction": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ResetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ScrollableMessage": {
- "hmi_levels": ["FULL"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SetMediaClockTimer": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "Show": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Slider": {
- "hmi_levels": ["FULL"]
- },
- "Speak": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "SubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnsubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": ["BACKGROUND"]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GetDTCs": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ReadDID": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ShowConstantTBT": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "UpdateTurnList": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.019",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?"
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\n\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\n\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. /r Presione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements. /r Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?"
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push"
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app authorization information for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["Base-4"]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["DataConsent-2"]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["BaseBeforeDataConsent"]
- },
- "1234": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["BaseBeforeDataConsent"],
- "RequestType": [
- "TRAFFIC_MESSAGE_CHANNEL",
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY",
- "NAVIGATION",
- "MEDIA",
- "INVALID_REQUEST_TYPE"
- ]
- }
- }
- }
- }
diff --git a/src/components/policy/policy_regular/test/cache_manager_test.cc b/src/components/policy/policy_regular/test/cache_manager_test.cc
new file mode 100644
index 0000000000..31166b8f43
--- /dev/null
+++ b/src/components/policy/policy_regular/test/cache_manager_test.cc
@@ -0,0 +1,1240 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include <fstream>
+#include <string>
+#include <vector>
+
+#include "gtest/gtest.h"
+
+#include "policy/cache_manager.h"
+#include "policy/policy_table/enums.h"
+#include "policy/policy_types.h"
+
+#include "policy/mock_policy_settings.h"
+
+#include "json/reader.h"
+#include "utils/date_time.h"
+#include "utils/file_system.h"
+#include "utils/gen_hash.h"
+#include "utils/jsoncpp_reader_wrapper.h"
+
+namespace test {
+namespace components {
+namespace policy_test {
+
+using namespace policy;
+namespace policy_table = rpc::policy_table_interface_base;
+
+using ::testing::_;
+using ::testing::NiceMock;
+using ::testing::ReturnRef;
+
+namespace {
+const std::string kDefaultHMILevel = "NONE";
+const std::string kInvalidApp = "invalid_app";
+const std::string kSdlPreloadedPtJson = "json/sdl_preloaded_pt.json";
+const std::string kValidAppId = "1234";
+const std::string kDeviceNumber = "XXX123456789ZZZ";
+const std::string kAppStorageFolder = "app_storage_folder";
+const std::string kConnectionType = "Bluetooth";
+
+} // namespace
+
+void ValidateJsonTable(const std::string& string_table,
+ Json::Value& json_table) {
+ utils::JsonReader reader;
+ ASSERT_TRUE(reader.parse(string_table, &json_table));
+}
+
+policy_table::Table CreateCustomPT(const std::string& string_table) {
+ Json::Value json_table(Json::objectValue);
+ ValidateJsonTable(string_table, json_table);
+ policy_table::Table table(&json_table);
+ return table;
+}
+
+class CacheManagerTest : public ::testing::Test {
+ public:
+ CacheManagerTest() : cache_manager_(nullptr), pt_(nullptr) {}
+
+ protected:
+ std::shared_ptr<CacheManager> cache_manager_;
+ std::shared_ptr<policy_table::Table> pt_;
+ NiceMock<policy_handler_test::MockPolicySettings> policy_settings_;
+
+ void SetUp() {
+ cache_manager_ = std::make_shared<CacheManager>();
+ pt_ = cache_manager_->pt();
+
+ ON_CALL(policy_settings_, app_storage_folder())
+ .WillByDefault(ReturnRef(kAppStorageFolder));
+ }
+};
+
+TEST_F(CacheManagerTest,
+ GetNotificationsNumber_PriorityExists_ReturnNumberFromPT) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"module_config\": {"
+ "\"notifications_per_minute_by_priority\": {"
+ "\"EMERGENCY\": 1,"
+ "\"NAVIGATION\": 2,"
+ "\"VOICECOM\": 3,"
+ "\"COMMUNICATION\": 4,"
+ "\"NORMAL\": 5,"
+ "\"NONE\": 6"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ std::string priority = "EMERGENCY";
+ uint32_t notif_number =
+ cache_manager_->GetNotificationsNumber(priority, false);
+ EXPECT_EQ(1u, notif_number);
+
+ priority = "NAVIGATION";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, false);
+ EXPECT_EQ(2u, notif_number);
+
+ priority = "VOICECOM";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, false);
+ EXPECT_EQ(3u, notif_number);
+
+ priority = "COMMUNICATION";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, false);
+ EXPECT_EQ(4u, notif_number);
+
+ priority = "NORMAL";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, false);
+ EXPECT_EQ(5u, notif_number);
+
+ priority = "NONE";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, false);
+ EXPECT_EQ(6u, notif_number);
+}
+
+TEST_F(CacheManagerTest, GetNotificationsNumber_PriorityNotExist_ReturnZero) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"module_config\": {"
+ "\"notifications_per_minute_by_priority\": {"
+ "\"EMERGENCY\": 1,"
+ "\"NAVIGATION\": 2,"
+ "\"VOICECOM\": 3,"
+ "\"COMMUNICATION\": 4,"
+ "\"NORMAL\": 5,"
+ "\"NONE\": 6"
+ "}"
+ "}"
+ "}"
+ "}");
+
+ *pt_ = CreateCustomPT(string_table);
+
+ std::string priority = "OTHER_PRIORITY";
+ uint32_t notif_number =
+ cache_manager_->GetNotificationsNumber(priority, false);
+ EXPECT_EQ(0u, notif_number);
+}
+
+TEST_F(CacheManagerTest,
+ GetNotificationsNumber_Subtle_PriorityExists_ReturnNumberFromPT) {
+ std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"module_config\": {"
+ "\"subtle_notifications_per_minute_by_priority\": {"
+ "\"EMERGENCY\": 7,"
+ "\"NAVIGATION\": 8,"
+ "\"VOICECOM\": 9,"
+ "\"COMMUNICATION\": 10,"
+ "\"NORMAL\": 11,"
+ "\"NONE\": 12"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ std::string priority = "EMERGENCY";
+ uint32_t notif_number =
+ cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(7u, notif_number);
+
+ priority = "NAVIGATION";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(8u, notif_number);
+
+ priority = "VOICECOM";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(9u, notif_number);
+
+ priority = "COMMUNICATION";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(10u, notif_number);
+
+ priority = "NORMAL";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(11u, notif_number);
+
+ priority = "NONE";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(12u, notif_number);
+}
+
+TEST_F(CacheManagerTest,
+ GetNotificationsNumber_Subtle_PriorityNotExist_ReturnZero) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"module_config\": {"
+ "\"subtle_notifications_per_minute_by_priority\": {"
+ "\"EMERGENCY\": 7,"
+ "\"NAVIGATION\": 8,"
+ "\"VOICECOM\": 9,"
+ "\"COMMUNICATION\": 10,"
+ "\"NORMAL\": 11,"
+ "\"NONE\": 12"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ const std::string priority = "OTHER_PRIORITY";
+ uint32_t notif_number =
+ cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(0u, notif_number);
+}
+
+TEST_F(CacheManagerTest,
+ GetNotificationsNumber_Subtle_FieldNotPresent_UseFallback) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"module_config\": {"
+ "\"notifications_per_minute_by_priority\": {"
+ "\"EMERGENCY\": 1,"
+ "\"NAVIGATION\": 2,"
+ "\"VOICECOM\": 3,"
+ "\"COMMUNICATION\": 4,"
+ "\"NORMAL\": 5,"
+ "\"NONE\": 6"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ std::string priority = "EMERGENCY";
+ uint32_t notif_number =
+ cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(1u, notif_number);
+
+ priority = "NAVIGATION";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(2u, notif_number);
+
+ priority = "VOICECOM";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(3u, notif_number);
+
+ priority = "COMMUNICATION";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(4u, notif_number);
+
+ priority = "NORMAL";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(5u, notif_number);
+
+ priority = "NONE";
+ notif_number = cache_manager_->GetNotificationsNumber(priority, true);
+ EXPECT_EQ(6u, notif_number);
+}
+
+TEST_F(CacheManagerTest, HeartBeatTimeout_ValueInitialized_ReturnValue) {
+ *pt_->policy_table.app_policies_section.apps[kValidAppId]
+ .heart_beat_timeout_ms = 100u;
+ EXPECT_EQ(100u, cache_manager_->HeartBeatTimeout(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, HeartBeatTimeout_ValueNotInitialized_ReturnZero) {
+ pt_->policy_table.app_policies_section.apps[kValidAppId] = {};
+ EXPECT_EQ(0u, cache_manager_->HeartBeatTimeout(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, HeartBeatTimeout_AppNotRepresented_ReturnZero) {
+ EXPECT_EQ(0u, cache_manager_->HeartBeatTimeout(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, GetHMITypes_NoSuchAppNoHmiTypes_ReturnNull) {
+ EXPECT_EQ(nullptr, cache_manager_->GetHMITypes(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, GetHMITypes_ValidApp_ReturnNotNullPtr) {
+ policy_table::AppHMITypes hmi_types;
+ hmi_types.push_back(policy_table::AHT_DEFAULT);
+
+ *pt_->policy_table.app_policies_section.apps[kValidAppId].AppHMIType =
+ hmi_types;
+ EXPECT_NE(nullptr, cache_manager_->GetHMITypes(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, GetAllAppGroups_AppIdIsDevice_AppendGroupId) {
+ FunctionalGroupIDs group_ids;
+
+ cache_manager_->GetAllAppGroups(kDeviceId, group_ids);
+ EXPECT_TRUE(group_ids.empty());
+}
+
+TEST_F(CacheManagerTest, GetAllAppGroups_InvalidAppId_EmptyVectorOfGroupId) {
+ FunctionalGroupIDs group_ids;
+ cache_manager_->GetAllAppGroups(kInvalidApp, group_ids);
+ EXPECT_TRUE(group_ids.empty());
+}
+
+TEST_F(CacheManagerTest, GetAllAppGroups_ValidAppId_AppendGroupID) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"groups\": [\"default\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ FunctionalGroupIDs group_ids;
+
+ cache_manager_->GetAllAppGroups(kValidAppId, group_ids);
+ EXPECT_EQ(1u, group_ids.size());
+}
+
+TEST_F(CacheManagerTest, ApplyUpdate_ValidPT_ReturnTrue) {
+ std::ifstream ifile(kSdlPreloadedPtJson);
+ ASSERT_TRUE(ifile.good());
+
+ Json::CharReaderBuilder reader_builder;
+ Json::Value root(Json::objectValue);
+ Json::parseFromStream(reader_builder, ifile, &root, nullptr);
+ ifile.close();
+ policy_table::Table update(&root);
+
+ EXPECT_TRUE(cache_manager_->ApplyUpdate(update));
+ EXPECT_FALSE(cache_manager_->IsPTPreloaded());
+}
+
+TEST_F(CacheManagerTest, AppHasHMIType_NoSuchType_ReturnFalse) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"AppHMIType\": []"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_FALSE(
+ cache_manager_->AppHasHMIType(kValidAppId, policy_table::AHT_DEFAULT));
+}
+
+TEST_F(CacheManagerTest, AppHasHMIType_TypeExists_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"AppHMIType\": [\"AHT_DEFAULT\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_TRUE(
+ cache_manager_->AppHasHMIType(kValidAppId, policy_table::AHT_DEFAULT));
+}
+
+TEST_F(CacheManagerTest, AppHasHMIType_NoSuchApp_ReturnFalse) {
+ EXPECT_FALSE(
+ cache_manager_->AppHasHMIType(kInvalidApp, policy_table::AHT_DEFAULT));
+}
+
+TEST_F(CacheManagerTest, AddDevice_ReturnTrue) {
+ *pt_->policy_table.module_config.preloaded_pt = true;
+ EXPECT_TRUE(cache_manager_->AddDevice(kDeviceNumber, kConnectionType));
+ EXPECT_FALSE(cache_manager_->IsPTPreloaded());
+}
+
+TEST_F(CacheManagerTest, CheckPermissions_ValidParams_ReturnkRpcAllowed) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"functional_groupings\": {"
+ "\"Base-4\": {"
+ "\"rpcs\": {"
+ "\"AddCommand\": {"
+ "\"hmi_levels\": ["
+ "\"BACKGROUND\","
+ "\"FULL\","
+ "\"LIMITED\""
+ "]"
+ "}"
+ "}"
+ "}"
+ "},"
+ "\"app_policies\": {"
+ "\"default\": {"
+ "\"groups\": ["
+ "\"Base-4\""
+ "]"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ policy_table::Strings groups;
+ groups.push_back("Base-4");
+ const PTString hmi_level("FULL");
+ const PTString rpc("AddCommand");
+ CheckPermissionResult result;
+
+ cache_manager_->CheckPermissions(groups, hmi_level, rpc, result);
+ EXPECT_EQ(kRpcAllowed, result.hmi_level_permitted);
+}
+
+TEST_F(CacheManagerTest, CheckPermissions_ValidParams_ReturnkRpcDisallowed) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"functional_groupings\": {"
+ "\"Base-4\": {"
+ "\"rpcs\": {"
+ "\"AddCommand\": {"
+ "}"
+ "}"
+ "}"
+ "},"
+ "\"app_policies\": {"
+ "\"default\": {"
+ "\"groups\": ["
+ "\"Base-4\""
+ "]"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ policy_table::Strings groups;
+ groups.push_back("Base-4");
+ const PTString hmi_level("FULL");
+ const PTString rpc("AddCommand");
+ CheckPermissionResult result;
+
+ cache_manager_->CheckPermissions(groups, hmi_level, rpc, result);
+ EXPECT_EQ(kRpcDisallowed, result.hmi_level_permitted);
+}
+
+TEST_F(CacheManagerTest,
+ CheckPermissions_NoSuchFunctionalGroup_ReturnkRpcDisallowed) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"functional_groupings\": {"
+ "},"
+ "\"app_policies\": {"
+ "\"default\": {"
+ "\"groups\": ["
+ "\"Base-4\""
+ "]"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ policy_table::Strings groups;
+ groups.push_back("Base-4");
+ const PTString hmi_level("FULL");
+ const PTString rpc("AddCommand");
+ CheckPermissionResult result;
+
+ cache_manager_->CheckPermissions(groups, hmi_level, rpc, result);
+ EXPECT_EQ(kRpcDisallowed, result.hmi_level_permitted);
+}
+
+TEST_F(CacheManagerTest, CheckPermissions_NoSuchRpc_ReturnkRpcDisallowed) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"functional_groupings\": {"
+ "\"Base-4\": {"
+ "\"rpcs\": {"
+ "}"
+ "}"
+ "},"
+ "\"app_policies\": {"
+ "\"default\": {"
+ "\"groups\": ["
+ "\"Base-4\""
+ "]"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ policy_table::Strings groups;
+ groups.push_back("Base-4");
+ const PTString hmi_level("FULL");
+ const PTString rpc("AddCommand");
+ CheckPermissionResult result;
+
+ cache_manager_->CheckPermissions(groups, hmi_level, rpc, result);
+ EXPECT_EQ(kRpcDisallowed, result.hmi_level_permitted);
+}
+
+TEST_F(CacheManagerTest, GetAppRequestTypesState_GetAllStates) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"RequestType\": [\"PROPRIETARY\"]"
+ "},"
+ "\"default\": {"
+ "\"RequestType\": [],"
+ "},"
+ "\"pre_DataConsent\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_EQ(RequestType::State::EMPTY,
+ cache_manager_->GetAppRequestTypesState(kDefaultId));
+ EXPECT_EQ(RequestType::State::UNAVAILABLE,
+ cache_manager_->GetAppRequestTypesState(kInvalidApp));
+ EXPECT_EQ(RequestType::State::OMITTED,
+ cache_manager_->GetAppRequestTypesState(kPreDataConsentId));
+ EXPECT_EQ(RequestType::State::AVAILABLE,
+ cache_manager_->GetAppRequestTypesState(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, GetAppRequestSubTypesState_GetAllStates) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"RequestSubType\": [\"PROPRIETARY\"]"
+ "},"
+ "\"default\": {"
+ "\"RequestSubType\": [],"
+ "},"
+ "\"pre_DataConsent\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_EQ(RequestSubType::State::EMPTY,
+ cache_manager_->GetAppRequestSubTypesState(kDefaultId));
+ EXPECT_EQ(RequestSubType::State::UNAVAILABLE,
+ cache_manager_->GetAppRequestSubTypesState(kInvalidApp));
+ EXPECT_EQ(RequestSubType::State::OMITTED,
+ cache_manager_->GetAppRequestSubTypesState(kPreDataConsentId));
+ EXPECT_EQ(RequestSubType::State::AVAILABLE,
+ cache_manager_->GetAppRequestSubTypesState(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, IgnitionCyclesBeforeExchange_GetValue) {
+ // if result of computation is positive
+ pt_->policy_table.module_config.exchange_after_x_ignition_cycles = 100u;
+ *(pt_->policy_table.module_meta->ignition_cycles_since_last_exchange) = 80u;
+
+ EXPECT_EQ(20, cache_manager_->IgnitionCyclesBeforeExchange());
+
+ // if result of computation is negative
+ pt_->policy_table.module_config.exchange_after_x_ignition_cycles = 80u;
+ *(pt_->policy_table.module_meta->ignition_cycles_since_last_exchange) = 100u;
+
+ EXPECT_EQ(0, cache_manager_->IgnitionCyclesBeforeExchange());
+}
+
+TEST_F(CacheManagerTest, KilometersBeforeExchange_GetValue) {
+ // if result of computation is positive
+ pt_->policy_table.module_config.exchange_after_x_kilometers = 1000u;
+ *(pt_->policy_table.module_meta->pt_exchanged_at_odometer_x) = 500u;
+
+ EXPECT_EQ(600, cache_manager_->KilometersBeforeExchange(900));
+
+ // if result of computation is negative
+ pt_->policy_table.module_config.exchange_after_x_kilometers = 500u;
+ *(pt_->policy_table.module_meta->pt_exchanged_at_odometer_x) = 200u;
+
+ EXPECT_EQ(0, cache_manager_->KilometersBeforeExchange(800));
+}
+
+TEST_F(CacheManagerTest,
+ DaysBeforeExchange_DaysNotInitialized_ReturnNegativeOne) {
+ EXPECT_EQ(-1, cache_manager_->DaysBeforeExchange(20));
+}
+
+TEST_F(CacheManagerTest, DaysBeforeExchange_DaysIsInitialized_ReturnValue) {
+ *(pt_->policy_table.module_meta->pt_exchanged_x_days_after_epoch) = 5;
+ pt_->policy_table.module_config.exchange_after_x_days = 30;
+ EXPECT_EQ(15, cache_manager_->DaysBeforeExchange(20));
+}
+
+TEST_F(CacheManagerTest,
+ SetCountersPassedForSuccessfulUpdate_AllPositiveCases_ReturnTrue) {
+ EXPECT_TRUE(cache_manager_->SetCountersPassedForSuccessfulUpdate(
+ Counters::KILOMETERS, 1000));
+ EXPECT_TRUE(cache_manager_->SetCountersPassedForSuccessfulUpdate(
+ Counters::DAYS_AFTER_EPOCH, 20));
+}
+
+TEST_F(CacheManagerTest, GetPriority_DeviceAppID_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"device\": {"
+ "\"priority\": [\"NONE\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ std::string priority;
+ EXPECT_TRUE(cache_manager_->GetPriority(kDeviceId, priority));
+}
+
+TEST_F(CacheManagerTest, GetPriority_ValidAppID_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"priority\": [\"NONE\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+
+ *pt_ = CreateCustomPT(string_table);
+ std::string priority;
+ EXPECT_TRUE(cache_manager_->GetPriority(kValidAppId, priority));
+}
+
+TEST_F(CacheManagerTest, GetPriority_InvalidAppID_ReturnFalse) {
+ std::string priority;
+
+ EXPECT_FALSE(cache_manager_->GetPriority(kInvalidApp, priority));
+ EXPECT_TRUE(priority.empty());
+}
+
+TEST_F(CacheManagerTest, SetDefaultPolicy_DefaultAppExists_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"default\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_TRUE(cache_manager_->SetDefaultPolicy(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, IsDefaultPolicy_DefaultValidApp_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": \"default\""
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_TRUE(cache_manager_->IsDefaultPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, IsDefaultPolicy_InvalidAppId_ReturnFalse) {
+ EXPECT_FALSE(cache_manager_->IsDefaultPolicy(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, IsDefaultPolicy_NotDefaultValidAppId_ReturnFalse) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"priority\": [\"NONE\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_FALSE(cache_manager_->IsDefaultPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, SetIsDefault_InvalidAppId_DefaultNotAssigned) {
+ EXPECT_TRUE(cache_manager_->SetIsDefault(kInvalidApp));
+ EXPECT_FALSE(cache_manager_->IsDefaultPolicy(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, SetIsDefault_ValidAppId_ReturnTrue) {
+ EXPECT_TRUE(cache_manager_->SetIsDefault(kValidAppId));
+ EXPECT_FALSE(cache_manager_->IsDefaultPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, IsPredataPolicy_InvalidAppId_ReturnFalse) {
+ EXPECT_FALSE(cache_manager_->IsPredataPolicy(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, IsPredataPolicy_NotPredataValidAppId_ReturnFalse) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"priority\": [\"NONE\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ EXPECT_FALSE(cache_manager_->IsPredataPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, SetPredataPolicy_NoPredataSection_ReturnFalse) {
+ pt_->policy_table.app_policies_section.apps.erase(kPreDataConsentId);
+ EXPECT_FALSE(cache_manager_->SetPredataPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, SetPredataPolicy_ValidPredataSection_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"pre_DataConsent\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_TRUE(cache_manager_->SetPredataPolicy(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, SetUnpairedDevice_NoSuchDevice_ReturnFalse) {
+ EXPECT_FALSE(cache_manager_->SetUnpairedDevice(kDeviceNumber, true));
+}
+
+TEST_F(CacheManagerTest, SetUnpairedDevice_UnpairedDevice_ReturnTrue) {
+ cache_manager_->AddDevice(kDeviceNumber, kConnectionType);
+ EXPECT_TRUE(cache_manager_->SetUnpairedDevice(kDeviceNumber, true));
+}
+
+TEST_F(CacheManagerTest, SetUnpairedDevice_NotUnpairedDevice_ReturnTrue) {
+ cache_manager_->AddDevice(kDeviceNumber, kConnectionType);
+ EXPECT_TRUE(cache_manager_->SetUnpairedDevice(kDeviceNumber, false));
+}
+
+TEST_F(CacheManagerTest, GetHMIAppTypeAfterUpdate_NoAppTypes_MapIsEmpty) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"AppHMIType\": [\"AHT_DEFAULT\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ std::map<std::string, StringArray> app_hmi_types;
+
+ cache_manager_->GetHMIAppTypeAfterUpdate(app_hmi_types);
+ EXPECT_TRUE(!app_hmi_types.empty());
+}
+
+TEST_F(CacheManagerTest, IsApplicationRevoked_InvalidAppID_ReturnFalse) {
+ EXPECT_FALSE(cache_manager_->IsApplicationRevoked(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest,
+ IsApplicationRevoked_ValidAppIDNotRevoked_ReturnFalse) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": \"default\""
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_FALSE(cache_manager_->IsApplicationRevoked(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, IsApplicationRevoked_ValidAppIDIsRevoked_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": \"default\""
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ pt_->policy_table.app_policies_section.apps[kValidAppId].set_to_null();
+
+ EXPECT_TRUE(cache_manager_->IsApplicationRevoked(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, GetAppRequestTypes_DeviceAppID_NoTypes) {
+ std::vector<std::string> request_types;
+ cache_manager_->GetAppRequestTypes(kDeviceId, request_types);
+
+ EXPECT_TRUE(request_types.empty());
+}
+
+TEST_F(CacheManagerTest, GetAppRequestTypes_InvalidAppID_NoTypes) {
+ std::vector<std::string> request_types;
+ cache_manager_->GetAppRequestTypes(kInvalidApp, request_types);
+
+ EXPECT_TRUE(request_types.empty());
+}
+
+TEST_F(CacheManagerTest, GetAppRequestTypes_ValidAppID_AddTypesIfPresent) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"RequestType\": [\"OnSystemRequest\", \"AddCommandRequest\"]"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ std::vector<std::string> request_types;
+
+ cache_manager_->GetAppRequestTypes(kValidAppId, request_types);
+ EXPECT_EQ(2u, request_types.size());
+}
+
+TEST_F(CacheManagerTest, GetInitialAppData_ValidAppID_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"AppHMIType\": [\"AHT_DEFAULT\"],"
+ "\"nicknames\": [\"Test app\"],"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ StringArray nicknames;
+ StringArray app_hmi_types;
+
+ EXPECT_TRUE(
+ cache_manager_->GetInitialAppData(kValidAppId, nicknames, app_hmi_types));
+ EXPECT_FALSE(nicknames.empty());
+ EXPECT_FALSE(app_hmi_types.empty());
+}
+
+TEST_F(CacheManagerTest, GetInitialAppData_InvalidAppId_ReturnTrue) {
+ StringArray nicknames;
+ StringArray app_hmi_types;
+
+ EXPECT_TRUE(
+ cache_manager_->GetInitialAppData(kInvalidApp, nicknames, app_hmi_types));
+ EXPECT_TRUE(nicknames.empty());
+ EXPECT_TRUE(app_hmi_types.empty());
+}
+
+TEST_F(CacheManagerTest, GetAppRequestSubTypes_DeviceAppID_NoTypes) {
+ std::vector<std::string> request_types;
+
+ cache_manager_->GetAppRequestSubTypes(kDeviceId, request_types);
+ EXPECT_TRUE(request_types.empty());
+}
+
+TEST_F(CacheManagerTest, GetAppRequestSubTypes_InvalidAppID_NoTypes) {
+ std::vector<std::string> request_types;
+
+ cache_manager_->GetAppRequestSubTypes(kInvalidApp, request_types);
+ EXPECT_TRUE(request_types.empty());
+}
+
+TEST_F(CacheManagerTest, GetAppRequestSubTypes_ValidAppID_AddSubtype) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "\"RequestSubType\": [\"Some_subtype\"]"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ std::vector<std::string> request_subtypes;
+
+ cache_manager_->GetAppRequestSubTypes(kValidAppId, request_subtypes);
+ EXPECT_FALSE(request_subtypes.empty());
+}
+
+TEST_F(CacheManagerTest, Init_TableAlreadyExistsNotMerged_ReturnFalse) {
+ file_system::CreateDirectory(kAppStorageFolder);
+ EXPECT_TRUE(cache_manager_->Init(kSdlPreloadedPtJson, &policy_settings_));
+ const std::string invalid_filename = "invalid_filename.json";
+ EXPECT_FALSE(cache_manager_->Init(invalid_filename, &policy_settings_));
+ file_system::RemoveDirectory(kAppStorageFolder, true);
+}
+
+TEST_F(CacheManagerTest, Init_TableAlreadyExistsAndIsMerged_ReturnTrue) {
+ file_system::CreateDirectory(kAppStorageFolder);
+ const std::string earlier_version_of_preloaded_pt =
+ "json/sdl_preloaded_pt_for_merge_initial.json";
+ const std::string latest_version_of_preloaded_pt =
+ "json/sdl_preloaded_pt_for_merge_latest.json";
+
+ EXPECT_TRUE(
+ cache_manager_->Init(earlier_version_of_preloaded_pt, &policy_settings_));
+ EXPECT_TRUE(
+ cache_manager_->Init(latest_version_of_preloaded_pt, &policy_settings_));
+ file_system::RemoveDirectory(kAppStorageFolder, true);
+}
+
+TEST_F(CacheManagerTest, GetCertificate_NoCertificateReturnEmptyString) {
+ std::string certificate = cache_manager_->GetCertificate();
+ EXPECT_TRUE(certificate.empty());
+}
+
+TEST_F(CacheManagerTest, GetCertificate_CertificateExists_ReturnCertificate) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"module_config\": {"
+ "\"certificate\": \"some_certificate\""
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ std::string certificate = cache_manager_->GetCertificate();
+ EXPECT_FALSE(certificate.empty());
+}
+
+TEST_F(CacheManagerTest,
+ GetVehicleDataItems_VehicleDataIsInitialized_GotDataItems) {
+ file_system::CreateDirectory(kAppStorageFolder);
+ cache_manager_->Init(kSdlPreloadedPtJson, &policy_settings_);
+ auto items = cache_manager_->GetVehicleDataItems();
+ EXPECT_FALSE(items.empty());
+ file_system::RemoveDirectory(kAppStorageFolder, true);
+}
+
+TEST_F(CacheManagerTest,
+ GetVehicleDataItems_VehicleDataNotInitialized_ReturnEmptyVector) {
+ const auto items = cache_manager_->GetVehicleDataItems();
+ EXPECT_TRUE(items.empty());
+}
+
+TEST_F(CacheManagerTest, LockScreenDismissalWarningMessage_ReturnValidMessage) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"consumer_friendly_messages\": {"
+ "\"messages\": {"
+ "\"LockScreenDismissalWarning\": {"
+ "\"languages\": {"
+ "\"en-us\": {"
+ "\"textBody\": \"Swipe down to dismiss, acknowledging that you are not "
+ "the driver\""
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ std::string expected_msg(
+ "Swipe down to dismiss, acknowledging that you are not the driver");
+ EXPECT_EQ(expected_msg,
+ *cache_manager_->LockScreenDismissalWarningMessage("en-us"));
+}
+
+TEST_F(CacheManagerTest,
+ LockScreenDismissalEnabledState_EnabledInPT_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"module_config\": {"
+ "\"lock_screen_dismissal_enabled\": true"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ EXPECT_TRUE(*cache_manager_->LockScreenDismissalEnabledState());
+}
+
+TEST_F(CacheManagerTest,
+ UnknownRPCPassthroughAllowed_InvalidAppID_ReturnFalse) {
+ EXPECT_FALSE(cache_manager_->UnknownRPCPassthroughAllowed(kInvalidApp));
+}
+
+TEST_F(CacheManagerTest, UnknownRPCPassthroughAllowed_ValidAppID_ReturnTrue) {
+ pt_->policy_table.app_policies_section.apps[kValidAppId]
+ .allow_unknown_rpc_passthrough = rpc::Optional<rpc::Boolean>(true);
+ EXPECT_TRUE(cache_manager_->UnknownRPCPassthroughAllowed(kValidAppId));
+}
+
+TEST_F(CacheManagerTest, GetAppProperties_InvalidAppID_ReturnFalse) {
+ AppProperties out_app_properties;
+ EXPECT_FALSE(
+ cache_manager_->GetAppProperties(kInvalidApp, out_app_properties));
+}
+
+TEST_F(CacheManagerTest, GetAppProperties_ValidAppID_ReturnTrue) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ AppProperties out_app_properties;
+ cache_manager_->SetAppEndpoint(kValidAppId, "endpoint");
+ cache_manager_->SetAppAuthToken(kValidAppId, "auth_token");
+ cache_manager_->SetAppCloudTransportType(kValidAppId, "transport_type");
+ cache_manager_->SetHybridAppPreference(kValidAppId, "CLOUD");
+ cache_manager_->SetCloudAppEnabled(kValidAppId, true);
+
+ EXPECT_TRUE(
+ cache_manager_->GetAppProperties(kValidAppId, out_app_properties));
+}
+
+TEST_F(CacheManagerTest, Add_MinutesAreAdded) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+ int result, seconds;
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .minutes_in_hmi_full = 0;
+ seconds = 60;
+ cache_manager_->Add(kValidAppId, usage_statistics::SECONDS_HMI_FULL, seconds);
+ result = static_cast<int>(
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .minutes_in_hmi_full);
+ EXPECT_EQ(1, result);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .minutes_in_hmi_limited = 0;
+ seconds = 120;
+ cache_manager_->Add(
+ kValidAppId, usage_statistics::SECONDS_HMI_LIMITED, seconds);
+ result = static_cast<int>(
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .minutes_in_hmi_limited);
+ EXPECT_EQ(2, result);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .minutes_in_hmi_background = 0;
+ seconds = 180;
+ cache_manager_->Add(
+ kValidAppId, usage_statistics::SECONDS_HMI_BACKGROUND, seconds);
+ result = static_cast<int>(
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .minutes_in_hmi_background);
+ EXPECT_EQ(3, result);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .minutes_in_hmi_none = 0;
+ seconds = 240;
+ cache_manager_->Add(kValidAppId, usage_statistics::SECONDS_HMI_NONE, seconds);
+ result = static_cast<int>(
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .minutes_in_hmi_none);
+ EXPECT_EQ(4, result);
+}
+
+TEST_F(CacheManagerTest, Set_ValuesAreSetted) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ cache_manager_->Set(kValidAppId, usage_statistics::LANGUAGE_GUI, "eng-eng");
+ EXPECT_EQ(
+ "eng-eng",
+ std::string(
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .app_registration_language_gui));
+
+ cache_manager_->Set(kValidAppId, usage_statistics::LANGUAGE_VUI, "ru-ru");
+ EXPECT_EQ(
+ "ru-ru",
+ std::string(
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .app_registration_language_vui));
+}
+
+TEST_F(CacheManagerTest, Increment_AppCounterIsIncremented) {
+ const std::string string_table(
+ "{"
+ "\"policy_table\": {"
+ "\"app_policies\": {"
+ "\"1234\": {"
+ "}"
+ "}"
+ "}"
+ "}");
+ *pt_ = CreateCustomPT(string_table);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_user_selections = 0;
+ cache_manager_->Increment(kValidAppId, usage_statistics::USER_SELECTIONS);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_user_selections);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rejections_sync_out_of_memory = 0;
+ cache_manager_->Increment(kValidAppId,
+ usage_statistics::REJECTIONS_SYNC_OUT_OF_MEMORY);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rejections_sync_out_of_memory);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rejections_nickname_mismatch = 0;
+ cache_manager_->Increment(kValidAppId,
+ usage_statistics::REJECTIONS_NICKNAME_MISMATCH);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rejections_nickname_mismatch);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rejections_duplicate_name = 0;
+ cache_manager_->Increment(kValidAppId,
+ usage_statistics::REJECTIONS_DUPLICATE_NAME);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rejections_duplicate_name);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rejected_rpc_calls = 0;
+ cache_manager_->Increment(kValidAppId, usage_statistics::REJECTED_RPC_CALLS);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rejected_rpc_calls);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rpcs_sent_in_hmi_none = 0;
+ cache_manager_->Increment(kValidAppId, usage_statistics::RPCS_IN_HMI_NONE);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_rpcs_sent_in_hmi_none);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_removals_for_bad_behavior = 0;
+ cache_manager_->Increment(kValidAppId, usage_statistics::REMOVALS_MISBEHAVED);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_removals_for_bad_behavior);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_run_attempts_while_revoked = 0;
+ cache_manager_->Increment(kValidAppId,
+ usage_statistics::RUN_ATTEMPTS_WHILE_REVOKED);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_run_attempts_while_revoked);
+
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_tls_errors = 0;
+ cache_manager_->Increment(kValidAppId, usage_statistics::COUNT_OF_TLS_ERRORS);
+ EXPECT_EQ(1,
+ (*pt_->policy_table.usage_and_error_counts->app_level)[kValidAppId]
+ .count_of_tls_errors);
+}
+
+TEST_F(CacheManagerTest, IsApplicationRepresented_DeviceApp_ReturnTrue) {
+ EXPECT_TRUE(cache_manager_->IsApplicationRepresented(kDeviceId));
+}
+
+} // namespace policy_test
+} // namespace components
+} // namespace test
diff --git a/src/components/policy/policy_regular/test/counter_test.cc b/src/components/policy/policy_regular/test/counter_test.cc
deleted file mode 100644
index c09347fd9c..0000000000
--- a/src/components/policy/policy_regular/test/counter_test.cc
+++ /dev/null
@@ -1,194 +0,0 @@
-/* Copyright (c) 2016, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "gmock/gmock.h"
-
-#include "policy/usage_statistics/counter.h"
-#include "policy/usage_statistics/mock_statistics_manager.h"
-
-using ::testing::InSequence;
-using ::testing::StrictMock;
-
-namespace test {
-namespace components {
-namespace usage_statistics_test {
-
-using namespace usage_statistics;
-
-// TEST(A, B_C_D) { ... }
-// A - What you test
-// B - What you do
-// C - Input data
-// D - Expected result
-
-TEST(
- StatisticsManagerIncrementMethod1Arg,
- GlobalCounterOverloadedIncrement_CallONCE_StatisticsManagerIncrementCalledONCE) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- GlobalCounter reboots_counter(msm, SYNC_REBOOTS);
-
- // Assert
- EXPECT_CALL(*msm, Increment(SYNC_REBOOTS));
-
- // Act
- ++reboots_counter;
-}
-
-TEST(
- StatisticsManagerIncrementMethod1Arg,
- GlobalCounterOverloadedIncrement_CallTWICE_StatisticsManagerIncrementCalledTWICE) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- GlobalCounter reboots_counter(msm, SYNC_REBOOTS);
-
- // Assert
- EXPECT_CALL(*msm, Increment(SYNC_REBOOTS)).Times(2);
-
- // Act
- ++reboots_counter;
- ++reboots_counter;
-}
-
-TEST(
- StatisticsManagerIncrementMethod2Args,
- AppCounterOverloadedIncrement_CallONCE_StatisticsManagerIncrementCalledONCE) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- AppCounter user_selections_counter(msm, "HelloApp", USER_SELECTIONS);
-
- // Assert
- EXPECT_CALL(*msm, Increment("HelloApp", USER_SELECTIONS));
-
- // Act
- ++user_selections_counter;
-}
-
-TEST(
- StatisticsManagerIncrementMethod2Args,
- AppCounterOverloadedIncrement_CallTWICE_StatisticsManagerIncrementCalledTWICE) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- AppCounter user_selections_counter(msm, "HelloApp", USER_SELECTIONS);
-
- // Assert
- EXPECT_CALL(*msm, Increment("HelloApp", USER_SELECTIONS)).Times(2);
-
- // Act
- ++user_selections_counter;
- ++user_selections_counter;
-}
-//---
-TEST(StatisticsManagerSetMethod,
- AppInfoUpdateMethod_CallONCE_StatisticsManagerSetMethodCalledONCE) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- AppInfo gui_language_info(msm, "HelloApp", LANGUAGE_GUI);
-
- // Assert
- EXPECT_CALL(*msm, Set("HelloApp", LANGUAGE_GUI, "Klingon"));
-
- // Act
- gui_language_info.Update("Klingon");
-}
-
-TEST(StatisticsManagerSetMethod,
- AppInfoUpdateMethod_CallTWICE_StatisticsManagerSetMethodCalledTWICE) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- AppInfo gui_language_info(msm, "HelloApp", LANGUAGE_GUI);
-
- // Assert
- EXPECT_CALL(*msm, Set("HelloApp", LANGUAGE_GUI, "Klingon"));
- EXPECT_CALL(*msm, Set("HelloApp", LANGUAGE_GUI, "UA"));
-
- // Act
- gui_language_info.Update("Klingon");
- gui_language_info.Update("UA");
-}
-
-TEST(StatisticsManagerAddMethod,
- AppStopwatchStartMethod_CallONCE_StatisticsManagerAddMethodCalledONCE) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- const std::uint32_t time_out = 1;
- AppStopwatchImpl hmi_full_stopwatch(msm, "HelloApp", time_out);
-
- hmi_full_stopwatch.Start(SECONDS_HMI_FULL);
- // Assert
- EXPECT_CALL(*msm, Add("HelloApp", SECONDS_HMI_FULL, time_out));
-
- // Act
- hmi_full_stopwatch.WriteTime();
-}
-
-// Tests disabled due to uncorrect behavior of timer.
-// Will be undisabled after fix.
-TEST(StatisticsManagerAddMethod,
- DISABLED_AppStopwatchSwitchMethod_Call_StatisticsManagerAddMethodCalled) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- AppStopwatchImpl hmi_full_stopwatch(msm, "HelloApp");
- hmi_full_stopwatch.Start(SECONDS_HMI_FULL);
-
- hmi_full_stopwatch.Switch(SECONDS_HMI_FULL);
- // Assert
- EXPECT_CALL(*msm, Add("HelloApp", SECONDS_HMI_FULL, 60));
-
- // Act
- hmi_full_stopwatch.WriteTime();
-}
-
-TEST(
- StatisticsManagerAddMethod,
- DISABLED_AppStopwatchSwitchMethod_CallAnd1SecSleepAfter_StatisticsManagerAddMethodCalledWith1SecTimespan) {
- // Arrange
- auto msm = std::make_shared<StrictMock<MockStatisticsManager> >();
- const std::uint32_t time_out = 1;
- AppStopwatchImpl hmi_full_stopwatch(msm, "HelloApp", time_out);
-
- // Act
- hmi_full_stopwatch.Start(SECONDS_HMI_NONE);
- // Assert
- EXPECT_CALL(*msm, Add("HelloApp", SECONDS_HMI_NONE, time_out));
- // Act
- hmi_full_stopwatch.WriteTime();
-
- hmi_full_stopwatch.Switch(SECONDS_HMI_BACKGROUND);
- // Assert
- EXPECT_CALL(*msm, Add("HelloApp", SECONDS_HMI_BACKGROUND, time_out));
- // Act
- hmi_full_stopwatch.WriteTime();
-}
-
-} // namespace usage_statistics_test
-} // namespace components
-} // namespace test
diff --git a/src/components/policy/policy_regular/test/generated_code_test.cc b/src/components/policy/policy_regular/test/generated_code_test.cc
deleted file mode 100644
index 2b79ef67fe..0000000000
--- a/src/components/policy/policy_regular/test/generated_code_test.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <fstream>
-
-#include "gtest/gtest.h"
-
-#include "json/reader.h"
-#include "json/value.h"
-#include "policy/policy_table/enums.h"
-#include "policy/policy_table/types.h"
-#include "rpc_base/gtest_support.h"
-
-using rpc::policy_table_interface_base::Table;
-
-namespace test {
-namespace components {
-namespace policy_test {
-
-TEST(PolicyGeneratedCodeTest, TestValidPTPreloadJsonIsValid) {
- std::ifstream json_file("sdl_preloaded_pt.json");
- ASSERT_TRUE(json_file.is_open());
- Json::Value valid_table;
- Json::CharReaderBuilder reader_builder;
- ASSERT_TRUE(
- Json::parseFromStream(reader_builder, json_file, &valid_table, nullptr));
- Table table(&valid_table);
- table.SetPolicyTableType(rpc::policy_table_interface_base::PT_PRELOADED);
- ASSERT_RPCTYPE_VALID(table);
-}
-
-TEST(PolicyGeneratedCodeTest, TestValidPTUpdateJsonIsValid) {
- std::ifstream json_file("valid_sdl_pt_update.json");
- ASSERT_TRUE(json_file.is_open());
- Json::Value valid_table;
- Json::CharReaderBuilder reader_builder;
- ASSERT_TRUE(
- Json::parseFromStream(reader_builder, json_file, &valid_table, nullptr));
- Table table(&valid_table);
- table.SetPolicyTableType(rpc::policy_table_interface_base::PT_UPDATE);
- ASSERT_RPCTYPE_VALID(table);
-}
-
-} // namespace policy_test
-} // namespace components
-} // namespace test
diff --git a/src/components/policy/policy_regular/test/include/policy/mock_pt_representation.h b/src/components/policy/policy_regular/test/include/policy/mock_pt_representation.h
index 8cf3884c11..80aab3fde5 100644
--- a/src/components/policy/policy_regular/test/include/policy/mock_pt_representation.h
+++ b/src/components/policy/policy_regular/test/include/policy/mock_pt_representation.h
@@ -70,7 +70,8 @@ class MockPTRepresentation : virtual public PTRepresentation {
std::vector<UserFriendlyMessage>(const std::vector<std::string>& msg_code,
const std::string& language));
MOCK_METHOD2(GetUpdateUrls, void(int service_type, EndpointUrls&));
- MOCK_METHOD1(GetNotificationsNumber, int(const std::string& priority));
+ MOCK_METHOD2(GetNotificationsNumber,
+ int(const std::string& priority, const bool is_subtle));
MOCK_METHOD0(Init, InitResult());
MOCK_METHOD0(Close, bool());
MOCK_METHOD0(Clear, bool());
diff --git a/src/components/policy/policy_external/test/json/sdl_preloaded_pt1.json b/src/components/policy/policy_regular/test/json/sdl_preloaded_pt_for_merge_initial.json
index 909fd2cb2f..d17a4b82e4 100644
--- a/src/components/policy/policy_external/test/json/sdl_preloaded_pt1.json
+++ b/src/components/policy/policy_regular/test/json/sdl_preloaded_pt_for_merge_initial.json
@@ -2056,7 +2056,8 @@
"myKey",
"prndl",
"rpm",
- "steeringWheelAngle"
+ "steeringWheelAngle",
+ "handsOffSteering"
]
},
"OnVehicleData" :
@@ -2071,7 +2072,8 @@
"myKey",
"prndl",
"rpm",
- "steeringWheelAngle"
+ "steeringWheelAngle",
+ "handsOffSteering"
]
},
"SubscribeVehicleData" :
@@ -2086,7 +2088,8 @@
"myKey",
"prndl",
"rpm",
- "steeringWheelAngle"
+ "steeringWheelAngle",
+ "handsOffSteering"
]
},
"UnsubscribeVehicleData" :
@@ -2101,7 +2104,8 @@
"myKey",
"prndl",
"rpm",
- "steeringWheelAngle"
+ "steeringWheelAngle",
+ "handsOffSteering"
]
}
},
@@ -2420,10 +2424,21 @@
"COMMUNICATION" : 6,
"EMERGENCY" : 60,
"NAVIGATION" : 15,
+ "PROJECTION" : 15,
"NONE" : 0,
"NORMAL" : 4,
"VOICECOM" : 20
},
+ "subtle_notifications_per_minute_by_priority":
+ {
+ "COMMUNICATION": 15,
+ "EMERGENCY": 60,
+ "NAVIGATION": 20,
+ "PROJECTION": 20,
+ "NONE": 0,
+ "NORMAL": 10,
+ "VOICECOM": 30
+ },
"preloaded_date" : "2012-12-15",
"preloaded_pt" : true,
"seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
diff --git a/src/components/policy/policy_regular/test/json/sdl_preloaded_pt_for_merge_latest.json b/src/components/policy/policy_regular/test/json/sdl_preloaded_pt_for_merge_latest.json
new file mode 100644
index 0000000000..81c2093c72
--- /dev/null
+++ b/src/components/policy/policy_regular/test/json/sdl_preloaded_pt_for_merge_latest.json
@@ -0,0 +1,2448 @@
+
+{
+ "policy_table" :
+ {
+ "app_policies" :
+ {
+ "default" :
+ {
+ "default_hmi" : "NONE",
+ "groups" : [ "Base-4" ],
+ "keep_context" : false,
+ "priority" : "NONE",
+ "steal_focus" : false
+ },
+ "device" :
+ {
+ "default_hmi" : "NONE",
+ "groups" : [ "DataConsent-2" ],
+ "keep_context" : false,
+ "priority" : "NONE",
+ "steal_focus" : false
+ },
+ "pre_DataConsent" :
+ {
+ "default_hmi" : "BACKGROUND",
+ "groups" : [ "BaseBeforeDataConsent" ],
+ "keep_context" : false,
+ "priority" : "EMERGENCY",
+ "steal_focus" : false
+ }
+ },
+ "consumer_friendly_messages" :
+ {
+ "messages" :
+ {
+ "AppPermissions" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Zugriffsanfrage(n)",
+ "line2" : "erlauben?",
+ "tts" : "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
+ },
+ "en-au" :
+ {
+ "line1" : "Grant requested",
+ "line2" : "permission(s)?",
+ "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
+ },
+ "en-gb" :
+ {
+ "line1" : "Grant requested",
+ "line2" : "permission(s)?",
+ "textBody" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu.",
+ "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny."
+ },
+ "en-ie" :
+ {
+ "line1" : "Grant requested",
+ "line2" : "permission(s)?",
+ "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
+ },
+ "en-us" :
+ {
+ "line1" : "Grant Requested",
+ "line2" : "Permission(s)?",
+ "textBody" : "The %appName% App is requesting permission to use the following: %functionalGroupLabels%.\r\n\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. I agree and consent.",
+ "tts" : "%appName% is requesting permission to use the following: %functionalGroupLabels%.\r\nTo disable or change these settings at any time visit the SYNC mobile apps settings menu. See App terms of service and privacy policies. Ford is not responsible for App functionality. Avoid distractions and use voice controls where available. Please press yes to allow or no to deny."
+ },
+ "es-en" :
+ {
+ "line1" : "¿Otorgar permiso(s)",
+ "line2" : "solicitado(s)?",
+ "textBody" : "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior.",
+ "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
+ },
+ "es-es" :
+ {
+ "line1" : "¿Conceder permisos",
+ "line2" : "solicitados?",
+ "tts" : "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar."
+ },
+ "es-mx" :
+ {
+ "line1" : "¿Otorgar permiso(s)",
+ "line2" : "solicitado(s)?",
+ "textBody" : "La App %appName% solicita permiso para usar: %functionalGroupLabels%. \r\n\r\nPara desactivar o cambiar la configuración, acceda al menú de SYNC® de configuración de apps. Consulte términos de servicio y políticas de privacidad de la App. Ford no es responsable de la funcionalidad de la App. Evite distracciones y use los controles de voz cuando estén disponibles. Estoy de acuerdo y acepto lo anterior.",
+ "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Accorder permission(s)",
+ "line2" : "demandée(s)",
+ "textBody" : "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\n\r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. J’accepte et je consens.",
+ "tts" : "L’application %appName% demande la permission d’utiliser : %functionalGroupLabels%. \r\nPour désactiver ou modifier ces réglages de données à tout moment, consultez le menu de réglages des applications mobiles SYNC. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application. Ford n’est pas responsable de la fonctionnalité de l’application. Évitez les distractions et utilisez les commandes vocales lorsqu’elles sont disponibles. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
+ },
+ "fr-fr" :
+ {
+ "line1" : "Accorder permission(s)",
+ "line2" : "demandée(s)",
+ "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
+ },
+ "it-it" :
+ {
+ "line1" : "Concedi autorizzaz.",
+ "line2" : "richiesta(e)?",
+ "tts" : "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare."
+ },
+ "nl-nl" :
+ {
+ "line1" : "Aangevraagde",
+ "line2" : "permissie(s) verlenen?",
+ "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren."
+ },
+ "pl-pl" :
+ {
+ "line1" : "Udzielić żądanych",
+ "line2" : "pozwoleń?",
+ "tts" : "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania."
+ },
+ "pt-br" :
+ {
+ "line1" : "Conceder permissão",
+ "line2" : "solicitada?",
+ "tts" : "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Conceder permiss.",
+ "line2" : "solicitada(s)?",
+ "tts" : "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Предост. заправш.",
+ "line2" : "разрешения?",
+ "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны."
+ },
+ "sv-se" :
+ {
+ "line1" : "Vill du ge",
+ "line2" : "tillstånd?",
+ "tts" : "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka."
+ },
+ "tr-tr" :
+ {
+ "line1" : "İstenen izinler",
+ "line2" : "verilsin mi?",
+ "tts" : "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın."
+ },
+ "zh-cn" :
+ {
+ "line1" : "是否允许请求的",
+ "line2" : "权限?",
+ "tts" : "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。"
+ },
+ "zh-tw" :
+ {
+ "line1" : "允許",
+ "line2" : "授權請求?",
+ "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。"
+ }
+ }
+ },
+ "AppPermissionsHelp" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "tts" : "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
+ },
+ "en-au" :
+ {
+ "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
+ },
+ "en-gb" :
+ {
+ "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
+ },
+ "en-ie" :
+ {
+ "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
+ },
+ "en-us" :
+ {
+ "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
+ },
+ "es-en" :
+ {
+ "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
+ },
+ "es-es" :
+ {
+ "tts" : "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
+ },
+ "es-mx" :
+ {
+ "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
+ },
+ "fr-ca" :
+ {
+ "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
+ },
+ "fr-fr" :
+ {
+ "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
+ },
+ "it-it" :
+ {
+ "tts" : "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
+ },
+ "nl-nl" :
+ {
+ "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
+ },
+ "pl-pl" :
+ {
+ "tts" : "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
+ },
+ "pt-br" :
+ {
+ "tts" : "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
+ },
+ "pt-pt" :
+ {
+ "tts" : "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
+ },
+ "ru-ru" :
+ {
+ "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
+ },
+ "sv-se" :
+ {
+ "tts" : "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
+ },
+ "tr-tr" :
+ {
+ "tts" : "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
+ },
+ "zh-cn" :
+ {
+ "tts" : "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
+ },
+ "zh-tw" :
+ {
+ "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
+ }
+ }
+ },
+ "AppPermissionsRevoked" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "tts" : "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
+ },
+ "en-au" :
+ {
+ "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
+ },
+ "en-gb" :
+ {
+ "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
+ },
+ "en-ie" :
+ {
+ "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
+ },
+ "en-us" :
+ {
+ "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
+ },
+ "es-en" :
+ {
+ "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
+ },
+ "es-es" :
+ {
+ "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
+ },
+ "es-mx" :
+ {
+ "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
+ },
+ "fr-ca" :
+ {
+ "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
+ },
+ "fr-fr" :
+ {
+ "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
+ },
+ "it-it" :
+ {
+ "tts" : "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
+ },
+ "nl-nl" :
+ {
+ "tts" : "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
+ },
+ "pl-pl" :
+ {
+ "tts" : "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
+ },
+ "pt-br" :
+ {
+ "tts" : "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
+ },
+ "pt-pt" :
+ {
+ "tts" : "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
+ },
+ "ru-ru" :
+ {
+ "tts" : "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
+ },
+ "sv-se" :
+ {
+ "tts" : "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
+ },
+ "tr-tr" :
+ {
+ "tts" : "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
+ },
+ "zh-cn" :
+ {
+ "tts" : "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
+ },
+ "zh-tw" :
+ {
+ "tts" : "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
+ }
+ }
+ },
+ "AppUnauthorized" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "nicht autorisiert",
+ "tts" : "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren."
+ },
+ "en-au" :
+ {
+ "line1" : "not authorized",
+ "tts" : "This version of %appName% is not authorized and will not work with SYNC."
+ },
+ "en-gb" :
+ {
+ "line1" : "not authorized",
+ "textBody" : "This version of %appName% is not authorized and will not work with SYNC.",
+ "tts" : "This version of %appName% is not authorized and will not work with SYNC."
+ },
+ "en-ie" :
+ {
+ "line1" : "not authorized",
+ "tts" : "This version of %appName% is not authorized and will not work with SYNC."
+ },
+ "en-us" :
+ {
+ "line1" : "Not Authorized",
+ "textBody" : "This version of %appName% is no longer authorized to work with Mobile Apps. Please update to the latest version of %appName%.",
+ "tts" : "This version of %appName% is not authorized and will not work with SYNC."
+ },
+ "es-en" :
+ {
+ "line1" : "no autorizada",
+ "textBody" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
+ "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
+ },
+ "es-es" :
+ {
+ "line1" : "No autorizada",
+ "tts" : "Esta versión de %appName% no está autorizada y no funcionará con SYNC."
+ },
+ "es-mx" :
+ {
+ "line1" : "no autorizada",
+ "textBody" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
+ "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
+ },
+ "fr-ca" :
+ {
+ "line1" : "non autorisée",
+ "textBody" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
+ "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
+ },
+ "fr-fr" :
+ {
+ "line1" : "non autorisée",
+ "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
+ },
+ "it-it" :
+ {
+ "line1" : "non autorizzata",
+ "tts" : "Questa versione di %appName% non è autorizzata e non funziona con il SYNC."
+ },
+ "nl-nl" :
+ {
+ "line1" : "niet geautoriseerd",
+ "tts" : "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC."
+ },
+ "pl-pl" :
+ {
+ "line1" : "brak autoryzacji",
+ "tts" : "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC."
+ },
+ "pt-br" :
+ {
+ "line1" : "não autorizado",
+ "tts" : "Esta versão do %appName% não tem autorização e não funcionará com o SYNC."
+ },
+ "pt-pt" :
+ {
+ "line1" : "não autorizada",
+ "tts" : "Esta versão de %appName% não está autorizada e não funcionará com o SYNC."
+ },
+ "ru-ru" :
+ {
+ "line1" : "не авторизировано",
+ "tts" : "Эта версия %appName% не авторизирована и не будет работать с SYNC."
+ },
+ "sv-se" :
+ {
+ "line1" : "är ej godkänd",
+ "tts" : "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC."
+ },
+ "tr-tr" :
+ {
+ "line1" : "için izin yok",
+ "tts" : "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz."
+ },
+ "zh-cn" :
+ {
+ "line1" : "未得到授权",
+ "tts" : "此版本的%appName% 未得到授权,无法在SYNC上使用。"
+ },
+ "zh-tw" :
+ {
+ "line1" : "無授權",
+ "tts" : "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。"
+ }
+ }
+ },
+ "AppUnsupported" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "nicht unterstützt",
+ "tts" : "Diese Version von %appName% wird von SYNC nicht unterstützt."
+ },
+ "en-au" :
+ {
+ "line1" : "not supported",
+ "tts" : "This version of %appName% is not supported by SYNC."
+ },
+ "en-gb" :
+ {
+ "line1" : "not supported",
+ "textBody" : "This version of %appName% is not supported by SYNC.",
+ "tts" : "This version of %appName% is not supported by SYNC."
+ },
+ "en-ie" :
+ {
+ "line1" : "not supported",
+ "tts" : "This version of %appName% is not supported by SYNC."
+ },
+ "en-us" :
+ {
+ "line1" : "Not Supported",
+ "textBody" : "Your version of %appName% is not supported by SYNC.",
+ "tts" : "This version of %appName% is not supported by SYNC."
+ },
+ "es-en" :
+ {
+ "line1" : "no compatible",
+ "textBody" : "Esta versión de %appName% no es compatible con SYNC.",
+ "tts" : "Esta versión de %appName% no es compatible con SYNC."
+ },
+ "es-es" :
+ {
+ "line1" : "No compatible",
+ "tts" : "Esta versión de %appName% no es compatible con SYNC."
+ },
+ "es-mx" :
+ {
+ "line1" : "no compatible",
+ "textBody" : "Esta versión de %appName% no es compatible con SYNC.",
+ "tts" : "Esta versión de %appName% no es compatible con SYNC."
+ },
+ "fr-ca" :
+ {
+ "line1" : "incompatible",
+ "textBody" : "Cette version de %appName% n’est pas prise en charge par SYNC.",
+ "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
+ },
+ "fr-fr" :
+ {
+ "line1" : "incompatible",
+ "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
+ },
+ "it-it" :
+ {
+ "line1" : "non supportata",
+ "tts" : "Questa versione di %appName% non è supportata dal SYNC."
+ },
+ "nl-nl" :
+ {
+ "line1" : "niet ondersteund",
+ "tts" : "Deze versie van %appName% wordt niet ondersteund door SYNC."
+ },
+ "pl-pl" :
+ {
+ "line1" : "aplikacja nie obsług.",
+ "tts" : "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC."
+ },
+ "pt-br" :
+ {
+ "line1" : "não suportado",
+ "tts" : "Esta versão do %appName% não é suportada pelo SYNC."
+ },
+ "pt-pt" :
+ {
+ "line1" : "não suportada",
+ "tts" : "Esta versão de %appName% não é suportado pelo SYNC."
+ },
+ "ru-ru" :
+ {
+ "line1" : "не поддерживается",
+ "tts" : "Эта версия %appName% не поддерживается SYNC."
+ },
+ "sv-se" :
+ {
+ "line1" : "stöds ej",
+ "tts" : "SYNC har inte stöd för den här versionen av %appName%."
+ },
+ "tr-tr" :
+ {
+ "line1" : "desteklenmiyor",
+ "tts" : "Bu %appName% sürümü SYNC tarafından desteklenmiyor."
+ },
+ "zh-cn" :
+ {
+ "line1" : "不受支持",
+ "tts" : "SYNC不支持此版本的%appName%。"
+ },
+ "zh-tw" :
+ {
+ "line1" : "不支援",
+ "tts" : "SYNC 不支援此版本的%appName% 。"
+ }
+ }
+ },
+ "DataConsent" :
+ {
+ "languages" :
+ {
+ "en-gb" :
+ {
+ "textBody" : "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
+ },
+ "en-us" :
+ {
+ "line1" : "Enable Mobile Apps",
+ "line2" : "on SYNC? (Uses Data)",
+ "textBody" : "Would you like to enable Mobile Apps on SYNC?\r\n\r\nIf you enable the use of mobile apps from your mobile device on SYNC, you agree that SYNC can periodically use your device’s data plan to send and receive data that keeps your settings current and enables app functionality. Data sent to Ford U.S. includes your VIN and SYNC module number. Standard rates may apply.\r\n\r\nTo change settings or turn off later, visit the SYNC mobile apps settings menu. See Owner Guide for more information. I agree and consent."
+ },
+ "es-mx" :
+ {
+ "textBody" : "Si permite el uso de apps de su móvil vía SYNC®, acepta que SYNC® puede utilizar el plan de datos de su equipo para enviar y recibir info para actualizar su configuración y permitir la funcionalidad de la app. Datos enviados a Ford US incluyen VIN y # de módulo de SYNC®. Cargos a su plan de datos pueden aplicar. \r\n\r\nPara cambiar la config. de SYNC® o apagarlo, acceda a Menú de configuración de apps. Vea la Guía del Propietario para más info. Estoy de acuerdo y acepto lo anterior."
+ },
+ "fr-ca" :
+ {
+ "textBody" : "Si vous activez les applications mobiles sur SYNC, vous acceptez que SYNC utilise votre forfait de données afin de maintenir vos réglages à jour et assurer la pleine fonctionnalité. Parmi les données envoyées à Ford US, notons le NIV et le numéro de module SYNC. Des frais de base peuvent s’appliquer. \r\n\r\nPour modifier les réglages ou désactiver les applications, consultez le menu des réglages des applications de SYNC. Voir le Manuel du propriétaire. J’accepte et je consens."
+ }
+ }
+ },
+ "DataConsentHelp" :
+ {
+ "languages" :
+ {
+ "en-us" :
+ {
+ "textBody" : "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information."
+ },
+ "es-mx" :
+ {
+ "textBody" : "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
+ },
+ "fr-ca" :
+ {
+ "textBody" : "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
+ }
+ }
+ },
+ "DisableApps" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Auto-Update",
+ "line2" : "und Mobile Apps deaktivieren",
+ "tts" : "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen."
+ },
+ "en-au" :
+ {
+ "line1" : "Disable auto-updates",
+ "line2" : "and Mobile Apps?",
+ "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
+ },
+ "en-gb" :
+ {
+ "line1" : "Disable auto-updates",
+ "line2" : "and Mobile Apps?",
+ "textBody" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
+ "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
+ },
+ "en-ie" :
+ {
+ "line1" : "Disable auto-updates",
+ "line2" : "and Mobile Apps?",
+ "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
+ },
+ "en-us" :
+ {
+ "line1" : "Disable Auto-Updates",
+ "line2" : "and Mobile Apps?",
+ "textBody" : "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel.",
+ "tts" : "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
+ },
+ "es-en" :
+ {
+ "line1" : "¿Deshab. actualiz.",
+ "line2" : "autom. y aplic. móv.?",
+ "textBody" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
+ "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
+ },
+ "es-es" :
+ {
+ "line1" : "¿Desact. actual. auto",
+ "line2" : "y apl. móviles?",
+ "tts" : "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar."
+ },
+ "es-mx" :
+ {
+ "line1" : "¿Deshab. actualiz.",
+ "line2" : "autom. y aplic. móv.?",
+ "textBody" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
+ "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Désactiver màj autom.",
+ "line2" : "et app. mobiles?",
+ "textBody" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
+ "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
+ },
+ "fr-fr" :
+ {
+ "line1" : "Désactiver màj autom.",
+ "line2" : "et app. mobiles?",
+ "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
+ },
+ "it-it" :
+ {
+ "line1" : "Disabilitare agg. aut.",
+ "line2" : "e app mobili?",
+ "tts" : "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare."
+ },
+ "nl-nl" :
+ {
+ "line1" : "Auto-updates en mob.",
+ "line2" : "apps uitschakelen?",
+ "tts" : "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren."
+ },
+ "pl-pl" :
+ {
+ "line1" : "Wył. automat. aktual.",
+ "line2" : "i aplikacje mobilne?",
+ "tts" : "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować."
+ },
+ "pt-br" :
+ {
+ "line1" : "Desativar atualizações",
+ "line2" : "autom. e aplicativos?",
+ "tts" : "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Desact. actual. autom.",
+ "line2" : "e aplicações móveis?",
+ "tts" : "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Откл. автообновления",
+ "line2" : "и мобил. прилож.?",
+ "tts" : "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены."
+ },
+ "sv-se" :
+ {
+ "line1" : "Avaktiverar autouppdat.",
+ "line2" : "och mobilappar?",
+ "tts" : "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta."
+ },
+ "tr-tr" :
+ {
+ "line1" : "Oto. güncelleme ve",
+ "line2" : "mobil uygul. kapat?",
+ "tts" : "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın."
+ },
+ "zh-cn" :
+ {
+ "line1" : "是否禁用自动更新和",
+ "line2" : "移动应用程序?",
+ "tts" : "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。"
+ },
+ "zh-tw" :
+ {
+ "line1" : "停用自動更新",
+ "line2" : "和行動應用程式?",
+ "tts" : "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。"
+ }
+ }
+ },
+ "DrivingCharacteristics" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "label" : "Fahreigenschaften",
+ "tts" : "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus."
+ },
+ "en-au" :
+ {
+ "label" : "Driving characteristics",
+ "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
+ },
+ "en-gb" :
+ {
+ "label" : "Driving characteristics",
+ "textBody" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
+ "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
+ },
+ "en-ie" :
+ {
+ "label" : "Driving characteristics",
+ "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
+ },
+ "en-us" :
+ {
+ "label" : "Driving Characteristics",
+ "textBody" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM.",
+ "tts" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status, Gear Position, RPM."
+ },
+ "es-en" :
+ {
+ "label" : "Características del manejo",
+ "textBody" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
+ "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
+ },
+ "es-es" :
+ {
+ "label" : "Características de conducción",
+ "tts" : "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad."
+ },
+ "es-mx" :
+ {
+ "label" : "Características del manejo",
+ "textBody" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio.",
+ "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad, RPM del motor, y Posición del cambio."
+ },
+ "fr-ca" :
+ {
+ "label" : "Caractéristiques de conduite",
+ "textBody" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage.",
+ "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité, régime du moteur, et Position d’embrayage."
+ },
+ "fr-fr" :
+ {
+ "label" : "Caractéristiques de conduite",
+ "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
+ },
+ "it-it" :
+ {
+ "label" : "Caratteristiche di guida",
+ "tts" : "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza."
+ },
+ "nl-nl" :
+ {
+ "label" : "Rijkenmerken",
+ "tts" : "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus."
+ },
+ "pl-pl" :
+ {
+ "label" : "Informacje dotyczące stylu jazdy",
+ "tts" : "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa."
+ },
+ "pt-br" :
+ {
+ "label" : "Características de condução",
+ "line1" : "Caract. Condução",
+ "tts" : "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança."
+ },
+ "pt-pt" :
+ {
+ "label" : "Características de condução",
+ "tts" : "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança."
+ },
+ "ru-ru" :
+ {
+ "label" : "Характеристики движения",
+ "tts" : "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности."
+ },
+ "sv-se" :
+ {
+ "label" : "Köregenskaper",
+ "tts" : "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus."
+ },
+ "tr-tr" :
+ {
+ "label" : "Sürüş karakteristikleri",
+ "tts" : "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu."
+ },
+ "zh-cn" :
+ {
+ "label" : "行驶特性",
+ "tts" : "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态"
+ },
+ "zh-tw" :
+ {
+ "label" : "駕駛特性",
+ "tts" : "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態"
+ }
+ }
+ },
+ "Location" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "label" : "GPS und Geschwindigkeit",
+ "tts" : "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs."
+ },
+ "en-au" :
+ {
+ "label" : "GPS and speed",
+ "tts" : "An app can access vehicle GPS and speed."
+ },
+ "en-gb" :
+ {
+ "label" : "GPS and speed",
+ "textBody" : "An app can access vehicle GPS and speed.",
+ "tts" : "An app can access vehicle GPS and speed."
+ },
+ "en-ie" :
+ {
+ "label" : "GPS and speed",
+ "tts" : "An app can access vehicle GPS and speed."
+ },
+ "en-us" :
+ {
+ "label" : "GPS and Speed",
+ "textBody" : "An app can access vehicle GPS and speed.",
+ "tts" : "An app can access vehicle GPS and speed."
+ },
+ "es-en" :
+ {
+ "label" : "GPS y velocidad",
+ "textBody" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
+ "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
+ },
+ "es-es" :
+ {
+ "label" : "GPS y velocidad",
+ "tts" : "Una aplicación puede acceder al GPS y la velocidad del vehículo."
+ },
+ "es-mx" :
+ {
+ "label" : "GPS y velocidad",
+ "textBody" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
+ "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
+ },
+ "fr-ca" :
+ {
+ "label" : "GPS et Vitesse",
+ "textBody" : "Une application peut accéder au GPS et à la vitesse du véhicule.",
+ "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
+ },
+ "fr-fr" :
+ {
+ "label" : "GPS et vitesse",
+ "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
+ },
+ "it-it" :
+ {
+ "label" : "GPS e velocità",
+ "tts" : "Un'app può avere accesso a GPS e velocità del veicolo."
+ },
+ "nl-nl" :
+ {
+ "label" : "Gps en snelheid",
+ "tts" : "Een app heeft toegang tot gps en de snelheid van het voertuig."
+ },
+ "pl-pl" :
+ {
+ "label" : "GPS i prędkość",
+ "tts" : "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu."
+ },
+ "pt-br" :
+ {
+ "label" : "GPS e velocidade",
+ "tts" : "Um aplicativo pode acessar o GPS e a velocidade do veículo."
+ },
+ "pt-pt" :
+ {
+ "label" : "GPS e velocidade",
+ "tts" : "Uma aplicação consegue aceder ao GPS e à velocidade do veículo."
+ },
+ "ru-ru" :
+ {
+ "label" : "GPS и скорость",
+ "tts" : "Приложение имеет доступ к GPS и скорости автомобиля."
+ },
+ "sv-se" :
+ {
+ "label" : "GPS och hastighet",
+ "tts" : "Appen kan komma åt fordonets GPS och hastighetsmätare."
+ },
+ "tr-tr" :
+ {
+ "label" : "GPS ve hız",
+ "tts" : "Bu uygulama aracın GPS ve hız bilgilerine erişebilir."
+ },
+ "zh-cn" :
+ {
+ "label" : "GPS 和车速",
+ "tts" : "移动应用程序可以访问车辆 GPS 和车速信息。"
+ },
+ "zh-tw" :
+ {
+ "label" : "GPS和車速",
+ "tts" : "應用程式可存取車輛的GPS和速度。"
+ }
+ }
+ },
+ "Notifications" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "label" : "Push-Benachrichtigungen",
+ "tts" : "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden."
+ },
+ "en-au" :
+ {
+ "label" : "Push notifications",
+ "tts" : "An app can send notifications when running in the background."
+ },
+ "en-gb" :
+ {
+ "label" : "Push notifications",
+ "textBody" : "An app can send notifications when running in the background.",
+ "tts" : "An app can send notifications when running in the background."
+ },
+ "en-ie" :
+ {
+ "label" : "Push notifications",
+ "tts" : "An app can send notifications when running in the background."
+ },
+ "en-us" :
+ {
+ "label" : "Push Notifications",
+ "textBody" : "An app can send notifications when running in the background.",
+ "tts" : "An app can send notifications when running in the background."
+ },
+ "es-en" :
+ {
+ "label" : "Notificaciones tipo Push",
+ "textBody" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
+ "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
+ },
+ "es-es" :
+ {
+ "label" : "Notificaciones push",
+ "tts" : "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano."
+ },
+ "es-mx" :
+ {
+ "label" : "Notificaciones tipo Push",
+ "textBody" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
+ "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
+ },
+ "fr-ca" :
+ {
+ "label" : "Notifications Instantanées",
+ "textBody" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
+ "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
+ },
+ "fr-fr" :
+ {
+ "label" : "Notifications push",
+ "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
+ },
+ "it-it" :
+ {
+ "label" : "Notifiche push",
+ "tts" : "Un'app può inviare notifiche se eseguita in background."
+ },
+ "nl-nl" :
+ {
+ "label" : "Push-meldingen",
+ "tts" : "Een app kan meldingen versturen als deze op de achtergrond actief is."
+ },
+ "pl-pl" :
+ {
+ "label" : "Powiadomienia Push",
+ "tts" : "Aplikacja może wysyłać powiadomienia, działając w tle."
+ },
+ "pt-br" :
+ {
+ "label" : "Notificações Push",
+ "line1" : "Notificações",
+ "tts" : "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano."
+ },
+ "pt-pt" :
+ {
+ "label" : "Notificações push",
+ "tts" : "Uma aplicação consegue enviar notificações quando está activa em segundo plano."
+ },
+ "ru-ru" :
+ {
+ "label" : "Оповещения о пересылке",
+ "tts" : "Если приложение работает в фоновом режиме, оно может отправлять оповещения."
+ },
+ "sv-se" :
+ {
+ "label" : "Push-notiser",
+ "tts" : "Appen kan skicka meddelanden när den körs i bakgrunden."
+ },
+ "tr-tr" :
+ {
+ "label" : "Anlık bildirimleri",
+ "tts" : "Bir uygulama arka planda çalışırken bildirim gönderebilir."
+ },
+ "zh-cn" :
+ {
+ "label" : "推送通知",
+ "tts" : "移动应用程序在后台运行时可推送通知。"
+ },
+ "zh-tw" :
+ {
+ "label" : "傳送通知",
+ "tts" : "車輛行進時,應用程式可在背景中傳送通知。"
+ }
+ }
+ },
+ "SettingAppPermissions" :
+ {
+ "languages" :
+ {
+ "en-us" :
+ {
+ "textBody" : "Change %AppName%’s functionality and use of data as described below. See App terms of service and privacy policies."
+ },
+ "es-mx" :
+ {
+ "textBody" : "Para cambiar la funcionalidad de %appName% y usar los datos como se describe más adelante. Consulte los términos de servicio y políticas de privacidad de la App."
+ },
+ "fr-ca" :
+ {
+ "textBody" : "Pour modifier la fonctionnalité de %appName% et l’usage des données comme décrit ci-dessous. Reportez-vous aux modalités de service et à la politique de confidentialité de l’application."
+ }
+ }
+ },
+ "SettingDisableUpdates" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Updates deakt."
+ },
+ "en-au" :
+ {
+ "line1" : "Disable updates"
+ },
+ "en-gb" :
+ {
+ "line1" : "Disable updates"
+ },
+ "en-ie" :
+ {
+ "line1" : "Disable updates"
+ },
+ "en-us" :
+ {
+ "line1" : "Disable Updates",
+ "textBody" : "Disable Updates"
+ },
+ "es-en" :
+ {
+ "line1" : "Deshab. actual.",
+ "textBody" : "Deshab. actual."
+ },
+ "es-es" :
+ {
+ "line1" : "Desact. actual."
+ },
+ "es-mx" :
+ {
+ "line1" : "Deshab. actual.",
+ "textBody" : "Deshab. actual."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Désactiver MAJ",
+ "textBody" : "Désactiver MAJ"
+ },
+ "fr-fr" :
+ {
+ "line1" : "Désactiver màj"
+ },
+ "it-it" :
+ {
+ "line1" : "Disabilita agg."
+ },
+ "nl-nl" :
+ {
+ "line1" : "Upd. uitschak."
+ },
+ "pl-pl" :
+ {
+ "line1" : "Wyłącz aktual."
+ },
+ "pt-br" :
+ {
+ "line1" : "Desat. atualiz."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Desact. actualiz."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Откл. обновл."
+ },
+ "sv-se" :
+ {
+ "line1" : "Inaktivera uppd."
+ },
+ "tr-tr" :
+ {
+ "line1" : "Güncell. Kapat"
+ },
+ "zh-cn" :
+ {
+ "line1" : "禁用更新"
+ },
+ "zh-tw" :
+ {
+ "line1" : "停用更新"
+ }
+ }
+ },
+ "SettingEnableUpdates" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Apps aktivieren"
+ },
+ "en-au" :
+ {
+ "line1" : "Enable Apps"
+ },
+ "en-gb" :
+ {
+ "line1" : "Enable Apps"
+ },
+ "en-ie" :
+ {
+ "line1" : "Enable Apps"
+ },
+ "en-us" :
+ {
+ "line1" : "Enable Apps"
+ },
+ "es-en" :
+ {
+ "line1" : "Hab. aplic."
+ },
+ "es-es" :
+ {
+ "line1" : "Activar apl."
+ },
+ "es-mx" :
+ {
+ "line1" : "Hab. aplic."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Activer app.",
+ "textBody" : "Activer app."
+ },
+ "fr-fr" :
+ {
+ "line1" : "Activer app."
+ },
+ "it-it" :
+ {
+ "line1" : "Abilita app"
+ },
+ "nl-nl" :
+ {
+ "line1" : "Apps inschak."
+ },
+ "pl-pl" :
+ {
+ "line1" : "Włącz aplikacje"
+ },
+ "pt-br" :
+ {
+ "line1" : "Ativar aplic."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Activar actualiz."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Вкл. прилож."
+ },
+ "sv-se" :
+ {
+ "line1" : "Aktivera appar"
+ },
+ "tr-tr" :
+ {
+ "line1" : "Uygulamaları aç"
+ },
+ "zh-cn" :
+ {
+ "line1" : "启用应用程序"
+ },
+ "zh-tw" :
+ {
+ "line1" : "啟用應用程式"
+ }
+ }
+ },
+ "SettingUpdateAuto" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Update anford."
+ },
+ "en-au" :
+ {
+ "line1" : "Request update"
+ },
+ "en-gb" :
+ {
+ "line1" : "Request update"
+ },
+ "en-ie" :
+ {
+ "line1" : "Request update"
+ },
+ "en-us" :
+ {
+ "line1" : "Request Update",
+ "textBody" : "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
+ },
+ "es-en" :
+ {
+ "line1" : "Solicit. actualiz.",
+ "textBody" : "Solicit. actualiz."
+ },
+ "es-es" :
+ {
+ "line1" : "Solicitar actual."
+ },
+ "es-mx" :
+ {
+ "line1" : "Solicit. actualiz.",
+ "textBody" : "Solicit. actualiz."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Demander MAJ",
+ "textBody" : "Demander MAJ"
+ },
+ "fr-fr" :
+ {
+ "line1" : "Demander màj"
+ },
+ "it-it" :
+ {
+ "line1" : "Rich. aggiorn."
+ },
+ "nl-nl" :
+ {
+ "line1" : "Upd. aanvragen"
+ },
+ "pl-pl" :
+ {
+ "line1" : "Zażądaj aktual."
+ },
+ "pt-br" :
+ {
+ "line1" : "Solicitar atualiz."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Solicit. actualiz."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Запрос на обн."
+ },
+ "sv-se" :
+ {
+ "line1" : "Begär uppdat."
+ },
+ "tr-tr" :
+ {
+ "line1" : "Güncelleme iste"
+ },
+ "zh-cn" :
+ {
+ "line1" : "请求更新"
+ },
+ "zh-tw" :
+ {
+ "line1" : "請求更新"
+ }
+ }
+ },
+ "StatusNeeded" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Update benötigt"
+ },
+ "en-au" :
+ {
+ "line1" : "Update needed"
+ },
+ "en-gb" :
+ {
+ "line1" : "Update needed",
+ "textBody" : "Update needed"
+ },
+ "en-ie" :
+ {
+ "line1" : "Update needed"
+ },
+ "en-us" :
+ {
+ "line1" : "Update Needed",
+ "textBody" : "Update Needed"
+ },
+ "es-en" :
+ {
+ "line1" : "Actualiz. neces.",
+ "textBody" : "Actualiz. neces."
+ },
+ "es-es" :
+ {
+ "line1" : "Actu. necesaria"
+ },
+ "es-mx" :
+ {
+ "line1" : "Actualiz. neces.",
+ "textBody" : "Actualiz. neces."
+ },
+ "fr-ca" :
+ {
+ "line1" : "Màj requise",
+ "textBody" : "Màj requise"
+ },
+ "fr-fr" :
+ {
+ "line1" : "Mise à jour requise"
+ },
+ "it-it" :
+ {
+ "line1" : "Necess. aggiorn."
+ },
+ "nl-nl" :
+ {
+ "line1" : "Update nodig"
+ },
+ "pl-pl" :
+ {
+ "line1" : "Potrzeba aktual."
+ },
+ "pt-br" :
+ {
+ "line1" : "Atualiz. necess."
+ },
+ "pt-pt" :
+ {
+ "line1" : "Actual. necess."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Необх. обновл."
+ },
+ "sv-se" :
+ {
+ "line1" : "Uppdat. krävs"
+ },
+ "tr-tr" :
+ {
+ "line1" : "Güncellenmeli"
+ },
+ "zh-cn" :
+ {
+ "line1" : "需要进行更新"
+ },
+ "zh-tw" :
+ {
+ "line1" : "需更新"
+ }
+ }
+ },
+ "StatusPending" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Aktualisieren..."
+ },
+ "en-au" :
+ {
+ "line1" : "Updating..."
+ },
+ "en-gb" :
+ {
+ "line1" : "Updating...",
+ "textBody" : "Updating..."
+ },
+ "en-ie" :
+ {
+ "line1" : "Updating..."
+ },
+ "en-us" :
+ {
+ "line1" : "Updating...",
+ "textBody" : "Updating..."
+ },
+ "es-en" :
+ {
+ "line1" : "Actualizando...",
+ "textBody" : "Actualizando..."
+ },
+ "es-es" :
+ {
+ "line1" : "Actualizando..."
+ },
+ "es-mx" :
+ {
+ "line1" : "Actualizando...",
+ "textBody" : "Actualizando..."
+ },
+ "fr-ca" :
+ {
+ "line1" : "MAJ en cours...",
+ "textBody" : "MAJ en cours..."
+ },
+ "fr-fr" :
+ {
+ "line1" : "Màj en cours..."
+ },
+ "it-it" :
+ {
+ "line1" : "Aggiornamento"
+ },
+ "nl-nl" :
+ {
+ "line1" : "Updaten..."
+ },
+ "pl-pl" :
+ {
+ "line1" : "Aktualizowanie"
+ },
+ "pt-br" :
+ {
+ "line1" : "Atualizando..."
+ },
+ "pt-pt" :
+ {
+ "line1" : "A actualizar..."
+ },
+ "ru-ru" :
+ {
+ "line1" : "Обновление..."
+ },
+ "sv-se" :
+ {
+ "line1" : "Uppdaterar..."
+ },
+ "tr-tr" :
+ {
+ "line1" : "Güncelleniyor..."
+ },
+ "zh-cn" :
+ {
+ "line1" : "正在更新......"
+ },
+ "zh-tw" :
+ {
+ "line1" : "更新中..."
+ }
+ }
+ },
+ "StatusUpToDate" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "line1" : "Aktuelle Version"
+ },
+ "en-au" :
+ {
+ "line1" : "Up-to-date"
+ },
+ "en-gb" :
+ {
+ "line1" : "Up-to-date",
+ "textBody" : "Up-to-date"
+ },
+ "en-ie" :
+ {
+ "line1" : "Up-to-date"
+ },
+ "en-us" :
+ {
+ "line1" : "Up-To-Date",
+ "textBody" : "Up-To-Date"
+ },
+ "es-en" :
+ {
+ "line1" : "Actualizado",
+ "textBody" : "Actualizado"
+ },
+ "es-es" :
+ {
+ "line1" : "Actualizada"
+ },
+ "es-mx" :
+ {
+ "line1" : "Actualizado",
+ "textBody" : "Actualizado"
+ },
+ "fr-ca" :
+ {
+ "line1" : "Déjà à jour",
+ "textBody" : "Déjà à jour"
+ },
+ "fr-fr" :
+ {
+ "line1" : "Déjà à jour"
+ },
+ "it-it" :
+ {
+ "line1" : "più recente"
+ },
+ "nl-nl" :
+ {
+ "line1" : "Up-to-date"
+ },
+ "pl-pl" :
+ {
+ "line1" : "Aktualne"
+ },
+ "pt-br" :
+ {
+ "line1" : "Atualizado"
+ },
+ "pt-pt" :
+ {
+ "line1" : "Actualizado"
+ },
+ "ru-ru" :
+ {
+ "line1" : "Обновлено"
+ },
+ "sv-se" :
+ {
+ "line1" : "Uppdat. krävs ej"
+ },
+ "tr-tr" :
+ {
+ "line1" : "Güncel"
+ },
+ "zh-cn" :
+ {
+ "line1" : "最新更新"
+ },
+ "zh-tw" :
+ {
+ "line1" : "更新最新"
+ }
+ }
+ },
+ "VehicleInfo" :
+ {
+ "languages" :
+ {
+ "de-de" :
+ {
+ "label" : "Fahrzeuginformationen",
+ "tts" : "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck."
+ },
+ "en-au" :
+ {
+ "label" : "Vehicle information",
+ "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
+ },
+ "en-gb" :
+ {
+ "label" : "Vehicle information",
+ "textBody" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
+ "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
+ },
+ "en-ie" :
+ {
+ "label" : "Vehicle information",
+ "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
+ },
+ "en-us" :
+ {
+ "label" : "Vehicle Information",
+ "textBody" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure.",
+ "tts" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Odometer, VIN, External Temperature, Tire Pressure."
+ },
+ "es-en" :
+ {
+ "label" : "Información del vehículo",
+ "textBody" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
+ "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
+ },
+ "es-es" :
+ {
+ "label" : "Información del vehículo",
+ "tts" : "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos."
+ },
+ "es-mx" :
+ {
+ "label" : "Información del Vehículo",
+ "textBody" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos.",
+ "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Presión de los neumáticos."
+ },
+ "fr-ca" :
+ {
+ "label" : "Renseignements du Véhicule",
+ "textBody" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus.",
+ "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Odomètre, NIV, Température extérieure, et Pression des pneus."
+ },
+ "fr-fr" :
+ {
+ "label" : "Renseignements du véhicule",
+ "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus."
+ },
+ "it-it" :
+ {
+ "label" : "Informazioni sul veicolo",
+ "tts" : "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici."
+ },
+ "nl-nl" :
+ {
+ "label" : "Voertuiginformatie",
+ "tts" : "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning."
+ },
+ "pl-pl" :
+ {
+ "label" : "Informacje o pojeździe",
+ "tts" : "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon."
+ },
+ "pt-br" :
+ {
+ "label" : "Informações sobre o veículo",
+ "line1" : "Inform. Veículo",
+ "tts" : "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus."
+ },
+ "pt-pt" :
+ {
+ "label" : "Informações do veículo",
+ "tts" : "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus."
+ },
+ "ru-ru" :
+ {
+ "label" : "Информация об автомобиле",
+ "tts" : "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин."
+ },
+ "sv-se" :
+ {
+ "label" : "Fordonsinformation",
+ "tts" : "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck."
+ },
+ "tr-tr" :
+ {
+ "label" : "Araç bilgisi",
+ "tts" : "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı."
+ },
+ "zh-cn" :
+ {
+ "label" : "车辆信息",
+ "tts" : "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压."
+ },
+ "zh-tw" :
+ {
+ "label" : "車輛資訊",
+ "tts" : "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓."
+ }
+ }
+ }
+ },
+ "version" : "001.001.023"
+ },
+ "functional_groupings" :
+ {
+ "BackgroundAPT" :
+ {
+ "rpcs" :
+ {
+ "EndAudioPassThru" :
+ {
+ "hmi_levels" : [ "BACKGROUND" ]
+ },
+ "OnAudioPassThru" :
+ {
+ "hmi_levels" : [ "BACKGROUND" ]
+ },
+ "PerformAudioPassThru" :
+ {
+ "hmi_levels" : [ "BACKGROUND" ]
+ }
+ }
+ },
+ "Base-4" :
+ {
+ "rpcs" :
+ {
+ "AddCommand" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "AddSubMenu" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "Alert" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ },
+ "ChangeRegistration" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "CreateInteractionChoiceSet" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "DeleteCommand" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "DeleteFile" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "DeleteInteractionChoiceSet" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "DeleteSubMenu" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "EncodedSyncPData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "EndAudioPassThru" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "GenericResponse" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "ListFiles" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnAppInterfaceUnregistered" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnAudioPassThru" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "OnButtonEvent" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "OnButtonPress" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "OnCommand" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "OnDriverDistraction" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "OnEncodedSyncPData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnHMIStatus" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnHashChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnLanguageChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnPermissionsChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnSystemRequest" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "PerformAudioPassThru" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ },
+ "PerformInteraction" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ },
+ "PutFile" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "RegisterAppInterface" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "ResetGlobalProperties" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "ScrollableMessage" :
+ {
+ "hmi_levels" : [ "FULL" ]
+ },
+ "SetAppIcon" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetDisplayLayout" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetGlobalProperties" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetMediaClockTimer" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "Show" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "Slider" :
+ {
+ "hmi_levels" : [ "FULL" ]
+ },
+ "Speak" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ },
+ "SubscribeButton" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "SystemRequest" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "UnregisterAppInterface" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "UnsubscribeButton" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "BaseBeforeDataConsent" :
+ {
+ "rpcs" :
+ {
+ "ChangeRegistration" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "DeleteFile" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "EncodedSyncPData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "ListFiles" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnAppInterfaceUnregistered" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnEncodedSyncPData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnHMIStatus" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnHashChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnLanguageChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnPermissionsChange" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "OnSystemRequest" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "PutFile" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "RegisterAppInterface" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "ResetGlobalProperties" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetAppIcon" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetDisplayLayout" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SetGlobalProperties" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "SystemRequest" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ },
+ "UnregisterAppInterface" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
+ }
+ }
+ },
+ "DataConsent-2" :
+ {
+ "rpcs" : null,
+ "user_consent_prompt" : "DataConsent"
+ },
+ "DiagnosticMessageOnly" :
+ {
+ "rpcs" :
+ {
+ "DiagnosticMessage" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "DialNumberOnly" :
+ {
+ "rpcs" :
+ {
+ "DialNumber" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "DrivingCharacteristics-3" :
+ {
+ "rpcs" :
+ {
+ "GetVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "accPedalPosition",
+ "beltStatus",
+ "electronicParkBrakeStatus",
+ "driverBraking",
+ "myKey",
+ "prndl",
+ "rpm",
+ "steeringWheelAngle",
+ "handsOffSteering"
+ ]
+ },
+ "OnVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "accPedalPosition",
+ "beltStatus",
+ "electronicParkBrakeStatus",
+ "driverBraking",
+ "myKey",
+ "prndl",
+ "rpm",
+ "steeringWheelAngle",
+ "handsOffSteering"
+ ]
+ },
+ "SubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "accPedalPosition",
+ "beltStatus",
+ "electronicParkBrakeStatus",
+ "driverBraking",
+ "myKey",
+ "prndl",
+ "rpm",
+ "steeringWheelAngle",
+ "handsOffSteering"
+ ]
+ },
+ "UnsubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "accPedalPosition",
+ "beltStatus",
+ "electronicParkBrakeStatus",
+ "driverBraking",
+ "myKey",
+ "prndl",
+ "rpm",
+ "steeringWheelAngle",
+ "handsOffSteering"
+ ]
+ }
+ },
+ "user_consent_prompt" : "DrivingCharacteristics"
+ },
+ "Emergency-1" :
+ {
+ "rpcs" :
+ {
+ "GetVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "airbagStatus", "clusterModeStatus", "eCallInfo", "emergencyEvent" ]
+ },
+ "OnVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "airbagStatus", "clusterModeStatus", "eCallInfo", "emergencyEvent" ]
+ },
+ "SubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "airbagStatus", "clusterModeStatus", "eCallInfo", "emergencyEvent" ]
+ },
+ "UnsubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "airbagStatus", "clusterModeStatus", "eCallInfo", "emergencyEvent" ]
+ }
+ }
+ },
+ "Location-1" :
+ {
+ "rpcs" :
+ {
+ "GetVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "gps", "speed" ]
+ },
+ "OnVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "gps", "speed" ]
+ },
+ "SubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "gps", "speed" ]
+ },
+ "UnsubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" : [ "gps", "speed" ]
+ }
+ },
+ "user_consent_prompt" : "Location"
+ },
+ "Navigation-1" :
+ {
+ "rpcs" :
+ {
+ "AlertManeuver" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "ShowConstantTBT" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "UpdateTurnList" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "Notifications" :
+ {
+ "rpcs" :
+ {
+ "Alert" :
+ {
+ "hmi_levels" : [ "BACKGROUND" ]
+ }
+ },
+ "user_consent_prompt" : "Notifications"
+ },
+ "Notifications-45" :
+ {
+ "rpcs" :
+ {
+ "MWTAA" :
+ {
+ "hmi_levels" : [ "LIMITED" ]
+ }
+ },
+ "user_consent_prompt" : "Notifications-45"
+ },
+ "Notifications-73" :
+ {
+ "rpcs" :
+ {
+ "STEHV" :
+ {
+ "hmi_levels" : [ "FULL" ]
+ }
+ },
+ "user_consent_prompt" : "Notifications-73"
+ },
+ "OnKeyboardInputOnlyGroup" :
+ {
+ "rpcs" :
+ {
+ "OnKeyboardInput" :
+ {
+ "hmi_levels" : [ "FULL" ]
+ }
+ }
+ },
+ "OnTouchEventOnlyGroup" :
+ {
+ "rpcs" :
+ {
+ "OnTouchEvent" :
+ {
+ "hmi_levels" : [ "FULL" ]
+ }
+ }
+ },
+ "PropriataryData-1" :
+ {
+ "rpcs" :
+ {
+ "DiagnosticMessage" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "GetDTCs" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "ReadDID" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "PropriataryData-2" :
+ {
+ "rpcs" :
+ {
+ "DiagnosticMessage" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "GetDTCs" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "ReadDID" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "ProprietaryData-3" :
+ {
+ "rpcs" :
+ {
+ "GetDTCs" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ },
+ "ReadDID" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "SendLocation" :
+ {
+ "rpcs" :
+ {
+ "SendLocation" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "SendLocationOnly" :
+ {
+ "rpcs" :
+ {
+ "SendLocation" :
+ {
+ "hmi_levels" : [ "FULL", "LIMITED" ]
+ }
+ }
+ },
+ "VehicleInfo-3" :
+ {
+ "rpcs" :
+ {
+ "GetVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "bodyInformation",
+ "deviceStatus",
+ "engineOilLife",
+ "engineTorque",
+ "externalTemperature",
+ "turnSignal",
+ "fuelLevel",
+ "fuelLevel_State",
+ "headLampStatus",
+ "instantFuelConsumption",
+ "fuelRange",
+ "cloudAppVehicleID",
+ "odometer",
+ "tirePressure",
+ "vin",
+ "wiperStatus"
+ ]
+ },
+ "OnVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "bodyInformation",
+ "deviceStatus",
+ "engineOilLife",
+ "engineTorque",
+ "externalTemperature",
+ "turnSignal",
+ "fuelLevel",
+ "fuelLevel_State",
+ "headLampStatus",
+ "instantFuelConsumption",
+ "fuelRange",
+ "cloudAppVehicleID",
+ "odometer",
+ "tirePressure",
+ "vin",
+ "wiperStatus"
+ ]
+ },
+ "SubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "bodyInformation",
+ "deviceStatus",
+ "engineOilLife",
+ "engineTorque",
+ "externalTemperature",
+ "turnSignal",
+ "fuelLevel",
+ "fuelLevel_State",
+ "headLampStatus",
+ "instantFuelConsumption",
+ "fuelRange",
+ "cloudAppVehicleID",
+ "odometer",
+ "tirePressure",
+ "wiperStatus"
+ ]
+ },
+ "UnsubscribeVehicleData" :
+ {
+ "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
+ "parameters" :
+ [
+ "bodyInformation",
+ "deviceStatus",
+ "engineOilLife",
+ "engineTorque",
+ "externalTemperature",
+ "turnSignal",
+ "fuelLevel",
+ "fuelLevel_State",
+ "headLampStatus",
+ "instantFuelConsumption",
+ "fuelRange",
+ "cloudAppVehicleID",
+ "odometer",
+ "tirePressure",
+ "wiperStatus"
+ ]
+ }
+ },
+ "user_consent_prompt" : "VehicleInfo"
+ }
+ },
+ "module_config" :
+ {
+ "endpoints" :
+ {
+ "0x04" :
+ {
+ "default" : [ "http://x.x.x.x:3000/api/1/softwareUpdate" ]
+ },
+ "0x07" :
+ {
+ "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
+ }
+ },
+ "exchange_after_x_days" : 20,
+ "exchange_after_x_ignition_cycles" : 100,
+ "exchange_after_x_kilometers" : 1800,
+ "notifications_per_minute_by_priority" :
+ {
+ "COMMUNICATION" : 6,
+ "EMERGENCY" : 60,
+ "NAVIGATION" : 15,
+ "PROJECTION" : 15,
+ "NONE" : 0,
+ "NORMAL" : 4,
+ "VOICECOM" : 20
+ },
+ "subtle_notifications_per_minute_by_priority":
+ {
+ "COMMUNICATION": 15,
+ "EMERGENCY": 60,
+ "NAVIGATION": 20,
+ "PROJECTION": 20,
+ "NONE": 0,
+ "NORMAL": 10,
+ "VOICECOM": 30
+ },
+ "preloaded_date" : "2012-12-16",
+ "preloaded_pt" : true,
+ "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
+ "timeout_after_x_seconds" : 60
+ }
+ }
+}
diff --git a/src/components/policy/policy_regular/test/policy_manager_impl_test.cc b/src/components/policy/policy_regular/test/policy_manager_impl_test.cc
index 37ef1afc0c..d5a66f4388 100644
--- a/src/components/policy/policy_regular/test/policy_manager_impl_test.cc
+++ b/src/components/policy/policy_regular/test/policy_manager_impl_test.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Ford Motor Company
+ * Copyright (c) 2020, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,146 +30,73 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <ctime>
#include <fstream>
-#include <string>
-#include <vector>
+#include <utility>
#include "gtest/gtest.h"
-#include "json/writer.h"
-#include "utils/jsoncpp_reader_wrapper.h"
-
-#include "config_profile/profile.h"
-#include "connection_handler/connection_handler.h"
-#include "policy/mock_cache_manager.h"
-#include "policy/mock_policy_listener.h"
-#include "policy/mock_policy_settings.h"
-#include "policy/mock_update_status_manager.h"
-#include "policy/policy_manager_impl.h"
-#include "policy/policy_table/enums.h"
-#include "policy/policy_table/types.h"
+#include "json/reader.h"
#include "utils/date_time.h"
#include "utils/file_system.h"
#include "utils/gen_hash.h"
-#include "utils/macro.h"
-
-#include "policy/mock_access_remote.h"
+#include "utils/jsoncpp_reader_wrapper.h"
-using ::testing::_;
-using ::testing::AtLeast;
-using ::testing::DoAll;
-using ::testing::NiceMock;
-using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::SetArgReferee;
+#include "policy/policy_manager_impl.h"
-using ::policy::PolicyManagerImpl;
-using ::policy::PolicyTable;
+#include "policy/mock_access_remote.h"
+#include "policy/mock_cache_manager.h"
+#include "policy/mock_policy_listener.h"
+#include "policy/mock_policy_settings.h"
namespace test {
namespace components {
namespace policy_test {
-namespace policy_table = rpc::policy_table_interface_base;
-namespace custom_str = utils::custom_string;
+using namespace policy;
+using namespace rpc::policy_table_interface_base;
-typedef std::multimap<std::string, policy_table::Rpcs&>
- UserConsentPromptToRpcsConnections;
+using ::testing::_;
+using ::testing::NiceMock;
+using ::testing::Return;
+using ::testing::ReturnRef;
typedef std::shared_ptr<policy_table::Table> PolicyTableSPtr;
namespace {
-std::string kSpeed = "speed";
-std::string kRPM = "rpm";
-std::string kFuelLevel = "fuelLevel";
+const std::string kSdlPreloadedPtJson = "json/sdl_preloaded_pt.json";
+const int kServiceTypeInt = 0;
+const std::string kDeviceNumber = "XXX123456789ZZZ";
+const std::string kAppStorageFolder = "app_storage_folder";
+const std::string kValidAppId = "1234";
+const std::string kInValidFilename = "invalid_filename.json";
} // namespace
-template <typename T>
-std::string NumberToString(T Number) {
- std::ostringstream ss;
- ss << Number;
- return ss.str();
-}
-
-template <typename T>
-void SortAndCheckEquality(std::vector<T> first, std::vector<T> second) {
- ASSERT_EQ(first.size(), second.size());
- std::sort(first.begin(), first.end());
- std::sort(second.begin(), second.end());
- // Checks
- for (uint32_t i = 0; i < first.size(); ++i) {
- EXPECT_EQ(first[i], second[i]);
- }
-}
-
-struct StringsForUpdate {
- std::string new_field_value_;
- std::string new_field_name_;
- std::string new_date_;
-};
-
-char GenRandomString(const char* alphanum) {
- const int stringLength = sizeof(alphanum) - 1;
- return alphanum[rand() % stringLength];
-}
-
-struct StringsForUpdate CreateNewRandomData(StringsForUpdate& str) {
- // Generate random date
- srand(time(NULL));
- unsigned int day = 1 + rand() % 31; // Day from 1 - 31
- unsigned int month = 1 + rand() % 12; // Month from 1 - 12
- unsigned int year = 1985 + rand() % 31; // Year from 1985 - 2015
-
- // Convert date to string
- str.new_date_ = NumberToString(year) + '-' + NumberToString(month) + '-' +
- NumberToString(day);
-
- // Create new field
- unsigned int number = 1 + rand() % 100; // Number from 1 - 100
- str.new_field_name_ += NumberToString(number);
-
- // Create new field random value
- const char alphanum[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-
- for (unsigned int i = 0; i < 5; ++i) {
- str.new_field_value_ += GenRandomString(alphanum);
- }
- return str;
-}
-
-policy_table::AppHmiTypes HmiTypes(const policy_table::AppHMIType hmi_type) {
- policy_table::AppHmiTypes hmi_types;
- hmi_types.push_back(hmi_type);
- return hmi_types;
-}
-
class PolicyManagerImplTest : public ::testing::Test {
public:
- PolicyManagerImplTest() : device_id("08-00-27-CE-76-FE") {}
+ PolicyManagerImplTest()
+ : policy_manager_(nullptr)
+ , mock_cache_manager_(nullptr)
+ , access_remote_(nullptr) {}
protected:
- PolicyManagerImpl* manager;
- NiceMock<MockCacheManagerInterface>* cache_manager;
- NiceMock<MockPolicyListener> listener;
- NiceMock<MockUpdateStatusManager> update_status_manager;
- const std::string device_id;
- std::shared_ptr<access_remote_test::MockAccessRemote> access_remote;
- PolicyTableSPtr default_pt_snapshot_;
-
- void SetUp() OVERRIDE {
- manager = new PolicyManagerImpl();
- manager->set_listener(&listener);
- cache_manager = new NiceMock<MockCacheManagerInterface>();
- manager->set_cache_manager(cache_manager);
- access_remote = std::make_shared<access_remote_test::MockAccessRemote>();
- manager->set_access_remote(access_remote);
- // Json::Value table = createPTforLoad();
- default_pt_snapshot_ = std::make_shared<policy_table::Table>();
- }
+ std::shared_ptr<PolicyManagerImpl> policy_manager_;
+ NiceMock<MockCacheManagerInterface>* mock_cache_manager_;
+ NiceMock<MockPolicyListener> listener_;
+ NiceMock<policy_handler_test::MockPolicySettings> policy_settings_;
+ std::shared_ptr<NiceMock<access_remote_test::MockAccessRemote> >
+ access_remote_;
+
+ void SetUp() {
+ policy_manager_ = std::make_shared<PolicyManagerImpl>();
+ mock_cache_manager_ = new NiceMock<MockCacheManagerInterface>();
+ policy_manager_->set_cache_manager(mock_cache_manager_);
+ policy_manager_->set_listener(&listener_);
+ access_remote_ =
+ std::make_shared<NiceMock<access_remote_test::MockAccessRemote> >();
+ policy_manager_->set_access_remote(access_remote_);
- void TearDown() OVERRIDE {
- delete manager;
+ ON_CALL(policy_settings_, app_storage_folder())
+ .WillByDefault(ReturnRef(kAppStorageFolder));
}
::testing::AssertionResult IsValid(const policy_table::Table& table) {
@@ -181,1832 +108,509 @@ class PolicyManagerImplTest : public ::testing::Test {
return ::testing::AssertionFailure() << ::rpc::PrettyFormat(report);
}
}
-
- void PrepareUpdateWithFunctionalGroupingContent(policy_table::Table& update) {
- using namespace application_manager;
-
- update.SetPolicyTableType(rpc::policy_table_interface_base::PT_UPDATE);
-
- policy_table::Rpcs rpcs;
- rpcs.mark_initialized();
-
- policy_table::Rpc rpc;
- rpc.mark_initialized();
-
- policy_table::RpcParameters rpc_params;
- rpc_params.mark_initialized();
- rpc_params.hmi_levels.push_back(
- rpc::policy_table_interface_base::HmiLevel::HL_FULL);
- rpc_params.hmi_levels.push_back(
- rpc::policy_table_interface_base::HmiLevel::HL_BACKGROUND);
-
- (*rpc_params.parameters).push_back(kRPM);
- (*rpc_params.parameters).push_back(kSpeed);
-
- rpc["GetVehicleData"] = rpc_params;
- rpcs.rpcs = rpc;
-
- policy_table::FunctionalGroupings fg;
- fg["TestGroup1"] = rpcs;
-
- update.policy_table.functional_groupings = fg;
-
- policy_table::ApplicationParams app_params;
- app_params.mark_initialized();
- app_params.priority =
- rpc::policy_table_interface_base::Priority::P_COMMUNICATION;
- app_params.groups.push_back("TestGroup1");
- update.policy_table.app_policies_section.apps["1234"] = app_params;
- }
-
- void ExpectOnPermissionsUpdated() {
- std::string dev_id_1 = "dev_id_1";
- std::string app_id = "1234";
-
- EXPECT_CALL(*cache_manager, IsDefaultPolicy(app_id)).WillOnce(Return(true));
- EXPECT_CALL(*access_remote, IsAppRemoteControl(_)).WillOnce(Return(true));
-
- FunctionalGroupNames fg_names;
- fg_names[0] =
- std::make_pair<std::string, std::string>("fg_name_1", "fg_name_2");
- EXPECT_CALL(*cache_manager, GetFunctionalGroupNames(_))
- .WillOnce(DoAll(SetArgReferee<0>(fg_names), Return(true)));
-
- std::vector<std::string> device_ids;
- device_ids.push_back(dev_id_1);
- EXPECT_CALL(listener, GetDevicesIds(app_id))
- .WillRepeatedly(Return(device_ids));
-
- int32_t group_id = 0;
- FunctionalGroupIDs group_ids;
- group_ids.push_back(group_id);
- FunctionalIdType group_types;
- group_types[GroupType::kTypeGeneral] = group_ids;
- EXPECT_CALL(*access_remote, GetPermissionsForApp(dev_id_1, app_id, _))
- .WillRepeatedly(DoAll(SetArgReferee<2>(group_types), Return(true)));
-
- EXPECT_CALL(listener, OnPermissionsUpdated(dev_id_1, app_id, _, _))
- .Times(1);
-
- EXPECT_CALL(listener, GetAppName(_))
- .WillOnce(Return(custom_str::CustomString("")));
-
- EXPECT_CALL(listener, OnUpdateStatusChanged(_)).Times(1);
- }
};
-class PolicyManagerImplTest2 : public ::testing::Test {
- public:
- PolicyManagerImplTest2()
- : app_id1("123456789")
- , app_id2("1010101010")
- , dev_id1("XXX123456789ZZZ")
- , dev_id2("08-00-27-CE-76-FE")
- , dev_handle1(123456789)
- , dev_handle2(1010101010)
- , PTU_request_types(Json::arrayValue) {}
-
- protected:
- PolicyManagerImpl* manager;
- NiceMock<MockPolicyListener> listener;
- std::vector<std::string> hmi_level;
- std::vector<std::string> PT_request_types;
- uint32_t PTU_request_types_size;
- unsigned int index;
- const std::string app_id1;
- const std::string app_id2;
- const std::string dev_id1;
- const std::string dev_id2;
- const connection_handler::DeviceHandle dev_handle1;
- const connection_handler::DeviceHandle dev_handle2;
- Json::Value PTU_request_types;
- NiceMock<policy_handler_test::MockPolicySettings> policy_settings_;
- const std::string kAppStorageFolder = "storage_PolicyManagerImplTest2";
-
- void SetUp() OVERRIDE {
- file_system::CreateDirectory(kAppStorageFolder);
- file_system::DeleteFile("policy.sqlite");
-
- manager = new PolicyManagerImpl();
- ON_CALL(policy_settings_, app_storage_folder())
- .WillByDefault(ReturnRef(kAppStorageFolder));
- ON_CALL(policy_settings_, use_full_app_id()).WillByDefault(Return(true));
- manager->set_listener(&listener);
- const char* levels[] = {"FULL", "LIMITED", "BACKGROUND", "NONE"};
- hmi_level.assign(levels, levels + sizeof(levels) / sizeof(levels[0]));
- srand(time(NULL));
- index = rand() % 3;
- }
-
- std::vector<std::string> JsonToVectorString(
- const Json::Value& PTU_request_types) {
- std::vector<std::string> result;
- for (uint32_t i = 0; i < PTU_request_types.size(); ++i) {
- result.push_back(PTU_request_types[i].asString());
- }
- return result;
- }
-
- const Json::Value GetPTU(std::string file_name) {
- // Get PTU
- std::ifstream ifile(file_name);
- Json::CharReaderBuilder reader_builder;
- std::string json;
- Json::Value root(Json::objectValue);
- if (ifile.is_open() &&
- Json::parseFromStream(reader_builder, ifile, &root, nullptr)) {
- json = root.toStyledString();
- }
- ifile.close();
- ::policy::BinaryMessage msg(json.begin(), json.end());
- // Load Json to cache
- EXPECT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- manager->LoadPT("file_pt_update.json", msg));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
- return root;
- }
-
- void CreateLocalPT(const std::string& file_name) {
- file_system::remove_directory_content(kAppStorageFolder);
- ON_CALL(policy_settings_, app_storage_folder())
- .WillByDefault(ReturnRef(kAppStorageFolder));
- ON_CALL(policy_settings_, use_full_app_id()).WillByDefault(Return(true));
- ASSERT_TRUE(manager->InitPT(file_name, &policy_settings_));
- }
-
- Json::Value AddWidgetSupportToPt(const std::string& section_name,
- const uint32_t group_number) {
- std::ifstream ifile("sdl_preloaded_pt.json");
- Json::CharReaderBuilder reader_builder;
- Json::Value root(Json::objectValue);
- if (ifile.is_open() &&
- Json::parseFromStream(reader_builder, ifile, &root, nullptr)) {
- auto& groups =
- root["policy_table"]["app_policies"][section_name]["groups"];
- if (groups.empty()) {
- groups = Json::Value(Json::arrayValue);
- }
- groups[group_number] = Json::Value("WidgetSupport");
- }
- ifile.close();
- return root;
- }
-
- std::string AddWidgetSupportToPt(Json::Value* root,
- const std::string& section_name,
- const uint32_t group_number) {
- if (root) {
- auto& groups =
- (*root)["policy_table"]["app_policies"][section_name]["groups"];
- if (groups.empty()) {
- groups = Json::Value(Json::arrayValue);
- }
- groups[group_number] = Json::Value("WidgetSupport");
- return root->toStyledString();
- }
- return std::string();
- }
-
- std::string AddWidgetSupportToFunctionalGroups(Json::Value* root,
- const std::string& rpc_name,
- const std::string& hmi_level) {
- if (root) {
- Json::Value val(Json::objectValue);
- Json::Value val2(Json::arrayValue);
- val2[0] = hmi_level;
- val[rpc_name]["hmi_levels"] = val2;
- (*root)["policy_table"]["functional_groupings"]["WidgetSupport"]["rpcs"] =
- val;
- return root->toStyledString();
- }
- return std::string();
- }
+TEST_F(PolicyManagerImplTest, InitPT_NoAppStorageFolder_ReturnFalse) {
+ EXPECT_FALSE(policy_manager_->InitPT(kSdlPreloadedPtJson, &policy_settings_));
+}
- void AddRTtoPT(const std::string& update_file_name,
- const std::string& section_name,
- const uint32_t rt_number,
- const uint32_t invalid_rt_number) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- // Get RequestTypes from section of preloaded_pt app_policies
- PT_request_types = manager->GetAppRequestTypes(section_name);
- EXPECT_EQ(rt_number, PT_request_types.size());
- Json::Value root = GetPTU(update_file_name);
- // Get Request Types from JSON (PTU)
- PTU_request_types =
- root["policy_table"]["app_policies"][section_name]["RequestType"];
- PTU_request_types_size = PTU_request_types.size();
- PT_request_types.clear();
- // Get RequestTypes from section of PT app policies after update
- PT_request_types = manager->GetAppRequestTypes(section_name);
- // Check number of RT in PTU and PT now are equal
- ASSERT_EQ(PTU_request_types_size - invalid_rt_number,
- PT_request_types.size());
- }
+TEST_F(PolicyManagerImplTest, InitPT_InitializationNotSuccessful_ReturnFalse) {
+ file_system::CreateDirectory(kAppStorageFolder);
+ EXPECT_CALL(*mock_cache_manager_,
+ Init(kSdlPreloadedPtJson, &policy_settings_))
+ .WillOnce(Return(false));
+ EXPECT_FALSE(policy_manager_->InitPT(kSdlPreloadedPtJson, &policy_settings_));
+ file_system::RemoveDirectory(kAppStorageFolder, true);
+}
- void AddRTtoAppSectionPT(const std::string& update_file_name,
- const std::string& section_name,
- const uint32_t rt_number,
- const uint32_t invalid_rt_number) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- // Add app
- manager->AddApplication(
- dev_id1, section_name, HmiTypes(policy_table::AHT_DEFAULT));
- // Check app gets RequestTypes from pre_DataConsent of app_policies
- // section
- PT_request_types = manager->GetAppRequestTypes(section_name);
- EXPECT_EQ(rt_number, PT_request_types.size());
- EXPECT_CALL(listener, OnPendingPermissionChange(_, section_name)).Times(1);
- Json::Value root = GetPTU(update_file_name);
-
- // Get App Request Types from PTU
- PTU_request_types =
- root["policy_table"]["app_policies"][section_name]["RequestType"];
- PTU_request_types_size = PTU_request_types.size();
-
- PT_request_types.clear();
- // Get RequestTypes from <app_id> section of app policies after PT update
- PT_request_types = manager->GetAppRequestTypes(section_name);
- // Check sizes of Request types of PT and PTU
- ASSERT_EQ(PTU_request_types_size - invalid_rt_number,
- PT_request_types.size());
-
- ::policy::AppPermissions permissions =
- manager->GetAppPermissionsChanges(dev_id1, section_name);
- EXPECT_TRUE(permissions.requestTypeChanged);
- }
+TEST_F(PolicyManagerImplTest, InitPT_InitializationIsSuccessful_ReturnTrue) {
+ file_system::CreateDirectory(kAppStorageFolder);
+ EXPECT_CALL(*mock_cache_manager_,
+ Init(kSdlPreloadedPtJson, &policy_settings_))
+ .WillOnce(Return(true));
+ EXPECT_TRUE(policy_manager_->InitPT(kSdlPreloadedPtJson, &policy_settings_));
+ file_system::RemoveDirectory(kAppStorageFolder, true);
+}
- std::vector<policy_table::RequestType> PushRequestTypesToContainer(
- const std::vector<std::string>& temp_result) {
- policy_table::RequestType filtered_result;
- std::vector<policy_table::RequestType> final_result;
- for (uint32_t i = 0; i < temp_result.size(); ++i) {
- if (policy_table::EnumFromJsonString(temp_result[i], &filtered_result)) {
- final_result.push_back(filtered_result);
- }
- }
- return final_result;
- }
+TEST_F(PolicyManagerImplTest, ResetPT_NoRefreshRetrySequence_ReturnFalse) {
+ EXPECT_CALL(*mock_cache_manager_, ResetCalculatedPermissions());
+ EXPECT_CALL(*mock_cache_manager_, ResetPT(kSdlPreloadedPtJson))
+ .WillOnce(Return(false));
+ EXPECT_CALL(*mock_cache_manager_, TimeoutResponse()).Times(0);
+ EXPECT_CALL(*mock_cache_manager_, SecondsBetweenRetries(_)).Times(0);
- void CheckResultForValidRT() {
- // Convert Json Array to std::vector<std::string>
- const std::vector<std::string>& result =
- JsonToVectorString(PTU_request_types);
- // Checks
- SortAndCheckEquality(PT_request_types, result);
- }
+ EXPECT_FALSE(policy_manager_->ResetPT(kSdlPreloadedPtJson));
+}
- void CheckResultForInvalidRT() {
- // Convert Json Array to std::vector<std::string>
- const std::vector<std::string>& temp_result =
- JsonToVectorString(PTU_request_types);
- std::vector<policy_table::RequestType> result1 =
- PushRequestTypesToContainer(temp_result);
- std::vector<policy_table::RequestType> result2 =
- PushRequestTypesToContainer(PT_request_types);
- // Checks
- SortAndCheckEquality(result1, result2);
- }
- void FillMultimapFromFunctionalGroupings(
- UserConsentPromptToRpcsConnections& input_multimap,
- policy_table::FunctionalGroupings& fg_table) {
- policy_table::FunctionalGroupings::iterator fg_itter = fg_table.begin();
- const policy_table::FunctionalGroupings::iterator fg_itter_end =
- fg_table.end();
- for (; fg_itter != fg_itter_end; ++fg_itter) {
- // RPCS getting
- policy_table::Rpcs& rpcs_ref = fg_itter->second;
- // User_consent_prompt getting
- rpc::Optional<rpc::String<1, 255> >& optional_ref =
- rpcs_ref.user_consent_prompt;
- rpc::String<1, 255>& ucp_string = *optional_ref;
- const std::string& ucp_std_string =
- static_cast<const std::string&>(ucp_string);
- // Multimap inserting
- input_multimap.insert(std::pair<std::string, policy_table::Rpcs&>(
- ucp_std_string, rpcs_ref));
- }
- }
+TEST_F(PolicyManagerImplTest, ResetPT_ExecuteRefreshRetrySequence_ReturnTrue) {
+ EXPECT_CALL(*mock_cache_manager_, ResetCalculatedPermissions());
+ EXPECT_CALL(*mock_cache_manager_, ResetPT(kSdlPreloadedPtJson))
+ .WillOnce(Return(true));
+ EXPECT_CALL(*mock_cache_manager_, TimeoutResponse());
+ EXPECT_CALL(*mock_cache_manager_, SecondsBetweenRetries(_));
- void GetFunctionalGroupingsFromManager(
- policy_table::FunctionalGroupings& input_functional_groupings) {
- // Get cache
- ::policy::CacheManagerInterfaceSPtr cache = manager->GetCache();
- // Get table_snapshot
- std::shared_ptr<policy_table::Table> table = cache->GenerateSnapshot();
- // Set functional groupings from policy table
- input_functional_groupings = table->policy_table.functional_groupings;
- }
+ EXPECT_TRUE(policy_manager_->ResetPT(kSdlPreloadedPtJson));
+}
- void TearDown() OVERRIDE {
- delete manager;
- file_system::remove_directory_content(kAppStorageFolder);
- file_system::RemoveDirectory(kAppStorageFolder, true);
- }
-};
+TEST_F(PolicyManagerImplTest,
+ AppNeedEncryption_EncryptionNotRequired_ReturnFalse) {
+ EncryptionRequired encryption_required;
+ *encryption_required = false;
+ EXPECT_CALL(*mock_cache_manager_, GetAppEncryptionRequiredFlag(kValidAppId))
+ .WillOnce(Return(encryption_required));
-Json::Value CreatePTforLoad() {
- const std::string load_table(
- "{"
- "\"policy_table\": {"
- "\"module_config\": {"
- "\"preloaded_pt\": true,"
- "\"exchange_after_x_ignition_cycles\": 10,"
- "\"exchange_after_x_kilometers\": 100,"
- "\"exchange_after_x_days\": 5,"
- "\"timeout_after_x_seconds\": 500,"
- "\"seconds_between_retries\": [10, 20, 30],"
- "\"endpoints\": {"
- "\"0x00\": {"
- "\"default\": [\"http://ford.com/cloud/default\"]"
- "}"
- "},"
- "\"notifications_per_minute_by_priority\": {"
- "\"EMERGENCY\": 1,"
- "\"NAVIGATION\": 2,"
- "\"VOICECOM\": 3,"
- "\"COMMUNICATION\": 4,"
- "\"NORMAL\": 5,"
- "\"NONE\": 6"
- "},"
- "\"vehicle_make\" : \"MakeT\","
- "\"vehicle_model\" : \"ModelT\","
- "\"vehicle_year\": \"2014\""
- "},"
- "\"app_policies\": {"
- "\"default\": {"
- "\"memory_kb\": 50,"
- "\"heart_beat_timeout_ms\": 100,"
- "\"groups\": [\"default\"],"
- "\"keep_context\": true,"
- "\"steal_focus\": true,"
- "\"priority\": \"EMERGENCY\","
- "\"default_hmi\": \"FULL\","
- "\"certificate\": \"sign\""
- "}, "
- "\"pre_DataConsent\": {"
- "\"memory_kb\": 50,"
- "\"heart_beat_timeout_ms\": 100,"
- "\"groups\": [\"default\"],"
- "\"keep_context\": true,"
- "\"steal_focus\": true,"
- "\"priority\": \"EMERGENCY\","
- "\"default_hmi\": \"FULL\","
- "\"certificate\": \"sign\""
- "}, "
- "\"device\": {"
- "\"memory_kb\": 50,"
- "\"heart_beat_timeout_ms\": 100,"
- "\"groups\": [\"default\"],"
- "\"keep_context\": true,"
- "\"steal_focus\": true,"
- "\"priority\": \"EMERGENCY\","
- "\"default_hmi\": \"FULL\","
- "\"certificate\": \"sign\""
- "},"
- "\"1234\": {"
- "\"memory_kb\": 50,"
- "\"heart_beat_timeout_ms\": 100,"
- "\"groups\": [\"default\"],"
- "\"keep_context\": true,"
- "\"steal_focus\": true,"
- "\"priority\": \"EMERGENCY\","
- "\"default_hmi\": \"FULL\","
- "\"certificate\": \"sign\""
- "}"
- "},"
- "\"consumer_friendly_messages\": {"
- "\"version\": \"1.2\""
- "},"
- "\"functional_groupings\": {"
- "\"default\": {"
- "\"rpcs\": {"
- "\"Update\": {"
- "\"hmi_levels\": [\"FULL\"],"
- "\"parameters\" : [\"speed\"]"
- "}"
- "}"
- "}"
- "}"
- "}"
- "}");
- Json::Value table(Json::objectValue);
- utils::JsonReader reader;
-
- EXPECT_TRUE(reader.parse(load_table, &table));
- return table;
+ EXPECT_FALSE(policy_manager_->AppNeedEncryption(kValidAppId));
}
-TEST_F(PolicyManagerImplTest, GetNotificationsNumber) {
- const std::string priority = "EMERGENCY";
- const uint32_t notif_number = 100u;
- EXPECT_CALL(*cache_manager, GetNotificationsNumber(priority))
- .WillOnce(Return(notif_number));
+TEST_F(PolicyManagerImplTest,
+ AppNeedEncryption_EncryptionNotInitialized_ReturnTrue) {
+ EncryptionRequired encryption_required;
+ EXPECT_CALL(*mock_cache_manager_, GetAppEncryptionRequiredFlag(kValidAppId))
+ .WillOnce(Return(encryption_required));
- EXPECT_EQ(notif_number, manager->GetNotificationsNumber(priority));
+ EXPECT_TRUE(policy_manager_->AppNeedEncryption(kValidAppId));
}
-TEST_F(PolicyManagerImplTest2, GetNotificationsNumberAfterPTUpdate) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- Json::Value table = CreatePTforLoad();
- manager->ForcePTExchange();
- manager->SetSendOnUpdateSentOut(false);
- manager->OnUpdateStarted();
- policy_table::Table update(&table);
- update.SetPolicyTableType(rpc::policy_table_interface_base::PT_UPDATE);
- // Act
- const std::string json = table.toStyledString();
- ::policy::BinaryMessage msg(json.begin(), json.end());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- manager->LoadPT("file_pt_update.json", msg));
-
- EXPECT_CALL(listener, OnUpdateStatusChanged(_));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-
- std::string priority = "EMERGENCY";
- uint32_t notif_number = manager->GetNotificationsNumber(priority);
- EXPECT_EQ(1u, notif_number);
-
- priority = "NAVIGATION";
- notif_number = manager->GetNotificationsNumber(priority);
- EXPECT_EQ(2u, notif_number);
-
- priority = "EMERGENCY";
- notif_number = manager->GetNotificationsNumber(priority);
- EXPECT_EQ(1u, notif_number);
-
- priority = "VOICECOM";
- notif_number = manager->GetNotificationsNumber(priority);
- EXPECT_EQ(3u, notif_number);
-
- priority = "NORMAL";
- notif_number = manager->GetNotificationsNumber(priority);
- EXPECT_EQ(5u, notif_number);
-
- priority = "NONE";
- notif_number = manager->GetNotificationsNumber(priority);
- EXPECT_EQ(6u, notif_number);
+TEST_F(PolicyManagerImplTest,
+ FunctionGroupNeedEncryption_NoGroups_ReturnFalse) {
+ EXPECT_CALL(*mock_cache_manager_, GetFunctionalGroupings(_));
+ const std::string absent_group("Base-6");
+
+ EXPECT_FALSE(policy_manager_->FunctionGroupNeedEncryption(absent_group));
}
-TEST_F(PolicyManagerImplTest2, IsAppRevoked_SetRevokedAppID_ExpectAppRevoked) {
- CreateLocalPT("sdl_preloaded_pt.json");
- // Arrange
- std::ifstream ifile("sdl_preloaded_pt.json");
- Json::CharReaderBuilder reader_builder;
- std::string json;
- Json::Value root(Json::objectValue);
- if (ifile.is_open() &&
- Json::parseFromStream(reader_builder, ifile, &root, nullptr)) {
- root["policy_table"]["app_policies"][app_id1] = Json::nullValue;
- json = root.toStyledString();
- }
- ifile.close();
+TEST_F(PolicyManagerImplTest,
+ CheckPermissions_AppNotRepresented_ReturnRpcAllowed) {
+ const std::string hmi_level = "NONE";
+ const std::string rpc = "OnHMIStatus";
+ const RPCParams params;
+ CheckPermissionResult result;
- ::policy::BinaryMessage msg(json.begin(), json.end());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- manager->LoadPT("file_pt_update.json", msg));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
+ EXPECT_CALL(*mock_cache_manager_, IsApplicationRepresented(kValidAppId))
+ .WillOnce(Return(false));
- EXPECT_TRUE(manager->IsApplicationRevoked(app_id1));
+ policy_manager_->CheckPermissions(
+ kDeviceNumber, kValidAppId, hmi_level, rpc, params, result);
+ EXPECT_EQ(kRpcDisallowed, result.hmi_level_permitted);
}
-TEST_F(PolicyManagerImplTest2,
- CheckPermissions_SetRevokedAppID_ExpectRPCDisallowed) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- (manager->GetCache())->AddDevice(dev_id1, "Bluetooth");
- (manager->GetCache())
- ->SetDeviceData(dev_id1,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth");
- EXPECT_CALL(listener, OnCurrentDeviceIdUpdateRequired(_, app_id1))
- .WillRepeatedly(Return(dev_id1));
- manager->SetUserConsentForDevice(dev_id1, true);
- // Add app from consented device. App will be assigned with default policies
- manager->AddApplication(
- dev_id1, app_id1, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_CALL(listener, GetDevicesIds(app_id1))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- // Check before action
- policy_table::RpcParameters rpc_parameters;
- rpc_parameters.hmi_levels.push_back(policy_table::HL_FULL);
-
- policy_table::Rpc rpc;
- rpc["Alert"] = rpc_parameters;
-
- ::policy::RPCParams input_params;
- ::policy::CheckPermissionResult output;
-
- manager->CheckPermissions(
- dev_id1, app_id1, std::string("FULL"), "Alert", input_params, output);
-
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- ASSERT_TRUE(output.list_of_allowed_params.empty());
- // Act
- std::ifstream ifile("sdl_preloaded_pt.json");
- Json::CharReaderBuilder reader_builder;
- std::string json;
- Json::Value root(Json::objectValue);
- if (ifile.is_open() &&
- Json::parseFromStream(reader_builder, ifile, &root, nullptr)) {
- root["policy_table"]["app_policies"][app_id1] = Json::nullValue;
- json = root.toStyledString();
- }
- ifile.close();
+TEST_F(PolicyManagerImplTest,
+ CheckPermissions_AppIsRemoteControlAndNotRevoked_ReturnkRpcDisallowed) {
+ const std::string hmi_level = "NONE";
+ const std::string rpc = "OnHMIStatus";
+ const RPCParams params;
+ CheckPermissionResult result;
+ Strings groups;
- ::policy::BinaryMessage msg(json.begin(), json.end());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- manager->LoadPT("file_pt_update.json", msg));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
+ ON_CALL(*mock_cache_manager_, IsApplicationRepresented(kValidAppId))
+ .WillByDefault(Return(true));
+ ON_CALL(*access_remote_, IsAppRemoteControl(_)).WillByDefault(Return(true));
+ ON_CALL(*access_remote_, GetGroups(_)).WillByDefault(ReturnRef(groups));
- manager->CheckPermissions(
- dev_id1, app_id1, std::string("FULL"), "Alert", input_params, output);
- // Check RPC is disallowed
- EXPECT_EQ(::policy::kRpcDisallowed, output.hmi_level_permitted);
- ASSERT_TRUE(output.list_of_allowed_params.empty());
+ policy_manager_->CheckPermissions(
+ kDeviceNumber, kValidAppId, hmi_level, rpc, params, result);
+ EXPECT_EQ(kRpcDisallowed, result.hmi_level_permitted);
}
-TEST_F(
- PolicyManagerImplTest2,
- CheckPermissions_PersistsWidgetAppPermissionsAfter_PTU_ExpectRPCAllowed) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- (manager->GetCache())->AddDevice(dev_id1, "Bluetooth");
- (manager->GetCache())
- ->SetDeviceData(dev_id1,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth");
- EXPECT_CALL(listener, OnCurrentDeviceIdUpdateRequired(_, app_id1))
- .WillRepeatedly(Return(dev_id1));
- manager->SetUserConsentForDevice(dev_id1, true);
- // Add app from consented device. App will be assigned with default policies
- manager->AddApplication(
- app_id1, app_id1, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_CALL(listener, GetDevicesIds(app_id1))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- // Act
- const char* const rpc_name = "CreateWindow";
- const char* const hmi_level = "NONE";
- const uint32_t group_number = 0;
- Json::Value root = AddWidgetSupportToPt("default", group_number);
- std::string json =
- AddWidgetSupportToFunctionalGroups(&root, rpc_name, hmi_level);
-
- ::policy::BinaryMessage msg(json.begin(), json.end());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- manager->LoadPT("file_pt_update.json", msg));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-
- ::policy::RPCParams input_params;
- ::policy::CheckPermissionResult output;
-
- manager->CheckPermissions(
- dev_id1, app_id1, hmi_level, rpc_name, input_params, output);
-
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- ASSERT_TRUE(output.list_of_allowed_params.empty());
- // Act
- json = AddWidgetSupportToPt(&root, app_id1, group_number);
- msg = BinaryMessage(json.begin(), json.end());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- manager->LoadPT("file_pt_update.json", msg));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-
- output.hmi_level_permitted = ::policy::kRpcDisallowed;
- manager->CheckPermissions(
- dev_id1, app_id1, hmi_level, rpc_name, input_params, output);
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- ASSERT_TRUE(output.list_of_allowed_params.empty());
-}
+TEST_F(PolicyManagerImplTest,
+ CheckPermissions_NotRemoteControlAppIsRevoked_ReturnkRpcAllowed) {
+ const std::string hmi_level = "NONE";
+ const std::string rpc = "OnHMIStatus";
+ const RPCParams params;
+ CheckPermissionResult result;
+ Strings groups;
-TEST_F(
- PolicyManagerImplTest2,
- CheckPermissions_AbsenceOfWidgetPermissionsAfter_PTU_ExpectRPCDisallowed) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- (manager->GetCache())->AddDevice(dev_id1, "Bluetooth");
- (manager->GetCache())
- ->SetDeviceData(dev_id1,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth");
- EXPECT_CALL(listener, OnCurrentDeviceIdUpdateRequired(_, app_id1))
- .WillRepeatedly(Return(dev_id1));
- manager->SetUserConsentForDevice(dev_id1, true);
- // Add app from consented device. App will be assigned with default policies
- manager->AddApplication(
- dev_id1, app_id1, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_CALL(listener, GetDevicesIds(app_id1))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- // Act
- const char* const rpc_name = "DeleteWindow";
- const char* const hmi_level = "NONE";
- const uint32_t group_number = 0;
- Json::Value root = AddWidgetSupportToPt("default", group_number);
- std::string json =
- AddWidgetSupportToFunctionalGroups(&root, rpc_name, hmi_level);
-
- ::policy::BinaryMessage msg(json.begin(), json.end());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- manager->LoadPT("file_pt_update.json", msg));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-
- ::policy::RPCParams input_params;
- ::policy::CheckPermissionResult output;
-
- manager->CheckPermissions(
- dev_id1, app_id1, hmi_level, rpc_name, input_params, output);
-
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- ASSERT_TRUE(output.list_of_allowed_params.empty());
- output.hmi_level_permitted = ::policy::kRpcDisallowed;
- // Act
- root["policy_table"]["app_policies"][app_id1]["groups"] =
- Json::Value(Json::arrayValue);
- root["policy_table"]["app_policies"][app_id1]["groups"][group_number] =
- Json::Value("Base-4");
- json = root.toStyledString();
- msg = BinaryMessage(json.begin(), json.end());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- manager->LoadPT("file_pt_update.json", msg));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-
- manager->CheckPermissions(
- dev_id1, app_id1, hmi_level, rpc_name, input_params, output);
- // Check RPC is disallowed
- EXPECT_EQ(::policy::kRpcDisallowed, output.hmi_level_permitted);
- ASSERT_TRUE(output.list_of_allowed_params.empty());
-}
+ ON_CALL(*mock_cache_manager_, IsApplicationRepresented(kValidAppId))
+ .WillByDefault(Return(true));
+ ON_CALL(*mock_cache_manager_, GetGroups(_)).WillByDefault(ReturnRef(groups));
+ ON_CALL(*mock_cache_manager_, IsApplicationRevoked(kValidAppId))
+ .WillByDefault(Return(true));
-TEST_F(PolicyManagerImplTest2,
- CheckPermissions_SetAppIDwithPolicies_ExpectRPCAllowed) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- manager->AddDevice(dev_id1, "Bluetooth");
-
- ASSERT_TRUE((manager->GetCache())
- ->SetDeviceData(dev_id1,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
- EXPECT_CALL(listener, OnCurrentDeviceIdUpdateRequired(_, "1234"))
- .WillRepeatedly(Return(dev_id1));
- manager->SetUserConsentForDevice(dev_id1, true);
- // Add app from consented device. App will be assigned with default policies
- manager->AddApplication(dev_id1, "1234", HmiTypes(policy_table::AHT_MEDIA));
- // Emulate PTU with new policies for app added above
- std::ifstream ifile("sdl_preloaded_pt.json");
- Json::CharReaderBuilder reader_builder;
- std::string json;
- Json::Value root(Json::objectValue);
- if (ifile.is_open() &&
- Json::parseFromStream(reader_builder, ifile, &root, nullptr)) {
- // Add AppID with policies
- root["policy_table"]["app_policies"]["1234"] =
- Json::Value(Json::objectValue);
- root["policy_table"]["app_policies"]["1234"]["memory_kb"] = Json::Value(50);
- root["policy_table"]["app_policies"]["1234"]["heart_beat_timeout_ms"] =
- Json::Value(100);
- root["policy_table"]["app_policies"]["1234"]["AppHMIType"] =
- Json::Value(Json::arrayValue);
- root["policy_table"]["app_policies"]["1234"]["AppHMIType"][0] =
- Json::Value("MEDIA");
- root["policy_table"]["app_policies"]["1234"]["groups"] =
- Json::Value(Json::arrayValue);
- root["policy_table"]["app_policies"]["1234"]["groups"][0] =
- Json::Value("Base-4");
- root["policy_table"]["app_policies"]["1234"]["priority"] =
- Json::Value("EMERGENCY");
- root["policy_table"]["app_policies"]["1234"]["default_hmi"] =
- Json::Value("FULL");
- root["policy_table"]["app_policies"]["1234"]["keep_context"] =
- Json::Value(true);
- root["policy_table"]["app_policies"]["1234"]["steal_focus"] =
- Json::Value(true);
- root["policy_table"]["app_policies"]["1234"]["certificate"] =
- Json::Value("sign");
- json = root.toStyledString();
- }
- ifile.close();
+ policy_manager_->CheckPermissions(
+ kDeviceNumber, kValidAppId, hmi_level, rpc, params, result);
- ::policy::BinaryMessage msg(json.begin(), json.end());
- // Load Json to cache
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- manager->LoadPT("file_pt_update.json", msg));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-
- policy_table::RpcParameters rpc_parameters;
- rpc_parameters.hmi_levels.push_back(policy_table::HL_FULL);
-
- policy_table::Rpc rpc;
- rpc["Alert"] = rpc_parameters;
- ::policy::RPCParams input_params;
- ::policy::CheckPermissionResult output;
-
- (manager->GetCache())->AddDevice(dev_id1, "Bluetooth");
- (manager->GetCache())
- ->SetDeviceData(dev_id1,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth");
- manager->CheckPermissions(dev_id1,
- std::string("1234"),
- std::string("FULL"),
- "Alert",
- input_params,
- output);
- // Check RPC is allowed
- EXPECT_EQ(::policy::kRpcAllowed, output.hmi_level_permitted);
- // Check list of parameters empty
- ASSERT_TRUE(output.list_of_allowed_params.empty());
+ EXPECT_EQ(kRpcAllowed, result.hmi_level_permitted);
}
-TEST_F(PolicyManagerImplTest, IncrementGlobalCounter) {
- // Assert
- EXPECT_CALL(*cache_manager, Increment(usage_statistics::SYNC_REBOOTS));
- manager->Increment(usage_statistics::SYNC_REBOOTS);
-}
+TEST_F(PolicyManagerImplTest,
+ CheckPermissions_NotRemoteControlAppIsRevoked_ReturnkRpcDisallowed) {
+ const std::string hmi_level = "FULL";
+ const std::string rpc = "OnHMIStatus";
+ const RPCParams params;
+ CheckPermissionResult result;
+ Strings groups;
-TEST_F(PolicyManagerImplTest, IncrementAppCounter) {
- // Assert
- EXPECT_CALL(*cache_manager,
- Increment("12345", usage_statistics::USER_SELECTIONS));
- manager->Increment("12345", usage_statistics::USER_SELECTIONS);
-}
+ ON_CALL(*mock_cache_manager_, IsApplicationRepresented(kValidAppId))
+ .WillByDefault(Return(true));
+ ON_CALL(*mock_cache_manager_, GetGroups(_)).WillByDefault(ReturnRef(groups));
+ ON_CALL(*mock_cache_manager_, IsApplicationRevoked(kValidAppId))
+ .WillByDefault(Return(true));
-TEST_F(PolicyManagerImplTest, SetAppInfo) {
- // Assert
- EXPECT_CALL(*cache_manager,
- Set("12345", usage_statistics::LANGUAGE_GUI, "de-de"));
- manager->Set("12345", usage_statistics::LANGUAGE_GUI, "de-de");
-}
+ policy_manager_->CheckPermissions(
+ kDeviceNumber, kValidAppId, hmi_level, rpc, params, result);
-TEST_F(PolicyManagerImplTest, AddAppStopwatch) {
- // Assert
- EXPECT_CALL(*cache_manager,
- Add("12345", usage_statistics::SECONDS_HMI_FULL, 30));
- manager->Add("12345", usage_statistics::SECONDS_HMI_FULL, 30);
+ EXPECT_EQ(kRpcDisallowed, result.hmi_level_permitted);
}
-TEST_F(PolicyManagerImplTest, ResetPT) {
- EXPECT_CALL(*cache_manager, ResetPT("filename"))
- .WillOnce(Return(true))
+TEST_F(
+ PolicyManagerImplTest,
+ GetPermissionsForApp_CannotGetPermissionsForRemoteDefaultApp_GetEmptyVector) {
+ std::vector<FunctionalGroupPermission> permissions;
+
+ ON_CALL(*mock_cache_manager_, IsDefaultPolicy(kValidAppId))
+ .WillByDefault(Return(true));
+ ON_CALL(*access_remote_, IsAppRemoteControl(_)).WillByDefault(Return(true));
+ EXPECT_CALL(*access_remote_,
+ GetPermissionsForApp(kDeviceNumber, kValidAppId, _))
.WillOnce(Return(false));
- EXPECT_CALL(*cache_manager, ResetCalculatedPermissions()).Times(AtLeast(1));
- EXPECT_CALL(*cache_manager, TimeoutResponse());
- EXPECT_CALL(*cache_manager, SecondsBetweenRetries(_));
- EXPECT_TRUE(manager->ResetPT("filename"));
- EXPECT_FALSE(manager->ResetPT("filename"));
+ policy_manager_->GetPermissionsForApp(
+ kDeviceNumber, kValidAppId, permissions);
+ EXPECT_TRUE(permissions.empty());
}
-TEST_F(PolicyManagerImplTest, LoadPT_SetPT_PTIsLoaded) {
- // Arrange
- EXPECT_CALL(*cache_manager, GenerateSnapshot())
- .WillOnce(Return(default_pt_snapshot_));
- manager->ForcePTExchange();
- manager->OnUpdateStarted();
- Json::Value table = CreatePTforLoad();
- policy_table::Table update(&table);
- update.SetPolicyTableType(rpc::policy_table_interface_base::PT_UPDATE);
-
- // Assert
- ASSERT_TRUE(IsValid(update));
+TEST_F(
+ PolicyManagerImplTest,
+ GetPermissionsForApp_CannotGetFunctionalGroupsNamesForNotRemotePredataApp_GetEmptyVector) {
+ std::vector<FunctionalGroupPermission> permissions;
+
+ ON_CALL(*mock_cache_manager_, IsPredataPolicy(kValidAppId))
+ .WillByDefault(Return(true));
+ ON_CALL(*mock_cache_manager_,
+ GetPermissionsForApp(kDeviceNumber, kPreDataConsentId, _))
+ .WillByDefault(Return(true));
+ EXPECT_CALL(*mock_cache_manager_, GetFunctionalGroupNames(_))
+ .WillOnce(Return(false));
- EXPECT_CALL(*cache_manager, GetHMIAppTypeAfterUpdate(_)).Times(AtLeast(1));
-
- // Act
- const std::string json = table.toStyledString();
- ::policy::BinaryMessage msg(json.begin(), json.end());
-
- std::shared_ptr<policy_table::Table> snapshot =
- std::make_shared<policy_table::Table>(update.policy_table);
- // Assert
- EXPECT_CALL(*cache_manager, GenerateSnapshot()).WillOnce(Return(snapshot));
- EXPECT_CALL(*cache_manager, GetVehicleDataItems())
- .WillOnce(Return(std::vector<policy_table::VehicleDataItem>()));
- EXPECT_CALL(*cache_manager, ApplyUpdate(_)).WillOnce(Return(true));
- EXPECT_CALL(listener, GetDevicesIds("1234"))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- EXPECT_CALL(*cache_manager, SaveUpdateRequired(false));
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- manager->LoadPT("file_pt_update.json", msg));
-
- EXPECT_CALL(*cache_manager, TimeoutResponse());
- EXPECT_CALL(*cache_manager, SecondsBetweenRetries(_));
- EXPECT_CALL(listener, OnUpdateStatusChanged(_));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
+ policy_manager_->GetPermissionsForApp(
+ kDeviceNumber, kValidAppId, permissions);
+ EXPECT_TRUE(permissions.empty());
}
-TEST_F(PolicyManagerImplTest, LoadPT_FunctionalGroup_removeRPC_SendUpdate) {
- // Arrange
- EXPECT_CALL(*cache_manager, GenerateSnapshot())
- .WillOnce(Return(default_pt_snapshot_));
- manager->ForcePTExchange();
- manager->OnUpdateStarted();
- Json::Value table = CreatePTforLoad();
- policy_table::Table update(&table);
+TEST_F(PolicyManagerImplTest, LoadPT_InvalidPT_ReturnkWrongPtReceived) {
+ std::vector<policy_table::VehicleDataItem> vehicle_items;
- PrepareUpdateWithFunctionalGroupingContent(update);
+ std::ifstream ifile(kSdlPreloadedPtJson);
+ ASSERT_TRUE(ifile.good());
- std::shared_ptr<policy_table::Table> snapshot =
- std::make_shared<policy_table::Table>(update.policy_table);
-
- const auto& fg_found =
- update.policy_table.functional_groupings.find("TestGroup1");
- fg_found->second.rpcs.erase("GetVehicleData");
-
- ASSERT_TRUE(IsValid(update));
+ Json::CharReaderBuilder reader_builder;
+ Json::Value root(Json::objectValue);
+ Json::parseFromStream(reader_builder, ifile, &root, nullptr);
+ root["policy_table"].removeMember("app_policies");
+ ifile.close();
+ policy_table::Table update(&root);
+ update.SetPolicyTableType(policy_table::PT_UPDATE);
- const std::string json = update.ToJsonValue().toStyledString();
- ::policy::BinaryMessage msg(json.begin(), json.end());
+ ASSERT_FALSE(IsValid(update));
- // Assert
- EXPECT_CALL(*cache_manager, GetVehicleDataItems())
- .WillOnce(Return(std::vector<policy_table::VehicleDataItem>()));
- EXPECT_CALL(*cache_manager, GenerateSnapshot())
- .WillRepeatedly(Return(snapshot));
- EXPECT_CALL(*cache_manager, ApplyUpdate(_)).WillOnce(Return(true));
- ExpectOnPermissionsUpdated();
+ std::string json = root.toStyledString();
+ BinaryMessage msg(json.begin(), json.end());
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- manager->LoadPT("file_pt_update.json", msg));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
+ EXPECT_CALL(*mock_cache_manager_, GetVehicleDataItems())
+ .WillOnce(Return(vehicle_items));
+ EXPECT_CALL(*mock_cache_manager_, SaveUpdateRequired(false)).Times(0);
+ EXPECT_EQ(PolicyManager::PtProcessingResult::kWrongPtReceived,
+ policy_manager_->LoadPT(kInValidFilename, msg));
}
TEST_F(PolicyManagerImplTest,
- LoadPT_FunctionalGroup_removeRPCParams_SendUpdate) {
- // Arrange
- EXPECT_CALL(*cache_manager, GenerateSnapshot())
- .WillOnce(Return(default_pt_snapshot_));
- manager->ForcePTExchange();
- manager->OnUpdateStarted();
- Json::Value table = CreatePTforLoad();
- policy_table::Table update(&table);
-
- PrepareUpdateWithFunctionalGroupingContent(update);
-
- std::shared_ptr<policy_table::Table> snapshot =
- std::make_shared<policy_table::Table>(update.policy_table);
-
- const auto& fg_found =
- update.policy_table.functional_groupings.find("TestGroup1");
- policy_table::RpcParameters& new_rpc_params =
- fg_found->second.rpcs["GetVehicleData"];
- new_rpc_params.parameters->erase(new_rpc_params.parameters->begin());
+ LoadPT_SnapshotNotGenerated_ReturnkNewPtRequired) {
+ std::vector<policy_table::VehicleDataItem> vehicle_items;
- ASSERT_TRUE(IsValid(update));
-
- const std::string json = update.ToJsonValue().toStyledString();
- ::policy::BinaryMessage msg(json.begin(), json.end());
+ std::ifstream ifile(kSdlPreloadedPtJson);
+ ASSERT_TRUE(ifile.good());
- // Assert
- EXPECT_CALL(*cache_manager, GenerateSnapshot())
- .WillRepeatedly(Return(snapshot));
- EXPECT_CALL(*cache_manager, GetVehicleDataItems())
- .WillOnce(Return(std::vector<policy_table::VehicleDataItem>()));
- EXPECT_CALL(*cache_manager, ApplyUpdate(_)).WillOnce(Return(true));
- ExpectOnPermissionsUpdated();
-
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- manager->LoadPT("file_pt_update.json", msg));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-}
+ Json::CharReaderBuilder reader_builder;
+ Json::Value root(Json::objectValue);
+ Json::parseFromStream(reader_builder, ifile, &root, nullptr);
+ ifile.close();
+ policy_table::Table update(&root);
-TEST_F(PolicyManagerImplTest,
- LoadPT_FunctionalGroup_removeRPC_HMILevels_SendUpdate) {
- // Arrange
- EXPECT_CALL(*cache_manager, GenerateSnapshot())
- .WillOnce(Return(default_pt_snapshot_));
- manager->ForcePTExchange();
- manager->OnUpdateStarted();
- Json::Value table = CreatePTforLoad();
- policy_table::Table update(&table);
-
- PrepareUpdateWithFunctionalGroupingContent(update);
-
- std::shared_ptr<policy_table::Table> snapshot =
- std::make_shared<policy_table::Table>(update.policy_table);
-
- const auto& fg_found =
- update.policy_table.functional_groupings.find("TestGroup1");
- policy_table::RpcParameters& new_rpc_params =
- fg_found->second.rpcs["GetVehicleData"];
- new_rpc_params.hmi_levels.erase(new_rpc_params.hmi_levels.begin());
+ update.SetPolicyTableType(policy_table::PT_UPDATE);
ASSERT_TRUE(IsValid(update));
- const std::string json = update.ToJsonValue().toStyledString();
- ::policy::BinaryMessage msg(json.begin(), json.end());
+ std::string json = root.toStyledString();
+ BinaryMessage msg(json.begin(), json.end());
- // Assert
- EXPECT_CALL(*cache_manager, GenerateSnapshot())
- .WillRepeatedly(Return(snapshot));
- EXPECT_CALL(*cache_manager, GetVehicleDataItems())
- .WillOnce(Return(std::vector<policy_table::VehicleDataItem>()));
- EXPECT_CALL(*cache_manager, ApplyUpdate(_)).WillOnce(Return(true));
- ExpectOnPermissionsUpdated();
-
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- manager->LoadPT("file_pt_update.json", msg));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
+ EXPECT_CALL(*mock_cache_manager_, GetVehicleDataItems())
+ .WillOnce(Return(vehicle_items));
+ EXPECT_CALL(*mock_cache_manager_, GenerateSnapshot())
+ .WillOnce(Return(nullptr));
+ EXPECT_EQ(PolicyManager::PtProcessingResult::kNewPtRequired,
+ policy_manager_->LoadPT(kInValidFilename, msg));
}
-TEST_F(PolicyManagerImplTest,
- LoadPT_FunctionalGroup_addRPC_HMILevels_SendUpdate) {
- // Arrange
- EXPECT_CALL(*cache_manager, GenerateSnapshot())
- .WillOnce(Return(default_pt_snapshot_));
- manager->ForcePTExchange();
- manager->OnUpdateStarted();
- Json::Value table = CreatePTforLoad();
- policy_table::Table update(&table);
-
- PrepareUpdateWithFunctionalGroupingContent(update);
-
- std::shared_ptr<policy_table::Table> snapshot =
- std::make_shared<policy_table::Table>(update.policy_table);
-
- const auto& fg_found =
- update.policy_table.functional_groupings.find("TestGroup1");
- policy_table::RpcParameters& new_rpc_params =
- fg_found->second.rpcs["GetVehicleData"];
- new_rpc_params.hmi_levels.push_back(
- rpc::policy_table_interface_base::HmiLevel::HL_LIMITED);
+TEST_F(PolicyManagerImplTest, LoadPT_UpdateNotApplied_ReturnkNewPtRequired) {
+ std::vector<policy_table::VehicleDataItem> vehicle_items;
+ std::ifstream ifile(kSdlPreloadedPtJson);
+ ASSERT_TRUE(ifile.good());
- ASSERT_TRUE(IsValid(update));
+ Json::CharReaderBuilder reader_builder;
+ Json::Value root(Json::objectValue);
+ Json::parseFromStream(reader_builder, ifile, &root, nullptr);
+ ifile.close();
+ policy_table::Table update(&root);
- const std::string json = update.ToJsonValue().toStyledString();
- ::policy::BinaryMessage msg(json.begin(), json.end());
+ update.SetPolicyTableType(policy_table::PT_UPDATE);
- // Assert
- EXPECT_CALL(*cache_manager, GenerateSnapshot())
- .WillRepeatedly(Return(snapshot));
- EXPECT_CALL(*cache_manager, GetVehicleDataItems())
- .WillOnce(Return(std::vector<policy_table::VehicleDataItem>()));
- EXPECT_CALL(*cache_manager, ApplyUpdate(_)).WillOnce(Return(true));
- ExpectOnPermissionsUpdated();
+ ASSERT_TRUE(IsValid(update));
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- manager->LoadPT("file_pt_update.json", msg));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
-}
+ std::string json = root.toStyledString();
+ BinaryMessage msg(json.begin(), json.end());
-TEST_F(PolicyManagerImplTest, LoadPT_FunctionalGroup_addRPCParams_SendUpdate) {
- using namespace application_manager;
- // Arrange
- EXPECT_CALL(*cache_manager, GenerateSnapshot())
- .WillOnce(Return(default_pt_snapshot_));
- manager->ForcePTExchange();
- manager->OnUpdateStarted();
- Json::Value table = CreatePTforLoad();
- policy_table::Table update(&table);
+ EXPECT_CALL(*mock_cache_manager_, GetVehicleDataItems())
+ .WillOnce(Return(vehicle_items));
+ EXPECT_CALL(*mock_cache_manager_, GenerateSnapshot())
+ .WillOnce(Return(std::make_shared<policy_table::Table>(update)));
+ EXPECT_CALL(*mock_cache_manager_, ApplyUpdate(_)).WillOnce(Return(false));
+ EXPECT_EQ(PolicyManager::PtProcessingResult::kNewPtRequired,
+ policy_manager_->LoadPT(kInValidFilename, msg));
+}
+TEST_F(PolicyManagerImplTest, LoadPT_NoHMIAppTypes_ReturnkSuccess) {
+ std::vector<policy_table::VehicleDataItem> vehicle_items;
- PrepareUpdateWithFunctionalGroupingContent(update);
+ std::ifstream ifile(kSdlPreloadedPtJson);
+ ASSERT_TRUE(ifile.good());
- std::shared_ptr<policy_table::Table> snapshot =
- std::make_shared<policy_table::Table>(update.policy_table);
+ Json::CharReaderBuilder reader_builder;
+ Json::Value root(Json::objectValue);
+ Json::parseFromStream(reader_builder, ifile, &root, nullptr);
+ ifile.close();
+ policy_table::Table update(&root);
- const auto& fg_found =
- update.policy_table.functional_groupings.find("TestGroup1");
- policy_table::RpcParameters& new_rpc_params =
- fg_found->second.rpcs["GetVehicleData"];
- (*new_rpc_params.parameters).push_back(kFuelLevel);
+ update.SetPolicyTableType(policy_table::PT_UPDATE);
ASSERT_TRUE(IsValid(update));
- const std::string json = update.ToJsonValue().toStyledString();
- ::policy::BinaryMessage msg(json.begin(), json.end());
+ std::string json = root.toStyledString();
+ BinaryMessage msg(json.begin(), json.end());
- // Assert
- EXPECT_CALL(*cache_manager, GenerateSnapshot())
- .WillRepeatedly(Return(snapshot));
- EXPECT_CALL(*cache_manager, GetVehicleDataItems())
- .WillOnce(Return(std::vector<policy_table::VehicleDataItem>()));
- EXPECT_CALL(*cache_manager, ApplyUpdate(_)).WillOnce(Return(true));
- ExpectOnPermissionsUpdated();
+ ON_CALL(*mock_cache_manager_, GetVehicleDataItems())
+ .WillByDefault(Return(vehicle_items));
+ ON_CALL(*mock_cache_manager_, GenerateSnapshot())
+ .WillByDefault(Return(std::make_shared<policy_table::Table>(update)));
+ ON_CALL(*mock_cache_manager_, ApplyUpdate(_)).WillByDefault(Return(true));
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- manager->LoadPT("file_pt_update.json", msg));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
+ EXPECT_EQ(PolicyManager::PtProcessingResult::kSuccess,
+ policy_manager_->LoadPT(kInValidFilename, msg));
}
-TEST_F(PolicyManagerImplTest, LoadPT_FunctionalGroup_NoUpdate_DONT_SendUpdate) {
- // Arrange
- EXPECT_CALL(*cache_manager, GenerateSnapshot())
- .WillOnce(Return(default_pt_snapshot_));
- manager->ForcePTExchange();
- manager->OnUpdateStarted();
- Json::Value table = CreatePTforLoad();
- policy_table::Table update(&table);
-
- PrepareUpdateWithFunctionalGroupingContent(update);
-
- std::shared_ptr<policy_table::Table> snapshot =
- std::make_shared<policy_table::Table>(update.policy_table);
-
- ASSERT_TRUE(IsValid(update));
+TEST_F(PolicyManagerImplTest,
+ AddApplication_NewApplication_ReturnCallStatusChanges) {
+ AppHmiTypes hmi_types;
- const std::string json = update.ToJsonValue().toStyledString();
- ::policy::BinaryMessage msg(json.begin(), json.end());
+ ON_CALL(*mock_cache_manager_, IsApplicationRepresented(kValidAppId))
+ .WillByDefault(Return(false));
- // Assert
- EXPECT_CALL(*cache_manager, GenerateSnapshot())
- .WillRepeatedly(Return(snapshot));
- EXPECT_CALL(*cache_manager, GetVehicleDataItems())
- .WillOnce(Return(std::vector<policy_table::VehicleDataItem>()));
- EXPECT_CALL(*cache_manager, ApplyUpdate(_)).WillOnce(Return(true));
+ EXPECT_CALL(*mock_cache_manager_, IsPredataPolicy(kValidAppId)).Times(0);
- ASSERT_EQ(PolicyManager::PtProcessingResult::kSuccess,
- manager->LoadPT("file_pt_update.json", msg));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
+ policy_manager_->AddApplication(kDeviceNumber, kValidAppId, hmi_types);
}
-TEST_F(PolicyManagerImplTest, LoadPT_SetInvalidUpdatePT_PTIsNotLoaded) {
- // Arrange
- Json::Value table(Json::objectValue);
- EXPECT_CALL(*cache_manager, GenerateSnapshot())
- .WillOnce(Return(default_pt_snapshot_));
- manager->ForcePTExchange();
- manager->OnUpdateStarted();
-
- policy_table::Table update(&table);
- update.SetPolicyTableType(rpc::policy_table_interface_base::PT_UPDATE);
+TEST_F(PolicyManagerImplTest,
+ AddApplication_ExistedApplication_ReturnCallNothing) {
+ AppHmiTypes hmi_types;
- // Assert update is invalid
- ASSERT_FALSE(IsValid(update));
+ ON_CALL(*mock_cache_manager_, IsApplicationRepresented(kValidAppId))
+ .WillByDefault(Return(true));
- // Act
- std::string json = table.toStyledString();
- ::policy::BinaryMessage msg(json.begin(), json.end());
-
- std::shared_ptr<policy_table::Table> snapshot =
- std::make_shared<policy_table::Table>(update.policy_table);
- ON_CALL(*cache_manager, GenerateSnapshot()).WillByDefault(Return(snapshot));
- ON_CALL(*cache_manager, GetVehicleDataItems())
- .WillByDefault(Return(std::vector<policy_table::VehicleDataItem>()));
-
- // Assert
- EXPECT_CALL(*cache_manager, ApplyUpdate(_)).Times(0);
- EXPECT_CALL(listener, GetAppName(_)).Times(0);
- EXPECT_CALL(*cache_manager, SaveUpdateRequired(false)).Times(0);
- EXPECT_CALL(*cache_manager, TimeoutResponse()).Times(0);
- EXPECT_CALL(*cache_manager, SecondsBetweenRetries(_)).Times(0);
- ASSERT_EQ(PolicyManager::PtProcessingResult::kWrongPtReceived,
- manager->LoadPT("file_pt_update.json", msg));
-
- EXPECT_CALL(listener, OnUpdateStatusChanged(_));
- manager->OnPTUFinished(PolicyManager::PtProcessingResult::kWrongPtReceived);
-}
+ EXPECT_CALL(*mock_cache_manager_, IsPredataPolicy(kValidAppId))
+ .WillOnce(Return(true));
-TEST_F(PolicyManagerImplTest2,
- KmsChanged_SetExceededKms_ExpectCorrectSchedule) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- ::policy::Counters counter = ::policy::Counters::KILOMETERS;
- manager->PTUpdatedAt(counter, 50000);
- EXPECT_EQ("UP_TO_DATE", manager->GetPolicyTableStatus());
- // Set kms changed but not exceed limit
- manager->KmsChanged(51500);
- EXPECT_EQ("UP_TO_DATE", manager->GetPolicyTableStatus());
- // Set kms changed and exceed limit
- manager->KmsChanged(52500);
- EXPECT_EQ("UPDATE_NEEDED", manager->GetPolicyTableStatus());
+ policy_manager_->AddApplication(kDeviceNumber, kValidAppId, hmi_types);
}
-TEST_F(
- PolicyManagerImplTest2,
- AddApplication_AddNewApplicationFromDeviceWithoutConsent_ExpectUpdateRequired) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- ::policy::StatusNotifier notifyer = manager->AddApplication(
- dev_id1, app_id1, HmiTypes(policy_table::AHT_DEFAULT));
- DCHECK(notifyer);
- (*notifyer)();
- EXPECT_EQ("UPDATE_NEEDED", manager->GetPolicyTableStatus());
-}
+TEST_F(PolicyManagerImplTest,
+ OnPTUFinished_PtuResultIskNewPtRequired_InvokeForcePTExchange) {
+ const std::string initial_pt_status = policy_manager_->GetPolicyTableStatus();
-TEST_F(
- PolicyManagerImplTest2,
- ReactOnUserDevConsentForApp_AddNewApplicationFromDeviceWithConsent_ExpectDefault) {
- // Arrange
- // RequestTypes for default & preDataConsent are different
- CreateLocalPT("ptu_requestType.json");
- manager->AddApplication(
- dev_id1, app_id1, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_FALSE(manager->IsPredataPolicy(app_id1));
- manager->ReactOnUserDevConsentForApp(dev_handle1, app_id1, true);
- EXPECT_FALSE(manager->IsPredataPolicy(app_id1));
- EXPECT_TRUE((manager->GetCache())->IsDefaultPolicy(app_id1));
-}
+ EXPECT_CALL(*mock_cache_manager_, GenerateSnapshot())
+ .WillOnce(Return(nullptr));
-TEST_F(
- PolicyManagerImplTest2,
- ReactOnUserDevConsentForApp_AddNewApplicationFromDeviceWithConsent_ExpectPreDataConsent) {
- // Arrange
- // RequestTypes for default & preDataConsent are the same
- CreateLocalPT("ptu2_requestType.json");
- manager->AddApplication(
- dev_id1, app_id1, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_FALSE(manager->IsPredataPolicy(app_id1));
- EXPECT_CALL(listener, OnPendingPermissionChange(_, app_id1)).Times(0);
- manager->ReactOnUserDevConsentForApp(dev_handle1, app_id1, true);
- EXPECT_FALSE(manager->IsPredataPolicy(app_id1));
- EXPECT_TRUE((manager->GetCache())->IsDefaultPolicy(app_id1));
+ policy_manager_->OnPTUFinished(
+ PolicyManager::PtProcessingResult::kNewPtRequired);
+ const std::string final_pt_status = policy_manager_->GetPolicyTableStatus();
+ EXPECT_NE(initial_pt_status, final_pt_status);
}
TEST_F(
- PolicyManagerImplTest2,
- AddApplication_AddExistingApplicationFromDeviceWithoutConsent_ExpectNoUpdateRequired) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- EXPECT_EQ("UP_TO_DATE", manager->GetPolicyTableStatus());
- ON_CALL(listener, GetDevicesIds(_))
- .WillByDefault(Return(transport_manager::DeviceList()));
- GetPTU("valid_sdl_pt_update.json");
- EXPECT_EQ("UP_TO_DATE", manager->GetPolicyTableStatus());
- // Try to add existing app
- manager->AddApplication(
- dev_id2, app_id2, HmiTypes(policy_table::AHT_DEFAULT));
- // Check no update required
- EXPECT_EQ("UP_TO_DATE", manager->GetPolicyTableStatus());
-}
+ PolicyManagerImplTest,
+ OnPTUFinished_PtuResultIskWrongPtReceived_NoPTExchangeAndNoRefreshRetrySequence) {
+ const std::string initial_pt_status = policy_manager_->GetPolicyTableStatus();
-TEST_F(PolicyManagerImplTest2, UpdateApplication_AppServices) {
- std::string kServiceType = "MEDIA";
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- EXPECT_EQ("UP_TO_DATE", manager->GetPolicyTableStatus());
- ON_CALL(listener, GetDevicesIds(_))
- .WillByDefault(Return(transport_manager::DeviceList()));
- GetPTU("valid_sdl_pt_update.json");
- EXPECT_EQ("UP_TO_DATE", manager->GetPolicyTableStatus());
- // Try to add existing app
- policy_table::AppServiceParameters app_service_parameters =
- policy_table::AppServiceParameters();
- manager->GetAppServiceParameters(app_id2, &app_service_parameters);
-
- ASSERT_FALSE(app_service_parameters.find(kServiceType) ==
- app_service_parameters.end());
-
- auto service_names = *(app_service_parameters[kServiceType].service_names);
-
- ASSERT_TRUE(service_names.is_initialized());
- ASSERT_EQ(service_names.size(), 2u);
- EXPECT_EQ(static_cast<std::string>(service_names[0]), "SDL App");
- EXPECT_EQ(static_cast<std::string>(service_names[1]), "SDL Music");
-
- auto handled_rpcs = app_service_parameters[kServiceType].handled_rpcs;
-
- ASSERT_TRUE(handled_rpcs.is_initialized());
- EXPECT_EQ(handled_rpcs[0].function_id, 41);
-
- // Check no update required
- EXPECT_EQ("UP_TO_DATE", manager->GetPolicyTableStatus());
-}
+ EXPECT_CALL(*mock_cache_manager_, TimeoutResponse()).Times(0);
+ EXPECT_CALL(*mock_cache_manager_, SecondsBetweenRetries(_)).Times(0);
-TEST_F(PolicyManagerImplTest2,
- PTUpdatedAt_DaysNotExceedLimit_ExpectNoUpdateRequired) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- date_time::TimeDuration current_time = date_time::getCurrentTime();
- const int kSecondsInDay = 60 * 60 * 24;
- int days = date_time::getSecs(current_time) / kSecondsInDay;
- EXPECT_EQ("UP_TO_DATE", manager->GetPolicyTableStatus());
- ON_CALL(listener, GetDevicesIds(_))
- .WillByDefault(Return(transport_manager::DeviceList()));
-
- GetPTU("valid_sdl_pt_update.json");
- EXPECT_EQ("UP_TO_DATE", manager->GetPolicyTableStatus());
-
- manager->AddApplication(
- dev_id2, app_id2, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_EQ("UP_TO_DATE", manager->GetPolicyTableStatus());
- ::policy::Counters counter = ::policy::Counters::DAYS_AFTER_EPOCH;
- // Set PT was updated 10 days ago (limit is 30 days for now)
- // So no limit exceeded
- manager->PTUpdatedAt(counter, days - 10);
- manager->OnAppRegisteredOnMobile(dev_id2, app_id2);
- EXPECT_EQ("UP_TO_DATE", manager->GetPolicyTableStatus());
+ policy_manager_->OnPTUFinished(
+ PolicyManager::PtProcessingResult::kWrongPtReceived);
+ const std::string final_pt_status = policy_manager_->GetPolicyTableStatus();
+ EXPECT_EQ(initial_pt_status, final_pt_status);
}
-TEST_F(PolicyManagerImplTest2, ForcePTExchange_ExpectUpdateNeeded) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- EXPECT_EQ("UP_TO_DATE", manager->GetPolicyTableStatus());
- // Force OT Exchange
- manager->ForcePTExchange();
- // Check update required
- EXPECT_EQ("UPDATE_NEEDED", manager->GetPolicyTableStatus());
-}
-
-TEST_F(PolicyManagerImplTest2, ResetRetrySequence) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- manager->ResetRetrySequence(ResetRetryCountType::kResetWithStatusUpdate);
- EXPECT_EQ("UPDATE_NEEDED", manager->GetPolicyTableStatus());
- manager->SetSendOnUpdateSentOut(false);
- manager->OnUpdateStarted();
- EXPECT_EQ("UPDATING", manager->GetPolicyTableStatus());
-}
+TEST_F(PolicyManagerImplTest,
+ OnPTUFinished_PtuResultIskSuccess_InvokeRefreshRetrySequence) {
+ const std::string initial_pt_status = policy_manager_->GetPolicyTableStatus();
-TEST_F(PolicyManagerImplTest2, NextRetryTimeout_ExpectTimeoutsFromPT) {
- // Arrange
- std::ifstream ifile("sdl_preloaded_pt.json");
- Json::CharReaderBuilder reader_builder;
- Json::Value root(Json::objectValue);
- if (ifile.is_open() &&
- Json::parseFromStream(reader_builder, ifile, &root, nullptr)) {
- Json::Value seconds_between_retries = Json::Value(Json::arrayValue);
- seconds_between_retries =
- root["policy_table"]["module_config"]["seconds_between_retries"];
- CreateLocalPT("sdl_preloaded_pt.json");
- // Check data
- uint32_t timeout_after_x_seconds =
- root["policy_table"]["module_config"]["timeout_after_x_seconds"]
- .asInt() *
- date_time::MILLISECONDS_IN_SECOND;
- const uint32_t first_retry = timeout_after_x_seconds;
- EXPECT_EQ(first_retry, manager->NextRetryTimeout());
- uint32_t next_retry = first_retry + seconds_between_retries[0].asInt() *
- date_time::MILLISECONDS_IN_SECOND;
- EXPECT_EQ(next_retry, manager->NextRetryTimeout());
- next_retry =
- first_retry + next_retry +
- seconds_between_retries[1].asInt() * date_time::MILLISECONDS_IN_SECOND;
- EXPECT_EQ(next_retry, manager->NextRetryTimeout());
- next_retry =
- first_retry + next_retry +
- seconds_between_retries[2].asInt() * date_time::MILLISECONDS_IN_SECOND;
- EXPECT_EQ(next_retry, manager->NextRetryTimeout());
- next_retry =
- first_retry + next_retry +
- seconds_between_retries[3].asInt() * date_time::MILLISECONDS_IN_SECOND;
- EXPECT_EQ(next_retry, manager->NextRetryTimeout());
- }
-}
+ EXPECT_CALL(*mock_cache_manager_, TimeoutResponse());
+ EXPECT_CALL(*mock_cache_manager_, SecondsBetweenRetries(_));
-TEST_F(PolicyManagerImplTest2, TimeOutExchange) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- // Check value taken from PT
- EXPECT_EQ(70000u, manager->TimeoutExchangeMSec());
+ policy_manager_->OnPTUFinished(PolicyManager::PtProcessingResult::kSuccess);
+ const std::string final_pt_status = policy_manager_->GetPolicyTableStatus();
+ EXPECT_EQ(initial_pt_status, final_pt_status);
}
-TEST_F(PolicyManagerImplTest2, UpdatedPreloadedPT_ExpectLPT_IsUpdated) {
- // Arrange necessary pre-conditions
- StringsForUpdate new_data;
- new_data.new_field_name_ = "Notifications-";
- CreateNewRandomData(new_data);
- // Create Initial LocalPT from preloadedPT
- CreateLocalPT("sdl_preloaded_pt.json");
- // Update preloadedPT
- std::ifstream ifile("sdl_preloaded_pt.json");
- Json::CharReaderBuilder reader_builder;
- Json::Value root(Json::objectValue);
-
- if (ifile.is_open() &&
- Json::parseFromStream(reader_builder, ifile, &root, nullptr)) {
- root["policy_table"]["module_config"]["preloaded_date"] =
- new_data.new_date_;
- Json::Value val(Json::objectValue);
- Json::Value val2(Json::arrayValue);
- val2[0] = hmi_level[index];
- val[new_data.new_field_value_]["hmi_levels"] = val2;
- root["policy_table"]["functional_groupings"][new_data.new_field_name_]
- ["rpcs"] = val;
- root["policy_table"]["functional_groupings"][new_data.new_field_name_]
- ["user_consent_prompt"] = new_data.new_field_name_;
- }
- ifile.close();
+TEST_F(PolicyManagerImplTest, RequestPTUpdate_SnapshotPtrIsNull_ReturnFalse) {
+ ON_CALL(*mock_cache_manager_, GenerateSnapshot())
+ .WillByDefault(Return(nullptr));
- std::ofstream ofile("sdl_preloaded_pt.json");
- ofile << root;
- ofile.flush();
- ofile.close();
-
- // Make PolicyManager to update LocalPT
- EXPECT_TRUE(manager->InitPT("sdl_preloaded_pt.json", &policy_settings_));
-
- // Arrange
- ::policy::CacheManagerInterfaceSPtr cache = manager->GetCache();
- std::shared_ptr<policy_table::Table> table = cache->GenerateSnapshot();
- // Get FunctionalGroupings
- policy_table::FunctionalGroupings& fc =
- table->policy_table.functional_groupings;
- // Get RPCs for new added field in functional_group
- policy_table::Rpcs& rpcs = fc[new_data.new_field_name_];
- // Get user consent prompt
- const std::string& ucp = *(rpcs.user_consent_prompt);
- // Get Rpcs
- policy_table::Rpc& rpc = rpcs.rpcs;
- // Get RPC's parameters
- policy_table::RpcParameters& rpc_param = rpc[new_data.new_field_value_];
-
- // Check preloaded date
- EXPECT_EQ(static_cast<std::string>(
- *(table->policy_table.module_config.preloaded_date)),
- new_data.new_date_);
- // Check if new field exists in Local PT
- EXPECT_TRUE(fc.find(new_data.new_field_name_) != fc.end());
- // Check if user_consent_propmp is correct
- EXPECT_EQ(new_data.new_field_name_, ucp);
- // Check if new RPC exists
- EXPECT_TRUE(rpc.find(new_data.new_field_value_) != rpc.end());
- // Check HMI level of new RPC
- EXPECT_EQ(index, static_cast<uint32_t>(rpc_param.hmi_levels[0]));
- // Check if new field matches field added to preloaded PT
- EXPECT_EQ(std::string((*(fc.find(new_data.new_field_name_))).first),
- new_data.new_field_name_);
+ EXPECT_FALSE(
+ policy_manager_->RequestPTUpdate(PTUIterationType::DefaultIteration));
}
-TEST_F(PolicyManagerImplTest2, GetPolicyTableStatus_ExpectUpToDate) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- // Check
- EXPECT_EQ("UP_TO_DATE", manager->GetPolicyTableStatus());
-}
+TEST_F(PolicyManagerImplTest, RequestPTUpdate_PTIsValid_PTIsUpdated) {
+ std::ifstream ifile(kSdlPreloadedPtJson);
+ ASSERT_TRUE(ifile.good());
-TEST_F(PolicyManagerImplTest2,
- RetrySequenceDelaysSeconds_Expect_CorrectValues) {
- // Arrange
- std::ifstream ifile("sdl_preloaded_pt.json");
Json::CharReaderBuilder reader_builder;
Json::Value root(Json::objectValue);
- if (ifile.is_open() &&
- Json::parseFromStream(reader_builder, ifile, &root, nullptr)) {
- Json::Value seconds_between_retries = Json::Value(Json::arrayValue);
- seconds_between_retries =
- root["policy_table"]["module_config"]["seconds_between_retries"];
- uint32_t size = seconds_between_retries.size();
- CreateLocalPT("sdl_preloaded_pt.json");
- std::vector<int> delaySecs = manager->RetrySequenceDelaysSeconds();
- // Check
- ASSERT_EQ(size, delaySecs.size());
- for (uint32_t i = 0; i < size; ++i) {
- EXPECT_EQ(seconds_between_retries[i], delaySecs[i]);
- }
+ Json::parseFromStream(reader_builder, ifile, &root, nullptr);
+ root["policy_table"]["consumer_friendly_messages"].removeMember("messages");
+ ifile.close();
+ policy_table::Table update(&root);
+ auto snapshot = std::make_shared<policy_table::Table>();
+ snapshot->policy_table = update.policy_table;
+ if (update.policy_table.vehicle_data.is_initialized()) {
+ snapshot->policy_table.vehicle_data =
+ rpc::Optional<policy_table::VehicleData>();
+ snapshot->policy_table.vehicle_data->mark_initialized();
+ snapshot->policy_table.vehicle_data->schema_version =
+ update.policy_table.vehicle_data->schema_version;
}
-}
-TEST_F(PolicyManagerImplTest2,
- OnExceededTimeout_GetPolicyTableStatus_ExpectUpdateNeeded) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- manager->ForcePTExchange();
- manager->OnExceededTimeout();
- // Check
- EXPECT_EQ("UPDATE_NEEDED", manager->GetPolicyTableStatus());
-}
+ snapshot->SetPolicyTableType(policy_table::PT_SNAPSHOT);
+ ASSERT_TRUE(IsValid(*snapshot));
-TEST_F(PolicyManagerImplTest2,
- GetUserConsentForDevice_SetDeviceAllowed_ExpectReceivedConsentCorrect) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- ASSERT_TRUE((manager->GetCache())->AddDevice(dev_id2, "Bluetooth"));
-
- ASSERT_TRUE((manager->GetCache())
- ->SetDeviceData(dev_id2,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
-
- manager->SetUserConsentForDevice(dev_id2, true);
- ::policy::DeviceConsent consent = manager->GetUserConsentForDevice(dev_id2);
- // Check
- EXPECT_EQ(::policy::DeviceConsent::kDeviceAllowed, consent);
+ ON_CALL(*mock_cache_manager_, GenerateSnapshot())
+ .WillByDefault(Return(snapshot));
+ EXPECT_CALL(listener_,
+ OnSnapshotCreated(_, PTUIterationType::DefaultIteration));
+ EXPECT_TRUE(
+ policy_manager_->RequestPTUpdate(PTUIterationType::DefaultIteration));
}
-TEST_F(PolicyManagerImplTest2,
- DISABLED_GetDefaultHmi_SetDeviceAllowed_ExpectReceivedHmiCorrect) {
- // Arrange
- CreateLocalPT("ptu2_requestType.json");
- manager->AddApplication(
- dev_id2, app_id2, HmiTypes(policy_table::AHT_DEFAULT));
- // Check if app has preData policy
- EXPECT_FALSE(manager->IsPredataPolicy(app_id2));
- std::string default_hmi1;
- manager->GetDefaultHmi(dev_id2, app_id2, &default_hmi1);
- EXPECT_EQ("", default_hmi1);
- ASSERT_TRUE((manager->GetCache())->AddDevice(dev_id2, "Bluetooth"));
- ASSERT_TRUE((manager->GetCache())
- ->SetDeviceData(dev_id2,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
- manager->SetUserConsentForDevice(dev_id2, true);
- ::policy::DeviceConsent consent = manager->GetUserConsentForDevice(dev_id2);
- // Check
- EXPECT_EQ(::policy::DeviceConsent::kDeviceAllowed, consent);
- EXPECT_CALL(listener, OnCurrentDeviceIdUpdateRequired(_, app_id2))
- .WillRepeatedly(Return(dev_id2));
- manager->AddApplication(
- dev_id2, app_id2, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_TRUE((manager->GetCache())->IsDefaultPolicy(app_id2));
- std::string default_hmi2;
- manager->GetDefaultHmi(dev_id2, app_id2, &default_hmi2);
- EXPECT_EQ("", default_hmi2);
-}
+TEST_F(
+ PolicyManagerImplTest,
+ SendNotificationOnPermissionsUpdated_AppIsRemoteControl_PermissionsUpdated) {
+ EXPECT_CALL(*access_remote_, IsAppRemoteControl(_))
+ .WillRepeatedly(Return(true));
+ EXPECT_CALL(listener_, OnPermissionsUpdated(kDeviceNumber, _, _));
-TEST_F(PolicyManagerImplTest2,
- GetDefaultPriority_SetDeviceAllowed_ExpectReceivedPriorityCorrect) {
- // Arrange
- CreateLocalPT("ptu2_requestType.json");
- manager->AddApplication(
- dev_id2, app_id2, HmiTypes(policy_table::AHT_DEFAULT));
- // Check if app has preData policy
- EXPECT_FALSE(manager->IsPredataPolicy(app_id2));
- std::string priority1;
- EXPECT_TRUE(manager->GetPriority(app_id2, &priority1));
- EXPECT_EQ("EMERGENCY", priority1);
- ASSERT_TRUE((manager->GetCache())->AddDevice(dev_id2, "Bluetooth"));
- ASSERT_TRUE((manager->GetCache())
- ->SetDeviceData(dev_id2,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
- manager->SetUserConsentForDevice(dev_id2, true);
- ::policy::DeviceConsent consent = manager->GetUserConsentForDevice(dev_id2);
- // Check
- EXPECT_EQ(::policy::DeviceConsent::kDeviceAllowed, consent);
- EXPECT_CALL(listener, OnCurrentDeviceIdUpdateRequired(_, app_id2))
- .WillRepeatedly(Return(dev_id2));
- manager->AddApplication(
- dev_id2, app_id2, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_TRUE((manager->GetCache())->IsDefaultPolicy(app_id2));
- std::string priority2;
- EXPECT_TRUE(manager->GetPriority(app_id2, &priority2));
- EXPECT_EQ("EMERGENCY", priority2);
-}
-
-TEST_F(PolicyManagerImplTest2, GetInitialAppData_ExpectReceivedConsentCorrect) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- manager->AddApplication(
- dev_id2, app_id2, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_CALL(listener, GetDevicesIds(app_id2))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- ::policy::StringArray app_nicknames;
- ::policy::StringArray app_hmi_types;
- manager->GetInitialAppData(app_id2, &app_nicknames, &app_hmi_types);
- // Expect Empty nicknames and AppHmiTypes
- EXPECT_EQ(0u, app_nicknames.size());
- EXPECT_EQ(0u, app_hmi_types.size());
-
- Json::Value root = GetPTU("valid_sdl_pt_update.json");
-
- Json::Value appHmiTypes = Json::Value(Json::arrayValue);
- appHmiTypes = root["policy_table"]["app_policies"][app_id2]["AppHMIType"];
- uint32_t appHmiType_size = appHmiTypes.size();
-
- Json::Value appNicknames = Json::Value(Json::arrayValue);
- appNicknames = root["policy_table"]["app_policies"][app_id2]["nicknames"];
- uint32_t appNicknames_size = appNicknames.size();
-
- ::policy::StringArray app_nicknames1;
- ::policy::StringArray app_hmi_types1;
- manager->GetInitialAppData(app_id2, &app_nicknames1, &app_hmi_types1);
- uint32_t nick_names_size = app_nicknames1.size();
- uint32_t app_hmi_types_size = app_hmi_types1.size();
- ASSERT_EQ(appHmiType_size, app_hmi_types_size);
- ASSERT_EQ(appNicknames_size, nick_names_size);
- ASSERT_GT(nick_names_size, 0u);
- ASSERT_GT(app_hmi_types_size, 0u);
- // Check nicknames match
- for (uint32_t i = 0; i < nick_names_size; ++i) {
- EXPECT_EQ(app_nicknames1[i], appNicknames[i].asString());
- }
- // Check AppHmiTypes match
- for (uint32_t i = 0; i < app_hmi_types_size; ++i) {
- EXPECT_EQ(app_hmi_types1[i], appHmiTypes[i].asString());
- }
+ policy_manager_->SendNotificationOnPermissionsUpdated(kDeviceNumber,
+ kValidAppId);
}
TEST_F(
- PolicyManagerImplTest2,
- CanAppKeepContext_AddAppFromUnconsentedDevice_ExpectAppCannotKeepContext) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- manager->AddApplication(
- dev_id2, app_id2, HmiTypes(policy_table::AHT_DEFAULT));
- // Check if app has preData policy
- EXPECT_FALSE(manager->IsPredataPolicy(app_id2));
- // Check keep context in preData policy
- EXPECT_TRUE(manager->CanAppKeepContext(app_id2));
-}
-
-TEST_F(PolicyManagerImplTest2,
- CanAppKeepContext_AddAppFromConsentedDevice_ExpectAppCannotKeepContext) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- ASSERT_TRUE((manager->GetCache())->AddDevice(dev_id2, "Bluetooth"));
- manager->AddApplication(
- dev_id2, app_id2, HmiTypes(policy_table::AHT_DEFAULT));
- ASSERT_TRUE((manager->GetCache())
- ->SetDeviceData(dev_id2,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
- manager->SetUserConsentForDevice(dev_id2, true);
- ::policy::DeviceConsent consent = manager->GetUserConsentForDevice(dev_id2);
- EXPECT_EQ(::policy::DeviceConsent::kDeviceAllowed, consent);
- EXPECT_CALL(listener, OnCurrentDeviceIdUpdateRequired(_, app_id2))
- .WillRepeatedly(Return(dev_id2));
- manager->AddApplication(
- dev_id2, app_id2, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_TRUE((manager->GetCache())->IsDefaultPolicy(app_id2));
- // Check keep context in default policy
- EXPECT_TRUE(manager->CanAppKeepContext(app_id2));
-}
+ PolicyManagerImplTest,
+ SendNotificationOnPermissionsUpdated_NotRemoteControlApp_PermissionsUpdated) {
+ const std::string default_hmi = "NONE";
+ EXPECT_CALL(listener_,
+ OnPermissionsUpdated(kDeviceNumber, _, _, default_hmi));
-TEST_F(PolicyManagerImplTest2,
- CanAppKeepContext_SetPoliciesForAppUpdated_ExpectAppCanKeepContext) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- manager->AddApplication(
- dev_id2, app_id2, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_CALL(listener, GetDevicesIds(app_id2))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- GetPTU("valid_sdl_pt_update.json");
- // Check keep context in updated policies for app
- EXPECT_TRUE(manager->CanAppKeepContext(app_id2));
+ policy_manager_->SendNotificationOnPermissionsUpdated(kDeviceNumber,
+ kValidAppId);
}
-TEST_F(PolicyManagerImplTest2,
- CanAppStealFocus_AddAppFromConsentedDevice_ExpectAppCannotStealFocus) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- ASSERT_TRUE((manager->GetCache())->AddDevice(dev_id2, "Bluetooth"));
- manager->AddApplication(
- dev_id2, app_id2, HmiTypes(policy_table::AHT_DEFAULT));
- ASSERT_TRUE((manager->GetCache())
- ->SetDeviceData(dev_id2,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
- manager->SetUserConsentForDevice(dev_id2, true);
- ::policy::DeviceConsent consent = manager->GetUserConsentForDevice(dev_id2);
- EXPECT_EQ(::policy::DeviceConsent::kDeviceAllowed, consent);
- EXPECT_CALL(listener, OnCurrentDeviceIdUpdateRequired(_, app_id2))
- .WillRepeatedly(Return(dev_id2));
- manager->AddApplication(
- dev_id2, app_id2, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_TRUE((manager->GetCache())->IsDefaultPolicy(app_id2));
- // Check keep context in default policy
- EXPECT_TRUE(manager->CanAppStealFocus(app_id2));
-}
+TEST_F(PolicyManagerImplTest,
+ GetUserConsentForApp_NoPermissionsForApp_NoConsent) {
+ std::vector<FunctionalGroupPermission> permissions;
-TEST_F(PolicyManagerImplTest2,
- CanAppStealFocus_SetPoliciesForAppUpdated_ExpectAppCanStealFocus) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- manager->AddApplication(
- dev_id2, app_id2, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_CALL(listener, GetDevicesIds(app_id2))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- GetPTU("valid_sdl_pt_update.json");
- // Check keep context in updated policies for app
- EXPECT_TRUE(manager->CanAppKeepContext(app_id2));
-}
+ ON_CALL(*mock_cache_manager_,
+ GetPermissionsForApp(kDeviceNumber, kValidAppId, _))
+ .WillByDefault(Return(false));
+ EXPECT_CALL(*mock_cache_manager_, GetFunctionalGroupNames(_)).Times(0);
-TEST_F(PolicyManagerImplTest2, GetCurrentDeviceId) {
- // Arrange
- EXPECT_CALL(listener, OnCurrentDeviceIdUpdateRequired(dev_handle2, app_id2))
- .Times(2);
- EXPECT_EQ(custom_str::CustomString(""),
- manager->GetCurrentDeviceId(dev_handle2, app_id2));
- EXPECT_EQ("", manager->GetCurrentDeviceId(dev_handle2, app_id2));
+ policy_manager_->GetUserConsentForApp(
+ kDeviceNumber, kValidAppId, permissions);
+ EXPECT_TRUE(permissions.empty());
}
-TEST_F(
- PolicyManagerImplTest2,
- GetPermissionsForApp_SetUserConsentForApp_ExpectReceivedPermissionsCorrect) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
-
- ASSERT_TRUE((manager->GetCache())->AddDevice(dev_id2, "Bluetooth"));
- ASSERT_TRUE((manager->GetCache())
- ->SetDeviceData(dev_id2,
- "hardware IPX",
- "v.8.0.1",
- "Android",
- "4.4.2",
- "Life",
- 2,
- "Bluetooth"));
-
- ::policy::StringArray consented_groups;
- ::policy::StringArray disallowed_groups;
- consented_groups.push_back(std::string("Notifications"));
- (manager->GetCache())
- ->SetUserPermissionsForDevice(
- dev_id2, consented_groups, disallowed_groups);
- manager->SetUserConsentForDevice(dev_id2, true);
- EXPECT_CALL(listener, OnCurrentDeviceIdUpdateRequired(_, app_id2))
- .WillRepeatedly(Return(dev_id2));
- manager->AddApplication(
- dev_id2, app_id2, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_CALL(listener, GetDevicesIds(app_id2))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
-
- GetPTU("valid_sdl_pt_update.json");
- ::policy::PermissionConsent perm_consent;
- perm_consent.device_id = dev_id2;
- perm_consent.policy_app_id = app_id2;
- perm_consent.consent_source = "VR";
-
- ::policy::FunctionalGroupPermission group1_perm;
- group1_perm.group_alias = "Notifications";
- group1_perm.group_name = "Notifications";
- group1_perm.group_id = ::utils::Djb2HashFromString("Notifications");
- group1_perm.state = ::policy::GroupConsent::kGroupAllowed;
-
- std::vector< ::policy::FunctionalGroupPermission> groups_permissions;
- groups_permissions.push_back(group1_perm);
- perm_consent.group_permissions = groups_permissions;
-
- manager->SetUserConsentForApp(perm_consent);
- manager->SendNotificationOnPermissionsUpdated(dev_id2, app_id2);
- std::vector< ::policy::FunctionalGroupPermission> actual_groups_permissions;
- std::vector< ::policy::FunctionalGroupPermission>::iterator it;
- manager->GetPermissionsForApp(dev_id2, app_id2, actual_groups_permissions);
- uint32_t index = 0;
- for (; index < actual_groups_permissions.size(); ++index) {
- if (actual_groups_permissions[index].group_id == group1_perm.group_id) {
- break;
- }
- }
- // Check
- EXPECT_EQ(group1_perm.group_alias,
- actual_groups_permissions[index].group_alias);
- EXPECT_EQ(group1_perm.group_name,
- actual_groups_permissions[index].group_name);
- EXPECT_EQ(group1_perm.group_id, actual_groups_permissions[index].group_id);
- EXPECT_EQ(group1_perm.state, actual_groups_permissions[index].state);
-}
+TEST_F(PolicyManagerImplTest,
+ GetUserConsentForApp_NoFunctionalGroupsNames_NoConsent) {
+ std::vector<FunctionalGroupPermission> permissions;
-TEST_F(
- PolicyManagerImplTest2,
- HertBeatTimeout_AddApp_UpdateAppPolicies_ExpectReceivedHertBeatTimeoutCorrect) {
- // Arrange
- CreateLocalPT("sdl_preloaded_pt.json");
- std::shared_ptr<policy_table::Table> pt = (manager->GetCache())->pt();
- ::policy_table::PolicyTableType type1 =
- ::policy_table::PolicyTableType::PT_PRELOADED;
- pt->SetPolicyTableType(type1);
- if (!pt->is_valid()) {
- std::cout << "\nPolicy table is not valid."
- << "\n";
- rpc::ValidationReport report("policy_table");
- pt->ReportErrors(&report);
- }
- // Add new app
- manager->AddApplication(
- dev_id2, app_id2, HmiTypes(policy_table::AHT_DEFAULT));
- EXPECT_CALL(listener, GetDevicesIds(app_id2))
- .WillRepeatedly(Return(transport_manager::DeviceList()));
- uint32_t result = manager->HeartBeatTimeout(app_id2);
- // By default hertbeat timeout is 0
- EXPECT_EQ(0u, result);
- Json::Value root = GetPTU("valid_sdl_pt_update.json");
-
- ::policy_table::PolicyTableType type2 =
- ::policy_table::PolicyTableType::PT_UPDATE;
- pt->SetPolicyTableType(type2);
- if (!pt->is_valid()) {
- std::cout << "\nPolicy table is not valid."
- << "\n";
- rpc::ValidationReport report("policy_table");
- pt->ReportErrors(&report);
- }
+ ON_CALL(*mock_cache_manager_,
+ GetPermissionsForApp(kDeviceNumber, kValidAppId, _))
+ .WillByDefault(Return(true));
+ EXPECT_CALL(*mock_cache_manager_, GetFunctionalGroupNames(_))
+ .WillOnce(Return(false));
- Json::Value heart_beat_timeout = Json::Value(Json::uintValue);
- heart_beat_timeout =
- root["policy_table"]["app_policies"][app_id2]["heart_beat_timeout_ms"];
- result = manager->HeartBeatTimeout(app_id2);
- EXPECT_EQ(heart_beat_timeout.asUInt(), result);
+ policy_manager_->GetUserConsentForApp(
+ kDeviceNumber, kValidAppId, permissions);
+ EXPECT_TRUE(permissions.empty());
}
-TEST_F(PolicyManagerImplTest2, CacheManager_RemoveRPCSpecVehicleDataItems) {
- policy_table::VehicleDataItems init;
- policy_table::VehicleDataItem test_item;
- test_item.name = "headLampStatus";
- init.push_back(test_item);
-
- const auto ret = CacheManager::CollectCustomVDItems(init);
-
- EXPECT_EQ(0u, ret.size());
+TEST_F(PolicyManagerImplTest,
+ GetInitialAppData_HandleNullPointers_ReturnFalse) {
+ EXPECT_FALSE(
+ policy_manager_->GetInitialAppData(kValidAppId, nullptr, nullptr));
}
-TEST_F(PolicyManagerImplTest2,
- CacheManager_RemoveRPCSpecVehicleDataItemsAndRemainCustom) {
- policy_table::VehicleDataItems init;
- policy_table::VehicleDataItem rpc_spec_item;
- rpc_spec_item.name = "headLampStatus";
- policy_table::VehicleDataItem custom_item;
- custom_item.name = "Custom";
- init.push_back(rpc_spec_item);
- init.push_back(custom_item);
-
- EXPECT_EQ(2u, init.size());
-
- const auto ret = CacheManager::CollectCustomVDItems(init);
+TEST_F(PolicyManagerImplTest,
+ GetInitialAppData_HandleValidPointers_ReturnTrue) {
+ StringArray nicknames;
+ StringArray app_hmi_types;
+ ON_CALL(*mock_cache_manager_,
+ GetInitialAppData(kValidAppId, nicknames, app_hmi_types))
+ .WillByDefault(Return(true));
- EXPECT_EQ(1u, ret.size());
- EXPECT_EQ(ret.at(0).name, "Custom");
+ EXPECT_TRUE(policy_manager_->GetInitialAppData(
+ kValidAppId, &nicknames, &app_hmi_types));
}
-TEST_F(PolicyManagerImplTest2, CacheManager_RemainCustomVehicleDataItems) {
- policy_table::VehicleDataItems init;
- policy_table::VehicleDataItem custom_item;
- custom_item.name = "Custom";
- init.push_back(custom_item);
-
- EXPECT_EQ(1u, init.size());
-
- const auto& ret = CacheManager::CollectCustomVDItems(init);
+TEST_F(PolicyManagerImplTest,
+ GetAppPermissionsChanges_NoPermissionsChanges_GeneratePermissions) {
+ EXPECT_CALL(*mock_cache_manager_, IsApplicationRevoked(kValidAppId));
+ EXPECT_CALL(*mock_cache_manager_, GetPriority(kValidAppId, _));
- EXPECT_EQ(1u, ret.size());
+ policy_manager_->GetAppPermissionsChanges(kDeviceNumber, kValidAppId);
}
-TEST_F(PolicyManagerImplTest2,
- CacheManager_CollectCustomItemWithRemainingRPCSpecItem) {
- policy_table::VehicleDataItems init;
- policy_table::VehicleDataItem rpc_spec_item;
- rpc_spec_item.name = "headLampStatus";
- policy_table::VehicleDataItem custom_item;
- custom_item.name = "Custom";
- init.push_back(rpc_spec_item);
- init.push_back(custom_item);
+TEST_F(PolicyManagerImplTest, GetHMITypes_AppIsDefaultPolicy_ReturnFalse) {
+ std::vector<int> app_types;
+ EXPECT_CALL(*mock_cache_manager_, IsDefaultPolicy(kValidAppId))
+ .WillOnce(Return(true));
- EXPECT_EQ(2u, init.size());
-
- const auto& ret = CacheManager::CollectCustomVDItems(init);
+ EXPECT_FALSE(policy_manager_->GetHMITypes(kValidAppId, &app_types));
+}
- EXPECT_EQ(1u, ret.size());
- EXPECT_EQ(ret.at(0).name, custom_item.name);
+TEST_F(PolicyManagerImplTest, GetHMITypes_NoHmiTypes_ReturnFalse) {
+ std::vector<int> app_types;
+ EXPECT_CALL(*mock_cache_manager_, GetHMITypes(kValidAppId))
+ .WillOnce(Return(nullptr));
+ EXPECT_FALSE(policy_manager_->GetHMITypes(kValidAppId, &app_types));
}
-TEST_F(PolicyManagerImplTest2,
- CacheManager_RemainRPCSpecVehicleDataItemsNoCustomItems) {
- policy_table::VehicleDataItems init;
- policy_table::VehicleDataItem custom_item;
- custom_item.name = "headLampStatus";
- init.push_back(custom_item);
+TEST_F(PolicyManagerImplTest, GetHMITypes_ValidHmiTypes_ReturnTrue) {
+ std::vector<int> app_types;
+ AppHMITypes hmi_types;
+ EXPECT_CALL(*mock_cache_manager_, GetHMITypes(kValidAppId))
+ .WillOnce(Return(&hmi_types));
+ EXPECT_TRUE(policy_manager_->GetHMITypes(kValidAppId, &app_types));
+}
- EXPECT_EQ(1u, init.size());
+TEST_F(PolicyManagerImplTest, SetMetaInfo_SetCCPUVersion_SUCCESS) {
+ const std::string ccpu_version = "ccpu_version";
+ const std::string wers_country_code = "wersCountryCode";
+ const std::string language = "language";
- const auto& ret = CacheManager::CollectCustomVDItems(init);
+ EXPECT_CALL(*mock_cache_manager_,
+ SetMetaInfo(ccpu_version, wers_country_code, language));
+ policy_manager_->SetSystemInfo(ccpu_version, wers_country_code, language);
- EXPECT_EQ(0u, ret.size());
+ EXPECT_CALL(*mock_cache_manager_, GetCCPUVersionFromPT())
+ .WillOnce(Return(ccpu_version));
+ EXPECT_EQ(ccpu_version, policy_manager_->GetCCPUVersionFromPT());
}
} // namespace policy_test
diff --git a/src/components/policy/policy_regular/test/ptu2_requestType.json b/src/components/policy/policy_regular/test/ptu2_requestType.json
deleted file mode 100644
index 9013971990..0000000000
--- a/src/components/policy/policy_regular/test/ptu2_requestType.json
+++ /dev/null
@@ -1,2635 +0,0 @@
-{
- "policy_table": {
- "module_config": {
- "preloaded_pt": true,
- "preloaded_date": "2015-12-02",
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [
- 1,
- 5,
- 25,
- 125,
- 625
- ],
- "endpoints": {
- "0x07": {
- "default": [
- "http://x.x.x.x:3000/api/1/policies"
- ]
- },
- "0x04": {
- "default": [
- "http://x.x.x.x:3000/api/1/softwareUpdate"
- ]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "VOICECOM": 20,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "FULL",
- "LIMITED",
- "BACKGROUND"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "FULL",
- "LIMITED",
- "BACKGROUND"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "FULL",
- "LIMITED",
- "BACKGROUND"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "PropriataryData-2": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "ProprietaryData-3": {
- "rpcs": {
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Base-6": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnTBTClientState": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "OnKeyboardInputOnlyGroup": {
- "rpcs": {
- "OnKeyboardInput": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "OnTouchEventOnlyGroup": {
- "rpcs": {
- "OnTouchEvent": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "DiagnosticMessageOnly": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- },
- "SendLocation": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "BackgroundAPT": {
- "rpcs": {
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.021",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. \n\nSi presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\r\n\r\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-mx": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. \n\nLas actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. \n\nPresione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements.\r\n\r\nVeuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information."
- },
- "es-mx": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "EMERGENCY",
- "default_hmi": "LIMITED",
- "groups": [
- "Base-4"
- ],
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "DataConsent-2"
- ],
- "preconsented_groups": [
- "BaseBeforeDataConsent"
- ]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ],
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- },
- "123454321": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ],
- "RequestType": [
- "TRAFFIC_MESSAGE_CHANNEL",
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- }
- }
- }
-}
diff --git a/src/components/policy/policy_regular/test/ptu_requestType.json b/src/components/policy/policy_regular/test/ptu_requestType.json
deleted file mode 100644
index 892a77f970..0000000000
--- a/src/components/policy/policy_regular/test/ptu_requestType.json
+++ /dev/null
@@ -1,2630 +0,0 @@
-{
- "policy_table": {
- "module_config": {
- "preloaded_pt": true,
- "preloaded_date": "2015-12-02",
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 60,
- "seconds_between_retries": [
- 1,
- 5,
- 25,
- 125,
- 625
- ],
- "endpoints": {
- "0x07": {
- "default": [
- "http://x.x.x.x:3000/api/1/policies"
- ]
- },
- "0x04": {
- "default": [
- "http://x.x.x.x:3000/api/1/softwareUpdate"
- ]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "VOICECOM": 20,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "FULL",
- "LIMITED",
- "BACKGROUND"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "FULL",
- "LIMITED",
- "BACKGROUND"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "FULL",
- "LIMITED",
- "BACKGROUND"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "gps",
- "speed"
- ]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "PropriataryData-2": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "ProprietaryData-3": {
- "rpcs": {
- "GetDTCs": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ],
- "parameters": [
- "airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "Base-6": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteSubMenu": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonEvent": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnButtonPress": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnTBTClientState": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ScrollableMessage": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SetMediaClockTimer": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Show": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider": {
- "hmi_levels": [
- "FULL"
- ]
- },
- "Speak": {
- "hmi_levels": [
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnsubscribeButton": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "OnKeyboardInputOnlyGroup": {
- "rpcs": {
- "OnKeyboardInput": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "OnTouchEventOnlyGroup": {
- "rpcs": {
- "OnTouchEvent": {
- "hmi_levels": [
- "FULL"
- ]
- }
- }
- },
- "DiagnosticMessageOnly": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "EncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ListFiles": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHashChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnHMIStatus": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnLanguageChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnPermissionsChange": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnSystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "PutFile": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "RegisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "ResetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetAppIcon": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SystemRequest": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- },
- "SendLocation": {
- "rpcs": {
- "SendLocation": {
- "hmi_levels": [
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- }
- }
- },
- "BackgroundAPT": {
- "rpcs": {
- "EndAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "OnAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- },
- "PerformAudioPassThru": {
- "hmi_levels": [
- "BACKGROUND"
- ]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.021",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. \n\nSi presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\r\n\r\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-mx": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. \n\nLas actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. \n\nPresione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements.\r\n\r\nVeuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information."
- },
- "es-mx": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "Base-4"
- ],
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "DataConsent-2"
- ]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ],
- "RequestType": [
- "PROPRIETARY"
- ]
- },
- "123454321": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": [
- "BaseBeforeDataConsent"
- ],
- "RequestType": [
- "TRAFFIC_MESSAGE_CHANNEL",
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- }
- }
- }
-} \ No newline at end of file
diff --git a/src/components/policy/policy_regular/test/sdl_preloaded_pt.json b/src/components/policy/policy_regular/test/sdl_preloaded_pt.json
deleted file mode 100644
index ad264c8518..0000000000
--- a/src/components/policy/policy_regular/test/sdl_preloaded_pt.json
+++ /dev/null
@@ -1,1965 +0,0 @@
- {
- "policy_table": {
- "module_config": {
- "preloaded_pt": true,
- "preloaded_date": "2015-02-12",
- "exchange_after_x_ignition_cycles": 100,
- "exchange_after_x_kilometers": 1800,
- "exchange_after_x_days": 30,
- "timeout_after_x_seconds": 70,
- "seconds_between_retries": [1,
- 5,
- 25,
- 125,
- 625],
- "endpoints": {
- "0x07": {
- "default": ["http://x.x.x.x:3000/api/1/policies"]
- }
- },
- "notifications_per_minute_by_priority": {
- "EMERGENCY": 60,
- "NAVIGATION": 15,
- "PROJECTION": 15,
- "COMMUNICATION": 6,
- "NORMAL": 4,
- "NONE": 0
- }
- },
- "functional_groupings": {
- "Base-4": {
- "rpcs": {
- "AddCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "AddSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Alert": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "CreateInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteInteractionChoiceSet": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "DeleteSubMenu": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EndAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GenericResponse": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAudioPassThru": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnButtonEvent": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnButtonPress": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "OnCommand": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnDriverDistraction": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PerformAudioPassThru": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PerformInteraction": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ResetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ScrollableMessage": {
- "hmi_levels": ["FULL"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetGlobalProperties": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SetMediaClockTimer": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "Show": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "Slider": {
- "hmi_levels": ["FULL"]
- },
- "Speak": {
- "hmi_levels": ["FULL",
- "LIMITED"]
- },
- "SubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnsubscribeButton": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Location-1": {
- "user_consent_prompt": "Location",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["gps",
- "speed"]
- }
- }
- },
- "Notifications": {
- "user_consent_prompt": "Notifications",
- "rpcs": {
- "Alert": {
- "hmi_levels": ["BACKGROUND"]
- }
- }
- },
- "DrivingCharacteristics-3": {
- "user_consent_prompt": "DrivingCharacteristics",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"]
- }
- }
- },
- "VehicleInfo-3": {
- "user_consent_prompt": "VehicleInfo",
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["bodyInformation",
- "deviceStatus",
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"]
- }
- }
- },
- "PropriataryData-1": {
- "rpcs": {
- "DiagnosticMessage": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "GetDTCs": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ReadDID": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "Emergency-1": {
- "rpcs": {
- "GetVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "OnVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "SubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- },
- "UnsubscribeVehicleData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"],
- "parameters": ["airbagStatus",
- "clusterModeStatus",
- "eCallInfo",
- "emergencyEvent"]
- }
- }
- },
- "Navigation-1": {
- "rpcs": {
- "AlertManeuver": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "ShowConstantTBT": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- },
- "UpdateTurnList": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED"]
- }
- }
- },
- "DataConsent-2": {
- "user_consent_prompt": "DataConsent",
- "rpcs": null
- },
- "BaseBeforeDataConsent": {
- "rpcs": {
- "ChangeRegistration": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "DeleteFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "EncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "ListFiles": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnAppInterfaceUnregistered": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnEncodedSyncPData": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHashChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnHMIStatus": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnLanguageChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnPermissionsChange": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "OnSystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "PutFile": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "RegisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetAppIcon": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SetDisplayLayout": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "SystemRequest": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- },
- "UnregisterAppInterface": {
- "hmi_levels": ["BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"]
- }
- }
- }
- },
- "consumer_friendly_messages": {
- "version": "001.001.019",
- "messages": {
- "AppPermissions": {
- "languages": {
- "de-de": {
- "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.",
- "line1": "Zugriffsanfrage(n)",
- "line2": "erlauben?"
- },
- "en-au": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-gb": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "en-ie": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.",
- "line1": "Grant requested",
- "line2": "permission(s)?"
- },
- "en-us": {
- "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.",
- "line1": "Grant Requested",
- "line2": "Permission(s)?",
- "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu."
- },
- "es-en": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?",
- "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles."
- },
- "es-es": {
- "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.",
- "line1": "¿Conceder permisos",
- "line2": "solicitados?"
- },
- "es-mx": {
- "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.",
- "line1": "¿Otorgar permiso(s)",
- "line2": "solicitado(s)?"
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)",
- "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.",
- "line1": "Accorder permission(s)",
- "line2": "demandée(s)"
- },
- "it-it": {
- "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.",
- "line1": "Concedi autorizzaz.",
- "line2": "richiesta(e)?"
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.",
- "line1": "Aangevraagde",
- "line2": "permissie(s) verlenen?"
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.",
- "line1": "Udzielić żądanych",
- "line2": "pozwoleń?"
- },
- "pt-br": {
- "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.",
- "line1": "Conceder permissão",
- "line2": "solicitada?"
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.",
- "line1": "Conceder permiss.",
- "line2": "solicitada(s)?"
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.",
- "line1": "Предост. заправш.",
- "line2": "разрешения?"
- },
- "sv-se": {
- "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.",
- "line1": "Vill du ge",
- "line2": "tillstånd?"
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.",
- "line1": "İstenen izinler",
- "line2": "verilsin mi?"
- },
- "zh-cn": {
- "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。",
- "line1": "是否允许请求的",
- "line2": "权限?"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。",
- "line1": "允許",
- "line2": "授權請求?"
- }
- }
- },
- "AppPermissionsHelp": {
- "languages": {
- "de-de": {
- "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us": {
- "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es": {
- "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx": {
- "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr": {
- "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it": {
- "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl": {
- "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl": {
- "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br": {
- "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt": {
- "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru": {
- "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se": {
- "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr": {
- "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn": {
- "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw": {
- "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked": {
- "languages": {
- "de-de": {
- "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us": {
- "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx": {
- "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr": {
- "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it": {
- "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl": {
- "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl": {
- "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br": {
- "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt": {
- "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru": {
- "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se": {
- "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr": {
- "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn": {
- "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw": {
- "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.",
- "line1": "nicht autorisiert"
- },
- "en-au": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-gb": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized",
- "textBody": "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "not authorized"
- },
- "en-us": {
- "tts": "This version of %appName% is not authorized and will not work with SYNC.",
- "line1": "Not Authorized",
- "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada",
- "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.",
- "line1": "No autorizada"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.",
- "line1": "no autorizada"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée",
- "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.",
- "line1": "non autorisée"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.",
- "line1": "non autorizzata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.",
- "line1": "niet geautoriseerd"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.",
- "line1": "brak autoryzacji"
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.",
- "line1": "não autorizado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.",
- "line1": "não autorizada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.",
- "line1": "не авторизировано"
- },
- "sv-se": {
- "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.",
- "line1": "är ej godkänd"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.",
- "line1": "için izin yok"
- },
- "zh-cn": {
- "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。",
- "line1": "未得到授权"
- },
- "zh-tw": {
- "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。",
- "line1": "無授權"
- }
- }
- },
- "AppUnsupported": {
- "languages": {
- "de-de": {
- "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.",
- "line1": "nicht unterstützt"
- },
- "en-au": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-gb": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported",
- "textBody": "This version of %appName% is not supported by SYNC."
- },
- "en-ie": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "not supported"
- },
- "en-us": {
- "tts": "This version of %appName% is not supported by SYNC.",
- "line1": "Not Supported",
- "textBody": "Your version of %appName% is not supported by SYNC."
- },
- "es-en": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible",
- "textBody": "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "No compatible"
- },
- "es-mx": {
- "tts": "Esta versión de %appName% no es compatible con SYNC.",
- "line1": "no compatible"
- },
- "fr-ca": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible",
- "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr": {
- "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.",
- "line1": "incompatible"
- },
- "it-it": {
- "tts": "Questa versione di %appName% non è supportata dal SYNC.",
- "line1": "non supportata"
- },
- "nl-nl": {
- "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.",
- "line1": "niet ondersteund"
- },
- "pl-pl": {
- "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.",
- "line1": "aplikacja nie obsług."
- },
- "pt-br": {
- "tts": "Esta versão do %appName% não é suportada pelo SYNC.",
- "line1": "não suportado"
- },
- "pt-pt": {
- "tts": "Esta versão de %appName% não é suportado pelo SYNC.",
- "line1": "não suportada"
- },
- "ru-ru": {
- "tts": "Эта версия %appName% не поддерживается SYNC.",
- "line1": "не поддерживается"
- },
- "sv-se": {
- "tts": "SYNC har inte stöd för den här versionen av %appName%.",
- "line1": "stöds ej"
- },
- "tr-tr": {
- "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.",
- "line1": "desteklenmiyor"
- },
- "zh-cn": {
- "tts": "SYNC不支持此版本的%appName%。",
- "line1": "不受支持"
- },
- "zh-tw": {
- "tts": "SYNC 不支援此版本的%appName% 。",
- "line1": "不支援"
- }
- }
- },
- "DataConsent": {
- "languages": {
- "en-gb": {
- "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "en-us": {
- "line1": "Enable Mobile Apps",
- "line2": "on SYNC? (Uses Data)",
- "textBody": "Would you like to enable Mobile Apps on SYNC?\n\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\n\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. /r Presione Sí para permitir y No para denegar."
- },
- "fr-ca": {
- "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements. /r Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- }
- }
- },
- "DataConsentHelp": {
- "languages": {
- "en-us": {
- "textBody": "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. See your Owner Guide for more information."
- },
- "es-en": {
- "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario."
- },
- "fr-ca": {
- "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements."
- }
- }
- },
- "DisableApps": {
- "languages": {
- "de-de": {
- "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.",
- "line1": "Auto-Update",
- "line2": "und Mobile Apps deaktivieren"
- },
- "en-au": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-gb": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie": {
- "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.",
- "line1": "Disable auto-updates",
- "line2": "and Mobile Apps?"
- },
- "en-us": {
- "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.",
- "line1": "Disable Auto-Updates",
- "line2": "and Mobile Apps?",
- "textBody": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?",
- "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es": {
- "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.",
- "line1": "¿Desact. actual. auto",
- "line2": "y apl. móviles?"
- },
- "es-mx": {
- "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.",
- "line1": "¿Deshab. actualiz.",
- "line2": "autom. y aplic. móv.?"
- },
- "fr-ca": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?",
- "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr": {
- "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.",
- "line1": "Désactiver màj autom.",
- "line2": "et app. mobiles?"
- },
- "it-it": {
- "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.",
- "line1": "Disabilitare agg. aut.",
- "line2": "e app mobili?"
- },
- "nl-nl": {
- "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.",
- "line1": "Auto-updates en mob.",
- "line2": "apps uitschakelen?"
- },
- "pl-pl": {
- "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.",
- "line1": "Wył. automat. aktual.",
- "line2": "i aplikacje mobilne?"
- },
- "pt-br": {
- "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.",
- "line1": "Desativar atualizações",
- "line2": "autom. e aplicativos?"
- },
- "pt-pt": {
- "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.",
- "line1": "Desact. actual. autom.",
- "line2": "e aplicações móveis?"
- },
- "ru-ru": {
- "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.",
- "line1": "Откл. автообновления",
- "line2": "и мобил. прилож.?"
- },
- "sv-se": {
- "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.",
- "line1": "Avaktiverar autouppdat.",
- "line2": "och mobilappar?"
- },
- "tr-tr": {
- "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.",
- "line1": "Oto. güncelleme ve",
- "line2": "mobil uygul. kapat?"
- },
- "zh-cn": {
- "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。",
- "line1": "是否禁用自动更新和",
- "line2": "移动应用程序?"
- },
- "zh-tw": {
- "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。",
- "line1": "停用自動更新",
- "line2": "和行動應用程式?"
- }
- }
- },
- "DrivingCharacteristics": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.",
- "label": "Fahreigenschaften"
- },
- "en-au": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-gb": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie": {
- "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.",
- "label": "Driving characteristics"
- },
- "en-us": {
- "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.",
- "label": "Driving Characteristics",
- "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo",
- "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.",
- "label": "Características de conducción"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.",
- "label": "Características del manejo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite",
- "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.",
- "label": "Caractéristiques de conduite"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.",
- "label": "Caratteristiche di guida"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.",
- "label": "Rijkenmerken"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.",
- "label": "Informacje dotyczące stylu jazdy"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.",
- "label": "Características de condução"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.",
- "label": "Características de condução"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.",
- "label": "Характеристики движения"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.",
- "label": "Köregenskaper"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.",
- "label": "Sürüş karakteristikleri"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态",
- "label": "行驶特性"
- },
- "zh-tw": {
- "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態",
- "label": "駕駛特性"
- }
- }
- },
- "Location": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.",
- "label": "GPS und Geschwindigkeit"
- },
- "en-au": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-gb": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "en-ie": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed"
- },
- "en-us": {
- "tts": "An app can access vehicle GPS and speed.",
- "label": "GPS and speed",
- "textBody": "An app can access vehicle GPS and speed."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad",
- "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.",
- "label": "GPS y velocidad"
- },
- "fr-ca": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse",
- "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr": {
- "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.",
- "label": "GPS et vitesse"
- },
- "it-it": {
- "tts": "Un'app può avere accesso a GPS e velocità del veicolo.",
- "label": "GPS e velocità"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.",
- "label": "Gps en snelheid"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.",
- "label": "GPS i prędkość"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.",
- "label": "GPS e velocidade"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к GPS и скорости автомобиля.",
- "label": "GPS и скорость"
- },
- "sv-se": {
- "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.",
- "label": "GPS och hastighet"
- },
- "tr-tr": {
- "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.",
- "label": "GPS ve hız"
- },
- "zh-cn": {
- "tts": "移动应用程序可以访问车辆 GPS 和车速信息。",
- "label": "GPS 和车速"
- },
- "zh-tw": {
- "tts": "應用程式可存取車輛的GPS和速度。",
- "label": "GPS和車速"
- }
- }
- },
- "Notifications": {
- "languages": {
- "de-de": {
- "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.",
- "label": "Push-Benachrichtigungen"
- },
- "en-au": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-gb": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "en-ie": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications"
- },
- "en-us": {
- "tts": "An app can send notifications when running in the background.",
- "label": "Push notifications",
- "textBody": "An app can send notifications when running in the background."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push",
- "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es": {
- "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.",
- "label": "Notificaciones push"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.",
- "label": "Notificaciones tipo Push"
- },
- "fr-ca": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications instantanées",
- "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr": {
- "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.",
- "label": "Notifications push"
- },
- "it-it": {
- "tts": "Un'app può inviare notifiche se eseguita in background.",
- "label": "Notifiche push"
- },
- "nl-nl": {
- "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.",
- "label": "Push-meldingen"
- },
- "pl-pl": {
- "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.",
- "label": "Powiadomienia Push"
- },
- "pt-br": {
- "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.",
- "label": "Notificações Push"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.",
- "label": "Notificações push"
- },
- "ru-ru": {
- "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.",
- "label": "Оповещения о пересылке"
- },
- "sv-se": {
- "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.",
- "label": "Push-notiser"
- },
- "tr-tr": {
- "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.",
- "label": "Anlık bildirimleri"
- },
- "zh-cn": {
- "tts": "移动应用程序在后台运行时可推送通知。",
- "label": "推送通知"
- },
- "zh-tw": {
- "tts": "車輛行進時,應用程式可在背景中傳送通知。",
- "label": "傳送通知"
- }
- }
- },
- "SettingDisableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Updates deakt."
- },
- "en-au": {
- "line1": "Disable updates"
- },
- "en-gb": {
- "line1": "Disable updates"
- },
- "en-ie": {
- "line1": "Disable updates"
- },
- "en-us": {
- "line1": "Disable Updates",
- "textBody": "Disable Updates"
- },
- "es-en": {
- "line1": "Deshab. actual.",
- "textBody": "Deshab. actual."
- },
- "es-es": {
- "line1": "Desact. actual."
- },
- "es-mx": {
- "line1": "Deshab. actual."
- },
- "fr-ca": {
- "line1": "Désactiver MAJ",
- "textBody": "Désactiver MAJ"
- },
- "fr-fr": {
- "line1": "Désactiver màj"
- },
- "it-it": {
- "line1": "Disabilita agg."
- },
- "nl-nl": {
- "line1": "Upd. uitschak."
- },
- "pl-pl": {
- "line1": "Wyłącz aktual."
- },
- "pt-br": {
- "line1": "Desat. atualiz."
- },
- "pt-pt": {
- "line1": "Desact. actualiz."
- },
- "ru-ru": {
- "line1": "Откл. обновл."
- },
- "sv-se": {
- "line1": "Inaktivera uppd."
- },
- "tr-tr": {
- "line1": "Güncell. Kapat"
- },
- "zh-cn": {
- "line1": "禁用更新"
- },
- "zh-tw": {
- "line1": "停用更新"
- }
- }
- },
- "SettingEnableUpdates": {
- "languages": {
- "de-de": {
- "line1": "Apps aktivieren"
- },
- "en-au": {
- "line1": "Enable Apps"
- },
- "en-gb": {
- "line1": "Enable Apps"
- },
- "en-ie": {
- "line1": "Enable Apps"
- },
- "en-us": {
- "line1": "Enable Apps"
- },
- "es-en": {
- "line1": "Hab. aplic."
- },
- "es-es": {
- "line1": "Activar apl."
- },
- "es-mx": {
- "line1": "Hab. aplic."
- },
- "fr-ca": {
- "line1": "Activer app.",
- "textBody": "Activer app."
- },
- "fr-fr": {
- "line1": "Activer app."
- },
- "it-it": {
- "line1": "Abilita app"
- },
- "nl-nl": {
- "line1": "Apps inschak."
- },
- "pl-pl": {
- "line1": "Włącz aplikacje"
- },
- "pt-br": {
- "line1": "Ativar aplic."
- },
- "pt-pt": {
- "line1": "Activar actualiz."
- },
- "ru-ru": {
- "line1": "Вкл. прилож."
- },
- "sv-se": {
- "line1": "Aktivera appar"
- },
- "tr-tr": {
- "line1": "Uygulamaları aç"
- },
- "zh-cn": {
- "line1": "启用应用程序"
- },
- "zh-tw": {
- "line1": "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto": {
- "languages": {
- "de-de": {
- "line1": "Update anford."
- },
- "en-au": {
- "line1": "Request update"
- },
- "en-gb": {
- "line1": "Request update"
- },
- "en-ie": {
- "line1": "Request update"
- },
- "en-us": {
- "line1": "Request Update",
- "textBody": "Select `Update now` to receive app authorization information for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute."
- },
- "es-en": {
- "line1": "Solicit. actualiz.",
- "textBody": "Solicit. actualiz."
- },
- "es-es": {
- "line1": "Solicitar actual."
- },
- "es-mx": {
- "line1": "Solicit. actualiz."
- },
- "fr-ca": {
- "line1": "Demander MAJ",
- "textBody": "Demander MAJ"
- },
- "fr-fr": {
- "line1": "Demander màj"
- },
- "it-it": {
- "line1": "Rich. aggiorn."
- },
- "nl-nl": {
- "line1": "Upd. aanvragen"
- },
- "pl-pl": {
- "line1": "Zażądaj aktual."
- },
- "pt-br": {
- "line1": "Solicitar atualiz."
- },
- "pt-pt": {
- "line1": "Solicit. actualiz."
- },
- "ru-ru": {
- "line1": "Запрос на обн."
- },
- "sv-se": {
- "line1": "Begär uppdat."
- },
- "tr-tr": {
- "line1": "Güncelleme iste"
- },
- "zh-cn": {
- "line1": "请求更新"
- },
- "zh-tw": {
- "line1": "請求更新"
- }
- }
- },
- "StatusNeeded": {
- "languages": {
- "de-de": {
- "line1": "Update benötigt"
- },
- "en-au": {
- "line1": "Update needed"
- },
- "en-gb": {
- "line1": "Update needed",
- "textBody": "Update needed"
- },
- "en-ie": {
- "line1": "Update needed"
- },
- "en-us": {
- "line1": "Update Needed",
- "textBody": "Update Needed"
- },
- "es-en": {
- "line1": "Actualiz. neces.",
- "textBody": "Actualiz. neces."
- },
- "es-es": {
- "line1": "Actu. necesaria"
- },
- "es-mx": {
- "line1": "Actualiz. neces."
- },
- "fr-ca": {
- "line1": "Màj requise",
- "textBody": "Màj requise"
- },
- "fr-fr": {
- "line1": "Mise à jour requise"
- },
- "it-it": {
- "line1": "Necess. aggiorn."
- },
- "nl-nl": {
- "line1": "Update nodig"
- },
- "pl-pl": {
- "line1": "Potrzeba aktual."
- },
- "pt-br": {
- "line1": "Atualiz. necess."
- },
- "pt-pt": {
- "line1": "Actual. necess."
- },
- "ru-ru": {
- "line1": "Необх. обновл."
- },
- "sv-se": {
- "line1": "Uppdat. krävs"
- },
- "tr-tr": {
- "line1": "Güncellenmeli"
- },
- "zh-cn": {
- "line1": "需要进行更新"
- },
- "zh-tw": {
- "line1": "需更新"
- }
- }
- },
- "StatusPending": {
- "languages": {
- "de-de": {
- "line1": "Aktualisieren..."
- },
- "en-au": {
- "line1": "Updating..."
- },
- "en-gb": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "en-ie": {
- "line1": "Updating..."
- },
- "en-us": {
- "line1": "Updating...",
- "textBody": "Updating..."
- },
- "es-en": {
- "line1": "Actualizando...",
- "textBody": "Actualizando..."
- },
- "es-es": {
- "line1": "Actualizando..."
- },
- "es-mx": {
- "line1": "Actualizando..."
- },
- "fr-ca": {
- "line1": "MAJ en cours...",
- "textBody": "MAJ en cours..."
- },
- "fr-fr": {
- "line1": "Màj en cours..."
- },
- "it-it": {
- "line1": "Aggiornamento"
- },
- "nl-nl": {
- "line1": "Updaten..."
- },
- "pl-pl": {
- "line1": "Aktualizowanie"
- },
- "pt-br": {
- "line1": "Atualizando..."
- },
- "pt-pt": {
- "line1": "A actualizar..."
- },
- "ru-ru": {
- "line1": "Обновление..."
- },
- "sv-se": {
- "line1": "Uppdaterar..."
- },
- "tr-tr": {
- "line1": "Güncelleniyor..."
- },
- "zh-cn": {
- "line1": "正在更新......"
- },
- "zh-tw": {
- "line1": "更新中..."
- }
- }
- },
- "StatusUpToDate": {
- "languages": {
- "de-de": {
- "line1": "Aktuelle Version"
- },
- "en-au": {
- "line1": "Up-to-date"
- },
- "en-gb": {
- "line1": "Up-to-date",
- "textBody": "Up-to-date"
- },
- "en-ie": {
- "line1": "Up-to-date"
- },
- "en-us": {
- "line1": "Up-To-Date",
- "textBody": "Up-To-Date"
- },
- "es-en": {
- "line1": "Actualizado",
- "textBody": "Actualizado"
- },
- "es-es": {
- "line1": "Actualizada"
- },
- "es-mx": {
- "line1": "Actualizado"
- },
- "fr-ca": {
- "line1": "Déjà à jour",
- "textBody": "Déjà à jour"
- },
- "fr-fr": {
- "line1": "Déjà à jour"
- },
- "it-it": {
- "line1": "più recente"
- },
- "nl-nl": {
- "line1": "Up-to-date"
- },
- "pl-pl": {
- "line1": "Aktualne"
- },
- "pt-br": {
- "line1": "Atualizado"
- },
- "pt-pt": {
- "line1": "Actualizado"
- },
- "ru-ru": {
- "line1": "Обновлено"
- },
- "sv-se": {
- "line1": "Uppdat. krävs ej"
- },
- "tr-tr": {
- "line1": "Güncel"
- },
- "zh-cn": {
- "line1": "最新更新"
- },
- "zh-tw": {
- "line1": "更新最新"
- }
- }
- },
- "VehicleInfo": {
- "languages": {
- "de-de": {
- "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.",
- "label": "Fahrzeuginformationen"
- },
- "en-au": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-gb": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure."
- },
- "en-ie": {
- "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.",
- "label": "Vehicle information"
- },
- "en-us": {
- "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.",
- "label": "Vehicle information",
- "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo",
- "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es": {
- "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.",
- "label": "Información del vehículo"
- },
- "es-mx": {
- "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.",
- "label": "Información del vehículo"
- },
- "fr-ca": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.",
- "label": "Renseignements du véhicule",
- "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr": {
- "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.",
- "label": "Renseignements du véhicule"
- },
- "it-it": {
- "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.",
- "label": "Informazioni sul veicolo"
- },
- "nl-nl": {
- "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.",
- "label": "Voertuiginformatie"
- },
- "pl-pl": {
- "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.",
- "label": "Informacje o pojeździe"
- },
- "pt-br": {
- "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.",
- "label": "Informações sobre o veículo"
- },
- "pt-pt": {
- "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.",
- "label": "Informações do veículo"
- },
- "ru-ru": {
- "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.",
- "label": "Информация об автомобиле"
- },
- "sv-se": {
- "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.",
- "label": "Fordonsinformation"
- },
- "tr-tr": {
- "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.",
- "label": "Araç bilgisi"
- },
- "zh-cn": {
- "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.",
- "label": "车辆信息"
- },
- "zh-tw": {
- "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.",
- "label": "車輛資訊"
- }
- }
- }
- }
- },
- "app_policies": {
- "default": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["Base-4"],
- "RequestType": [
- "QUERY_APPS",
- "LAUNCH_APP",
- "PROPRIETARY"
- ]
- },
- "device": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["DataConsent-2"]
- },
- "pre_DataConsent": {
- "keep_context": false,
- "steal_focus": false,
- "priority": "NONE",
- "default_hmi": "NONE",
- "groups": ["BaseBeforeDataConsent"],
- "RequestType": ["HTTP"]
- }
- }
- }
- }
diff --git a/src/components/policy/policy_regular/test/sdl_pt_first_update.json b/src/components/policy/policy_regular/test/sdl_pt_first_update.json
deleted file mode 100644
index 440963ba48..0000000000
--- a/src/components/policy/policy_regular/test/sdl_pt_first_update.json
+++ /dev/null
@@ -1,1764 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "watchdog_timer_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- }
- },
- "consumer_friendly_messages" : {
- "messages" : {
- "AppPermissions" : {
- "languages" : {
- "de-de" : {
- "line1" : "Zugriffsanfrage(n)",
- "line2" : "erlauben?",
- "tts" : "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-gb" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-ie" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-us" : {
- "line1" : "Grant Requested",
- "line2" : "Permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press yes to allow or no to deny."
- },
- "es-en" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "es-es" : {
- "line1" : "¿Conceder permisos",
- "line2" : "solicitados?",
- "tts" : "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar."
- },
- "es-mx" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "fr-ca" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "fr-fr" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "it-it" : {
- "line1" : "Concedi autorizzaz.",
- "line2" : "richiesta(e)?",
- "tts" : "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare."
- },
- "nl-nl" : {
- "line1" : "Aangevraagde",
- "line2" : "permissie(s) verlenen?",
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren."
- },
- "pl-pl" : {
- "line1" : "Udzielić żądanych",
- "line2" : "pozwoleń?",
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "line1" : "Conceder permissão",
- "line2" : "solicitada?",
- "tts" : "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar."
- },
- "pt-pt" : {
- "line1" : "Conceder permiss.",
- "line2" : "solicitada(s)?",
- "tts" : "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar."
- },
- "ru-ru" : {
- "line1" : "Предост. заправш.",
- "line2" : "разрешения?",
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны."
- },
- "sv-se" : {
- "line1" : "Vill du ge",
- "line2" : "tillstånd?",
- "tts" : "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka."
- },
- "tr-tr" : {
- "line1" : "İstenen izinler",
- "line2" : "verilsin mi?",
- "tts" : "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否允许请求的",
- "line2" : "权限?",
- "tts" : "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。"
- },
- "zh-tw" : {
- "line1" : "允許",
- "line2" : "授權請求?",
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsHelp" : {
- "languages" : {
- "de-de" : {
- "tts" : "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es" : {
- "tts" : "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it" : {
- "tts" : "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl" : {
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl" : {
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "tts" : "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt" : {
- "tts" : "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru" : {
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se" : {
- "tts" : "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr" : {
- "tts" : "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "tts" : "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw" : {
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked" : {
- "languages" : {
- "de-de" : {
- "tts" : "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it" : {
- "tts" : "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl" : {
- "tts" : "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl" : {
- "tts" : "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br" : {
- "tts" : "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt" : {
- "tts" : "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru" : {
- "tts" : "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se" : {
- "tts" : "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr" : {
- "tts" : "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn" : {
- "tts" : "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw" : {
- "tts" : "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht autorisiert",
- "tts" : "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren."
- },
- "en-au" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-gb" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-us" : {
- "line1" : "Not Authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "es-en" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es" : {
- "line1" : "No autorizada",
- "tts" : "Esta versión de %appName% no está autorizada y no funcionará con SYNC."
- },
- "es-mx" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "it-it" : {
- "line1" : "non autorizzata",
- "tts" : "Questa versione di %appName% non è autorizzata e non funziona con il SYNC."
- },
- "nl-nl" : {
- "line1" : "niet geautoriseerd",
- "tts" : "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC."
- },
- "pl-pl" : {
- "line1" : "brak autoryzacji",
- "tts" : "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC."
- },
- "pt-br" : {
- "line1" : "não autorizado",
- "tts" : "Esta versão do %appName% não tem autorização e não funcionará com o SYNC."
- },
- "pt-pt" : {
- "line1" : "não autorizada",
- "tts" : "Esta versão de %appName% não está autorizada e não funcionará com o SYNC."
- },
- "ru-ru" : {
- "line1" : "не авторизировано",
- "tts" : "Эта версия %appName% не авторизирована и не будет работать с SYNC."
- },
- "sv-se" : {
- "line1" : "är ej godkänd",
- "tts" : "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC."
- },
- "tr-tr" : {
- "line1" : "için izin yok",
- "tts" : "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz."
- },
- "zh-cn" : {
- "line1" : "未得到授权",
- "tts" : "此版本的%appName% 未得到授权,无法在SYNC上使用。"
- },
- "zh-tw" : {
- "line1" : "無授權",
- "tts" : "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。"
- }
- }
- },
- "AppUnsupported" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht unterstützt",
- "tts" : "Diese Version von %appName% wird von SYNC nicht unterstützt."
- },
- "en-au" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-gb" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-ie" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-us" : {
- "line1" : "Not Supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "es-en" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es" : {
- "line1" : "No compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-mx" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "it-it" : {
- "line1" : "non supportata",
- "tts" : "Questa versione di %appName% non è supportata dal SYNC."
- },
- "nl-nl" : {
- "line1" : "niet ondersteund",
- "tts" : "Deze versie van %appName% wordt niet ondersteund door SYNC."
- },
- "pl-pl" : {
- "line1" : "aplikacja nie obsług.",
- "tts" : "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC."
- },
- "pt-br" : {
- "line1" : "não suportado",
- "tts" : "Esta versão do %appName% não é suportada pelo SYNC."
- },
- "pt-pt" : {
- "line1" : "não suportada",
- "tts" : "Esta versão de %appName% não é suportado pelo SYNC."
- },
- "ru-ru" : {
- "line1" : "не поддерживается",
- "tts" : "Эта версия %appName% не поддерживается SYNC."
- },
- "sv-se" : {
- "line1" : "stöds ej",
- "tts" : "SYNC har inte stöd för den här versionen av %appName%."
- },
- "tr-tr" : {
- "line1" : "desteklenmiyor",
- "tts" : "Bu %appName% sürümü SYNC tarafından desteklenmiyor."
- },
- "zh-cn" : {
- "line1" : "不受支持",
- "tts" : "SYNC不支持此版本的%appName%。"
- },
- "zh-tw" : {
- "line1" : "不支援",
- "tts" : "SYNC 不支援此版本的%appName% 。"
- }
- }
- },
- "DataConsent" : {
- "languages" : {
- "en-us" : {
- "line1" : "Enable Mobile Apps",
- "line2" : "on SYNC? (Uses Data)",
- "tts" : "To use mobile apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device's data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Please press yes or no, or help for more information. "
- }
- }
- },
- "DataConsentHelp" : {
- "languages" : {
- "en-us" : {
- "tts" : "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC mobile apps settings menu. See your Owner Guide for more information. "
- }
- }
- },
- "DisableApps" : {
- "languages" : {
- "de-de" : {
- "line1" : "Auto-Update",
- "line2" : "und Mobile Apps deaktivieren",
- "tts" : "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen."
- },
- "en-au" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-gb" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-us" : {
- "line1" : "Disable Auto-Updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es" : {
- "line1" : "¿Desact. actual. auto",
- "line2" : "y apl. móviles?",
- "tts" : "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar."
- },
- "es-mx" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "it-it" : {
- "line1" : "Disabilitare agg. aut.",
- "line2" : "e app mobili?",
- "tts" : "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare."
- },
- "nl-nl" : {
- "line1" : "Auto-updates en mob.",
- "line2" : "apps uitschakelen?",
- "tts" : "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren."
- },
- "pl-pl" : {
- "line1" : "Wył. automat. aktual.",
- "line2" : "i aplikacje mobilne?",
- "tts" : "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować."
- },
- "pt-br" : {
- "line1" : "Desativar atualizações",
- "line2" : "autom. e aplicativos?",
- "tts" : "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar."
- },
- "pt-pt" : {
- "line1" : "Desact. actual. autom.",
- "line2" : "e aplicações móveis?",
- "tts" : "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar."
- },
- "ru-ru" : {
- "line1" : "Откл. автообновления",
- "line2" : "и мобил. прилож.?",
- "tts" : "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены."
- },
- "sv-se" : {
- "line1" : "Avaktiverar autouppdat.",
- "line2" : "och mobilappar?",
- "tts" : "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta."
- },
- "tr-tr" : {
- "line1" : "Oto. güncelleme ve",
- "line2" : "mobil uygul. kapat?",
- "tts" : "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否禁用自动更新和",
- "line2" : "移动应用程序?",
- "tts" : "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。"
- },
- "zh-tw" : {
- "line1" : "停用自動更新",
- "line2" : "和行動應用程式?",
- "tts" : "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。"
- }
- }
- },
- "DrivingCharacteristics" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahreigenschaften",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus."
- },
- "en-au" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-gb" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-us" : {
- "label" : "Driving Characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es" : {
- "label" : "Características de conducción",
- "tts" : "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad."
- },
- "es-mx" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "fr-ca" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "it-it" : {
- "label" : "Caratteristiche di guida",
- "tts" : "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza."
- },
- "nl-nl" : {
- "label" : "Rijkenmerken",
- "tts" : "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus."
- },
- "pl-pl" : {
- "label" : "Informacje dotyczące stylu jazdy",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa."
- },
- "pt-br" : {
- "label" : "Características de condução",
- "tts" : "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança."
- },
- "pt-pt" : {
- "label" : "Características de condução",
- "tts" : "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança."
- },
- "ru-ru" : {
- "label" : "Характеристики движения",
- "tts" : "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности."
- },
- "sv-se" : {
- "label" : "Köregenskaper",
- "tts" : "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus."
- },
- "tr-tr" : {
- "label" : "Sürüş karakteristikleri",
- "tts" : "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu."
- },
- "zh-cn" : {
- "label" : "行驶特性",
- "tts" : "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态"
- },
- "zh-tw" : {
- "label" : "駕駛特性",
- "tts" : "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態"
- }
- }
- },
- "Location" : {
- "languages" : {
- "de-de" : {
- "label" : "GPS und Geschwindigkeit",
- "tts" : "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs."
- },
- "en-au" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-gb" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-ie" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-us" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "es-en" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es" : {
- "label" : "GPS y velocidad",
- "tts" : "Una aplicación puede acceder al GPS y la velocidad del vehículo."
- },
- "es-mx" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "it-it" : {
- "label" : "GPS e velocità",
- "tts" : "Un'app può avere accesso a GPS e velocità del veicolo."
- },
- "nl-nl" : {
- "label" : "Gps en snelheid",
- "tts" : "Een app heeft toegang tot gps en de snelheid van het voertuig."
- },
- "pl-pl" : {
- "label" : "GPS i prędkość",
- "tts" : "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu."
- },
- "pt-br" : {
- "label" : "GPS e velocidade",
- "tts" : "Um aplicativo pode acessar o GPS e a velocidade do veículo."
- },
- "pt-pt" : {
- "label" : "GPS e velocidade",
- "tts" : "Uma aplicação consegue aceder ao GPS e à velocidade do veículo."
- },
- "ru-ru" : {
- "label" : "GPS и скорость",
- "tts" : "Приложение имеет доступ к GPS и скорости автомобиля."
- },
- "sv-se" : {
- "label" : "GPS och hastighet",
- "tts" : "Appen kan komma åt fordonets GPS och hastighetsmätare."
- },
- "tr-tr" : {
- "label" : "GPS ve hız",
- "tts" : "Bu uygulama aracın GPS ve hız bilgilerine erişebilir."
- },
- "zh-cn" : {
- "label" : "GPS 和车速",
- "tts" : "移动应用程序可以访问车辆 GPS 和车速信息。"
- },
- "zh-tw" : {
- "label" : "GPS和車速",
- "tts" : "應用程式可存取車輛的GPS和速度。"
- }
- }
- },
- "Notifications" : {
- "languages" : {
- "de-de" : {
- "label" : "Push-Benachrichtigungen",
- "tts" : "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden."
- },
- "en-au" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-gb" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-ie" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-us" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "es-en" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es" : {
- "label" : "Notificaciones push",
- "tts" : "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano."
- },
- "es-mx" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca" : {
- "label" : "Notifications instantanées",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr" : {
- "label" : "Notifications push",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "it-it" : {
- "label" : "Notifiche push",
- "tts" : "Un'app può inviare notifiche se eseguita in background."
- },
- "nl-nl" : {
- "label" : "Push-meldingen",
- "tts" : "Een app kan meldingen versturen als deze op de achtergrond actief is."
- },
- "pl-pl" : {
- "label" : "Powiadomienia Push",
- "tts" : "Aplikacja może wysyłać powiadomienia, działając w tle."
- },
- "pt-br" : {
- "label" : "Notificações Push",
- "tts" : "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano."
- },
- "pt-pt" : {
- "label" : "Notificações push",
- "tts" : "Uma aplicação consegue enviar notificações quando está activa em segundo plano."
- },
- "ru-ru" : {
- "label" : "Оповещения о пересылке",
- "tts" : "Если приложение работает в фоновом режиме, оно может отправлять оповещения."
- },
- "sv-se" : {
- "label" : "Push-notiser",
- "tts" : "Appen kan skicka meddelanden när den körs i bakgrunden."
- },
- "tr-tr" : {
- "label" : "Anlık bildirimleri",
- "tts" : "Bir uygulama arka planda çalışırken bildirim gönderebilir."
- },
- "zh-cn" : {
- "label" : "推送通知",
- "tts" : "移动应用程序在后台运行时可推送通知。"
- },
- "zh-tw" : {
- "label" : "傳送通知",
- "tts" : "車輛行進時,應用程式可在背景中傳送通知。"
- }
- }
- },
- "SettingDisableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Updates deakt."
- },
- "en-au" : {
- "line1" : "Disable updates"
- },
- "en-gb" : {
- "line1" : "Disable updates"
- },
- "en-ie" : {
- "line1" : "Disable updates"
- },
- "en-us" : {
- "line1" : "Disable Updates"
- },
- "es-en" : {
- "line1" : "Deshab. actual."
- },
- "es-es" : {
- "line1" : "Desact. actual."
- },
- "es-mx" : {
- "line1" : "Deshab. actual."
- },
- "fr-ca" : {
- "line1" : "Désactiver MAJ"
- },
- "fr-fr" : {
- "line1" : "Désactiver màj"
- },
- "it-it" : {
- "line1" : "Disabilita agg."
- },
- "nl-nl" : {
- "line1" : "Upd. uitschak."
- },
- "pl-pl" : {
- "line1" : "Wyłącz aktual."
- },
- "pt-br" : {
- "line1" : "Desat. atualiz."
- },
- "pt-pt" : {
- "line1" : "Desact. actualiz."
- },
- "ru-ru" : {
- "line1" : "Откл. обновл."
- },
- "sv-se" : {
- "line1" : "Inaktivera uppd."
- },
- "tr-tr" : {
- "line1" : "Güncell. Kapat"
- },
- "zh-cn" : {
- "line1" : "禁用更新"
- },
- "zh-tw" : {
- "line1" : "停用更新"
- }
- }
- },
- "SettingEnableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Apps aktivieren"
- },
- "en-au" : {
- "line1" : "Enable Apps"
- },
- "en-gb" : {
- "line1" : "Enable Apps"
- },
- "en-ie" : {
- "line1" : "Enable Apps"
- },
- "en-us" : {
- "line1" : "Enable Apps"
- },
- "es-en" : {
- "line1" : "Hab. aplic."
- },
- "es-es" : {
- "line1" : "Activar apl."
- },
- "es-mx" : {
- "line1" : "Hab. aplic."
- },
- "fr-ca" : {
- "line1" : "Activer app."
- },
- "fr-fr" : {
- "line1" : "Activer app."
- },
- "it-it" : {
- "line1" : "Abilita app"
- },
- "nl-nl" : {
- "line1" : "Apps inschak."
- },
- "pl-pl" : {
- "line1" : "Włącz aplikacje"
- },
- "pt-br" : {
- "line1" : "Ativar aplic."
- },
- "pt-pt" : {
- "line1" : "Activar actualiz."
- },
- "ru-ru" : {
- "line1" : "Вкл. прилож."
- },
- "sv-se" : {
- "line1" : "Aktivera appar"
- },
- "tr-tr" : {
- "line1" : "Uygulamaları aç"
- },
- "zh-cn" : {
- "line1" : "启用应用程序"
- },
- "zh-tw" : {
- "line1" : "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update anford."
- },
- "en-au" : {
- "line1" : "Request update"
- },
- "en-gb" : {
- "line1" : "Request update"
- },
- "en-ie" : {
- "line1" : "Request update"
- },
- "en-us" : {
- "line1" : "Request Update"
- },
- "es-en" : {
- "line1" : "Solicit. actualiz."
- },
- "es-es" : {
- "line1" : "Solicitar actual."
- },
- "es-mx" : {
- "line1" : "Solicit. actualiz."
- },
- "fr-ca" : {
- "line1" : "Demander MAJ"
- },
- "fr-fr" : {
- "line1" : "Demander màj"
- },
- "it-it" : {
- "line1" : "Rich. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Upd. aanvragen"
- },
- "pl-pl" : {
- "line1" : "Zażądaj aktual."
- },
- "pt-br" : {
- "line1" : "Solicitar atualiz."
- },
- "pt-pt" : {
- "line1" : "Solicit. actualiz."
- },
- "ru-ru" : {
- "line1" : "Запрос на обн."
- },
- "sv-se" : {
- "line1" : "Begär uppdat."
- },
- "tr-tr" : {
- "line1" : "Güncelleme iste"
- },
- "zh-cn" : {
- "line1" : "请求更新"
- },
- "zh-tw" : {
- "line1" : "請求更新"
- }
- }
- },
- "StatusNeeded" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update benötigt"
- },
- "en-au" : {
- "line1" : "Update needed"
- },
- "en-gb" : {
- "line1" : "Update needed"
- },
- "en-ie" : {
- "line1" : "Update needed"
- },
- "en-us" : {
- "line1" : "Update Needed"
- },
- "es-en" : {
- "line1" : "Actualiz. neces."
- },
- "es-es" : {
- "line1" : "Actu. necesaria"
- },
- "es-mx" : {
- "line1" : "Actualiz. neces."
- },
- "fr-ca" : {
- "line1" : "Màj requise"
- },
- "fr-fr" : {
- "line1" : "Mise à jour requise"
- },
- "it-it" : {
- "line1" : "Necess. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Update nodig"
- },
- "pl-pl" : {
- "line1" : "Potrzeba aktual."
- },
- "pt-br" : {
- "line1" : "Atualiz. necess."
- },
- "pt-pt" : {
- "line1" : "Actual. necess."
- },
- "ru-ru" : {
- "line1" : "Необх. обновл."
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs"
- },
- "tr-tr" : {
- "line1" : "Güncellenmeli"
- },
- "zh-cn" : {
- "line1" : "需要进行更新"
- },
- "zh-tw" : {
- "line1" : "需更新"
- }
- }
- },
- "StatusPending" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktualisieren..."
- },
- "en-au" : {
- "line1" : "Updating..."
- },
- "en-gb" : {
- "line1" : "Updating..."
- },
- "en-ie" : {
- "line1" : "Updating..."
- },
- "en-us" : {
- "line1" : "Updating..."
- },
- "es-en" : {
- "line1" : "Actualizando..."
- },
- "es-es" : {
- "line1" : "Actualizando..."
- },
- "es-mx" : {
- "line1" : "Actualizando..."
- },
- "fr-ca" : {
- "line1" : "MAJ en cours..."
- },
- "fr-fr" : {
- "line1" : "Màj en cours..."
- },
- "it-it" : {
- "line1" : "Aggiornamento"
- },
- "nl-nl" : {
- "line1" : "Updaten..."
- },
- "pl-pl" : {
- "line1" : "Aktualizowanie"
- },
- "pt-br" : {
- "line1" : "Atualizando..."
- },
- "pt-pt" : {
- "line1" : "A actualizar..."
- },
- "ru-ru" : {
- "line1" : "Обновление..."
- },
- "sv-se" : {
- "line1" : "Uppdaterar..."
- },
- "tr-tr" : {
- "line1" : "Güncelleniyor..."
- },
- "zh-cn" : {
- "line1" : "正在更新......"
- },
- "zh-tw" : {
- "line1" : "更新中..."
- }
- }
- },
- "StatusUpToDate" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktuelle Version"
- },
- "en-au" : {
- "line1" : "Up-to-date"
- },
- "en-gb" : {
- "line1" : "Up-to-date"
- },
- "en-ie" : {
- "line1" : "Up-to-date"
- },
- "en-us" : {
- "line1" : "Up-To-Date"
- },
- "es-en" : {
- "line1" : "Actualizado"
- },
- "es-es" : {
- "line1" : "Actualizada"
- },
- "es-mx" : {
- "line1" : "Actualizado"
- },
- "fr-ca" : {
- "line1" : "Déjà à jour"
- },
- "fr-fr" : {
- "line1" : "Déjà à jour"
- },
- "it-it" : {
- "line1" : "più recente"
- },
- "nl-nl" : {
- "line1" : "Up-to-date"
- },
- "pl-pl" : {
- "line1" : "Aktualne"
- },
- "pt-br" : {
- "line1" : "Atualizado"
- },
- "pt-pt" : {
- "line1" : "Actualizado"
- },
- "ru-ru" : {
- "line1" : "Обновлено"
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs ej"
- },
- "tr-tr" : {
- "line1" : "Güncel"
- },
- "zh-cn" : {
- "line1" : "最新更新"
- },
- "zh-tw" : {
- "line1" : "更新最新"
- }
- }
- },
- "VehicleInfo" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahrzeuginformationen",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck."
- },
- "en-au" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-gb" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-ie" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-us" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es" : {
- "label" : "Información del vehículo",
- "tts" : "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos."
- },
- "es-mx" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "fr-ca" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus."
- },
- "it-it" : {
- "label" : "Informazioni sul veicolo",
- "tts" : "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici."
- },
- "nl-nl" : {
- "label" : "Voertuiginformatie",
- "tts" : "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning."
- },
- "pl-pl" : {
- "label" : "Informacje o pojeździe",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon."
- },
- "pt-br" : {
- "label" : "Informações sobre o veículo",
- "tts" : "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus."
- },
- "pt-pt" : {
- "label" : "Informações do veículo",
- "tts" : "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus."
- },
- "ru-ru" : {
- "label" : "Информация об автомобиле",
- "tts" : "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин."
- },
- "sv-se" : {
- "label" : "Fordonsinformation",
- "tts" : "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck."
- },
- "tr-tr" : {
- "label" : "Araç bilgisi",
- "tts" : "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı."
- },
- "zh-cn" : {
- "label" : "车辆信息",
- "tts" : "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压."
- },
- "zh-tw" : {
- "label" : "車輛資訊",
- "tts" : "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓."
- }
- }
- }
- },
- "version" : "001.001.015"
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "DrivingCharacteristics-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- },
- "user_consent_prompt" : "DrivingCharacteristics"
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Location-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- }
- },
- "user_consent_prompt" : "Location"
- },
- "Navigation-1" : {
- "rpcs" : {
- "AlertManeuver" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ShowConstantTBT" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UpdateTurnList" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Notifications" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "BACKGROUND" ]
- }
- },
- "user_consent_prompt" : "Notifications"
- },
- "Notifications-2" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "FULL" ]
- }
- },
- "user_consent_prompt" : "Old_Notifications"
- },
- "Notifications-3" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "LIMITED" ]
- }
- },
- "user_consent_prompt" : "Old_Notifications"
- },
- "Notifications-4" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "NONE" ]
- }
- },
- "user_consent_prompt" : "New_Notifications"
- },
- "PropriataryData-1" : {
- "rpcs" : {
- "DiagnosticMessage" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GetDTCs" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ReadDID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "VehicleInfo-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- },
- "user_consent_prompt" : "VehicleInfo"
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_regular/test/sdl_pt_second_update.json b/src/components/policy/policy_regular/test/sdl_pt_second_update.json
deleted file mode 100644
index 5900acbcfb..0000000000
--- a/src/components/policy/policy_regular/test/sdl_pt_second_update.json
+++ /dev/null
@@ -1,1764 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "watchdog_timer_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- }
- },
- "consumer_friendly_messages" : {
- "messages" : {
- "AppPermissions" : {
- "languages" : {
- "de-de" : {
- "line1" : "Zugriffsanfrage(n)",
- "line2" : "erlauben?",
- "tts" : "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-gb" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-ie" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-us" : {
- "line1" : "Grant Requested",
- "line2" : "Permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press yes to allow or no to deny."
- },
- "es-en" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "es-es" : {
- "line1" : "¿Conceder permisos",
- "line2" : "solicitados?",
- "tts" : "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar."
- },
- "es-mx" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "fr-ca" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "fr-fr" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "it-it" : {
- "line1" : "Concedi autorizzaz.",
- "line2" : "richiesta(e)?",
- "tts" : "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare."
- },
- "nl-nl" : {
- "line1" : "Aangevraagde",
- "line2" : "permissie(s) verlenen?",
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren."
- },
- "pl-pl" : {
- "line1" : "Udzielić żądanych",
- "line2" : "pozwoleń?",
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "line1" : "Conceder permissão",
- "line2" : "solicitada?",
- "tts" : "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar."
- },
- "pt-pt" : {
- "line1" : "Conceder permiss.",
- "line2" : "solicitada(s)?",
- "tts" : "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar."
- },
- "ru-ru" : {
- "line1" : "Предост. заправш.",
- "line2" : "разрешения?",
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны."
- },
- "sv-se" : {
- "line1" : "Vill du ge",
- "line2" : "tillstånd?",
- "tts" : "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka."
- },
- "tr-tr" : {
- "line1" : "İstenen izinler",
- "line2" : "verilsin mi?",
- "tts" : "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否允许请求的",
- "line2" : "权限?",
- "tts" : "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。"
- },
- "zh-tw" : {
- "line1" : "允許",
- "line2" : "授權請求?",
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsHelp" : {
- "languages" : {
- "de-de" : {
- "tts" : "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es" : {
- "tts" : "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it" : {
- "tts" : "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl" : {
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl" : {
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "tts" : "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt" : {
- "tts" : "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru" : {
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se" : {
- "tts" : "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr" : {
- "tts" : "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "tts" : "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw" : {
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked" : {
- "languages" : {
- "de-de" : {
- "tts" : "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it" : {
- "tts" : "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl" : {
- "tts" : "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl" : {
- "tts" : "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br" : {
- "tts" : "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt" : {
- "tts" : "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru" : {
- "tts" : "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se" : {
- "tts" : "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr" : {
- "tts" : "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn" : {
- "tts" : "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw" : {
- "tts" : "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht autorisiert",
- "tts" : "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren."
- },
- "en-au" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-gb" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-us" : {
- "line1" : "Not Authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "es-en" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es" : {
- "line1" : "No autorizada",
- "tts" : "Esta versión de %appName% no está autorizada y no funcionará con SYNC."
- },
- "es-mx" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "it-it" : {
- "line1" : "non autorizzata",
- "tts" : "Questa versione di %appName% non è autorizzata e non funziona con il SYNC."
- },
- "nl-nl" : {
- "line1" : "niet geautoriseerd",
- "tts" : "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC."
- },
- "pl-pl" : {
- "line1" : "brak autoryzacji",
- "tts" : "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC."
- },
- "pt-br" : {
- "line1" : "não autorizado",
- "tts" : "Esta versão do %appName% não tem autorização e não funcionará com o SYNC."
- },
- "pt-pt" : {
- "line1" : "não autorizada",
- "tts" : "Esta versão de %appName% não está autorizada e não funcionará com o SYNC."
- },
- "ru-ru" : {
- "line1" : "не авторизировано",
- "tts" : "Эта версия %appName% не авторизирована и не будет работать с SYNC."
- },
- "sv-se" : {
- "line1" : "är ej godkänd",
- "tts" : "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC."
- },
- "tr-tr" : {
- "line1" : "için izin yok",
- "tts" : "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz."
- },
- "zh-cn" : {
- "line1" : "未得到授权",
- "tts" : "此版本的%appName% 未得到授权,无法在SYNC上使用。"
- },
- "zh-tw" : {
- "line1" : "無授權",
- "tts" : "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。"
- }
- }
- },
- "AppUnsupported" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht unterstützt",
- "tts" : "Diese Version von %appName% wird von SYNC nicht unterstützt."
- },
- "en-au" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-gb" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-ie" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-us" : {
- "line1" : "Not Supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "es-en" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es" : {
- "line1" : "No compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-mx" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "it-it" : {
- "line1" : "non supportata",
- "tts" : "Questa versione di %appName% non è supportata dal SYNC."
- },
- "nl-nl" : {
- "line1" : "niet ondersteund",
- "tts" : "Deze versie van %appName% wordt niet ondersteund door SYNC."
- },
- "pl-pl" : {
- "line1" : "aplikacja nie obsług.",
- "tts" : "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC."
- },
- "pt-br" : {
- "line1" : "não suportado",
- "tts" : "Esta versão do %appName% não é suportada pelo SYNC."
- },
- "pt-pt" : {
- "line1" : "não suportada",
- "tts" : "Esta versão de %appName% não é suportado pelo SYNC."
- },
- "ru-ru" : {
- "line1" : "не поддерживается",
- "tts" : "Эта версия %appName% не поддерживается SYNC."
- },
- "sv-se" : {
- "line1" : "stöds ej",
- "tts" : "SYNC har inte stöd för den här versionen av %appName%."
- },
- "tr-tr" : {
- "line1" : "desteklenmiyor",
- "tts" : "Bu %appName% sürümü SYNC tarafından desteklenmiyor."
- },
- "zh-cn" : {
- "line1" : "不受支持",
- "tts" : "SYNC不支持此版本的%appName%。"
- },
- "zh-tw" : {
- "line1" : "不支援",
- "tts" : "SYNC 不支援此版本的%appName% 。"
- }
- }
- },
- "DataConsent" : {
- "languages" : {
- "en-us" : {
- "line1" : "Enable Mobile Apps",
- "line2" : "on SYNC? (Uses Data)",
- "tts" : "To use mobile apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device's data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Please press yes or no, or help for more information. "
- }
- }
- },
- "DataConsentHelp" : {
- "languages" : {
- "en-us" : {
- "tts" : "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC mobile apps settings menu. See your Owner Guide for more information. "
- }
- }
- },
- "DisableApps" : {
- "languages" : {
- "de-de" : {
- "line1" : "Auto-Update",
- "line2" : "und Mobile Apps deaktivieren",
- "tts" : "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen."
- },
- "en-au" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-gb" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-us" : {
- "line1" : "Disable Auto-Updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es" : {
- "line1" : "¿Desact. actual. auto",
- "line2" : "y apl. móviles?",
- "tts" : "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar."
- },
- "es-mx" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "it-it" : {
- "line1" : "Disabilitare agg. aut.",
- "line2" : "e app mobili?",
- "tts" : "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare."
- },
- "nl-nl" : {
- "line1" : "Auto-updates en mob.",
- "line2" : "apps uitschakelen?",
- "tts" : "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren."
- },
- "pl-pl" : {
- "line1" : "Wył. automat. aktual.",
- "line2" : "i aplikacje mobilne?",
- "tts" : "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować."
- },
- "pt-br" : {
- "line1" : "Desativar atualizações",
- "line2" : "autom. e aplicativos?",
- "tts" : "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar."
- },
- "pt-pt" : {
- "line1" : "Desact. actual. autom.",
- "line2" : "e aplicações móveis?",
- "tts" : "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar."
- },
- "ru-ru" : {
- "line1" : "Откл. автообновления",
- "line2" : "и мобил. прилож.?",
- "tts" : "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены."
- },
- "sv-se" : {
- "line1" : "Avaktiverar autouppdat.",
- "line2" : "och mobilappar?",
- "tts" : "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta."
- },
- "tr-tr" : {
- "line1" : "Oto. güncelleme ve",
- "line2" : "mobil uygul. kapat?",
- "tts" : "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否禁用自动更新和",
- "line2" : "移动应用程序?",
- "tts" : "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。"
- },
- "zh-tw" : {
- "line1" : "停用自動更新",
- "line2" : "和行動應用程式?",
- "tts" : "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。"
- }
- }
- },
- "DrivingCharacteristics" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahreigenschaften",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus."
- },
- "en-au" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-gb" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-us" : {
- "label" : "Driving Characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es" : {
- "label" : "Características de conducción",
- "tts" : "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad."
- },
- "es-mx" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "fr-ca" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "it-it" : {
- "label" : "Caratteristiche di guida",
- "tts" : "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza."
- },
- "nl-nl" : {
- "label" : "Rijkenmerken",
- "tts" : "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus."
- },
- "pl-pl" : {
- "label" : "Informacje dotyczące stylu jazdy",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa."
- },
- "pt-br" : {
- "label" : "Características de condução",
- "tts" : "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança."
- },
- "pt-pt" : {
- "label" : "Características de condução",
- "tts" : "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança."
- },
- "ru-ru" : {
- "label" : "Характеристики движения",
- "tts" : "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности."
- },
- "sv-se" : {
- "label" : "Köregenskaper",
- "tts" : "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus."
- },
- "tr-tr" : {
- "label" : "Sürüş karakteristikleri",
- "tts" : "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu."
- },
- "zh-cn" : {
- "label" : "行驶特性",
- "tts" : "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态"
- },
- "zh-tw" : {
- "label" : "駕駛特性",
- "tts" : "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態"
- }
- }
- },
- "Location" : {
- "languages" : {
- "de-de" : {
- "label" : "GPS und Geschwindigkeit",
- "tts" : "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs."
- },
- "en-au" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-gb" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-ie" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-us" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "es-en" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es" : {
- "label" : "GPS y velocidad",
- "tts" : "Una aplicación puede acceder al GPS y la velocidad del vehículo."
- },
- "es-mx" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "it-it" : {
- "label" : "GPS e velocità",
- "tts" : "Un'app può avere accesso a GPS e velocità del veicolo."
- },
- "nl-nl" : {
- "label" : "Gps en snelheid",
- "tts" : "Een app heeft toegang tot gps en de snelheid van het voertuig."
- },
- "pl-pl" : {
- "label" : "GPS i prędkość",
- "tts" : "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu."
- },
- "pt-br" : {
- "label" : "GPS e velocidade",
- "tts" : "Um aplicativo pode acessar o GPS e a velocidade do veículo."
- },
- "pt-pt" : {
- "label" : "GPS e velocidade",
- "tts" : "Uma aplicação consegue aceder ao GPS e à velocidade do veículo."
- },
- "ru-ru" : {
- "label" : "GPS и скорость",
- "tts" : "Приложение имеет доступ к GPS и скорости автомобиля."
- },
- "sv-se" : {
- "label" : "GPS och hastighet",
- "tts" : "Appen kan komma åt fordonets GPS och hastighetsmätare."
- },
- "tr-tr" : {
- "label" : "GPS ve hız",
- "tts" : "Bu uygulama aracın GPS ve hız bilgilerine erişebilir."
- },
- "zh-cn" : {
- "label" : "GPS 和车速",
- "tts" : "移动应用程序可以访问车辆 GPS 和车速信息。"
- },
- "zh-tw" : {
- "label" : "GPS和車速",
- "tts" : "應用程式可存取車輛的GPS和速度。"
- }
- }
- },
- "Notifications" : {
- "languages" : {
- "de-de" : {
- "label" : "Push-Benachrichtigungen",
- "tts" : "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden."
- },
- "en-au" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-gb" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-ie" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-us" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "es-en" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es" : {
- "label" : "Notificaciones push",
- "tts" : "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano."
- },
- "es-mx" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca" : {
- "label" : "Notifications instantanées",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr" : {
- "label" : "Notifications push",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "it-it" : {
- "label" : "Notifiche push",
- "tts" : "Un'app può inviare notifiche se eseguita in background."
- },
- "nl-nl" : {
- "label" : "Push-meldingen",
- "tts" : "Een app kan meldingen versturen als deze op de achtergrond actief is."
- },
- "pl-pl" : {
- "label" : "Powiadomienia Push",
- "tts" : "Aplikacja może wysyłać powiadomienia, działając w tle."
- },
- "pt-br" : {
- "label" : "Notificações Push",
- "tts" : "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano."
- },
- "pt-pt" : {
- "label" : "Notificações push",
- "tts" : "Uma aplicação consegue enviar notificações quando está activa em segundo plano."
- },
- "ru-ru" : {
- "label" : "Оповещения о пересылке",
- "tts" : "Если приложение работает в фоновом режиме, оно может отправлять оповещения."
- },
- "sv-se" : {
- "label" : "Push-notiser",
- "tts" : "Appen kan skicka meddelanden när den körs i bakgrunden."
- },
- "tr-tr" : {
- "label" : "Anlık bildirimleri",
- "tts" : "Bir uygulama arka planda çalışırken bildirim gönderebilir."
- },
- "zh-cn" : {
- "label" : "推送通知",
- "tts" : "移动应用程序在后台运行时可推送通知。"
- },
- "zh-tw" : {
- "label" : "傳送通知",
- "tts" : "車輛行進時,應用程式可在背景中傳送通知。"
- }
- }
- },
- "SettingDisableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Updates deakt."
- },
- "en-au" : {
- "line1" : "Disable updates"
- },
- "en-gb" : {
- "line1" : "Disable updates"
- },
- "en-ie" : {
- "line1" : "Disable updates"
- },
- "en-us" : {
- "line1" : "Disable Updates"
- },
- "es-en" : {
- "line1" : "Deshab. actual."
- },
- "es-es" : {
- "line1" : "Desact. actual."
- },
- "es-mx" : {
- "line1" : "Deshab. actual."
- },
- "fr-ca" : {
- "line1" : "Désactiver MAJ"
- },
- "fr-fr" : {
- "line1" : "Désactiver màj"
- },
- "it-it" : {
- "line1" : "Disabilita agg."
- },
- "nl-nl" : {
- "line1" : "Upd. uitschak."
- },
- "pl-pl" : {
- "line1" : "Wyłącz aktual."
- },
- "pt-br" : {
- "line1" : "Desat. atualiz."
- },
- "pt-pt" : {
- "line1" : "Desact. actualiz."
- },
- "ru-ru" : {
- "line1" : "Откл. обновл."
- },
- "sv-se" : {
- "line1" : "Inaktivera uppd."
- },
- "tr-tr" : {
- "line1" : "Güncell. Kapat"
- },
- "zh-cn" : {
- "line1" : "禁用更新"
- },
- "zh-tw" : {
- "line1" : "停用更新"
- }
- }
- },
- "SettingEnableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Apps aktivieren"
- },
- "en-au" : {
- "line1" : "Enable Apps"
- },
- "en-gb" : {
- "line1" : "Enable Apps"
- },
- "en-ie" : {
- "line1" : "Enable Apps"
- },
- "en-us" : {
- "line1" : "Enable Apps"
- },
- "es-en" : {
- "line1" : "Hab. aplic."
- },
- "es-es" : {
- "line1" : "Activar apl."
- },
- "es-mx" : {
- "line1" : "Hab. aplic."
- },
- "fr-ca" : {
- "line1" : "Activer app."
- },
- "fr-fr" : {
- "line1" : "Activer app."
- },
- "it-it" : {
- "line1" : "Abilita app"
- },
- "nl-nl" : {
- "line1" : "Apps inschak."
- },
- "pl-pl" : {
- "line1" : "Włącz aplikacje"
- },
- "pt-br" : {
- "line1" : "Ativar aplic."
- },
- "pt-pt" : {
- "line1" : "Activar actualiz."
- },
- "ru-ru" : {
- "line1" : "Вкл. прилож."
- },
- "sv-se" : {
- "line1" : "Aktivera appar"
- },
- "tr-tr" : {
- "line1" : "Uygulamaları aç"
- },
- "zh-cn" : {
- "line1" : "启用应用程序"
- },
- "zh-tw" : {
- "line1" : "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update anford."
- },
- "en-au" : {
- "line1" : "Request update"
- },
- "en-gb" : {
- "line1" : "Request update"
- },
- "en-ie" : {
- "line1" : "Request update"
- },
- "en-us" : {
- "line1" : "Request Update"
- },
- "es-en" : {
- "line1" : "Solicit. actualiz."
- },
- "es-es" : {
- "line1" : "Solicitar actual."
- },
- "es-mx" : {
- "line1" : "Solicit. actualiz."
- },
- "fr-ca" : {
- "line1" : "Demander MAJ"
- },
- "fr-fr" : {
- "line1" : "Demander màj"
- },
- "it-it" : {
- "line1" : "Rich. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Upd. aanvragen"
- },
- "pl-pl" : {
- "line1" : "Zażądaj aktual."
- },
- "pt-br" : {
- "line1" : "Solicitar atualiz."
- },
- "pt-pt" : {
- "line1" : "Solicit. actualiz."
- },
- "ru-ru" : {
- "line1" : "Запрос на обн."
- },
- "sv-se" : {
- "line1" : "Begär uppdat."
- },
- "tr-tr" : {
- "line1" : "Güncelleme iste"
- },
- "zh-cn" : {
- "line1" : "请求更新"
- },
- "zh-tw" : {
- "line1" : "請求更新"
- }
- }
- },
- "StatusNeeded" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update benötigt"
- },
- "en-au" : {
- "line1" : "Update needed"
- },
- "en-gb" : {
- "line1" : "Update needed"
- },
- "en-ie" : {
- "line1" : "Update needed"
- },
- "en-us" : {
- "line1" : "Update Needed"
- },
- "es-en" : {
- "line1" : "Actualiz. neces."
- },
- "es-es" : {
- "line1" : "Actu. necesaria"
- },
- "es-mx" : {
- "line1" : "Actualiz. neces."
- },
- "fr-ca" : {
- "line1" : "Màj requise"
- },
- "fr-fr" : {
- "line1" : "Mise à jour requise"
- },
- "it-it" : {
- "line1" : "Necess. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Update nodig"
- },
- "pl-pl" : {
- "line1" : "Potrzeba aktual."
- },
- "pt-br" : {
- "line1" : "Atualiz. necess."
- },
- "pt-pt" : {
- "line1" : "Actual. necess."
- },
- "ru-ru" : {
- "line1" : "Необх. обновл."
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs"
- },
- "tr-tr" : {
- "line1" : "Güncellenmeli"
- },
- "zh-cn" : {
- "line1" : "需要进行更新"
- },
- "zh-tw" : {
- "line1" : "需更新"
- }
- }
- },
- "StatusPending" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktualisieren..."
- },
- "en-au" : {
- "line1" : "Updating..."
- },
- "en-gb" : {
- "line1" : "Updating..."
- },
- "en-ie" : {
- "line1" : "Updating..."
- },
- "en-us" : {
- "line1" : "Updating..."
- },
- "es-en" : {
- "line1" : "Actualizando..."
- },
- "es-es" : {
- "line1" : "Actualizando..."
- },
- "es-mx" : {
- "line1" : "Actualizando..."
- },
- "fr-ca" : {
- "line1" : "MAJ en cours..."
- },
- "fr-fr" : {
- "line1" : "Màj en cours..."
- },
- "it-it" : {
- "line1" : "Aggiornamento"
- },
- "nl-nl" : {
- "line1" : "Updaten..."
- },
- "pl-pl" : {
- "line1" : "Aktualizowanie"
- },
- "pt-br" : {
- "line1" : "Atualizando..."
- },
- "pt-pt" : {
- "line1" : "A actualizar..."
- },
- "ru-ru" : {
- "line1" : "Обновление..."
- },
- "sv-se" : {
- "line1" : "Uppdaterar..."
- },
- "tr-tr" : {
- "line1" : "Güncelleniyor..."
- },
- "zh-cn" : {
- "line1" : "正在更新......"
- },
- "zh-tw" : {
- "line1" : "更新中..."
- }
- }
- },
- "StatusUpToDate" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktuelle Version"
- },
- "en-au" : {
- "line1" : "Up-to-date"
- },
- "en-gb" : {
- "line1" : "Up-to-date"
- },
- "en-ie" : {
- "line1" : "Up-to-date"
- },
- "en-us" : {
- "line1" : "Up-To-Date"
- },
- "es-en" : {
- "line1" : "Actualizado"
- },
- "es-es" : {
- "line1" : "Actualizada"
- },
- "es-mx" : {
- "line1" : "Actualizado"
- },
- "fr-ca" : {
- "line1" : "Déjà à jour"
- },
- "fr-fr" : {
- "line1" : "Déjà à jour"
- },
- "it-it" : {
- "line1" : "più recente"
- },
- "nl-nl" : {
- "line1" : "Up-to-date"
- },
- "pl-pl" : {
- "line1" : "Aktualne"
- },
- "pt-br" : {
- "line1" : "Atualizado"
- },
- "pt-pt" : {
- "line1" : "Actualizado"
- },
- "ru-ru" : {
- "line1" : "Обновлено"
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs ej"
- },
- "tr-tr" : {
- "line1" : "Güncel"
- },
- "zh-cn" : {
- "line1" : "最新更新"
- },
- "zh-tw" : {
- "line1" : "更新最新"
- }
- }
- },
- "VehicleInfo" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahrzeuginformationen",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck."
- },
- "en-au" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-gb" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-ie" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-us" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es" : {
- "label" : "Información del vehículo",
- "tts" : "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos."
- },
- "es-mx" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "fr-ca" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus."
- },
- "it-it" : {
- "label" : "Informazioni sul veicolo",
- "tts" : "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici."
- },
- "nl-nl" : {
- "label" : "Voertuiginformatie",
- "tts" : "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning."
- },
- "pl-pl" : {
- "label" : "Informacje o pojeździe",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon."
- },
- "pt-br" : {
- "label" : "Informações sobre o veículo",
- "tts" : "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus."
- },
- "pt-pt" : {
- "label" : "Informações do veículo",
- "tts" : "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus."
- },
- "ru-ru" : {
- "label" : "Информация об автомобиле",
- "tts" : "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин."
- },
- "sv-se" : {
- "label" : "Fordonsinformation",
- "tts" : "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck."
- },
- "tr-tr" : {
- "label" : "Araç bilgisi",
- "tts" : "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı."
- },
- "zh-cn" : {
- "label" : "车辆信息",
- "tts" : "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压."
- },
- "zh-tw" : {
- "label" : "車輛資訊",
- "tts" : "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓."
- }
- }
- }
- },
- "version" : "001.001.015"
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "DrivingCharacteristics-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- },
- "user_consent_prompt" : "DrivingCharacteristics"
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Location-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- }
- },
- "user_consent_prompt" : "Location"
- },
- "Navigation-1" : {
- "rpcs" : {
- "AlertManeuver" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ShowConstantTBT" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UpdateTurnList" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Notifications" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "BACKGROUND" ]
- }
- },
- "user_consent_prompt" : "Notifications"
- },
- "Notifications-2" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "FULL" ]
- }
- },
- "user_consent_prompt" : "Old_Notifications"
- },
- "Notifications-3" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "LIMITED" ]
- }
- },
- "user_consent_prompt" : "New_Notifications"
- },
- "Notifications-4" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "NONE" ]
- }
- },
- "user_consent_prompt" : "New_Notifications"
- },
- "PropriataryData-1" : {
- "rpcs" : {
- "DiagnosticMessage" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GetDTCs" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ReadDID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "VehicleInfo-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- },
- "user_consent_prompt" : "VehicleInfo"
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_regular/test/sdl_pt_update.json b/src/components/policy/policy_regular/test/sdl_pt_update.json
deleted file mode 100644
index 6f5e223cae..0000000000
--- a/src/components/policy/policy_regular/test/sdl_pt_update.json
+++ /dev/null
@@ -1,1742 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "watchdog_timer_ms" : 20000
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "watchdog_timer_ms" : 20000
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "watchdog_timer_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false,
- "watchdog_timer_ms" : 20000
- }
- },
- "consumer_friendly_messages" : {
- "messages" : {
- "AppPermissions" : {
- "languages" : {
- "de-de" : {
- "line1" : "Zugriffsanfrage(n)",
- "line2" : "erlauben?",
- "tts" : "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-gb" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-ie" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-us" : {
- "line1" : "Grant Requested",
- "line2" : "Permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press yes to allow or no to deny."
- },
- "es-en" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "es-es" : {
- "line1" : "¿Conceder permisos",
- "line2" : "solicitados?",
- "tts" : "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar."
- },
- "es-mx" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "fr-ca" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "fr-fr" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "it-it" : {
- "line1" : "Concedi autorizzaz.",
- "line2" : "richiesta(e)?",
- "tts" : "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare."
- },
- "nl-nl" : {
- "line1" : "Aangevraagde",
- "line2" : "permissie(s) verlenen?",
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren."
- },
- "pl-pl" : {
- "line1" : "Udzielić żądanych",
- "line2" : "pozwoleń?",
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "line1" : "Conceder permissão",
- "line2" : "solicitada?",
- "tts" : "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar."
- },
- "pt-pt" : {
- "line1" : "Conceder permiss.",
- "line2" : "solicitada(s)?",
- "tts" : "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar."
- },
- "ru-ru" : {
- "line1" : "Предост. заправш.",
- "line2" : "разрешения?",
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны."
- },
- "sv-se" : {
- "line1" : "Vill du ge",
- "line2" : "tillstånd?",
- "tts" : "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka."
- },
- "tr-tr" : {
- "line1" : "İstenen izinler",
- "line2" : "verilsin mi?",
- "tts" : "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否允许请求的",
- "line2" : "权限?",
- "tts" : "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。"
- },
- "zh-tw" : {
- "line1" : "允許",
- "line2" : "授權請求?",
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsHelp" : {
- "languages" : {
- "de-de" : {
- "tts" : "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es" : {
- "tts" : "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it" : {
- "tts" : "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl" : {
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl" : {
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "tts" : "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt" : {
- "tts" : "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru" : {
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se" : {
- "tts" : "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr" : {
- "tts" : "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "tts" : "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw" : {
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked" : {
- "languages" : {
- "de-de" : {
- "tts" : "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it" : {
- "tts" : "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl" : {
- "tts" : "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl" : {
- "tts" : "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br" : {
- "tts" : "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt" : {
- "tts" : "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru" : {
- "tts" : "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se" : {
- "tts" : "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr" : {
- "tts" : "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn" : {
- "tts" : "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw" : {
- "tts" : "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht autorisiert",
- "tts" : "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren."
- },
- "en-au" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-gb" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-us" : {
- "line1" : "Not Authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "es-en" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es" : {
- "line1" : "No autorizada",
- "tts" : "Esta versión de %appName% no está autorizada y no funcionará con SYNC."
- },
- "es-mx" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "it-it" : {
- "line1" : "non autorizzata",
- "tts" : "Questa versione di %appName% non è autorizzata e non funziona con il SYNC."
- },
- "nl-nl" : {
- "line1" : "niet geautoriseerd",
- "tts" : "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC."
- },
- "pl-pl" : {
- "line1" : "brak autoryzacji",
- "tts" : "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC."
- },
- "pt-br" : {
- "line1" : "não autorizado",
- "tts" : "Esta versão do %appName% não tem autorização e não funcionará com o SYNC."
- },
- "pt-pt" : {
- "line1" : "não autorizada",
- "tts" : "Esta versão de %appName% não está autorizada e não funcionará com o SYNC."
- },
- "ru-ru" : {
- "line1" : "не авторизировано",
- "tts" : "Эта версия %appName% не авторизирована и не будет работать с SYNC."
- },
- "sv-se" : {
- "line1" : "är ej godkänd",
- "tts" : "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC."
- },
- "tr-tr" : {
- "line1" : "için izin yok",
- "tts" : "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz."
- },
- "zh-cn" : {
- "line1" : "未得到授权",
- "tts" : "此版本的%appName% 未得到授权,无法在SYNC上使用。"
- },
- "zh-tw" : {
- "line1" : "無授權",
- "tts" : "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。"
- }
- }
- },
- "AppUnsupported" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht unterstützt",
- "tts" : "Diese Version von %appName% wird von SYNC nicht unterstützt."
- },
- "en-au" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-gb" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-ie" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-us" : {
- "line1" : "Not Supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "es-en" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es" : {
- "line1" : "No compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-mx" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "it-it" : {
- "line1" : "non supportata",
- "tts" : "Questa versione di %appName% non è supportata dal SYNC."
- },
- "nl-nl" : {
- "line1" : "niet ondersteund",
- "tts" : "Deze versie van %appName% wordt niet ondersteund door SYNC."
- },
- "pl-pl" : {
- "line1" : "aplikacja nie obsług.",
- "tts" : "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC."
- },
- "pt-br" : {
- "line1" : "não suportado",
- "tts" : "Esta versão do %appName% não é suportada pelo SYNC."
- },
- "pt-pt" : {
- "line1" : "não suportada",
- "tts" : "Esta versão de %appName% não é suportado pelo SYNC."
- },
- "ru-ru" : {
- "line1" : "не поддерживается",
- "tts" : "Эта версия %appName% не поддерживается SYNC."
- },
- "sv-se" : {
- "line1" : "stöds ej",
- "tts" : "SYNC har inte stöd för den här versionen av %appName%."
- },
- "tr-tr" : {
- "line1" : "desteklenmiyor",
- "tts" : "Bu %appName% sürümü SYNC tarafından desteklenmiyor."
- },
- "zh-cn" : {
- "line1" : "不受支持",
- "tts" : "SYNC不支持此版本的%appName%。"
- },
- "zh-tw" : {
- "line1" : "不支援",
- "tts" : "SYNC 不支援此版本的%appName% 。"
- }
- }
- },
- "DataConsent" : {
- "languages" : {
- "en-us" : {
- "line1" : "Enable Mobile Apps",
- "line2" : "on SYNC? (Uses Data)",
- "tts" : "To use mobile apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device's data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Please press yes or no, or help for more information. "
- }
- }
- },
- "DataConsentHelp" : {
- "languages" : {
- "en-us" : {
- "tts" : "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC mobile apps settings menu. See your Owner Guide for more information. "
- }
- }
- },
- "DisableApps" : {
- "languages" : {
- "de-de" : {
- "line1" : "Auto-Update",
- "line2" : "und Mobile Apps deaktivieren",
- "tts" : "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen."
- },
- "en-au" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-gb" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-us" : {
- "line1" : "Disable Auto-Updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es" : {
- "line1" : "¿Desact. actual. auto",
- "line2" : "y apl. móviles?",
- "tts" : "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar."
- },
- "es-mx" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "it-it" : {
- "line1" : "Disabilitare agg. aut.",
- "line2" : "e app mobili?",
- "tts" : "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare."
- },
- "nl-nl" : {
- "line1" : "Auto-updates en mob.",
- "line2" : "apps uitschakelen?",
- "tts" : "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren."
- },
- "pl-pl" : {
- "line1" : "Wył. automat. aktual.",
- "line2" : "i aplikacje mobilne?",
- "tts" : "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować."
- },
- "pt-br" : {
- "line1" : "Desativar atualizações",
- "line2" : "autom. e aplicativos?",
- "tts" : "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar."
- },
- "pt-pt" : {
- "line1" : "Desact. actual. autom.",
- "line2" : "e aplicações móveis?",
- "tts" : "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar."
- },
- "ru-ru" : {
- "line1" : "Откл. автообновления",
- "line2" : "и мобил. прилож.?",
- "tts" : "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены."
- },
- "sv-se" : {
- "line1" : "Avaktiverar autouppdat.",
- "line2" : "och mobilappar?",
- "tts" : "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta."
- },
- "tr-tr" : {
- "line1" : "Oto. güncelleme ve",
- "line2" : "mobil uygul. kapat?",
- "tts" : "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否禁用自动更新和",
- "line2" : "移动应用程序?",
- "tts" : "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。"
- },
- "zh-tw" : {
- "line1" : "停用自動更新",
- "line2" : "和行動應用程式?",
- "tts" : "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。"
- }
- }
- },
- "DrivingCharacteristics" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahreigenschaften",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus."
- },
- "en-au" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-gb" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-us" : {
- "label" : "Driving Characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es" : {
- "label" : "Características de conducción",
- "tts" : "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad."
- },
- "es-mx" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "fr-ca" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "it-it" : {
- "label" : "Caratteristiche di guida",
- "tts" : "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza."
- },
- "nl-nl" : {
- "label" : "Rijkenmerken",
- "tts" : "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus."
- },
- "pl-pl" : {
- "label" : "Informacje dotyczące stylu jazdy",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa."
- },
- "pt-br" : {
- "label" : "Características de condução",
- "tts" : "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança."
- },
- "pt-pt" : {
- "label" : "Características de condução",
- "tts" : "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança."
- },
- "ru-ru" : {
- "label" : "Характеристики движения",
- "tts" : "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности."
- },
- "sv-se" : {
- "label" : "Köregenskaper",
- "tts" : "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus."
- },
- "tr-tr" : {
- "label" : "Sürüş karakteristikleri",
- "tts" : "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu."
- },
- "zh-cn" : {
- "label" : "行驶特性",
- "tts" : "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态"
- },
- "zh-tw" : {
- "label" : "駕駛特性",
- "tts" : "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態"
- }
- }
- },
- "Location" : {
- "languages" : {
- "de-de" : {
- "label" : "GPS und Geschwindigkeit",
- "tts" : "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs."
- },
- "en-au" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-gb" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-ie" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-us" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "es-en" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es" : {
- "label" : "GPS y velocidad",
- "tts" : "Una aplicación puede acceder al GPS y la velocidad del vehículo."
- },
- "es-mx" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "it-it" : {
- "label" : "GPS e velocità",
- "tts" : "Un'app può avere accesso a GPS e velocità del veicolo."
- },
- "nl-nl" : {
- "label" : "Gps en snelheid",
- "tts" : "Een app heeft toegang tot gps en de snelheid van het voertuig."
- },
- "pl-pl" : {
- "label" : "GPS i prędkość",
- "tts" : "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu."
- },
- "pt-br" : {
- "label" : "GPS e velocidade",
- "tts" : "Um aplicativo pode acessar o GPS e a velocidade do veículo."
- },
- "pt-pt" : {
- "label" : "GPS e velocidade",
- "tts" : "Uma aplicação consegue aceder ao GPS e à velocidade do veículo."
- },
- "ru-ru" : {
- "label" : "GPS и скорость",
- "tts" : "Приложение имеет доступ к GPS и скорости автомобиля."
- },
- "sv-se" : {
- "label" : "GPS och hastighet",
- "tts" : "Appen kan komma åt fordonets GPS och hastighetsmätare."
- },
- "tr-tr" : {
- "label" : "GPS ve hız",
- "tts" : "Bu uygulama aracın GPS ve hız bilgilerine erişebilir."
- },
- "zh-cn" : {
- "label" : "GPS 和车速",
- "tts" : "移动应用程序可以访问车辆 GPS 和车速信息。"
- },
- "zh-tw" : {
- "label" : "GPS和車速",
- "tts" : "應用程式可存取車輛的GPS和速度。"
- }
- }
- },
- "Notifications" : {
- "languages" : {
- "de-de" : {
- "label" : "Push-Benachrichtigungen",
- "tts" : "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden."
- },
- "en-au" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-gb" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-ie" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-us" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "es-en" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es" : {
- "label" : "Notificaciones push",
- "tts" : "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano."
- },
- "es-mx" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca" : {
- "label" : "Notifications instantanées",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr" : {
- "label" : "Notifications push",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "it-it" : {
- "label" : "Notifiche push",
- "tts" : "Un'app può inviare notifiche se eseguita in background."
- },
- "nl-nl" : {
- "label" : "Push-meldingen",
- "tts" : "Een app kan meldingen versturen als deze op de achtergrond actief is."
- },
- "pl-pl" : {
- "label" : "Powiadomienia Push",
- "tts" : "Aplikacja może wysyłać powiadomienia, działając w tle."
- },
- "pt-br" : {
- "label" : "Notificações Push",
- "tts" : "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano."
- },
- "pt-pt" : {
- "label" : "Notificações push",
- "tts" : "Uma aplicação consegue enviar notificações quando está activa em segundo plano."
- },
- "ru-ru" : {
- "label" : "Оповещения о пересылке",
- "tts" : "Если приложение работает в фоновом режиме, оно может отправлять оповещения."
- },
- "sv-se" : {
- "label" : "Push-notiser",
- "tts" : "Appen kan skicka meddelanden när den körs i bakgrunden."
- },
- "tr-tr" : {
- "label" : "Anlık bildirimleri",
- "tts" : "Bir uygulama arka planda çalışırken bildirim gönderebilir."
- },
- "zh-cn" : {
- "label" : "推送通知",
- "tts" : "移动应用程序在后台运行时可推送通知。"
- },
- "zh-tw" : {
- "label" : "傳送通知",
- "tts" : "車輛行進時,應用程式可在背景中傳送通知。"
- }
- }
- },
- "SettingDisableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Updates deakt."
- },
- "en-au" : {
- "line1" : "Disable updates"
- },
- "en-gb" : {
- "line1" : "Disable updates"
- },
- "en-ie" : {
- "line1" : "Disable updates"
- },
- "en-us" : {
- "line1" : "Disable Updates"
- },
- "es-en" : {
- "line1" : "Deshab. actual."
- },
- "es-es" : {
- "line1" : "Desact. actual."
- },
- "es-mx" : {
- "line1" : "Deshab. actual."
- },
- "fr-ca" : {
- "line1" : "Désactiver MAJ"
- },
- "fr-fr" : {
- "line1" : "Désactiver màj"
- },
- "it-it" : {
- "line1" : "Disabilita agg."
- },
- "nl-nl" : {
- "line1" : "Upd. uitschak."
- },
- "pl-pl" : {
- "line1" : "Wyłącz aktual."
- },
- "pt-br" : {
- "line1" : "Desat. atualiz."
- },
- "pt-pt" : {
- "line1" : "Desact. actualiz."
- },
- "ru-ru" : {
- "line1" : "Откл. обновл."
- },
- "sv-se" : {
- "line1" : "Inaktivera uppd."
- },
- "tr-tr" : {
- "line1" : "Güncell. Kapat"
- },
- "zh-cn" : {
- "line1" : "禁用更新"
- },
- "zh-tw" : {
- "line1" : "停用更新"
- }
- }
- },
- "SettingEnableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Apps aktivieren"
- },
- "en-au" : {
- "line1" : "Enable Apps"
- },
- "en-gb" : {
- "line1" : "Enable Apps"
- },
- "en-ie" : {
- "line1" : "Enable Apps"
- },
- "en-us" : {
- "line1" : "Enable Apps"
- },
- "es-en" : {
- "line1" : "Hab. aplic."
- },
- "es-es" : {
- "line1" : "Activar apl."
- },
- "es-mx" : {
- "line1" : "Hab. aplic."
- },
- "fr-ca" : {
- "line1" : "Activer app."
- },
- "fr-fr" : {
- "line1" : "Activer app."
- },
- "it-it" : {
- "line1" : "Abilita app"
- },
- "nl-nl" : {
- "line1" : "Apps inschak."
- },
- "pl-pl" : {
- "line1" : "Włącz aplikacje"
- },
- "pt-br" : {
- "line1" : "Ativar aplic."
- },
- "pt-pt" : {
- "line1" : "Activar actualiz."
- },
- "ru-ru" : {
- "line1" : "Вкл. прилож."
- },
- "sv-se" : {
- "line1" : "Aktivera appar"
- },
- "tr-tr" : {
- "line1" : "Uygulamaları aç"
- },
- "zh-cn" : {
- "line1" : "启用应用程序"
- },
- "zh-tw" : {
- "line1" : "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update anford."
- },
- "en-au" : {
- "line1" : "Request update"
- },
- "en-gb" : {
- "line1" : "Request update"
- },
- "en-ie" : {
- "line1" : "Request update"
- },
- "en-us" : {
- "line1" : "Request Update"
- },
- "es-en" : {
- "line1" : "Solicit. actualiz."
- },
- "es-es" : {
- "line1" : "Solicitar actual."
- },
- "es-mx" : {
- "line1" : "Solicit. actualiz."
- },
- "fr-ca" : {
- "line1" : "Demander MAJ"
- },
- "fr-fr" : {
- "line1" : "Demander màj"
- },
- "it-it" : {
- "line1" : "Rich. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Upd. aanvragen"
- },
- "pl-pl" : {
- "line1" : "Zażądaj aktual."
- },
- "pt-br" : {
- "line1" : "Solicitar atualiz."
- },
- "pt-pt" : {
- "line1" : "Solicit. actualiz."
- },
- "ru-ru" : {
- "line1" : "Запрос на обн."
- },
- "sv-se" : {
- "line1" : "Begär uppdat."
- },
- "tr-tr" : {
- "line1" : "Güncelleme iste"
- },
- "zh-cn" : {
- "line1" : "请求更新"
- },
- "zh-tw" : {
- "line1" : "請求更新"
- }
- }
- },
- "StatusNeeded" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update benötigt"
- },
- "en-au" : {
- "line1" : "Update needed"
- },
- "en-gb" : {
- "line1" : "Update needed"
- },
- "en-ie" : {
- "line1" : "Update needed"
- },
- "en-us" : {
- "line1" : "Update Needed"
- },
- "es-en" : {
- "line1" : "Actualiz. neces."
- },
- "es-es" : {
- "line1" : "Actu. necesaria"
- },
- "es-mx" : {
- "line1" : "Actualiz. neces."
- },
- "fr-ca" : {
- "line1" : "Màj requise"
- },
- "fr-fr" : {
- "line1" : "Mise à jour requise"
- },
- "it-it" : {
- "line1" : "Necess. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Update nodig"
- },
- "pl-pl" : {
- "line1" : "Potrzeba aktual."
- },
- "pt-br" : {
- "line1" : "Atualiz. necess."
- },
- "pt-pt" : {
- "line1" : "Actual. necess."
- },
- "ru-ru" : {
- "line1" : "Необх. обновл."
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs"
- },
- "tr-tr" : {
- "line1" : "Güncellenmeli"
- },
- "zh-cn" : {
- "line1" : "需要进行更新"
- },
- "zh-tw" : {
- "line1" : "需更新"
- }
- }
- },
- "StatusPending" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktualisieren..."
- },
- "en-au" : {
- "line1" : "Updating..."
- },
- "en-gb" : {
- "line1" : "Updating..."
- },
- "en-ie" : {
- "line1" : "Updating..."
- },
- "en-us" : {
- "line1" : "Updating..."
- },
- "es-en" : {
- "line1" : "Actualizando..."
- },
- "es-es" : {
- "line1" : "Actualizando..."
- },
- "es-mx" : {
- "line1" : "Actualizando..."
- },
- "fr-ca" : {
- "line1" : "MAJ en cours..."
- },
- "fr-fr" : {
- "line1" : "Màj en cours..."
- },
- "it-it" : {
- "line1" : "Aggiornamento"
- },
- "nl-nl" : {
- "line1" : "Updaten..."
- },
- "pl-pl" : {
- "line1" : "Aktualizowanie"
- },
- "pt-br" : {
- "line1" : "Atualizando..."
- },
- "pt-pt" : {
- "line1" : "A actualizar..."
- },
- "ru-ru" : {
- "line1" : "Обновление..."
- },
- "sv-se" : {
- "line1" : "Uppdaterar..."
- },
- "tr-tr" : {
- "line1" : "Güncelleniyor..."
- },
- "zh-cn" : {
- "line1" : "正在更新......"
- },
- "zh-tw" : {
- "line1" : "更新中..."
- }
- }
- },
- "StatusUpToDate" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktuelle Version"
- },
- "en-au" : {
- "line1" : "Up-to-date"
- },
- "en-gb" : {
- "line1" : "Up-to-date"
- },
- "en-ie" : {
- "line1" : "Up-to-date"
- },
- "en-us" : {
- "line1" : "Up-To-Date"
- },
- "es-en" : {
- "line1" : "Actualizado"
- },
- "es-es" : {
- "line1" : "Actualizada"
- },
- "es-mx" : {
- "line1" : "Actualizado"
- },
- "fr-ca" : {
- "line1" : "Déjà à jour"
- },
- "fr-fr" : {
- "line1" : "Déjà à jour"
- },
- "it-it" : {
- "line1" : "più recente"
- },
- "nl-nl" : {
- "line1" : "Up-to-date"
- },
- "pl-pl" : {
- "line1" : "Aktualne"
- },
- "pt-br" : {
- "line1" : "Atualizado"
- },
- "pt-pt" : {
- "line1" : "Actualizado"
- },
- "ru-ru" : {
- "line1" : "Обновлено"
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs ej"
- },
- "tr-tr" : {
- "line1" : "Güncel"
- },
- "zh-cn" : {
- "line1" : "最新更新"
- },
- "zh-tw" : {
- "line1" : "更新最新"
- }
- }
- },
- "VehicleInfo" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahrzeuginformationen",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck."
- },
- "en-au" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-gb" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-ie" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-us" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es" : {
- "label" : "Información del vehículo",
- "tts" : "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos."
- },
- "es-mx" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "fr-ca" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus."
- },
- "it-it" : {
- "label" : "Informazioni sul veicolo",
- "tts" : "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici."
- },
- "nl-nl" : {
- "label" : "Voertuiginformatie",
- "tts" : "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning."
- },
- "pl-pl" : {
- "label" : "Informacje o pojeździe",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon."
- },
- "pt-br" : {
- "label" : "Informações sobre o veículo",
- "tts" : "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus."
- },
- "pt-pt" : {
- "label" : "Informações do veículo",
- "tts" : "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus."
- },
- "ru-ru" : {
- "label" : "Информация об автомобиле",
- "tts" : "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин."
- },
- "sv-se" : {
- "label" : "Fordonsinformation",
- "tts" : "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck."
- },
- "tr-tr" : {
- "label" : "Araç bilgisi",
- "tts" : "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı."
- },
- "zh-cn" : {
- "label" : "车辆信息",
- "tts" : "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压."
- },
- "zh-tw" : {
- "label" : "車輛資訊",
- "tts" : "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓."
- }
- }
- }
- },
- "version" : "001.001.015"
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "DrivingCharacteristics-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- },
- "user_consent_prompt" : "DrivingCharacteristics"
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Location-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- }
- },
- "user_consent_prompt" : "Location"
- },
- "Navigation-1" : {
- "rpcs" : {
- "AlertManeuver" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ShowConstantTBT" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UpdateTurnList" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Notifications" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "BACKGROUND" ]
- }
- },
- "user_consent_prompt" : "Notifications"
- },
- "PropriataryData-1" : {
- "rpcs" : {
- "DiagnosticMessage" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GetDTCs" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ReadDID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "VehicleInfo-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- },
- "user_consent_prompt" : "VehicleInfo"
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_regular/test/shared_library_test.cc b/src/components/policy/policy_regular/test/shared_library_test.cc
index b7183a9085..110a283095 100644
--- a/src/components/policy/policy_regular/test/shared_library_test.cc
+++ b/src/components/policy/policy_regular/test/shared_library_test.cc
@@ -73,4 +73,4 @@ TEST(SharedLibraryTest,
} // namespace policy_test
} // namespace components
-} // namespace test
+} // namespace test \ No newline at end of file
diff --git a/src/components/policy/policy_regular/test/smartDeviceLink.ini b/src/components/policy/policy_regular/test/smartDeviceLink.ini
deleted file mode 100644
index 550630161c..0000000000
--- a/src/components/policy/policy_regular/test/smartDeviceLink.ini
+++ /dev/null
@@ -1,3 +0,0 @@
- [MAIN]
-; Contains output files, e.g. .wav
-AppStorageFolder = \ No newline at end of file
diff --git a/src/components/policy/policy_regular/test/smartDeviceLink2.ini b/src/components/policy/policy_regular/test/smartDeviceLink2.ini
deleted file mode 100644
index 6aec231dbb..0000000000
--- a/src/components/policy/policy_regular/test/smartDeviceLink2.ini
+++ /dev/null
@@ -1,12 +0,0 @@
- [MAIN]
-; Contains output files, e.g. .wav
-AppStorageFolder = storage1
-
-[Policy]
-EnablePolicy = true
-PreloadedPT = sdl_preloaded_pt.json
-;PathToSnapshot = sdl_snapshot.json
-; Number of attempts to open policy DB
-;AttemptsToOpenPolicyDB = 5
-; Timeout between attempts during opening DB in milliseconds
-;OpenAttemptTimeoutMs = 500
diff --git a/src/components/policy/policy_regular/test/smartDeviceLink3.ini b/src/components/policy/policy_regular/test/smartDeviceLink3.ini
deleted file mode 100644
index d96694313a..0000000000
--- a/src/components/policy/policy_regular/test/smartDeviceLink3.ini
+++ /dev/null
@@ -1,12 +0,0 @@
- [MAIN]
-; Contains output files, e.g. .wav
-AppStorageFolder = storage123
-
-[Policy]
-EnablePolicy = true
-PreloadedPT = sdl_preloaded_pt.json
-;PathToSnapshot = sdl_snapshot.json
-; Number of attempts to open policy DB
-AttemptsToOpenPolicyDB = 8
-; Timeout between attempts during opening DB in milliseconds
-OpenAttemptTimeoutMs = 700 \ No newline at end of file
diff --git a/src/components/policy/policy_regular/test/sql_pt_representation_storage_test.cc b/src/components/policy/policy_regular/test/sql_pt_representation_storage_test.cc
new file mode 100644
index 0000000000..f719edf391
--- /dev/null
+++ b/src/components/policy/policy_regular/test/sql_pt_representation_storage_test.cc
@@ -0,0 +1,133 @@
+/* Copyright (c) 2018, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "policy/sql_pt_representation.h"
+
+#include <stdio.h>
+#include <sys/stat.h>
+
+#include <algorithm>
+#include <fstream>
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "gtest/gtest.h"
+
+#include "json/reader.h"
+#include "json/writer.h"
+#include "policy/driver_dbms.h"
+#include "policy/mock_policy_settings.h"
+#include "policy/policy_table/enums.h"
+#include "policy/policy_table/types.h"
+#include "policy/policy_types.h"
+#include "rpc_base/rpc_base.h"
+#include "sqlite_wrapper/sql_query.h"
+#include "utils/file_system.h"
+#include "utils/sqlite_wrapper/sql_database.h"
+
+using testing::NiceMock;
+using testing::ReturnRef;
+
+namespace test {
+namespace components {
+namespace policy_test {
+
+class SQLPTRepresentationStorageTest : public ::testing::Test {
+ protected:
+ const std::string kAppStorageFolder =
+ "storage_SQLPTRepresentationStorageTest";
+
+ std::shared_ptr<utils::dbms::SQLQuery> query_wrapper_;
+ std::shared_ptr<policy::SQLPTRepresentation> reps;
+ std::shared_ptr<NiceMock<policy_handler_test::MockPolicySettings> >
+ policy_settings_;
+
+ void SetUp() OVERRIDE {
+ file_system::CreateDirectory(kAppStorageFolder);
+
+ reps = std::make_shared<policy::SQLPTRepresentation>();
+ ASSERT_TRUE(reps != NULL);
+
+ policy_settings_ =
+ std::make_shared<NiceMock<policy_handler_test::MockPolicySettings> >();
+ ON_CALL(*policy_settings_, app_storage_folder())
+ .WillByDefault(ReturnRef(kAppStorageFolder));
+ ASSERT_EQ(policy::SUCCESS, reps->Init(policy_settings_.get()));
+
+ query_wrapper_ = std::make_shared<utils::dbms::SQLQuery>(reps->db());
+ ASSERT_TRUE(query_wrapper_ != NULL);
+ }
+
+ void TearDown() OVERRIDE {
+ EXPECT_TRUE(reps->Drop());
+ EXPECT_TRUE(reps->Close());
+
+ file_system::remove_directory_content(kAppStorageFolder);
+ file_system::RemoveDirectory(kAppStorageFolder, true);
+ }
+};
+
+TEST_F(
+ SQLPTRepresentationStorageTest,
+ CheckPermissionsAllowedWithoutParameters_SetLimitedPermissions_ExpectEmptyListOfAllowedParams) {
+ // Arrange
+ const std::string value_12345 = "12345";
+ const std::string query =
+ "INSERT OR REPLACE INTO `application` (`id`, `memory_kb`,"
+ " `heart_beat_timeout_ms`) VALUES ('" +
+ value_12345 +
+ "', 5, 10); "
+ "INSERT OR REPLACE INTO functional_group (`id`, `name`)"
+ " VALUES (1, 'Base-4'); "
+ "INSERT OR REPLACE INTO `app_group` (`application_id`,"
+ " `functional_group_id`) VALUES ('" +
+ value_12345 +
+ "', 1); "
+ "DELETE FROM `rpc`; "
+ "INSERT OR REPLACE INTO `rpc` (`name`, `hmi_level_value`,"
+ " `functional_group_id`) VALUES ('Update', 'LIMITED', 1);";
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query));
+
+ // Act
+ policy::CheckPermissionResult ret;
+ reps->CheckPermissions(value_12345, "LIMITED", "Update", ret);
+
+ // Assert
+ EXPECT_TRUE(ret.hmi_level_permitted == ::policy::kRpcAllowed);
+ EXPECT_TRUE(ret.list_of_allowed_params.empty());
+}
+
+} // namespace policy_test
+} // namespace components
+} // namespace test
diff --git a/src/components/policy/policy_regular/test/sql_pt_representation_test.cc b/src/components/policy/policy_regular/test/sql_pt_representation_test.cc
index 30536bbaa4..f4efa811b6 100644
--- a/src/components/policy/policy_regular/test/sql_pt_representation_test.cc
+++ b/src/components/policy/policy_regular/test/sql_pt_representation_test.cc
@@ -29,8 +29,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "policy/sql_pt_representation.h"
+
#include <stdio.h>
#include <sys/stat.h>
+
#include <algorithm>
#include <fstream>
#include <memory>
@@ -38,6 +41,7 @@
#include <vector>
#include "gtest/gtest.h"
+
#include "json/reader.h"
#include "json/writer.h"
#include "policy/driver_dbms.h"
@@ -45,9 +49,8 @@
#include "policy/policy_table/enums.h"
#include "policy/policy_table/types.h"
#include "policy/policy_types.h"
-#include "policy/sql_pt_representation.h"
#include "rpc_base/rpc_base.h"
-
+#include "sqlite_wrapper/sql_query.h"
#include "utils/file_system.h"
#include "utils/sqlite_wrapper/sql_database.h"
@@ -72,35 +75,22 @@ using policy_handler_test::MockPolicySettings;
class SQLPTRepresentationTest : protected SQLPTRepresentation,
public ::testing::Test {
protected:
- DBMS* dbms;
- SQLPTRepresentation* reps;
- static const std::string kDatabaseName;
- static const std::string kAppStorageFolder;
- // Gtest can show message that this object doesn't destroyed
- std::unique_ptr<NiceMock<MockPolicySettings> > policy_settings_;
+ std::shared_ptr<utils::dbms::SQLQuery> query_wrapper_;
+ std::shared_ptr<SQLPTRepresentation> reps;
+ policy_handler_test::MockPolicySettings policy_settings_;
void SetUp() OVERRIDE {
- file_system::CreateDirectory(kAppStorageFolder);
- reps = new SQLPTRepresentation;
- policy_settings_ = std::unique_ptr<NiceMock<MockPolicySettings> >(
- new NiceMock<MockPolicySettings>());
- ON_CALL(*policy_settings_, app_storage_folder())
- .WillByDefault(ReturnRef(kAppStorageFolder));
- EXPECT_EQ(::policy::SUCCESS, reps->Init(policy_settings_.get()));
- dbms = new DBMS(kAppStorageFolder + "/" + kDatabaseName);
- EXPECT_TRUE(dbms->Open());
+ reps = std::make_shared<SQLPTRepresentation>(true);
+ ASSERT_TRUE(reps != NULL);
+ ASSERT_EQ(policy::SUCCESS, reps->Init(&policy_settings_));
+
+ query_wrapper_ = std::make_shared<utils::dbms::SQLQuery>(reps->db());
+ ASSERT_TRUE(query_wrapper_ != NULL);
}
void TearDown() OVERRIDE {
- EXPECT_TRUE(reps->Clear());
EXPECT_TRUE(reps->Drop());
EXPECT_TRUE(reps->Close());
- reps->RemoveDB();
- delete reps;
- dbms->Close();
- file_system::remove_directory_content(kAppStorageFolder);
- file_system::RemoveDirectory(kAppStorageFolder, true);
- policy_settings_.reset();
}
virtual utils::dbms::SQLDatabase* db() const {
@@ -160,6 +150,14 @@ class SQLPTRepresentationTest : protected SQLPTRepresentation,
return ::SQLPTRepresentation::GatherNickName(app_id, nicknames);
}
+ int FetchOneInt(const std::string& query) {
+ query_wrapper_->Prepare(query);
+ query_wrapper_->Exec();
+ const int ret = query_wrapper_->GetInteger(0);
+ query_wrapper_->Finalize();
+ return ret;
+ }
+
void CheckAppPoliciesSection(
policy_table::ApplicationPoliciesSection& policies,
uint16_t apps_size,
@@ -252,6 +250,20 @@ class SQLPTRepresentationTest : protected SQLPTRepresentation,
Json::Value(5);
module_config["notifications_per_minute_by_priority"]["none"] =
Json::Value(6);
+ module_config["subtle_notifications_per_minute_by_priority"] =
+ Json::Value(Json::objectValue);
+ module_config["subtle_notifications_per_minute_by_priority"]["emergency"] =
+ Json::Value(7);
+ module_config["subtle_notifications_per_minute_by_priority"]["navigation"] =
+ Json::Value(8);
+ module_config["subtle_notifications_per_minute_by_priority"]["VOICECOMM"] =
+ Json::Value(9);
+ module_config["subtle_notifications_per_minute_by_priority"]
+ ["communication"] = Json::Value(10);
+ module_config["subtle_notifications_per_minute_by_priority"]["normal"] =
+ Json::Value(11);
+ module_config["subtle_notifications_per_minute_by_priority"]["none"] =
+ Json::Value(12);
module_config["vehicle_make"] = Json::Value("");
module_config["vehicle_model"] = Json::Value("");
module_config["vehicle_year"] = Json::Value("");
@@ -374,10 +386,6 @@ class SQLPTRepresentationTest : protected SQLPTRepresentation,
}
};
-const std::string SQLPTRepresentationTest::kDatabaseName = "policy.sqlite";
-const std::string SQLPTRepresentationTest::kAppStorageFolder =
- "storage_SQLPTRepresentationTest";
-
class SQLPTRepresentationTest2 : public ::testing::Test {
protected:
SQLPTRepresentationTest2()
@@ -415,15 +423,15 @@ class SQLPTRepresentationTest3 : public ::testing::Test {
void SetUp() OVERRIDE {
file_system::CreateDirectory(kAppStorageFolder);
- reps = new SQLPTRepresentation;
+ reps = std::make_shared<SQLPTRepresentation>();
}
void TearDown() OVERRIDE {
file_system::RemoveDirectory(kAppStorageFolder, true);
- delete reps;
+ reps.reset();
}
- SQLPTRepresentation* reps;
+ std::shared_ptr<SQLPTRepresentation> reps;
NiceMock<MockPolicySettings> policy_settings_;
const std::string kAppStorageFolder;
};
@@ -458,6 +466,7 @@ TEST_F(SQLPTRepresentationTest, VehicleDataItem_Store_Complete_Item) {
*message.until = "5.0";
*message.removed = false;
*message.deprecated = false;
+ *message.defvalue = "0";
*message.minvalue = 0;
*message.maxvalue = 255;
*message.minsize = 0;
@@ -574,8 +583,10 @@ TEST_F(SQLPTRepresentationTest, VehicleDataItem_Select_NonParameterizedVDI) {
TEST_F(SQLPTRepresentationTest2,
DISABLED_OpenAttemptTimeOut_ExpectCorrectNumber) {
EXPECT_EQ(::policy::FAIL, reps->Init(&policy_settings_));
+
// Check Actual attempts number made to try to open DB
EXPECT_EQ(kAttemptsToOpenPolicyDB, reps->open_counter());
+
// Check timeot value correctly read from config file.
EXPECT_EQ(700u, kOpenAttemptTimeoutMs);
}
@@ -583,74 +594,89 @@ TEST_F(SQLPTRepresentationTest2,
TEST_F(SQLPTRepresentationTest,
RefreshDB_DropExistedPTThenRefreshDB_ExpectTablesWithInitialData) {
// Check
- const char* query_select =
+ const std::string query_select =
"SELECT COUNT(*) FROM sqlite_master WHERE `type` = 'table'";
// In normally created PT there are more than 0 tables
- ASSERT_GT(dbms->FetchOneInt(query_select), 0);
+ ASSERT_GT(FetchOneInt(query_select), 0);
ASSERT_TRUE(reps->Drop());
- ASSERT_EQ(0, dbms->FetchOneInt(query_select));
+
+ ASSERT_EQ(0, FetchOneInt(query_select));
ASSERT_TRUE(reps->RefreshDB());
// Check PT structure destroyed and tables number is 0
- // There are 35 tables in the database, now.
- const int32_t total_tables_number = 37;
- ASSERT_EQ(total_tables_number, dbms->FetchOneInt(query_select));
- const char* query_select_count_of_iap_buffer_full =
+ // There are 38 tables in the database, now.
+ const int32_t total_tables_number = 38;
+ ASSERT_EQ(total_tables_number, FetchOneInt(query_select));
+
+ const std::string query_select_count_of_iap_buffer_full =
"SELECT `count_of_iap_buffer_full` FROM `usage_and_error_count`";
- const char* query_select_count_sync_out_of_memory =
+ ASSERT_EQ(0, FetchOneInt(query_select_count_of_iap_buffer_full));
+
+ const std::string query_select_count_sync_out_of_memory =
"SELECT `count_sync_out_of_memory` FROM `usage_and_error_count`";
- const char* query_select_count_of_sync_reboots =
+ ASSERT_EQ(0, FetchOneInt(query_select_count_sync_out_of_memory));
+
+ const std::string query_select_count_of_sync_reboots =
"SELECT `count_of_sync_reboots` FROM `usage_and_error_count`";
- const char* query_select_pt_exchanged_at_odometer_x =
+ ASSERT_EQ(0, FetchOneInt(query_select_count_of_sync_reboots));
+
+ const std::string query_select_pt_exchanged_at_odometer_x =
"SELECT `pt_exchanged_at_odometer_x` FROM `module_meta`";
- const char* query_select_pt_exchanged_x_days_after_epoch =
+ ASSERT_EQ(0, FetchOneInt(query_select_pt_exchanged_at_odometer_x));
+
+ const std::string query_select_pt_exchanged_x_days_after_epoch =
"SELECT `pt_exchanged_x_days_after_epoch` FROM `module_meta`";
- const char* query_select_flag_update_required =
+ ASSERT_EQ(0, FetchOneInt(query_select_pt_exchanged_x_days_after_epoch));
+
+ const std::string query_select_flag_update_required =
"SELECT `flag_update_required` FROM `module_meta`";
- const char* query_select_ignition_cycles_since_last_exchange =
+ ASSERT_EQ(0, FetchOneInt(query_select_flag_update_required));
+
+ const std::string query_select_ignition_cycles_since_last_exchange =
"SELECT `ignition_cycles_since_last_exchange` FROM `module_meta`";
- const char* query_select_preloaded_pt =
+ ASSERT_EQ(0, FetchOneInt(query_select_ignition_cycles_since_last_exchange));
+
+ const std::string query_select_preloaded_pt =
"SELECT `preloaded_pt` FROM `module_config`";
- const char* query_select_is_first_run =
+ ASSERT_EQ(1, FetchOneInt(query_select_preloaded_pt));
+
+ const std::string query_select_is_first_run =
"SELECT `is_first_run` FROM `module_config`";
- const char* query_select_exchange_after_x_ignition_cycles =
+ ASSERT_EQ(0, FetchOneInt(query_select_is_first_run));
+
+ const std::string query_select_exchange_after_x_ignition_cycles =
"SELECT `exchange_after_x_ignition_cycles` FROM `module_config`";
- const char* query_select_exchange_after_x_kilometers =
+ ASSERT_EQ(0, FetchOneInt(query_select_exchange_after_x_ignition_cycles));
+
+ const std::string query_select_exchange_after_x_kilometers =
"SELECT `exchange_after_x_kilometers` FROM `module_config`";
- const char* query_select_exchange_after_x_days =
+ ASSERT_EQ(0, FetchOneInt(query_select_exchange_after_x_kilometers));
+
+ const std::string query_select_exchange_after_x_days =
"SELECT `exchange_after_x_days` FROM `module_config`";
- const char* query_select_timeout_after_x_seconds =
+ ASSERT_EQ(0, FetchOneInt(query_select_exchange_after_x_days));
+
+ const std::string query_select_timeout_after_x_seconds =
"SELECT `timeout_after_x_seconds` FROM `module_config`";
- const char* query_select_priorities = "SELECT COUNT(`value`) FROM `priority`";
- const char* query_select_hmi_levels =
+ ASSERT_EQ(0, FetchOneInt(query_select_timeout_after_x_seconds));
+
+ const std::string query_select_priorities =
+ "SELECT COUNT(`value`) FROM `priority`";
+ ASSERT_EQ(6, FetchOneInt(query_select_priorities));
+
+ const std::string query_select_hmi_levels =
"SELECT COUNT(`value`) FROM `hmi_level`";
- const char* query_select_version = "SELECT `number` FROM `version`";
+ ASSERT_EQ(4, FetchOneInt(query_select_hmi_levels));
- ASSERT_EQ(0, dbms->FetchOneInt(query_select_count_of_iap_buffer_full));
- ASSERT_EQ(0, dbms->FetchOneInt(query_select_count_sync_out_of_memory));
- ASSERT_EQ(0, dbms->FetchOneInt(query_select_count_of_sync_reboots));
- ASSERT_EQ(0, dbms->FetchOneInt(query_select_pt_exchanged_at_odometer_x));
- ASSERT_EQ(0, dbms->FetchOneInt(query_select_pt_exchanged_x_days_after_epoch));
- ASSERT_EQ(
- 0, dbms->FetchOneInt(query_select_ignition_cycles_since_last_exchange));
- ASSERT_EQ(0, dbms->FetchOneInt(query_select_flag_update_required));
- ASSERT_EQ(1, dbms->FetchOneInt(query_select_preloaded_pt));
- ASSERT_EQ(0, dbms->FetchOneInt(query_select_is_first_run));
- ASSERT_EQ(0,
- dbms->FetchOneInt(query_select_exchange_after_x_ignition_cycles));
- ASSERT_EQ(0, dbms->FetchOneInt(query_select_exchange_after_x_kilometers));
- ASSERT_EQ(0, dbms->FetchOneInt(query_select_exchange_after_x_days));
- ASSERT_EQ(0, dbms->FetchOneInt(query_select_timeout_after_x_seconds));
- ASSERT_EQ(6, dbms->FetchOneInt(query_select_priorities));
- ASSERT_EQ(4, dbms->FetchOneInt(query_select_hmi_levels));
- ASSERT_EQ(0, dbms->FetchOneInt(query_select_version));
+ const std::string query_select_version = "SELECT `number` FROM `version`";
+ ASSERT_EQ(0, FetchOneInt(query_select_version));
}
TEST_F(
SQLPTRepresentationTest,
CheckPermissionsAllowed_SetValuesInAppGroupRpcFunctionalGroup_GetEqualParamsInCheckPermissionResult) {
// Arrange
- const char* query =
+ const std::string query =
"INSERT OR REPLACE INTO `application` (`id`, `memory_kb`,"
" `heart_beat_timeout_ms`) VALUES ('12345', 5, 10); "
"INSERT OR REPLACE INTO functional_group (`id`, `name`)"
@@ -663,7 +689,7 @@ TEST_F(
" `functional_group_id`) VALUES ('Update', 'speed', 'FULL', 1);";
// Assert
- ASSERT_TRUE(dbms->Exec(query));
+ ASSERT_TRUE(query_wrapper_->Exec(query));
// Act
CheckPermissionResult ret;
@@ -681,7 +707,7 @@ TEST_F(
SQLPTRepresentationTest,
CheckPermissionsAllowedWithoutParameters_SetLimitedPermissions_ExpectEmptyListOfAllowedParams) {
// Arrange
- const char* query =
+ const std::string query =
"INSERT OR REPLACE INTO `application` (`id`, `memory_kb`,"
" `heart_beat_timeout_ms`) VALUES ('12345', 5, 10); "
"INSERT OR REPLACE INTO functional_group (`id`, `name`)"
@@ -693,7 +719,7 @@ TEST_F(
" `functional_group_id`) VALUES ('Update', 'LIMITED', 1);";
// Assert
- ASSERT_TRUE(dbms->Exec(query));
+ ASSERT_TRUE(query_wrapper_->Exec(query));
// Act
CheckPermissionResult ret;
@@ -708,10 +734,10 @@ TEST_F(
SQLPTRepresentationTest,
CheckPermissionsDisallowedWithoutParameters_DeletedAppGroupAndSetFULLLevel_ExpectHmiLevelIsDissalowed) {
// Arrange
- const char* query = "DELETE FROM `app_group`";
+ const std::string query = "DELETE FROM `app_group`";
// Assert
- ASSERT_TRUE(dbms->Exec(query));
+ ASSERT_TRUE(query_wrapper_->Exec(query));
// Act
CheckPermissionResult ret;
@@ -725,20 +751,20 @@ TEST_F(
TEST_F(SQLPTRepresentationTest,
PTPReloaded_UpdateModuleConfig_ReturnIsPTPreloadedTRUE) {
// Arrange
- const char* query = "UPDATE `module_config` SET `preloaded_pt` = 1";
+ const std::string query = "UPDATE `module_config` SET `preloaded_pt` = 1";
// Assert
- ASSERT_TRUE(dbms->Exec(query));
+ ASSERT_TRUE(query_wrapper_->Exec(query));
EXPECT_TRUE(reps->IsPTPreloaded());
}
TEST_F(SQLPTRepresentationTest,
GetUpdateUrls_DeleteAndInsertEndpoints_ExpectUpdateUrls) {
// Arrange
- const char* query_delete = "DELETE FROM `endpoint`; ";
+ const std::string query_delete = "DELETE FROM `endpoint`; ";
// Assert
- ASSERT_TRUE(dbms->Exec(query_delete));
+ ASSERT_TRUE(query_wrapper_->Exec(query_delete));
// Act
EndpointUrls ret = reps->GetUpdateUrls(7);
@@ -747,14 +773,15 @@ TEST_F(SQLPTRepresentationTest,
EXPECT_TRUE(ret.empty());
// Act
- const char* query_insert =
+ const std::string query_insert =
"INSERT INTO `endpoint` (`application_id`, `url`, `service`) "
" VALUES ('12345', 'http://ford.com/cloud/1', 7);"
"INSERT INTO `endpoint` (`application_id`, `url`, `service`) "
" VALUES ('12345', 'http://ford.com/cloud/2', 7);";
// Assert
- ASSERT_TRUE(dbms->Exec(query_insert));
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert));
+
// Act
ret = reps->GetUpdateUrls(7);
@@ -773,13 +800,13 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
IgnitionCyclesBeforeExchange_WithParametersOfQueryEqualZero) {
// Arrange
- const char* query_zeros =
+ const std::string query_zeros =
"UPDATE `module_meta` SET "
" `ignition_cycles_since_last_exchange` = 0; "
" UPDATE `module_config` SET `exchange_after_x_ignition_cycles` = 0";
// Assert
- ASSERT_TRUE(dbms->Exec(query_zeros));
+ ASSERT_TRUE(query_wrapper_->Exec(query_zeros));
EXPECT_EQ(0, reps->IgnitionCyclesBeforeExchange());
// Act
@@ -792,13 +819,13 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
IgnitionCyclesBeforeExchange_WithParametersOfQueryAreLessLimit) {
// Arrange
- const char* query_less_limit =
+ const std::string query_less_limit =
"UPDATE `module_meta` SET "
" `ignition_cycles_since_last_exchange` = 5; "
" UPDATE `module_config` SET `exchange_after_x_ignition_cycles` = 10";
// Assert
- ASSERT_TRUE(dbms->Exec(query_less_limit));
+ ASSERT_TRUE(query_wrapper_->Exec(query_less_limit));
EXPECT_EQ(5, reps->IgnitionCyclesBeforeExchange());
// Act
@@ -811,16 +838,18 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
IgnitionCyclesBeforeExchange_WithLimitCountOfParametersOfQuery) {
// Arrange
- const char* query_limit =
+ const std::string query_limit =
"UPDATE `module_meta` SET "
" `ignition_cycles_since_last_exchange` = 9; "
" UPDATE `module_config` SET `exchange_after_x_ignition_cycles` = 10";
// Assert
- ASSERT_TRUE(dbms->Exec(query_limit));
+ ASSERT_TRUE(query_wrapper_->Exec(query_limit));
EXPECT_EQ(1, reps->IgnitionCyclesBeforeExchange());
+
// Act
reps->IncrementIgnitionCycles();
+
// Assert
EXPECT_EQ(0, reps->IgnitionCyclesBeforeExchange());
}
@@ -828,13 +857,14 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
IgnitionCyclesBeforeExchange_WithMoreLimitCountOfParametersOfQuery) {
// Arrange
- const char* query_more_limit =
+ const std::string query_more_limit =
"UPDATE `module_meta` SET "
" `ignition_cycles_since_last_exchange` = 12; "
" UPDATE `module_config` SET `exchange_after_x_ignition_cycles` = 10";
// Assert
- ASSERT_TRUE(dbms->Exec(query_more_limit));
+ ASSERT_TRUE(query_wrapper_->Exec(query_more_limit));
+
// Chceck
EXPECT_EQ(0, reps->IgnitionCyclesBeforeExchange());
}
@@ -842,13 +872,14 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
IgnitionCyclesBeforeExchange_WithNegativeLimitOfParametersOfQuery) {
// Arrange
- const char* query_negative_limit =
+ const std::string query_negative_limit =
"UPDATE `module_meta` SET "
" `ignition_cycles_since_last_exchange` = 3; "
" UPDATE `module_config` SET `exchange_after_x_ignition_cycles` = -1";
// Assert
- ASSERT_TRUE(dbms->Exec(query_negative_limit));
+ ASSERT_TRUE(query_wrapper_->Exec(query_negative_limit));
+
// Check
EXPECT_EQ(0, reps->IgnitionCyclesBeforeExchange());
}
@@ -857,13 +888,14 @@ TEST_F(
SQLPTRepresentationTest,
IgnitionCyclesBeforeExchange_WithNegativeLimitOfCurrentParameterOfQuery) {
// Arrange
- const char* query_negative_current =
+ const std::string query_negative_current =
"UPDATE `module_meta` SET "
" `ignition_cycles_since_last_exchange` = -1; "
" UPDATE `module_config` SET `exchange_after_x_ignition_cycles` = 2";
// Assert
- ASSERT_TRUE(dbms->Exec(query_negative_current));
+ ASSERT_TRUE(query_wrapper_->Exec(query_negative_current));
+
// Check
EXPECT_EQ(0, reps->IgnitionCyclesBeforeExchange());
}
@@ -871,13 +903,14 @@ TEST_F(
TEST_F(SQLPTRepresentationTest,
KilometersBeforeExchange_WithParametersOfQueryEqualZero) {
// Arrange
- const char* query_zeros =
+ const std::string query_zeros =
"UPDATE `module_meta` SET "
" `pt_exchanged_at_odometer_x` = 0; "
" UPDATE `module_config` SET `exchange_after_x_kilometers` = 0";
// Assert
- ASSERT_TRUE(dbms->Exec(query_zeros));
+ ASSERT_TRUE(query_wrapper_->Exec(query_zeros));
+
// Checks
EXPECT_EQ(0, reps->KilometersBeforeExchange(0));
EXPECT_EQ(0, reps->KilometersBeforeExchange(-10));
@@ -887,13 +920,14 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
KilometersBeforeExchange_QueryWithNegativeLimit) {
// Arrange
- const char* query_negative_limit =
+ const std::string query_negative_limit =
"UPDATE `module_meta` SET "
" `pt_exchanged_at_odometer_x` = 10; "
" UPDATE `module_config` SET `exchange_after_x_kilometers` = -10";
// Assert
- ASSERT_TRUE(dbms->Exec(query_negative_limit));
+ ASSERT_TRUE(query_wrapper_->Exec(query_negative_limit));
+
// Checks
EXPECT_EQ(0, reps->KilometersBeforeExchange(0));
EXPECT_EQ(0, reps->KilometersBeforeExchange(10));
@@ -902,13 +936,14 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
KilometersBeforeExchange_QueryWithNegativeCurrentLimit) {
// Arrange
- const char* query_negative_last =
+ const std::string query_negative_last =
"UPDATE `module_meta` SET "
" `pt_exchanged_at_odometer_x` = -10; "
" UPDATE `module_config` SET `exchange_after_x_kilometers` = 20";
// Assert
- ASSERT_TRUE(dbms->Exec(query_negative_last));
+ ASSERT_TRUE(query_wrapper_->Exec(query_negative_last));
+
// Checks
EXPECT_EQ(0, reps->KilometersBeforeExchange(0));
EXPECT_EQ(0, reps->KilometersBeforeExchange(10));
@@ -917,13 +952,14 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
KilometersBeforeExchange_QueryWithLimitParameters) {
// Arrange
- const char* query_limit =
+ const std::string query_limit =
"UPDATE `module_meta` SET "
" `pt_exchanged_at_odometer_x` = 10; "
" UPDATE `module_config` SET `exchange_after_x_kilometers` = 100";
// Assert
- ASSERT_TRUE(dbms->Exec(query_limit));
+ ASSERT_TRUE(query_wrapper_->Exec(query_limit));
+
// Checks
EXPECT_EQ(0, reps->KilometersBeforeExchange(120));
EXPECT_EQ(60, reps->KilometersBeforeExchange(50));
@@ -933,13 +969,14 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
DaysBeforeExchange_WithParametersOfQueryEqualZero) {
// Arrange
- const char* query_zeros =
+ const std::string query_zeros =
"UPDATE `module_meta` SET "
" `pt_exchanged_x_days_after_epoch` = 0; "
" UPDATE `module_config` SET `exchange_after_x_days` = 0";
// Assert
- ASSERT_TRUE(dbms->Exec(query_zeros));
+ ASSERT_TRUE(query_wrapper_->Exec(query_zeros));
+
// Checks
EXPECT_EQ(0, reps->DaysBeforeExchange(0));
EXPECT_EQ(0, reps->DaysBeforeExchange(-10));
@@ -948,13 +985,14 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest, DaysBeforeExchange_QueryWithNegativeLimit) {
// Arrange
- const char* query_negative_limit =
+ const std::string query_negative_limit =
"UPDATE `module_meta` SET "
" `pt_exchanged_x_days_after_epoch` = 10; "
" UPDATE `module_config` SET `exchange_after_x_days` = -10";
// Assert
- ASSERT_TRUE(dbms->Exec(query_negative_limit));
+ ASSERT_TRUE(query_wrapper_->Exec(query_negative_limit));
+
// Checks
EXPECT_EQ(0, reps->DaysBeforeExchange(0));
EXPECT_EQ(0, reps->DaysBeforeExchange(10));
@@ -963,13 +1001,14 @@ TEST_F(SQLPTRepresentationTest, DaysBeforeExchange_QueryWithNegativeLimit) {
TEST_F(SQLPTRepresentationTest,
DaysBeforeExchange_QueryWithNegativeCurrentLimit) {
// Arrange
- const char* query_negative_last =
+ const std::string query_negative_last =
"UPDATE `module_meta` SET "
" `pt_exchanged_x_days_after_epoch` = -10; "
" UPDATE `module_config` SET `exchange_after_x_days` = 20";
// Assert
- ASSERT_TRUE(dbms->Exec(query_negative_last));
+ ASSERT_TRUE(query_wrapper_->Exec(query_negative_last));
+
// Checks
EXPECT_EQ(0, reps->DaysBeforeExchange(0));
EXPECT_EQ(0, reps->DaysBeforeExchange(10));
@@ -977,13 +1016,14 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest, DaysBeforeExchange_QueryWithLimitParameters) {
// Arrange
- const char* query_limit =
+ const std::string query_limit =
"UPDATE `module_meta` SET "
" `pt_exchanged_x_days_after_epoch` = 10; "
" UPDATE `module_config` SET `exchange_after_x_days` = 100";
// Assert
- ASSERT_TRUE(dbms->Exec(query_limit));
+ ASSERT_TRUE(query_wrapper_->Exec(query_limit));
+
// Checks
EXPECT_EQ(0, reps->DaysBeforeExchange(120));
EXPECT_EQ(60, reps->DaysBeforeExchange(50));
@@ -995,23 +1035,24 @@ TEST_F(
SecondsBetweenRetries_DeletedAndInsertedSecondsBetweenRetry_ExpectCountOfSecondsEqualInserted) {
// Arrange
std::vector<int> seconds;
- const char* query_delete = "DELETE FROM `seconds_between_retry`; ";
+ const std::string query_delete = "DELETE FROM `seconds_between_retry`; ";
// Assert
- ASSERT_TRUE(dbms->Exec(query_delete));
+ ASSERT_TRUE(query_wrapper_->Exec(query_delete));
ASSERT_TRUE(reps->SecondsBetweenRetries(&seconds));
EXPECT_EQ(0u, seconds.size());
// Arrange
- const char* query_insert =
+ const std::string query_insert =
"INSERT INTO `seconds_between_retry` (`index`, `value`) "
" VALUES (0, 10); "
"INSERT INTO `seconds_between_retry` (`index`, `value`) "
" VALUES (1, 20); ";
// Assert
- ASSERT_TRUE(dbms->Exec(query_insert));
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert));
ASSERT_TRUE(reps->SecondsBetweenRetries(&seconds));
+
// Checks
ASSERT_EQ(2u, seconds.size());
EXPECT_EQ(10, seconds[0]);
@@ -1020,11 +1061,12 @@ TEST_F(
TEST_F(SQLPTRepresentationTest, TimeoutResponse_Set60Seconds_GetEqualTimeout) {
// Arrange
- const char* query =
+ const std::string query =
"UPDATE `module_config` SET `timeout_after_x_seconds` = 60";
// Assert
- ASSERT_TRUE(dbms->Exec(query));
+ ASSERT_TRUE(query_wrapper_->Exec(query));
+
// Check
EXPECT_EQ(60000, reps->TimeoutResponse());
}
@@ -1032,8 +1074,12 @@ TEST_F(SQLPTRepresentationTest, TimeoutResponse_Set60Seconds_GetEqualTimeout) {
TEST_F(SQLPTRepresentationTest,
IsPTPreloaded_SetPTPreloadedThenCheck_ExpectCorrectValue) {
// Arrange
- const char* query_insert = "UPDATE `module_config` SET `preloaded_pt` = 1";
- ASSERT_TRUE(dbms->Exec(query_insert));
+ const std::string query_insert =
+ "UPDATE `module_config` SET `preloaded_pt` = 1";
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert));
+
// Check
ASSERT_TRUE(reps->IsPTPreloaded());
}
@@ -1042,65 +1088,81 @@ TEST_F(
SQLPTRepresentationTest,
SetCountersPassedForSuccessfulUpdate_SetCounters_ExpectValueChangedInPT) {
// Arrange
- const char* query_select_odometer =
+ const std::string query_select_odometer =
"SELECT `pt_exchanged_at_odometer_x` FROM`module_meta`";
- const char* query_select_days_after_epoch =
+ const std::string query_select_days_after_epoch =
"SELECT `pt_exchanged_x_days_after_epoch` FROM`module_meta`";
- ASSERT_EQ(0, dbms->FetchOneInt(query_select_odometer));
- ASSERT_EQ(0, dbms->FetchOneInt(query_select_days_after_epoch));
+ ASSERT_EQ(0, FetchOneInt(query_select_odometer));
+ ASSERT_EQ(0, FetchOneInt(query_select_days_after_epoch));
// Act
ASSERT_TRUE(reps->SetCountersPassedForSuccessfulUpdate(100, 10000));
- ASSERT_EQ(100, dbms->FetchOneInt(query_select_odometer));
- ASSERT_EQ(10000, dbms->FetchOneInt(query_select_days_after_epoch));
+ ASSERT_EQ(100, FetchOneInt(query_select_odometer));
+ ASSERT_EQ(10000, FetchOneInt(query_select_days_after_epoch));
}
TEST_F(
SQLPTRepresentationTest,
IncrementIgnitionCycles_SetIgnitionCyclesValueThenIncrement_ExpectValueIncrementedInPT) {
// Arrange
- const char* query_insert =
+ const std::string query_insert =
"UPDATE `module_meta` SET `ignition_cycles_since_last_exchange` = 54";
- const char* query_select =
+ const std::string query_select =
"SELECT `ignition_cycles_since_last_exchange`FROM `module_meta`";
- ASSERT_TRUE(dbms->Exec(query_insert));
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert));
+
// Act
reps->IncrementIgnitionCycles();
+
// Check
- ASSERT_EQ(55, dbms->FetchOneInt(query_select));
+ ASSERT_EQ(55, FetchOneInt(query_select));
}
TEST_F(
SQLPTRepresentationTest,
ResetIgnitionCycles_SetIgnitionCyclesValueThenReset_ExpectZeroValueInPT) {
// Arrange
- const char* query_insert =
+ const std::string query_insert =
"UPDATE `module_meta` SET `ignition_cycles_since_last_exchange` = 55";
- const char* query_select =
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert));
+
+ const std::string query_select =
"SELECT `ignition_cycles_since_last_exchange` FROM `module_meta`";
- ASSERT_TRUE(dbms->Exec(query_insert));
+
// Act
reps->ResetIgnitionCycles();
+
// Check
- ASSERT_EQ(0, dbms->FetchOneInt(query_select));
+ ASSERT_EQ(0, FetchOneInt(query_select));
}
TEST_F(SQLPTRepresentationTest,
GetUserFriendlyMsg_SetMsg_ExpectReceivedMsgSetInParams) {
// Arrange
- const char* query_insert =
+ const std::string query_insert_language_code =
"INSERT INTO `message` (`language_code`, `message_type_name`) VALUES "
"('en-en', 'AppPermissions')";
- ASSERT_TRUE(dbms->Exec(query_insert));
- query_insert =
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_language_code));
+
+ const std::string query_insert_name =
"INSERT INTO `message_type` (`name`) VALUES ('AppPermissions')";
- ASSERT_TRUE(dbms->Exec(query_insert));
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_name));
+
std::vector<std::string> msg_code;
msg_code.push_back("AppPermissions");
+
// Act
std::vector<UserFriendlyMessage> result =
reps->GetUserFriendlyMsg(msg_code, std::string("en-en"));
+
// Checks
ASSERT_EQ(1u, result.size());
EXPECT_EQ(result[0].message_code, "AppPermissions");
@@ -1110,13 +1172,14 @@ TEST_F(
SQLPTRepresentationTest,
GetNotificationNumber_SetNotificationsPriorities_ExpectReceivedValuesCorrect) {
// Arrange
- const char* query_insert =
+ const std::string query_insert =
"INSERT INTO `notifications_by_priority` (`priority_value`, `value`) "
"VALUES ('NAVIGATION', 15) , "
"('COMMUNICATION', 6), ('EMERGENCY', 60), ('NONE', 0), ('NORMAL', 4), "
"('VOICECOMMUNICATION', 20)";
- ASSERT_TRUE(dbms->Exec(query_insert));
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert));
EXPECT_EQ(6, reps->GetNotificationsNumber("COMMUNICATION"));
EXPECT_EQ(60, reps->GetNotificationsNumber("EMERGENCY"));
EXPECT_EQ(15, reps->GetNotificationsNumber("NAVIGATION"));
@@ -1128,7 +1191,7 @@ TEST_F(
TEST_F(SQLPTRepresentationTest,
GetPriority_SetAppsPrioritiesThenGet_ExpectReceivedValuesCorrect) {
// Arrange
- const char* query_insert_app =
+ const std::string query_insert_app_default =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, "
" `default_hmi`, `priority_value`, `is_revoked`, `is_default`, "
@@ -1136,9 +1199,11 @@ TEST_F(SQLPTRepresentationTest,
" `heart_beat_timeout_ms`) VALUES( 'default', 0, 0, 'NONE', 'NONE', 0, "
"0, "
"0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
- query_insert_app =
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app_default));
+
+ const std::string query_insert_app_predataconsent =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, "
" `default_hmi`, `priority_value`, `is_revoked`, `is_default`, "
@@ -1146,9 +1211,11 @@ TEST_F(SQLPTRepresentationTest,
" `heart_beat_timeout_ms`) VALUES( 'pre_DataConsent', 0, 0, 'NONE', "
"'NONE', 0, 0, "
"0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
- query_insert_app =
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app_predataconsent));
+
+ const std::string query_insert_app_device =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, "
" `default_hmi`, `priority_value`, `is_revoked`, `is_default`, "
@@ -1156,9 +1223,11 @@ TEST_F(SQLPTRepresentationTest,
" `heart_beat_timeout_ms`) VALUES( 'device', 0, 0, 'NONE', "
"'COMMUNICATION', 0, 0, "
"0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
- query_insert_app =
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app_device));
+
+ const std::string query_insert_app_12345 =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, "
" `default_hmi`, `priority_value`, `is_revoked`, `is_default`, "
@@ -1166,7 +1235,9 @@ TEST_F(SQLPTRepresentationTest,
" `heart_beat_timeout_ms`) VALUES( '12345', 0, 0, 'NONE', 'EMERGENCY', "
"0, 0, "
"0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app_12345));
std::string priority;
// Checks
@@ -1216,7 +1287,7 @@ TEST_F(SQLPTRepresentationTest3,
TEST_F(SQLPTRepresentationTest,
Clear_InitNewDataBaseThenClear_ExpectResultSuccess) {
// Arrange
- const char* query_insert_app =
+ const std::string query_insert_app_default =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, "
" `default_hmi`, `priority_value`, `is_revoked`, `is_default`, "
@@ -1224,9 +1295,11 @@ TEST_F(SQLPTRepresentationTest,
" `heart_beat_timeout_ms`) VALUES( 'default', 0, 0, 'NONE', 'NONE', 0, "
"0, "
"0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
- query_insert_app =
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app_default));
+
+ const std::string query_insert_app_predataconsent =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, "
" `default_hmi`, `priority_value`, `is_revoked`, `is_default`, "
@@ -1234,9 +1307,11 @@ TEST_F(SQLPTRepresentationTest,
" `heart_beat_timeout_ms`) VALUES( 'pre_DataConsent', 0, 0, 'NONE', "
"'NONE', 0, 0, "
"0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
- query_insert_app =
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app_predataconsent));
+
+ const std::string query_insert_app_device =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, "
" `default_hmi`, `priority_value`, `is_revoked`, `is_default`, "
@@ -1244,9 +1319,11 @@ TEST_F(SQLPTRepresentationTest,
" `heart_beat_timeout_ms`) VALUES( 'device', 0, 0, 'NONE', "
"'COMMUNICATION', 0, 0, "
"0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
- query_insert_app =
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app_device));
+
+ const std::string query_insert_app_12345 =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, "
" `default_hmi`, `priority_value`, `is_revoked`, `is_default`, "
@@ -1254,15 +1331,18 @@ TEST_F(SQLPTRepresentationTest,
" `heart_beat_timeout_ms`) VALUES( '12345', 0, 0, 'NONE', 'EMERGENCY', "
"0, 0, "
"0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
- const char* query_insert =
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app_12345));
+
+ const std::string query_insert =
"INSERT INTO `notifications_by_priority` (`priority_value`, `value`) "
"VALUES ('NAVIGATION', 15) , "
"('COMMUNICATION', 6), ('EMERGENCY', 60), ('NONE', 0), ('NORMAL', 4), "
"('VOICECOMMUNICATION', 20)";
- ASSERT_TRUE(dbms->Exec(query_insert));
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert));
EXPECT_TRUE(reps->Clear());
utils::dbms::SQLError error(utils::dbms::Error::OK);
EXPECT_EQ(error.number(), (reps->db()->LastError().number()));
@@ -1271,17 +1351,22 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
GetInitialAppData_SetData_ExpectCorrectValuesReceived) {
// Arrange
- const char* query_insert =
+ const std::string query_insert_nickname =
"INSERT INTO `nickname` (`application_id`, `name`) "
"VALUES ('1111', 'first_app') , "
"('2222', 'second_app'), ('3333', 'third_app')";
- ASSERT_TRUE(dbms->Exec(query_insert));
- query_insert =
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_nickname));
+
+ const std::string query_insert_app_type =
"INSERT INTO `app_type` (`application_id`, `name`)"
"VALUES ('1111', 'NAVIGATION') , "
"('1111', 'MEDIA'), ('3333', 'COMMUNICATION')";
- ASSERT_TRUE(dbms->Exec(query_insert));
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app_type));
+
::policy::StringArray nicknames;
::policy::StringArray app_types;
ASSERT_TRUE(reps->GetInitialAppData("1111", &nicknames, &app_types));
@@ -1315,22 +1400,28 @@ TEST_F(
SQLPTRepresentationTest,
GetFunctionalGroupings_SetFunctionalGroupings_ExpectCorrectValuesReceived) {
// Arrange
- const char* query_insert =
+ const std::string query_insert_functional_group =
"INSERT INTO `functional_group` (`id`, `user_consent_prompt`, `name`) "
"VALUES (73072936, null, 'SendLocation'), (1533011474, null, "
"'OnKeyboardInputOnlyGroup')";
- ASSERT_TRUE(dbms->Exec(query_insert));
- query_insert =
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_functional_group));
+
+ const std::string query_insert_rpc_sendlocation =
"INSERT INTO `rpc` (`name`, `hmi_level_value`, `functional_group_id`) "
"VALUES ('SendLocation', 'BACKGROUND', 73072936), ('SendLocation', "
"'FULL', 73072936), ('SendLocation', 'LIMITED', 73072936)";
- ASSERT_TRUE(dbms->Exec(query_insert));
- query_insert =
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_rpc_sendlocation));
+
+ const std::string query_insert_rpc_onkeyboard_input =
"INSERT INTO `rpc` (`name`, `hmi_level_value`, `functional_group_id`) "
"VALUES ('OnKeyboardInput', 'FULL', 1533011474)";
- ASSERT_TRUE(dbms->Exec(query_insert));
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_rpc_onkeyboard_input));
policy_table::FunctionalGroupings func_groups;
ASSERT_TRUE(reps->GetFunctionalGroupings(func_groups));
@@ -1383,10 +1474,12 @@ TEST_F(
TEST_F(SQLPTRepresentationTest,
UpdateRequired_SetUpdateRequiredFlagThenCheck_ExpectUpdateRequired) {
// Arrange
- const char* query_insert =
+ const std::string query_insert =
"UPDATE `module_meta` SET `flag_update_required` = 1";
+
// Assert
- ASSERT_TRUE(dbms->Exec(query_insert));
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert));
+
// Check
EXPECT_TRUE(reps->UpdateRequired());
}
@@ -1395,10 +1488,13 @@ TEST_F(SQLPTRepresentationTest,
SaveUpdateRequired_SaveUpdateRequired_ExpectCorrectValues) {
// Arrange
reps->SaveUpdateRequired(true);
+
// Check
EXPECT_TRUE(reps->UpdateRequired());
+
// Act
reps->SaveUpdateRequired(false);
+
// Check
EXPECT_FALSE(reps->UpdateRequired());
}
@@ -1406,7 +1502,7 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
IsApplicationRepresented_Check_ExpectCorrectResult) {
// Arrange
- const char* query_insert_app =
+ const std::string query_insert_app_default =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, "
" `default_hmi`, `priority_value`, `is_revoked`, `is_default`, "
@@ -1414,18 +1510,22 @@ TEST_F(SQLPTRepresentationTest,
" `heart_beat_timeout_ms`) VALUES( 'default', 0, 0, 'NONE', 'NONE', 0, "
"0, "
"0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
- query_insert_app =
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app_default));
+
+ const std::string query_insert_app_device =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, "
" `default_hmi`, `priority_value`, `is_revoked`, `is_default`, "
"`is_predata`, `memory_kb`, "
" `heart_beat_timeout_ms`) VALUES( 'device', 0, 0, 'NONE', "
"'COMMUNICATION', 0, 0, 0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
- query_insert_app =
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app_device));
+
+ const std::string query_insert_app_12345 =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, "
" `default_hmi`, `priority_value`, `is_revoked`, `is_default`, "
@@ -1433,7 +1533,10 @@ TEST_F(SQLPTRepresentationTest,
" `heart_beat_timeout_ms`) VALUES( '12345', 0, 0, 'NONE', 'EMERGENCY', "
"0, 0, "
"0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app_12345));
+
// Checks
EXPECT_TRUE(reps->IsApplicationRepresented("default"));
EXPECT_TRUE(reps->IsApplicationRepresented("device"));
@@ -1444,7 +1547,7 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
IsApplicationRevoked_CheckApps_ExpectCorrectResult) {
// Arrange
- const char* query_insert_app =
+ const std::string query_insert_app_7777 =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, "
" `default_hmi`, `priority_value`, `is_revoked`, `is_default`, "
@@ -1452,9 +1555,11 @@ TEST_F(SQLPTRepresentationTest,
" `heart_beat_timeout_ms`) VALUES( '7777', 0, 0, 'NONE', 'NONE', 1, "
"0, "
"0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
- query_insert_app =
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app_7777));
+
+ const std::string query_insert_app_12345 =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, "
" `default_hmi`, `priority_value`, `is_revoked`, `is_default`, "
@@ -1462,7 +1567,10 @@ TEST_F(SQLPTRepresentationTest,
" `heart_beat_timeout_ms`) VALUES( '12345', 0, 0, 'NONE', 'EMERGENCY', "
"0, 0, "
"0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app_12345));
+
// Checks
EXPECT_TRUE(reps->IsApplicationRevoked("7777"));
EXPECT_FALSE(reps->IsApplicationRevoked("12345"));
@@ -1471,7 +1579,7 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
CopyApplication_CopyApplication_ExpectAppCopiedSuccesfully) {
// Arrange
- const char* query_insert_app =
+ const std::string query_insert_app_default =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, "
" `default_hmi`, `priority_value`, `is_revoked`, `is_default`, "
@@ -1479,21 +1587,28 @@ TEST_F(SQLPTRepresentationTest,
" `heart_beat_timeout_ms`) VALUES( 'default', 0, 0, 'NONE', 'NONE', 0, "
"1, "
"0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
- query_insert_app =
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app_default));
+
+ const std::string query_insert_app_123 =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, "
" `default_hmi`, `priority_value`, `is_revoked`, `is_default`, "
"`is_predata`, `memory_kb`, "
" `heart_beat_timeout_ms`) VALUES( '123', 1, 0, 'FULL', "
"'COMMUNICATION', 1, 1, 0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app_123));
+
EXPECT_FALSE(reps->IsApplicationRepresented("7777"));
EXPECT_FALSE(reps->IsApplicationRepresented("9999"));
+
// Act
EXPECT_TRUE(reps->CopyApplication("default", "7777"));
EXPECT_TRUE(reps->CopyApplication("123", "9999"));
+
// Checks
EXPECT_TRUE(reps->IsApplicationRepresented("7777"));
EXPECT_TRUE(reps->IsApplicationRepresented("9999"));
@@ -1513,7 +1628,7 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
IsDefaultPolicy_SetAppPreDataThenCheck_ExpectNotDefaultPolicySet) {
// Arrange
- const char* query_insert_app =
+ const std::string query_insert_app =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, "
" `default_hmi`, `priority_value`, `is_revoked`, `is_default`, "
@@ -1521,7 +1636,10 @@ TEST_F(SQLPTRepresentationTest,
" `heart_beat_timeout_ms`) VALUES( '12345', 0, 0, 'NONE', 'NONE', 0, "
"0, "
"1, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app));
+
// Check
EXPECT_FALSE(reps->IsDefaultPolicy("12345"));
}
@@ -1529,28 +1647,35 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
IsDefaultPolicy_SetAppDefaultThenCheck_ExpectNotDefaultPolicySet) {
// Arrange
- const char* query_insert_app =
+ const std::string query_insert_app =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, `default_hmi`, `priority_value`, `is_revoked`, "
"`is_default`, `is_predata`, `memory_kb`, `heart_beat_timeout_ms`) "
"VALUES( '1234567', 0, 0, 'NONE', 'NONE', 0, 1, 0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app));
+
// Check
EXPECT_TRUE(reps->IsDefaultPolicy("1234567"));
}
TEST_F(SQLPTRepresentationTest, Drop_DropExistedPT_ExpectZeroTables) {
// Check
- const char* query_select =
+ const std::string query_select =
"SELECT COUNT(*) FROM `sqlite_master` WHERE `type` = 'table'";
// In normally created PT there are more than 0 tables
- ASSERT_TRUE(dbms->Exec(query_select));
- ASSERT_GT(dbms->FetchOneInt(query_select), 0);
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_select));
+ ASSERT_GT(FetchOneInt(query_select), 0);
+
// Destroy schema
ASSERT_TRUE(reps->Drop());
+
// Check PT structure destroyed and tables number is 0
- ASSERT_EQ(0, dbms->FetchOneInt(query_select));
+ ASSERT_EQ(0, FetchOneInt(query_select));
+
// Restore schema
ASSERT_TRUE(reps->RefreshDB());
}
@@ -1572,21 +1697,24 @@ TEST_F(SQLPTRepresentationTest,
"VALUES( '" +
kDefaultId + "', 0, 0, 'NONE', 'NONE', 0, 0, 0, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_default_app.c_str()));
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_default_app));
const std::string query_insert_default_app_request_types =
"INSERT INTO `request_type` (`application_id`, `request_type`) "
"VALUES ('" +
kDefaultId + "', '" + kRequestType + "')";
- ASSERT_TRUE(dbms->Exec(query_insert_default_app_request_types.c_str()));
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_default_app_request_types));
const std::string query_insert_default_app_hmi_types =
"INSERT INTO `app_type` (`application_id`, `name`) "
"VALUES ('" +
kDefaultId + "', '" + kHmiType + "')";
- ASSERT_TRUE(dbms->Exec(query_insert_default_app_hmi_types.c_str()));
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_default_app_hmi_types));
const std::string query_insert_new_app =
"INSERT INTO `application`(`id`, `keep_context`, "
@@ -1595,11 +1723,14 @@ TEST_F(SQLPTRepresentationTest,
"VALUES('" +
kAppId + "', 0, 0, 'NONE', 'NONE', 0, 0, 1, 64, 10)";
- ASSERT_TRUE(dbms->Exec(query_insert_new_app.c_str()));
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_new_app));
EXPECT_FALSE(reps->IsDefaultPolicy(kAppId));
+
// Act
ASSERT_TRUE(reps->SetDefaultPolicy(kAppId));
+
// Check
EXPECT_TRUE(reps->IsDefaultPolicy(kAppId));
@@ -1617,16 +1748,24 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
SetPreloaded_SetPreloaded_ExpectPTSetToPreloaded) {
// Arrange
- const char* query_insert = "UPDATE `module_config` SET `preloaded_pt` = 0";
- ASSERT_TRUE(dbms->Exec(query_insert));
+ const std::string query_insert =
+ "UPDATE `module_config` SET `preloaded_pt` = 0";
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert));
+
// Check
ASSERT_FALSE(reps->IsPTPreloaded());
+
// Act
reps->SetPreloaded(true);
+
// Check
ASSERT_TRUE(reps->IsPTPreloaded());
+
// Act
reps->SetPreloaded(false);
+
// Check
ASSERT_FALSE(reps->IsPTPreloaded());
}
@@ -1634,23 +1773,30 @@ TEST_F(SQLPTRepresentationTest,
TEST_F(SQLPTRepresentationTest,
SetIsDefault_SetIsDefault_ExpectDefaultFlagSet) {
// Arrange
- const char* query_insert_app =
+ const std::string query_insert_app =
"INSERT OR IGNORE INTO `application`(`id`, `keep_context`, "
"`steal_focus`, `default_hmi`, `priority_value`, `is_revoked`, "
"`is_default`, `is_predata`, `memory_kb`, `heart_beat_timeout_ms`) "
"VALUES( '1234567', 0, 0, 'NONE', 'NONE', 0, 0, 1, 64, 10) ";
- ASSERT_TRUE(dbms->Exec(query_insert_app));
- const char* query_select =
+
+ // Assert
+ ASSERT_TRUE(query_wrapper_->Exec(query_insert_app));
+
+ const std::string query_select =
"SELECT `is_default` FROM `application`WHERE`id`= '1234567' ";
- EXPECT_EQ(0, dbms->FetchOneInt(query_select));
+ EXPECT_EQ(0, FetchOneInt(query_select));
+
// Act
EXPECT_TRUE(reps->SetIsDefault("1234567", true));
+
// Check
- EXPECT_EQ(1, dbms->FetchOneInt(query_select));
+ EXPECT_EQ(1, FetchOneInt(query_select));
+
// Act
EXPECT_TRUE(reps->SetIsDefault("1234567", false));
+
// Check
- EXPECT_EQ(0, dbms->FetchOneInt(query_select));
+ EXPECT_EQ(0, FetchOneInt(query_select));
}
TEST_F(SQLPTRepresentationTest3, RemoveDB_RemoveDB_ExpectFileDeleted) {
@@ -1748,6 +1894,7 @@ TEST_F(SQLPTRepresentationTest, Save_SetPolicyTableThenSave_ExpectSavedToPT) {
EXPECT_EQ(0u, config.seconds_between_retries.size());
EXPECT_EQ(0u, config.endpoints.size());
EXPECT_EQ(0u, config.notifications_per_minute_by_priority.size());
+ EXPECT_EQ(0u, (*config.subtle_notifications_per_minute_by_priority).size());
policy_table::ConsumerFriendlyMessages messages;
GatherConsumerFriendlyMessages(&messages);
@@ -1855,6 +2002,19 @@ TEST_F(SQLPTRepresentationTest, Save_SetPolicyTableThenSave_ExpectSavedToPT) {
ASSERT_EQ(4, config.notifications_per_minute_by_priority["communication"]);
ASSERT_EQ(5, config.notifications_per_minute_by_priority["normal"]);
ASSERT_EQ(6, config.notifications_per_minute_by_priority["none"]);
+ ASSERT_EQ(6u, (*config.subtle_notifications_per_minute_by_priority).size());
+ ASSERT_EQ(7,
+ (*config.subtle_notifications_per_minute_by_priority)["emergency"]);
+ ASSERT_EQ(
+ 8, (*config.subtle_notifications_per_minute_by_priority)["navigation"]);
+ ASSERT_EQ(9,
+ (*config.subtle_notifications_per_minute_by_priority)["VOICECOMM"]);
+ ASSERT_EQ(
+ 10,
+ (*config.subtle_notifications_per_minute_by_priority)["communication"]);
+ ASSERT_EQ(11,
+ (*config.subtle_notifications_per_minute_by_priority)["normal"]);
+ ASSERT_EQ(12, (*config.subtle_notifications_per_minute_by_priority)["none"]);
EXPECT_EQ(1u, config.endpoints.size());
policy_table::ServiceEndpoints& service_endpoints = config.endpoints;
EXPECT_EQ("0x00", service_endpoints.begin()->first);
diff --git a/src/components/policy/policy_regular/test/valid_sdl_pt_update.json b/src/components/policy/policy_regular/test/valid_sdl_pt_update.json
deleted file mode 100644
index acf18c5706..0000000000
--- a/src/components/policy/policy_regular/test/valid_sdl_pt_update.json
+++ /dev/null
@@ -1,1746 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "1010101010" : {
- "AppHMIType" : [ "MEDIA" ],
- "certificate" : "akdjfhaliuygrglurng",
- "default_hmi" : "BACKGROUND",
- "groups" : [
- "Notifications",
- "Location-1",
- "PropriataryData-1",
- "Navigation-1",
- "Base-4",
- "VehicleInfo-3",
- "DrivingCharacteristics-3",
- "Emergency-1"
- ],
- "keep_context" : true,
- "memory_kb" : 1000,
- "nicknames" : [ "SyncProxyTester" ],
- "priority" : "EMERGENCY",
- "steal_focus" : true,
- "heart_beat_timeout_ms": 5000,
- "app_services": {
- "MEDIA": {
- "service_names" : ["SDL App", "SDL Music"],
- "handled_rpcs" : [{"function_id": 41}]
- }
- }
- },
- "default" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "device" : {
- "default_hmi" : "NONE",
- "groups" : [ "Base-4" ],
- "memory_kb" : 1000,
- "watchdog_timer_ms" : 20000,
- "keep_context" : false,
- "priority" : "NONE",
- "steal_focus" : false
- },
- "pre_DataConsent" : {
- "default_hmi" : "NONE",
- "groups" : [ "pre_Base-1" ],
- "keep_context" : false,
- "memory_kb" : 1000,
- "priority" : "NONE",
- "steal_focus" : false
- }
- },
- "consumer_friendly_messages" : {
- "messages" : {
- "AppPermissions" : {
- "languages" : {
- "de-de" : {
- "line1" : "Zugriffsanfrage(n)",
- "line2" : "erlauben?",
- "tts" : "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-gb" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-ie" : {
- "line1" : "Grant requested",
- "line2" : "permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny."
- },
- "en-us" : {
- "line1" : "Grant Requested",
- "line2" : "Permission(s)?",
- "tts" : "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press yes to allow or no to deny."
- },
- "es-en" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "es-es" : {
- "line1" : "¿Conceder permisos",
- "line2" : "solicitados?",
- "tts" : "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar."
- },
- "es-mx" : {
- "line1" : "¿Otorgar permiso(s)",
- "line2" : "solicitado(s)?",
- "tts" : "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar."
- },
- "fr-ca" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "fr-fr" : {
- "line1" : "Accorder permission(s)",
- "line2" : "demandée(s)",
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser."
- },
- "it-it" : {
- "line1" : "Concedi autorizzaz.",
- "line2" : "richiesta(e)?",
- "tts" : "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare."
- },
- "nl-nl" : {
- "line1" : "Aangevraagde",
- "line2" : "permissie(s) verlenen?",
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren."
- },
- "pl-pl" : {
- "line1" : "Udzielić żądanych",
- "line2" : "pozwoleń?",
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "line1" : "Conceder permissão",
- "line2" : "solicitada?",
- "tts" : "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar."
- },
- "pt-pt" : {
- "line1" : "Conceder permiss.",
- "line2" : "solicitada(s)?",
- "tts" : "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar."
- },
- "ru-ru" : {
- "line1" : "Предост. заправш.",
- "line2" : "разрешения?",
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны."
- },
- "sv-se" : {
- "line1" : "Vill du ge",
- "line2" : "tillstånd?",
- "tts" : "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka."
- },
- "tr-tr" : {
- "line1" : "İstenen izinler",
- "line2" : "verilsin mi?",
- "tts" : "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否允许请求的",
- "line2" : "权限?",
- "tts" : "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。"
- },
- "zh-tw" : {
- "line1" : "允許",
- "line2" : "授權請求?",
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsHelp" : {
- "languages" : {
- "de-de" : {
- "tts" : "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab."
- },
- "en-au" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-gb" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-ie" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny."
- },
- "en-us" : {
- "tts" : "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny."
- },
- "es-en" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "es-es" : {
- "tts" : "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo."
- },
- "es-mx" : {
- "tts" : "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar."
- },
- "fr-ca" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "fr-fr" : {
- "tts" : "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser."
- },
- "it-it" : {
- "tts" : "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle."
- },
- "nl-nl" : {
- "tts" : "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren."
- },
- "pl-pl" : {
- "tts" : "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania."
- },
- "pt-br" : {
- "tts" : "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar."
- },
- "pt-pt" : {
- "tts" : "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar."
- },
- "ru-ru" : {
- "tts" : "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять."
- },
- "sv-se" : {
- "tts" : "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka."
- },
- "tr-tr" : {
- "tts" : "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın."
- },
- "zh-cn" : {
- "tts" : "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。"
- },
- "zh-tw" : {
- "tts" : "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。"
- }
- }
- },
- "AppPermissionsRevoked" : {
- "languages" : {
- "de-de" : {
- "tts" : "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.."
- },
- "en-au" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-gb" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-ie" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "en-us" : {
- "tts" : "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device."
- },
- "es-en" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "es-es" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil."
- },
- "es-mx" : {
- "tts" : "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil."
- },
- "fr-ca" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "fr-fr" : {
- "tts" : "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile."
- },
- "it-it" : {
- "tts" : "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile."
- },
- "nl-nl" : {
- "tts" : "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt."
- },
- "pl-pl" : {
- "tts" : "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji."
- },
- "pt-br" : {
- "tts" : "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel."
- },
- "pt-pt" : {
- "tts" : "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel."
- },
- "ru-ru" : {
- "tts" : "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения."
- },
- "sv-se" : {
- "tts" : "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten."
- },
- "tr-tr" : {
- "tts" : "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun."
- },
- "zh-cn" : {
- "tts" : "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。"
- },
- "zh-tw" : {
- "tts" : "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。"
- }
- }
- },
- "AppUnauthorized" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht autorisiert",
- "tts" : "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren."
- },
- "en-au" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-gb" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-ie" : {
- "line1" : "not authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "en-us" : {
- "line1" : "Not Authorized",
- "tts" : "This version of %appName% is not authorized and will not work with SYNC."
- },
- "es-en" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "es-es" : {
- "line1" : "No autorizada",
- "tts" : "Esta versión de %appName% no está autorizada y no funcionará con SYNC."
- },
- "es-mx" : {
- "line1" : "no autorizada",
- "tts" : "Esta versión de %appName% no tiene autorización y no funcionará con SYNC."
- },
- "fr-ca" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "fr-fr" : {
- "line1" : "non autorisée",
- "tts" : "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC."
- },
- "it-it" : {
- "line1" : "non autorizzata",
- "tts" : "Questa versione di %appName% non è autorizzata e non funziona con il SYNC."
- },
- "nl-nl" : {
- "line1" : "niet geautoriseerd",
- "tts" : "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC."
- },
- "pl-pl" : {
- "line1" : "brak autoryzacji",
- "tts" : "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC."
- },
- "pt-br" : {
- "line1" : "não autorizado",
- "tts" : "Esta versão do %appName% não tem autorização e não funcionará com o SYNC."
- },
- "pt-pt" : {
- "line1" : "não autorizada",
- "tts" : "Esta versão de %appName% não está autorizada e não funcionará com o SYNC."
- },
- "ru-ru" : {
- "line1" : "не авторизировано",
- "tts" : "Эта версия %appName% не авторизирована и не будет работать с SYNC."
- },
- "sv-se" : {
- "line1" : "är ej godkänd",
- "tts" : "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC."
- },
- "tr-tr" : {
- "line1" : "için izin yok",
- "tts" : "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz."
- },
- "zh-cn" : {
- "line1" : "未得到授权",
- "tts" : "此版本的%appName% 未得到授权,无法在SYNC上使用。"
- },
- "zh-tw" : {
- "line1" : "無授權",
- "tts" : "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。"
- }
- }
- },
- "AppUnsupported" : {
- "languages" : {
- "de-de" : {
- "line1" : "nicht unterstützt",
- "tts" : "Diese Version von %appName% wird von SYNC nicht unterstützt."
- },
- "en-au" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-gb" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-ie" : {
- "line1" : "not supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "en-us" : {
- "line1" : "Not Supported",
- "tts" : "This version of %appName% is not supported by SYNC."
- },
- "es-en" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-es" : {
- "line1" : "No compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "es-mx" : {
- "line1" : "no compatible",
- "tts" : "Esta versión de %appName% no es compatible con SYNC."
- },
- "fr-ca" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "fr-fr" : {
- "line1" : "incompatible",
- "tts" : "Cette version de %appName% n’est pas prise en charge par SYNC."
- },
- "it-it" : {
- "line1" : "non supportata",
- "tts" : "Questa versione di %appName% non è supportata dal SYNC."
- },
- "nl-nl" : {
- "line1" : "niet ondersteund",
- "tts" : "Deze versie van %appName% wordt niet ondersteund door SYNC."
- },
- "pl-pl" : {
- "line1" : "aplikacja nie obsług.",
- "tts" : "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC."
- },
- "pt-br" : {
- "line1" : "não suportado",
- "tts" : "Esta versão do %appName% não é suportada pelo SYNC."
- },
- "pt-pt" : {
- "line1" : "não suportada",
- "tts" : "Esta versão de %appName% não é suportado pelo SYNC."
- },
- "ru-ru" : {
- "line1" : "не поддерживается",
- "tts" : "Эта версия %appName% не поддерживается SYNC."
- },
- "sv-se" : {
- "line1" : "stöds ej",
- "tts" : "SYNC har inte stöd för den här versionen av %appName%."
- },
- "tr-tr" : {
- "line1" : "desteklenmiyor",
- "tts" : "Bu %appName% sürümü SYNC tarafından desteklenmiyor."
- },
- "zh-cn" : {
- "line1" : "不受支持",
- "tts" : "SYNC不支持此版本的%appName%。"
- },
- "zh-tw" : {
- "line1" : "不支援",
- "tts" : "SYNC 不支援此版本的%appName% 。"
- }
- }
- },
- "DataConsent" : {
- "languages" : {
- "en-us" : {
- "line1" : "Enable Mobile Apps",
- "line2" : "on SYNC? (Uses Data)",
- "tts" : "To use mobile apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device's data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. Please press yes or no, or help for more information. "
- }
- }
- },
- "DataConsentHelp" : {
- "languages" : {
- "en-us" : {
- "tts" : "Updates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC mobile apps settings menu. See your Owner Guide for more information. "
- }
- }
- },
- "DisableApps" : {
- "languages" : {
- "de-de" : {
- "line1" : "Auto-Update",
- "line2" : "und Mobile Apps deaktivieren",
- "tts" : "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen."
- },
- "en-au" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-gb" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-ie" : {
- "line1" : "Disable auto-updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel."
- },
- "en-us" : {
- "line1" : "Disable Auto-Updates",
- "line2" : "and Mobile Apps?",
- "tts" : "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel."
- },
- "es-en" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "es-es" : {
- "line1" : "¿Desact. actual. auto",
- "line2" : "y apl. móviles?",
- "tts" : "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar."
- },
- "es-mx" : {
- "line1" : "¿Deshab. actualiz.",
- "line2" : "autom. y aplic. móv.?",
- "tts" : "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar."
- },
- "fr-ca" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "fr-fr" : {
- "line1" : "Désactiver màj autom.",
- "line2" : "et app. mobiles?",
- "tts" : "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler."
- },
- "it-it" : {
- "line1" : "Disabilitare agg. aut.",
- "line2" : "e app mobili?",
- "tts" : "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare."
- },
- "nl-nl" : {
- "line1" : "Auto-updates en mob.",
- "line2" : "apps uitschakelen?",
- "tts" : "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren."
- },
- "pl-pl" : {
- "line1" : "Wył. automat. aktual.",
- "line2" : "i aplikacje mobilne?",
- "tts" : "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować."
- },
- "pt-br" : {
- "line1" : "Desativar atualizações",
- "line2" : "autom. e aplicativos?",
- "tts" : "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar."
- },
- "pt-pt" : {
- "line1" : "Desact. actual. autom.",
- "line2" : "e aplicações móveis?",
- "tts" : "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar."
- },
- "ru-ru" : {
- "line1" : "Откл. автообновления",
- "line2" : "и мобил. прилож.?",
- "tts" : "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены."
- },
- "sv-se" : {
- "line1" : "Avaktiverar autouppdat.",
- "line2" : "och mobilappar?",
- "tts" : "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta."
- },
- "tr-tr" : {
- "line1" : "Oto. güncelleme ve",
- "line2" : "mobil uygul. kapat?",
- "tts" : "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın."
- },
- "zh-cn" : {
- "line1" : "是否禁用自动更新和",
- "line2" : "移动应用程序?",
- "tts" : "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。"
- },
- "zh-tw" : {
- "line1" : "停用自動更新",
- "line2" : "和行動應用程式?",
- "tts" : "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。"
- }
- }
- },
- "DrivingCharacteristics" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahreigenschaften",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus."
- },
- "en-au" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-gb" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-ie" : {
- "label" : "Driving characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status."
- },
- "en-us" : {
- "label" : "Driving Characteristics",
- "tts" : "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status."
- },
- "es-en" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "es-es" : {
- "label" : "Características de conducción",
- "tts" : "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad."
- },
- "es-mx" : {
- "label" : "Características del manejo",
- "tts" : "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad."
- },
- "fr-ca" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "fr-fr" : {
- "label" : "Caractéristiques de conduite",
- "tts" : "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité."
- },
- "it-it" : {
- "label" : "Caratteristiche di guida",
- "tts" : "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza."
- },
- "nl-nl" : {
- "label" : "Rijkenmerken",
- "tts" : "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus."
- },
- "pl-pl" : {
- "label" : "Informacje dotyczące stylu jazdy",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa."
- },
- "pt-br" : {
- "label" : "Características de condução",
- "tts" : "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança."
- },
- "pt-pt" : {
- "label" : "Características de condução",
- "tts" : "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança."
- },
- "ru-ru" : {
- "label" : "Характеристики движения",
- "tts" : "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности."
- },
- "sv-se" : {
- "label" : "Köregenskaper",
- "tts" : "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus."
- },
- "tr-tr" : {
- "label" : "Sürüş karakteristikleri",
- "tts" : "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu."
- },
- "zh-cn" : {
- "label" : "行驶特性",
- "tts" : "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态"
- },
- "zh-tw" : {
- "label" : "駕駛特性",
- "tts" : "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態"
- }
- }
- },
- "Location" : {
- "languages" : {
- "de-de" : {
- "label" : "GPS und Geschwindigkeit",
- "tts" : "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs."
- },
- "en-au" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-gb" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-ie" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "en-us" : {
- "label" : "GPS and speed",
- "tts" : "An app can access vehicle GPS and speed."
- },
- "es-en" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "es-es" : {
- "label" : "GPS y velocidad",
- "tts" : "Una aplicación puede acceder al GPS y la velocidad del vehículo."
- },
- "es-mx" : {
- "label" : "GPS y velocidad",
- "tts" : "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo."
- },
- "fr-ca" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "fr-fr" : {
- "label" : "GPS et vitesse",
- "tts" : "Une application peut accéder au GPS et à la vitesse du véhicule."
- },
- "it-it" : {
- "label" : "GPS e velocità",
- "tts" : "Un'app può avere accesso a GPS e velocità del veicolo."
- },
- "nl-nl" : {
- "label" : "Gps en snelheid",
- "tts" : "Een app heeft toegang tot gps en de snelheid van het voertuig."
- },
- "pl-pl" : {
- "label" : "GPS i prędkość",
- "tts" : "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu."
- },
- "pt-br" : {
- "label" : "GPS e velocidade",
- "tts" : "Um aplicativo pode acessar o GPS e a velocidade do veículo."
- },
- "pt-pt" : {
- "label" : "GPS e velocidade",
- "tts" : "Uma aplicação consegue aceder ao GPS e à velocidade do veículo."
- },
- "ru-ru" : {
- "label" : "GPS и скорость",
- "tts" : "Приложение имеет доступ к GPS и скорости автомобиля."
- },
- "sv-se" : {
- "label" : "GPS och hastighet",
- "tts" : "Appen kan komma åt fordonets GPS och hastighetsmätare."
- },
- "tr-tr" : {
- "label" : "GPS ve hız",
- "tts" : "Bu uygulama aracın GPS ve hız bilgilerine erişebilir."
- },
- "zh-cn" : {
- "label" : "GPS 和车速",
- "tts" : "移动应用程序可以访问车辆 GPS 和车速信息。"
- },
- "zh-tw" : {
- "label" : "GPS和車速",
- "tts" : "應用程式可存取車輛的GPS和速度。"
- }
- }
- },
- "Notifications" : {
- "languages" : {
- "de-de" : {
- "label" : "Push-Benachrichtigungen",
- "tts" : "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden."
- },
- "en-au" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-gb" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-ie" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "en-us" : {
- "label" : "Push notifications",
- "tts" : "An app can send notifications when running in the background."
- },
- "es-en" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "es-es" : {
- "label" : "Notificaciones push",
- "tts" : "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano."
- },
- "es-mx" : {
- "label" : "Notificaciones tipo Push",
- "tts" : "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano."
- },
- "fr-ca" : {
- "label" : "Notifications instantanées",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "fr-fr" : {
- "label" : "Notifications push",
- "tts" : "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan."
- },
- "it-it" : {
- "label" : "Notifiche push",
- "tts" : "Un'app può inviare notifiche se eseguita in background."
- },
- "nl-nl" : {
- "label" : "Push-meldingen",
- "tts" : "Een app kan meldingen versturen als deze op de achtergrond actief is."
- },
- "pl-pl" : {
- "label" : "Powiadomienia Push",
- "tts" : "Aplikacja może wysyłać powiadomienia, działając w tle."
- },
- "pt-br" : {
- "label" : "Notificações Push",
- "tts" : "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano."
- },
- "pt-pt" : {
- "label" : "Notificações push",
- "tts" : "Uma aplicação consegue enviar notificações quando está activa em segundo plano."
- },
- "ru-ru" : {
- "label" : "Оповещения о пересылке",
- "tts" : "Если приложение работает в фоновом режиме, оно может отправлять оповещения."
- },
- "sv-se" : {
- "label" : "Push-notiser",
- "tts" : "Appen kan skicka meddelanden när den körs i bakgrunden."
- },
- "tr-tr" : {
- "label" : "Anlık bildirimleri",
- "tts" : "Bir uygulama arka planda çalışırken bildirim gönderebilir."
- },
- "zh-cn" : {
- "label" : "推送通知",
- "tts" : "移动应用程序在后台运行时可推送通知。"
- },
- "zh-tw" : {
- "label" : "傳送通知",
- "tts" : "車輛行進時,應用程式可在背景中傳送通知。"
- }
- }
- },
- "SettingDisableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Updates deakt."
- },
- "en-au" : {
- "line1" : "Disable updates"
- },
- "en-gb" : {
- "line1" : "Disable updates"
- },
- "en-ie" : {
- "line1" : "Disable updates"
- },
- "en-us" : {
- "line1" : "Disable Updates"
- },
- "es-en" : {
- "line1" : "Deshab. actual."
- },
- "es-es" : {
- "line1" : "Desact. actual."
- },
- "es-mx" : {
- "line1" : "Deshab. actual."
- },
- "fr-ca" : {
- "line1" : "Désactiver MAJ"
- },
- "fr-fr" : {
- "line1" : "Désactiver màj"
- },
- "it-it" : {
- "line1" : "Disabilita agg."
- },
- "nl-nl" : {
- "line1" : "Upd. uitschak."
- },
- "pl-pl" : {
- "line1" : "Wyłącz aktual."
- },
- "pt-br" : {
- "line1" : "Desat. atualiz."
- },
- "pt-pt" : {
- "line1" : "Desact. actualiz."
- },
- "ru-ru" : {
- "line1" : "Откл. обновл."
- },
- "sv-se" : {
- "line1" : "Inaktivera uppd."
- },
- "tr-tr" : {
- "line1" : "Güncell. Kapat"
- },
- "zh-cn" : {
- "line1" : "禁用更新"
- },
- "zh-tw" : {
- "line1" : "停用更新"
- }
- }
- },
- "SettingEnableUpdates" : {
- "languages" : {
- "de-de" : {
- "line1" : "Apps aktivieren"
- },
- "en-au" : {
- "line1" : "Enable Apps"
- },
- "en-gb" : {
- "line1" : "Enable Apps"
- },
- "en-ie" : {
- "line1" : "Enable Apps"
- },
- "en-us" : {
- "line1" : "Enable Apps"
- },
- "es-en" : {
- "line1" : "Hab. aplic."
- },
- "es-es" : {
- "line1" : "Activar apl."
- },
- "es-mx" : {
- "line1" : "Hab. aplic."
- },
- "fr-ca" : {
- "line1" : "Activer app."
- },
- "fr-fr" : {
- "line1" : "Activer app."
- },
- "it-it" : {
- "line1" : "Abilita app"
- },
- "nl-nl" : {
- "line1" : "Apps inschak."
- },
- "pl-pl" : {
- "line1" : "Włącz aplikacje"
- },
- "pt-br" : {
- "line1" : "Ativar aplic."
- },
- "pt-pt" : {
- "line1" : "Activar actualiz."
- },
- "ru-ru" : {
- "line1" : "Вкл. прилож."
- },
- "sv-se" : {
- "line1" : "Aktivera appar"
- },
- "tr-tr" : {
- "line1" : "Uygulamaları aç"
- },
- "zh-cn" : {
- "line1" : "启用应用程序"
- },
- "zh-tw" : {
- "line1" : "啟用應用程式"
- }
- }
- },
- "SettingUpdateAuto" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update anford."
- },
- "en-au" : {
- "line1" : "Request update"
- },
- "en-gb" : {
- "line1" : "Request update"
- },
- "en-ie" : {
- "line1" : "Request update"
- },
- "en-us" : {
- "line1" : "Request Update"
- },
- "es-en" : {
- "line1" : "Solicit. actualiz."
- },
- "es-es" : {
- "line1" : "Solicitar actual."
- },
- "es-mx" : {
- "line1" : "Solicit. actualiz."
- },
- "fr-ca" : {
- "line1" : "Demander MAJ"
- },
- "fr-fr" : {
- "line1" : "Demander màj"
- },
- "it-it" : {
- "line1" : "Rich. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Upd. aanvragen"
- },
- "pl-pl" : {
- "line1" : "Zażądaj aktual."
- },
- "pt-br" : {
- "line1" : "Solicitar atualiz."
- },
- "pt-pt" : {
- "line1" : "Solicit. actualiz."
- },
- "ru-ru" : {
- "line1" : "Запрос на обн."
- },
- "sv-se" : {
- "line1" : "Begär uppdat."
- },
- "tr-tr" : {
- "line1" : "Güncelleme iste"
- },
- "zh-cn" : {
- "line1" : "请求更新"
- },
- "zh-tw" : {
- "line1" : "請求更新"
- }
- }
- },
- "StatusNeeded" : {
- "languages" : {
- "de-de" : {
- "line1" : "Update benötigt"
- },
- "en-au" : {
- "line1" : "Update needed"
- },
- "en-gb" : {
- "line1" : "Update needed"
- },
- "en-ie" : {
- "line1" : "Update needed"
- },
- "en-us" : {
- "line1" : "Update Needed"
- },
- "es-en" : {
- "line1" : "Actualiz. neces."
- },
- "es-es" : {
- "line1" : "Actu. necesaria"
- },
- "es-mx" : {
- "line1" : "Actualiz. neces."
- },
- "fr-ca" : {
- "line1" : "Màj requise"
- },
- "fr-fr" : {
- "line1" : "Mise à jour requise"
- },
- "it-it" : {
- "line1" : "Necess. aggiorn."
- },
- "nl-nl" : {
- "line1" : "Update nodig"
- },
- "pl-pl" : {
- "line1" : "Potrzeba aktual."
- },
- "pt-br" : {
- "line1" : "Atualiz. necess."
- },
- "pt-pt" : {
- "line1" : "Actual. necess."
- },
- "ru-ru" : {
- "line1" : "Необх. обновл."
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs"
- },
- "tr-tr" : {
- "line1" : "Güncellenmeli"
- },
- "zh-cn" : {
- "line1" : "需要进行更新"
- },
- "zh-tw" : {
- "line1" : "需更新"
- }
- }
- },
- "StatusPending" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktualisieren..."
- },
- "en-au" : {
- "line1" : "Updating..."
- },
- "en-gb" : {
- "line1" : "Updating..."
- },
- "en-ie" : {
- "line1" : "Updating..."
- },
- "en-us" : {
- "line1" : "Updating..."
- },
- "es-en" : {
- "line1" : "Actualizando..."
- },
- "es-es" : {
- "line1" : "Actualizando..."
- },
- "es-mx" : {
- "line1" : "Actualizando..."
- },
- "fr-ca" : {
- "line1" : "MAJ en cours..."
- },
- "fr-fr" : {
- "line1" : "Màj en cours..."
- },
- "it-it" : {
- "line1" : "Aggiornamento"
- },
- "nl-nl" : {
- "line1" : "Updaten..."
- },
- "pl-pl" : {
- "line1" : "Aktualizowanie"
- },
- "pt-br" : {
- "line1" : "Atualizando..."
- },
- "pt-pt" : {
- "line1" : "A actualizar..."
- },
- "ru-ru" : {
- "line1" : "Обновление..."
- },
- "sv-se" : {
- "line1" : "Uppdaterar..."
- },
- "tr-tr" : {
- "line1" : "Güncelleniyor..."
- },
- "zh-cn" : {
- "line1" : "正在更新......"
- },
- "zh-tw" : {
- "line1" : "更新中..."
- }
- }
- },
- "StatusUpToDate" : {
- "languages" : {
- "de-de" : {
- "line1" : "Aktuelle Version"
- },
- "en-au" : {
- "line1" : "Up-to-date"
- },
- "en-gb" : {
- "line1" : "Up-to-date"
- },
- "en-ie" : {
- "line1" : "Up-to-date"
- },
- "en-us" : {
- "line1" : "Up-To-Date"
- },
- "es-en" : {
- "line1" : "Actualizado"
- },
- "es-es" : {
- "line1" : "Actualizada"
- },
- "es-mx" : {
- "line1" : "Actualizado"
- },
- "fr-ca" : {
- "line1" : "Déjà à jour"
- },
- "fr-fr" : {
- "line1" : "Déjà à jour"
- },
- "it-it" : {
- "line1" : "più recente"
- },
- "nl-nl" : {
- "line1" : "Up-to-date"
- },
- "pl-pl" : {
- "line1" : "Aktualne"
- },
- "pt-br" : {
- "line1" : "Atualizado"
- },
- "pt-pt" : {
- "line1" : "Actualizado"
- },
- "ru-ru" : {
- "line1" : "Обновлено"
- },
- "sv-se" : {
- "line1" : "Uppdat. krävs ej"
- },
- "tr-tr" : {
- "line1" : "Güncel"
- },
- "zh-cn" : {
- "line1" : "最新更新"
- },
- "zh-tw" : {
- "line1" : "更新最新"
- }
- }
- },
- "VehicleInfo" : {
- "languages" : {
- "de-de" : {
- "label" : "Fahrzeuginformationen",
- "tts" : "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck."
- },
- "en-au" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-gb" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-ie" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure."
- },
- "en-us" : {
- "label" : "Vehicle information",
- "tts" : "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure."
- },
- "es-en" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "es-es" : {
- "label" : "Información del vehículo",
- "tts" : "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos."
- },
- "es-mx" : {
- "label" : "Información del vehículo",
- "tts" : "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos."
- },
- "fr-ca" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus."
- },
- "fr-fr" : {
- "label" : "Renseignements du véhicule",
- "tts" : "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus."
- },
- "it-it" : {
- "label" : "Informazioni sul veicolo",
- "tts" : "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici."
- },
- "nl-nl" : {
- "label" : "Voertuiginformatie",
- "tts" : "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning."
- },
- "pl-pl" : {
- "label" : "Informacje o pojeździe",
- "tts" : "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon."
- },
- "pt-br" : {
- "label" : "Informações sobre o veículo",
- "tts" : "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus."
- },
- "pt-pt" : {
- "label" : "Informações do veículo",
- "tts" : "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus."
- },
- "ru-ru" : {
- "label" : "Информация об автомобиле",
- "tts" : "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин."
- },
- "sv-se" : {
- "label" : "Fordonsinformation",
- "tts" : "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck."
- },
- "tr-tr" : {
- "label" : "Araç bilgisi",
- "tts" : "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı."
- },
- "zh-cn" : {
- "label" : "车辆信息",
- "tts" : "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压."
- },
- "zh-tw" : {
- "label" : "車輛資訊",
- "tts" : "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓."
- }
- }
- }
- },
- "version" : "001.001.015"
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Alert" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommand" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSet" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenu" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "EncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThru" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEvent" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPress" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommand" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistraction" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatus" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientState" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThru" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteraction" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessage" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimer" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "Show" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "Slider" : {
- "hmi_levels" : [ "FULL" ]
- },
- "Speak" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButton" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "DrivingCharacteristics-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "accPedalPosition",
- "beltStatus",
- "electronicParkBrakeStatus",
- "driverBraking",
- "myKey",
- "prndl",
- "rpm",
- "steeringWheelAngle"
- ]
- }
- },
- "user_consent_prompt" : "DrivingCharacteristics"
- },
- "Emergency-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "airbagStatus",
- "bodyInformation",
- "clusterModeStatus",
- "deviceStatus",
- "eCallInfo",
- "emergencyEvent"
- ]
- }
- }
- },
- "Location-1" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [ "gps", "speed" ]
- }
- },
- "user_consent_prompt" : "Location"
- },
- "Navigation-1" : {
- "rpcs" : {
- "AlertManeuver" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ShowConstantTBT" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UpdateTurnList" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "Notifications" : {
- "rpcs" : {
- "Alert" : {
- "hmi_levels" : [ "BACKGROUND" ]
- }
- },
- "user_consent_prompt" : "Notifications"
- },
- "PropriataryData-1" : {
- "rpcs" : {
- "DiagnosticMessage" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GetDTCs" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ReadDID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- },
- "VehicleInfo-3" : {
- "rpcs" : {
- "GetVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "OnVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "vin",
- "wiperStatus"
- ]
- },
- "SubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- },
- "UnsubscribeVehicleData" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
- "parameters" : [
- "engineOilLife",
- "engineTorque",
- "externalTemperature",
- "turnSignal",
- "fuelLevel",
- "fuelLevel_State",
- "headLampStatus",
- "instantFuelConsumption",
- "fuelRange",
- "cloudAppVehicleID",
- "odometer",
- "tirePressure",
- "wiperStatus"
- ]
- }
- },
- "user_consent_prompt" : "VehicleInfo"
- },
- "pre_Base-1" : {
- "rpcs" : {
- "ChangeRegistration" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "GenericResponse" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFiles" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregistered" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChange" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "PutFile" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "RegisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetAppIcon" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayout" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalProperties" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnregisterAppInterface" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- }
- }
- }
- },
- "module_config" : {
- "device_certificates" : {
- "HUU40DAS7F970UEI17A73JH32L41K32JH4L1K234H3K4" : "aldhfkahfgkafrblgjr"
- },
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://x.x.x.x:3000/api/1/policies" ]
- }
- },
- "exchange_after_x_days" : 30,
- "exchange_after_x_ignition_cycles" : 100,
- "exchange_after_x_kilometers" : 1800,
- "notifications_per_minute_by_priority" : {
- "COMMUNICATION" : 6,
- "EMERGENCY" : 60,
- "NAVIGATION" : 15,
- "NONE" : 0,
- "NORMAL" : 4,
- "VOICECOMM" : 10
- },
- "seconds_between_retries" : [ 1, 5, 25, 125, 625 ],
- "timeout_after_x_seconds" : 60,
- "vehicle_make" : "Stark Industries",
- "vehicle_model" : "E-Tron",
- "vehicle_year" : "1992"
- }
- }
-}
diff --git a/src/components/policy/policy_regular/test/vehicle_data_item_type_test.cc b/src/components/policy/policy_regular/test/vehicle_data_item_type_test.cc
index 02818887a5..6431ed7394 100644
--- a/src/components/policy/policy_regular/test/vehicle_data_item_type_test.cc
+++ b/src/components/policy/policy_regular/test/vehicle_data_item_type_test.cc
@@ -123,6 +123,7 @@ class VehicleDataItemTypeTest : public ::testing::Test {
str.AddField("until", "5.0");
str.AddField("removed", true);
str.AddField("deprecated", true);
+ str.AddField("defvalue", "TestStringVal");
str.AddField("minvalue", 1);
str.AddField("maxvalue", 2);
str.AddField("minsize", 10);
@@ -171,6 +172,7 @@ TEST_F(VehicleDataItemTypeTest, CheckConvertFromJsonToVehicleDataItem_Success) {
EXPECT_TRUE((std::string)*vdi.until == "5.0");
EXPECT_TRUE(*vdi.removed == true);
EXPECT_TRUE(*vdi.deprecated == true);
+ EXPECT_TRUE(*vdi.defvalue == "TestStringVal");
EXPECT_TRUE(*vdi.minvalue == 1);
EXPECT_TRUE(*vdi.maxvalue == 2);
EXPECT_TRUE(*vdi.minsize == 10);
@@ -201,6 +203,7 @@ TEST_F(VehicleDataItemTypeTest, CheckIsValid_Struct_Success) {
VehicleDataItem vdi(&json_);
vdi.type = "Struct";
+ vdi.defvalue = rpc::Optional<rpc::String<0, UINT32_MAX> >();
EXPECT_TRUE(vdi.is_valid());
}
@@ -211,6 +214,7 @@ TEST_F(VehicleDataItemTypeTest, CheckIsValid_Struct_EmptyParams_Failed) {
VehicleDataItem vdi(&json_);
vdi.type = "Struct";
+ vdi.defvalue = rpc::Optional<rpc::String<0, UINT32_MAX> >();
EXPECT_FALSE(vdi.is_valid());
}
@@ -220,16 +224,19 @@ TEST_F(VehicleDataItemTypeTest, CheckIsValid_PODTypes_Success) {
VehicleDataItem vdi(&json_);
- vdi.type = "Integer";
+ vdi.type = "String";
EXPECT_TRUE(vdi.is_valid());
- vdi.type = "Float";
+ vdi.type = "Integer";
+ *vdi.defvalue = "1";
EXPECT_TRUE(vdi.is_valid());
- vdi.type = "String";
+ vdi.type = "Float";
+ *vdi.defvalue = "1.1";
EXPECT_TRUE(vdi.is_valid());
vdi.type = "Boolean";
+ *vdi.defvalue = "true";
EXPECT_TRUE(vdi.is_valid());
}
@@ -257,4 +264,4 @@ TEST_F(VehicleDataItemTypeTest, CheckCopyConstructor) {
}
} // namespace vehicle_info_plugin_test
-} // namespace test
+} // namespace test \ No newline at end of file
diff --git a/src/components/protocol/src/rpc_type.cc b/src/components/protocol/src/rpc_type.cc
index bc1142ad5c..0e2edb34e8 100644
--- a/src/components/protocol/src/rpc_type.cc
+++ b/src/components/protocol/src/rpc_type.cc
@@ -37,7 +37,7 @@
namespace protocol_handler {
-CREATE_LOGGERPTR_GLOBAL(logger_, "ProtocolHandler")
+SDL_CREATE_LOG_VARIABLE("ProtocolHandler")
namespace {
bool IsSupported(RpcType rpc_type) {
@@ -56,17 +56,12 @@ RpcType RpcTypeFromByte(uint8_t byte) {
RpcType type = RpcType(byte);
bool supported_type = IsSupported(type);
if (!supported_type) {
- LOG4CXX_INFO(logger_, "Invalid service type: " << int32_t(byte));
+ SDL_LOG_INFO("Invalid service type: " << int32_t(byte));
}
return supported_type ? type : kRpcTypeReserved;
}
-uint8_t RpcTypeToByte(RpcType type) {
- DCHECK(IsSupported(type));
- return uint8_t(type);
-}
-
const char* RpcTypeToString(RpcType type) {
switch (type) {
case kRpcTypeRequest:
diff --git a/src/components/protocol/src/service_type.cc b/src/components/protocol/src/service_type.cc
index 8ca57f338b..b1674e10d8 100644
--- a/src/components/protocol/src/service_type.cc
+++ b/src/components/protocol/src/service_type.cc
@@ -36,7 +36,7 @@
namespace protocol_handler {
-CREATE_LOGGERPTR_GLOBAL(logger_, "ProtocolHandler")
+SDL_CREATE_LOG_VARIABLE("ProtocolHandler")
namespace {
// Check if provided service value is one of the specified
@@ -58,14 +58,9 @@ ServiceType ServiceTypeFromByte(uint8_t byte) {
ServiceType type = ServiceType(byte);
const bool valid_type = IsValid(type);
if (!valid_type) {
- LOG4CXX_INFO(logger_, "Invalid service type: " << int32_t(byte));
+ SDL_LOG_INFO("Invalid service type: " << int32_t(byte));
}
return valid_type ? type : kInvalidServiceType;
}
-uint8_t ServiceTypeToByte(ServiceType type) {
- DCHECK(IsValid(type));
- return uint8_t(type);
-}
-
} // namespace protocol_handler
diff --git a/src/components/protocol_handler/include/protocol_handler/handshake_handler.h b/src/components/protocol_handler/include/protocol_handler/handshake_handler.h
index 9552d4c420..a9a5997493 100644
--- a/src/components/protocol_handler/include/protocol_handler/handshake_handler.h
+++ b/src/components/protocol_handler/include/protocol_handler/handshake_handler.h
@@ -130,8 +130,11 @@ class HandshakeHandler : public security_manager::SecurityManagerListener {
* @brief Performs related actions if handshake was failed
* @param params set of params used in bson part of message
* @param service_status - service status to be sent to HMI
+ * @param err_reason - Optional error description
*/
- void ProcessFailedHandshake(BsonObject& params, ServiceStatus service_status);
+ void ProcessFailedHandshake(BsonObject& params,
+ ServiceStatus service_status,
+ std::string err_reason = std::string());
/**
* @brief Determines whether service can be protected
diff --git a/src/components/protocol_handler/include/protocol_handler/incoming_data_handler.h b/src/components/protocol_handler/include/protocol_handler/incoming_data_handler.h
index 82bf563bc5..dc640c4707 100644
--- a/src/components/protocol_handler/include/protocol_handler/incoming_data_handler.h
+++ b/src/components/protocol_handler/include/protocol_handler/incoming_data_handler.h
@@ -67,7 +67,7 @@ class IncomingDataHandler {
* \return list of complete, correct packets
*/
ProtocolFramePtrList ProcessData(const RawMessage& tm_message,
- RESULT_CODE* result,
+ RESULT_CODE& out_result,
size_t* malformed_occurrence);
/**
* @brief Add connection for data handling and verification
diff --git a/src/components/protocol_handler/include/protocol_handler/multiframe_builder.h b/src/components/protocol_handler/include/protocol_handler/multiframe_builder.h
index 3da63bd79f..5a63532626 100644
--- a/src/components/protocol_handler/include/protocol_handler/multiframe_builder.h
+++ b/src/components/protocol_handler/include/protocol_handler/multiframe_builder.h
@@ -40,6 +40,7 @@
#include "protocol_handler/protocol_packet.h"
#include "utils/date_time.h"
+#include "utils/lock.h"
/**
*\namespace protocol_handlerHandler
@@ -125,6 +126,7 @@ class MultiFrameBuilder {
// Map of frames with last frame data for messages received in multiple
// frames.
MultiFrameMap multiframes_map_;
+ sync_primitives::Lock multiframes_map_lock_;
int64_t consecutive_frame_wait_msecs_;
};
diff --git a/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h b/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h
index 8dbfc4ed4d..33abd4a96b 100644
--- a/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h
+++ b/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h
@@ -373,11 +373,13 @@ class ProtocolHandlerImpl
* \param session_id ID of session to be sent to mobile application
* \param protocol_version Version of protocol used for communication
* \param service_type Type of session: RPC or BULK Data. RPC by default
+ * \param reason String stating the reason for the rejecting the start service
*/
void SendStartSessionNAck(ConnectionID connection_id,
uint8_t session_id,
uint8_t protocol_version,
- uint8_t service_type);
+ uint8_t service_type,
+ const std::string& reason);
/**
* \brief Sends fail of starting session to mobile application
@@ -386,12 +388,14 @@ class ProtocolHandlerImpl
* \param protocol_version Version of protocol used for communication
* \param service_type Type of session: RPC or BULK Data. RPC by default
* \param rejected_params List of rejected params to send in payload
+ * \param reason String stating the reason for the rejecting the start service
*/
void SendStartSessionNAck(ConnectionID connection_id,
uint8_t session_id,
uint8_t protocol_version,
uint8_t service_type,
- std::vector<std::string>& rejectedParams);
+ std::vector<std::string>& rejectedParams,
+ const std::string& reason);
/**
* \brief Sends acknowledgement of end session/service to mobile application
@@ -416,11 +420,13 @@ class ProtocolHandlerImpl
* \param session_id ID of session ment to be ended
* \param protocol_version Version of protocol used for communication
* \param service_type Type of session: RPC or BULK Data. RPC by default
+ * \param reason String stating the reason for the rejecting the end service
*/
void SendEndSessionNAck(ConnectionID connection_id,
uint32_t session_id,
uint8_t protocol_version,
- uint8_t service_type);
+ uint8_t service_type,
+ const std::string reason);
/**
* \brief Sends fail of ending session to mobile application (variant for
* Protocol v5)
@@ -430,12 +436,14 @@ class ProtocolHandlerImpl
* \param protocol_version Version of protocol used for communication
* \param service_type Type of session: RPC or BULK Data. RPC by default
* \param rejected_params List of rejected params to send in payload
+ * \param reason String stating the reason for the rejecting the end service
*/
void SendEndSessionNAck(ConnectionID connection_id,
uint32_t session_id,
uint8_t protocol_version,
uint8_t service_type,
- std::vector<std::string>& rejected_params);
+ std::vector<std::string>& rejected_params,
+ const std::string reason);
SessionObserver& get_session_observer() OVERRIDE;
@@ -448,7 +456,8 @@ class ProtocolHandlerImpl
* generated_session_id is 0, the list may be empty.
*/
void NotifySessionStarted(const SessionContext& context,
- std::vector<std::string>& rejected_params) OVERRIDE;
+ std::vector<std::string>& rejected_params,
+ const std::string err_reason) OVERRIDE;
#ifdef BUILD_TESTS
const impl::FromMobileQueue& get_from_mobile_queue() const {
diff --git a/src/components/protocol_handler/include/protocol_handler/protocol_packet.h b/src/components/protocol_handler/include/protocol_handler/protocol_packet.h
index 215c63c685..ef189b062f 100644
--- a/src/components/protocol_handler/include/protocol_handler/protocol_packet.h
+++ b/src/components/protocol_handler/include/protocol_handler/protocol_packet.h
@@ -103,12 +103,15 @@ class ProtocolPacket {
void set_max_rpc_payload_size(const size_t max_payload_size);
void set_max_audio_payload_size(const size_t max_payload_size);
void set_max_video_payload_size(const size_t max_payload_size);
+ void set_max_protocol_version_supported(
+ const uint16_t max_protocol_version_supported);
size_t max_payload_size() const;
size_t max_control_payload_size() const;
size_t max_rpc_payload_size() const;
size_t max_audio_payload_size() const;
size_t max_video_payload_size() const;
+ uint16_t max_protocol_version_supported() const;
size_t max_payload_size_by_service_type(const ServiceType type) const;
@@ -123,6 +126,7 @@ class ProtocolPacket {
size_t max_rpc_payload_size_;
size_t max_audio_payload_size_;
size_t max_video_payload_size_;
+ uint16_t max_protocol_version_supported_;
};
/**
diff --git a/src/components/protocol_handler/src/handshake_handler.cc b/src/components/protocol_handler/src/handshake_handler.cc
index 3b4ae6ef1f..4d306fd330 100644
--- a/src/components/protocol_handler/src/handshake_handler.cc
+++ b/src/components/protocol_handler/src/handshake_handler.cc
@@ -42,7 +42,7 @@
namespace protocol_handler {
-CREATE_LOGGERPTR_GLOBAL(logger_, "ProtocolHandler")
+SDL_CREATE_LOG_VARIABLE("ProtocolHandler")
HandshakeHandler::HandshakeHandler(
ProtocolHandlerImpl& protocol_handler,
@@ -61,7 +61,7 @@ HandshakeHandler::HandshakeHandler(
, service_status_update_handler_(service_status_update_handler) {}
HandshakeHandler::~HandshakeHandler() {
- LOG4CXX_DEBUG(logger_, "Destroying of HandshakeHandler: " << this);
+ SDL_LOG_DEBUG("Destroying of HandshakeHandler: " << this);
}
uint32_t HandshakeHandler::connection_key() const {
@@ -79,14 +79,16 @@ bool HandshakeHandler::GetPolicyCertificateData(std::string& data) const {
}
void HandshakeHandler::OnCertificateUpdateRequired() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
#if defined(EXTERNAL_PROPRIETARY_MODE) && defined(ENABLE_SECURITY)
bool HandshakeHandler::OnCertDecryptFailed() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (payload_) {
- ProcessFailedHandshake(*payload_, ServiceStatus::CERT_INVALID);
+ ProcessFailedHandshake(*payload_,
+ ServiceStatus::CERT_INVALID,
+ "Failed to decrypt the certificate");
}
return true;
@@ -94,7 +96,7 @@ bool HandshakeHandler::OnCertDecryptFailed() {
#endif
bool HandshakeHandler::OnGetSystemTimeFailed() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (payload_) {
ProcessFailedHandshake(*payload_, ServiceStatus::INVALID_TIME);
@@ -109,7 +111,7 @@ bool HandshakeHandler::OnGetSystemTimeFailed() {
}
bool HandshakeHandler::OnPTUFailed() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (payload_) {
ProcessFailedHandshake(*payload_, ServiceStatus::PTU_FAILED);
}
@@ -120,14 +122,12 @@ bool HandshakeHandler::OnPTUFailed() {
bool HandshakeHandler::OnHandshakeDone(
uint32_t connection_key,
security_manager::SSLContext::HandshakeResult result) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- LOG4CXX_DEBUG(logger_,
- "OnHandshakeDone for service : " << context_.service_type_);
+ SDL_LOG_DEBUG("OnHandshakeDone for service : " << context_.service_type_);
if (connection_key != this->primary_connection_key()) {
- LOG4CXX_DEBUG(logger_,
- "Listener " << this
+ SDL_LOG_DEBUG("Listener " << this
<< " expects notification for connection id: "
<< this->primary_connection_key()
<< ". Received notification for connection id "
@@ -138,11 +138,34 @@ bool HandshakeHandler::OnHandshakeDone(
const bool success =
result == security_manager::SSLContext::Handshake_Result_Success;
+ auto getInvalidCertReason =
+ [](const security_manager::SSLContext::HandshakeResult& result) {
+ switch (result) {
+ case security_manager::SSLContext::Handshake_Result_CertExpired:
+ return "Certificate already expired";
+ case security_manager::SSLContext::Handshake_Result_NotYetValid:
+ return "Certificate is not yet valid";
+ case security_manager::SSLContext::Handshake_Result_CertNotSigned:
+ return "Certificate is not signed";
+ case security_manager::SSLContext::Handshake_Result_AppIDMismatch:
+ return "Trying to run handshake with wrong app id";
+ case security_manager::SSLContext::Handshake_Result_AppNameMismatch:
+ return "Trying to run handshake with wrong app name";
+ case security_manager::SSLContext::Handshake_Result_AbnormalFail:
+ return "Error occurred during handshake";
+ case security_manager::SSLContext::Handshake_Result_Fail:
+ return "";
+ default:
+ return "";
+ }
+ };
+
if (payload_) {
if (success) {
ProcessSuccessfulHandshake(connection_key, *payload_);
} else {
- ProcessFailedHandshake(*payload_, ServiceStatus::CERT_INVALID);
+ ProcessFailedHandshake(
+ *payload_, ServiceStatus::CERT_INVALID, getInvalidCertReason(result));
}
} else {
BsonObject params;
@@ -150,7 +173,8 @@ bool HandshakeHandler::OnHandshakeDone(
if (success) {
ProcessSuccessfulHandshake(connection_key, params);
} else {
- ProcessFailedHandshake(params, ServiceStatus::CERT_INVALID);
+ ProcessFailedHandshake(
+ params, ServiceStatus::CERT_INVALID, getInvalidCertReason(result));
}
bson_object_deinitialize(&params);
}
@@ -172,14 +196,13 @@ bool HandshakeHandler::IsAlreadyProtected() const {
void HandshakeHandler::ProcessSuccessfulHandshake(const uint32_t connection_key,
BsonObject& params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const bool is_service_already_protected = IsAlreadyProtected();
const bool can_be_protected = CanBeProtected();
- LOG4CXX_DEBUG(logger_,
- "Service can be protected: " << can_be_protected
+ SDL_LOG_DEBUG("Service can be protected: " << can_be_protected
<< " and service was protected: "
<< is_service_already_protected);
@@ -202,17 +225,22 @@ void HandshakeHandler::ProcessSuccessfulHandshake(const uint32_t connection_key,
this->connection_key(),
context_.service_type_,
ServiceStatus::SERVICE_START_FAILED);
+
protocol_handler_.SendStartSessionNAck(context_.connection_id_,
context_.new_session_id_,
protocol_version_,
- context_.service_type_);
+ context_.service_type_,
+ (is_service_already_protected)
+ ? "Service is already protected"
+ : "Service cannot be protected");
}
}
void HandshakeHandler::ProcessFailedHandshake(BsonObject& params,
- ServiceStatus service_status) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Handshake failed");
+ ServiceStatus service_status,
+ std::string err_reason) {
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Handshake failed");
const std::vector<int>& force_protected =
protocol_handler_.get_settings().force_protected_service();
@@ -221,8 +249,7 @@ void HandshakeHandler::ProcessFailedHandshake(BsonObject& params,
force_protected.end(),
context_.service_type_) == force_protected.end();
- LOG4CXX_DEBUG(logger_,
- "Service can be unprotected: " << can_be_unprotected
+ SDL_LOG_DEBUG("Service can be unprotected: " << can_be_unprotected
<< " and this is a new service: "
<< context_.is_new_service_);
@@ -242,10 +269,22 @@ void HandshakeHandler::ProcessFailedHandshake(BsonObject& params,
} else {
service_status_update_handler_.OnServiceUpdate(
this->connection_key(), context_.service_type_, service_status);
- protocol_handler_.SendStartSessionNAck(context_.connection_id_,
- context_.new_session_id_,
- protocol_version_,
- context_.service_type_);
+
+ std::string reason_msg =
+ (service_status == ServiceStatus::PTU_FAILED)
+ ? "Policy Table Update failed"
+ : (service_status == ServiceStatus::CERT_INVALID)
+ ? "Invalid certificate"
+ : (service_status == ServiceStatus::INVALID_TIME)
+ ? "Failed to get system time"
+ : "Unknown cause of failure";
+
+ protocol_handler_.SendStartSessionNAck(
+ context_.connection_id_,
+ context_.new_session_id_,
+ protocol_version_,
+ context_.service_type_,
+ reason_msg + (err_reason.empty() ? "" : ": " + err_reason));
}
}
diff --git a/src/components/protocol_handler/src/incoming_data_handler.cc b/src/components/protocol_handler/src/incoming_data_handler.cc
index 566b36f46d..08997acaac 100644
--- a/src/components/protocol_handler/src/incoming_data_handler.cc
+++ b/src/components/protocol_handler/src/incoming_data_handler.cc
@@ -35,7 +35,7 @@
namespace protocol_handler {
-CREATE_LOGGERPTR_GLOBAL(logger_, "ProtocolHandler")
+SDL_CREATE_LOG_VARIABLE("ProtocolHandler")
IncomingDataHandler::IncomingDataHandler()
: header_(), validator_(NULL), last_portion_of_data_was_malformed_(false) {}
@@ -50,71 +50,65 @@ static const size_t MIN_HEADER_SIZE =
ProtocolFramePtrList IncomingDataHandler::ProcessData(
const RawMessage& tm_message,
- RESULT_CODE* result,
+ RESULT_CODE& out_result,
size_t* malformed_occurrence) {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK(result);
+ SDL_LOG_AUTO_TRACE();
DCHECK(malformed_occurrence);
const transport_manager::ConnectionUID connection_id =
tm_message.connection_key();
const uint8_t* data = tm_message.data();
const size_t tm_message_size = tm_message.data_size();
if (tm_message_size == 0 || data == NULL) {
- LOG4CXX_WARN(logger_, "Wrong raw message " << tm_message_size << " bytes");
- *result = RESULT_FAIL;
+ SDL_LOG_WARN("Wrong raw message " << tm_message_size << " bytes");
+ out_result = RESULT_FAIL;
return ProtocolFramePtrList();
}
- LOG4CXX_INFO(logger_,
- "Processing incoming data of size "
- << tm_message_size << " for connection " << connection_id);
+ SDL_LOG_INFO("Processing incoming data of size "
+ << tm_message_size << " for connection " << connection_id);
ConnectionsDataMap::iterator it = connections_data_.find(connection_id);
if (connections_data_.end() == it) {
- LOG4CXX_WARN(logger_, "ProcessData requested for unknown connection");
- *result = RESULT_FAIL;
+ SDL_LOG_WARN("ProcessData requested for unknown connection");
+ out_result = RESULT_FAIL;
return ProtocolFramePtrList();
}
std::vector<uint8_t>& connection_data = it->second;
connection_data.insert(connection_data.end(), data, data + tm_message_size);
- LOG4CXX_DEBUG(logger_,
- "Total data size for connection " << connection_id << " is "
+ SDL_LOG_DEBUG("Total data size for connection " << connection_id << " is "
<< connection_data.size());
ProtocolFramePtrList out_frames;
*malformed_occurrence = 0;
- *result = CreateFrame(
+ out_result = CreateFrame(
connection_data, out_frames, *malformed_occurrence, connection_id);
- LOG4CXX_DEBUG(logger_,
- "New data size for connection " << connection_id << " is "
+ SDL_LOG_DEBUG("New data size for connection " << connection_id << " is "
<< connection_data.size());
if (!out_frames.empty()) {
- LOG4CXX_INFO(logger_,
- "Created and passed " << out_frames.size() << " packets");
+ SDL_LOG_INFO("Created and passed " << out_frames.size() << " packets");
} else {
- if (RESULT_DEFERRED == *result) {
- LOG4CXX_DEBUG(
- logger_,
+ if (RESULT_DEFERRED == out_result) {
+ SDL_LOG_DEBUG(
"No packets have been created. Waiting next portion of data.");
} else {
- LOG4CXX_WARN(logger_, "No packets have been created.");
+ SDL_LOG_WARN("No packets have been created.");
}
}
if (*malformed_occurrence > 0u || last_portion_of_data_was_malformed_) {
- *result = RESULT_MALFORMED_OCCURS;
+ out_result = RESULT_MALFORMED_OCCURS;
} else {
- *result = RESULT_OK;
+ out_result = RESULT_OK;
}
return out_frames;
}
void IncomingDataHandler::AddConnection(
const transport_manager::ConnectionUID connection_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Add empty list of session to new connection
connections_data_[connection_id] = ConnectionsDataMap::mapped_type();
}
void IncomingDataHandler::RemoveConnection(
const transport_manager::ConnectionUID connection_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
connections_data_.erase(connection_id);
}
@@ -129,8 +123,7 @@ uint32_t IncomingDataHandler::GetPacketSize(
case PROTOCOL_VERSION_5:
return header.dataSize + PROTOCOL_HEADER_V2_SIZE;
default:
- LOG4CXX_WARN(logger_,
- "Unknown version: " << static_cast<int>(header.version));
+ SDL_LOG_WARN("Unknown version: " << static_cast<int>(header.version));
break;
}
return 0u;
@@ -141,7 +134,7 @@ RESULT_CODE IncomingDataHandler::CreateFrame(
ProtocolFramePtrList& out_frames,
size_t& malformed_occurrence,
const transport_manager::ConnectionUID connection_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<uint8_t>::iterator data_it = incoming_data.begin();
size_t data_size = incoming_data.size();
@@ -151,51 +144,47 @@ RESULT_CODE IncomingDataHandler::CreateFrame(
validator_ ? validator_->validate(header_) : RESULT_OK;
if (validate_result != RESULT_OK) {
- LOG4CXX_WARN(logger_, "Packet validation failed");
+ SDL_LOG_WARN("Packet validation failed");
if (!last_portion_of_data_was_malformed_) {
++malformed_occurrence;
- LOG4CXX_DEBUG(logger_,
- "Malformed message found " << malformed_occurrence);
+ SDL_LOG_DEBUG("Malformed message found " << malformed_occurrence);
}
last_portion_of_data_was_malformed_ = true;
++data_it;
--data_size;
- LOG4CXX_DEBUG(logger_,
- "Moved to the next byte "
- << std::hex << static_cast<const void*>(&*data_it));
+ SDL_LOG_DEBUG("Moved to the next byte "
+ << std::hex << static_cast<const void*>(&*data_it));
continue;
}
- LOG4CXX_DEBUG(logger_, "Payload size " << header_.dataSize);
+ SDL_LOG_DEBUG("Payload size " << header_.dataSize);
const uint32_t packet_size = GetPacketSize(header_);
- if (packet_size <= 0) {
- LOG4CXX_WARN(logger_, "Null packet size");
+ if (packet_size == 0) {
+ SDL_LOG_WARN("Null packet size");
++data_it;
--data_size;
- LOG4CXX_DEBUG(logger_,
- "Moved to the next byte "
- << std::hex << static_cast<const void*>(&*data_it));
+ SDL_LOG_DEBUG("Moved to the next byte "
+ << std::hex << static_cast<const void*>(&*data_it));
continue;
}
if (data_size < packet_size) {
- LOG4CXX_DEBUG(logger_, "Packet data is not available yet");
+ SDL_LOG_DEBUG("Packet data is not available yet");
incoming_data.erase(incoming_data.begin(), data_it);
return RESULT_DEFERRED;
}
ProtocolFramePtr frame(new protocol_handler::ProtocolPacket(connection_id));
const RESULT_CODE deserialize_result =
frame->deserializePacket(&*data_it, packet_size);
- LOG4CXX_DEBUG(logger_, "Deserialized frame " << frame);
+ SDL_LOG_DEBUG("Deserialized frame " << frame);
if (deserialize_result != RESULT_OK) {
- LOG4CXX_WARN(logger_, "Packet deserialization failed");
+ SDL_LOG_WARN("Packet deserialization failed");
incoming_data.erase(incoming_data.begin(), data_it);
return RESULT_FAIL;
}
out_frames.push_back(frame);
last_portion_of_data_was_malformed_ = false;
- LOG4CXX_DEBUG(logger_,
- "Frame added. "
- << "Connection ID " << connection_id);
+ SDL_LOG_DEBUG("Frame added. "
+ << "Connection ID " << connection_id);
data_it += packet_size;
data_size -= packet_size;
diff --git a/src/components/protocol_handler/src/multiframe_builder.cc b/src/components/protocol_handler/src/multiframe_builder.cc
index fbfc061490..0cffe724c7 100644
--- a/src/components/protocol_handler/src/multiframe_builder.cc
+++ b/src/components/protocol_handler/src/multiframe_builder.cc
@@ -41,7 +41,7 @@
namespace protocol_handler {
-CREATE_LOGGERPTR_GLOBAL(logger_, "ProtocolHandler")
+SDL_CREATE_LOG_VARIABLE("ProtocolHandler")
MultiFrameBuilder::MultiFrameBuilder() : consecutive_frame_wait_msecs_(0u) {}
@@ -50,19 +50,19 @@ void MultiFrameBuilder::set_waiting_timeout(
consecutive_frame_wait_msecs_ =
static_cast<int64_t>(consecutive_frame_wait_msecs);
if (consecutive_frame_wait_msecs == 0) {
- LOG4CXX_WARN(logger_, "Waiting timout disabled");
+ SDL_LOG_WARN("Waiting timout disabled");
} else {
- LOG4CXX_DEBUG(logger_,
- "Waiting time in msec: " << consecutive_frame_wait_msecs_);
+ SDL_LOG_DEBUG("Waiting time in msec: " << consecutive_frame_wait_msecs_);
}
}
bool MultiFrameBuilder::AddConnection(const ConnectionID connection_id) {
- LOG4CXX_DEBUG(logger_, "Adding connection_id: " << connection_id);
- LOG4CXX_DEBUG(logger_, "Current state is: " << multiframes_map_);
+ SDL_LOG_DEBUG("Adding connection_id: " << connection_id);
+ sync_primitives::AutoLock lock(multiframes_map_lock_);
+ SDL_LOG_DEBUG("Current state is: " << multiframes_map_);
const MultiFrameMap::const_iterator it = multiframes_map_.find(connection_id);
if (it != multiframes_map_.end()) {
- LOG4CXX_ERROR(logger_, "Exists connection_id: " << connection_id);
+ SDL_LOG_ERROR("Exists connection_id: " << connection_id);
return false;
}
multiframes_map_[connection_id] = SessionToFrameMap();
@@ -70,18 +70,18 @@ bool MultiFrameBuilder::AddConnection(const ConnectionID connection_id) {
}
bool MultiFrameBuilder::RemoveConnection(const ConnectionID connection_id) {
- LOG4CXX_DEBUG(logger_, "Removing connection_id: " << connection_id);
- LOG4CXX_DEBUG(logger_, "Current state is: " << multiframes_map_);
+ SDL_LOG_DEBUG("Removing connection_id: " << connection_id);
+ sync_primitives::AutoLock lock(multiframes_map_lock_);
+ SDL_LOG_DEBUG("Current state is: " << multiframes_map_);
const MultiFrameMap::iterator it = multiframes_map_.find(connection_id);
if (it == multiframes_map_.end()) {
- LOG4CXX_ERROR(logger_, "Non-existent connection_id: " << connection_id);
+ SDL_LOG_ERROR("Non-existent connection_id: " << connection_id);
return false;
}
const SessionToFrameMap& session_to_frame_map = it->second;
if (!session_to_frame_map.empty()) {
// FIXME(EZamakhov): Ask ReqManager - do we need to send GenericError
- LOG4CXX_WARN(logger_,
- "For connection_id: " << connection_id
+ SDL_LOG_WARN("For connection_id: " << connection_id
<< " waiting: " << multiframes_map_);
}
multiframes_map_.erase(it);
@@ -89,45 +89,44 @@ bool MultiFrameBuilder::RemoveConnection(const ConnectionID connection_id) {
}
ProtocolFramePtrList MultiFrameBuilder::PopMultiframes() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Current state is: " << multiframes_map_);
- LOG4CXX_DEBUG(logger_,
- "Current multiframe map size is: " << multiframes_map_.size());
+ SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock lock(multiframes_map_lock_);
+ SDL_LOG_DEBUG("Current state is: " << multiframes_map_);
+ SDL_LOG_DEBUG("Current multiframe map size is: " << multiframes_map_.size());
ProtocolFramePtrList outpute_frame_list;
for (MultiFrameMap::iterator connection_it = multiframes_map_.begin();
connection_it != multiframes_map_.end();
++connection_it) {
- LOG4CXX_TRACE(logger_, "Step over connection: " << connection_it->first);
+ SDL_LOG_TRACE("Step over connection: " << connection_it->first);
SessionToFrameMap& session_map = connection_it->second;
for (SessionToFrameMap::iterator session_it = session_map.begin();
session_it != session_map.end();
++session_it) {
- LOG4CXX_TRACE(
- logger_,
+ SDL_LOG_TRACE(
"Step over session: " << static_cast<int>(session_it->first));
MessageIDToFrameMap& messageId_map = session_it->second;
MessageIDToFrameMap::iterator messageId_it = messageId_map.begin();
while (messageId_it != messageId_map.end()) {
- LOG4CXX_TRACE(logger_, "Step over messageId: " << messageId_it->first);
+ SDL_LOG_TRACE("Step over messageId: " << messageId_it->first);
ProtocolFrameData& frame_data = messageId_it->second;
ProtocolFramePtr frame = frame_data.frame;
if (frame && frame->frame_data() == FRAME_DATA_LAST_CONSECUTIVE &&
frame->payload_size() > 0u) {
- LOG4CXX_DEBUG(logger_, "Ready frame: " << frame);
+ SDL_LOG_DEBUG("Ready frame: " << frame);
outpute_frame_list.push_back(frame);
messageId_map.erase(messageId_it++);
continue;
}
if (consecutive_frame_wait_msecs_ != 0) {
- LOG4CXX_TRACE(logger_, "Expiration verification");
+ SDL_LOG_TRACE("Expiration verification");
const int64_t time_left =
date_time::calculateTimeSpan(frame_data.append_time);
- LOG4CXX_DEBUG(logger_, "mSecs left: " << time_left);
+ SDL_LOG_DEBUG("mSecs left: " << time_left);
if (time_left >= consecutive_frame_wait_msecs_) {
- LOG4CXX_WARN(logger_, "Expired frame: " << frame);
+ SDL_LOG_WARN("Expired frame: " << frame);
outpute_frame_list.push_back(frame);
messageId_map.erase(messageId_it++);
continue;
@@ -137,27 +136,26 @@ ProtocolFramePtrList MultiFrameBuilder::PopMultiframes() {
} // iteration over messageId_map
} // iteration over session_map
} // iteration over multiframes_map_
- LOG4CXX_DEBUG(logger_, "Result frames count: " << outpute_frame_list.size());
+ SDL_LOG_DEBUG("Result frames count: " << outpute_frame_list.size());
return outpute_frame_list;
}
RESULT_CODE MultiFrameBuilder::AddFrame(const ProtocolFramePtr packet) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Handling frame: " << packet);
- LOG4CXX_DEBUG(logger_, "Current state is: " << multiframes_map_);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Handling frame: " << packet);
if (!packet) {
- LOG4CXX_ERROR(logger_, "Skip empty frame");
+ SDL_LOG_ERROR("Skip empty frame");
return RESULT_FAIL;
}
switch (packet->frame_type()) {
case FRAME_TYPE_FIRST:
- LOG4CXX_TRACE(logger_, "FRAME_TYPE_FIRST");
+ SDL_LOG_TRACE("FRAME_TYPE_FIRST");
return HandleFirstFrame(packet);
case FRAME_TYPE_CONSECUTIVE:
- LOG4CXX_TRACE(logger_, "FRAME_TYPE_CONSECUTIVE");
+ SDL_LOG_TRACE("FRAME_TYPE_CONSECUTIVE");
return HandleConsecutiveFrame(packet);
default:
- LOG4CXX_ERROR(logger_, "Frame is not FIRST or CONSECUTIVE :" << packet);
+ SDL_LOG_ERROR("Frame is not FIRST or CONSECUTIVE :" << packet);
break;
}
return RESULT_FAIL;
@@ -165,17 +163,18 @@ RESULT_CODE MultiFrameBuilder::AddFrame(const ProtocolFramePtr packet) {
RESULT_CODE MultiFrameBuilder::HandleFirstFrame(const ProtocolFramePtr packet) {
DCHECK_OR_RETURN(packet->frame_type() == FRAME_TYPE_FIRST, RESULT_FAIL);
- LOG4CXX_DEBUG(logger_, "Waiting : " << multiframes_map_);
- LOG4CXX_DEBUG(logger_, "Handling FIRST frame: " << packet);
+ sync_primitives::AutoLock lock(multiframes_map_lock_);
+ SDL_LOG_DEBUG("Waiting : " << multiframes_map_);
+ SDL_LOG_DEBUG("Handling FIRST frame: " << packet);
if (packet->payload_size() != 0u) {
- LOG4CXX_ERROR(logger_, "First frame shall have no data:" << packet);
+ SDL_LOG_ERROR("First frame shall have no data:" << packet);
return RESULT_FAIL;
}
const ConnectionID connection_id = packet->connection_id();
MultiFrameMap::iterator connection_it = multiframes_map_.find(connection_id);
if (connection_it == multiframes_map_.end()) {
- LOG4CXX_ERROR(logger_, "Unknown connection_id: " << connection_id);
+ SDL_LOG_ERROR("Unknown connection_id: " << connection_id);
return RESULT_FAIL;
}
SessionToFrameMap& session_map = connection_it->second;
@@ -187,19 +186,17 @@ RESULT_CODE MultiFrameBuilder::HandleFirstFrame(const ProtocolFramePtr packet) {
const MessageID message_id = packet->message_id();
MessageIDToFrameMap::iterator messageId_it = messageId_map.find(message_id);
if (messageId_it != messageId_map.end()) {
- LOG4CXX_ERROR(logger_,
- "Already waiting message for connection_id: "
- << connection_id
- << ", session_id: " << static_cast<int>(session_id)
- << ", message_id: " << message_id);
+ SDL_LOG_ERROR("Already waiting message for connection_id: "
+ << connection_id
+ << ", session_id: " << static_cast<int>(session_id)
+ << ", message_id: " << message_id);
return RESULT_FAIL;
}
- LOG4CXX_DEBUG(logger_,
- "Start waiting frames for connection_id: "
- << connection_id
- << ", session_id: " << static_cast<int>(session_id)
- << ", message_id: " << message_id);
+ SDL_LOG_DEBUG("Start waiting frames for connection_id: "
+ << connection_id
+ << ", session_id: " << static_cast<int>(session_id)
+ << ", message_id: " << message_id);
messageId_map[message_id] = {packet, date_time::getCurrentTime()};
return RESULT_OK;
}
@@ -207,12 +204,13 @@ RESULT_CODE MultiFrameBuilder::HandleFirstFrame(const ProtocolFramePtr packet) {
RESULT_CODE MultiFrameBuilder::HandleConsecutiveFrame(
const ProtocolFramePtr packet) {
DCHECK_OR_RETURN(packet->frame_type() == FRAME_TYPE_CONSECUTIVE, RESULT_FAIL);
- LOG4CXX_DEBUG(logger_, "Handling CONSECUTIVE frame: " << packet);
+ sync_primitives::AutoLock lock(multiframes_map_lock_);
+ SDL_LOG_DEBUG("Handling CONSECUTIVE frame: " << packet);
const ConnectionID connection_id = packet->connection_id();
MultiFrameMap::iterator connection_it = multiframes_map_.find(connection_id);
if (connection_it == multiframes_map_.end()) {
- LOG4CXX_ERROR(logger_, "Unknown connection_id: " << connection_id);
+ SDL_LOG_ERROR("Unknown connection_id: " << connection_id);
return RESULT_FAIL;
}
SessionToFrameMap& session_map = connection_it->second;
@@ -224,11 +222,10 @@ RESULT_CODE MultiFrameBuilder::HandleConsecutiveFrame(
const MessageID message_id = packet->message_id();
MessageIDToFrameMap::iterator messageId_it = messageId_map.find(message_id);
if (messageId_it == messageId_map.end()) {
- LOG4CXX_ERROR(logger_,
- "No waiting message for connection_id: "
- << connection_id
- << ", session_id: " << static_cast<int>(session_id)
- << ", message_id: " << message_id);
+ SDL_LOG_ERROR("No waiting message for connection_id: "
+ << connection_id
+ << ", session_id: " << static_cast<int>(session_id)
+ << ", message_id: " << message_id);
return RESULT_FAIL;
}
@@ -243,7 +240,7 @@ RESULT_CODE MultiFrameBuilder::HandleConsecutiveFrame(
if (is_last_consecutive) {
// TODO(EZamakhov): implement count of frames and result size verification
- LOG4CXX_DEBUG(logger_, "Last CONSECUTIVE frame");
+ SDL_LOG_DEBUG("Last CONSECUTIVE frame");
} else {
uint8_t previous_frame_data = assembling_frame->frame_data();
if (previous_frame_data == std::numeric_limits<uint8_t>::max()) {
@@ -251,12 +248,10 @@ RESULT_CODE MultiFrameBuilder::HandleConsecutiveFrame(
}
// The next frame data is bigger at 1
if (new_frame_data != (previous_frame_data + 1)) {
- LOG4CXX_ERROR(logger_,
- "Unexpected CONSECUTIVE frame for connection_id: "
- << connection_id
- << ", session_id: " << static_cast<int>(session_id)
- << ", message_id: " << message_id
- << ", frame: " << packet);
+ SDL_LOG_ERROR("Unexpected CONSECUTIVE frame for connection_id: "
+ << connection_id
+ << ", session_id: " << static_cast<int>(session_id)
+ << ", message_id: " << message_id << ", frame: " << packet);
return RESULT_FAIL;
}
}
@@ -268,8 +263,7 @@ RESULT_CODE MultiFrameBuilder::HandleConsecutiveFrame(
assembling_frame->set_frame_data(new_frame_data);
- LOG4CXX_DEBUG(logger_,
- "Appending " << packet->data_size() << " bytes "
+ SDL_LOG_DEBUG("Appending " << packet->data_size() << " bytes "
<< "; frame_data "
<< static_cast<int>(new_frame_data)
<< "; for connection_id: " << connection_id
@@ -278,12 +272,11 @@ RESULT_CODE MultiFrameBuilder::HandleConsecutiveFrame(
if (assembling_frame->appendData(packet->data(), packet->data_size()) !=
RESULT_OK) {
- LOG4CXX_ERROR(logger_, "Failed to append frame for multiframe message.");
+ SDL_LOG_ERROR("Failed to append frame for multiframe message.");
return RESULT_FAIL;
}
- LOG4CXX_INFO(logger_,
- "Assembled frame with payload size: "
- << assembling_frame->payload_size());
+ SDL_LOG_INFO("Assembled frame with payload size: "
+ << assembling_frame->payload_size());
frame_data.append_time = date_time::getCurrentTime();
return RESULT_OK;
}
diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc
index 04c1529573..1db599e656 100644
--- a/src/components/protocol_handler/src/protocol_handler_impl.cc
+++ b/src/components/protocol_handler/src/protocol_handler_impl.cc
@@ -50,7 +50,7 @@
namespace protocol_handler {
-CREATE_LOGGERPTR_GLOBAL(logger_, "ProtocolHandler")
+SDL_CREATE_LOG_VARIABLE("ProtocolHandler")
/**
* Function return packet data as std::string.
@@ -61,9 +61,10 @@ std::string ConvertPacketDataToString(const uint8_t* data,
const size_t kStackSize = 131072;
-utils::SemanticVersion default_protocol_version(5, 2, 0);
-utils::SemanticVersion min_multiple_transports_version(5, 1, 0);
-utils::SemanticVersion min_cloud_app_version(5, 2, 0);
+const utils::SemanticVersion default_protocol_version(5, 3, 0);
+const utils::SemanticVersion min_multiple_transports_version(5, 1, 0);
+const utils::SemanticVersion min_cloud_app_version(5, 2, 0);
+const utils::SemanticVersion min_reason_param_version(5, 3, 0);
ProtocolHandlerImpl::ProtocolHandlerImpl(
const ProtocolHandlerSettings& settings,
@@ -93,7 +94,7 @@ ProtocolHandlerImpl::ProtocolHandlerImpl(
#endif // TELEMETRY_MONITOR
{
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
protocol_header_validator_.set_max_payload_size(
get_settings().maximum_payload_size());
protocol_header_validator_.set_max_control_payload_size(
@@ -104,6 +105,8 @@ ProtocolHandlerImpl::ProtocolHandlerImpl(
get_settings().maximum_audio_payload_size());
protocol_header_validator_.set_max_video_payload_size(
get_settings().maximum_video_payload_size());
+ protocol_header_validator_.set_max_protocol_version_supported(
+ get_settings().max_supported_protocol_version());
incoming_data_handler_.set_validator(&protocol_header_validator_);
const size_t& message_frequency_count =
@@ -113,12 +116,11 @@ ProtocolHandlerImpl::ProtocolHandlerImpl(
if (message_frequency_time > 0u && message_frequency_count > 0u) {
message_meter_.set_time_range(message_frequency_time);
- LOG4CXX_DEBUG(logger_,
- "Frequency meter is enabled ( "
- << message_frequency_count << " per "
- << message_frequency_time << " mSecond)");
+ SDL_LOG_DEBUG("Frequency meter is enabled ( "
+ << message_frequency_count << " per "
+ << message_frequency_time << " mSecond)");
} else {
- LOG4CXX_WARN(logger_, "Frequency meter is disabled");
+ SDL_LOG_WARN("Frequency meter is disabled");
}
const size_t& malformed_frequency_time =
@@ -129,18 +131,16 @@ ProtocolHandlerImpl::ProtocolHandlerImpl(
if (get_settings().malformed_message_filtering()) {
if (malformed_frequency_time > 0u && malformed_frequency_count > 0u) {
malformed_message_meter_.set_time_range(malformed_frequency_time);
- LOG4CXX_DEBUG(logger_,
- "Malformed frequency meter is enabled ( "
- << malformed_frequency_count << " per "
- << malformed_frequency_time << " mSecond)");
+ SDL_LOG_DEBUG("Malformed frequency meter is enabled ( "
+ << malformed_frequency_count << " per "
+ << malformed_frequency_time << " mSecond)");
} else {
- LOG4CXX_WARN(logger_, "Malformed frequency meter is disabled");
+ SDL_LOG_WARN("Malformed frequency meter is disabled");
}
} else {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Malformed message filtering is disabled."
- << "Connection will be close on first malformed message detection");
+ << "Connection will be close on first malformed message detection");
}
multiframe_builder_.set_waiting_timeout(
get_settings().multiframe_waiting_timeout());
@@ -149,15 +149,15 @@ ProtocolHandlerImpl::ProtocolHandlerImpl(
ProtocolHandlerImpl::~ProtocolHandlerImpl() {
sync_primitives::AutoLock lock(protocol_observers_lock_);
if (!protocol_observers_.empty()) {
- LOG4CXX_WARN(logger_,
- "Not all observers have unsubscribed"
- " from ProtocolHandlerImpl");
+ SDL_LOG_WARN(
+ "Not all observers have unsubscribed"
+ " from ProtocolHandlerImpl");
}
}
void ProtocolHandlerImpl::AddProtocolObserver(ProtocolObserver* observer) {
if (!observer) {
- LOG4CXX_ERROR(logger_, "Invalid (NULL) pointer to IProtocolObserver.");
+ SDL_LOG_ERROR("Invalid (NULL) pointer to IProtocolObserver.");
return;
}
sync_primitives::AutoLock lock(protocol_observers_lock_);
@@ -165,9 +165,9 @@ void ProtocolHandlerImpl::AddProtocolObserver(ProtocolObserver* observer) {
}
void ProtocolHandlerImpl::RemoveProtocolObserver(ProtocolObserver* observer) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!observer) {
- LOG4CXX_ERROR(logger_, "Invalid (NULL) pointer to IProtocolObserver.");
+ SDL_LOG_ERROR("Invalid (NULL) pointer to IProtocolObserver.");
return;
}
sync_primitives::AutoLock lock(protocol_observers_lock_);
@@ -179,12 +179,10 @@ void set_hash_id(uint32_t hash_id, protocol_handler::ProtocolPacket& packet) {
return;
}
if (packet.protocol_version() < PROTOCOL_VERSION_2) {
- LOG4CXX_DEBUG(logger_,
- "Packet needs no hash data (protocol version less 2)");
+ SDL_LOG_DEBUG("Packet needs no hash data (protocol version less 2)");
return;
}
- LOG4CXX_DEBUG(logger_,
- "Set hash_id 0x" << std::hex << hash_id << " to the packet 0x"
+ SDL_LOG_DEBUG("Set hash_id 0x" << std::hex << hash_id << " to the packet 0x"
<< &packet);
// Hash id shall be 4 bytes according Ford Protocol v8
DCHECK(sizeof(hash_id) == 4);
@@ -199,7 +197,7 @@ void ProtocolHandlerImpl::SendStartSessionAck(ConnectionID connection_id,
uint32_t hash_id,
uint8_t service_type,
bool protection) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
utils::SemanticVersion fullVersion;
SendStartSessionAck(connection_id,
session_id,
@@ -218,7 +216,7 @@ void ProtocolHandlerImpl::SendStartSessionAck(
uint8_t service_type,
bool protection,
utils::SemanticVersion& full_version) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
BsonObject empty_param;
bson_object_initialize_default(&empty_param);
@@ -244,7 +242,7 @@ void ProtocolHandlerImpl::SendStartSessionAck(
bool protection,
utils::SemanticVersion& full_version,
BsonObject& params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool send_transport_update_event = false;
@@ -292,53 +290,50 @@ void ProtocolHandlerImpl::SendStartSessionAck(
protocol_header_validator_.max_payload_size_by_service_type(
serviceTypeValue)));
UNUSED(mtu_written)
- LOG4CXX_DEBUG(logger_,
- "MTU parameter was written to bson params: "
- << mtu_written << "; Value: "
- << static_cast<int32_t>(
- bson_object_get_int64(&params, strings::mtu)));
+ SDL_LOG_DEBUG(
+ "MTU parameter was written to bson params: "
+ << mtu_written << "; Value: "
+ << static_cast<int32_t>(bson_object_get_int64(&params, strings::mtu)));
if (serviceTypeValue == kRpc) {
// Hash ID is only used in RPC case
const bool hash_written = bson_object_put_int32(
&params, strings::hash_id, static_cast<int32_t>(hash_id));
UNUSED(hash_written);
- LOG4CXX_DEBUG(logger_,
- "Hash parameter was written to bson params: "
- << hash_written << "; Value: "
- << static_cast<int32_t>(bson_object_get_int32(
- &params, strings::hash_id)));
+ SDL_LOG_DEBUG("Hash parameter was written to bson params: "
+ << hash_written << "; Value: "
+ << static_cast<int32_t>(
+ bson_object_get_int32(&params, strings::hash_id)));
// Minimum protocol version supported by both
- utils::SemanticVersion* min_version =
+ const utils::SemanticVersion& min_version =
(full_version.major_version_ < PROTOCOL_VERSION_5)
- ? &default_protocol_version
- : utils::SemanticVersion::min(full_version,
- default_protocol_version);
+ ? default_protocol_version
+ : ((full_version < default_protocol_version)
+ ? full_version
+ : default_protocol_version);
char protocol_version_string[256];
- strncpy(protocol_version_string, (*min_version).toString().c_str(), 255);
+ strncpy(protocol_version_string, (min_version).toString().c_str(), 255);
const bool protocol_ver_written = bson_object_put_string(
&params, strings::protocol_version, protocol_version_string);
UNUSED(protocol_ver_written);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Protocol version parameter was written to bson params: "
- << protocol_ver_written << "; Value: "
- << bson_object_get_string(&params, strings::protocol_version));
+ << protocol_ver_written << "; Value: "
+ << bson_object_get_string(&params, strings::protocol_version));
- LOG4CXX_INFO(logger_,
- "Protocol Version String " << protocol_version_string);
+ SDL_LOG_INFO("Protocol Version String " << protocol_version_string);
std::vector<std::string> secondaryTransports;
std::vector<int32_t> audioServiceTransports;
std::vector<int32_t> videoServiceTransports;
- if (*min_version >= min_multiple_transports_version) {
+ if (min_version >= min_multiple_transports_version) {
if (ParseSecondaryTransportConfiguration(connection_id,
secondaryTransports,
audioServiceTransports,
videoServiceTransports)) {
- LOG4CXX_DEBUG(logger_, "Multiple transports are enabled.");
+ SDL_LOG_DEBUG("Multiple transports are enabled.");
BsonArray secondaryTransportsArr;
bson_array_initialize(&secondaryTransportsArr,
secondaryTransports.size());
@@ -348,11 +343,10 @@ void ProtocolHandlerImpl::SendStartSessionAck(
secondaryTransports[i].c_str(),
sizeof(secondaryTransport));
secondaryTransport[sizeof(secondaryTransport) - 1] = '\0';
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Adding "
- << secondaryTransport
- << " to secondaryTransports parameter of StartSessionAck");
+ << secondaryTransport
+ << " to secondaryTransports parameter of StartSessionAck");
bson_array_add_string(&secondaryTransportsArr, secondaryTransport);
}
bson_object_put_array(
@@ -362,8 +356,7 @@ void ProtocolHandlerImpl::SendStartSessionAck(
bson_array_initialize(&audioServiceTransportsArr,
audioServiceTransports.size());
for (unsigned int i = 0; i < audioServiceTransports.size(); i++) {
- LOG4CXX_DEBUG(logger_,
- "Adding " << audioServiceTransports[i]
+ SDL_LOG_DEBUG("Adding " << audioServiceTransports[i]
<< " to audioServiceTransports parameter "
"of StartSessionAck");
bson_array_add_int32(&audioServiceTransportsArr,
@@ -377,8 +370,7 @@ void ProtocolHandlerImpl::SendStartSessionAck(
bson_array_initialize(&videoServiceTransportsArr,
videoServiceTransports.size());
for (unsigned int i = 0; i < videoServiceTransports.size(); i++) {
- LOG4CXX_DEBUG(logger_,
- "Adding " << videoServiceTransports[i]
+ SDL_LOG_DEBUG("Adding " << videoServiceTransports[i]
<< " to videoServiceTransports parameter "
"of StartSessionAck");
bson_array_add_int32(&videoServiceTransportsArr,
@@ -391,8 +383,7 @@ void ProtocolHandlerImpl::SendStartSessionAck(
if (settings_.multiple_transports_enabled()) {
send_transport_update_event = true;
} else {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Multiple transports feature is disabled by configuration");
// In this case, we must remember that this session will never have
// a secondary transport.
@@ -400,21 +391,20 @@ void ProtocolHandlerImpl::SendStartSessionAck(
kDisabledSecondary);
}
} else {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Failed to set up secondary transport and service type params");
connection_handler_.SetSecondaryTransportID(session_id,
kDisabledSecondary);
}
} else {
- LOG4CXX_INFO(logger_, "Older protocol version. No multiple transports");
+ SDL_LOG_INFO("Older protocol version. No multiple transports");
connection_handler_.SetSecondaryTransportID(session_id,
kDisabledSecondary);
}
std::string policy_app_id =
connection_handler_.GetCloudAppID(connection_id);
- if (*min_version >= min_cloud_app_version && !policy_app_id.empty()) {
+ if (min_version >= min_cloud_app_version && !policy_app_id.empty()) {
sync_primitives::AutoLock lock(auth_token_map_lock_);
auto it = auth_token_map_.find(policy_app_id);
if (it != auth_token_map_.end()) {
@@ -435,20 +425,19 @@ void ProtocolHandlerImpl::SendStartSessionAck(
raw_ford_messages_to_mobile_.PostMessage(
impl::RawFordMessageToMobile(ptr, false));
- LOG4CXX_DEBUG(logger_,
- "SendStartSessionAck() for connection "
- << connection_id << " for service_type "
- << static_cast<int32_t>(service_type) << " session_id "
- << static_cast<int32_t>(session_id) << " protection "
- << (protection ? "ON" : "OFF"));
+ SDL_LOG_DEBUG("SendStartSessionAck() for connection "
+ << connection_id << " for service_type "
+ << static_cast<int32_t>(service_type) << " session_id "
+ << static_cast<int32_t>(session_id) << " protection "
+ << (protection ? "ON" : "OFF"));
if (send_transport_update_event) {
// Wait until the StartService ACK has been processed for sending.
// The TransportUpdateEvent has a higher priority, being that it's
// a SERVICE_TYPE_CONTROL message. (The ACK is SERVICE_TYPE_RPC.)
- LOG4CXX_DEBUG(logger_, "Waiting for the MessageToMobile queue to be empty");
+ SDL_LOG_DEBUG("Waiting for the MessageToMobile queue to be empty");
raw_ford_messages_to_mobile_.WaitDumpQueue();
- LOG4CXX_DEBUG(logger_, "Sending the TransportUpdate event");
+ SDL_LOG_DEBUG("Sending the TransportUpdate event");
SendTransportUpdateEvent(connection_id, session_id);
}
}
@@ -456,13 +445,15 @@ void ProtocolHandlerImpl::SendStartSessionAck(
void ProtocolHandlerImpl::SendStartSessionNAck(ConnectionID connection_id,
uint8_t session_id,
uint8_t protocol_version,
- uint8_t service_type) {
+ uint8_t service_type,
+ const std::string& reason) {
std::vector<std::string> rejectedParams;
SendStartSessionNAck(connection_id,
session_id,
protocol_version,
service_type,
- rejectedParams);
+ rejectedParams,
+ reason);
}
void ProtocolHandlerImpl::SendStartSessionNAck(
@@ -470,8 +461,9 @@ void ProtocolHandlerImpl::SendStartSessionNAck(
uint8_t session_id,
uint8_t protocol_version,
uint8_t service_type,
- std::vector<std::string>& rejectedParams) {
- LOG4CXX_AUTO_TRACE(logger_);
+ std::vector<std::string>& rejectedParams,
+ const std::string& reason) {
+ SDL_LOG_AUTO_TRACE();
ProtocolFramePtr ptr(
new protocol_handler::ProtocolPacket(connection_id,
@@ -486,20 +478,34 @@ void ProtocolHandlerImpl::SendStartSessionNAck(
uint8_t maxProtocolVersion = SupportedSDLProtocolVersion();
+ utils::SemanticVersion full_version;
+ if (!session_observer_.ProtocolVersionUsed(
+ connection_id, session_id, full_version)) {
+ SDL_LOG_WARN("Connection: " << connection_id << " and/or session: "
+ << session_id << "no longer exist(s).");
+ return;
+ }
+
if (protocol_version >= PROTOCOL_VERSION_5 &&
- maxProtocolVersion >= PROTOCOL_VERSION_5 && rejectedParams.size() > 0) {
+ maxProtocolVersion >= PROTOCOL_VERSION_5) {
BsonObject payloadObj;
bson_object_initialize_default(&payloadObj);
- BsonArray rejectedParamsArr;
- bson_array_initialize(&rejectedParamsArr, rejectedParams.size());
- for (std::string param : rejectedParams) {
- char paramPtr[256];
- strncpy(paramPtr, param.c_str(), sizeof(paramPtr));
- paramPtr[sizeof(paramPtr) - 1] = '\0';
- bson_array_add_string(&rejectedParamsArr, paramPtr);
+ if (rejectedParams.size() > 0) {
+ BsonArray rejectedParamsArr;
+ bson_array_initialize(&rejectedParamsArr, rejectedParams.size());
+ for (std::string param : rejectedParams) {
+ char paramPtr[256];
+ strncpy(paramPtr, param.c_str(), sizeof(paramPtr));
+ paramPtr[sizeof(paramPtr) - 1] = '\0';
+ bson_array_add_string(&rejectedParamsArr, paramPtr);
+ }
+ bson_object_put_array(
+ &payloadObj, strings::rejected_params, &rejectedParamsArr);
+ }
+ if (!reason.empty() && full_version >= min_reason_param_version) {
+ bson_object_put_string(
+ &payloadObj, strings::reason, const_cast<char*>(reason.c_str()));
}
- bson_object_put_array(
- &payloadObj, strings::rejected_params, &rejectedParamsArr);
uint8_t* payloadBytes = bson_object_to_bytes(&payloadObj);
ptr->set_data(payloadBytes, bson_object_size(&payloadObj));
free(payloadBytes);
@@ -509,23 +515,25 @@ void ProtocolHandlerImpl::SendStartSessionNAck(
raw_ford_messages_to_mobile_.PostMessage(
impl::RawFordMessageToMobile(ptr, false));
- LOG4CXX_DEBUG(logger_,
- "SendStartSessionNAck() for connection "
- << connection_id << " for service_type "
- << static_cast<int32_t>(service_type) << " session_id "
- << static_cast<int32_t>(session_id));
+ SDL_LOG_DEBUG("SendStartSessionNAck() for connection "
+ << connection_id << " for service_type "
+ << static_cast<int32_t>(service_type) << " session_id "
+ << static_cast<int32_t>(session_id)
+ << (reason.empty() ? "" : " reason \"" + reason + "\""));
}
void ProtocolHandlerImpl::SendEndSessionNAck(ConnectionID connection_id,
uint32_t session_id,
uint8_t protocol_version,
- uint8_t service_type) {
+ uint8_t service_type,
+ const std::string reason) {
std::vector<std::string> rejectedParams;
SendEndSessionNAck(connection_id,
session_id,
protocol_version,
service_type,
- rejectedParams);
+ rejectedParams,
+ reason);
}
void ProtocolHandlerImpl::SendEndSessionNAck(
@@ -533,8 +541,9 @@ void ProtocolHandlerImpl::SendEndSessionNAck(
uint32_t session_id,
uint8_t protocol_version,
uint8_t service_type,
- std::vector<std::string>& rejectedParams) {
- LOG4CXX_AUTO_TRACE(logger_);
+ std::vector<std::string>& rejectedParams,
+ const std::string reason) {
+ SDL_LOG_AUTO_TRACE();
ProtocolFramePtr ptr(
new protocol_handler::ProtocolPacket(connection_id,
@@ -549,20 +558,35 @@ void ProtocolHandlerImpl::SendEndSessionNAck(
uint8_t maxProtocolVersion = SupportedSDLProtocolVersion();
+ utils::SemanticVersion full_version;
+ if (!session_observer_.ProtocolVersionUsed(
+ connection_id, session_id, full_version)) {
+ SDL_LOG_WARN("Connection: " << connection_id << " and/or session: "
+ << session_id << "no longer exist(s).");
+ return;
+ }
+
if (protocol_version >= PROTOCOL_VERSION_5 &&
- maxProtocolVersion >= PROTOCOL_VERSION_5 && rejectedParams.size() > 0) {
+ maxProtocolVersion >= PROTOCOL_VERSION_5) {
BsonObject payloadObj;
bson_object_initialize_default(&payloadObj);
- BsonArray rejectedParamsArr;
- bson_array_initialize(&rejectedParamsArr, rejectedParams.size());
- for (std::string param : rejectedParams) {
- char paramPtr[256];
- strncpy(paramPtr, param.c_str(), sizeof(paramPtr));
- paramPtr[sizeof(paramPtr) - 1] = '\0';
- bson_array_add_string(&rejectedParamsArr, paramPtr);
+
+ if (rejectedParams.size() > 0) {
+ BsonArray rejectedParamsArr;
+ bson_array_initialize(&rejectedParamsArr, rejectedParams.size());
+ for (std::string param : rejectedParams) {
+ char paramPtr[256];
+ strncpy(paramPtr, param.c_str(), sizeof(paramPtr));
+ paramPtr[sizeof(paramPtr) - 1] = '\0';
+ bson_array_add_string(&rejectedParamsArr, paramPtr);
+ }
+ bson_object_put_array(
+ &payloadObj, strings::rejected_params, &rejectedParamsArr);
+ }
+ if (!reason.empty() && full_version >= min_reason_param_version) {
+ bson_object_put_string(
+ &payloadObj, strings::reason, const_cast<char*>(reason.c_str()));
}
- bson_object_put_array(
- &payloadObj, strings::rejected_params, &rejectedParamsArr);
uint8_t* payloadBytes = bson_object_to_bytes(&payloadObj);
ptr->set_data(payloadBytes, bson_object_size(&payloadObj));
free(payloadBytes);
@@ -572,11 +596,11 @@ void ProtocolHandlerImpl::SendEndSessionNAck(
raw_ford_messages_to_mobile_.PostMessage(
impl::RawFordMessageToMobile(ptr, false));
- LOG4CXX_DEBUG(logger_,
- "SendEndSessionNAck() for connection "
- << connection_id << " for service_type "
- << static_cast<int32_t>(service_type) << " session_id "
- << static_cast<int32_t>(session_id));
+ SDL_LOG_DEBUG("SendEndSessionNAck() for connection "
+ << connection_id << " for service_type "
+ << static_cast<int32_t>(service_type) << " session_id "
+ << static_cast<int32_t>(session_id)
+ << (reason.empty() ? "" : " reason \"" + reason + "\""));
}
SessionObserver& ProtocolHandlerImpl::get_session_observer() {
@@ -587,7 +611,7 @@ void ProtocolHandlerImpl::SendEndSessionAck(ConnectionID connection_id,
uint8_t session_id,
uint8_t protocol_version,
uint8_t service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ProtocolFramePtr ptr(
new protocol_handler::ProtocolPacket(connection_id,
@@ -603,25 +627,23 @@ void ProtocolHandlerImpl::SendEndSessionAck(ConnectionID connection_id,
raw_ford_messages_to_mobile_.PostMessage(
impl::RawFordMessageToMobile(ptr, false));
- LOG4CXX_DEBUG(logger_,
- "SendEndSessionAck() for connection "
- << connection_id << " for service_type "
- << static_cast<int32_t>(service_type) << " session_id "
- << static_cast<int32_t>(session_id));
+ SDL_LOG_DEBUG("SendEndSessionAck() for connection "
+ << connection_id << " for service_type "
+ << static_cast<int32_t>(service_type) << " session_id "
+ << static_cast<int32_t>(session_id));
}
void ProtocolHandlerImpl::SendEndServicePrivate(int32_t primary_connection_id,
int32_t connection_id,
uint8_t session_id,
uint8_t service_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint8_t protocol_version;
if (session_observer_.ProtocolVersionUsed(
primary_connection_id, session_id, protocol_version)) {
- LOG4CXX_TRACE(logger_,
- "SendEndServicePrivate using protocol version "
- << static_cast<int32_t>(protocol_version));
+ SDL_LOG_TRACE("SendEndServicePrivate using protocol version "
+ << static_cast<int32_t>(protocol_version));
ProtocolFramePtr ptr(
new protocol_handler::ProtocolPacket(connection_id,
protocol_version,
@@ -635,21 +657,20 @@ void ProtocolHandlerImpl::SendEndServicePrivate(int32_t primary_connection_id,
raw_ford_messages_to_mobile_.PostMessage(
impl::RawFordMessageToMobile(ptr, false));
- LOG4CXX_DEBUG(logger_,
- "SendEndServicePrivate() for connection "
- << connection_id << " for service_type "
- << static_cast<int>(service_type)
- << " primary connection " << primary_connection_id
- << " session_id " << static_cast<int32_t>(session_id));
+ SDL_LOG_DEBUG("SendEndServicePrivate() for connection "
+ << connection_id << " for service_type "
+ << static_cast<int>(service_type) << " primary connection "
+ << primary_connection_id << " session_id "
+ << static_cast<int32_t>(session_id));
} else {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"SendEndServicePrivate is failed connection or session does not exist");
}
}
void ProtocolHandlerImpl::SendEndSession(int32_t connection_id,
uint8_t session_id) {
+ SDL_LOG_AUTO_TRACE();
// A session is always associated with a primary connection ID
SendEndServicePrivate(
connection_id, connection_id, session_id, SERVICE_TYPE_RPC);
@@ -659,6 +680,7 @@ void ProtocolHandlerImpl::SendEndService(int32_t primary_connection_id,
int32_t connection_id,
uint8_t session_id,
uint8_t service_type) {
+ SDL_LOG_AUTO_TRACE();
SendEndServicePrivate(
primary_connection_id, connection_id, session_id, service_type);
}
@@ -666,7 +688,7 @@ void ProtocolHandlerImpl::SendEndService(int32_t primary_connection_id,
RESULT_CODE ProtocolHandlerImpl::SendHeartBeatAck(ConnectionID connection_id,
uint8_t session_id,
uint32_t message_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint8_t protocol_version;
if (session_observer_.ProtocolVersionUsed(
@@ -686,15 +708,14 @@ RESULT_CODE ProtocolHandlerImpl::SendHeartBeatAck(ConnectionID connection_id,
impl::RawFordMessageToMobile(ptr, false));
return RESULT_OK;
}
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"SendHeartBeatAck is failed connection or session does not exist");
return RESULT_FAIL;
}
void ProtocolHandlerImpl::SendTransportUpdateEvent(ConnectionID connection_id,
uint8_t session_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint8_t protocol_version;
if (session_observer_.ProtocolVersionUsed(
@@ -727,9 +748,8 @@ void ProtocolHandlerImpl::SendTransportUpdateEvent(ConnectionID connection_id,
&payload_obj, strings::tcp_ip_address, tcp_ip_address);
// omit TCP port number
}
- LOG4CXX_INFO(logger_,
- "SendTransportUpdateEvent IP address: "
- << tcp_ip_address << " Port: " << tcp_port);
+ SDL_LOG_INFO("SendTransportUpdateEvent IP address: "
+ << tcp_ip_address << " Port: " << tcp_port);
uint8_t* payloadBytes = bson_object_to_bytes(&payload_obj);
ptr->set_data(payloadBytes, bson_object_size(&payload_obj));
@@ -739,14 +759,13 @@ void ProtocolHandlerImpl::SendTransportUpdateEvent(ConnectionID connection_id,
raw_ford_messages_to_mobile_.PostMessage(
impl::RawFordMessageToMobile(ptr, false));
- LOG4CXX_DEBUG(logger_,
- "SendTransportUpdateEvent() for connection "
- << connection_id << " for session "
- << static_cast<int32_t>(session_id));
+ SDL_LOG_DEBUG("SendTransportUpdateEvent() for connection "
+ << connection_id << " for session "
+ << static_cast<int32_t>(session_id));
} else {
- LOG4CXX_WARN(logger_,
- "SendTransportUpdateEvent is failed connection or session "
- "does not exist");
+ SDL_LOG_WARN(
+ "SendTransportUpdateEvent is failed connection or session "
+ "does not exist");
}
}
@@ -754,7 +773,7 @@ RESULT_CODE ProtocolHandlerImpl::SendRegisterSecondaryTransportAck(
ConnectionID connection_id,
ConnectionID primary_transport_connection_id,
uint8_t session_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// acquire the protocol version from primary transport
uint8_t protocol_version;
@@ -775,9 +794,9 @@ RESULT_CODE ProtocolHandlerImpl::SendRegisterSecondaryTransportAck(
impl::RawFordMessageToMobile(ptr, false));
return RESULT_OK;
}
- LOG4CXX_WARN(logger_,
- "RegisterSecondaryTransportAck is failed connection or session "
- "does not exist");
+ SDL_LOG_WARN(
+ "RegisterSecondaryTransportAck is failed connection or session "
+ "does not exist");
return RESULT_FAIL;
}
@@ -786,7 +805,7 @@ RESULT_CODE ProtocolHandlerImpl::SendRegisterSecondaryTransportNAck(
ConnectionID primary_transport_connection_id,
uint8_t session_id,
BsonObject* reason) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// If mobile sends an invalid session ID and we cannot find out the Connection
// ID of primary transport, then we use version 5. (The multiple-transports
@@ -796,9 +815,9 @@ RESULT_CODE ProtocolHandlerImpl::SendRegisterSecondaryTransportNAck(
// acquire the protocol version from primary transport
if (!session_observer_.ProtocolVersionUsed(
primary_transport_connection_id, session_id, protocol_version)) {
- LOG4CXX_WARN(logger_,
- "Failed to acquire protocol version for "
- "RegisterSecondaryTransportNAck");
+ SDL_LOG_WARN(
+ "Failed to acquire protocol version for "
+ "RegisterSecondaryTransportNAck");
return RESULT_FAIL;
}
}
@@ -827,7 +846,7 @@ RESULT_CODE ProtocolHandlerImpl::SendRegisterSecondaryTransportNAck(
void ProtocolHandlerImpl::SendHeartBeat(int32_t connection_id,
uint8_t session_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint8_t protocol_version;
if (session_observer_.ProtocolVersionUsed(
connection_id, session_id, protocol_version)) {
@@ -843,10 +862,9 @@ void ProtocolHandlerImpl::SendHeartBeat(int32_t connection_id,
message_counters_[session_id]++));
raw_ford_messages_to_mobile_.PostMessage(
impl::RawFordMessageToMobile(ptr, false));
- LOG4CXX_DEBUG(logger_, "SendHeartBeat finished successfully");
+ SDL_LOG_DEBUG("SendHeartBeat finished successfully");
} else {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"SendHeartBeat is failed connection or session does not exist");
}
}
@@ -857,10 +875,9 @@ void ProtocolHandlerImpl::SendMessageToMobileApp(const RawMessagePtr message,
#ifdef TELEMETRY_MONITOR
const date_time::TimeDuration start_time = date_time::getCurrentTime();
#endif // TELEMETRY_MONITOR
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!message) {
- LOG4CXX_ERROR(logger_,
- "Invalid message for sending to mobile app is received.");
+ SDL_LOG_ERROR("Invalid message for sending to mobile app is received.");
return;
}
@@ -902,15 +919,13 @@ void ProtocolHandlerImpl::SendMessageToMobileApp(const RawMessagePtr message,
DCHECK(max_block_size > 0);
if (max_block_size > 0) {
frame_size = max_block_size;
- LOG4CXX_DEBUG(logger_,
- "Security set new optimal packet size " << frame_size);
+ SDL_LOG_DEBUG("Security set new optimal packet size " << frame_size);
} else {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Security could not return max block size, use the origin one");
}
}
- LOG4CXX_DEBUG(logger_, "Optimal packet size is " << frame_size);
+ SDL_LOG_DEBUG("Optimal packet size is " << frame_size);
#endif // ENABLE_SECURITY
if (message->data_size() <= frame_size) {
@@ -923,13 +938,11 @@ void ProtocolHandlerImpl::SendMessageToMobileApp(const RawMessagePtr message,
needs_encryption,
final_message);
if (result != RESULT_OK) {
- LOG4CXX_ERROR(logger_,
- "ProtocolHandler failed to send single frame message.");
+ SDL_LOG_ERROR("ProtocolHandler failed to send single frame message.");
}
} else {
- LOG4CXX_DEBUG(logger_,
- "Message will be sent in multiple frames; max frame size is "
- << frame_size);
+ SDL_LOG_DEBUG("Message will be sent in multiple frames; max frame size is "
+ << frame_size);
RESULT_CODE result = SendMultiFrameMessage(connection_handle,
sessionID,
@@ -941,8 +954,7 @@ void ProtocolHandlerImpl::SendMessageToMobileApp(const RawMessagePtr message,
needs_encryption,
final_message);
if (result != RESULT_OK) {
- LOG4CXX_ERROR(logger_,
- "ProtocolHandler failed to send multiframe messages.");
+ SDL_LOG_ERROR("ProtocolHandler failed to send multiframe messages.");
}
}
#ifdef TELEMETRY_MONITOR
@@ -957,43 +969,40 @@ void ProtocolHandlerImpl::SendMessageToMobileApp(const RawMessagePtr message,
}
void ProtocolHandlerImpl::OnTMMessageReceived(const RawMessagePtr tm_message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!tm_message) {
- LOG4CXX_ERROR(logger_,
- "Invalid incoming message received in"
- << " ProtocolHandler from Transport Manager.");
+ SDL_LOG_ERROR("Invalid incoming message received in"
+ << " ProtocolHandler from Transport Manager.");
return;
}
const uint32_t connection_key = tm_message->connection_key();
- LOG4CXX_DEBUG(logger_,
- "Received data from TM with connection id "
- << connection_key << " msg data_size "
- << tm_message->data_size());
+ SDL_LOG_DEBUG("Received data from TM with connection id "
+ << connection_key << " msg data_size "
+ << tm_message->data_size());
RESULT_CODE result;
size_t malformed_occurs = 0u;
const ProtocolFramePtrList protocol_frames =
incoming_data_handler_.ProcessData(
- *tm_message, &result, &malformed_occurs);
- LOG4CXX_DEBUG(logger_, "Proccessed " << protocol_frames.size() << " frames");
+ *tm_message, result, &malformed_occurs);
+ SDL_LOG_DEBUG("Processed " << protocol_frames.size() << " frames");
if (result != RESULT_OK) {
if (result == RESULT_MALFORMED_OCCURS) {
- LOG4CXX_WARN(
- logger_,
- "Malformed message occurs, connection id " << connection_key);
+ SDL_LOG_WARN("Malformed message occurs, connection id "
+ << connection_key);
if (!get_settings().malformed_message_filtering()) {
- LOG4CXX_DEBUG(logger_, "Malformed message filterign disabled");
+ SDL_LOG_DEBUG("Malformed message filtering disabled");
session_observer_.OnMalformedMessageCallback(connection_key);
- // For tracking only malformed occurrence check outpute
+ // For tracking only malformed occurrence check output
} else {
if (malformed_occurs > 0) {
TrackMalformedMessage(connection_key, malformed_occurs);
}
}
} else {
- LOG4CXX_ERROR(logger_, "Incoming data processing failed.");
+ SDL_LOG_ERROR("Incoming data processing failed.");
transport_manager_.DisconnectForce(connection_key);
}
}
@@ -1008,7 +1017,7 @@ void ProtocolHandlerImpl::OnTMMessageReceived(const RawMessagePtr tm_message) {
#ifdef ENABLE_SECURITY
const RESULT_CODE result = DecryptFrame(frame);
if (result != RESULT_OK) {
- LOG4CXX_WARN(logger_, "Error frame decryption. Frame skipped.");
+ SDL_LOG_WARN("Error frame decryption. Frame skipped.");
continue;
}
#endif // ENABLE_SECURITY
@@ -1026,15 +1035,14 @@ void ProtocolHandlerImpl::OnTMMessageReceived(const RawMessagePtr tm_message) {
void ProtocolHandlerImpl::OnTMMessageReceiveFailed(
const transport_manager::DataReceiveError& error) {
// TODO(PV): implement
- LOG4CXX_ERROR(logger_, "Received error on attemping to recieve message.");
+ SDL_LOG_ERROR("Received error on attemping to recieve message.");
}
void ProtocolHandlerImpl::NotifySubscribers(const RawMessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(protocol_observers_lock_);
if (protocol_observers_.empty()) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Cannot handle multiframe message: no IProtocolObserver is set.");
}
for (ProtocolObservers::iterator it = protocol_observers_.begin();
@@ -1046,7 +1054,7 @@ void ProtocolHandlerImpl::NotifySubscribers(const RawMessagePtr message) {
}
void ProtocolHandlerImpl::OnTMMessageSend(const RawMessagePtr message) {
- LOG4CXX_DEBUG(logger_, "Sending message finished successfully.");
+ SDL_LOG_DEBUG("Sending message finished successfully.");
uint32_t connection_handle = 0;
uint8_t sessionID = 0;
@@ -1061,6 +1069,7 @@ void ProtocolHandlerImpl::OnTMMessageSend(const RawMessagePtr message) {
if (ready_to_close_connections_.end() != connection_it) {
ready_to_close_connections_.erase(connection_it);
+ session_observer_.OnFinalMessageCallback(connection_handle);
transport_manager_.Disconnect(connection_handle);
return;
}
@@ -1069,7 +1078,7 @@ void ProtocolHandlerImpl::OnTMMessageSend(const RawMessagePtr message) {
const RESULT_CODE result =
sent_message.deserializePacket(message->data(), message->data_size());
if (result != RESULT_OK) {
- LOG4CXX_ERROR(logger_, "Error while message deserialization.");
+ SDL_LOG_ERROR("Error while message deserialization.");
return;
}
std::map<uint8_t, uint32_t>::iterator it =
@@ -1099,11 +1108,28 @@ void ProtocolHandlerImpl::OnTMMessageSendFailed(
const RawMessagePtr message) {
DCHECK_OR_RETURN_VOID(message);
// TODO(PV): implement
- LOG4CXX_ERROR(logger_,
- "Sending message " << message->data_size()
- << "bytes failed, connection_key "
+ SDL_LOG_ERROR("Sending message " << message->data_size()
+ << " bytes failed, connection_key "
<< message->connection_key()
- << "Error_text: " << error.text());
+ << " Error_text: " << error.text());
+
+ uint32_t connection_handle = 0;
+ uint8_t session_id = 0;
+
+ session_observer_.PairFromKey(
+ message->connection_key(), &connection_handle, &session_id);
+
+ const auto connection_it = std::find(ready_to_close_connections_.begin(),
+ ready_to_close_connections_.end(),
+ connection_handle);
+ if (ready_to_close_connections_.end() != connection_it) {
+ ready_to_close_connections_.erase(connection_it);
+ }
+
+ const auto last_message_it = sessions_last_message_id_.find(session_id);
+ if (sessions_last_message_id_.end() != last_message_it) {
+ sessions_last_message_id_.erase(last_message_it);
+ }
}
void ProtocolHandlerImpl::OnConnectionPending(
@@ -1132,7 +1158,7 @@ void ProtocolHandlerImpl::OnUnexpectedDisconnect(
}
void ProtocolHandlerImpl::NotifyOnGetSystemTimeFailed() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
#ifdef ENABLE_SECURITY
security_manager_->ResetPendingSystemTimeRequests();
security_manager_->NotifyListenersOnGetSystemTimeFailed();
@@ -1147,19 +1173,19 @@ void ProtocolHandlerImpl::ProcessFailedPTU() {
#ifdef EXTERNAL_PROPRIETARY_MODE
void ProtocolHandlerImpl::ProcessFailedCertDecrypt() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
security_manager_->ProcessFailedCertDecrypt();
}
#endif
void ProtocolHandlerImpl::OnTransportConfigUpdated(
const transport_manager::transport_adapter::TransportConfig& configs) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
transport_manager::transport_adapter::TransportConfig::const_iterator it =
configs.find(transport_manager::transport_adapter::tc_enabled);
if (configs.end() == it) {
- LOG4CXX_WARN(logger_, "No enabled field in OnTransportConfigUpdated");
+ SDL_LOG_WARN("No enabled field in OnTransportConfigUpdated");
return;
}
@@ -1169,14 +1195,14 @@ void ProtocolHandlerImpl::OnTransportConfigUpdated(
if (tcp_enabled) {
it = configs.find(transport_manager::transport_adapter::tc_tcp_port);
if (configs.end() == it) {
- LOG4CXX_WARN(logger_, "No port field in OnTransportConfigUpdated");
+ SDL_LOG_WARN("No port field in OnTransportConfigUpdated");
return;
}
tcp_port = it->second;
it = configs.find(transport_manager::transport_adapter::tc_tcp_ip_address);
if (configs.end() == it) {
- LOG4CXX_WARN(logger_, "No IP address field in OnTransportConfigUpdated");
+ SDL_LOG_WARN("No IP address field in OnTransportConfigUpdated");
return;
}
tcp_enabled_ = true;
@@ -1188,10 +1214,9 @@ void ProtocolHandlerImpl::OnTransportConfigUpdated(
tcp_ip_address_.clear();
}
- LOG4CXX_INFO(logger_,
- "OnTransportConfigUpdated: new config enabled is "
- << tcp_enabled_ << ". Port is " << tcp_port_
- << ". IP Address is " << tcp_ip_address_);
+ SDL_LOG_INFO("OnTransportConfigUpdated: new config enabled is "
+ << tcp_enabled_ << ". Port is " << tcp_port_
+ << ". IP Address is " << tcp_ip_address_);
// Walk the SessionConnection map and find all sessions that need a
// TransportUpdate Event. Sessions flagged with kDisabledSecondary in their
@@ -1206,21 +1231,20 @@ void ProtocolHandlerImpl::OnTransportConfigUpdated(
session_connection_map.begin();
while (itr != session_connection_map.end()) {
const connection_handler::SessionTransports st = itr->second;
- LOG4CXX_INFO(logger_,
- "OnTransportConfigUpdated found session "
- << itr->first << " with primary connection "
- << st.primary_transport << " and secondary connection "
- << st.secondary_transport);
+ SDL_LOG_INFO("OnTransportConfigUpdated found session "
+ << itr->first << " with primary connection "
+ << st.primary_transport << " and secondary connection "
+ << st.secondary_transport);
if (st.secondary_transport != kDisabledSecondary) {
SendTransportUpdateEvent(st.primary_transport, itr->first);
}
- itr++;
+ ++itr;
}
}
void ProtocolHandlerImpl::OnAuthTokenUpdated(const std::string& policy_app_id,
const std::string& auth_token) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(auth_token_map_lock_);
if (auth_token.empty()) {
auth_token_map_.erase(policy_app_id);
@@ -1231,7 +1255,7 @@ void ProtocolHandlerImpl::OnAuthTokenUpdated(const std::string& policy_app_id,
bool ProtocolHandlerImpl::IsRPCServiceSecure(
const uint32_t connection_key) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
#ifdef ENABLE_SECURITY
security_manager::SSLContext* context =
@@ -1243,37 +1267,35 @@ bool ProtocolHandlerImpl::IsRPCServiceSecure(
}
RESULT_CODE ProtocolHandlerImpl::SendFrame(const ProtocolFramePtr packet) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!packet) {
- LOG4CXX_ERROR(logger_, "Failed to send empty packet.");
+ SDL_LOG_ERROR("Failed to send empty packet.");
return RESULT_FAIL;
}
#ifdef ENABLE_SECURITY
// and return protect flag to Packet constructor for makeing design by Policy
const RESULT_CODE result = EncryptFrame(packet);
if (result != RESULT_OK) {
- LOG4CXX_WARN(logger_, "Error frame encryption. Frame droped.");
+ SDL_LOG_WARN("Error frame encryption. Frame droped.");
return RESULT_FAIL;
}
#endif // ENABLE_SECURITY
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Packet to be sent: "
- << ConvertPacketDataToString(packet->data(), packet->data_size())
- << " of size: " << packet->data_size());
+ << ConvertPacketDataToString(packet->data(), packet->data_size())
+ << " of size: " << packet->data_size());
const RawMessagePtr message_to_send = packet->serializePacket();
if (!message_to_send) {
- LOG4CXX_ERROR(logger_, "Serialization error");
+ SDL_LOG_ERROR("Serialization error");
return RESULT_FAIL;
}
- LOG4CXX_DEBUG(logger_,
- "Message to send with connection id "
- << static_cast<int>(packet->connection_id()));
+ SDL_LOG_DEBUG("Message to send with connection id "
+ << static_cast<int>(packet->connection_id()));
if (transport_manager::E_SUCCESS !=
transport_manager_.SendMessageToDevice(message_to_send)) {
- LOG4CXX_WARN(logger_, "Can't send message to device");
+ SDL_LOG_WARN("Can't send message to device");
return RESULT_FAIL;
}
return RESULT_OK;
@@ -1288,11 +1310,10 @@ RESULT_CODE ProtocolHandlerImpl::SendSingleFrameMessage(
const uint8_t* data,
const bool needs_encryption,
const bool is_final_message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- LOG4CXX_DEBUG(
- logger_,
- "Packet needs encryption: " << std::boolalpha << needs_encryption);
+ SDL_LOG_DEBUG("Packet needs encryption: " << std::boolalpha
+ << needs_encryption);
ProtocolFramePtr ptr(
new protocol_handler::ProtocolPacket(connection_id,
@@ -1321,11 +1342,10 @@ RESULT_CODE ProtocolHandlerImpl::SendMultiFrameMessage(
const size_t max_frame_size,
const bool needs_encryption,
const bool is_final_message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- LOG4CXX_DEBUG(
- logger_,
- " data size " << data_size << " max_frame_size " << max_frame_size);
+ SDL_LOG_DEBUG(" data size " << data_size << " max_frame_size "
+ << max_frame_size);
// remainder of last frame
const size_t lastframe_remainder = data_size % max_frame_size;
@@ -1337,8 +1357,7 @@ RESULT_CODE ProtocolHandlerImpl::SendMultiFrameMessage(
// add last frame if not empty
(lastframe_remainder > 0 ? 1 : 0);
- LOG4CXX_DEBUG(logger_,
- "Data " << data_size << " bytes in " << frames_count
+ SDL_LOG_DEBUG("Data " << data_size << " bytes in " << frames_count
<< " frames with last frame size " << lastframe_size);
DCHECK(max_frame_size >= FIRST_FRAME_DATA_SIZE);
@@ -1371,7 +1390,7 @@ RESULT_CODE ProtocolHandlerImpl::SendMultiFrameMessage(
raw_ford_messages_to_mobile_.PostMessage(
impl::RawFordMessageToMobile(firstPacket, false));
- LOG4CXX_DEBUG(logger_, "First frame is sent.");
+ SDL_LOG_DEBUG("First frame is sent.");
for (uint32_t i = 0; i < frames_count; ++i) {
const bool is_last_frame = (i == (frames_count - 1));
@@ -1395,27 +1414,27 @@ RESULT_CODE ProtocolHandlerImpl::SendMultiFrameMessage(
raw_ford_messages_to_mobile_.PostMessage(
impl::RawFordMessageToMobile(ptr, is_final_packet));
- LOG4CXX_DEBUG(logger_, '#' << i << " frame is sent.");
+ SDL_LOG_DEBUG('#' << i << " frame is sent.");
}
return RESULT_OK;
}
RESULT_CODE ProtocolHandlerImpl::HandleMessage(const ProtocolFramePtr packet) {
DCHECK_OR_RETURN(packet, RESULT_UNKNOWN);
- LOG4CXX_DEBUG(logger_, "Handling message " << packet);
+ SDL_LOG_DEBUG("Handling message " << packet);
switch (packet->frame_type()) {
case FRAME_TYPE_CONTROL:
- LOG4CXX_TRACE(logger_, "FRAME_TYPE_CONTROL");
+ SDL_LOG_TRACE("FRAME_TYPE_CONTROL");
return HandleControlMessage(packet);
case FRAME_TYPE_SINGLE:
- LOG4CXX_TRACE(logger_, "FRAME_TYPE_SINGLE");
+ SDL_LOG_TRACE("FRAME_TYPE_SINGLE");
return HandleSingleFrameMessage(packet);
case FRAME_TYPE_FIRST:
case FRAME_TYPE_CONSECUTIVE:
- LOG4CXX_TRACE(logger_, "FRAME_TYPE_FIRST or FRAME_TYPE_CONSECUTIVE");
+ SDL_LOG_TRACE("FRAME_TYPE_FIRST or FRAME_TYPE_CONSECUTIVE");
return HandleMultiFrameMessage(packet);
default: {
- LOG4CXX_WARN(logger_, "Unknown frame type" << packet->frame_type());
+ SDL_LOG_WARN("Unknown frame type" << packet->frame_type());
return RESULT_FAIL;
}
}
@@ -1424,13 +1443,12 @@ RESULT_CODE ProtocolHandlerImpl::HandleMessage(const ProtocolFramePtr packet) {
RESULT_CODE ProtocolHandlerImpl::HandleSingleFrameMessage(
const ProtocolFramePtr packet) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"FRAME_TYPE_SINGLE message of size "
- << packet->data_size() << "; message "
- << ConvertPacketDataToString(packet->data(), packet->data_size()));
+ << packet->data_size() << "; message "
+ << ConvertPacketDataToString(packet->data(), packet->data_size()));
// Replace a potential secondary transport ID in the packet with the primary
// transport ID
@@ -1469,7 +1487,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleSingleFrameMessage(
RESULT_CODE ProtocolHandlerImpl::HandleMultiFrameMessage(
const ProtocolFramePtr packet) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Replace a potential secondary transport ID in the packet with the primary
// transport ID
@@ -1480,7 +1498,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleMultiFrameMessage(
}
if (multiframe_builder_.AddFrame(packet) != RESULT_OK) {
- LOG4CXX_WARN(logger_, "Frame assembling issue");
+ SDL_LOG_WARN("Frame assembling issue");
}
return RESULT_OK;
@@ -1488,42 +1506,41 @@ RESULT_CODE ProtocolHandlerImpl::HandleMultiFrameMessage(
RESULT_CODE ProtocolHandlerImpl::HandleControlMessage(
const ProtocolFramePtr packet) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// TODO{ALeshin}: Rename "Session" to "Service" on PH, CH, AM levels
switch (packet->frame_data()) {
case FRAME_DATA_START_SERVICE: {
- LOG4CXX_TRACE(logger_, "FrameData: StartService");
+ SDL_LOG_TRACE("FrameData: StartService");
return HandleControlMessageStartSession(packet);
}
case FRAME_DATA_END_SERVICE: {
- LOG4CXX_TRACE(logger_, "FrameData: StopService");
+ SDL_LOG_TRACE("FrameData: StopService");
return HandleControlMessageEndSession(*packet);
}
case FRAME_DATA_END_SERVICE_ACK: {
- LOG4CXX_TRACE(logger_, "FrameData: StopService ACK");
+ SDL_LOG_TRACE("FrameData: StopService ACK");
return HandleControlMessageEndServiceACK(*packet);
}
case FRAME_DATA_HEART_BEAT: {
- LOG4CXX_TRACE(logger_, "FrameData: Heartbeat");
+ SDL_LOG_TRACE("FrameData: Heartbeat");
return HandleControlMessageHeartBeat(*packet);
}
case FRAME_DATA_HEART_BEAT_ACK: {
- LOG4CXX_TRACE(logger_, "FrameData Heartbeat ACK");
- LOG4CXX_DEBUG(logger_,
- "Received Heartbeat ACK from mobile,"
- " connection: "
- << packet->connection_id());
+ SDL_LOG_TRACE("FrameData Heartbeat ACK");
+ SDL_LOG_DEBUG(
+ "Received Heartbeat ACK from mobile,"
+ " connection: "
+ << packet->connection_id());
return RESULT_OK;
}
case FRAME_DATA_REGISTER_SECONDARY_TRANSPORT: {
- LOG4CXX_TRACE(logger_, "FrameData: RegisterSecondaryTransport");
+ SDL_LOG_TRACE("FrameData: RegisterSecondaryTransport");
return HandleControlMessageRegisterSecondaryTransport(packet);
}
default:
- LOG4CXX_WARN(logger_,
- "Control message of type "
- << static_cast<int>(packet->frame_data()) << " ignored");
+ SDL_LOG_WARN("Control message of type "
+ << static_cast<int>(packet->frame_data()) << " ignored");
return RESULT_OK;
}
return RESULT_OK;
@@ -1531,12 +1548,11 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessage(
uint32_t get_hash_id(const ProtocolPacket& packet) {
if (packet.protocol_version() < PROTOCOL_VERSION_2) {
- LOG4CXX_DEBUG(logger_,
- "Packet without hash data (protocol version less 2)");
+ SDL_LOG_DEBUG("Packet without hash data (protocol version less 2)");
return HASH_ID_NOT_SUPPORTED;
}
if (packet.data_size() < 4) {
- LOG4CXX_WARN(logger_, "Packet without hash data (data size less 4)");
+ SDL_LOG_WARN("Packet without hash data (data size less 4)");
return HASH_ID_WRONG;
}
if (packet.protocol_version() >= PROTOCOL_VERSION_5) {
@@ -1549,7 +1565,7 @@ uint32_t get_hash_id(const ProtocolPacket& packet) {
bson_object_deinitialize(&obj);
return hash_id;
} else {
- LOG4CXX_WARN(logger_, "Failed to parse BSON field for hash ID");
+ SDL_LOG_WARN("Failed to parse BSON field for hash ID");
return HASH_ID_WRONG;
}
} else {
@@ -1563,15 +1579,16 @@ uint32_t get_hash_id(const ProtocolPacket& packet) {
RESULT_CODE ProtocolHandlerImpl::HandleControlMessageEndSession(
const ProtocolPacket& packet) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const uint8_t current_session_id = packet.session_id();
uint32_t hash_id = get_hash_id(packet);
const ServiceType service_type = ServiceTypeFromByte(packet.service_type());
const ConnectionID connection_id = packet.connection_id();
+ std::string err_reason;
const uint32_t session_key = session_observer_.OnSessionEndedCallback(
- connection_id, current_session_id, &hash_id, service_type);
+ connection_id, current_session_id, &hash_id, service_type, &err_reason);
// TODO(EZamakhov): add clean up output queue (for removed service)
if (session_key != 0) {
@@ -1581,8 +1598,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageEndSession(
service_type);
message_counters_.erase(current_session_id);
} else {
- LOG4CXX_WARN(logger_,
- "Refused to end session " << static_cast<int>(service_type)
+ SDL_LOG_WARN("Refused to end session " << static_cast<int>(service_type)
<< " type.");
if (packet.protocol_version() >= PROTOCOL_VERSION_5) {
std::vector<std::string> rejectedParams;
@@ -1594,12 +1610,14 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageEndSession(
current_session_id,
packet.protocol_version(),
service_type,
- rejectedParams);
+ rejectedParams,
+ err_reason);
} else {
SendEndSessionNAck(connection_id,
current_session_id,
packet.protocol_version(),
- service_type);
+ service_type,
+ err_reason);
}
}
return RESULT_OK;
@@ -1610,7 +1628,7 @@ const ServiceStatus ProtocolHandlerImpl::ServiceDisallowedBySettings(
const ConnectionID connection_id,
const uint8_t session_id,
const bool protection) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::string& transport =
session_observer_.TransportTypeProfileStringFromConnHandle(connection_id);
@@ -1660,7 +1678,7 @@ const ServiceStatus ProtocolHandlerImpl::ServiceDisallowedBySettings(
RESULT_CODE ProtocolHandlerImpl::HandleControlMessageEndServiceACK(
const ProtocolPacket& packet) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const uint8_t current_session_id = packet.session_id();
uint32_t hash_id = get_hash_id(packet);
@@ -1671,7 +1689,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageEndServiceACK(
connection_id, current_session_id, &hash_id, service_type);
if (0 == session_key) {
- LOG4CXX_WARN(logger_, "Refused to end service");
+ SDL_LOG_WARN("Refused to end service");
return RESULT_FAIL;
}
@@ -1680,9 +1698,8 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageEndServiceACK(
RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession(
const ProtocolFramePtr packet) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG(
"Protocol version:" << static_cast<int>(packet->protocol_version()));
const ServiceType service_type = ServiceTypeFromByte(packet->service_type());
@@ -1708,18 +1725,26 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession(
service_type, connection_id, session_id, protection);
if (ServiceStatus::INVALID_ENUM != settings_check) {
- LOG4CXX_DEBUG(logger_,
- "Rejecting StartService for service:"
- << service_type << ", disallowed by settings.");
+ SDL_LOG_DEBUG("Rejecting StartService for service:"
+ << service_type << ", disallowed by settings.");
service_status_update_handler_->OnServiceUpdate(
connection_key, service_type, settings_check);
+
+ std::string reason("Service type: " + std::to_string(service_type) +
+ " disallowed by settings.");
+ if (ServiceStatus::PROTECTION_ENFORCED == settings_check) {
+ reason += " Allowed only in protected mode";
+ }
+ if (ServiceStatus::UNSECURE_START_FAILED == settings_check) {
+ reason += " Allowed only in unprotected mode";
+ }
+
SendStartSessionNAck(
- connection_id, session_id, protocol_version, service_type);
+ connection_id, session_id, protocol_version, service_type, reason);
return RESULT_OK;
}
- LOG4CXX_INFO(logger_,
- "StartSession ID " << static_cast<int>(session_id)
+ SDL_LOG_INFO("StartSession ID " << static_cast<int>(session_id)
<< " and Connection ID "
<< static_cast<int>(connection_id));
@@ -1734,8 +1759,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession(
size_t bson_obj_size = bson_object_from_bytes_len(
&bson_obj, packet->data(), packet->total_data_bytes());
if (bson_obj_size == 0) {
- LOG4CXX_WARN(logger_,
- "Failed to parse BSON field of start service packet");
+ SDL_LOG_WARN("Failed to parse BSON field of start service packet");
bson_object_initialize_default(&bson_obj);
}
} else {
@@ -1751,15 +1775,14 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession(
RESULT_CODE ProtocolHandlerImpl::HandleControlMessageRegisterSecondaryTransport(
const ProtocolFramePtr packet) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const uint8_t session_id = packet->session_id();
const ConnectionID connection_id = packet->connection_id();
ConnectionID primary_connection_id = 0;
- LOG4CXX_INFO(logger_,
- "RegisterSecondaryTransport ID "
- << static_cast<int>(session_id) << " and Connection ID "
- << static_cast<int>(connection_id));
+ SDL_LOG_INFO("RegisterSecondaryTransport ID "
+ << static_cast<int>(session_id) << " and Connection ID "
+ << static_cast<int>(connection_id));
if (connection_handler_.OnSecondaryTransportStarted(
primary_connection_id, connection_id, session_id)) {
@@ -1794,8 +1817,10 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageRegisterSecondaryTransport(
}
void ProtocolHandlerImpl::NotifySessionStarted(
- const SessionContext& context, std::vector<std::string>& rejected_params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ const SessionContext& context,
+ std::vector<std::string>& rejected_params,
+ const std::string err_reason) {
+ SDL_LOG_AUTO_TRACE();
ProtocolFramePtr packet;
{
@@ -1803,7 +1828,7 @@ void ProtocolHandlerImpl::NotifySessionStarted(
StartSessionFrameMap::iterator it = start_session_frame_map_.find(
std::make_pair(context.connection_id_, context.initial_session_id_));
if (it == start_session_frame_map_.end()) {
- LOG4CXX_ERROR(logger_, "Cannot find Session Started packet");
+ SDL_LOG_ERROR("Cannot find Session Started packet");
return;
}
packet = it->second;
@@ -1814,9 +1839,8 @@ void ProtocolHandlerImpl::NotifySessionStarted(
const uint8_t protocol_version = packet->protocol_version();
if (0 == context.new_session_id_) {
- LOG4CXX_WARN(logger_,
- "Refused by session_observer to create service "
- << static_cast<int32_t>(service_type) << " type.");
+ SDL_LOG_WARN("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);
@@ -1828,12 +1852,16 @@ void ProtocolHandlerImpl::NotifySessionStarted(
session_id,
protocol_version,
packet->service_type(),
- rejected_params);
+ rejected_params,
+ err_reason);
return;
}
std::shared_ptr<BsonObject> start_session_ack_params(
- new BsonObject(), [](BsonObject* obj) { bson_object_deinitialize(obj); });
+ new BsonObject(), [](BsonObject* obj) {
+ bson_object_deinitialize(obj);
+ delete obj;
+ });
bson_object_initialize_default(start_session_ack_params.get());
// when video service is successfully started, copy input parameters
// ("width", "height", "videoProtocol", "videoCodec") to the ACK packet
@@ -1871,8 +1899,7 @@ void ProtocolHandlerImpl::NotifySessionStarted(
}
bson_object_deinitialize(&req_param);
} else {
- LOG4CXX_WARN(logger_,
- "Failed to parse BSON field of start service (video)");
+ SDL_LOG_WARN("Failed to parse BSON field of start service (video)");
}
}
@@ -1890,14 +1917,18 @@ void ProtocolHandlerImpl::NotifySessionStarted(
bson_object_get_string(&request_params, strings::protocol_version);
std::string version_string(version_param == NULL ? "" : version_param);
fullVersion = std::make_shared<utils::SemanticVersion>(version_string);
+
+ const auto connection_key = session_observer_.KeyFromPair(
+ packet->connection_id(), context.new_session_id_);
+ connection_handler_.BindProtocolVersionWithSession(connection_key,
+ *fullVersion);
// Constructed payloads added in Protocol v5
if (fullVersion->major_version_ < PROTOCOL_VERSION_5) {
rejected_params.push_back(std::string(strings::protocol_version));
}
bson_object_deinitialize(&request_params);
} else {
- LOG4CXX_WARN(logger_,
- "Failed to parse start service packet for version string");
+ SDL_LOG_WARN("Failed to parse start service packet for version string");
fullVersion = std::make_shared<utils::SemanticVersion>();
}
} else {
@@ -1927,7 +1958,7 @@ void ProtocolHandlerImpl::NotifySessionStarted(
kUseExisting);
if (!ssl_context) {
const std::string error("CreateSSLContext failed");
- LOG4CXX_ERROR(logger_, error);
+ SDL_LOG_ERROR(error);
security_manager_->SendInternalError(
connection_key,
security_manager::SecurityManager::ERROR_INTERNAL,
@@ -1944,7 +1975,8 @@ void ProtocolHandlerImpl::NotifySessionStarted(
packet->session_id(),
protocol_version,
packet->service_type(),
- rejected_params);
+ rejected_params,
+ "SSL Handshake failed due to rejected parameters");
} else if (ssl_context->IsInitCompleted()) {
// mark service as protected
session_observer_.SetProtectionFlag(connection_key, service_type);
@@ -1962,8 +1994,7 @@ void ProtocolHandlerImpl::NotifySessionStarted(
*fullVersion,
*start_session_ack_params);
} else {
- LOG4CXX_DEBUG(logger_,
- "Adding Handshake handler to listeners: " << handler.get());
+ SDL_LOG_DEBUG("Adding Handshake handler to listeners: " << handler.get());
security_manager::SecurityManagerListener* listener =
new HandshakeHandler(*handler);
security_manager_->AddListener(listener);
@@ -1978,14 +2009,14 @@ void ProtocolHandlerImpl::NotifySessionStarted(
packet->session_id(),
protocol_version,
packet->service_type(),
- rejected_params);
+ rejected_params,
+ "System time provider is not ready");
}
}
}
- LOG4CXX_DEBUG(logger_,
- "Protection establishing for connection "
- << connection_key << " is in progress");
+ SDL_LOG_DEBUG("Protection establishing for connection "
+ << connection_key << " is in progress");
return;
}
#endif // ENABLE_SECURITY
@@ -2007,20 +2038,21 @@ void ProtocolHandlerImpl::NotifySessionStarted(
connection_key,
context.service_type_,
ServiceStatus::SERVICE_START_FAILED);
- SendStartSessionNAck(context.connection_id_,
- packet->session_id(),
- protocol_version,
- packet->service_type(),
- rejected_params);
+ SendStartSessionNAck(
+ context.connection_id_,
+ packet->session_id(),
+ protocol_version,
+ packet->service_type(),
+ rejected_params,
+ "Certain parameters in the StartService request were rejected");
}
}
RESULT_CODE ProtocolHandlerImpl::HandleControlMessageHeartBeat(
const ProtocolPacket& packet) {
const ConnectionID connection_id = packet.connection_id();
- LOG4CXX_DEBUG(
- logger_,
- "Sending heart beat acknowledgment for connection " << connection_id);
+ SDL_LOG_DEBUG("Sending heart beat acknowledgment for connection "
+ << connection_id);
uint8_t protocol_version;
if (session_observer_.ProtocolVersionUsed(
connection_id, packet.session_id(), protocol_version)) {
@@ -2030,20 +2062,19 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageHeartBeat(
return SendHeartBeatAck(
connection_id, packet.session_id(), packet.message_id());
} else {
- LOG4CXX_WARN(logger_, "HeartBeat is not supported");
+ SDL_LOG_WARN("HeartBeat is not supported");
return RESULT_HEARTBEAT_IS_NOT_SUPPORTED;
}
} else {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"SendHeartBeatAck is failed connection or session does not exist");
return RESULT_FAIL;
}
}
void ProtocolHandlerImpl::PopValideAndExpirateMultiframes() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const ProtocolFramePtrList& frame_list = multiframe_builder_.PopMultiframes();
for (ProtocolFramePtrList::const_iterator it = frame_list.begin();
it != frame_list.end();
@@ -2056,9 +2087,8 @@ void ProtocolHandlerImpl::PopValideAndExpirateMultiframes() {
const uint32_t connection_key = session_observer_.KeyFromPair(
frame->connection_id(), frame->session_id());
- LOG4CXX_DEBUG(
- logger_,
- "Result frame" << frame << "for connection " << connection_key);
+ SDL_LOG_DEBUG("Result frame" << frame << "for connection "
+ << connection_key);
const RawMessagePtr rawMessage(new RawMessage(connection_key,
frame->protocol_version(),
frame->data(),
@@ -2080,18 +2110,16 @@ void ProtocolHandlerImpl::PopValideAndExpirateMultiframes() {
}
bool ProtocolHandlerImpl::TrackMessage(const uint32_t& connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const size_t& frequency_time = get_settings().message_frequency_time();
const size_t& frequency_count = get_settings().message_frequency_count();
if (frequency_time > 0u && frequency_count > 0u) {
const size_t message_frequency =
message_meter_.TrackMessage(connection_key);
- LOG4CXX_DEBUG(
- logger_,
- "Frequency of " << connection_key << " is " << message_frequency);
+ SDL_LOG_DEBUG("Frequency of " << connection_key << " is "
+ << message_frequency);
if (message_frequency > frequency_count) {
- LOG4CXX_WARN(logger_,
- "Frequency of " << connection_key << " is marked as high.");
+ SDL_LOG_WARN("Frequency of " << connection_key << " is marked as high.");
session_observer_.OnApplicationFloodCallBack(connection_key);
message_meter_.RemoveIdentifier(connection_key);
return true;
@@ -2104,19 +2132,17 @@ bool ProtocolHandlerImpl::TrackMalformedMessage(const uint32_t& connection_key,
const size_t count) {
const size_t& malformed_frequency_count =
get_settings().malformed_frequency_count();
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (get_settings().malformed_frequency_time() > 0u &&
malformed_frequency_count > 0u) {
const size_t malformed_message_frequency =
malformed_message_meter_.TrackMessages(connection_key, count);
- LOG4CXX_DEBUG(logger_,
- "Malformed frequency of " << connection_key << " is "
+ SDL_LOG_DEBUG("Malformed frequency of " << connection_key << " is "
<< malformed_message_frequency);
if (!get_settings().malformed_message_filtering() ||
malformed_message_frequency > malformed_frequency_count) {
- LOG4CXX_WARN(
- logger_,
- "Malformed frequency of " << connection_key << " is marked as high.");
+ SDL_LOG_WARN("Malformed frequency of " << connection_key
+ << " is marked as high.");
session_observer_.OnMalformedMessageCallback(connection_key);
malformed_message_meter_.RemoveIdentifier(connection_key);
return true;
@@ -2126,7 +2152,7 @@ bool ProtocolHandlerImpl::TrackMalformedMessage(const uint32_t& connection_key,
}
void ProtocolHandlerImpl::Handle(const impl::RawFordMessageFromMobile message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
switch (message->service_type()) {
case kMobileNav:
@@ -2140,7 +2166,7 @@ void ProtocolHandlerImpl::Handle(const impl::RawFordMessageFromMobile message) {
}
} break;
}
- LOG4CXX_DEBUG(logger_, "Message : " << message.get());
+ SDL_LOG_DEBUG("Message : " << message.get());
const uint8_t c_id = message->connection_id();
const uint32_t m_id = message->session_id();
@@ -2152,25 +2178,23 @@ void ProtocolHandlerImpl::Handle(const impl::RawFordMessageFromMobile message) {
if (((0 != message->data()) && (0 != message->data_size())) ||
FRAME_TYPE_CONTROL == message->frame_type() ||
FRAME_TYPE_FIRST == message->frame_type()) {
- LOG4CXX_DEBUG(logger_, "Packet: dataSize " << message->data_size());
+ SDL_LOG_DEBUG("Packet: dataSize " << message->data_size());
HandleMessage(message);
PopValideAndExpirateMultiframes();
} else {
- LOG4CXX_WARN(logger_,
- "handleMessagesFromMobileApp() - incorrect or NULL data");
+ SDL_LOG_WARN("handleMessagesFromMobileApp() - incorrect or NULL data");
}
}
void ProtocolHandlerImpl::Handle(const impl::RawFordMessageToMobile message) {
- LOG4CXX_DEBUG(logger_,
- "Message to mobile app: connection id "
- << static_cast<int>(message->connection_id())
- << ";"
- " dataSize: "
- << message->data_size()
- << " ;"
- " protocolVersion "
- << static_cast<int>(message->protocol_version()));
+ SDL_LOG_DEBUG("Message to mobile app: connection id "
+ << static_cast<int>(message->connection_id())
+ << ";"
+ " dataSize: "
+ << message->data_size()
+ << " ;"
+ " protocolVersion "
+ << static_cast<int>(message->protocol_version()));
if (message.is_final) {
sessions_last_message_id_.insert(std::pair<uint8_t, uint32_t>(
@@ -2197,7 +2221,7 @@ void ProtocolHandlerImpl::set_service_status_update_handler(
void ProtocolHandlerImpl::set_security_manager(
security_manager::SecurityManager* security_manager) {
if (!security_manager) {
- LOG4CXX_ERROR(logger_, "Invalid (NULL) pointer to SecurityManager.");
+ SDL_LOG_ERROR("Invalid (NULL) pointer to SecurityManager.");
return;
}
security_manager_ = security_manager;
@@ -2213,7 +2237,7 @@ RESULT_CODE ProtocolHandlerImpl::EncryptFrame(ProtocolFramePtr packet) {
return RESULT_OK;
}
if (!security_manager_) {
- LOG4CXX_WARN(logger_, "No security_manager_ set.");
+ SDL_LOG_WARN("No security_manager_ set.");
return RESULT_FAIL;
}
const uint32_t connection_key = session_observer_.KeyFromPair(
@@ -2221,11 +2245,10 @@ RESULT_CODE ProtocolHandlerImpl::EncryptFrame(ProtocolFramePtr packet) {
security_manager::SSLContext* context = session_observer_.GetSSLContext(
connection_key, ServiceTypeFromByte(packet->service_type()));
- LOG4CXX_DEBUG(
- logger_,
- "Protection flag is: " << packet->protection_flag() << std::boolalpha);
+ SDL_LOG_DEBUG("Protection flag is: " << packet->protection_flag()
+ << std::boolalpha);
if ((!context || !context->IsInitCompleted()) || !packet->protection_flag()) {
- LOG4CXX_DEBUG(logger_, "Ecryption is skipped!");
+ SDL_LOG_DEBUG("Ecryption is skipped!");
return RESULT_OK;
}
const uint8_t* out_data;
@@ -2233,7 +2256,7 @@ RESULT_CODE ProtocolHandlerImpl::EncryptFrame(ProtocolFramePtr packet) {
if (!context->Encrypt(
packet->data(), packet->data_size(), &out_data, &out_data_size)) {
const std::string error_text(context->LastError());
- LOG4CXX_ERROR(logger_, "Enryption failed: " << error_text);
+ SDL_LOG_ERROR("Enryption failed: " << error_text);
security_manager_->SendInternalError(
connection_key,
security_manager::SecurityManager::ERROR_ENCRYPTION_FAILED,
@@ -2245,8 +2268,7 @@ RESULT_CODE ProtocolHandlerImpl::EncryptFrame(ProtocolFramePtr packet) {
packet->connection_id(), packet->session_id(), &hash_id, kRpc);
return RESULT_OK;
}
- LOG4CXX_DEBUG(logger_,
- "Encrypted " << packet->data_size() << " bytes to "
+ SDL_LOG_DEBUG("Encrypted " << packet->data_size() << " bytes to "
<< out_data_size << " bytes");
DCHECK(out_data);
DCHECK(out_data_size);
@@ -2277,12 +2299,12 @@ RESULT_CODE ProtocolHandlerImpl::DecryptFrame(ProtocolFramePtr packet) {
}
if (shoud_not_decrypt) {
- LOG4CXX_DEBUG(logger_, "Frame will not be decrypted");
+ SDL_LOG_DEBUG("Frame will not be decrypted");
return RESULT_OK;
}
if (!security_manager_) {
- LOG4CXX_WARN(logger_, "No security_manager_ set.");
+ SDL_LOG_WARN("No security_manager_ set.");
return RESULT_FAIL;
}
const uint32_t connection_key = session_observer_.KeyFromPair(
@@ -2291,8 +2313,7 @@ RESULT_CODE ProtocolHandlerImpl::DecryptFrame(ProtocolFramePtr packet) {
connection_key, ServiceTypeFromByte(packet->service_type()));
if (!context || !context->IsInitCompleted()) {
const std::string error_text("Fail decryption for unprotected service ");
- LOG4CXX_ERROR(logger_,
- error_text << static_cast<int>(packet->service_type()));
+ SDL_LOG_ERROR(error_text << static_cast<int>(packet->service_type()));
security_manager_->SendInternalError(
connection_key,
security_manager::SecurityManager::ERROR_SERVICE_NOT_PROTECTED,
@@ -2304,7 +2325,7 @@ RESULT_CODE ProtocolHandlerImpl::DecryptFrame(ProtocolFramePtr packet) {
if (!context->Decrypt(
packet->data(), packet->data_size(), &out_data, &out_data_size)) {
const std::string error_text(context->LastError());
- LOG4CXX_ERROR(logger_, "Decryption failed: " << error_text);
+ SDL_LOG_ERROR("Decryption failed: " << error_text);
security_manager_->SendInternalError(
connection_key,
security_manager::SecurityManager::ERROR_DECRYPTION_FAILED,
@@ -2316,8 +2337,7 @@ RESULT_CODE ProtocolHandlerImpl::DecryptFrame(ProtocolFramePtr packet) {
packet->connection_id(), packet->session_id(), &hash_id, kRpc);
return RESULT_ENCRYPTION_FAILED;
}
- LOG4CXX_DEBUG(logger_,
- "Decrypted " << packet->data_size() << " bytes to "
+ SDL_LOG_DEBUG("Decrypted " << packet->data_size() << " bytes to "
<< out_data_size << " bytes");
DCHECK(out_data);
DCHECK(out_data_size);
@@ -2333,8 +2353,8 @@ RESULT_CODE ProtocolHandlerImpl::DecryptFrame(ProtocolFramePtr packet) {
void ProtocolHandlerImpl::SendFramesNumber(uint32_t connection_key,
int32_t number_of_frames) {
- LOG4CXX_DEBUG(
- logger_, "SendFramesNumber MobileNaviAck for session " << connection_key);
+ SDL_LOG_DEBUG("SendFramesNumber MobileNaviAck for session "
+ << connection_key);
transport_manager::ConnectionUID connection_id = 0;
uint8_t session_id = 0;
@@ -2362,11 +2382,10 @@ void ProtocolHandlerImpl::SendFramesNumber(uint32_t connection_key,
sizeof(number_of_frames));
raw_ford_messages_to_mobile_.PostMessage(
impl::RawFordMessageToMobile(ptr, false));
- LOG4CXX_DEBUG(logger_, "SendFramesNumber finished successfully");
+ SDL_LOG_DEBUG("SendFramesNumber finished successfully");
}
} else {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"SendFramesNumber is failed connection or session does not exist");
}
}
@@ -2396,7 +2415,7 @@ std::string ConvertPacketDataToString(const uint8_t* data,
}
uint8_t ProtocolHandlerImpl::SupportedSDLProtocolVersion() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return get_settings().max_supported_protocol_version();
}
@@ -2439,7 +2458,7 @@ ProtocolHandlerImpl::GetTransportTypeFromConnectionType(
if (it != transportTypes.end()) {
result = it->second;
} else {
- LOG4CXX_ERROR(logger_, "Unknown connection type " << connection_type);
+ SDL_LOG_ERROR("Unknown connection type " << connection_type);
}
return result;
@@ -2450,7 +2469,7 @@ const bool ProtocolHandlerImpl::ParseSecondaryTransportConfiguration(
std::vector<std::string>& secondaryTransports,
std::vector<int32_t>& audioServiceTransports,
std::vector<int32_t>& videoServiceTransports) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<std::string> secondary_transport_types;
// First discover what the connection type of the primary transport is
@@ -2468,8 +2487,7 @@ const bool ProtocolHandlerImpl::ParseSecondaryTransportConfiguration(
} else if (td.transport_type_ == impl::TransportType::TT_WIFI) {
secondary_transport_types = settings_.secondary_transports_for_wifi();
} else {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Bad or unknown device type in ParseSecondaryTransportConfiguration");
return false;
}
@@ -2510,7 +2528,7 @@ void ProtocolHandlerImpl::GenerateSecondaryTransportsForStartSessionAck(
bool device_is_ios,
bool device_is_android,
std::vector<std::string>& secondaryTransports) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Parse the "secondary_transport_types" vector (which comes from
// smartDeviceLink.ini). For each entry in the vector, add an
@@ -2521,39 +2539,34 @@ void ProtocolHandlerImpl::GenerateSecondaryTransportsForStartSessionAck(
const utils::custom_string::CustomString transport_type(*it);
if (transport_type.CompareIgnoreCase("USB")) {
if (device_is_ios) {
- LOG4CXX_TRACE(
- logger_,
+ SDL_LOG_TRACE(
"Adding IAP_USB to secondaryTransports for StartSessionAck");
secondaryTransports.push_back("IAP_USB");
}
if (device_is_android) {
- LOG4CXX_TRACE(
- logger_,
+ SDL_LOG_TRACE(
"Adding AOA_USB to secondaryTransports for StartSessionAck");
secondaryTransports.push_back("AOA_USB");
}
} else if (transport_type.CompareIgnoreCase("Bluetooth")) {
if (device_is_ios) {
- LOG4CXX_TRACE(
- logger_,
+ SDL_LOG_TRACE(
"Adding IAP_BLUETOOTH to secondaryTransports for StartSessionAck");
secondaryTransports.push_back("IAP_BLUETOOTH");
}
if (device_is_android) {
- LOG4CXX_TRACE(
- logger_,
+ SDL_LOG_TRACE(
"Adding SPP_BLUETOOTH to secondaryTransports for StartSessionAck");
secondaryTransports.push_back("SPP_BLUETOOTH");
}
}
if (transport_type.CompareIgnoreCase("WiFi")) {
- LOG4CXX_TRACE(
- logger_,
+ SDL_LOG_TRACE(
"Adding TCP_WIFI to secondaryTransports for StartSessionAck");
secondaryTransports.push_back("TCP_WIFI");
}
- it++;
+ ++it;
}
}
@@ -2564,13 +2577,13 @@ void ProtocolHandlerImpl::GenerateServiceTransportsForStartSessionAck(
const impl::TransportType primary_transport_type,
const std::vector<std::string>& secondary_transport_types,
std::vector<int32_t>& serviceTransports) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (service_transports.size() == 0) {
if (secondary_enabled && !secondary_transport_types.empty()) {
- LOG4CXX_TRACE(logger_,
- "Empty Service Transports. Allowing service to run on both "
- "connections");
+ SDL_LOG_TRACE(
+ "Empty Service Transports. Allowing service to run on both "
+ "connections");
serviceTransports.push_back(1);
serviceTransports.push_back(2);
} else {
@@ -2580,17 +2593,16 @@ void ProtocolHandlerImpl::GenerateServiceTransportsForStartSessionAck(
bool fPrimaryAdded = false;
bool fSecondaryAdded = false;
std::vector<std::string>::const_iterator it = service_transports.begin();
- for (; it != service_transports.end(); it++) {
+ for (; it != service_transports.end(); ++it) {
const utils::custom_string::CustomString transport(*it);
- LOG4CXX_TRACE(
- logger_,
- "Service Allowed to run on " << transport.c_str() << " transport");
+ SDL_LOG_TRACE("Service Allowed to run on " << transport.c_str()
+ << " transport");
if (!fPrimaryAdded &&
(transport.CompareIgnoreCase(primary_connection_type.c_str()) ||
(transport.CompareIgnoreCase("IAP_USB") &&
primary_transport_type == impl::TransportType::TT_USB))) {
- LOG4CXX_TRACE(logger_, "Service allowed on primary transport");
+ SDL_LOG_TRACE("Service allowed on primary transport");
serviceTransports.push_back(1);
fPrimaryAdded = true;
}
@@ -2606,7 +2618,7 @@ void ProtocolHandlerImpl::GenerateServiceTransportsForStartSessionAck(
secondary_transport_type.c_str());
});
if (found != secondary_transport_types.end()) {
- LOG4CXX_TRACE(logger_, "Service allowed on secondary transport");
+ SDL_LOG_TRACE("Service allowed on secondary transport");
serviceTransports.push_back(2);
fSecondaryAdded = true;
}
diff --git a/src/components/protocol_handler/src/protocol_packet.cc b/src/components/protocol_handler/src/protocol_packet.cc
index 1f9fc431ae..db2f124c53 100644
--- a/src/components/protocol_handler/src/protocol_packet.cc
+++ b/src/components/protocol_handler/src/protocol_packet.cc
@@ -46,7 +46,7 @@
namespace protocol_handler {
-CREATE_LOGGERPTR_GLOBAL(logger_, "ProtocolHandler")
+SDL_CREATE_LOG_VARIABLE("ProtocolHandler")
namespace {
std::string StringifyFrameType(uint8_t type) {
@@ -64,7 +64,7 @@ std::string StringifyFrameType(uint8_t type) {
return "FRAME_TYPE_FIRST";
default:
- LOG4CXX_ERROR(logger_, "Unknown frame type:" << static_cast<int>(type));
+ SDL_LOG_ERROR("Unknown frame type:" << static_cast<int>(type));
break;
}
@@ -117,11 +117,10 @@ inline uint32_t read_be_uint32(const uint8_t* const data) {
void ProtocolPacket::ProtocolHeader::deserialize(const uint8_t* message,
const size_t messageSize) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(message);
if (messageSize < PROTOCOL_HEADER_V1_SIZE) {
- LOG4CXX_DEBUG(logger_,
- "Message size less " << PROTOCOL_HEADER_V1_SIZE << " bytes");
+ SDL_LOG_DEBUG("Message size less " << PROTOCOL_HEADER_V1_SIZE << " bytes");
return;
}
// first 4 bits
@@ -143,15 +142,14 @@ void ProtocolPacket::ProtocolHeader::deserialize(const uint8_t* message,
case PROTOCOL_VERSION_4:
case PROTOCOL_VERSION_5: {
if (messageSize < PROTOCOL_HEADER_V2_SIZE) {
- LOG4CXX_DEBUG(
- logger_,
- "Message size less " << PROTOCOL_HEADER_V2_SIZE << " bytes");
+ SDL_LOG_DEBUG("Message size less " << PROTOCOL_HEADER_V2_SIZE
+ << " bytes");
return;
}
messageId = read_be_uint32(message + 8);
} break;
default:
- LOG4CXX_WARN(logger_, "Unknown version:" << static_cast<int>(version));
+ SDL_LOG_WARN("Unknown version:" << static_cast<int>(version));
messageId = 0;
break;
}
@@ -162,42 +160,47 @@ ProtocolPacket::ProtocolHeaderValidator::ProtocolHeaderValidator()
, max_control_payload_size_(0)
, max_rpc_payload_size_(0)
, max_audio_payload_size_(0)
- , max_video_payload_size_(0) {}
+ , max_video_payload_size_(0)
+ , max_protocol_version_supported_(PROTOCOL_VERSION_MAX) {}
void ProtocolPacket::ProtocolHeaderValidator::set_max_payload_size(
const size_t max_payload_size) {
- LOG4CXX_DEBUG(logger_, "New maximum payload size is " << max_payload_size);
+ SDL_LOG_DEBUG("New maximum payload size is " << max_payload_size);
max_payload_size_ = max_payload_size;
}
void ProtocolPacket::ProtocolHeaderValidator::set_max_control_payload_size(
const size_t max_payload_size) {
- LOG4CXX_DEBUG(logger_,
- "New maximum Control payload size is " << max_payload_size);
+ SDL_LOG_DEBUG("New maximum Control payload size is " << max_payload_size);
max_control_payload_size_ = max_payload_size;
}
void ProtocolPacket::ProtocolHeaderValidator::set_max_rpc_payload_size(
const size_t max_payload_size) {
- LOG4CXX_DEBUG(logger_,
- "New maximum RPC payload size is " << max_payload_size);
+ SDL_LOG_DEBUG("New maximum RPC payload size is " << max_payload_size);
max_rpc_payload_size_ = max_payload_size;
}
void ProtocolPacket::ProtocolHeaderValidator::set_max_audio_payload_size(
const size_t max_payload_size) {
- LOG4CXX_DEBUG(logger_,
- "New maximum audio payload size is " << max_payload_size);
+ SDL_LOG_DEBUG("New maximum audio payload size is " << max_payload_size);
max_audio_payload_size_ = max_payload_size;
}
void ProtocolPacket::ProtocolHeaderValidator::set_max_video_payload_size(
const size_t max_payload_size) {
- LOG4CXX_DEBUG(logger_,
- "New maximum video payload size is " << max_payload_size);
+ SDL_LOG_DEBUG("New maximum video payload size is " << max_payload_size);
max_video_payload_size_ = max_payload_size;
}
+void ProtocolPacket::ProtocolHeaderValidator::
+ set_max_protocol_version_supported(
+ const uint16_t max_protocol_version_supported) {
+ SDL_LOG_DEBUG("New maximum protocol version supported is "
+ << max_protocol_version_supported);
+ max_protocol_version_supported_ = max_protocol_version_supported;
+}
+
size_t ProtocolPacket::ProtocolHeaderValidator::max_payload_size() const {
return max_payload_size_;
}
@@ -219,6 +222,12 @@ size_t ProtocolPacket::ProtocolHeaderValidator::max_video_payload_size() const {
return max_video_payload_size_;
}
+uint16_t
+ProtocolPacket::ProtocolHeaderValidator::max_protocol_version_supported()
+ const {
+ return max_protocol_version_supported_;
+}
+
size_t
ProtocolPacket::ProtocolHeaderValidator::max_payload_size_by_service_type(
const ServiceType type) const {
@@ -246,17 +255,21 @@ ProtocolPacket::ProtocolHeaderValidator::max_payload_size_by_service_type(
: max_video_payload_size_;
break;
case kInvalidServiceType:
- LOG4CXX_WARN(logger_, "Invalid service type: " << static_cast<int>(type));
+ SDL_LOG_WARN("Invalid service type: " << static_cast<int>(type));
}
return payload_size;
}
RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
const ProtocolHeader& header) const {
- LOG4CXX_DEBUG(logger_, "Validating header - " << header);
+ SDL_LOG_DEBUG("Validating header - " << header);
// expected payload size will be calculated depending
// on used protocol version and service type
size_t payload_size = MAXIMUM_FRAME_DATA_V2_SIZE;
+ // Protocol version shall be from 1 to 4
+ if (max_protocol_version_supported_ < header.version) {
+ return RESULT_FAIL;
+ }
switch (header.version) {
case PROTOCOL_VERSION_1:
case PROTOCOL_VERSION_2:
@@ -270,17 +283,15 @@ RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
ServiceTypeFromByte(header.serviceType));
break;
default:
- LOG4CXX_WARN(logger_,
- "Unknown version:" << static_cast<int>(header.version));
+ SDL_LOG_WARN("Unknown version:" << static_cast<int>(header.version));
return RESULT_FAIL;
}
// ServiceType shall be equal 0x0 (Control), 0x07 (RPC), 0x0A (PCM), 0x0B
// (Video), 0x0F (Bulk)
if (ServiceTypeFromByte(header.serviceType) == kInvalidServiceType) {
- LOG4CXX_WARN(
- logger_,
- "Invalide service type" << static_cast<int>(header.serviceType));
+ SDL_LOG_WARN("Invalide service type"
+ << static_cast<int>(header.serviceType));
return RESULT_FAIL;
}
// Check frame info for each frame type
@@ -307,26 +318,23 @@ RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
case FRAME_DATA_HEART_BEAT_ACK:
break;
default:
- LOG4CXX_WARN(logger_,
- "FRAME_TYPE_CONTROL - Invalide frame data "
- << static_cast<int>(header.frameData));
+ SDL_LOG_WARN("FRAME_TYPE_CONTROL - Invalide frame data "
+ << static_cast<int>(header.frameData));
return RESULT_FAIL;
}
break;
}
case FRAME_TYPE_SINGLE:
if (header.frameData != FRAME_DATA_SINGLE) {
- LOG4CXX_WARN(logger_,
- "FRAME_TYPE_SINGLE - Invalide frame data "
- << static_cast<int>(header.frameData));
+ SDL_LOG_WARN("FRAME_TYPE_SINGLE - Invalide frame data "
+ << static_cast<int>(header.frameData));
return RESULT_FAIL;
}
break;
case FRAME_TYPE_FIRST:
if (header.frameData != FRAME_DATA_FIRST) {
- LOG4CXX_WARN(logger_,
- "FRAME_TYPE_FIRST - Invalide frame data "
- << static_cast<int>(header.frameData));
+ SDL_LOG_WARN("FRAME_TYPE_FIRST - Invalide frame data "
+ << static_cast<int>(header.frameData));
return RESULT_FAIL;
}
break;
@@ -334,8 +342,7 @@ RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
// Could have any FrameInfo value
break;
default:
- LOG4CXX_WARN(logger_,
- "Unknown frame type " << static_cast<int>(header.frameType));
+ SDL_LOG_WARN("Unknown frame type " << static_cast<int>(header.frameType));
// All other Frame type is invalid
return RESULT_FAIL;
}
@@ -352,29 +359,26 @@ RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
if (header.dataSize > payload_size ||
(FRAME_TYPE_CONTROL != header.frameType && header.dataSize == 0u)) {
UNUSED(StringifyFrameType);
- LOG4CXX_WARN(
- logger_,
- "Packet data size of "
- << StringifyFrameType(header.frameType)
- << " frame must be in range (0, payload_size=" << payload_size
- << "], but actual value is " << header.dataSize);
+ SDL_LOG_WARN("Packet data size of "
+ << StringifyFrameType(header.frameType)
+ << " frame must be in range (0, payload_size="
+ << payload_size << "], but actual value is "
+ << header.dataSize);
return RESULT_FAIL;
}
} break;
case FRAME_TYPE_FIRST:
if (FIRST_FRAME_DATA_SIZE != header.dataSize) {
- LOG4CXX_WARN(logger_,
- "Packet data size of FRAME_TYPE_FIRST frame must equal "
- << static_cast<int>(FIRST_FRAME_DATA_SIZE)
- << ", but actual value is " << header.dataSize);
+ SDL_LOG_WARN("Packet data size of FRAME_TYPE_FIRST frame must equal "
+ << static_cast<int>(FIRST_FRAME_DATA_SIZE)
+ << ", but actual value is " << header.dataSize);
return RESULT_FAIL;
}
break;
default:
- LOG4CXX_WARN(logger_,
- "Unknown frame type " << static_cast<int>(header.frameType));
+ SDL_LOG_WARN("Unknown frame type " << static_cast<int>(header.frameType));
return RESULT_FAIL;
}
// Message ID be equal or greater than 0x01 (not actual for 1 protocol version
@@ -382,11 +386,11 @@ RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
if (header.messageId <= 0) {
if (FRAME_TYPE_CONTROL != header.frameType &&
PROTOCOL_VERSION_1 != header.version) {
- LOG4CXX_WARN(logger_, "Message ID shall be greater than 0x00");
+ SDL_LOG_WARN("Message ID shall be greater than 0x00");
return RESULT_FAIL;
}
}
- LOG4CXX_DEBUG(logger_, "Message header is completely correct.");
+ SDL_LOG_DEBUG("Message header is completely correct.");
return RESULT_OK;
}
@@ -424,7 +428,7 @@ ProtocolPacket::ProtocolPacket(ConnectionID connection_id)
// Serialization
RawMessagePtr ProtocolPacket::serializePacket() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// TODO(EZamakhov): Move header serialization to ProtocolHeader
// version is low byte
const uint8_t version_byte = packet_header_.version << 4;
@@ -521,7 +525,7 @@ bool ProtocolPacket::operator==(const ProtocolPacket& other) const {
}
void ProtocolPacket::HandleRawFirstFrameData(const uint8_t* message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
payload_size_ = 0;
const uint8_t* data = message;
uint32_t total_data_bytes = data[0] << 24;
@@ -533,7 +537,7 @@ void ProtocolPacket::HandleRawFirstFrameData(const uint8_t* message) {
RESULT_CODE ProtocolPacket::deserializePacket(const uint8_t* message,
const size_t messageSize) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN(message, RESULT_FAIL);
packet_header_.deserialize(message, messageSize);
const uint8_t offset = packet_header_.version == PROTOCOL_VERSION_1
@@ -610,8 +614,8 @@ uint8_t* ProtocolPacket::data() const {
}
void ProtocolPacket::set_total_data_bytes(size_t dataBytes) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Data bytes : " << dataBytes);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Data bytes : " << dataBytes);
if (dataBytes) {
delete[] packet_data_.data;
packet_data_.data = new (std::nothrow) uint8_t[dataBytes];
diff --git a/src/components/protocol_handler/src/protocol_payload.cc b/src/components/protocol_handler/src/protocol_payload.cc
index 8916fe91b0..a18f04f8a1 100644
--- a/src/components/protocol_handler/src/protocol_payload.cc
+++ b/src/components/protocol_handler/src/protocol_payload.cc
@@ -93,8 +93,11 @@ std::ostream& operator<<(std::ostream& os, const ProtocolPayloadV2& payload) {
<< ", data (bytes): " << payload.data.size() << ")";
}
+#ifdef BUILD_TESTS
+// cppcheck-suppress unusedFunction //Used in unit tests
size_t ProtocolPayloadV2SizeBits() {
return PayloadHeaderBits;
}
+#endif // BUILD_TESTS
} // namespace protocol_handler
diff --git a/src/components/protocol_handler/src/service_status_update_handler.cc b/src/components/protocol_handler/src/service_status_update_handler.cc
index 7b2c67ea23..71d11bcf5b 100644
--- a/src/components/protocol_handler/src/service_status_update_handler.cc
+++ b/src/components/protocol_handler/src/service_status_update_handler.cc
@@ -3,7 +3,7 @@
namespace protocol_handler {
-CREATE_LOGGERPTR_GLOBAL(logger_, "ServiceStatusUpdateHandler")
+SDL_CREATE_LOG_VARIABLE("ServiceStatusUpdateHandler")
hmi_apis::Common_ServiceType::eType GetHMIServiceType(
protocol_handler::ServiceType service_type) {
@@ -30,7 +30,7 @@ void ServiceStatusUpdateHandler::OnServiceUpdate(
using namespace hmi_apis;
typedef utils::Optional<Common_ServiceStatusUpdateReason::eType>
UpdateReasonOptional;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto hmi_service_type = GetHMIServiceType(service_type);
switch (service_status) {
@@ -107,9 +107,8 @@ void ServiceStatusUpdateHandler::OnServiceUpdate(
update_reason);
}
default: {
- LOG4CXX_WARN(logger_,
- "Received unknown ServiceStatus: "
- << static_cast<int32_t>(service_status));
+ SDL_LOG_WARN("Received unknown ServiceStatus: "
+ << static_cast<int32_t>(service_status));
return;
}
}
diff --git a/src/components/protocol_handler/test/incoming_data_handler_test.cc b/src/components/protocol_handler/test/incoming_data_handler_test.cc
index a187fe6cb5..1476db0dd9 100644
--- a/src/components/protocol_handler/test/incoming_data_handler_test.cc
+++ b/src/components/protocol_handler/test/incoming_data_handler_test.cc
@@ -55,7 +55,14 @@ class IncomingDataHandlerTest : public ::testing::Test {
some_data_size = 4;
some_data2_size = 512;
some_data = new uint8_t[some_data_size];
+ for (size_t i = 0; i < some_data_size; i++) {
+ // put some data in the buffer
+ some_data[i] = i % 256;
+ }
some_data2 = new uint8_t[some_data2_size];
+ for (size_t i = 0; i < some_data2_size; i++) {
+ some_data2[i] = i % 256;
+ }
protov1_message_id = 0x0;
some_message_id = 0xABCDEF0;
some_session_id = 0xFEDCBA0;
@@ -70,7 +77,7 @@ class IncomingDataHandlerTest : public ::testing::Test {
const uint32_t data_size) {
actual_frames =
data_handler.ProcessData(RawMessage(uid, 0, data, data_size, false),
- &result_code,
+ result_code,
&malformed_occurs);
}
@@ -121,7 +128,7 @@ TEST_F(IncomingDataHandlerTest, DataForUnknownConnection) {
size_t malformed_count = 0;
actual_frames =
data_handler.ProcessData(RawMessage(uid_unknown, 0, NULL, 0, false),
- &result_code,
+ result_code,
&malformed_count);
EXPECT_EQ(RESULT_FAIL, result_code);
EXPECT_EQ(malformed_count, 0u);
@@ -130,7 +137,7 @@ TEST_F(IncomingDataHandlerTest, DataForUnknownConnection) {
AppendPacketToTMData(ProtocolPacket());
actual_frames = data_handler.ProcessData(
RawMessage(uid_unknown, 0, tm_data.data(), tm_data.size(), false),
- &result_code,
+ result_code,
&malformed_count);
EXPECT_EQ(RESULT_FAIL, result_code);
EXPECT_EQ(malformed_count, 0u);
@@ -254,7 +261,6 @@ TEST_F(IncomingDataHandlerTest, MixedPayloadData_TwoConnections) {
for (FrameList::const_iterator it = actual_frames.begin();
it != actual_frames.end();
++it, ++it_exp) {
- // TODO(EZamakhov): investigate valgrind warning (unitialized value)
EXPECT_EQ(**it, **it_exp)
<< "Element number " << std::distance(mobile_packets.begin(), it_exp);
}
@@ -1040,6 +1046,24 @@ TEST_F(
EXPECT_EQ(1u, actual_frames.size());
}
+TEST_F(IncomingDataHandlerTest,
+ ProcessData_ProtocolVersionBiggerThanSupported_MalformedOccurs) {
+ header_validator.set_max_protocol_version_supported(PROTOCOL_VERSION_2);
+ const ProtocolPacket packet(uid1,
+ PROTOCOL_VERSION_3,
+ PROTECTION_OFF,
+ FRAME_TYPE_CONTROL,
+ kControl,
+ FRAME_DATA_SINGLE,
+ some_session_id,
+ 0u,
+ some_message_id,
+ NULL);
+ const auto raw_message_ptr = packet.serializePacket();
+ data_handler.ProcessData(*raw_message_ptr, result_code, &malformed_occurs);
+ EXPECT_EQ(RESULT_CODE::RESULT_MALFORMED_OCCURS, result_code);
+}
+
// TODO(EZamakhov): add tests for handling 2+ connection data
} // namespace protocol_handler_test
diff --git a/src/components/protocol_handler/test/protocol_handler_tm_test.cc b/src/components/protocol_handler/test/protocol_handler_tm_test.cc
index 07b562f3a2..41c16817b5 100644
--- a/src/components/protocol_handler/test/protocol_handler_tm_test.cc
+++ b/src/components/protocol_handler/test/protocol_handler_tm_test.cc
@@ -146,8 +146,8 @@ typedef std::shared_ptr<
MockServiceStatusUpdateHandlerListenerPtr;
// custom action to call a member function with 6 arguments
-ACTION_P4(InvokeMemberFuncWithArg2, ptr, memberFunc, a, b) {
- (ptr->*memberFunc)(a, b);
+ACTION_P5(InvokeMemberFuncWithArg3, ptr, memberFunc, a, b, c) {
+ (ptr->*memberFunc)(a, b, c);
}
namespace {
@@ -179,6 +179,8 @@ class ProtocolHandlerImplTest : public ::testing::Test {
.WillByDefault(Return(malformd_max_messages));
ON_CALL(protocol_handler_settings_mock, multiframe_waiting_timeout())
.WillByDefault(Return(multiframe_waiting_timeout));
+ ON_CALL(protocol_handler_settings_mock, max_supported_protocol_version())
+ .WillByDefault(Return(PROTOCOL_VERSION_MAX));
#ifdef ENABLE_SECURITY
ON_CALL(protocol_handler_settings_mock, force_protected_service())
.WillByDefault(ReturnRefOfCopy(force_protected_services));
@@ -309,10 +311,11 @@ class ProtocolHandlerImplTest : public ::testing::Test {
// Return sessions start success
WillOnce(DoAll(
NotifyTestAsyncWaiter(waiter),
- InvokeMemberFuncWithArg2(protocol_handler_impl.get(),
+ InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
context,
- ByRef(empty_rejected_param_))));
+ ByRef(empty_rejected_param_),
+ std::string())));
times++;
// Expect send Ack with PROTECTION_OFF (on no Security Manager)
@@ -518,7 +521,7 @@ TEST_F(ProtocolHandlerImplTest,
WillRepeatedly(
DoAll(NotifyTestAsyncWaiter(&waiter),
SaveArg<2>(&service_type),
- InvokeMemberFuncWithArg2(protocol_handler_impl.get(),
+ InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id,
NEW_SESSION_ID,
@@ -526,10 +529,16 @@ TEST_F(ProtocolHandlerImplTest,
service_type,
HASH_ID_WRONG,
PROTECTION_OFF),
- ByRef(empty_rejected_param_))));
+ ByRef(empty_rejected_param_),
+ std::string())));
times += call_times;
// Expect send NAck
+ EXPECT_CALL(session_observer_mock,
+ ProtocolVersionUsed(_, _, An<utils::SemanticVersion&>()))
+ .Times(call_times)
+ .WillRepeatedly(Return(true));
+
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(ControlMessage(FRAME_DATA_START_SERVICE_NACK,
PROTECTION_OFF)))
@@ -604,7 +613,7 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Protected_SessionObserverReject) {
WillRepeatedly(DoAll(
NotifyTestAsyncWaiter(&waiter),
SaveArg<2>(&service_type),
- InvokeMemberFuncWithArg2(protocol_handler_impl.get(),
+ InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id,
NEW_SESSION_ID,
@@ -612,10 +621,16 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Protected_SessionObserverReject) {
service_type,
HASH_ID_WRONG,
callback_protection_flag),
- ByRef(empty_rejected_param_))));
+ ByRef(empty_rejected_param_),
+ std::string())));
times += call_times;
// Expect send NAck with encryption OFF
+ EXPECT_CALL(session_observer_mock,
+ ProtocolVersionUsed(_, _, An<utils::SemanticVersion&>()))
+ .Times(call_times)
+ .WillRepeatedly(Return(true));
+
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(ControlMessage(FRAME_DATA_START_SERVICE_NACK,
PROTECTION_OFF)))
@@ -674,7 +689,7 @@ TEST_F(ProtocolHandlerImplTest,
// Return sessions start success
WillOnce(
DoAll(NotifyTestAsyncWaiter(&waiter),
- InvokeMemberFuncWithArg2(protocol_handler_impl.get(),
+ InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id,
NEW_SESSION_ID,
@@ -682,7 +697,8 @@ TEST_F(ProtocolHandlerImplTest,
start_service,
HASH_ID_WRONG,
PROTECTION_OFF),
- ByRef(empty_rejected_param_))));
+ ByRef(empty_rejected_param_),
+ std::string())));
times++;
SetProtocolVersion2();
@@ -835,6 +851,9 @@ TEST_F(ProtocolHandlerImplTest,
rejected_param_list.push_back(protocol_handler::strings::video_codec);
EXPECT_CALL(session_observer_mock,
+ ProtocolVersionUsed(_, _, An<utils::SemanticVersion&>()))
+ .WillOnce(Return(true));
+ EXPECT_CALL(session_observer_mock,
OnSessionStartedCallback(connection_id2,
session_id2,
start_service,
@@ -842,7 +861,7 @@ TEST_F(ProtocolHandlerImplTest,
An<const BsonObject*>()))
.WillOnce(DoAll(
NotifyTestAsyncWaiter(&waiter),
- InvokeMemberFuncWithArg2(protocol_handler_impl.get(),
+ InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id2,
session_id2,
@@ -850,8 +869,9 @@ TEST_F(ProtocolHandlerImplTest,
start_service,
HASH_ID_WRONG,
PROTECTION_OFF),
- ByRef(rejected_param_list)),
- InvokeMemberFuncWithArg2(protocol_handler_impl.get(),
+ ByRef(rejected_param_list),
+ std::string()),
+ InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id1,
session_id1,
@@ -859,7 +879,8 @@ TEST_F(ProtocolHandlerImplTest,
start_service,
HASH_ID_WRONG,
PROTECTION_OFF),
- ByRef(empty_rejected_param_))));
+ ByRef(empty_rejected_param_),
+ std::string())));
times++;
BsonObject bson_ack_params;
@@ -961,6 +982,9 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Audio_RejectByTransportType) {
.WillOnce(ReturnRef(video_service_transports));
// Expect send Ack
+ EXPECT_CALL(session_observer_mock,
+ ProtocolVersionUsed(_, _, An<utils::SemanticVersion&>()))
+ .WillRepeatedly(Return(true));
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(ControlMessage(FRAME_DATA_START_SERVICE_NACK,
PROTECTION_OFF)))
@@ -1000,6 +1024,10 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Video_RejectByTransportType) {
.WillOnce(ReturnRef(video_service_transports));
// Expect send Ack
+ EXPECT_CALL(session_observer_mock,
+ ProtocolVersionUsed(_, _, An<utils::SemanticVersion&>()))
+ .WillRepeatedly(Return(true));
+
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(ControlMessage(FRAME_DATA_START_SERVICE_NACK,
PROTECTION_OFF)))
@@ -1026,8 +1054,11 @@ TEST_F(ProtocolHandlerImplTest, EndSession_SessionObserverReject) {
// Expect ConnectionHandler check
EXPECT_CALL(session_observer_mock,
- OnSessionEndedCallback(
- connection_id, session_id, An<uint32_t*>(), service))
+ OnSessionEndedCallback(connection_id,
+ session_id,
+ An<uint32_t*>(),
+ service,
+ An<std::string*>()))
.
// reject session start
WillOnce(
@@ -1036,6 +1067,10 @@ TEST_F(ProtocolHandlerImplTest, EndSession_SessionObserverReject) {
SetProtocolVersion2();
// Expect send NAck
+ EXPECT_CALL(session_observer_mock,
+ ProtocolVersionUsed(_, _, An<utils::SemanticVersion&>()))
+ .WillRepeatedly(Return(true));
+
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(
ControlMessage(FRAME_DATA_END_SERVICE_NACK, PROTECTION_OFF)))
@@ -1060,8 +1095,11 @@ TEST_F(ProtocolHandlerImplTest, EndSession_Success) {
// Expect ConnectionHandler check
EXPECT_CALL(session_observer_mock,
- OnSessionEndedCallback(
- connection_id, session_id, An<uint32_t*>(), service))
+ OnSessionEndedCallback(connection_id,
+ session_id,
+ An<uint32_t*>(),
+ service,
+ An<std::string*>()))
.
// return sessions start success
WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(connection_key)));
@@ -1118,7 +1156,7 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionProtocoloV1) {
// Return sessions start success
WillOnce(
DoAll(NotifyTestAsyncWaiter(waiter),
- InvokeMemberFuncWithArg2(protocol_handler_impl.get(),
+ InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id,
NEW_SESSION_ID,
@@ -1126,7 +1164,8 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionProtocoloV1) {
start_service,
HASH_ID_WRONG,
PROTECTION_OFF),
- ByRef(empty_rejected_param_))));
+ ByRef(empty_rejected_param_),
+ std::string())));
times++;
SetProtocolVersion2();
@@ -1189,7 +1228,7 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionUnprotected) {
// Return sessions start success
WillOnce(
DoAll(NotifyTestAsyncWaiter(&waiter),
- InvokeMemberFuncWithArg2(protocol_handler_impl.get(),
+ InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id,
NEW_SESSION_ID,
@@ -1197,7 +1236,8 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionUnprotected) {
start_service,
HASH_ID_WRONG,
PROTECTION_OFF),
- ByRef(empty_rejected_param_))));
+ ByRef(empty_rejected_param_),
+ std::string())));
times++;
SetProtocolVersion2();
@@ -1259,10 +1299,11 @@ TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionProtected_Fail) {
// Return sessions start success
WillOnce(
DoAll(NotifyTestAsyncWaiter(&waiter),
- InvokeMemberFuncWithArg2(protocol_handler_impl.get(),
+ InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
context,
- ByRef(empty_rejected_param_))));
+ ByRef(empty_rejected_param_),
+ std::string())));
times++;
SetProtocolVersion2();
@@ -1327,7 +1368,7 @@ TEST_F(ProtocolHandlerImplTest,
// Return sessions start success
WillOnce(
DoAll(NotifyTestAsyncWaiter(&waiter),
- InvokeMemberFuncWithArg2(protocol_handler_impl.get(),
+ InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id,
NEW_SESSION_ID,
@@ -1335,7 +1376,8 @@ TEST_F(ProtocolHandlerImplTest,
start_service,
HASH_ID_WRONG,
PROTECTION_ON),
- ByRef(empty_rejected_param_))));
+ ByRef(empty_rejected_param_),
+ std::string())));
times++;
SetProtocolVersion2();
@@ -1418,10 +1460,11 @@ TEST_F(ProtocolHandlerImplTest,
// Return sessions start success
WillOnce(
DoAll(NotifyTestAsyncWaiter(&waiter),
- InvokeMemberFuncWithArg2(protocol_handler_impl.get(),
+ InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
context,
- ByRef(empty_rejected_param_))));
+ ByRef(empty_rejected_param_),
+ std::string())));
times++;
std::vector<int> services;
@@ -1514,7 +1557,7 @@ TEST_F(ProtocolHandlerImplTest,
// Return sessions start success
WillOnce(
DoAll(NotifyTestAsyncWaiter(&waiter),
- InvokeMemberFuncWithArg2(protocol_handler_impl.get(),
+ InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id,
NEW_SESSION_ID,
@@ -1522,7 +1565,8 @@ TEST_F(ProtocolHandlerImplTest,
start_service,
HASH_ID_WRONG,
PROTECTION_ON),
- ByRef(empty_rejected_param_))));
+ ByRef(empty_rejected_param_),
+ std::string())));
times++;
// call new SSLContext creation
@@ -1627,7 +1671,7 @@ TEST_F(
// Return sessions start success
WillOnce(
DoAll(NotifyTestAsyncWaiter(&waiter),
- InvokeMemberFuncWithArg2(protocol_handler_impl.get(),
+ InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id,
NEW_SESSION_ID,
@@ -1635,7 +1679,8 @@ TEST_F(
start_service,
HASH_ID_WRONG,
PROTECTION_ON),
- ByRef(empty_rejected_param_))));
+ ByRef(empty_rejected_param_),
+ std::string())));
times++;
// call new SSLContext creation
@@ -1738,7 +1783,7 @@ TEST_F(ProtocolHandlerImplTest,
// Return sessions start success
WillOnce(
DoAll(NotifyTestAsyncWaiter(&waiter),
- InvokeMemberFuncWithArg2(protocol_handler_impl.get(),
+ InvokeMemberFuncWithArg3(protocol_handler_impl.get(),
&ProtocolHandler::NotifySessionStarted,
GetSessionContext(connection_id,
NEW_SESSION_ID,
@@ -1746,7 +1791,8 @@ TEST_F(ProtocolHandlerImplTest,
start_service,
HASH_ID_WRONG,
PROTECTION_ON),
- ByRef(empty_rejected_param_))));
+ ByRef(empty_rejected_param_),
+ std::string())));
times++;
// call new SSLContext creation
@@ -2119,7 +2165,7 @@ TEST_F(ProtocolHandlerImplTest,
// A TransportUpdateEvent is also issued after Start Service ACK. We don't
// check it in this test case.
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, An<uint8_t&>()))
.WillRepeatedly(Return(false));
VerifySecondaryTransportParamsInStartSessionAck(
@@ -2171,7 +2217,7 @@ TEST_F(ProtocolHandlerImplTest,
std::vector<int32_t> expected_video_service_transports;
expected_video_service_transports.push_back(1);
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, An<uint8_t&>()))
.WillRepeatedly(Return(false));
VerifySecondaryTransportParamsInStartSessionAck(
@@ -2226,7 +2272,7 @@ TEST_F(ProtocolHandlerImplTest,
std::vector<int32_t> expected_video_service_transports;
expected_video_service_transports.push_back(2);
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, An<uint8_t&>()))
.WillRepeatedly(Return(false));
VerifySecondaryTransportParamsInStartSessionAck(
@@ -2280,7 +2326,7 @@ TEST_F(
std::vector<int32_t> expected_video_service_transports;
expected_video_service_transports.push_back(2);
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, An<uint8_t&>()))
.WillRepeatedly(Return(false));
VerifySecondaryTransportParamsInStartSessionAck(
@@ -2337,7 +2383,7 @@ TEST_F(ProtocolHandlerImplTest,
SetSecondaryTransportID(_, kDisabledSecondary))
.WillOnce(Return(dummy_st));
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, An<uint8_t&>()))
.WillRepeatedly(Return(false));
VerifySecondaryTransportParamsInStartSessionAck(
@@ -2381,7 +2427,7 @@ TEST_F(ProtocolHandlerImplTest,
expected_video_service_transports.push_back(1);
expected_video_service_transports.push_back(2);
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, An<uint8_t&>()))
.WillRepeatedly(Return(false));
VerifySecondaryTransportParamsInStartSessionAck(
@@ -2422,7 +2468,7 @@ TEST_F(
SetSecondaryTransportID(_, kDisabledSecondary))
.WillOnce(Return(dummy_st));
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, An<uint8_t&>()))
.WillRepeatedly(Return(false));
VerifySecondaryTransportParamsInStartSessionAck(
@@ -2524,7 +2570,7 @@ TEST_F(ProtocolHandlerImplTest,
// TransportEventUpdate frame. Enable ProtocolVersionUsed() call and verify
// that transport_manager_mock will NOT receive another SendMessageToDevice()
// call.
- ON_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ ON_CALL(session_observer_mock, ProtocolVersionUsed(_, _, An<uint8_t&>()))
.WillByDefault(Return(true));
#ifdef ENABLE_SECURITY
@@ -2583,7 +2629,7 @@ TEST_F(ProtocolHandlerImplTest, StartSessionAck_PrimaryTransportUSBHostMode) {
// A TransportUpdateEvent is also issued after Start Service ACK. We don't
// check it in this test case.
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, An<uint8_t&>()))
.WillRepeatedly(Return(false));
VerifySecondaryTransportParamsInStartSessionAck(
@@ -2605,7 +2651,7 @@ TEST_F(ProtocolHandlerImplTest, StartSessionAck_CloudAppAuthTokenAvailable) {
// A TransportUpdateEvent is also issued after Start Service ACK. We don't
// check it in this test case.
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, An<uint8_t&>()))
.WillRepeatedly(Return(false));
VerifyCloudAppParamsInStartSessionAck(policy_id, auth_token);
@@ -2686,7 +2732,7 @@ TEST_F(ProtocolHandlerImplTest,
.WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
times++;
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, An<uint8_t&>()))
.WillRepeatedly(
DoAll(SetArgReferee<2>(PROTOCOL_VERSION_5), Return(true)));
@@ -2807,7 +2853,7 @@ TEST_F(ProtocolHandlerImplTest,
.WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
times++;
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, An<uint8_t&>()))
.WillRepeatedly(
DoAll(SetArgReferee<2>(PROTOCOL_VERSION_5), Return(true)));
@@ -2888,7 +2934,7 @@ TEST_F(ProtocolHandlerImplTest,
.WillOnce(Return(DataAccessor<SessionConnectionMap>(
session_connection_map_, session_connection_map_lock_ptr_)));
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, An<uint8_t&>()))
.WillRepeatedly(
DoAll(SetArgReferee<2>(PROTOCOL_VERSION_5), Return(true)));
@@ -2959,7 +3005,7 @@ TEST_F(ProtocolHandlerImplTest,
.WillOnce(Return(DataAccessor<SessionConnectionMap>(
session_connection_map_, session_connection_map_lock_ptr_)));
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, _))
+ EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(_, _, An<uint8_t&>()))
.WillRepeatedly(
DoAll(SetArgReferee<2>(PROTOCOL_VERSION_5), Return(true)));
@@ -3009,7 +3055,7 @@ TEST_F(ProtocolHandlerImplTest, RegisterSecondaryTransport_SUCCESS) {
transport_manager::ConnectionUID primary_connection_id = 123;
EXPECT_CALL(session_observer_mock,
- ProtocolVersionUsed(primary_connection_id, _, _))
+ ProtocolVersionUsed(primary_connection_id, _, An<uint8_t&>()))
.WillRepeatedly(
DoAll(SetArgReferee<2>(PROTOCOL_VERSION_5), Return(true)));
@@ -3044,7 +3090,7 @@ TEST_F(ProtocolHandlerImplTest, RegisterSecondaryTransport_FAILURE) {
transport_manager::ConnectionUID primary_connection_id = 123;
EXPECT_CALL(session_observer_mock,
- ProtocolVersionUsed(primary_connection_id, _, _))
+ ProtocolVersionUsed(primary_connection_id, _, An<uint8_t&>()))
.WillRepeatedly(
DoAll(SetArgReferee<2>(PROTOCOL_VERSION_5), Return(true)));
@@ -3504,11 +3550,61 @@ TEST_F(ProtocolHandlerImplTest, MalformedLimitVerification_NullCount) {
EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
+TEST_F(ProtocolHandlerImplTest, OnFinalMessageCallback) {
+ const auto protection = false;
+ const auto is_final_message = true;
+ const uint32_t total_data_size = 1;
+ UCharDataVector data(total_data_size);
+
+ ProtocolFramePtr ptr(new protocol_handler::ProtocolPacket(connection_id,
+ PROTOCOL_VERSION_3,
+ protection,
+ FRAME_TYPE_SINGLE,
+ kControl,
+ FRAME_DATA_SINGLE,
+ session_id,
+ total_data_size,
+ message_id,
+ &data[0]));
+
+ using RawFordMessageToMobile = protocol_handler::impl::RawFordMessageToMobile;
+ using Handler = protocol_handler::impl::ToMobileQueue::Handler;
+
+ auto message =
+ std::make_shared<RawFordMessageToMobile>(ptr, is_final_message);
+ auto raw_message = ptr->serializePacket();
+
+ auto handler = std::static_pointer_cast<Handler>(protocol_handler_impl);
+ auto transport_manager_listener =
+ std::static_pointer_cast<TransportManagerListener>(protocol_handler_impl);
+
+ EXPECT_CALL(session_observer_mock,
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
+ .WillRepeatedly(Return(false));
+
+ EXPECT_CALL(session_observer_mock,
+ PairFromKey(raw_message->connection_key(), _, _))
+ .WillRepeatedly(
+ DoAll(SetArgPointee<1>(connection_id), SetArgPointee<2>(session_id)));
+
+ EXPECT_CALL(transport_manager_mock, SendMessageToDevice(_))
+ .WillOnce(Return(E_SUCCESS));
+
+ EXPECT_CALL(session_observer_mock, OnFinalMessageCallback(connection_id));
+ EXPECT_CALL(transport_manager_mock, Disconnect(connection_id));
+
+ handler->Handle(*message);
+ // Put the message to list of connections ready to close
+ transport_manager_listener->OnTMMessageSend(raw_message);
+ // Processing the list of connections ready to close
+ transport_manager_listener->OnTMMessageSend(raw_message);
+}
+
TEST_F(ProtocolHandlerImplTest,
SendEndServicePrivate_NoConnection_MessageNotSent) {
// Expect check connection with ProtocolVersionUsed
EXPECT_CALL(session_observer_mock,
- ProtocolVersionUsed(connection_id, session_id, _))
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.WillOnce(Return(false));
// Expect not send End Service
EXPECT_CALL(transport_manager_mock, SendMessageToDevice(_)).Times(0);
@@ -3527,7 +3623,7 @@ TEST_F(ProtocolHandlerImplTest,
// Expect check connection with ProtocolVersionUsed
EXPECT_CALL(session_observer_mock,
- ProtocolVersionUsed(connection_id, session_id, _))
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.WillOnce(Return(true));
// Expect send End Service
EXPECT_CALL(
@@ -3551,8 +3647,8 @@ TEST_F(ProtocolHandlerImplTest,
// Expect check connection with ProtocolVersionUsed
EXPECT_CALL(session_observer_mock,
- ProtocolVersionUsed(connection_id, session_id, _))
- .WillOnce(Return(true));
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
+ .WillOnce(DoAll(SetArgReferee<2>(PROTOCOL_VERSION_1), Return(true)));
// Expect send End Service
EXPECT_CALL(transport_manager_mock,
SendMessageToDevice(ExpectedMessage(FRAME_TYPE_CONTROL,
@@ -3572,7 +3668,7 @@ TEST_F(ProtocolHandlerImplTest,
TEST_F(ProtocolHandlerImplTest, SendHeartBeat_NoConnection_NotSent) {
// Expect check connection with ProtocolVersionUsed
EXPECT_CALL(session_observer_mock,
- ProtocolVersionUsed(connection_id, session_id, _))
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.WillOnce(Return(false));
// Expect not send HeartBeat
EXPECT_CALL(transport_manager_mock, SendMessageToDevice(_)).Times(0);
@@ -3590,8 +3686,8 @@ TEST_F(ProtocolHandlerImplTest, SendHeartBeat_Successful) {
// Expect check connection with ProtocolVersionUsed
EXPECT_CALL(session_observer_mock,
- ProtocolVersionUsed(connection_id, session_id, _))
- .WillOnce(Return(true));
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
+ .WillOnce(DoAll(SetArgReferee<2>(PROTOCOL_VERSION_3), Return(true)));
// Expect send HeartBeat
EXPECT_CALL(
transport_manager_mock,
@@ -3615,7 +3711,8 @@ TEST_F(ProtocolHandlerImplTest, SendHeartBeatAck_Successful) {
// Expect double check connection and protocol version with
// ProtocolVersionUsed
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(connection_id, _, _))
+ EXPECT_CALL(session_observer_mock,
+ ProtocolVersionUsed(connection_id, _, An<uint8_t&>()))
.WillRepeatedly(
DoAll(SetArgReferee<2>(PROTOCOL_VERSION_3), Return(true)));
// Expect send HeartBeatAck
@@ -3644,7 +3741,8 @@ TEST_F(ProtocolHandlerImplTest,
// Expect two checks of connection and protocol version with
// ProtocolVersionUsed
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(connection_id, _, _))
+ EXPECT_CALL(session_observer_mock,
+ ProtocolVersionUsed(connection_id, _, An<uint8_t&>()))
.Times(2)
.WillRepeatedly(
DoAll(SetArgReferee<2>(PROTOCOL_VERSION_1), Return(true)));
@@ -3821,7 +3919,8 @@ TEST_F(ProtocolHandlerImplTest, SendServiceDataAck_PreVersion5) {
EXPECT_CALL(session_observer_mock, PairFromKey(connection_key, _, _))
.WillOnce(
DoAll(SetArgPointee<1>(connection_id), SetArgPointee<2>(session_id)));
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(connection_id, _, _))
+ EXPECT_CALL(session_observer_mock,
+ ProtocolVersionUsed(connection_id, _, An<uint8_t&>()))
.WillRepeatedly(
DoAll(SetArgReferee<2>(PROTOCOL_VERSION_4), Return(true)));
@@ -3847,7 +3946,8 @@ TEST_F(ProtocolHandlerImplTest, SendServiceDataAck_AfterVersion5) {
EXPECT_CALL(session_observer_mock, PairFromKey(connection_key, _, _))
.WillOnce(
DoAll(SetArgPointee<1>(connection_id), SetArgPointee<2>(session_id)));
- EXPECT_CALL(session_observer_mock, ProtocolVersionUsed(connection_id, _, _))
+ EXPECT_CALL(session_observer_mock,
+ ProtocolVersionUsed(connection_id, _, An<uint8_t&>()))
.WillRepeatedly(
DoAll(SetArgReferee<2>(PROTOCOL_VERSION_5), Return(true)));
@@ -3864,6 +3964,256 @@ TEST_F(ProtocolHandlerImplTest, SendServiceDataAck_AfterVersion5) {
EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
+/*
+ * ProtocolHandler shall send StartServiceNAK with a reason param when starting
+ * a video/audio service if the service type is disallowed by the settings
+ */
+TEST_F(ProtocolHandlerImplTest, StartSession_NACKReason_DisallowedBySettings) {
+ const ServiceType service_type = kMobileNav;
+ const utils::SemanticVersion min_reason_param_version(5, 3, 0);
+
+#ifdef ENABLE_SECURITY
+ AddSecurityManager();
+
+ EXPECT_CALL(session_observer_mock,
+ GetSSLContext(connection_key, service_type))
+ .WillOnce(ReturnNull());
+#endif // ENABLE_SECURITY
+
+ AddConnection();
+
+ // Expect verification of allowed transport
+ EXPECT_CALL(session_observer_mock,
+ TransportTypeProfileStringFromConnHandle(connection_id))
+ .WillOnce(Return("TCP_WIFI"));
+
+ std::vector<std::string> allowed_transports{"AOA_USB"};
+ EXPECT_CALL(protocol_handler_settings_mock, video_service_transports())
+ .WillOnce(ReturnRef(allowed_transports));
+ EXPECT_CALL(protocol_handler_settings_mock, audio_service_transports())
+ .WillOnce(ReturnRef(allowed_transports));
+
+ // Expect check connection with ProtocolVersionUsed
+ EXPECT_CALL(session_observer_mock,
+ ProtocolVersionUsed(
+ connection_id, NEW_SESSION_ID, An<utils::SemanticVersion&>()))
+ .WillOnce(
+ DoAll(SetArgReferee<2>(min_reason_param_version), Return(true)));
+
+ BsonObject bson_nack_params;
+ bson_object_initialize_default(&bson_nack_params);
+ // NAK reason param
+ std::string reason = "Service type: " + std::to_string(service_type) +
+ " disallowed by settings.";
+ bson_object_put_string(&bson_nack_params,
+ protocol_handler::strings::reason,
+ const_cast<char*>(reason.c_str()));
+ std::vector<uint8_t> nack_params =
+ CreateVectorFromBsonObject(&bson_nack_params);
+ bson_object_deinitialize(&bson_nack_params);
+
+ EXPECT_CALL(transport_manager_mock,
+ SendMessageToDevice(ControlMessage(FRAME_DATA_START_SERVICE_NACK,
+ PROTECTION_OFF,
+ connection_id,
+ Eq(nack_params))))
+ .WillOnce(Return(E_SUCCESS));
+
+ SendControlMessage(PROTECTION_OFF,
+ service_type,
+ NEW_SESSION_ID,
+ FRAME_DATA_START_SERVICE,
+ PROTOCOL_VERSION_5);
+
+ usleep(kAddSessionWaitTimeMs * kMicrosecondsInMillisecond);
+}
+
+/*
+ * ProtocolHandler shall send StartServiceNAK with a reason param on
+ * session_observer rejection Check protection flag OFF for all services from
+ * kControl to kBulk
+ */
+TEST_F(ProtocolHandlerImplTest, StartSession_NACKReason_SessionObserverReject) {
+ const std::vector<ServiceType> service_types{
+ kControl, kRpc, kAudio, kMobileNav, kBulk};
+
+ const int call_times = service_types.size();
+ const utils::SemanticVersion min_reason_param_version(5, 3, 0);
+ const std::string err_reason = "Unable to create new session";
+ AddConnection();
+
+#ifdef ENABLE_SECURITY
+ AddSecurityManager();
+
+ EXPECT_CALL(session_observer_mock,
+ GetSSLContext(connection_key,
+ AnyOf(kControl, kRpc, kAudio, kMobileNav, kBulk)))
+ .WillRepeatedly(ReturnNull());
+#endif // ENABLE_SECURITY
+
+ TestAsyncWaiter waiter;
+ uint32_t times = 0;
+ ServiceType service_type;
+ // Expect verification of allowed transport
+ EXPECT_CALL(session_observer_mock,
+ TransportTypeProfileStringFromConnHandle(connection_id))
+ .Times(call_times)
+ .WillRepeatedly(Return("TCP_WIFI"));
+
+ std::vector<std::string> allowed_transports{"TCP_WIFI"};
+ EXPECT_CALL(protocol_handler_settings_mock, audio_service_transports())
+ .Times(call_times)
+ .WillRepeatedly(ReturnRef(allowed_transports));
+ EXPECT_CALL(protocol_handler_settings_mock, video_service_transports())
+ .Times(call_times)
+ .WillRepeatedly(ReturnRef(allowed_transports));
+
+ // Expect ConnectionHandler check
+ EXPECT_CALL(
+ session_observer_mock,
+ OnSessionStartedCallback(connection_id,
+ NEW_SESSION_ID,
+ AnyOf(kControl, kRpc, kAudio, kMobileNav, kBulk),
+ PROTECTION_OFF,
+ An<const BsonObject*>()))
+ .Times(call_times)
+ .
+ // Return sessions start rejection
+ WillRepeatedly(
+ DoAll(NotifyTestAsyncWaiter(&waiter),
+ SaveArg<2>(&service_type),
+ InvokeMemberFuncWithArg3(
+ protocol_handler_impl.get(),
+ &protocol_handler::ProtocolHandler::NotifySessionStarted,
+ GetSessionContext(connection_id,
+ NEW_SESSION_ID,
+ SESSION_START_REJECT,
+ service_type,
+ protocol_handler::HASH_ID_WRONG,
+ PROTECTION_OFF),
+ ByRef(empty_rejected_param_),
+ err_reason)));
+ times += call_times;
+
+ // Expect send NAck
+ EXPECT_CALL(session_observer_mock,
+ ProtocolVersionUsed(_, _, An<utils::SemanticVersion&>()))
+ .Times(call_times)
+ .WillRepeatedly(
+ DoAll(SetArgReferee<2>(min_reason_param_version), Return(true)));
+
+ BsonObject bson_nack_params;
+ bson_object_initialize_default(&bson_nack_params);
+ // NAK reason param
+ bson_object_put_string(&bson_nack_params,
+ protocol_handler::strings::reason,
+ const_cast<char*>(err_reason.c_str()));
+ std::vector<uint8_t> nack_params =
+ CreateVectorFromBsonObject(&bson_nack_params);
+ bson_object_deinitialize(&bson_nack_params);
+
+ EXPECT_CALL(transport_manager_mock,
+ SendMessageToDevice(ControlMessage(FRAME_DATA_START_SERVICE_NACK,
+ PROTECTION_OFF,
+ connection_id,
+ Eq(nack_params))))
+ .Times(call_times)
+
+ .WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter), Return(E_SUCCESS)));
+ times += call_times;
+
+ for (const ServiceType& service_type : service_types) {
+ SendControlMessage(PROTECTION_OFF,
+ service_type,
+ NEW_SESSION_ID,
+ FRAME_DATA_START_SERVICE,
+ PROTOCOL_VERSION_5);
+ }
+
+ EXPECT_TRUE(waiter.WaitFor(times, kAsyncExpectationsTimeout));
+}
+
+/*
+ * ProtocolHandler shall send EndServiceNAK with a reason param if
+ * OnSessionEndedCallback returns an 0
+ */
+TEST_F(ProtocolHandlerImplTest,
+ EndSession_NACKReason_OnSessionEndedCallbackFailed) {
+ const utils::SemanticVersion min_reason_param_version(5, 3, 0);
+ std::string err_reason =
+ "Wrong hash_id for session " + std::to_string(session_id);
+ std::shared_ptr<TestAsyncWaiter> waiter = std::make_shared<TestAsyncWaiter>();
+ uint32_t times = 0;
+
+ AddSession(waiter, times);
+ const ServiceType service_type = kRpc;
+
+#ifdef ENABLE_SECURITY
+ AddSecurityManager();
+
+ EXPECT_CALL(session_observer_mock,
+ GetSSLContext(connection_key, service_type))
+ .WillOnce(ReturnNull());
+#endif // ENABLE_SECURITY
+
+ // Expect ConnectionHandler check
+ EXPECT_CALL(session_observer_mock,
+ OnSessionEndedCallback(connection_id,
+ session_id,
+ An<uint32_t*>(),
+ service_type,
+ An<std::string*>()))
+ .
+ // reject session start
+ WillOnce(DoAll(NotifyTestAsyncWaiter(waiter),
+ SetArgPointee<4>(err_reason),
+ Return(SESSION_START_REJECT)));
+ times++;
+
+ // Expect send NAck
+ EXPECT_CALL(session_observer_mock,
+ ProtocolVersionUsed(_, _, An<utils::SemanticVersion&>()))
+ .WillOnce(
+ DoAll(SetArgReferee<2>(min_reason_param_version), Return(true)));
+
+ std::vector<std::string> rejected_param_list;
+ rejected_param_list.push_back(protocol_handler::strings::hash_id);
+
+ BsonObject bson_nack_params;
+ bson_object_initialize_default(&bson_nack_params);
+ // Rejected params
+ BsonArray bson_arr;
+ bson_array_initialize(&bson_arr, 1);
+ bson_array_add_string(&bson_arr,
+ const_cast<char*>(protocol_handler::strings::hash_id));
+ bson_object_put_array(
+ &bson_nack_params, protocol_handler::strings::rejected_params, &bson_arr);
+ // NAK reason param
+ bson_object_put_string(&bson_nack_params,
+ protocol_handler::strings::reason,
+ const_cast<char*>(err_reason.c_str()));
+
+ std::vector<uint8_t> nack_params =
+ CreateVectorFromBsonObject(&bson_nack_params);
+ bson_object_deinitialize(&bson_nack_params);
+
+ EXPECT_CALL(transport_manager_mock,
+ SendMessageToDevice(ControlMessage(FRAME_DATA_END_SERVICE_NACK,
+ PROTECTION_OFF,
+ connection_id,
+ Eq(nack_params))))
+ .WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
+ times++;
+
+ SendControlMessage(PROTECTION_OFF,
+ service_type,
+ session_id,
+ FRAME_DATA_END_SERVICE,
+ PROTOCOL_VERSION_5);
+
+ EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
+}
+
} // namespace protocol_handler_test
} // namespace components
} // namespace test
diff --git a/src/components/protocol_handler/test/protocol_payload_test.cc b/src/components/protocol_handler/test/protocol_payload_test.cc
index e89e6c7395..84f6e2b2c5 100644
--- a/src/components/protocol_handler/test/protocol_payload_test.cc
+++ b/src/components/protocol_handler/test/protocol_payload_test.cc
@@ -242,8 +242,9 @@ TEST(ProtocolPayloadTest, ExtractProtocolWithJSONWithDataWithWrongPayloadSize) {
prot_payload_test.json = expect_output_json_string;
prot_payload_test.header.json_size = prot_payload_test.json.length();
- const size_t data_for_sending_size =
- PROTOCOL_HEADER_V2_SIZE + prot_payload_test.json.length();
+ const size_t data_for_sending_size = PROTOCOL_HEADER_V2_SIZE +
+ prot_payload_test.json.length() +
+ prot_payload_test.data.size();
uint8_t* data_for_sending = new uint8_t[data_for_sending_size];
prepare_data(data_for_sending, prot_payload_test);
diff --git a/src/components/resumption/src/last_state_impl.cc b/src/components/resumption/src/last_state_impl.cc
index 05c801d762..185535c50d 100644
--- a/src/components/resumption/src/last_state_impl.cc
+++ b/src/components/resumption/src/last_state_impl.cc
@@ -37,23 +37,23 @@
namespace resumption {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Resumption")
+SDL_CREATE_LOG_VARIABLE("Resumption")
LastStateImpl::LastStateImpl(const std::string& app_storage_folder,
const std::string& app_info_storage)
: app_storage_folder_(app_storage_folder)
, app_info_storage_(app_info_storage) {
LoadFromFileSystem();
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
LastStateImpl::~LastStateImpl() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SaveToFileSystem();
}
void LastStateImpl::SaveStateToFileSystem() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::string styled_string;
{
@@ -64,14 +64,13 @@ void LastStateImpl::SaveStateToFileSystem() {
const std::vector<uint8_t> char_vector_pdata(styled_string.begin(),
styled_string.end());
DCHECK(file_system::CreateDirectoryRecursively(app_storage_folder_));
- LOG4CXX_INFO(logger_,
- "LastState::SaveStateToFileSystem[DEPRECATED] "
- << app_info_storage_ << styled_string);
+ SDL_LOG_INFO("LastState::SaveStateToFileSystem[DEPRECATED] "
+ << app_info_storage_ << styled_string);
DCHECK(file_system::Write(app_info_storage_, char_vector_pdata));
}
void LastStateImpl::SaveToFileSystem() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::string styled_string;
{
@@ -82,9 +81,8 @@ void LastStateImpl::SaveToFileSystem() {
const std::vector<uint8_t> char_vector_pdata(styled_string.begin(),
styled_string.end());
DCHECK(file_system::CreateDirectoryRecursively(app_storage_folder_));
- LOG4CXX_INFO(
- logger_,
- "LastState::SaveToFileSystem " << app_info_storage_ << styled_string);
+ SDL_LOG_INFO("LastState::SaveToFileSystem " << app_info_storage_
+ << styled_string);
DCHECK(file_system::Write(app_info_storage_, char_vector_pdata));
}
@@ -94,17 +92,16 @@ void LastStateImpl::LoadFromFileSystem() {
utils::JsonReader reader;
if (result && reader.parse(buffer, &dictionary_)) {
- LOG4CXX_INFO(logger_,
- "Valid last state was found." << dictionary_.toStyledString());
+ SDL_LOG_INFO("Valid last state was found." << dictionary_.toStyledString());
return;
}
- LOG4CXX_WARN(logger_, "No valid last state was found.");
+ SDL_LOG_WARN("No valid last state was found.");
}
void LastStateImpl::RemoveFromFileSystem() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!file_system::DeleteFile(app_info_storage_)) {
- LOG4CXX_WARN(logger_, "Failed attempt to delete " << app_info_storage_);
+ SDL_LOG_WARN("Failed attempt to delete " << app_info_storage_);
}
}
diff --git a/src/components/resumption/src/last_state_wrapper_impl.cc b/src/components/resumption/src/last_state_wrapper_impl.cc
index 61b325f53b..54351395c3 100644
--- a/src/components/resumption/src/last_state_wrapper_impl.cc
+++ b/src/components/resumption/src/last_state_wrapper_impl.cc
@@ -34,7 +34,7 @@
namespace resumption {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Resumption")
+SDL_CREATE_LOG_VARIABLE("Resumption")
LastStateWrapperImpl::LastStateWrapperImpl(
std::shared_ptr<LastState> last_state)
@@ -42,7 +42,7 @@ LastStateWrapperImpl::LastStateWrapperImpl(
, lock_(std::make_shared<sync_primitives::Lock>()) {}
LastStateAccessor LastStateWrapperImpl::get_accessor() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return MutableDataAccessor<LastState>(*last_state_, lock_);
}
diff --git a/src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h b/src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h
index 80e11994f1..9d2fb81b49 100644
--- a/src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h
+++ b/src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h
@@ -94,7 +94,7 @@ inline const Json::Value* ValueMember(const Json::Value* value,
if (value && value->isObject() && value->isMember(member_name)) {
return &(*value)[member_name];
}
- return NULL;
+ return nullptr;
}
template <class T>
diff --git a/src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h b/src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h
index 47cc557976..f170ef90a7 100644
--- a/src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h
+++ b/src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h
@@ -6,6 +6,8 @@
namespace security_manager {
+SDL_CREATE_LOG_VARIABLE("SecurityManager")
+
class CryptoManagerSettingsImpl : public CryptoManagerSettings {
public:
CryptoManagerSettingsImpl(const profile::Profile& profile,
@@ -19,8 +21,6 @@ class CryptoManagerSettingsImpl : public CryptoManagerSettings {
}
Protocol security_manager_protocol_name() const OVERRIDE {
- CREATE_LOGGERPTR_LOCAL(logger_, "SecurityManager")
-
const std::string& protocol_str = profile_.security_manager_protocol_name();
if (protocol_str == "TLSv1.0") {
return security_manager::TLSv1;
@@ -38,8 +38,7 @@ class CryptoManagerSettingsImpl : public CryptoManagerSettings {
return security_manager::DTLSv1;
}
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Unknown protocol: " << profile_.security_manager_protocol_name());
return static_cast<security_manager::Protocol>(-1);
}
diff --git a/src/components/security_manager/include/security_manager/security_manager_impl.h b/src/components/security_manager/include/security_manager/security_manager_impl.h
index ee00e0774a..6e5fb08c20 100644
--- a/src/components/security_manager/include/security_manager/security_manager_impl.h
+++ b/src/components/security_manager/include/security_manager/security_manager_impl.h
@@ -241,12 +241,12 @@ class SecurityManagerImpl : public SecurityManager,
* \brief Parse SecurityMessage as HandshakeData request
* \param inMessage SecurityMessage with binary data of handshake
*/
- bool ProccessHandshakeData(const SecurityMessage& inMessage);
+ bool ProcessHandshakeData(const SecurityMessage& inMessage);
/**
* \brief Parse InternalError from mobile side
* \param inMessage SecurityMessage with binary data of handshake
*/
- bool ProccessInternalError(const SecurityMessage& inMessage);
+ bool ProcessInternalError(const SecurityMessage& inMessage);
/**
* \brief Sends security query
diff --git a/src/components/security_manager/src/crypto_manager_impl.cc b/src/components/security_manager/src/crypto_manager_impl.cc
index 48b3119bec..b4b4d01485 100644
--- a/src/components/security_manager/src/crypto_manager_impl.cc
+++ b/src/components/security_manager/src/crypto_manager_impl.cc
@@ -55,7 +55,7 @@
namespace security_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "SecurityManager")
+SDL_CREATE_LOG_VARIABLE("SecurityManager")
uint32_t CryptoManagerImpl::instance_count_ = 0;
sync_primitives::Lock CryptoManagerImpl::instance_lock_;
@@ -70,10 +70,9 @@ int debug_callback(int preverify_ok, X509_STORE_CTX* ctx) {
// and expiration cert dates will be checked by SDL
return 1;
}
- LOG4CXX_WARN(logger_,
- "Certificate verification failed with error "
- << error << " \"" << X509_verify_cert_error_string(error)
- << '"');
+ SDL_LOG_WARN("Certificate verification failed with error "
+ << error << " \"" << X509_verify_cert_error_string(error)
+ << '"');
}
return preverify_ok;
}
@@ -89,11 +88,11 @@ void free_ctx(SSL_CTX** ctx) {
CryptoManagerImpl::CryptoManagerImpl(
const std::shared_ptr<const CryptoManagerSettings> set)
: settings_(set), context_(NULL) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(instance_lock_);
instance_count_++;
if (instance_count_ == 1) {
- LOG4CXX_DEBUG(logger_, "Openssl engine initialization");
+ SDL_LOG_DEBUG("Openssl engine initialization");
SSL_load_error_strings();
ERR_load_BIO_strings();
OpenSSL_add_all_algorithms();
@@ -102,24 +101,24 @@ CryptoManagerImpl::CryptoManagerImpl(
}
CryptoManagerImpl::~CryptoManagerImpl() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(instance_lock_);
- LOG4CXX_DEBUG(logger_, "Deinitilization");
+ SDL_LOG_DEBUG("Deinitialization");
if (!context_) {
- LOG4CXX_WARN(logger_, "Manager is not initialized");
+ SDL_LOG_WARN("Manager is not initialized");
} else {
SSL_CTX_free(context_);
}
instance_count_--;
if (instance_count_ == 0) {
- LOG4CXX_DEBUG(logger_, "Openssl engine deinitialization");
+ SDL_LOG_DEBUG("Openssl engine deinitialization");
EVP_cleanup();
ERR_free_strings();
}
}
bool CryptoManagerImpl::AreForceProtectionSettingsCorrect() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::vector<int>& forced_unprotected_services =
get_settings().force_unprotected_service();
const std::vector<int>& forced_protected_services =
@@ -140,25 +139,23 @@ bool CryptoManagerImpl::AreForceProtectionSettingsCorrect() const {
}
bool CryptoManagerImpl::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const Mode mode = get_settings().security_manager_mode();
if (!AreForceProtectionSettingsCorrect()) {
- LOG4CXX_DEBUG(logger_, "Force protection settings of ini file are wrong!");
+ SDL_LOG_DEBUG("Force protection settings of ini file are wrong!");
return false;
}
const bool is_server = (mode == SERVER);
if (is_server) {
- LOG4CXX_DEBUG(logger_, "Server mode");
+ SDL_LOG_DEBUG("Server mode");
} else {
- LOG4CXX_DEBUG(logger_, "Client mode");
+ SDL_LOG_DEBUG("Client mode");
}
- LOG4CXX_DEBUG(logger_,
- "Peer verification "
- << (get_settings().verify_peer() ? "enabled" : "disabled"));
- LOG4CXX_DEBUG(
- logger_,
- "CA certificate file is \"" << get_settings().ca_cert_path() << '"');
+ SDL_LOG_DEBUG("Peer verification "
+ << (get_settings().verify_peer() ? "enabled" : "disabled"));
+ SDL_LOG_DEBUG("CA certificate file is \"" << get_settings().ca_cert_path()
+ << '"');
#if OPENSSL_VERSION_NUMBER < CONST_SSL_METHOD_MINIMAL_VERSION
SSL_METHOD* method;
@@ -168,22 +165,21 @@ bool CryptoManagerImpl::Init() {
switch (get_settings().security_manager_protocol_name()) {
case SSLv3:
#ifdef OPENSSL_NO_SSL3
- LOG4CXX_WARN(logger_, "OpenSSL does not support SSL3 protocol");
+ SDL_LOG_WARN("OpenSSL does not support SSL3 protocol");
return false;
#else
- LOG4CXX_DEBUG(logger_, "SSLv3 is used");
+ SDL_LOG_DEBUG("SSLv3 is used");
method = is_server ? SSLv3_server_method() : SSLv3_client_method();
break;
#endif
case TLSv1:
- LOG4CXX_DEBUG(logger_, "TLSv1 is used");
+ SDL_LOG_DEBUG("TLSv1 is used");
method = is_server ? TLSv1_server_method() : TLSv1_client_method();
break;
case TLSv1_1:
- LOG4CXX_DEBUG(logger_, "TLSv1_1 is used");
+ SDL_LOG_DEBUG("TLSv1_1 is used");
#if OPENSSL_VERSION_NUMBER < TLS1_1_MINIMAL_VERSION
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"OpenSSL has no TLSv1.1 with version lower 1.0.1, set TLSv1.0");
method = is_server ? TLSv1_server_method() : TLSv1_client_method();
#else
@@ -191,10 +187,9 @@ bool CryptoManagerImpl::Init() {
#endif
break;
case TLSv1_2:
- LOG4CXX_DEBUG(logger_, "TLSv1_2 is used");
+ SDL_LOG_DEBUG("TLSv1_2 is used");
#if OPENSSL_VERSION_NUMBER < TLS1_1_MINIMAL_VERSION
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"OpenSSL has no TLSv1.2 with version lower 1.0.1, set TLSv1.0");
method = is_server ? TLSv1_server_method() : TLSv1_client_method();
#else
@@ -202,13 +197,12 @@ bool CryptoManagerImpl::Init() {
#endif
break;
case DTLSv1:
- LOG4CXX_DEBUG(logger_, "DTLSv1 is used");
+ SDL_LOG_DEBUG("DTLSv1 is used");
method = is_server ? DTLSv1_server_method() : DTLSv1_client_method();
break;
default:
- LOG4CXX_ERROR(logger_,
- "Unknown protocol: "
- << get_settings().security_manager_protocol_name());
+ SDL_LOG_ERROR("Unknown protocol: "
+ << get_settings().security_manager_protocol_name());
return false;
}
if (context_) {
@@ -224,37 +218,34 @@ bool CryptoManagerImpl::Init() {
SaveCertificateData(get_settings().certificate_data());
if (get_settings().ciphers_list().empty()) {
- LOG4CXX_WARN(logger_, "Empty ciphers list");
+ SDL_LOG_WARN("Empty ciphers list");
} else {
- LOG4CXX_DEBUG(logger_, "Cipher list: " << get_settings().ciphers_list());
+ SDL_LOG_DEBUG("Cipher list: " << get_settings().ciphers_list());
if (!SSL_CTX_set_cipher_list(context_,
get_settings().ciphers_list().c_str())) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Could not set cipher list: " << get_settings().ciphers_list());
return false;
}
}
if (get_settings().ca_cert_path().empty()) {
- LOG4CXX_WARN(logger_, "Setting up empty CA certificate location");
+ SDL_LOG_WARN("Setting up empty CA certificate location");
}
- LOG4CXX_DEBUG(logger_, "Setting up CA certificate location");
+ SDL_LOG_DEBUG("Setting up CA certificate location");
const int result = SSL_CTX_load_verify_locations(
context_, NULL, get_settings().ca_cert_path().c_str());
if (!result) {
const unsigned long error = ERR_get_error();
UNUSED(error);
- LOG4CXX_WARN(logger_,
- "Wrong certificate file '"
- << get_settings().ca_cert_path() << "', err 0x" << std::hex
- << error << " \"" << ERR_reason_error_string(error)
- << '"');
+ SDL_LOG_WARN("Wrong certificate file '"
+ << get_settings().ca_cert_path() << "', err 0x" << std::hex
+ << error << " \"" << ERR_reason_error_string(error) << '"');
}
- LOG4CXX_DEBUG(logger_, "Setting up module certificate and private key");
+ SDL_LOG_DEBUG("Setting up module certificate and private key");
X509* module_certificate = LoadModuleCertificateFromFile();
utils::ScopeGuard certificate_guard =
@@ -266,7 +257,7 @@ bool CryptoManagerImpl::Init() {
UNUSED(key_guard);
if (!UpdateModuleCertificateData(module_certificate, module_key)) {
- LOG4CXX_WARN(logger_, "Failed to update module key and certificate");
+ SDL_LOG_WARN("Failed to update module key and certificate");
}
guard.Dismiss();
@@ -275,22 +266,21 @@ bool CryptoManagerImpl::Init() {
get_settings().verify_peer()
? SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT
: SSL_VERIFY_NONE;
- LOG4CXX_DEBUG(logger_,
- "Setting up peer verification in mode: " << verify_mode);
+ SDL_LOG_DEBUG("Setting up peer verification in mode: " << verify_mode);
SSL_CTX_set_verify(context_, verify_mode, &debug_callback);
return true;
}
bool CryptoManagerImpl::OnCertificateUpdated(const std::string& data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(crypto_manager_lock_);
if (!context_) {
- LOG4CXX_WARN(logger_, "Not initialized");
+ SDL_LOG_WARN("Not initialized");
return false;
}
if (!SaveCertificateData(data)) {
- LOG4CXX_ERROR(logger_, "Failed to save certificate data");
+ SDL_LOG_ERROR("Failed to save certificate data");
return false;
}
@@ -308,7 +298,7 @@ bool CryptoManagerImpl::OnCertificateUpdated(const std::string& data) {
}
SSLContext* CryptoManagerImpl::CreateSSLContext() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(crypto_manager_lock_);
if (NULL == context_) {
return NULL;
@@ -343,17 +333,23 @@ std::string CryptoManagerImpl::LastError() const {
bool CryptoManagerImpl::IsCertificateUpdateRequired(
const time_t system_time, const time_t certificates_time) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const double seconds = difftime(certificates_time, system_time);
- LOG4CXX_DEBUG(
- logger_, "Certificate UTC time: " << asctime(gmtime(&certificates_time)));
+ const size_t maxsize = 40;
+ char certificate_utc_time[maxsize];
+ std::strftime(
+ certificate_utc_time, maxsize, "%c", gmtime(&certificates_time));
+ SDL_LOG_DEBUG("Certificate UTC time: " << certificate_utc_time);
- LOG4CXX_DEBUG(logger_, "Host UTC time: " << asctime(gmtime(&system_time)));
- LOG4CXX_DEBUG(logger_, "Seconds before expiration: " << seconds);
+ char host_utc_time[maxsize];
+ std::strftime(host_utc_time, maxsize, "%c", gmtime(&system_time));
+ SDL_LOG_DEBUG("Host UTC time: " << host_utc_time);
+
+ SDL_LOG_DEBUG("Seconds before expiration: " << seconds);
if (seconds < 0) {
- LOG4CXX_WARN(logger_, "Certificate is already expired.");
+ SDL_LOG_WARN("Certificate is already expired.");
return true;
}
@@ -367,10 +363,10 @@ const CryptoManagerSettings& CryptoManagerImpl::get_settings() const {
bool CryptoManagerImpl::SaveCertificateData(
const std::string& cert_data) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (cert_data.empty()) {
- LOG4CXX_WARN(logger_, "Empty certificate");
+ SDL_LOG_WARN("Empty certificate");
return false;
}
@@ -382,7 +378,7 @@ bool CryptoManagerImpl::SaveCertificateData(
X509* cert = NULL;
if (!PEM_read_bio_X509(bio_cert, &cert, 0, 0)) {
- LOG4CXX_WARN(logger_, "Could not read certificate data: " << LastError());
+ SDL_LOG_WARN("Could not read certificate data: " << LastError());
return false;
}
@@ -390,14 +386,13 @@ bool CryptoManagerImpl::SaveCertificateData(
UNUSED(cert_guard);
if (1 != BIO_reset(bio_cert)) {
- LOG4CXX_WARN(
- logger_,
- "Unabled to reset BIO in order to read private key, " << LastError());
+ SDL_LOG_WARN("Unabled to reset BIO in order to read private key, "
+ << LastError());
}
EVP_PKEY* pkey = NULL;
if (!PEM_read_bio_PrivateKey(bio_cert, &pkey, 0, 0)) {
- LOG4CXX_WARN(logger_, "Could not read private key data: " << LastError());
+ SDL_LOG_WARN("Could not read private key data: " << LastError());
return false;
}
@@ -409,38 +404,37 @@ bool CryptoManagerImpl::SaveCertificateData(
bool CryptoManagerImpl::UpdateModuleCertificateData(X509* certificate,
EVP_PKEY* key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (certificate) {
if (!SSL_CTX_use_certificate(context_, certificate)) {
- LOG4CXX_WARN(logger_, "Could not use certificate: " << LastError());
+ SDL_LOG_WARN("Could not use certificate: " << LastError());
return false;
}
}
if (key) {
if (!SSL_CTX_use_PrivateKey(context_, key)) {
- LOG4CXX_ERROR(logger_, "Could not use key: " << LastError());
+ SDL_LOG_ERROR("Could not use key: " << LastError());
return false;
}
if (!SSL_CTX_check_private_key(context_)) {
- LOG4CXX_ERROR(logger_, "Private key is invalid: " << LastError());
+ SDL_LOG_ERROR("Private key is invalid: " << LastError());
return false;
}
}
- LOG4CXX_DEBUG(logger_, "Certificate and key are successfully updated");
+ SDL_LOG_DEBUG("Certificate and key are successfully updated");
return true;
}
X509* CryptoManagerImpl::LoadModuleCertificateFromFile() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::string cert_path = get_settings().module_cert_path();
BIO* bio_cert = BIO_new_file(cert_path.c_str(), "r");
if (!bio_cert) {
- LOG4CXX_WARN(logger_,
- "Failed to open " << cert_path << " file: " << LastError());
+ SDL_LOG_WARN("Failed to open " << cert_path << " file: " << LastError());
return NULL;
}
@@ -449,24 +443,21 @@ X509* CryptoManagerImpl::LoadModuleCertificateFromFile() {
X509* module_certificate = NULL;
if (!PEM_read_bio_X509(bio_cert, &module_certificate, NULL, NULL)) {
- LOG4CXX_ERROR(logger_,
- "Failed to read certificate data from file: " << LastError());
+ SDL_LOG_ERROR("Failed to read certificate data from file: " << LastError());
return NULL;
}
- LOG4CXX_DEBUG(logger_,
- "Module certificate was loaded: " << module_certificate);
+ SDL_LOG_DEBUG("Module certificate was loaded: " << module_certificate);
return module_certificate;
}
EVP_PKEY* CryptoManagerImpl::LoadModulePrivateKeyFromFile() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::string key_path = get_settings().module_key_path();
BIO* bio_key = BIO_new_file(key_path.c_str(), "r");
if (!bio_key) {
- LOG4CXX_WARN(logger_,
- "Failed to open " << key_path << " file: " << LastError());
+ SDL_LOG_WARN("Failed to open " << key_path << " file: " << LastError());
return NULL;
}
@@ -475,28 +466,26 @@ EVP_PKEY* CryptoManagerImpl::LoadModulePrivateKeyFromFile() {
EVP_PKEY* module_key = NULL;
if (!PEM_read_bio_PrivateKey(bio_key, &module_key, NULL, NULL)) {
- LOG4CXX_ERROR(logger_,
- "Failed to read private key data from file: " << LastError());
+ SDL_LOG_ERROR("Failed to read private key data from file: " << LastError());
return NULL;
}
- LOG4CXX_DEBUG(logger_, "Module private key was loaded: " << module_key);
+ SDL_LOG_DEBUG("Module private key was loaded: " << module_key);
return module_key;
}
bool CryptoManagerImpl::SaveModuleCertificateToFile(X509* certificate) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!certificate) {
- LOG4CXX_WARN(logger_, "Empty certificate. Saving will be skipped");
+ SDL_LOG_WARN("Empty certificate. Saving will be skipped");
return false;
}
const std::string cert_path = get_settings().module_cert_path();
BIO* bio_cert = BIO_new_file(cert_path.c_str(), "w");
if (!bio_cert) {
- LOG4CXX_ERROR(logger_,
- "Failed to open " << cert_path << " file: " << LastError());
+ SDL_LOG_ERROR("Failed to open " << cert_path << " file: " << LastError());
return false;
}
@@ -504,8 +493,7 @@ bool CryptoManagerImpl::SaveModuleCertificateToFile(X509* certificate) const {
UNUSED(bio_guard);
if (!PEM_write_bio_X509(bio_cert, certificate)) {
- LOG4CXX_ERROR(logger_,
- "Failed to write certificate to file: " << LastError());
+ SDL_LOG_ERROR("Failed to write certificate to file: " << LastError());
return false;
}
@@ -513,18 +501,17 @@ bool CryptoManagerImpl::SaveModuleCertificateToFile(X509* certificate) const {
}
bool CryptoManagerImpl::SaveModuleKeyToFile(EVP_PKEY* key) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!key) {
- LOG4CXX_WARN(logger_, "Empty private key. Saving will be skipped");
+ SDL_LOG_WARN("Empty private key. Saving will be skipped");
return false;
}
const std::string key_path = get_settings().module_key_path();
BIO* bio_key = BIO_new_file(key_path.c_str(), "w");
if (!bio_key) {
- LOG4CXX_ERROR(logger_,
- "Failed to open " << key_path << " file: " << LastError());
+ SDL_LOG_ERROR("Failed to open " << key_path << " file: " << LastError());
return false;
}
@@ -532,7 +519,7 @@ bool CryptoManagerImpl::SaveModuleKeyToFile(EVP_PKEY* key) const {
UNUSED(bio_guard);
if (!PEM_write_bio_PrivateKey(bio_key, key, NULL, NULL, 0, NULL, NULL)) {
- LOG4CXX_ERROR(logger_, "Failed to write key to file: " << LastError());
+ SDL_LOG_ERROR("Failed to write key to file: " << LastError());
return false;
}
diff --git a/src/components/security_manager/src/security_manager_impl.cc b/src/components/security_manager/src/security_manager_impl.cc
index a24e48289d..1bf10c4f7c 100644
--- a/src/components/security_manager/src/security_manager_impl.cc
+++ b/src/components/security_manager/src/security_manager_impl.cc
@@ -42,7 +42,7 @@
namespace security_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "SecurityManager")
+SDL_CREATE_LOG_VARIABLE("SecurityManager")
static const char* kErrId = "id";
static const char* kErrText = "text";
@@ -76,7 +76,7 @@ void SecurityManagerImpl::OnMessageReceived(
if (!result) {
// result will be false only if data less then query header
const std::string error_text("Incorrect message received");
- LOG4CXX_ERROR(logger_, error_text);
+ SDL_LOG_ERROR(error_text);
SendInternalError(
message->connection_key(), ERROR_INVALID_QUERY_SIZE, error_text);
return;
@@ -93,7 +93,7 @@ void SecurityManagerImpl::OnMobileMessageSent(
void SecurityManagerImpl::set_session_observer(
protocol_handler::SessionObserver* observer) {
if (!observer) {
- LOG4CXX_ERROR(logger_, "Invalid (NULL) pointer to SessionObserver.");
+ SDL_LOG_ERROR("Invalid (NULL) pointer to SessionObserver.");
return;
}
session_observer_ = observer;
@@ -102,7 +102,7 @@ void SecurityManagerImpl::set_session_observer(
void SecurityManagerImpl::set_protocol_handler(
protocol_handler::ProtocolHandler* handler) {
if (!handler) {
- LOG4CXX_ERROR(logger_, "Invalid (NULL) pointer to ProtocolHandler.");
+ SDL_LOG_ERROR("Invalid (NULL) pointer to ProtocolHandler.");
return;
}
protocol_handler_ = handler;
@@ -110,7 +110,7 @@ void SecurityManagerImpl::set_protocol_handler(
void SecurityManagerImpl::set_crypto_manager(CryptoManager* crypto_manager) {
if (!crypto_manager) {
- LOG4CXX_ERROR(logger_, "Invalid (NULL) pointer to CryptoManager.");
+ SDL_LOG_ERROR("Invalid (NULL) pointer to CryptoManager.");
return;
}
crypto_manager_ = crypto_manager;
@@ -118,29 +118,29 @@ void SecurityManagerImpl::set_crypto_manager(CryptoManager* crypto_manager) {
void SecurityManagerImpl::Handle(const SecurityMessage message) {
DCHECK(message);
- LOG4CXX_INFO(logger_, "Received Security message from Mobile side");
+ SDL_LOG_INFO("Received Security message from Mobile side");
if (!crypto_manager_) {
const std::string error_text("Invalid (NULL) CryptoManager.");
- LOG4CXX_ERROR(logger_, error_text);
+ SDL_LOG_ERROR(error_text);
SendInternalError(
message->get_connection_key(), ERROR_NOT_SUPPORTED, error_text);
return;
}
switch (message->get_header().query_id) {
case SecurityQuery::SEND_HANDSHAKE_DATA:
- if (!ProccessHandshakeData(message)) {
- LOG4CXX_ERROR(logger_, "Proccess HandshakeData failed");
+ if (!ProcessHandshakeData(message)) {
+ SDL_LOG_ERROR("Process HandshakeData failed");
}
break;
case SecurityQuery::SEND_INTERNAL_ERROR:
- if (!ProccessInternalError(message)) {
- LOG4CXX_ERROR(logger_, "Processing income InternalError failed");
+ if (!ProcessInternalError(message)) {
+ SDL_LOG_ERROR("Processing income InternalError failed");
}
break;
default: {
// SecurityQuery::InvalidQuery
const std::string error_text("Unknown query identifier.");
- LOG4CXX_ERROR(logger_, error_text);
+ SDL_LOG_ERROR(error_text);
SendInternalError(message->get_connection_key(),
ERROR_INVALID_QUERY_ID,
error_text,
@@ -151,7 +151,7 @@ void SecurityManagerImpl::Handle(const SecurityMessage message) {
security_manager::SSLContext* SecurityManagerImpl::CreateSSLContext(
const uint32_t& connection_key, ContextCreationStrategy cc_strategy) {
- LOG4CXX_INFO(logger_, "ProtectService processing");
+ SDL_LOG_INFO("ProtectService processing");
DCHECK(session_observer_);
DCHECK(crypto_manager_);
@@ -169,7 +169,7 @@ security_manager::SSLContext* SecurityManagerImpl::CreateSSLContext(
crypto_manager_->CreateSSLContext();
if (!ssl_context) {
const std::string error_text("CryptoManager could not create SSL context.");
- LOG4CXX_ERROR(logger_, error_text);
+ SDL_LOG_ERROR(error_text);
// Generate response query and post to security_messages_
SendInternalError(connection_key, ERROR_INTERNAL, error_text);
return NULL;
@@ -185,13 +185,12 @@ security_manager::SSLContext* SecurityManagerImpl::CreateSSLContext(
}
DCHECK(session_observer_->GetSSLContext(connection_key,
protocol_handler::kControl));
- LOG4CXX_DEBUG(logger_,
- "Set SSL context to connection_key " << connection_key);
+ SDL_LOG_DEBUG("Set SSL context to connection_key " << connection_key);
return ssl_context;
}
void SecurityManagerImpl::PostponeHandshake(const uint32_t connection_key) {
- LOG4CXX_TRACE(logger_, "Handshake postponed");
+ SDL_LOG_TRACE("Handshake postponed");
sync_primitives::AutoLock lock(connections_lock_);
if (waiting_for_certificate_) {
awaiting_certificate_connections_.insert(connection_key);
@@ -202,24 +201,21 @@ void SecurityManagerImpl::PostponeHandshake(const uint32_t connection_key) {
}
void SecurityManagerImpl::ResumeHandshake(uint32_t connection_key) {
- LOG4CXX_TRACE(logger_, "Handshake resumed");
+ SDL_LOG_TRACE("Handshake resumed");
security_manager::SSLContext* ssl_context =
CreateSSLContext(connection_key, kForceRecreation);
if (!ssl_context) {
- LOG4CXX_WARN(logger_,
- "Unable to resume handshake. No SSL context for key "
- << connection_key);
+ SDL_LOG_WARN("Unable to resume handshake. No SSL context for key "
+ << connection_key);
return;
}
- LOG4CXX_DEBUG(logger_,
- "Connection key : "
- << connection_key
- << " is waiting for certificate: " << std::boolalpha
- << waiting_for_certificate_ << " and has certificate: "
- << ssl_context->HasCertificate());
+ SDL_LOG_DEBUG("Connection key : "
+ << connection_key << " is waiting for certificate: "
+ << std::boolalpha << waiting_for_certificate_
+ << " and has certificate: " << ssl_context->HasCertificate());
ssl_context->ResetConnection();
if (!waiting_for_certificate_ && !ssl_context->HasCertificate()) {
@@ -233,7 +229,7 @@ void SecurityManagerImpl::ResumeHandshake(uint32_t connection_key) {
void SecurityManagerImpl::StartHandshake(uint32_t connection_key) {
DCHECK(session_observer_);
- LOG4CXX_INFO(logger_, "StartHandshake: connection_key " << connection_key);
+ SDL_LOG_INFO("StartHandshake: connection_key " << connection_key);
security_manager::SSLContext* ssl_context = session_observer_->GetSSLContext(
connection_key, protocol_handler::kControl);
@@ -241,14 +237,14 @@ void SecurityManagerImpl::StartHandshake(uint32_t connection_key) {
const std::string error_text(
"StartHandshake failed, "
"connection is not protected");
- LOG4CXX_ERROR(logger_, error_text);
+ SDL_LOG_ERROR(error_text);
SendInternalError(connection_key, ERROR_INTERNAL, error_text);
NotifyListenersOnHandshakeDone(connection_key,
SSLContext::Handshake_Result_Fail);
return;
}
if (!ssl_context->HasCertificate()) {
- LOG4CXX_ERROR(logger_, "Security certificate is absent");
+ SDL_LOG_ERROR("Security certificate is absent");
sync_primitives::AutoLock lock(waiters_lock_);
waiting_for_certificate_ = true;
NotifyOnCertificateUpdateRequired();
@@ -269,11 +265,10 @@ bool SecurityManagerImpl::IsSystemTimeProviderReady() const {
void SecurityManagerImpl::ProceedHandshake(
security_manager::SSLContext* ssl_context, uint32_t connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!ssl_context) {
- LOG4CXX_WARN(logger_,
- "Unable to process handshake. No SSL context for key "
- << connection_key);
+ SDL_LOG_WARN("Unable to process handshake. No SSL context for key "
+ << connection_key);
return;
}
@@ -285,14 +280,14 @@ void SecurityManagerImpl::ProceedHandshake(
time_t cert_due_date;
if (!ssl_context->GetCertificateDueDate(cert_due_date)) {
- LOG4CXX_ERROR(logger_, "Failed to get certificate due date!");
+ SDL_LOG_ERROR("Failed to get certificate due date!");
PostponeHandshake(connection_key);
return;
}
if (crypto_manager_->IsCertificateUpdateRequired(
system_time_handler_->GetUTCTime(), cert_due_date)) {
- LOG4CXX_DEBUG(logger_, "Host certificate update required");
+ SDL_LOG_DEBUG("Host certificate update required");
if (helpers::in_range(awaiting_certificate_connections_, connection_key)) {
NotifyListenersOnHandshakeDone(connection_key,
SSLContext::Handshake_Result_CertExpired);
@@ -319,7 +314,7 @@ void SecurityManagerImpl::ProceedHandshake(
ssl_context->StartHandshake(&data, &data_size);
if (security_manager::SSLContext::Handshake_Result_Success != result) {
const std::string error_text("StartHandshake failed, handshake step fail");
- LOG4CXX_ERROR(logger_, error_text);
+ SDL_LOG_ERROR(error_text);
SendInternalError(connection_key, ERROR_INTERNAL, error_text);
NotifyListenersOnHandshakeDone(connection_key,
SSLContext::Handshake_Result_Fail);
@@ -333,15 +328,14 @@ void SecurityManagerImpl::ProceedHandshake(
bool SecurityManagerImpl::IsCertificateUpdateRequired(
const uint32_t connection_key) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
security_manager::SSLContext* ssl_context =
CreateSSLContext(connection_key, kUseExisting);
DCHECK_OR_RETURN(ssl_context, true);
- LOG4CXX_DEBUG(logger_,
- "Set SSL context to connection_key " << connection_key);
+ SDL_LOG_DEBUG("Set SSL context to connection_key " << connection_key);
time_t cert_due_date;
if (!ssl_context->GetCertificateDueDate(cert_due_date)) {
- LOG4CXX_ERROR(logger_, "Failed to get certificate due date!");
+ SDL_LOG_ERROR("Failed to get certificate due date!");
return true;
}
return crypto_manager_->IsCertificateUpdateRequired(
@@ -350,8 +344,7 @@ bool SecurityManagerImpl::IsCertificateUpdateRequired(
void SecurityManagerImpl::AddListener(SecurityManagerListener* const listener) {
if (!listener) {
- LOG4CXX_ERROR(logger_,
- "Invalid (NULL) pointer to SecurityManagerListener.");
+ SDL_LOG_ERROR("Invalid (NULL) pointer to SecurityManagerListener.");
return;
}
listeners_.push_back(listener);
@@ -360,15 +353,14 @@ void SecurityManagerImpl::AddListener(SecurityManagerListener* const listener) {
void SecurityManagerImpl::RemoveListener(
SecurityManagerListener* const listener) {
if (!listener) {
- LOG4CXX_ERROR(logger_,
- "Invalid (NULL) pointer to SecurityManagerListener.");
+ SDL_LOG_ERROR("Invalid (NULL) pointer to SecurityManagerListener.");
return;
}
listeners_.remove(listener);
}
bool SecurityManagerImpl::OnCertificateUpdated(const std::string& data) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
{
sync_primitives::AutoLock lock(waiters_lock_);
waiting_for_certificate_ = false;
@@ -384,7 +376,7 @@ bool SecurityManagerImpl::OnCertificateUpdated(const std::string& data) {
}
void SecurityManagerImpl::OnSystemTimeArrived(const time_t utc_time) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
{
sync_primitives::AutoLock lock(waiters_lock_);
waiting_for_time_ = false;
@@ -399,7 +391,7 @@ void SecurityManagerImpl::OnSystemTimeArrived(const time_t utc_time) {
}
void SecurityManagerImpl::OnSystemTimeFailed() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
{
sync_primitives::AutoLock lock(waiters_lock_);
waiting_for_time_ = false;
@@ -411,9 +403,9 @@ void SecurityManagerImpl::OnSystemTimeFailed() {
}
void SecurityManagerImpl::ProcessFailedPTU() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (listeners_.empty()) {
- LOG4CXX_DEBUG(logger_, "listeners arrays IS EMPTY!");
+ SDL_LOG_DEBUG("listeners arrays IS EMPTY!");
return;
}
@@ -427,7 +419,7 @@ void SecurityManagerImpl::ProcessFailedPTU() {
for (auto& listener : listeners_to_remove) {
auto it = std::find(listeners_.begin(), listeners_.end(), listener);
DCHECK(it != listeners_.end());
- LOG4CXX_DEBUG(logger_, "Destroying listener: " << *it);
+ SDL_LOG_DEBUG("Destroying listener: " << *it);
delete (*it);
listeners_.erase(it);
}
@@ -435,7 +427,7 @@ void SecurityManagerImpl::ProcessFailedPTU() {
#ifdef EXTERNAL_PROPRIETARY_MODE
void SecurityManagerImpl::ProcessFailedCertDecrypt() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
{
sync_primitives::AutoLock lock(waiters_lock_);
waiting_for_certificate_ = false;
@@ -451,7 +443,7 @@ void SecurityManagerImpl::ProcessFailedCertDecrypt() {
for (auto& listener : listeners_to_remove) {
auto it = std::find(listeners_.begin(), listeners_.end(), listener);
DCHECK(it != listeners_.end());
- LOG4CXX_DEBUG(logger_, "Destroying listener: " << *it);
+ SDL_LOG_DEBUG("Destroying listener: " << *it);
delete (*it);
listeners_.erase(it);
}
@@ -462,11 +454,11 @@ void SecurityManagerImpl::ProcessFailedCertDecrypt() {
void SecurityManagerImpl::NotifyListenersOnHandshakeDone(
const uint32_t& connection_key, SSLContext::HandshakeResult error) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::list<SecurityManagerListener*>::iterator it = listeners_.begin();
while (it != listeners_.end()) {
if ((*it)->OnHandshakeDone(connection_key, error)) {
- LOG4CXX_DEBUG(logger_, "Destroying listener: " << *it);
+ SDL_LOG_DEBUG("Destroying listener: " << *it);
delete (*it);
it = listeners_.erase(it);
} else {
@@ -476,7 +468,7 @@ void SecurityManagerImpl::NotifyListenersOnHandshakeDone(
}
void SecurityManagerImpl::NotifyOnCertificateUpdateRequired() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::list<SecurityManagerListener*>::iterator it = listeners_.begin();
while (it != listeners_.end()) {
(*it)->OnCertificateUpdateRequired();
@@ -489,11 +481,11 @@ void SecurityManagerImpl::ResetPendingSystemTimeRequests() {
}
void SecurityManagerImpl::NotifyListenersOnGetSystemTimeFailed() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::list<SecurityManagerListener*>::iterator it = listeners_.begin();
while (it != listeners_.end()) {
if ((*it)->OnGetSystemTimeFailed()) {
- LOG4CXX_DEBUG(logger_, "Destroying listener: " << *it);
+ SDL_LOG_DEBUG("Destroying listener: " << *it);
delete (*it);
it = listeners_.erase(it);
} else {
@@ -503,34 +495,33 @@ void SecurityManagerImpl::NotifyListenersOnGetSystemTimeFailed() {
}
bool SecurityManagerImpl::IsPolicyCertificateDataEmpty() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::string certificate_data;
for (auto it = listeners_.begin(); it != listeners_.end(); ++it) {
if ((*it)->GetPolicyCertificateData(certificate_data)) {
- LOG4CXX_DEBUG(logger_, "Certificate data received from listener");
+ SDL_LOG_DEBUG("Certificate data received from listener");
return certificate_data.empty();
}
}
return false;
}
-bool SecurityManagerImpl::ProccessHandshakeData(
+bool SecurityManagerImpl::ProcessHandshakeData(
const SecurityMessage& inMessage) {
- LOG4CXX_INFO(logger_, "SendHandshakeData processing");
+ SDL_LOG_INFO("SendHandshakeData processing");
DCHECK(inMessage);
DCHECK(inMessage->get_header().query_id ==
SecurityQuery::SEND_HANDSHAKE_DATA);
const uint32_t seqNumber = inMessage->get_header().seq_number;
const uint32_t connection_key = inMessage->get_connection_key();
- LOG4CXX_DEBUG(
- logger_,
- "Received " << inMessage->get_data_size() << " bytes handshake data ");
+ SDL_LOG_DEBUG("Received " << inMessage->get_data_size()
+ << " bytes handshake data ");
if (!inMessage->get_data_size()) {
const std::string error_text("SendHandshakeData: null arguments size.");
- LOG4CXX_ERROR(logger_, error_text);
+ SDL_LOG_ERROR(error_text);
SendInternalError(
connection_key, ERROR_INVALID_QUERY_SIZE, error_text, seqNumber);
return false;
@@ -540,7 +531,7 @@ bool SecurityManagerImpl::ProccessHandshakeData(
connection_key, protocol_handler::kControl);
if (!sslContext) {
const std::string error_text("SendHandshakeData: No ssl context.");
- LOG4CXX_ERROR(logger_, error_text);
+ SDL_LOG_ERROR(error_text);
SendInternalError(
connection_key, ERROR_SERVICE_NOT_PROTECTED, error_text, seqNumber);
NotifyListenersOnHandshakeDone(connection_key,
@@ -556,11 +547,10 @@ bool SecurityManagerImpl::ProccessHandshakeData(
&out_data_size);
if (handshake_result == SSLContext::Handshake_Result_AbnormalFail) {
// Do not return handshake data on AbnormalFail or null returned values
- const std::string erorr_text(sslContext->LastError());
- LOG4CXX_ERROR(logger_,
- "SendHandshakeData: Handshake failed: " << erorr_text);
+ const std::string error_text(sslContext->LastError());
+ SDL_LOG_ERROR("SendHandshakeData: Handshake failed: " << error_text);
SendInternalError(
- connection_key, ERROR_SSL_INVALID_DATA, erorr_text, seqNumber);
+ connection_key, ERROR_SSL_INVALID_DATA, error_text, seqNumber);
NotifyListenersOnHandshakeDone(connection_key,
SSLContext::Handshake_Result_Fail);
// no handshake data to send
@@ -568,12 +558,12 @@ bool SecurityManagerImpl::ProccessHandshakeData(
}
if (sslContext->IsInitCompleted()) {
// On handshake success
- LOG4CXX_DEBUG(logger_, "SSL initialization finished success.");
+ SDL_LOG_DEBUG("SSL initialization finished success.");
NotifyListenersOnHandshakeDone(connection_key,
SSLContext::Handshake_Result_Success);
} else if (handshake_result != SSLContext::Handshake_Result_Success) {
// On handshake fail
- LOG4CXX_WARN(logger_, "SSL initialization finished with fail.");
+ SDL_LOG_WARN("SSL initialization finished with fail.");
NotifyListenersOnHandshakeDone(connection_key, handshake_result);
}
@@ -584,25 +574,28 @@ bool SecurityManagerImpl::ProccessHandshakeData(
return true;
}
-bool SecurityManagerImpl::ProccessInternalError(
+bool SecurityManagerImpl::ProcessInternalError(
const SecurityMessage& inMessage) {
- LOG4CXX_INFO(logger_,
- "Received InternalError with Json message"
- << inMessage->get_json_message());
- Json::Value root;
std::string str = inMessage->get_json_message();
+ const uint32_t connection_key = inMessage->get_connection_key();
+ SDL_LOG_INFO("Received InternalError with Json message" << str);
+ Json::Value root;
utils::JsonReader reader;
if (!reader.parse(str, &root)) {
- LOG4CXX_DEBUG(logger_, "Json parsing fails.");
+ SDL_LOG_DEBUG("Json parsing fails.");
return false;
}
- LOG4CXX_DEBUG(logger_,
- "Received InternalError id "
- << root[kErrId].asString()
- << ", text: " << root[kErrText].asString());
+ uint8_t id = root[kErrId].asInt();
+ SDL_LOG_DEBUG("Received InternalError id " << std::to_string(id) << ", text: "
+ << root[kErrText].asString());
+ if (ERROR_SSL_INVALID_DATA == id || ERROR_NOT_SUPPORTED == id) {
+ NotifyListenersOnHandshakeDone(connection_key,
+ SSLContext::Handshake_Result_Fail);
+ }
return true;
}
+
void SecurityManagerImpl::SendHandshakeBinData(const uint32_t connection_key,
const uint8_t* const data,
const size_t data_size,
@@ -614,16 +607,16 @@ void SecurityManagerImpl::SendHandshakeBinData(const uint32_t connection_key,
const SecurityQuery query =
SecurityQuery(header, connection_key, data, data_size);
SendQuery(query, connection_key);
- LOG4CXX_DEBUG(logger_, "Sent " << data_size << " bytes handshake data ");
+ SDL_LOG_DEBUG("Sent " << data_size << " bytes handshake data ");
}
void SecurityManagerImpl::SendInternalError(const uint32_t connection_key,
const uint8_t& error_id,
- const std::string& erorr_text,
+ const std::string& error_text,
const uint32_t seq_number) {
Json::Value value;
value[kErrId] = error_id;
- value[kErrText] = erorr_text;
+ value[kErrText] = error_text;
const std::string error_str = value.toStyledString();
SecurityQuery::QueryHeader header(
SecurityQuery::NOTIFICATION,
@@ -640,9 +633,8 @@ void SecurityManagerImpl::SendInternalError(const uint32_t connection_key,
const SecurityQuery query(
header, connection_key, &data_sending[0], data_sending.size());
SendQuery(query, connection_key);
- LOG4CXX_DEBUG(logger_,
- "Sent Internal error id " << static_cast<int>(error_id)
- << " : \"" << erorr_text << "\".");
+ SDL_LOG_DEBUG("Sent Internal error id " << static_cast<int>(error_id)
+ << " : \"" << error_text << "\".");
}
void SecurityManagerImpl::SendQuery(const SecurityQuery& query,
diff --git a/src/components/security_manager/src/ssl_context_impl.cc b/src/components/security_manager/src/ssl_context_impl.cc
index d5c892c07a..5d151e854a 100644
--- a/src/components/security_manager/src/ssl_context_impl.cc
+++ b/src/components/security_manager/src/ssl_context_impl.cc
@@ -46,7 +46,7 @@
namespace security_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "SecurityManager")
+SDL_CREATE_LOG_VARIABLE("SecurityManager")
CryptoManagerImpl::SSLContextImpl::SSLContextImpl(SSL* conn,
Mode mode,
@@ -78,7 +78,7 @@ bool CryptoManagerImpl::SSLContextImpl::IsInitCompleted() const {
SSLContext::HandshakeResult CryptoManagerImpl::SSLContextImpl::StartHandshake(
const uint8_t** const out_data, size_t* out_data_size) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
is_handshake_pending_ = true;
return DoHandshakeStep(NULL, 0, out_data, out_data_size);
}
@@ -182,40 +182,38 @@ const std::string CryptoManagerImpl::SSLContextImpl::RemoveDisallowedInfo(
void CryptoManagerImpl::SSLContextImpl::PrintCertData(
X509* cert, const std::string& cert_owner) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!cert) {
- LOG4CXX_DEBUG(logger_, "Empty certificate data");
+ SDL_LOG_DEBUG("Empty certificate data");
return;
}
std::string subj = RemoveDisallowedInfo(X509_get_subject_name(cert));
if (!subj.empty()) {
std::replace(subj.begin(), subj.end(), '/', ' ');
- LOG4CXX_DEBUG(logger_, cert_owner << " subject:" << subj);
+ SDL_LOG_DEBUG(cert_owner << " subject:" << subj);
}
std::string issuer = RemoveDisallowedInfo(X509_get_issuer_name(cert));
if (!issuer.empty()) {
std::replace(issuer.begin(), issuer.end(), '/', ' ');
- LOG4CXX_DEBUG(logger_, cert_owner << " issuer:" << issuer);
+ SDL_LOG_DEBUG(cert_owner << " issuer:" << issuer);
}
ASN1_TIME* not_before = X509_get_notBefore(cert);
if (not_before) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Start date: " << static_cast<unsigned char*>(not_before->data));
}
ASN1_TIME* not_after = X509_get_notAfter(cert);
if (not_after) {
- LOG4CXX_DEBUG(logger_,
- "End date: " << static_cast<unsigned char*>(not_after->data));
+ SDL_LOG_DEBUG("End date: " << static_cast<unsigned char*>(not_after->data));
}
}
void CryptoManagerImpl::SSLContextImpl::PrintCertInfo() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
PrintCertData(SSL_get_certificate(connection_), "HU's");
STACK_OF(X509)* peer_certs = SSL_get_peer_cert_chain(connection_);
@@ -227,7 +225,7 @@ void CryptoManagerImpl::SSLContextImpl::PrintCertInfo() {
SSLContext::HandshakeResult
CryptoManagerImpl::SSLContextImpl::CheckCertContext() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
X509* cert = SSL_get_peer_certificate(connection_);
if (!cert) {
// According to the openssl documentation the peer certificate
@@ -244,24 +242,20 @@ CryptoManagerImpl::SSLContextImpl::CheckCertContext() {
const double end_seconds = difftime(end, hsh_context_.system_time);
if (start_seconds < 0) {
- LOG4CXX_ERROR(logger_,
- "Certificate is not yet valid. Time before validity "
- << start_seconds << " seconds");
+ SDL_LOG_ERROR("Certificate is not yet valid. Time before validity "
+ << start_seconds << " seconds");
return Handshake_Result_NotYetValid;
} else {
- LOG4CXX_DEBUG(
- logger_,
- "Time since certificate validity " << start_seconds << "seconds");
+ SDL_LOG_DEBUG("Time since certificate validity " << start_seconds
+ << "seconds");
}
if (end_seconds < 0) {
- LOG4CXX_ERROR(logger_,
- "Certificate already expired. Time after expiration "
- << end_seconds << " seconds");
+ SDL_LOG_ERROR("Certificate already expired. Time after expiration "
+ << end_seconds << " seconds");
return Handshake_Result_CertExpired;
} else {
- LOG4CXX_DEBUG(logger_,
- "Time until expiration " << end_seconds << "seconds");
+ SDL_LOG_DEBUG("Time until expiration " << end_seconds << "seconds");
}
X509_NAME* subj_name = X509_get_subject_name(cert);
@@ -269,10 +263,9 @@ CryptoManagerImpl::SSLContextImpl::CheckCertContext() {
const std::string& sn = GetTextBy(subj_name, NID_serialNumber);
if (!(hsh_context_.expected_sn.CompareIgnoreCase(sn.c_str()))) {
- LOG4CXX_ERROR(logger_,
- "Trying to run handshake with wrong app id: "
- << sn << ". Expected app id: "
- << hsh_context_.expected_sn.AsMBString());
+ SDL_LOG_ERROR("Trying to run handshake with wrong app id: "
+ << sn << ". Expected app id: "
+ << hsh_context_.expected_sn.AsMBString());
return Handshake_Result_AppIDMismatch;
}
return Handshake_Result_Success;
@@ -334,12 +327,12 @@ time_t CryptoManagerImpl::SSLContextImpl::convert_asn1_time_to_time_t(
bool CryptoManagerImpl::SSLContextImpl::ReadHandshakeData(
const uint8_t** const out_data, size_t* out_data_size) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const size_t pend = BIO_ctrl_pending(bioOut_);
- LOG4CXX_DEBUG(logger_, "Available " << pend << " bytes for handshake");
+ SDL_LOG_DEBUG("Available " << pend << " bytes for handshake");
if (pend > 0) {
- LOG4CXX_DEBUG(logger_, "Reading handshake data");
+ SDL_LOG_DEBUG("Reading handshake data");
EnsureBufferSizeEnough(pend);
const int read_count = BIO_read(bioOut_, buffer_, pend);
@@ -347,7 +340,7 @@ bool CryptoManagerImpl::SSLContextImpl::ReadHandshakeData(
*out_data_size = read_count;
*out_data = buffer_;
} else {
- LOG4CXX_WARN(logger_, "BIO read fail");
+ SDL_LOG_WARN("BIO read fail");
is_handshake_pending_ = false;
ResetConnection();
return false;
@@ -359,7 +352,7 @@ bool CryptoManagerImpl::SSLContextImpl::ReadHandshakeData(
bool CryptoManagerImpl::SSLContextImpl::WriteHandshakeData(
const uint8_t* const in_data, size_t in_data_size) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (in_data && in_data_size) {
const int ret = BIO_write(bioIn_, in_data, in_data_size);
if (ret <= 0) {
@@ -373,9 +366,9 @@ bool CryptoManagerImpl::SSLContextImpl::WriteHandshakeData(
SSLContext::HandshakeResult
CryptoManagerImpl::SSLContextImpl::PerformHandshake() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const int handshake_result = SSL_do_handshake(connection_);
- LOG4CXX_TRACE(logger_, "Handshake result: " << handshake_result);
+ SDL_LOG_TRACE("Handshake result: " << handshake_result);
if (handshake_result == 1) {
const HandshakeResult result = CheckCertContext();
if (result != Handshake_Result_Success) {
@@ -384,7 +377,7 @@ CryptoManagerImpl::SSLContextImpl::PerformHandshake() {
return result;
}
- LOG4CXX_DEBUG(logger_, "SSL handshake successfully finished");
+ SDL_LOG_DEBUG("SSL handshake successfully finished");
// Handshake is successful
bioFilter_ = BIO_new(BIO_f_ssl());
BIO_set_ssl(bioFilter_, connection_, BIO_NOCLOSE);
@@ -394,7 +387,7 @@ CryptoManagerImpl::SSLContextImpl::PerformHandshake() {
is_handshake_pending_ = false;
} else if (handshake_result == 0) {
- LOG4CXX_DEBUG(logger_, "SSL handshake failed");
+ SDL_LOG_DEBUG("SSL handshake failed");
SSL_clear(connection_);
is_handshake_pending_ = false;
return Handshake_Result_Fail;
@@ -403,10 +396,9 @@ CryptoManagerImpl::SSLContextImpl::PerformHandshake() {
if (error != SSL_ERROR_WANT_READ) {
const long error = SSL_get_verify_result(connection_);
SetHandshakeError(error);
- LOG4CXX_WARN(logger_,
- "Handshake failed with error "
- << " -> " << SSL_get_error(connection_, error) << " \""
- << LastError() << '"');
+ SDL_LOG_WARN("Handshake failed with error "
+ << " -> " << SSL_get_error(connection_, error) << " \""
+ << LastError() << '"');
ResetConnection();
is_handshake_pending_ = false;
@@ -426,7 +418,7 @@ SSLContext::HandshakeResult CryptoManagerImpl::SSLContextImpl::DoHandshakeStep(
size_t in_data_size,
const uint8_t** const out_data,
size_t* out_data_size) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(out_data);
DCHECK(out_data_size);
*out_data = NULL;
@@ -437,7 +429,7 @@ SSLContext::HandshakeResult CryptoManagerImpl::SSLContextImpl::DoHandshakeStep(
sync_primitives::AutoLock locker(bio_locker);
if (SSL_is_init_finished(connection_)) {
- LOG4CXX_DEBUG(logger_, "SSL initilization is finished");
+ SDL_LOG_DEBUG("SSL initialization is finished");
is_handshake_pending_ = false;
return Handshake_Result_Success;
}
@@ -491,15 +483,15 @@ bool CryptoManagerImpl::SSLContextImpl::Decrypt(const uint8_t* const in_data,
size_t in_data_size,
const uint8_t** const out_data,
size_t* out_data_size) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock locker(bio_locker);
if (!SSL_is_init_finished(connection_)) {
- LOG4CXX_ERROR(logger_, "SSL initilization is not finished");
+ SDL_LOG_ERROR("SSL initialization is not finished");
return false;
}
if (!in_data || (0 == in_data_size)) {
- LOG4CXX_ERROR(logger_, "IN data ptr or IN data size is 0");
+ SDL_LOG_ERROR("IN data ptr or IN data size is 0");
return false;
}
@@ -516,7 +508,7 @@ bool CryptoManagerImpl::SSLContextImpl::Decrypt(const uint8_t* const in_data,
// TODO(EZamakhov): investigate BIO_read return 0, -1 and -2 meanings
if (len <= 0) {
// Reset filter and connection deinitilization instead
- LOG4CXX_ERROR(logger_, "Read error occured. Read data lenght : " << len);
+ SDL_LOG_ERROR("Read error occurred. Read data length: " << len);
BIO_ctrl(bioFilter_, BIO_CTRL_RESET, 0, NULL);
return false;
}
@@ -529,7 +521,7 @@ bool CryptoManagerImpl::SSLContextImpl::Decrypt(const uint8_t* const in_data,
}
size_t CryptoManagerImpl::SSLContextImpl::get_max_block_size(size_t mtu) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!max_block_size_) {
// FIXME(EZamakhov): add correct logics for TLS1/1.2/SSL3
// For SSL3.0 set temporary value 90, old TLS1.2 value is 29
@@ -549,11 +541,11 @@ bool CryptoManagerImpl::SSLContextImpl::IsHandshakePending() const {
bool CryptoManagerImpl::SSLContextImpl::GetCertificateDueDate(
time_t& due_date) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
X509* cert = SSL_get_certificate(connection_);
if (!cert) {
- LOG4CXX_DEBUG(logger_, "Get certificate failed.");
+ SDL_LOG_DEBUG("Get certificate failed.");
return false;
}
@@ -583,19 +575,19 @@ void CryptoManagerImpl::SSLContextImpl::SetHandshakeError(const int error) {
}
void CryptoManagerImpl::SSLContextImpl::ResetConnection() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const int shutdown_result = SSL_shutdown(connection_);
if (shutdown_result != 1) {
const size_t pend = BIO_ctrl_pending(bioOut_);
- LOG4CXX_DEBUG(logger_, "Available " << pend << " bytes for shutdown");
+ SDL_LOG_DEBUG("Available " << pend << " bytes for shutdown");
if (pend > 0) {
- LOG4CXX_DEBUG(logger_, "Reading shutdown data");
+ SDL_LOG_DEBUG("Reading shutdown data");
EnsureBufferSizeEnough(pend);
BIO_read(bioOut_, buffer_, pend);
}
SSL_shutdown(connection_);
}
- LOG4CXX_DEBUG(logger_, "SSL connection recreation");
+ SDL_LOG_DEBUG("SSL connection recreation");
SSL_CTX* ssl_context = connection_->ctx;
SSL_free(connection_);
connection_ = SSL_new(ssl_context);
@@ -647,8 +639,7 @@ std::string CryptoManagerImpl::SSLContextImpl::GetTextBy(X509_NAME* name,
const int req_len = X509_NAME_get_text_by_NID(name, object, NULL, 0);
if (-1 == req_len) {
- LOG4CXX_WARN(logger_,
- "Unable to obtain object: " << object << " from certificate");
+ SDL_LOG_WARN("Unable to obtain object: " << object << " from certificate");
return std::string();
}
diff --git a/src/components/security_manager/test/security_manager_test.cc b/src/components/security_manager/test/security_manager_test.cc
index 7906ae7006..4145334115 100644
--- a/src/components/security_manager/test/security_manager_test.cc
+++ b/src/components/security_manager/test/security_manager_test.cc
@@ -70,6 +70,7 @@ using security_manager::SSLContext;
using security_manager_test::InternalErrorWithErrId;
using ::testing::_;
+using ::testing::An;
using ::testing::DoAll;
using ::testing::Return;
using ::testing::ReturnNull;
@@ -286,7 +287,7 @@ TEST_F(SecurityManagerTest, SecurityManager_NULLCryptoManager) {
TestAsyncWaiter waiter;
EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
- ProtocolVersionUsed(connection_id, session_id, _))
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.WillOnce(Return(true));
EXPECT_CALL(mock_protocol_handler,
@@ -332,7 +333,7 @@ TEST_F(SecurityManagerTest, GetEmptyQuery) {
// uint8_t protocol_version = 0;
EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
- ProtocolVersionUsed(connection_id, session_id, _))
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.WillOnce(Return(true));
EXPECT_CALL(
@@ -354,7 +355,7 @@ TEST_F(SecurityManagerTest, GetWrongJSONSize) {
// uint8_t protocol_version = 0;
EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
- ProtocolVersionUsed(connection_id, session_id, _))
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.WillOnce(Return(true));
// Expect InternalError with ERROR_ID
EXPECT_CALL(
@@ -382,7 +383,7 @@ TEST_F(SecurityManagerTest, GetInvalidQueryId) {
.WillOnce(NotifyTestAsyncWaiter(&waiter));
times++;
EXPECT_CALL(mock_session_observer,
- ProtocolVersionUsed(connection_id, session_id, _))
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
times++;
@@ -429,7 +430,7 @@ TEST_F(SecurityManagerTest, CreateSSLContext_ErrorCreateSSL) {
// uint8_t protocol_version = 0;
EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
- ProtocolVersionUsed(connection_id, session_id, _))
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.WillOnce(Return(true));
EXPECT_CALL(mock_protocol_handler,
SendMessageToMobileApp(
@@ -459,7 +460,7 @@ TEST_F(SecurityManagerTest, CreateSSLContext_SetSSLContextError) {
// uint8_t protocol_version = 0;
EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
- ProtocolVersionUsed(connection_id, session_id, _))
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.WillOnce(Return(true));
EXPECT_CALL(
@@ -515,7 +516,7 @@ TEST_F(SecurityManagerTest, StartHandshake_ServiceStillUnprotected) {
// uint8_t protocol_version = 0;
EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
- ProtocolVersionUsed(connection_id, session_id, _))
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.WillOnce(Return(true));
// Expect InternalError with ERROR_INTERNAL
EXPECT_CALL(mock_protocol_handler,
@@ -548,7 +549,7 @@ TEST_F(SecurityManagerTest, StartHandshake_SSLInternalError) {
EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
- ProtocolVersionUsed(connection_id, session_id, _))
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.WillOnce(Return(true));
// Expect notifying listeners (unsuccess)
EXPECT_CALL(*mock_sm_listener,
@@ -571,7 +572,7 @@ TEST_F(SecurityManagerTest, StartHandshake_SSLInternalError) {
* Shall send InternallError on
* getting SEND_HANDSHAKE_DATA with NULL data
*/
-TEST_F(SecurityManagerTest, ProccessHandshakeData_WrongDataSize) {
+TEST_F(SecurityManagerTest, ProcessHandshakeData_WrongDataSize) {
SetMockCryptoManager();
uint32_t connection_id = 0;
uint8_t session_id = 0;
@@ -579,7 +580,7 @@ TEST_F(SecurityManagerTest, ProccessHandshakeData_WrongDataSize) {
TestAsyncWaiter waiter;
EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _));
EXPECT_CALL(mock_session_observer,
- ProtocolVersionUsed(connection_id, session_id, _))
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.WillOnce(Return(true));
// Expect InternalError with ERROR_ID
@@ -600,8 +601,7 @@ TEST_F(SecurityManagerTest, ProccessHandshakeData_WrongDataSize) {
* getting SEND_HANDSHAKE_DATA from mobile side
* for service which is not protected
*/
-TEST_F(SecurityManagerTest,
- DISABLED_ProccessHandshakeData_ServiceNotProtected) {
+TEST_F(SecurityManagerTest, DISABLED_ProcessHandshakeData_ServiceNotProtected) {
SetMockCryptoManager();
// Expect InternalError with ERROR_ID
uint32_t connection_id = 0;
@@ -613,7 +613,7 @@ TEST_F(SecurityManagerTest,
.WillOnce(NotifyTestAsyncWaiter(&waiter));
times++;
EXPECT_CALL(mock_session_observer,
- ProtocolVersionUsed(connection_id, session_id, _))
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
times++;
EXPECT_CALL(
@@ -649,7 +649,7 @@ TEST_F(SecurityManagerTest,
* SEND_HANDSHAKE_DATA from mobile side with invalid handshake
* data (DoHandshakeStep return NULL pointer)
*/
-TEST_F(SecurityManagerTest, ProccessHandshakeData_InvalidData) {
+TEST_F(SecurityManagerTest, ProcessHandshakeData_InvalidData) {
SetMockCryptoManager();
// Count handshake calls
@@ -665,7 +665,7 @@ TEST_F(SecurityManagerTest, ProccessHandshakeData_InvalidData) {
.WillRepeatedly(NotifyTestAsyncWaiter(&waiter));
times += handshake_emulates;
EXPECT_CALL(mock_session_observer,
- ProtocolVersionUsed(connection_id, session_id, _))
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.Times(handshake_emulates)
.WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
times += handshake_emulates;
@@ -732,7 +732,7 @@ TEST_F(SecurityManagerTest, ProccessHandshakeData_InvalidData) {
* Shall send HandshakeData on getting SEND_HANDSHAKE_DATA from mobile side
* with correct handshake data Check Fail and sussecc states
*/
-TEST_F(SecurityManagerTest, ProccessHandshakeData_Answer) {
+TEST_F(SecurityManagerTest, ProcessHandshakeData_Answer) {
SetMockCryptoManager();
// Count handshake calls
const int handshake_emulates = 2;
@@ -747,7 +747,7 @@ TEST_F(SecurityManagerTest, ProccessHandshakeData_Answer) {
.WillRepeatedly(NotifyTestAsyncWaiter(&waiter));
times += handshake_emulates;
EXPECT_CALL(mock_session_observer,
- ProtocolVersionUsed(connection_id, session_id, _))
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.Times(handshake_emulates)
.WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
times += handshake_emulates;
@@ -808,7 +808,7 @@ TEST_F(SecurityManagerTest, ProccessHandshakeData_Answer) {
* and return handshake data
* Check Fail and sussecc states
*/
-TEST_F(SecurityManagerTest, ProccessHandshakeData_HandshakeFinished) {
+TEST_F(SecurityManagerTest, ProcessHandshakeData_HandshakeFinished) {
SetMockCryptoManager();
// Count handshake calls
const int handshake_emulates = 6;
@@ -878,7 +878,7 @@ TEST_F(SecurityManagerTest, ProccessHandshakeData_HandshakeFinished) {
// uint8_t protocol_version = 0;
EXPECT_CALL(mock_session_observer, PairFromKey(kKey, _, _)).Times(2);
EXPECT_CALL(mock_session_observer,
- ProtocolVersionUsed(connection_id, session_id, _))
+ ProtocolVersionUsed(connection_id, session_id, An<uint8_t&>()))
.Times(2)
.WillRepeatedly(DoAll(NotifyTestAsyncWaiter(&waiter), Return(true)));
times += 2; // matches to the number above
diff --git a/src/components/security_manager/test/security_query_matcher.cc b/src/components/security_manager/test/security_query_matcher.cc
index 1bf22bf8cd..b9a4f83b10 100644
--- a/src/components/security_manager/test/security_query_matcher.cc
+++ b/src/components/security_manager/test/security_query_matcher.cc
@@ -90,15 +90,12 @@ MATCHER_P(InternalErrorWithErrId,
} // namespace security_manager_test
} // namespace components
} // namespace test
- /*
- * Matcher for checking QueryHeader equal in GTests
- */
-::testing::AssertionResult QueryHeader_EQ(
- const char* m_expr,
- const char* n_expr,
- const ::security_manager::SecurityQuery::QueryHeader& q1,
- const ::security_manager::SecurityQuery::QueryHeader& q2);
+#ifdef BUILD_TESTS
+/*
+ * Matcher for checking QueryHeader equal in GTests
+ */
+// cppcheck-suppress unusedFunction //Used in unit tests
::testing::AssertionResult QueryHeader_EQ(
const char* m_expr,
const char* n_expr,
@@ -121,3 +118,4 @@ MATCHER_P(InternalErrorWithErrId,
<< ", seq_number_2=" << q2.seq_number;
return ::testing::AssertionSuccess();
}
+#endif // BUILD_TESTS
diff --git a/src/components/smart_objects/include/smart_objects/always_false_schema_item.h b/src/components/smart_objects/include/smart_objects/always_false_schema_item.h
index 05c53ec582..7b92bc9748 100644
--- a/src/components/smart_objects/include/smart_objects/always_false_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/always_false_schema_item.h
@@ -51,7 +51,7 @@ class CAlwaysFalseSchemaItem : public ISchemaItem {
/**
* @brief Validate smart object.
* @param Object Object to validate.
- * @param report__ object for reporting errors during validation
+ * @param report object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
* @param allow_unknown_enums
* false - unknown enum values (left as string values after applySchema)
@@ -61,7 +61,7 @@ class CAlwaysFalseSchemaItem : public ISchemaItem {
**/
errors::eType validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion = utils::SemanticVersion(),
const bool allow_unknown_enums = false) OVERRIDE;
diff --git a/src/components/smart_objects/include/smart_objects/always_true_schema_item.h b/src/components/smart_objects/include/smart_objects/always_true_schema_item.h
index a2d305d0f9..b0bb3f2fa6 100644
--- a/src/components/smart_objects/include/smart_objects/always_true_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/always_true_schema_item.h
@@ -51,7 +51,7 @@ class CAlwaysTrueSchemaItem : public ISchemaItem {
/**
* @brief Validate smart object.
* @param Object Object to validate.
- * @param report__ object for reporting errors during validation
+ * @param report object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
* @param allow_unknown_enums
* false - unknown enum values (left as string values after applySchema)
@@ -61,7 +61,7 @@ class CAlwaysTrueSchemaItem : public ISchemaItem {
**/
errors::eType validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion = utils::SemanticVersion(),
const bool allow_unknown_enums = false) OVERRIDE;
diff --git a/src/components/smart_objects/include/smart_objects/array_schema_item.h b/src/components/smart_objects/include/smart_objects/array_schema_item.h
index 0e19d2237e..8f9a179fff 100644
--- a/src/components/smart_objects/include/smart_objects/array_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/array_schema_item.h
@@ -66,7 +66,7 @@ class CArraySchemaItem : public ISchemaItem {
/**
* @brief Validate smart object.
* @param Object Object to validate.
- * @param report__ object for reporting errors during validation
+ * @param report object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
* @param allow_unknown_enums
* false - unknown enum values (left as string values after applySchema)
@@ -76,17 +76,21 @@ class CArraySchemaItem : public ISchemaItem {
**/
errors::eType validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion = utils::SemanticVersion(),
const bool allow_unknown_enums = false) OVERRIDE;
+ bool filterInvalidEnums(SmartObject& Object,
+ const utils::SemanticVersion& MessageVersion,
+ rpc::ValidationReport* report) OVERRIDE;
+
/**
* @brief Apply schema.
*
* @param Object Object to apply schema.
* @param remove_unknown_parameters contains true if need to remove unknown
- *parameters
- * from smart object otherwise contains false.
+ * parameters from smart object, otherwise contains false.
+ * @param MessageVersion the version of the schema to be applied
**/
void applySchema(SmartObject& Object,
const bool remove_unknown_parameters,
@@ -113,6 +117,8 @@ class CArraySchemaItem : public ISchemaItem {
void BuildObjectBySchema(const SmartObject& pattern_object,
SmartObject& result_object) OVERRIDE;
+ TypeID GetType() OVERRIDE;
+
private:
/**
* @brief Constructor.
@@ -124,6 +130,7 @@ class CArraySchemaItem : public ISchemaItem {
CArraySchemaItem(const ISchemaItemPtr ElementSchemaItem,
const TSchemaItemParameter<size_t>& MinSize,
const TSchemaItemParameter<size_t>& MaxSize);
+
/**
* @brief SchemaItem for array elements.
**/
diff --git a/src/components/smart_objects/include/smart_objects/bool_schema_item.h b/src/components/smart_objects/include/smart_objects/bool_schema_item.h
index 3a9f6c929d..b652799a27 100644
--- a/src/components/smart_objects/include/smart_objects/bool_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/bool_schema_item.h
@@ -51,6 +51,8 @@ class CBoolSchemaItem : public CDefaultSchemaItem<bool> {
const TSchemaItemParameter<bool>& DefaultValue =
TSchemaItemParameter<bool>());
+ TypeID GetType() OVERRIDE;
+
private:
explicit CBoolSchemaItem(const TSchemaItemParameter<bool>& DefaultValue);
SmartType getSmartType() const OVERRIDE;
diff --git a/src/components/smart_objects/include/smart_objects/default_shema_item.h b/src/components/smart_objects/include/smart_objects/default_shema_item.h
index 16dbad4426..bcb610cb33 100644
--- a/src/components/smart_objects/include/smart_objects/default_shema_item.h
+++ b/src/components/smart_objects/include/smart_objects/default_shema_item.h
@@ -51,7 +51,7 @@ class CDefaultSchemaItem : public ISchemaItem {
/**
* @brief Validate smart object.
* @param Object Object to validate.
- * @param report__ object for reporting errors during validation
+ * @param report object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
* @param allow_unknown_enums
* false - unknown enum values (left as string values after applySchema)
@@ -61,7 +61,7 @@ class CDefaultSchemaItem : public ISchemaItem {
**/
errors::eType validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion = utils::SemanticVersion(),
const bool allow_unknown_enums = false) OVERRIDE;
@@ -109,7 +109,7 @@ CDefaultSchemaItem<Type>::CDefaultSchemaItem(const ParameterType& DefaultValue)
template <typename Type>
errors::eType CDefaultSchemaItem<Type>::validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion,
const bool allow_unknown_enums) {
if (getSmartType() != Object.getType()) {
@@ -117,7 +117,7 @@ errors::eType CDefaultSchemaItem<Type>::validate(
"Incorrect type, expected: " +
SmartObject::typeToString(getSmartType()) +
", got: " + SmartObject::typeToString(Object.getType());
- report__->set_validation_info(validation_info);
+ report->set_validation_info(validation_info);
return errors::INVALID_VALUE;
} else {
return errors::OK;
diff --git a/src/components/smart_objects/include/smart_objects/enum_schema_item.h b/src/components/smart_objects/include/smart_objects/enum_schema_item.h
index 053ad98395..de4c3adcc8 100644
--- a/src/components/smart_objects/include/smart_objects/enum_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/enum_schema_item.h
@@ -106,7 +106,7 @@ class TEnumSchemaItem : public CDefaultSchemaItem<EnumType> {
/**
* @brief Validate smart object.
* @param Object Object to validate.
- * @param report__ object for reporting errors during validation
+ * @param report object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
* @param allow_unknown_enums
* false - unknown enum values (left as string values after applySchema)
@@ -116,7 +116,7 @@ class TEnumSchemaItem : public CDefaultSchemaItem<EnumType> {
**/
errors::eType validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion = utils::SemanticVersion(),
const bool allow_unknown_enums = false) OVERRIDE;
/**
@@ -128,15 +128,17 @@ class TEnumSchemaItem : public CDefaultSchemaItem<EnumType> {
const std::vector<ElementSignature>& signatures,
const utils::SemanticVersion& MessageVersion);
+ bool filterInvalidEnums(SmartObject& Object,
+ const utils::SemanticVersion& MessageVersion,
+ rpc::ValidationReport* report) OVERRIDE;
+
/**
* @brief Apply schema.
- * This implementation checks if enumeration is represented as string
- * and tries to convert it to integer according to element-to-string
- * map.
+ *
* @param Object Object to apply schema.
* @param remove_unknown_parameters contains true if need to remove unknown
- *parameters
- * from smart object otherwise contains false.
+ * parameters from smart object, otherwise contains false.
+ * @param MessageVersion the version of the schema to be applied
**/
void applySchema(SmartObject& Object,
const bool remove_unknown_parameters,
@@ -166,6 +168,7 @@ class TEnumSchemaItem : public CDefaultSchemaItem<EnumType> {
ElementSignatures);
SmartType getSmartType() const OVERRIDE;
EnumType getDefaultValue() const OVERRIDE;
+ TypeID GetType() OVERRIDE;
/**
* @brief Set of allowed enumeration elements.
**/
@@ -203,6 +206,9 @@ class EnumConversionHelper {
typename CStringToEnumMap::const_iterator it =
cstring_to_enum_map().find(str);
if (it == cstring_to_enum_map().end()) {
+ if (value) {
+ *value = EnumType::INVALID_ENUM;
+ }
return false;
}
if (value) {
@@ -312,25 +318,39 @@ const ElementSignature TEnumSchemaItem<EnumType>::getSignature(
}
template <typename EnumType>
+bool TEnumSchemaItem<EnumType>::filterInvalidEnums(
+ SmartObject& Object,
+ const utils::SemanticVersion& MessageVersion,
+ rpc::ValidationReport* report) {
+ rpc::ValidationReport dummy_report("");
+ if (validate(Object, &dummy_report, MessageVersion) == errors::OUT_OF_RANGE) {
+ std::string validation_info =
+ "Ignored invalid value - " + Object.asString();
+ report->set_validation_info(validation_info);
+ return true;
+ }
+ return false;
+}
+
+template <typename EnumType>
errors::eType TEnumSchemaItem<EnumType>::validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion,
const bool allow_unknown_enums) {
- if (SmartType_Integer != Object.getType()) {
- std::string validation_info;
- if (SmartType_String == Object.getType()) {
- if (allow_unknown_enums) {
- return errors::OK;
- }
- validation_info = "Invalid enum value: " + Object.asString();
- } else {
- validation_info =
- "Incorrect type, expected: " +
- SmartObject::typeToString(SmartType_Integer) +
- " (enum), got: " + SmartObject::typeToString(Object.getType());
+ if (SmartType_String == Object.getType()) {
+ if (allow_unknown_enums) {
+ return errors::OK;
}
- report__->set_validation_info(validation_info);
+ std::string validation_info = "Invalid enum value: " + Object.asString();
+ report->set_validation_info(validation_info);
+ return errors::OUT_OF_RANGE;
+ } else if (SmartType_Integer != Object.getType()) {
+ std::string validation_info =
+ "Incorrect type, expected: " +
+ SmartObject::typeToString(SmartType_Integer) +
+ " (enum), got: " + SmartObject::typeToString(Object.getType());
+ report->set_validation_info(validation_info);
return errors::INVALID_VALUE;
}
@@ -338,10 +358,9 @@ errors::eType TEnumSchemaItem<EnumType>::validate(
mAllowedElements.find(static_cast<EnumType>(Object.asInt()));
if (elements_it == mAllowedElements.end()) {
- std::stringstream stream;
- stream << "Invalid enum value: " << Object.asInt();
- std::string validation_info = stream.str();
- report__->set_validation_info(validation_info);
+ std::string validation_info =
+ "Invalid enum value: " + std::to_string(Object.asInt());
+ report->set_validation_info(validation_info);
return errors::OUT_OF_RANGE;
}
@@ -358,16 +377,16 @@ errors::eType TEnumSchemaItem<EnumType>::validate(
std::string validation_info = "Enum value : " + Object.asString() +
" removed for SyncMsgVersion " +
MessageVersion.toString();
- report__->set_validation_info(validation_info);
- return errors::INVALID_VALUE;
+ report->set_validation_info(validation_info);
+ return errors::OUT_OF_RANGE;
} else if (signature.mSince == boost::none &&
signature.mUntil == boost::none) {
// Element does not exist for this version
std::string validation_info = "Enum value : " + Object.asString() +
" does not exist for SyncMsgVersion " +
MessageVersion.toString();
- report__->set_validation_info(validation_info);
- return errors::INVALID_VALUE;
+ report->set_validation_info(validation_info);
+ return errors::OUT_OF_RANGE;
}
}
}
@@ -410,6 +429,11 @@ EnumType TEnumSchemaItem<EnumType>::getDefaultValue() const {
}
template <typename EnumType>
+TypeID TEnumSchemaItem<EnumType>::GetType() {
+ return TYPE_ENUM;
+}
+
+template <typename EnumType>
TEnumSchemaItem<EnumType>::TEnumSchemaItem(
const std::set<EnumType>& AllowedElements,
const TSchemaItemParameter<EnumType>& DefaultValue)
diff --git a/src/components/smart_objects/include/smart_objects/number_schema_item.h b/src/components/smart_objects/include/smart_objects/number_schema_item.h
index c3767e8e48..25b7684829 100644
--- a/src/components/smart_objects/include/smart_objects/number_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/number_schema_item.h
@@ -68,7 +68,7 @@ class TNumberSchemaItem : public CDefaultSchemaItem<NumberType> {
/**
* @brief Validate smart object.
* @param Object Object to validate.
- * @param report__ object for reporting errors during validation
+ * @param report object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
* @param allow_unknown_enums
* false - unknown enum values (left as string values after applySchema)
@@ -78,10 +78,12 @@ class TNumberSchemaItem : public CDefaultSchemaItem<NumberType> {
**/
errors::eType validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion = utils::SemanticVersion(),
const bool allow_unknown_enums = false) OVERRIDE;
+ TypeID GetType() OVERRIDE;
+
private:
/**
* @brief Get smart type for this NumberType.
@@ -142,7 +144,7 @@ bool TNumberSchemaItem<NumberType>::isValidNumberType(SmartType type) {
template <typename NumberType>
errors::eType TNumberSchemaItem<NumberType>::validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion,
const bool allow_unknown_enums) {
if (!isValidNumberType(Object.getType())) {
@@ -152,7 +154,7 @@ errors::eType TNumberSchemaItem<NumberType>::validate(
std::string validation_info =
"Incorrect type, expected: " + SmartObject::typeToString(expectedType) +
", got: " + SmartObject::typeToString(Object.getType());
- report__->set_validation_info(validation_info);
+ report->set_validation_info(validation_info);
return errors::INVALID_VALUE;
}
NumberType value(0);
@@ -176,7 +178,7 @@ errors::eType TNumberSchemaItem<NumberType>::validate(
stream << "Value too small, got: " << value
<< ", minimum allowed: " << rangeLimit;
std::string validation_info = stream.str();
- report__->set_validation_info(validation_info);
+ report->set_validation_info(validation_info);
return errors::OUT_OF_RANGE;
}
@@ -185,13 +187,18 @@ errors::eType TNumberSchemaItem<NumberType>::validate(
stream << "Value too large, got: " << value
<< ", maximum allowed: " << rangeLimit;
std::string validation_info = stream.str();
- report__->set_validation_info(validation_info);
+ report->set_validation_info(validation_info);
return errors::OUT_OF_RANGE;
}
return errors::OK;
}
template <typename NumberType>
+TypeID TNumberSchemaItem<NumberType>::GetType() {
+ return TYPE_NUMBER;
+}
+
+template <typename NumberType>
TNumberSchemaItem<NumberType>::TNumberSchemaItem(
const TSchemaItemParameter<NumberType>& MinValue,
const TSchemaItemParameter<NumberType>& MaxValue,
diff --git a/src/components/smart_objects/include/smart_objects/object_schema_item.h b/src/components/smart_objects/include/smart_objects/object_schema_item.h
index 58e13106d4..d5c8a7f3e9 100644
--- a/src/components/smart_objects/include/smart_objects/object_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/object_schema_item.h
@@ -110,7 +110,7 @@ class CObjectSchemaItem : public ISchemaItem {
/**
* @brief Validate smart object.
* @param Object Object to validate.
- * @param report__ object for reporting errors during validation
+ * @param report object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
* @param allow_unknown_enums
* false - unknown enum values (left as string values after applySchema)
@@ -120,15 +120,21 @@ class CObjectSchemaItem : public ISchemaItem {
**/
errors::eType validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion = utils::SemanticVersion(),
const bool allow_unknown_enums = false) OVERRIDE;
+
+ bool filterInvalidEnums(SmartObject& Object,
+ const utils::SemanticVersion& MessageVersion,
+ rpc::ValidationReport* report) OVERRIDE;
+
/**
* @brief Apply schema.
+ *
* @param Object Object to apply schema.
* @param remove_unknown_parameters contains true if need to remove unknown
- *parameters
- * from smart object otherwise contains false.
+ * parameters from smart object, otherwise contains false.
+ * @param MessageVersion the version of the schema to be applied
**/
void applySchema(SmartObject& Object,
const bool remove_unknown_parameters,
@@ -138,7 +144,7 @@ class CObjectSchemaItem : public ISchemaItem {
* @brief Unapply schema.
* @param Object Object to unapply schema.
* @param remove_unknown_parameters contains true if need to remove unknown
- *parameters
+ * parameters
**/
void unapplySchema(SmartObject& Object,
const bool remove_unknown_parameters) OVERRIDE;
@@ -156,6 +162,8 @@ class CObjectSchemaItem : public ISchemaItem {
*/
size_t GetMemberSize() OVERRIDE;
+ TypeID GetType() OVERRIDE;
+
boost::optional<SMember&> GetMemberSchemaItem(
const std::string& member_key) OVERRIDE;
@@ -171,25 +179,27 @@ class CObjectSchemaItem : public ISchemaItem {
CObjectSchemaItem(const Members& Members);
/**
- * @brief Removes fake parameters from object.
- * @param Object Object to remove fake parameters.
+ * @brief Removes unknown parameters from object.
+ * @param Object Object to remove unknown parameters.
+ * @param MessageVersion The version to check against for which parameters are
+ * unknown.
**/
- void RemoveFakeParams(SmartObject& Object,
- const utils::SemanticVersion& MessageVersion);
+ void RemoveUnknownParams(SmartObject& Object,
+ const utils::SemanticVersion& MessageVersion);
/**
* @brief Returns the correct schema item based on message version.
* @param member Schema member
* @param MessageVersion Semantic Version of mobile message.
* @return Pointer to correct schema item if item found or nullptr, if item
- *was not found.
+ * was not found.
**/
const SMember* GetCorrectMember(const SMember& member,
const utils::SemanticVersion& messageVersion);
/**
* @brief Map of member name to SMember structure describing the object
- *member.
+ * member.
**/
Members mMembers;
DISALLOW_COPY_AND_ASSIGN(CObjectSchemaItem);
diff --git a/src/components/smart_objects/include/smart_objects/schema_item.h b/src/components/smart_objects/include/smart_objects/schema_item.h
index 9c29e66f36..1b1395739b 100644
--- a/src/components/smart_objects/include/smart_objects/schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/schema_item.h
@@ -49,6 +49,16 @@ namespace ns_smart_objects {
class SmartObject;
class SMember;
+enum TypeID {
+ TYPE_NONE,
+ TYPE_OBJECT,
+ TYPE_ARRAY,
+ TYPE_STRING,
+ TYPE_NUMBER,
+ TYPE_ENUM,
+ TYPE_BOOLEAN
+};
+
/**
* @brief Base schema item.
**/
@@ -58,7 +68,7 @@ class ISchemaItem {
* @brief Validate smart object.
*
* @param Object Object to validate.
- * @param report__ object for reporting errors during validation
+ * @param report object for reporting errors during validation
* message if an error occurs
* @param MessageVersion to check mobile RPC version against RPC Spec History
* @param allow_unknown_enums
@@ -69,7 +79,7 @@ class ISchemaItem {
**/
virtual errors::eType validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion = utils::SemanticVersion(),
const bool allow_unknown_enums = false);
@@ -92,12 +102,26 @@ class ISchemaItem {
virtual bool hasDefaultValue(SmartObject& Object);
/**
+ * @brief Filter invalid enum values
+ *
+ * @param Object Object to check for invalid enum values
+ * @param MessageVersion the version of the schema to use for validation
+ * @param report object for reporting enums which were removed during the
+ * process
+ *
+ * @return true if the value being checked should be filtered, false otherwise
+ **/
+ virtual bool filterInvalidEnums(SmartObject& Object,
+ const utils::SemanticVersion& MessageVersion,
+ rpc::ValidationReport* report);
+
+ /**
* @brief Apply schema.
*
* @param Object Object to apply schema.
* @param remove_unknown_parameters contains true if need to remove unknown
- *parameters
- * from smart object otherwise contains false.
+ * parameters from smart object, otherwise contains false.
+ * @param MessageVersion the version of the schema to be applied
**/
virtual void applySchema(
ns_smart_device_link::ns_smart_objects::SmartObject& Object,
@@ -143,6 +167,13 @@ class ISchemaItem {
*/
virtual size_t GetMemberSize();
+ /**
+ * @brief Get type ID of schema
+ *
+ * @return The type ID of this schema
+ */
+ virtual TypeID GetType();
+
virtual ~ISchemaItem() {}
};
typedef std::shared_ptr<ISchemaItem> ISchemaItemPtr;
diff --git a/src/components/smart_objects/include/smart_objects/smart_object.h b/src/components/smart_objects/include/smart_objects/smart_object.h
index f3aab0fc1e..6ce9f96d8b 100644
--- a/src/components/smart_objects/include/smart_objects/smart_object.h
+++ b/src/components/smart_objects/include/smart_objects/smart_object.h
@@ -674,7 +674,7 @@ class SmartObject FINAL {
/**
* @brief Validates object according to attached schema.
*
- * @param report__ object for reporting errors during validation
+ * @param report object for reporting errors during validation
* @param messageVersion of the mobile app to check against RPC Spec Schema
* @param allow_unknown_enums
* false - unknown enum values (left as string values after applySchema)
@@ -683,7 +683,7 @@ class SmartObject FINAL {
* @return Result of validation.
*/
errors::eType validate(
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion = utils::SemanticVersion(),
const bool allow_unknown_enums = false);
diff --git a/src/components/smart_objects/include/smart_objects/smart_schema.h b/src/components/smart_objects/include/smart_objects/smart_schema.h
index 8cbafa53b2..b44ac98afd 100644
--- a/src/components/smart_objects/include/smart_objects/smart_schema.h
+++ b/src/components/smart_objects/include/smart_objects/smart_schema.h
@@ -64,7 +64,7 @@ class CSmartSchema FINAL {
* @brief Validate smart object.
*
* @param Object Object to validate.
- * @param report__ object for reporting errors during validation
+ * @param report object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
* @param allow_unknown_enums
* false - unknown enum values (left as string values after applySchema)
@@ -74,7 +74,7 @@ class CSmartSchema FINAL {
**/
errors::eType validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& messageVersion = utils::SemanticVersion(),
const bool allow_unknown_enums = false) const;
@@ -96,22 +96,23 @@ class CSmartSchema FINAL {
* @brief Apply schema.
*
* @param Object Object to apply schema.
- *
* @param remove_unknown_parameters contains true if need to remove unknown
- *parameters
- * from smart object otherwise contains false.
+ * parameters from smart object, otherwise contains false.
+ * @param MessageVersion the version of the schema to be applied
+ * @param report object for reporting warnings during schema application
**/
void applySchema(
SmartObject& Object,
const bool remove_unknown_parameters,
- const utils::SemanticVersion& MessageVersion = utils::SemanticVersion());
+ const utils::SemanticVersion& MessageVersion = utils::SemanticVersion(),
+ rpc::ValidationReport* report = nullptr);
/**
* @brief The reverse SmartObject conversion using schema.
*
* @param object Object to convert.
* @param remove_unknown_parameters contains true if need to remove unknown
- *parameters
+ * parameters
*/
// TODO(cpplint): Is this a non-const reference?
// If so, make const or use a pointer.
diff --git a/src/components/smart_objects/include/smart_objects/string_schema_item.h b/src/components/smart_objects/include/smart_objects/string_schema_item.h
index 7104ff47a9..8f8f516e38 100644
--- a/src/components/smart_objects/include/smart_objects/string_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/string_schema_item.h
@@ -63,7 +63,7 @@ class CStringSchemaItem : public CDefaultSchemaItem<std::string> {
/**
* @brief Validate smart object.
* @param Object Object to validate.
- * @param report__ object for reporting errors during validation
+ * @param report object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
* @param allow_unknown_enums
* false - unknown enum values (left as string values after applySchema)
@@ -73,10 +73,12 @@ class CStringSchemaItem : public CDefaultSchemaItem<std::string> {
**/
errors::eType validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion = utils::SemanticVersion(),
const bool allow_unknown_enums = false) OVERRIDE;
+ TypeID GetType() OVERRIDE;
+
private:
/**
* @brief Constructor.
diff --git a/src/components/smart_objects/src/always_false_schema_item.cc b/src/components/smart_objects/src/always_false_schema_item.cc
index 4f8f4584af..45955c79da 100644
--- a/src/components/smart_objects/src/always_false_schema_item.cc
+++ b/src/components/smart_objects/src/always_false_schema_item.cc
@@ -43,10 +43,10 @@ std::shared_ptr<CAlwaysFalseSchemaItem> CAlwaysFalseSchemaItem::create() {
errors::eType CAlwaysFalseSchemaItem::validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion,
const bool allow_unknown_enums) {
- report__->set_validation_info("Generic error");
+ report->set_validation_info("Generic error");
return errors::ERROR;
}
diff --git a/src/components/smart_objects/src/always_true_schema_item.cc b/src/components/smart_objects/src/always_true_schema_item.cc
index 855bfef2a0..6df8b3a63d 100644
--- a/src/components/smart_objects/src/always_true_schema_item.cc
+++ b/src/components/smart_objects/src/always_true_schema_item.cc
@@ -41,7 +41,7 @@ std::shared_ptr<CAlwaysTrueSchemaItem> CAlwaysTrueSchemaItem::create() {
errors::eType CAlwaysTrueSchemaItem::validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion,
const bool allow_unknown_enums) {
return errors::OK;
diff --git a/src/components/smart_objects/src/array_schema_item.cc b/src/components/smart_objects/src/array_schema_item.cc
index 9420fe020f..3c28396213 100644
--- a/src/components/smart_objects/src/array_schema_item.cc
+++ b/src/components/smart_objects/src/array_schema_item.cc
@@ -29,6 +29,8 @@
// POSSIBILITY OF SUCH DAMAGE.
#include "smart_objects/array_schema_item.h"
+
+#include "smart_objects/enum_schema_item.h"
#include "smart_objects/smart_object.h"
namespace ns_smart_device_link {
@@ -44,7 +46,7 @@ std::shared_ptr<CArraySchemaItem> CArraySchemaItem::create(
errors::eType CArraySchemaItem::validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion,
const bool allow_unknown_enums) {
if (SmartType_Array != Object.getType()) {
@@ -52,7 +54,7 @@ errors::eType CArraySchemaItem::validate(
"Incorrect type, expected: " +
SmartObject::typeToString(SmartType_Array) +
", got: " + SmartObject::typeToString(Object.getType());
- report__->set_validation_info(validation_info);
+ report->set_validation_info(validation_info);
return errors::INVALID_VALUE;
}
size_t sizeLimit;
@@ -63,7 +65,7 @@ errors::eType CArraySchemaItem::validate(
stream << "Got array of size: " << array_len
<< ", minimum allowed: " << sizeLimit;
std::string validation_info = stream.str();
- report__->set_validation_info(validation_info);
+ report->set_validation_info(validation_info);
return errors::OUT_OF_RANGE;
}
if (mMaxSize.getValue(sizeLimit) && (array_len > sizeLimit)) {
@@ -71,18 +73,16 @@ errors::eType CArraySchemaItem::validate(
stream << "Got array of size: " << array_len
<< ", maximum allowed: " << sizeLimit;
std::string validation_info = stream.str();
- report__->set_validation_info(validation_info);
+ report->set_validation_info(validation_info);
return errors::OUT_OF_RANGE;
}
for (size_t i = 0u; i < array_len; ++i) {
- std::stringstream strVal;
- strVal << i;
- const errors::eType result =
- mElementSchemaItem->validate(Object.getElement(i),
- &report__->ReportSubobject(strVal.str()),
- MessageVersion,
- allow_unknown_enums);
+ const errors::eType result = mElementSchemaItem->validate(
+ Object.getElement(i),
+ &report->ReportSubobject(std::to_string(i)),
+ MessageVersion,
+ allow_unknown_enums);
if (errors::OK != result) {
return result;
}
@@ -90,6 +90,36 @@ errors::eType CArraySchemaItem::validate(
return errors::OK;
}
+bool CArraySchemaItem::filterInvalidEnums(
+ SmartObject& Object,
+ const utils::SemanticVersion& MessageVersion,
+ rpc::ValidationReport* report) {
+ if (SmartType_Array != Object.getType()) {
+ return false;
+ }
+
+ int index = 0;
+ auto array = Object.asArray();
+ size_t initial_size = array->size();
+ auto should_erase =
+ [this, MessageVersion, report, &index](SmartObject& element) {
+ // If filterInvalidEnums returns true, the checked element
+ // is now invalid and should be filtered
+ return mElementSchemaItem->filterInvalidEnums(
+ element,
+ MessageVersion,
+ &report->ReportSubobject(std::to_string(index++)));
+ };
+ array->erase(std::remove_if(array->begin(), array->end(), should_erase),
+ array->end());
+
+ // Mark this container as invalid if it is below the minimum size after
+ // filtering one or more elements
+ size_t min_size;
+ return array->size() < initial_size && mMinSize.getValue(min_size) &&
+ array->size() < min_size;
+}
+
void CArraySchemaItem::applySchema(
SmartObject& Object,
const bool remove_unknown_parameters,
@@ -127,6 +157,10 @@ void CArraySchemaItem::BuildObjectBySchema(const SmartObject& pattern_object,
result_object = SmartObject(SmartType_Array);
}
+TypeID CArraySchemaItem::GetType() {
+ return TYPE_ARRAY;
+}
+
CArraySchemaItem::CArraySchemaItem(const ISchemaItemPtr ElementSchemaItem,
const TSchemaItemParameter<size_t>& MinSize,
const TSchemaItemParameter<size_t>& MaxSize)
diff --git a/src/components/smart_objects/src/bool_schema_item.cc b/src/components/smart_objects/src/bool_schema_item.cc
index a4875a1b24..f24d14acc3 100644
--- a/src/components/smart_objects/src/bool_schema_item.cc
+++ b/src/components/smart_objects/src/bool_schema_item.cc
@@ -51,5 +51,9 @@ bool CBoolSchemaItem::getDefaultValue() const {
return false;
}
+TypeID CBoolSchemaItem::GetType() {
+ return TYPE_BOOLEAN;
+}
+
} // namespace ns_smart_objects
} // namespace ns_smart_device_link
diff --git a/src/components/smart_objects/src/object_schema_item.cc b/src/components/smart_objects/src/object_schema_item.cc
index 27c64de7e2..920d548c48 100644
--- a/src/components/smart_objects/src/object_schema_item.cc
+++ b/src/components/smart_objects/src/object_schema_item.cc
@@ -35,12 +35,14 @@
#include "generated_msg_version.h"
#include "smart_objects/always_false_schema_item.h"
+#include "smart_objects/enum_schema_item.h"
#include "smart_objects/smart_object.h"
namespace {
const char connection_key[] = "connection_key";
const char binary_data[] = "binary_data";
const char app_id[] = "appID";
+const char msg_params[] = "msg_params";
const utils::SemanticVersion kModuleVersion(application_manager::major_version,
application_manager::minor_version,
application_manager::patch_version);
@@ -104,7 +106,7 @@ std::shared_ptr<CObjectSchemaItem> CObjectSchemaItem::create(
errors::eType CObjectSchemaItem::validate(
const SmartObject& object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion,
const bool allow_unknown_enums) {
if (SmartType_Map != object.getType()) {
@@ -112,7 +114,7 @@ errors::eType CObjectSchemaItem::validate(
"Incorrect type, expected: " +
SmartObject::typeToString(SmartType_Map) +
", got: " + SmartObject::typeToString(object.getType());
- report__->set_validation_info(validation_info);
+ report->set_validation_info(validation_info);
return errors::INVALID_VALUE;
}
@@ -129,19 +131,27 @@ errors::eType CObjectSchemaItem::validate(
if (correct_member && correct_member->mIsMandatory == true &&
correct_member->mIsRemoved == false) {
std::string validation_info = "Missing mandatory parameter: " + key;
- report__->set_validation_info(validation_info);
+ report->set_validation_info(validation_info);
return errors::MISSING_MANDATORY_PARAMETER;
+ } else if (key.compare(msg_params) == 0) {
+ // If the message params struct was filtered, that means that the
+ // app's version is too low to use the message.
+ std::string validation_info =
+ "Function is not available for SyncMsgVersion " +
+ MessageVersion.toString();
+ report->set_validation_info(validation_info);
+ return errors::INVALID_VALUE;
}
continue;
}
const SmartObject& field = object.getElement(key);
- errors::eType result = errors::OK;
+ errors::eType result;
// Check if MessageVersion matches schema version
if (correct_member) {
result =
correct_member->mSchemaItem->validate(field,
- &report__->ReportSubobject(key),
+ &report->ReportSubobject(key),
MessageVersion,
allow_unknown_enums);
} else {
@@ -157,6 +167,40 @@ errors::eType CObjectSchemaItem::validate(
return errors::OK;
}
+bool CObjectSchemaItem::filterInvalidEnums(
+ SmartObject& Object,
+ const utils::SemanticVersion& MessageVersion,
+ rpc::ValidationReport* report) {
+ bool valid = true;
+ for (const auto& key : Object.enumerate()) {
+ auto members_it = mMembers.find(key);
+ if (mMembers.end() == members_it) {
+ // No members found for this key, skipping over
+ continue;
+ }
+
+ const SMember* member =
+ GetCorrectMember(members_it->second, MessageVersion);
+ // Perform filtering recursively on this field
+ if (member->mSchemaItem->filterInvalidEnums(
+ Object[key], MessageVersion, &report->ReportSubobject(key))) {
+ // Object is no longer valid if the member is mandatory.
+ if (member->mIsMandatory) {
+ valid = false;
+ }
+
+ // The member is safe to filter if it is non-mandatory, only leaf nodes
+ // (individual enum values) should be filtered otherwise.
+ bool should_erase = (member->mSchemaItem->GetType() == TYPE_ENUM ||
+ !member->mIsMandatory);
+ if (should_erase) {
+ Object.erase(key);
+ }
+ }
+ }
+ return !valid;
+}
+
void CObjectSchemaItem::applySchema(
SmartObject& Object,
const bool remove_unknown_parameters,
@@ -165,10 +209,6 @@ void CObjectSchemaItem::applySchema(
return;
}
- if (remove_unknown_parameters) {
- RemoveFakeParams(Object, MessageVersion);
- }
-
SmartObject default_value;
for (const auto& item : mMembers) {
@@ -185,6 +225,10 @@ void CObjectSchemaItem::applySchema(
Object[key], remove_unknown_parameters, MessageVersion);
}
}
+
+ if (remove_unknown_parameters) {
+ RemoveUnknownParams(Object, MessageVersion);
+ }
}
void CObjectSchemaItem::unapplySchema(SmartObject& Object,
@@ -232,6 +276,10 @@ size_t CObjectSchemaItem::GetMemberSize() {
return mMembers.size();
}
+TypeID CObjectSchemaItem::GetType() {
+ return TYPE_OBJECT;
+}
+
boost::optional<SMember&> CObjectSchemaItem::GetMemberSchemaItem(
const std::string& member_key) {
auto it = mMembers.find(member_key);
@@ -250,7 +298,7 @@ void CObjectSchemaItem::AddMemberSchemaItem(const std::string& member_key,
CObjectSchemaItem::CObjectSchemaItem(const Members& members)
: mMembers(members) {}
-void CObjectSchemaItem::RemoveFakeParams(
+void CObjectSchemaItem::RemoveUnknownParams(
SmartObject& Object, const utils::SemanticVersion& MessageVersion) {
for (const auto& key : Object.enumerate()) {
std::map<std::string, SMember>::const_iterator members_it =
diff --git a/src/components/smart_objects/src/schema_item.cc b/src/components/smart_objects/src/schema_item.cc
index 8c40e2c7bd..c05b99f19e 100644
--- a/src/components/smart_objects/src/schema_item.cc
+++ b/src/components/smart_objects/src/schema_item.cc
@@ -37,7 +37,7 @@ namespace ns_smart_objects {
errors::eType ISchemaItem::validate(
const SmartObject& object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion,
const bool allow_unknown_enums) {
return errors::ERROR;
@@ -51,6 +51,13 @@ bool ISchemaItem::hasDefaultValue(SmartObject& Object) {
return false;
}
+bool ISchemaItem::filterInvalidEnums(
+ SmartObject& Object,
+ const utils::SemanticVersion& MessageVersion,
+ rpc::ValidationReport* report) {
+ return false;
+}
+
void ISchemaItem::applySchema(SmartObject& Object,
const bool remove_unknown_parameters,
const utils::SemanticVersion& MessageVersion) {}
@@ -65,5 +72,9 @@ size_t ISchemaItem::GetMemberSize() {
return 0;
}
+TypeID ISchemaItem::GetType() {
+ return TYPE_NONE;
+}
+
} // namespace ns_smart_objects
} // namespace ns_smart_device_link
diff --git a/src/components/smart_objects/src/smart_object.cc b/src/components/smart_objects/src/smart_object.cc
index d13ca87848..a8fc267615 100644
--- a/src/components/smart_objects/src/smart_object.cc
+++ b/src/components/smart_objects/src/smart_object.cc
@@ -892,11 +892,10 @@ bool SmartObject::isValid() const {
}
errors::eType SmartObject::validate(
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion,
const bool allow_unknown_enums) {
- return m_schema.validate(
- *this, report__, MessageVersion, allow_unknown_enums);
+ return m_schema.validate(*this, report, MessageVersion, allow_unknown_enums);
}
void SmartObject::setSchema(const CSmartSchema& schema) {
diff --git a/src/components/smart_objects/src/smart_schema.cc b/src/components/smart_objects/src/smart_schema.cc
index 6107d19266..6deb08da3b 100644
--- a/src/components/smart_objects/src/smart_schema.cc
+++ b/src/components/smart_objects/src/smart_schema.cc
@@ -42,11 +42,11 @@ CSmartSchema::CSmartSchema(const ISchemaItemPtr SchemaItem)
errors::eType CSmartSchema::validate(
const SmartObject& object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion,
const bool allow_unknown_enums) const {
return mSchemaItem->validate(
- object, report__, MessageVersion, allow_unknown_enums);
+ object, report, MessageVersion, allow_unknown_enums);
}
void CSmartSchema::setSchemaItem(const ISchemaItemPtr schemaItem) {
@@ -59,8 +59,16 @@ ISchemaItemPtr CSmartSchema::getSchemaItem() {
void CSmartSchema::applySchema(SmartObject& Object,
const bool remove_unknown_parameters,
- const utils::SemanticVersion& MessageVersion) {
+ const utils::SemanticVersion& MessageVersion,
+ rpc::ValidationReport* report) {
mSchemaItem->applySchema(Object, remove_unknown_parameters, MessageVersion);
+ if (remove_unknown_parameters) {
+ rpc::ValidationReport dummy_report("");
+ if (!report) {
+ report = &dummy_report;
+ }
+ mSchemaItem->filterInvalidEnums(Object, MessageVersion, report);
+ }
}
void CSmartSchema::unapplySchema(SmartObject& Object,
diff --git a/src/components/smart_objects/src/string_schema_item.cc b/src/components/smart_objects/src/string_schema_item.cc
index c4382174d0..907f698545 100644
--- a/src/components/smart_objects/src/string_schema_item.cc
+++ b/src/components/smart_objects/src/string_schema_item.cc
@@ -48,7 +48,7 @@ std::shared_ptr<CStringSchemaItem> CStringSchemaItem::create(
errors::eType CStringSchemaItem::validate(
const SmartObject& Object,
- rpc::ValidationReport* report__,
+ rpc::ValidationReport* report,
const utils::SemanticVersion& MessageVersion,
const bool allow_unknown_enums) {
if (SmartType_String != Object.getType()) {
@@ -56,7 +56,7 @@ errors::eType CStringSchemaItem::validate(
"Incorrect type, expected: " +
SmartObject::typeToString(SmartType_String) +
", got: " + SmartObject::typeToString(Object.getType());
- report__->set_validation_info(validation_info);
+ report->set_validation_info(validation_info);
return errors::INVALID_VALUE;
}
@@ -68,7 +68,7 @@ errors::eType CStringSchemaItem::validate(
stream << "Got string of size: " << value.size()
<< ", minimum allowed: " << length;
std::string validation_info = stream.str();
- report__->set_validation_info(validation_info);
+ report->set_validation_info(validation_info);
return errors::OUT_OF_RANGE;
}
if (mMaxLength.getValue(length) && (value.size() > length)) {
@@ -76,7 +76,7 @@ errors::eType CStringSchemaItem::validate(
stream << "Got string of size: " << value.size()
<< ", maximum allowed: " << length;
std::string validation_info = stream.str();
- report__->set_validation_info(validation_info);
+ report->set_validation_info(validation_info);
return errors::OUT_OF_RANGE;
}
return errors::OK;
@@ -90,6 +90,10 @@ std::string CStringSchemaItem::getDefaultValue() const {
return std::string("");
}
+TypeID CStringSchemaItem::GetType() {
+ return TYPE_STRING;
+}
+
CStringSchemaItem::CStringSchemaItem(
const TSchemaItemParameter<size_t>& MinLength,
const TSchemaItemParameter<size_t>& MaxLength,
diff --git a/src/components/smart_objects/test/ArraySchemaItem_test.cc b/src/components/smart_objects/test/ArraySchemaItem_test.cc
index a22a27399d..b5ba73ea91 100644
--- a/src/components/smart_objects/test/ArraySchemaItem_test.cc
+++ b/src/components/smart_objects/test/ArraySchemaItem_test.cc
@@ -33,8 +33,9 @@
#include <string>
#include "gmock/gmock.h"
-
#include "smart_objects/array_schema_item.h"
+#include "smart_objects/enum_schema_item.h"
+#include "smart_objects/object_schema_item.h"
#include "smart_objects/smart_object.h"
#include "smart_objects/string_schema_item.h"
@@ -42,6 +43,15 @@ namespace test {
namespace components {
namespace smart_object_test {
+namespace ExampleEnum {
+enum eType { INVALID_ENUM = -1, Value0 = 0, Value1, Value2 };
+} // namespace ExampleEnum
+
+namespace Keys {
+const char OPTIONAL_PARAM[] = "optionalParam";
+const char MANDATORY_PARAM[] = "mandatoryParam";
+} // namespace Keys
+
/**
* Test ArraySchemaItem no schema item, no min and max size
**/
@@ -345,6 +355,189 @@ TEST(test_map_validate, test_ArraySchemaItemTest) {
EXPECT_EQ(std::string("Out of array"), obj["array"][4].asString());
}
+TEST(test_array_with_unknown_enum, test_ArraySchemaItemTest) {
+ using namespace ns_smart_device_link::ns_smart_objects;
+ SmartObject obj;
+ std::set<ExampleEnum::eType> enum_values;
+ enum_values.insert(ExampleEnum::Value0);
+ enum_values.insert(ExampleEnum::Value1);
+ enum_values.insert(ExampleEnum::Value2);
+
+ ISchemaItemPtr item = CArraySchemaItem::create(
+ TEnumSchemaItem<ExampleEnum::eType>::create(enum_values),
+ TSchemaItemParameter<size_t>(1));
+
+ obj[0] = "Value0";
+ obj[1] = "Value10";
+ obj[2] = "Value1";
+
+ item->applySchema(obj, true);
+
+ rpc::ValidationReport report("RPC");
+ EXPECT_FALSE(
+ item->filterInvalidEnums(obj, utils::SemanticVersion(), &report));
+ EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
+
+ EXPECT_EQ((size_t)2, obj.length());
+ EXPECT_EQ(0, obj[0].asInt());
+ EXPECT_EQ(1, obj[1].asInt());
+
+ report = rpc::ValidationReport("RPC");
+ EXPECT_EQ(errors::OK, item->validate(obj, &report));
+ EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
+}
+
+TEST(test_array_with_unknown_enums, test_ArraySchemaItemTest) {
+ using namespace ns_smart_device_link::ns_smart_objects;
+ SmartObject obj;
+ std::set<ExampleEnum::eType> enum_values;
+ enum_values.insert(ExampleEnum::Value0);
+ enum_values.insert(ExampleEnum::Value1);
+ enum_values.insert(ExampleEnum::Value2);
+
+ ISchemaItemPtr item = CArraySchemaItem::create(
+ TEnumSchemaItem<ExampleEnum::eType>::create(enum_values),
+ TSchemaItemParameter<size_t>(1));
+
+ obj[0] = "Value10";
+ obj[1] = "Value11";
+ obj[2] = "Value12";
+
+ item->applySchema(obj, true);
+
+ rpc::ValidationReport report("RPC");
+ EXPECT_TRUE(item->filterInvalidEnums(obj, utils::SemanticVersion(), &report));
+ EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
+
+ EXPECT_EQ((size_t)0, obj.length());
+
+ report = rpc::ValidationReport("RPC");
+ EXPECT_EQ(errors::OUT_OF_RANGE, item->validate(obj, &report));
+ EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
+}
+
+TEST(test_array_of_objects_with_unknown_enum, test_ArraySchemaItemTest) {
+ using namespace ns_smart_device_link::ns_smart_objects;
+ SmartObject obj;
+ std::set<ExampleEnum::eType> enum_values;
+ enum_values.insert(ExampleEnum::Value0);
+ enum_values.insert(ExampleEnum::Value1);
+ enum_values.insert(ExampleEnum::Value2);
+
+ Members structMembersMap;
+ structMembersMap[Keys::OPTIONAL_PARAM] =
+ SMember(TEnumSchemaItem<ExampleEnum::eType>::create(enum_values), false);
+ structMembersMap[Keys::MANDATORY_PARAM] =
+ SMember(TEnumSchemaItem<ExampleEnum::eType>::create(enum_values), true);
+
+ ISchemaItemPtr item =
+ CArraySchemaItem::create(CObjectSchemaItem::create(structMembersMap),
+ TSchemaItemParameter<size_t>(1));
+
+ SmartObject struct1;
+ struct1[Keys::MANDATORY_PARAM] = "Value0";
+ SmartObject struct2;
+ struct2[Keys::MANDATORY_PARAM] = "Value11";
+ SmartObject struct3;
+ struct3[Keys::MANDATORY_PARAM] = "Value2";
+ obj[0] = struct1;
+ obj[1] = struct2;
+ obj[2] = struct3;
+
+ item->applySchema(obj, true);
+
+ rpc::ValidationReport report("RPC");
+ EXPECT_FALSE(
+ item->filterInvalidEnums(obj, utils::SemanticVersion(), &report));
+ EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
+
+ EXPECT_EQ((size_t)2, obj.length());
+ EXPECT_EQ(0, obj[0][Keys::MANDATORY_PARAM].asInt());
+ EXPECT_EQ(2, obj[1][Keys::MANDATORY_PARAM].asInt());
+
+ report = rpc::ValidationReport("RPC");
+ EXPECT_EQ(errors::OK, item->validate(obj, &report));
+ EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
+}
+
+TEST(test_array_of_objects_with_unknown_optional_enums,
+ test_ArraySchemaItemTest) {
+ using namespace ns_smart_device_link::ns_smart_objects;
+ SmartObject obj;
+ std::set<ExampleEnum::eType> enum_values;
+ enum_values.insert(ExampleEnum::Value0);
+ enum_values.insert(ExampleEnum::Value1);
+ enum_values.insert(ExampleEnum::Value2);
+
+ Members structMembersMap;
+ structMembersMap[Keys::OPTIONAL_PARAM] =
+ SMember(TEnumSchemaItem<ExampleEnum::eType>::create(enum_values), false);
+ structMembersMap[Keys::MANDATORY_PARAM] =
+ SMember(TEnumSchemaItem<ExampleEnum::eType>::create(enum_values), true);
+
+ ISchemaItemPtr item =
+ CArraySchemaItem::create(CObjectSchemaItem::create(structMembersMap),
+ TSchemaItemParameter<size_t>(1));
+
+ SmartObject struct1;
+ struct1[Keys::OPTIONAL_PARAM] = "Value10";
+ struct1[Keys::MANDATORY_PARAM] = "Value0";
+ SmartObject struct2;
+ struct2[Keys::OPTIONAL_PARAM] = "Value0";
+ struct2[Keys::MANDATORY_PARAM] = "Value1";
+ SmartObject struct3;
+ struct3[Keys::OPTIONAL_PARAM] = "Value12";
+ struct3[Keys::MANDATORY_PARAM] = "Value2";
+ obj[0] = struct1;
+ obj[1] = struct2;
+ obj[2] = struct3;
+
+ item->applySchema(obj, true);
+
+ rpc::ValidationReport report("RPC");
+ EXPECT_FALSE(
+ item->filterInvalidEnums(obj, utils::SemanticVersion(), &report));
+ EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
+
+ // Unknown sub-parameter values should be filtered, but not array elements
+ EXPECT_EQ((size_t)3, obj.length());
+ EXPECT_EQ(0, obj[0][Keys::MANDATORY_PARAM].asInt());
+ EXPECT_FALSE(obj[0].keyExists(Keys::OPTIONAL_PARAM));
+ EXPECT_EQ(1, obj[1][Keys::MANDATORY_PARAM].asInt());
+ EXPECT_EQ(0, obj[1][Keys::OPTIONAL_PARAM].asInt());
+ EXPECT_EQ(2, obj[2][Keys::MANDATORY_PARAM].asInt());
+ EXPECT_FALSE(obj[2].keyExists(Keys::OPTIONAL_PARAM));
+
+ report = rpc::ValidationReport("RPC");
+ EXPECT_EQ(errors::OK, item->validate(obj, &report));
+ EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
+}
+
} // namespace smart_object_test
} // namespace components
} // namespace test
+
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
+
+namespace ExampleEnum = test::components::smart_object_test::ExampleEnum;
+typedef EnumConversionHelper<ExampleEnum::eType> EnumConverter;
+
+template <>
+const EnumConverter::EnumToCStringMap EnumConverter::enum_to_cstring_map_ =
+ EnumConverter::InitEnumToCStringMap();
+
+template <>
+const EnumConverter::CStringToEnumMap EnumConverter::cstring_to_enum_map_ =
+ EnumConverter::InitCStringToEnumMap();
+
+template <>
+const char* const EnumConverter::cstring_values_[] = {
+ "Value0", "Value1", "Value2"};
+
+template <>
+const ExampleEnum::eType EnumConverter::enum_values_[] = {
+ ExampleEnum::Value0, ExampleEnum::Value1, ExampleEnum::Value2};
+
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
diff --git a/src/components/smart_objects/test/CObjectSchemaItem_test.cc b/src/components/smart_objects/test/CObjectSchemaItem_test.cc
index 8a7d09f31e..0eee0d1f0d 100644
--- a/src/components/smart_objects/test/CObjectSchemaItem_test.cc
+++ b/src/components/smart_objects/test/CObjectSchemaItem_test.cc
@@ -89,6 +89,9 @@ namespace Keys {
const char RESULT_CODE[] = "resultCode";
const char INFO[] = "info";
const char SUCCESS[] = "success";
+const char STRUCT[] = "struct";
+const char OPTIONAL_PARAM[] = "optionalParam";
+const char MANDATORY_PARAM[] = "mandatoryParam";
} // namespace Keys
class ObjectSchemaItemTest : public ::testing::Test {
@@ -127,6 +130,12 @@ class ObjectSchemaItemTest : public ::testing::Test {
TSchemaItemParameter<int>(2)),
true);
+ Members structMembersMap;
+ structMembersMap[Keys::OPTIONAL_PARAM] = SMember(
+ TEnumSchemaItem<FunctionID::eType>::create(function_values), false);
+ structMembersMap[Keys::MANDATORY_PARAM] = SMember(
+ TEnumSchemaItem<FunctionID::eType>::create(function_values), true);
+
Members schemaMembersMap;
schemaMembersMap[Keys::RESULT_CODE] = SMember(
TEnumSchemaItem<ResultType::eType>::create(resultCode_values), false);
@@ -135,6 +144,8 @@ class ObjectSchemaItemTest : public ::testing::Test {
TSchemaItemParameter<size_t>(10)),
false);
schemaMembersMap[Keys::SUCCESS] = SMember(CBoolSchemaItem::create(), false);
+ schemaMembersMap[Keys::STRUCT] =
+ SMember(CObjectSchemaItem::create(structMembersMap), false);
// Create fake param that has breaking history changes
std::vector<SMember> fake_param_history_vector;
@@ -249,22 +260,22 @@ TEST_F(ObjectSchemaItemTest, validation_invalid_param) {
obj[S_MSG_PARAMS][Keys::SUCCESS] = 0xABC;
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OUT_OF_RANGE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
obj[S_PARAMS][S_FUNCTION_ID] = 1;
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OUT_OF_RANGE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
obj[S_PARAMS][S_CORRELATION_ID] = -0xFF1;
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OUT_OF_RANGE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
obj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OUT_OF_RANGE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
obj[S_MSG_PARAMS][Keys::RESULT_CODE] = 1;
@@ -431,7 +442,7 @@ TEST_F(ObjectSchemaItemTest, validation_unexpected_param_remove) {
EXPECT_FALSE(obj[S_MSG_PARAMS].keyExists(fake3));
// Invalide state after enum convertion
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OUT_OF_RANGE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
}
@@ -458,7 +469,7 @@ TEST_F(ObjectSchemaItemTest, validation_empty_params) {
schema_item->unapplySchema(obj);
// Invalide state after enum convertion
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OUT_OF_RANGE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
}
@@ -521,6 +532,97 @@ TEST_F(ObjectSchemaItemTest, test_strings_to_enum_conversion) {
}
}
+TEST_F(ObjectSchemaItemTest, filter_unknown_enums_non_mandatory_param) {
+ SmartObject obj;
+ obj[S_PARAMS][S_FUNCTION_ID] = 1;
+ obj[S_PARAMS][S_CORRELATION_ID] = 0xFF;
+ obj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
+ obj[S_MSG_PARAMS][Keys::RESULT_CODE] = "FUTURE";
+ obj[S_MSG_PARAMS][Keys::INFO] = "0123456789";
+
+ schema_item->applySchema(obj, false);
+ rpc::ValidationReport report("RPC");
+ EXPECT_FALSE(
+ schema_item->filterInvalidEnums(obj, utils::SemanticVersion(), &report));
+ EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
+
+ // The unknown enum value was filtered. Validation should pass in this case.
+ EXPECT_FALSE(obj[S_MSG_PARAMS].keyExists(Keys::RESULT_CODE));
+ report = rpc::ValidationReport("RPC");
+ EXPECT_EQ(errors::OK, schema_item->validate(obj, &report));
+ EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
+}
+
+TEST_F(ObjectSchemaItemTest, filter_unknown_enums_mandatory) {
+ SmartObject obj;
+ obj[S_PARAMS][S_FUNCTION_ID] = "FUTURE";
+ obj[S_PARAMS][S_CORRELATION_ID] = 0xFF;
+ obj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
+ obj[S_MSG_PARAMS][Keys::RESULT_CODE] = 2;
+ obj[S_MSG_PARAMS][Keys::INFO] = "0123456789";
+
+ schema_item->applySchema(obj, false);
+ rpc::ValidationReport report("RPC");
+ EXPECT_TRUE(
+ schema_item->filterInvalidEnums(obj, utils::SemanticVersion(), &report));
+ EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
+
+ EXPECT_FALSE(obj[S_PARAMS].keyExists(S_FUNCTION_ID));
+ report = rpc::ValidationReport("RPC");
+ EXPECT_EQ(errors::MISSING_MANDATORY_PARAMETER,
+ schema_item->validate(obj, &report));
+ EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
+}
+
+TEST_F(ObjectSchemaItemTest, filter_unknown_enums_non_mandatory_subparam) {
+ SmartObject obj;
+ obj[S_PARAMS][S_FUNCTION_ID] = 1;
+ obj[S_PARAMS][S_CORRELATION_ID] = 0xFF;
+ obj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
+ obj[S_MSG_PARAMS][Keys::STRUCT][Keys::OPTIONAL_PARAM] = "FUTURE";
+ obj[S_MSG_PARAMS][Keys::STRUCT][Keys::MANDATORY_PARAM] = 1;
+ obj[S_MSG_PARAMS][Keys::RESULT_CODE] = 2;
+ obj[S_MSG_PARAMS][Keys::INFO] = "0123456789";
+
+ schema_item->applySchema(obj, false);
+ rpc::ValidationReport report("RPC");
+ EXPECT_FALSE(
+ schema_item->filterInvalidEnums(obj, utils::SemanticVersion(), &report));
+ EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
+
+ // The unknown enum value was filtered.
+ // Validation should pass in this case.
+ ASSERT_TRUE(obj[S_MSG_PARAMS].keyExists(Keys::STRUCT));
+ EXPECT_FALSE(obj[S_MSG_PARAMS][Keys::STRUCT].keyExists(Keys::OPTIONAL_PARAM));
+ EXPECT_TRUE(obj[S_MSG_PARAMS][Keys::STRUCT].keyExists(Keys::MANDATORY_PARAM));
+ report = rpc::ValidationReport("RPC");
+ EXPECT_EQ(errors::OK, schema_item->validate(obj, &report));
+ EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
+}
+
+TEST_F(ObjectSchemaItemTest, filter_unknown_enums_mandatory_subparam) {
+ SmartObject obj;
+ obj[S_PARAMS][S_FUNCTION_ID] = 1;
+ obj[S_PARAMS][S_CORRELATION_ID] = 0xFF;
+ obj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
+ obj[S_MSG_PARAMS][Keys::STRUCT][Keys::MANDATORY_PARAM] = "FUTURE";
+ obj[S_MSG_PARAMS][Keys::RESULT_CODE] = 2;
+ obj[S_MSG_PARAMS][Keys::INFO] = "0123456789";
+
+ schema_item->applySchema(obj, false);
+ rpc::ValidationReport report("RPC");
+ EXPECT_FALSE(
+ schema_item->filterInvalidEnums(obj, utils::SemanticVersion(), &report));
+ EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
+
+ // The struct containing the unknown enum value was filtered.
+ // Validation should pass in this case.
+ EXPECT_FALSE(obj[S_MSG_PARAMS].keyExists(Keys::STRUCT));
+ report = rpc::ValidationReport("RPC");
+ EXPECT_EQ(errors::OK, schema_item->validate(obj, &report));
+ EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
+}
+
} // namespace smart_object_test
} // namespace components
} // namespace test
@@ -529,20 +631,20 @@ namespace ns_smart_device_link {
namespace ns_smart_objects {
namespace FunctionID = test::components::smart_object_test::FunctionID;
-typedef EnumConversionHelper<FunctionID::eType> FunctionConvertor;
+typedef EnumConversionHelper<FunctionID::eType> FunctionConverter;
template <>
-const FunctionConvertor::EnumToCStringMap
- FunctionConvertor::enum_to_cstring_map_ =
- FunctionConvertor::InitEnumToCStringMap();
+const FunctionConverter::EnumToCStringMap
+ FunctionConverter::enum_to_cstring_map_ =
+ FunctionConverter::InitEnumToCStringMap();
template <>
-const FunctionConvertor::CStringToEnumMap
- FunctionConvertor::cstring_to_enum_map_ =
- FunctionConvertor::InitCStringToEnumMap();
+const FunctionConverter::CStringToEnumMap
+ FunctionConverter::cstring_to_enum_map_ =
+ FunctionConverter::InitCStringToEnumMap();
template <>
-const char* const FunctionConvertor::cstring_values_[] = {"Function0",
+const char* const FunctionConverter::cstring_values_[] = {"Function0",
"Function1",
"Function2",
"Function3",
@@ -551,7 +653,7 @@ const char* const FunctionConvertor::cstring_values_[] = {"Function0",
"Function6"};
template <>
-const FunctionID::eType FunctionConvertor::enum_values_[] = {
+const FunctionID::eType FunctionConverter::enum_values_[] = {
FunctionID::Function0,
FunctionID::Function1,
FunctionID::Function2,
@@ -563,20 +665,20 @@ const FunctionID::eType FunctionConvertor::enum_values_[] = {
// ----------------------------------------------------------------------------
namespace ResultType = test::components::smart_object_test::ResultType;
-typedef EnumConversionHelper<ResultType::eType> ResultTypeConvertor;
+typedef EnumConversionHelper<ResultType::eType> ResultTypeConverter;
template <>
-const ResultTypeConvertor::EnumToCStringMap
- ResultTypeConvertor::enum_to_cstring_map_ =
- ResultTypeConvertor::InitEnumToCStringMap();
+const ResultTypeConverter::EnumToCStringMap
+ ResultTypeConverter::enum_to_cstring_map_ =
+ ResultTypeConverter::InitEnumToCStringMap();
template <>
-const ResultTypeConvertor::CStringToEnumMap
- ResultTypeConvertor::cstring_to_enum_map_ =
- ResultTypeConvertor::InitCStringToEnumMap();
+const ResultTypeConverter::CStringToEnumMap
+ ResultTypeConverter::cstring_to_enum_map_ =
+ ResultTypeConverter::InitCStringToEnumMap();
template <>
-const char* const ResultTypeConvertor::cstring_values_[] = {
+const char* const ResultTypeConverter::cstring_values_[] = {
"APPLICATION_NOT_REGISTERED",
"SUCCESS",
"TOO_MANY_PENDING_REQUESTS",
@@ -589,7 +691,7 @@ const char* const ResultTypeConvertor::cstring_values_[] = {
"DISALLOWED"};
template <>
-const ResultType::eType ResultTypeConvertor::enum_values_[] = {
+const ResultType::eType ResultTypeConverter::enum_values_[] = {
ResultType::APPLICATION_NOT_REGISTERED,
ResultType::SUCCESS,
ResultType::TOO_MANY_PENDING_REQUESTS,
diff --git a/src/components/smart_objects/test/SmartObjectConvertionTime_test.cc b/src/components/smart_objects/test/SmartObjectConvertionTime_test.cc
index 555239c489..1ce383e44d 100644
--- a/src/components/smart_objects/test/SmartObjectConvertionTime_test.cc
+++ b/src/components/smart_objects/test/SmartObjectConvertionTime_test.cc
@@ -270,367 +270,279 @@ class SmartObjectConvertionTimeTest : public ::testing::Test {
return CSmartSchema(CObjectSchemaItem::create(rootMembersMap));
}
- // Create SmartObjectSchema for test object
- CSmartSchema initObjectSchema() {
- std::set<TestType::eType> resultCode_allowedEnumSubsetValues;
- resultCode_allowedEnumSubsetValues.insert(
- TestType::APPLICATION_NOT_REGISTERED);
- resultCode_allowedEnumSubsetValues.insert(TestType::SUCCESS);
- resultCode_allowedEnumSubsetValues.insert(
- TestType::TOO_MANY_PENDING_REQUESTS);
- resultCode_allowedEnumSubsetValues.insert(TestType::REJECTED);
- resultCode_allowedEnumSubsetValues.insert(TestType::INVALID_DATA);
- resultCode_allowedEnumSubsetValues.insert(TestType::OUT_OF_MEMORY);
- resultCode_allowedEnumSubsetValues.insert(TestType::ABORTED);
- resultCode_allowedEnumSubsetValues.insert(TestType::USER_DISALLOWED);
- resultCode_allowedEnumSubsetValues.insert(TestType::GENERIC_ERROR);
- resultCode_allowedEnumSubsetValues.insert(TestType::DISALLOWED);
-
- std::set<FunctionIdTest::eType> functionId_allowedEnumSubsetValues;
- functionId_allowedEnumSubsetValues.insert(
- FunctionIdTest::RegisterAppInterface);
- functionId_allowedEnumSubsetValues.insert(
- FunctionIdTest::UnregisterAppInterface);
- functionId_allowedEnumSubsetValues.insert(
- FunctionIdTest::SetGlobalProperties);
-
- std::set<MessageTypeTest::eType> messageType_allowedEnumSubsetValues;
- messageType_allowedEnumSubsetValues.insert(MessageTypeTest::request);
- messageType_allowedEnumSubsetValues.insert(MessageTypeTest::response);
- messageType_allowedEnumSubsetValues.insert(MessageTypeTest::notification);
-
- ISchemaItemPtr success_SchemaItem =
- CBoolSchemaItem::create(TSchemaItemParameter<bool>());
-
- ISchemaItemPtr resultCode_SchemaItem =
- TEnumSchemaItem<TestType::eType>::create(
- resultCode_allowedEnumSubsetValues,
- TSchemaItemParameter<TestType::eType>());
-
- ISchemaItemPtr info_SchemaItem =
- CStringSchemaItem::create(TSchemaItemParameter<size_t>(0),
- TSchemaItemParameter<size_t>(1000),
- TSchemaItemParameter<std::string>());
-
- ISchemaItemPtr tryAgainTime_SchemaItem =
- TNumberSchemaItem<int>::create(TSchemaItemParameter<int>(0),
- TSchemaItemParameter<int>(2000000000),
- TSchemaItemParameter<int>());
-
- std::map<std::string, SMember> schemaMembersMap;
-
- schemaMembersMap["success"] = SMember(success_SchemaItem, true);
- schemaMembersMap["resultCode"] = SMember(resultCode_SchemaItem, true);
- schemaMembersMap["info"] = SMember(info_SchemaItem, false);
- schemaMembersMap["tryAgainTime"] = SMember(tryAgainTime_SchemaItem, true);
-
- std::map<std::string, SMember> paramsMembersMap;
- paramsMembersMap
- [ns_smart_device_link::ns_json_handler::strings::S_FUNCTION_ID] =
- SMember(TEnumSchemaItem<FunctionIdTest::eType>::create(
- functionId_allowedEnumSubsetValues),
- true);
- paramsMembersMap
- [ns_smart_device_link::ns_json_handler::strings::S_MESSAGE_TYPE] =
- SMember(TEnumSchemaItem<MessageTypeTest::eType>::create(
- messageType_allowedEnumSubsetValues),
- true);
- paramsMembersMap
- [ns_smart_device_link::ns_json_handler::strings::S_CORRELATION_ID] =
- SMember(TNumberSchemaItem<int>::create(), true);
- paramsMembersMap
- [ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_VERSION] =
- SMember(
- TNumberSchemaItem<int>::create(TSchemaItemParameter<int>(1),
- TSchemaItemParameter<int>(2)),
- true);
- paramsMembersMap
- [ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_TYPE] =
- SMember(TNumberSchemaItem<int>::create(), true);
-
- std::map<std::string, SMember> rootMembersMap;
- rootMembersMap
- [ns_smart_device_link::ns_json_handler::strings::S_MSG_PARAMS] =
- SMember(CObjectSchemaItem::create(schemaMembersMap), true);
- rootMembersMap[ns_smart_device_link::ns_json_handler::strings::S_PARAMS] =
- SMember(CObjectSchemaItem::create(paramsMembersMap), true);
- return CSmartSchema(CObjectSchemaItem::create(rootMembersMap));
+ TEST_F(SmartObjectConvertionTimeTest, test_int_object_convertion) {
+ SmartObject srcObj, dstObj;
+ CSmartSchema schema = initObjectSchema();
+
+ srcObj.setSchema(schema);
+ dstObj.setSchema(schema);
+
+ srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
+ srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
+ srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
+ srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
+ srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 1;
+ srcObj[S_MSG_PARAMS]["value"] = 5;
+
+ printf("\n INT value.\n");
+ calculateConvertionTime(srcObj, dstObj);
}
-};
-TEST_F(SmartObjectConvertionTimeTest, test_int_object_convertion) {
- SmartObject srcObj, dstObj;
- CSmartSchema schema = initObjectSchema();
+ TEST_F(SmartObjectConvertionTimeTest, test_double_object_convertion) {
+ SmartObject srcObj, dstObj;
+ CSmartSchema schema = initObjectSchema();
+
+ srcObj.setSchema(schema);
+ dstObj.setSchema(schema);
+
+ srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
+ srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
+ srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
+ srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
+ srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
+ srcObj[S_MSG_PARAMS]["value1"] = 3.1415926;
+ srcObj[S_MSG_PARAMS]["value2"] = 32.6;
+ srcObj[S_MSG_PARAMS]["value3"] = 33.945;
+ srcObj[S_MSG_PARAMS]["value4"] = -12.5487698;
+ srcObj[S_MSG_PARAMS]["value5"] = 0.61287346;
+
+ printf("\n Double value.\n");
+ calculateConvertionTime(srcObj, dstObj);
+ }
- srcObj.setSchema(schema);
- dstObj.setSchema(schema);
+ TEST_F(SmartObjectConvertionTimeTest, test_some_object_convertion) {
+ SmartObject srcObj, dstObj;
+ CSmartSchema schema = initObjectSchema();
+
+ srcObj.setSchema(schema);
+ dstObj.setSchema(schema);
+
+ srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
+ srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
+ srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
+ srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
+ srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
+ srcObj[S_MSG_PARAMS]["appId"] = "APP ID";
+ srcObj[S_MSG_PARAMS]["appName"] = "APP NAME";
+ srcObj[S_MSG_PARAMS]["appType"][0] = "SYSTEM";
+ srcObj[S_MSG_PARAMS]["appType"][1] = "COMMUNICATION";
+ srcObj[S_MSG_PARAMS]["hmiDisplayLanguageDesired"] = "RU-RU";
+ srcObj[S_MSG_PARAMS]["isMediaApplication"] = true;
+ srcObj[S_MSG_PARAMS]["languageDesired"] = "EN-US";
+ srcObj[S_MSG_PARAMS]["ngnMediaScreenAppName"] = "SCREEN NAME";
+ srcObj[S_MSG_PARAMS]["syncMsgVersion"]["majorVersion"] = 2;
+ srcObj[S_MSG_PARAMS]["syncMsgVersion"]["minorVersion"] = 10;
+ srcObj[S_MSG_PARAMS]["syncMsgVersion"]["patchVersion"] = 5;
+
+ srcObj[S_MSG_PARAMS]["ttsName"][0]["text"] = "ABC";
+ srcObj[S_MSG_PARAMS]["ttsName"][0]["type"] = "TEXT";
+ srcObj[S_MSG_PARAMS]["vrSynonyms"][0] = "Synonym1";
+ srcObj[S_MSG_PARAMS]["vrSynonyms"][1] = "Synonym2";
+ srcObj[S_MSG_PARAMS]["null"] = SmartObject();
+ srcObj[S_MSG_PARAMS]["double"] = -0.1234;
+
+ printf("\n Random object.\n");
+ calculateConvertionTime(srcObj, dstObj);
+ }
- srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
- srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
- srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
- srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
- srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 1;
- srcObj[S_MSG_PARAMS]["value"] = 5;
+ TEST_F(SmartObjectConvertionTimeTest, test_map_object_convertion) {
+ SmartObject srcObj, dstObj, mapObj, innerObj;
+ CSmartSchema schema = initObjectSchema();
+
+ srcObj.setSchema(schema);
+ dstObj.setSchema(schema);
+
+ // First iteration
+ mapObj["request"]["name"] = "My Request";
+ mapObj["request"]["id"] = 123;
+ mapObj["response"]["name"] = "My Response";
+ mapObj["response"]["id"] = 456;
+ mapObj["we"]["need"]["to"]["go"]["deeper"] = true;
+
+ srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
+ srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
+ srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
+ srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
+ srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
+ srcObj[S_MSG_PARAMS]["value"] = mapObj;
+
+ printf("\n MAP object.\n");
+ calculateConvertionTime(srcObj, dstObj);
+
+ // Second iteration
+ innerObj = mapObj;
+ mapObj["request"]["value"] = innerObj;
+ mapObj["response"]["value"] = innerObj;
+ mapObj["we"]["need"]["to"]["go"]["deeper"]["value"] = innerObj;
+ srcObj[S_MSG_PARAMS]["value"] = mapObj;
+
+ printf("\n Complex MAP object.\n");
+ calculateConvertionTime(srcObj, dstObj);
+
+ // Third iteration
+ innerObj = mapObj;
+ mapObj["request"]["value"] = innerObj;
+ mapObj["response"]["value"] = innerObj;
+ mapObj["we"]["need"]["to"]["go"]["deeper"]["value"] = innerObj;
+ srcObj[S_MSG_PARAMS]["value"] = mapObj;
+
+ printf("\n Very Complex MAP object.\n");
+ calculateConvertionTime(srcObj, dstObj);
+
+ // Last iteration
+ innerObj = mapObj;
+ mapObj["request"]["value"] = innerObj;
+ mapObj["response"]["value"] = innerObj;
+ mapObj["we"]["need"]["to"]["go"]["deeper"]["value"] = innerObj;
+ srcObj[S_MSG_PARAMS]["value"] = mapObj;
+
+ printf("\n Very Very Complex MAP object.\n");
+ calculateConvertionTime(srcObj, dstObj);
+ }
- printf("\n INT value.\n");
- calculateConvertionTime(srcObj, dstObj);
-}
+ TEST_F(SmartObjectConvertionTimeTest, test_array_convertion) {
+ SmartObject srcObj, dstObj, arrayObj, innerObj;
+ CSmartSchema schema = initObjectSchema();
+ int arraySize = 10;
-TEST_F(SmartObjectConvertionTimeTest, test_double_object_convertion) {
- SmartObject srcObj, dstObj;
- CSmartSchema schema = initObjectSchema();
-
- srcObj.setSchema(schema);
- dstObj.setSchema(schema);
-
- srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
- srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
- srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
- srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
- srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
- srcObj[S_MSG_PARAMS]["value1"] = 3.1415926;
- srcObj[S_MSG_PARAMS]["value2"] = 32.6;
- srcObj[S_MSG_PARAMS]["value3"] = 33.945;
- srcObj[S_MSG_PARAMS]["value4"] = -12.5487698;
- srcObj[S_MSG_PARAMS]["value5"] = 0.61287346;
-
- printf("\n Double value.\n");
- calculateConvertionTime(srcObj, dstObj);
-}
+ srcObj.setSchema(schema);
+ dstObj.setSchema(schema);
-TEST_F(SmartObjectConvertionTimeTest, test_some_object_convertion) {
- SmartObject srcObj, dstObj;
- CSmartSchema schema = initObjectSchema();
-
- srcObj.setSchema(schema);
- dstObj.setSchema(schema);
-
- srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
- srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
- srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
- srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
- srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
- srcObj[S_MSG_PARAMS]["appId"] = "APP ID";
- srcObj[S_MSG_PARAMS]["appName"] = "APP NAME";
- srcObj[S_MSG_PARAMS]["appType"][0] = "SYSTEM";
- srcObj[S_MSG_PARAMS]["appType"][1] = "COMMUNICATION";
- srcObj[S_MSG_PARAMS]["hmiDisplayLanguageDesired"] = "RU-RU";
- srcObj[S_MSG_PARAMS]["isMediaApplication"] = true;
- srcObj[S_MSG_PARAMS]["languageDesired"] = "EN-US";
- srcObj[S_MSG_PARAMS]["ngnMediaScreenAppName"] = "SCREEN NAME";
- srcObj[S_MSG_PARAMS]["syncMsgVersion"]["majorVersion"] = 2;
- srcObj[S_MSG_PARAMS]["syncMsgVersion"]["minorVersion"] = 10;
- srcObj[S_MSG_PARAMS]["syncMsgVersion"]["patchVersion"] = 5;
-
- srcObj[S_MSG_PARAMS]["ttsName"][0]["text"] = "ABC";
- srcObj[S_MSG_PARAMS]["ttsName"][0]["type"] = "TEXT";
- srcObj[S_MSG_PARAMS]["vrSynonyms"][0] = "Synonym1";
- srcObj[S_MSG_PARAMS]["vrSynonyms"][1] = "Synonym2";
- srcObj[S_MSG_PARAMS]["null"] = SmartObject();
- srcObj[S_MSG_PARAMS]["double"] = -0.1234;
-
- printf("\n Random object.\n");
- calculateConvertionTime(srcObj, dstObj);
-}
+ // First iteration
+ for (int i = 0; i < arraySize; i++) {
+ arrayObj[i] = rand();
+ }
-TEST_F(SmartObjectConvertionTimeTest, test_map_object_convertion) {
- SmartObject srcObj, dstObj, mapObj, innerObj;
- CSmartSchema schema = initObjectSchema();
-
- srcObj.setSchema(schema);
- dstObj.setSchema(schema);
-
- // First iteration
- mapObj["request"]["name"] = "My Request";
- mapObj["request"]["id"] = 123;
- mapObj["response"]["name"] = "My Response";
- mapObj["response"]["id"] = 456;
- mapObj["we"]["need"]["to"]["go"]["deeper"] = true;
-
- srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
- srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
- srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
- srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
- srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
- srcObj[S_MSG_PARAMS]["value"] = mapObj;
-
- printf("\n MAP object.\n");
- calculateConvertionTime(srcObj, dstObj);
-
- // Second iteration
- innerObj = mapObj;
- mapObj["request"]["value"] = innerObj;
- mapObj["response"]["value"] = innerObj;
- mapObj["we"]["need"]["to"]["go"]["deeper"]["value"] = innerObj;
- srcObj[S_MSG_PARAMS]["value"] = mapObj;
-
- printf("\n Complex MAP object.\n");
- calculateConvertionTime(srcObj, dstObj);
-
- // Third iteration
- innerObj = mapObj;
- mapObj["request"]["value"] = innerObj;
- mapObj["response"]["value"] = innerObj;
- mapObj["we"]["need"]["to"]["go"]["deeper"]["value"] = innerObj;
- srcObj[S_MSG_PARAMS]["value"] = mapObj;
-
- printf("\n Very Complex MAP object.\n");
- calculateConvertionTime(srcObj, dstObj);
-
- // Last iteration
- innerObj = mapObj;
- mapObj["request"]["value"] = innerObj;
- mapObj["response"]["value"] = innerObj;
- mapObj["we"]["need"]["to"]["go"]["deeper"]["value"] = innerObj;
- srcObj[S_MSG_PARAMS]["value"] = mapObj;
-
- printf("\n Very Very Complex MAP object.\n");
- calculateConvertionTime(srcObj, dstObj);
-}
+ srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
+ srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
+ srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
+ srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
+ srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
+ srcObj[S_MSG_PARAMS]["array"] = arrayObj;
+
+ printf("\n Array object [%d].\n", arraySize);
+ calculateConvertionTime(srcObj, dstObj);
+
+ // Second iteration
+ printf("\n Array object [%d x %d].\n", arraySize, arraySize);
+ innerObj = arrayObj;
+ for (int i = 0; i < arraySize; i++) {
+ arrayObj[i] = innerObj;
+ }
-TEST_F(SmartObjectConvertionTimeTest, test_array_convertion) {
- SmartObject srcObj, dstObj, arrayObj, innerObj;
- CSmartSchema schema = initObjectSchema();
- int arraySize = 10;
+ srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
+ srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
+ srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
+ srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
+ srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
+ srcObj[S_MSG_PARAMS]["array"] = arrayObj;
- srcObj.setSchema(schema);
- dstObj.setSchema(schema);
+ calculateConvertionTime(srcObj, dstObj);
- // First iteration
- for (int i = 0; i < arraySize; i++) {
- arrayObj[i] = rand();
- }
+ // Third iteration
+ printf(
+ "\n Array object [%d x %d x %d].\n", arraySize, arraySize, arraySize);
+ innerObj = arrayObj;
+ for (int i = 0; i < arraySize; i++) {
+ arrayObj[i] = innerObj;
+ }
- srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
- srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
- srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
- srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
- srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
- srcObj[S_MSG_PARAMS]["array"] = arrayObj;
-
- printf("\n Array object [%d].\n", arraySize);
- calculateConvertionTime(srcObj, dstObj);
-
- // Second iteration
- printf("\n Array object [%d x %d].\n", arraySize, arraySize);
- innerObj = arrayObj;
- for (int i = 0; i < arraySize; i++) {
- arrayObj[i] = innerObj;
- }
+ srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
+ srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
+ srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
+ srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
+ srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
+ srcObj[S_MSG_PARAMS]["array"] = arrayObj;
+
+ calculateConvertionTime(srcObj, dstObj);
+
+ // Fourth iteration
+ printf("\n Array object [%d x %d x %d x %d].\n",
+ arraySize,
+ arraySize,
+ arraySize,
+ arraySize);
+ innerObj = arrayObj;
+ for (int i = 0; i < arraySize; i++) {
+ arrayObj[i] = innerObj;
+ }
- srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
- srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
- srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
- srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
- srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
- srcObj[S_MSG_PARAMS]["array"] = arrayObj;
+ srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
+ srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
+ srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
+ srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
+ srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
+ srcObj[S_MSG_PARAMS]["array"] = arrayObj;
+
+ calculateConvertionTime(srcObj, dstObj);
+
+ // Last iteration
+ printf("\n Array object [%d x %d x %d x %d x %d].\n",
+ arraySize,
+ arraySize,
+ arraySize,
+ arraySize,
+ arraySize);
+ innerObj = arrayObj;
+ for (int i = 0; i < arraySize; i++) {
+ arrayObj[i] = innerObj;
+ }
- calculateConvertionTime(srcObj, dstObj);
+ srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
+ srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
+ srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
+ srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
+ srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
+ srcObj[S_MSG_PARAMS]["array"] = arrayObj;
- // Third iteration
- printf("\n Array object [%d x %d x %d].\n", arraySize, arraySize, arraySize);
- innerObj = arrayObj;
- for (int i = 0; i < arraySize; i++) {
- arrayObj[i] = innerObj;
+ calculateConvertionTime(srcObj, dstObj);
}
- srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
- srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
- srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
- srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
- srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
- srcObj[S_MSG_PARAMS]["array"] = arrayObj;
-
- calculateConvertionTime(srcObj, dstObj);
-
- // Fourth iteration
- printf("\n Array object [%d x %d x %d x %d].\n",
- arraySize,
- arraySize,
- arraySize,
- arraySize);
- innerObj = arrayObj;
- for (int i = 0; i < arraySize; i++) {
- arrayObj[i] = innerObj;
+ TEST_F(SmartObjectConvertionTimeTest, test_object_with_enum_convertion) {
+ SmartObject srcObj, dstObj;
+ CSmartSchema schema = initObjectSchema();
+
+ srcObj.setSchema(schema);
+ dstObj.setSchema(schema);
+
+ srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
+ srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
+ srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
+ srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
+ srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
+ srcObj[S_MSG_PARAMS]["success"] = true;
+ srcObj[S_MSG_PARAMS]["resultCode"] = 2;
+ srcObj[S_MSG_PARAMS]["info"] = "Some string";
+ srcObj[S_MSG_PARAMS]["tryAgainTime"] = 322;
+ srcObj.setSchema(schema);
+
+ printf("\n Object with enum.\n");
+ calculateConvertionTime(srcObj, dstObj);
}
- srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
- srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
- srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
- srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
- srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
- srcObj[S_MSG_PARAMS]["array"] = arrayObj;
-
- calculateConvertionTime(srcObj, dstObj);
-
- // Last iteration
- printf("\n Array object [%d x %d x %d x %d x %d].\n",
- arraySize,
- arraySize,
- arraySize,
- arraySize,
- arraySize);
- innerObj = arrayObj;
- for (int i = 0; i < arraySize; i++) {
- arrayObj[i] = innerObj;
+ TEST_F(SmartObjectConvertionTimeTest, test_object_without_enum_convertion) {
+ SmartObject srcObj, dstObj;
+ CSmartSchema schema = initObjectSchema();
+
+ srcObj.setSchema(schema);
+ dstObj.setSchema(schema);
+
+ srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
+ srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
+ srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
+ srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
+ srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
+ srcObj[S_MSG_PARAMS]["success"] = true;
+ srcObj[S_MSG_PARAMS]["resultCode"] = 2;
+ srcObj[S_MSG_PARAMS]["info"] = "Some string";
+ srcObj[S_MSG_PARAMS]["tryAgainTime"] = 322;
+
+ printf("\n Object without enum.\n");
+ calculateConvertionTime(srcObj, dstObj);
}
-
- srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
- srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
- srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
- srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
- srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
- srcObj[S_MSG_PARAMS]["array"] = arrayObj;
-
- calculateConvertionTime(srcObj, dstObj);
-}
-
-TEST_F(SmartObjectConvertionTimeTest, test_object_with_enum_convertion) {
- SmartObject srcObj, dstObj;
- CSmartSchema schema = initObjectSchema();
-
- srcObj.setSchema(schema);
- dstObj.setSchema(schema);
-
- srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
- srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
- srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
- srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
- srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
- srcObj[S_MSG_PARAMS]["success"] = true;
- srcObj[S_MSG_PARAMS]["resultCode"] = 2;
- srcObj[S_MSG_PARAMS]["info"] = "Some string";
- srcObj[S_MSG_PARAMS]["tryAgainTime"] = 322;
- srcObj.setSchema(schema);
-
- printf("\n Object with enum.\n");
- calculateConvertionTime(srcObj, dstObj);
-}
-
-TEST_F(SmartObjectConvertionTimeTest, test_object_without_enum_convertion) {
- SmartObject srcObj, dstObj;
- CSmartSchema schema = initObjectSchema();
-
- srcObj.setSchema(schema);
- dstObj.setSchema(schema);
-
- srcObj[S_PARAMS][S_MESSAGE_TYPE] = MessageTypeTest::request;
- srcObj[S_PARAMS][S_FUNCTION_ID] = FunctionIdTest::RegisterAppInterface;
- srcObj[S_PARAMS][S_CORRELATION_ID] = 13;
- srcObj[S_PARAMS][S_PROTOCOL_TYPE] = 0;
- srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
- srcObj[S_MSG_PARAMS]["success"] = true;
- srcObj[S_MSG_PARAMS]["resultCode"] = 2;
- srcObj[S_MSG_PARAMS]["info"] = "Some string";
- srcObj[S_MSG_PARAMS]["tryAgainTime"] = 322;
-
- printf("\n Object without enum.\n");
- calculateConvertionTime(srcObj, dstObj);
-}
-
+};
} // namespace smart_object_test
} // namespace components
-} // namespace test
namespace ns_smart_device_link {
namespace ns_smart_objects {
diff --git a/src/components/smart_objects/test/SmartObjectUnit_test.cc b/src/components/smart_objects/test/SmartObjectUnit_test.cc
index 72f96ef939..4a2fadfbe9 100644
--- a/src/components/smart_objects/test/SmartObjectUnit_test.cc
+++ b/src/components/smart_objects/test/SmartObjectUnit_test.cc
@@ -43,7 +43,7 @@ using namespace ns_smart_device_link::ns_smart_objects;
class TestHelper : public ::testing::Test {
protected:
void makeMapObject(SmartObject& obj, const int size) const {
- char i_key[8], j_key[8], k_key[8], value[8];
+ char i_key[32], j_key[32], k_key[32], value[32];
for (int i = 0; i < size; i++)
for (int j = 0; j < size; j++)
@@ -57,7 +57,7 @@ class TestHelper : public ::testing::Test {
}
void checkMapObject(SmartObject& obj, const int size) const {
- char i_key[8], j_key[8], k_key[8], value[8];
+ char i_key[32], j_key[32], k_key[32], value[32];
for (int i = 0; i < size; i++)
for (int j = 0; j < size; j++)
diff --git a/src/components/telemetry_monitor/src/protocol_handler_observer.cc b/src/components/telemetry_monitor/src/protocol_handler_observer.cc
index e696e58506..9a89973e82 100644
--- a/src/components/telemetry_monitor/src/protocol_handler_observer.cc
+++ b/src/components/telemetry_monitor/src/protocol_handler_observer.cc
@@ -37,7 +37,7 @@
namespace telemetry_monitor {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TelemetryMonitor")
+SDL_CREATE_LOG_VARIABLE("TelemetryMonitor")
ProtocolHandlerObserver::ProtocolHandlerObserver(
TelemetryMonitor* telemetry_monitor)
@@ -49,8 +49,7 @@ void ProtocolHandlerObserver::StartMessageProcess(
return;
}
if (time_starts.find(message_id) != time_starts.end()) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Already waiting for stop processing for Message ID: " << message_id);
return;
}
@@ -63,7 +62,7 @@ void ProtocolHandlerObserver::EndMessageProcess(
std::map<uint32_t, date_time::TimeDuration>::const_iterator it =
time_starts.find(message_id);
if (it == time_starts.end()) {
- LOG4CXX_WARN(logger_, "Cant find start time for message" << message_id);
+ SDL_LOG_WARN("Cant find start time for message" << message_id);
return;
}
m->begin = time_starts[message_id];
diff --git a/src/components/telemetry_monitor/src/telemetry_monitor.cc b/src/components/telemetry_monitor/src/telemetry_monitor.cc
index e2f45b7576..b1bb605de3 100644
--- a/src/components/telemetry_monitor/src/telemetry_monitor.cc
+++ b/src/components/telemetry_monitor/src/telemetry_monitor.cc
@@ -47,7 +47,7 @@
namespace telemetry_monitor {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TelemetryMonitor")
+SDL_CREATE_LOG_VARIABLE("TelemetryMonitor")
TelemetryMonitor::TelemetryMonitor(const std::string& server_address,
uint16_t port)
@@ -64,12 +64,12 @@ void TelemetryMonitor::Start() {
}
void TelemetryMonitor::set_streamer(std::shared_ptr<Streamer> streamer) {
- LOG4CXX_AUTO_TRACE(logger_);
- if (thread_ && !thread_->is_running()) {
+ SDL_LOG_AUTO_TRACE();
+ if (thread_ && !thread_->IsRunning()) {
+ thread_->SetDelegate(streamer_.get());
streamer_ = streamer;
- thread_->set_delegate(streamer_.get());
} else {
- LOG4CXX_ERROR(logger_, "Unable to replace streamer if it is active");
+ SDL_LOG_ERROR("Unable to replace streamer if it is active");
}
}
@@ -91,7 +91,7 @@ void TelemetryMonitor::Init(
TelemetryObservable<application_manager::AMTelemetryObserver>* app_manager,
TelemetryObservable<transport_manager::TMTelemetryObserver>*
transport_manager) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK_OR_RETURN_VOID(streamer_);
app_manager->SetTelemetryObserver(&app_observer);
@@ -99,14 +99,16 @@ void TelemetryMonitor::Init(
protocol_handler->SetTelemetryObserver(&ph_observer);
DCHECK_OR_RETURN_VOID(thread_);
- thread_->start(threads::ThreadOptions());
+ thread_->Start(threads::ThreadOptions());
}
void TelemetryMonitor::Stop() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (thread_) {
- thread_->stop();
- thread_->join();
+ thread_->Stop(threads::Thread::kThreadSoftStop);
+ if (thread_->GetDelegate()) {
+ streamer_.reset();
+ }
threads::DeleteThread(thread_);
}
thread_ = NULL;
@@ -130,18 +132,18 @@ Streamer::~Streamer() {
}
void Streamer::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
Start();
while (!stop_flag_) {
- LOG4CXX_INFO(logger_, "Server socket is listening ");
+ SDL_LOG_INFO("Server socket is listening ");
client_socket_fd_ = accept(server_socket_fd_, NULL, NULL);
if (0 > client_socket_fd_) {
- LOG4CXX_ERROR(logger_, "Cant open socket . Socket is busy ");
+ SDL_LOG_ERROR("Cant open socket . Socket is busy ");
Stop();
break;
}
- LOG4CXX_INFO(logger_, "Client connected");
+ SDL_LOG_INFO("Client connected");
is_client_connected_ = true;
while (is_client_connected_) {
@@ -154,7 +156,7 @@ void Streamer::threadMain() {
}
if (!IsReady()) {
- LOG4CXX_INFO(logger_, "Client disconnected.");
+ SDL_LOG_INFO("Client disconnected.");
break;
}
@@ -164,21 +166,21 @@ void Streamer::threadMain() {
}
void Streamer::exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
Stop();
messages_.Shutdown();
ThreadDelegate::exitThreadMain();
}
void Streamer::Start() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
server_socket_fd_ = socket(AF_INET, SOCK_STREAM, 0);
if (0 >= server_socket_fd_) {
- LOG4CXX_ERROR(logger_, "Server open error");
+ SDL_LOG_ERROR("Server open error");
return;
} else {
- LOG4CXX_DEBUG(logger_, "Server socket : " << server_socket_fd_);
+ SDL_LOG_DEBUG("Server socket : " << server_socket_fd_);
}
int32_t optval = 1;
@@ -187,7 +189,7 @@ void Streamer::Start() {
SO_REUSEADDR,
&optval,
sizeof optval)) {
- LOG4CXX_ERROR(logger_, "Unable to set sockopt");
+ SDL_LOG_ERROR("Unable to set sockopt");
return;
}
@@ -199,45 +201,44 @@ void Streamer::Start() {
if (-1 == bind(server_socket_fd_,
reinterpret_cast<struct sockaddr*>(&serv_addr_),
sizeof(serv_addr_))) {
- LOG4CXX_ERROR(logger_,
- "Unable to bind server " << kserver_->ip().c_str() << ':'
+ SDL_LOG_ERROR("Unable to bind server " << kserver_->ip().c_str() << ':'
<< kserver_->port());
return;
}
if (-1 == listen(server_socket_fd_, 1)) {
- LOG4CXX_ERROR(logger_, "Streamer listen error " << strerror(errno));
+ SDL_LOG_ERROR("Streamer listen error " << strerror(errno));
return;
}
}
void Streamer::ShutDownAndCloseSocket(int32_t socket_fd) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (0 < socket_fd) {
- LOG4CXX_INFO(logger_, "Shutdown socket");
+ SDL_LOG_INFO("Shutdown socket");
if (-1 == ::shutdown(socket_fd, SHUT_RDWR)) {
- LOG4CXX_ERROR(logger_, "Unable to shutdown socket");
+ SDL_LOG_ERROR("Unable to shutdown socket");
}
if (-1 == close(socket_fd)) {
- LOG4CXX_ERROR(logger_, "Unable to close socket");
+ SDL_LOG_ERROR("Unable to close socket");
}
} else {
- LOG4CXX_WARN(logger_, "Socket in not connected: " << socket_fd);
+ SDL_LOG_WARN("Socket in not connected: " << socket_fd);
}
}
void Streamer::Stop() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (stop_flag_) {
- LOG4CXX_WARN(logger_, "Already Stopped");
+ SDL_LOG_WARN("Already Stopped");
return;
}
stop_flag_ = true;
messages_.Reset();
- LOG4CXX_WARN(logger_, "Stop server_socket_fd_");
+ SDL_LOG_WARN("Stop server_socket_fd_");
ShutDownAndCloseSocket(server_socket_fd_);
server_socket_fd_ = -1;
- LOG4CXX_WARN(logger_, "Stop client_socket_fd_");
+ SDL_LOG_WARN("Stop client_socket_fd_");
ShutDownAndCloseSocket(client_socket_fd_);
client_socket_fd_ = -1;
is_client_connected_ = false;
@@ -256,10 +257,10 @@ bool Streamer::IsReady() const {
const int retval = select(client_socket_fd_ + 1, 0, &fds, 0, &tv);
if (-1 == retval) {
- LOG4CXX_ERROR(logger_, "An error occurred");
+ SDL_LOG_ERROR("An error occurred");
result = false;
} else if (0 == retval) {
- LOG4CXX_ERROR(logger_, "The timeout expired");
+ SDL_LOG_ERROR("The timeout expired");
result = false;
}
@@ -267,14 +268,14 @@ bool Streamer::IsReady() const {
}
bool Streamer::Send(const std::string& msg) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!IsReady()) {
- LOG4CXX_ERROR(logger_, " Socket is not ready");
+ SDL_LOG_ERROR(" Socket is not ready");
return false;
}
if (-1 == ::send(client_socket_fd_, msg.c_str(), msg.size(), MSG_NOSIGNAL)) {
- LOG4CXX_ERROR(logger_, " Unable to send");
+ SDL_LOG_ERROR(" Unable to send");
return false;
}
return true;
diff --git a/src/components/test_main.cc b/src/components/test_main.cc
index 8912ed9bd2..62442cb64f 100644
--- a/src/components/test_main.cc
+++ b/src/components/test_main.cc
@@ -1,16 +1,33 @@
#include <iostream>
#include "gmock/gmock.h"
#include "utils/custom_string.h"
+
+#ifdef ENABLE_LOG
+#include "utils/logger/log4cxxlogger.h"
+#include "utils/logger/logger_impl.h"
+#endif // ENABLE_LOG
+
#include "utils/logger.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "SDLMain")
+SDL_CREATE_LOG_VARIABLE("SDLMain")
int main(int argc, char** argv) {
+#ifdef ENABLE_LOG
+ // --------------------------------------------------------------------------
+ // Logger initialization
+ // Redefine for each paticular logger implementation
+ auto logger = std::unique_ptr<logger::Log4CXXLogger>(
+ new logger::Log4CXXLogger("log4cxx.properties"));
+ auto logger_impl =
+ std::unique_ptr<logger::LoggerImpl>(new logger::LoggerImpl(false));
+ logger::Logger::instance(logger_impl.get());
+#endif // ENABLE_LOG
+
namespace custom_str = utils::custom_string;
testing::InitGoogleMock(&argc, argv);
::testing::DefaultValue<custom_str::CustomString>::Set(
custom_str::CustomString(""));
const int result = RUN_ALL_TESTS();
- DEINIT_LOGGER();
+ SDL_DEINIT_LOGGER();
return result;
}
diff --git a/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_transport_adapter.h b/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_transport_adapter.h
index 14f954286f..5429f50f7f 100644
--- a/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_transport_adapter.h
+++ b/src/components/transport_manager/include/transport_manager/bluetooth/bluetooth_transport_adapter.h
@@ -56,11 +56,6 @@ class BluetoothTransportAdapter : public TransportAdapterImpl {
BluetoothTransportAdapter(resumption::LastState&,
const TransportManagerSettings& settings);
- /**
- * @brief Destructor.
- */
- virtual ~BluetoothTransportAdapter();
-
protected:
/**
* @brief Return type of device.
diff --git a/src/components/transport_manager/include/transport_manager/tcp/platform_specific/linux/platform_specific_network_interface_listener_impl.h b/src/components/transport_manager/include/transport_manager/tcp/platform_specific/linux/platform_specific_network_interface_listener_impl.h
index bb60b09a9d..4a78af4eb1 100644
--- a/src/components/transport_manager/include/transport_manager/tcp/platform_specific/linux/platform_specific_network_interface_listener_impl.h
+++ b/src/components/transport_manager/include/transport_manager/tcp/platform_specific/linux/platform_specific_network_interface_listener_impl.h
@@ -32,24 +32,32 @@ class InterfaceStatus {
bool IsAvailable() const;
bool IsLoopback() const;
+ const std::string& GetName() const {
+ return name_;
+ }
// only for debugging output
unsigned int GetFlags() const {
return flags_;
}
bool HasIPAddress() const;
- std::string GetIPv4Address() const;
- std::string GetIPv6Address() const;
+ const std::string GetIPv4Address() const;
+ const std::string GetIPv6Address() const;
+
+ void SetName(const std::string& name) {
+ name_ = name;
+ }
void SetFlags(unsigned int flags) {
flags_ = flags;
}
// specify NULL to remove existing address
- void SetIPv4Address(struct in_addr* addr);
- void SetIPv6Address(struct in6_addr* addr);
+ void SetIPv4Address(const struct in_addr* addr);
+ void SetIPv6Address(const struct in6_addr* addr);
private:
+ std::string name_;
unsigned int flags_;
bool has_ipv4_;
bool has_ipv6_;
@@ -57,7 +65,11 @@ class InterfaceStatus {
struct in6_addr ipv6_address_;
};
-typedef std::map<std::string, InterfaceStatus> InterfaceStatusTable;
+/**
+ * @brief A map to store various status (IP addresses, status flags, etc.) of
+ * network interfaces. Keys of the map are index numbers of interfaces.
+ */
+typedef std::map<unsigned int, InterfaceStatus> InterfaceStatusTable;
/**
* @brief Listener to detect various events on network interfaces
@@ -126,6 +138,12 @@ class PlatformSpecificNetworkInterfaceListener
const std::string& GetSelectedInterfaceName() const {
return selected_interface_;
}
+
+ // for testing only: overwrites if_indextoname() by registering a dummy
+ // index-to-name mapping table
+ void SetDummyNameMap(const std::map<unsigned int, std::string>& m) {
+ dummy_name_map_ = m;
+ }
#endif // BUILD_TESTS
private:
@@ -140,6 +158,17 @@ class PlatformSpecificNetworkInterfaceListener
: if_index(interface_index), flags(interface_flags), address() {}
};
+ // use with std::find_if() to search for an entry containing specified
+ // interface name
+ struct NamePredicate {
+ NamePredicate(const std::string& name) : name_(name) {}
+ bool operator()(
+ const std::pair<unsigned int, InterfaceStatus>& entry) const {
+ return entry.second.GetName() == name_;
+ }
+ const std::string& name_;
+ };
+
// parent class which we will notify the events to
TcpClientListener* tcp_client_listener_;
// if configured, NetworkInterfaceListener will always look into the IP
@@ -160,6 +189,7 @@ class PlatformSpecificNetworkInterfaceListener
#ifdef BUILD_TESTS
bool testing_;
+ std::map<unsigned int, std::string> dummy_name_map_;
#endif
void Loop();
@@ -178,6 +208,8 @@ class PlatformSpecificNetworkInterfaceListener
// convert ifaddrmsg to a list of EventParam structs
std::vector<EventParam> ParseIFAddrMessage(struct ifaddrmsg* message,
unsigned int size);
+ // return network interface name of the specified index
+ const std::string GetInterfaceName(unsigned int if_index) const;
// for debugging
void DumpTable() const;
diff --git a/src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h b/src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h
index f033d35bf7..30ecf1a277 100644
--- a/src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h
+++ b/src/components/transport_manager/include/transport_manager/tcp/tcp_client_listener.h
@@ -37,6 +37,9 @@
#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_TCP_CLIENT_LISTENER_H_
#include "transport_manager/transport_adapter/client_connection_listener.h"
+
+#include <atomic>
+
#include "utils/lock.h"
#include "utils/threads/thread_delegate.h"
@@ -149,7 +152,8 @@ class TcpClientListener : public ClientConnectionListener {
bool started_;
threads::Thread* thread_;
int socket_;
- bool thread_stop_requested_;
+ std::atomic_bool thread_stop_requested_;
+ std::atomic_bool remove_devices_on_terminate_;
int pipe_fds_[2];
NetworkInterfaceListener* interface_listener_;
const std::string designated_interface_;
diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h
index f8aa93b4e6..cfc886cb15 100644
--- a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h
+++ b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h
@@ -582,6 +582,16 @@ class TransportAdapterImpl : public TransportAdapter,
DeviceUID GetNextRetryDevice();
/**
+ * @brief Remove a connection from the list without triggering
+ *the connection's destructor inside of a list lock
+ *
+ * @param device_handle Device unique identifier.
+ * @param app_handle Handle of application.
+ */
+ void RemoveConnection(const DeviceUID& device_id,
+ const ApplicationHandle& app_handle);
+
+ /**
* @brief Remove specified device
* @param device_handle Device unique identifier.
*/
diff --git a/src/components/transport_manager/include/transport_manager/usb/libusb/usb_connection.h b/src/components/transport_manager/include/transport_manager/usb/libusb/usb_connection.h
index 0fb9c599c7..4d0fa70f70 100644
--- a/src/components/transport_manager/include/transport_manager/usb/libusb/usb_connection.h
+++ b/src/components/transport_manager/include/transport_manager/usb/libusb/usb_connection.h
@@ -86,7 +86,7 @@ class UsbConnection : public Connection {
std::list<protocol_handler::RawMessagePtr> out_messages_;
protocol_handler::RawMessagePtr current_out_message_;
- sync_primitives::Lock out_messages_mutex_;
+ sync_primitives::RecursiveLock out_messages_mutex_;
size_t bytes_sent_;
bool disconnecting_;
bool waiting_in_transfer_cancel_;
diff --git a/src/components/transport_manager/include/transport_manager/usb/libusb/usb_handler.h b/src/components/transport_manager/include/transport_manager/usb/libusb/usb_handler.h
index 9c16b49df6..eabb902379 100644
--- a/src/components/transport_manager/include/transport_manager/usb/libusb/usb_handler.h
+++ b/src/components/transport_manager/include/transport_manager/usb/libusb/usb_handler.h
@@ -37,6 +37,7 @@
#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_USB_LIBUSB_USB_HANDLER_H_
#include <libusb-1.0/libusb.h>
+#include <atomic>
#include "transport_manager/transport_adapter/transport_adapter.h"
#include "transport_manager/usb/libusb/platform_usb_device.h"
@@ -71,6 +72,11 @@ class UsbHandler {
void SubmitControlTransfer(ControlTransferSequenceState* sequence_state);
friend void UsbTransferSequenceCallback(libusb_transfer* transfer);
+ void RequestStopThread();
+ void DeregisterHotplugCallbacks();
+ void JoinAndDeleteThread();
+ void InvokeLibusbExit();
+
private:
class UsbHandlerDelegate : public threads::ThreadDelegate {
public:
@@ -82,7 +88,7 @@ class UsbHandler {
UsbHandler* handler_;
};
- bool shutdown_requested_;
+ std::atomic<bool> shutdown_requested_;
threads::Thread* thread_;
friend class UsbDeviceListener;
diff --git a/src/components/transport_manager/include/transport_manager/websocket_server/websocket_connection.h b/src/components/transport_manager/include/transport_manager/websocket_server/websocket_connection.h
index fb904d645e..b3dc04a897 100644
--- a/src/components/transport_manager/include/transport_manager/websocket_server/websocket_connection.h
+++ b/src/components/transport_manager/include/transport_manager/websocket_server/websocket_connection.h
@@ -48,7 +48,6 @@ namespace transport_adapter {
using ::utils::MessageQueue;
-typedef ::protocol_handler::RawMessagePtr Message;
typedef std::queue<Message> AsyncQueue;
class TransportAdapterController;
@@ -75,10 +74,11 @@ class WebSocketConnection
TransportAdapter::Error Disconnect() OVERRIDE;
- TransportAdapter::Error SendData(
- protocol_handler::RawMessagePtr message) OVERRIDE;
+ TransportAdapter::Error SendData(Message message) OVERRIDE;
- void DataReceive(protocol_handler::RawMessagePtr frame);
+ void DataReceive(Message frame);
+ void DataSendDone(Message frame);
+ void DataSendFailed(Message frame);
void Run();
bool IsShuttingDown();
@@ -99,21 +99,17 @@ class WebSocketConnection
class LoopThreadDelegate : public threads::ThreadDelegate {
public:
LoopThreadDelegate(MessageQueue<Message, AsyncQueue>* message_queue,
- DataWriteCallback data_write,
- OnIOErrorCallback on_io_error);
+ DataWriteCallback data_write);
virtual void threadMain() OVERRIDE;
virtual void exitThreadMain() OVERRIDE;
- void OnWrite();
-
void SetShutdown();
private:
void DrainQueue();
MessageQueue<Message, AsyncQueue>& message_queue_;
DataWriteCallback data_write_;
- OnIOErrorCallback on_io_error_;
};
LoopThreadDelegate* thread_delegate_;
diff --git a/src/components/transport_manager/include/transport_manager/websocket_server/websocket_secure_session.h b/src/components/transport_manager/include/transport_manager/websocket_server/websocket_secure_session.h
index a3ead8e5a5..ed42207200 100644
--- a/src/components/transport_manager/include/transport_manager/websocket_server/websocket_secure_session.h
+++ b/src/components/transport_manager/include/transport_manager/websocket_server/websocket_secure_session.h
@@ -37,15 +37,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(wss_logger_, "WebSocketSecureSession")
-
template <typename ExecutorType = ssl::stream<tcp::socket&> >
class WebSocketSecureSession : public WebSocketSession<ExecutorType> {
public:
WebSocketSecureSession(tcp::socket,
ssl::context& ctx,
DataReceiveCallback data_receive,
- OnIOErrorCallback on_errror);
+ DataSendDoneCallback data_send_done,
+ DataSendFailedCallback data_send_failed,
+ OnIOErrorCallback on_error);
void AsyncAccept() OVERRIDE;
virtual void AsyncHandshake(boost::system::error_code ec);
diff --git a/src/components/transport_manager/include/transport_manager/websocket_server/websocket_session.h b/src/components/transport_manager/include/transport_manager/websocket_server/websocket_session.h
index a8dadc9831..f1be1a3b54 100644
--- a/src/components/transport_manager/include/transport_manager/websocket_server/websocket_session.h
+++ b/src/components/transport_manager/include/transport_manager/websocket_server/websocket_session.h
@@ -35,6 +35,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <boost/asio/strand.hpp>
#include <boost/beast/core.hpp>
#include <boost/beast/websocket.hpp>
+#include <functional>
+
#include "protocol/raw_message.h"
#include "transport_manager/transport_adapter/transport_adapter.h"
#include "utils/logger.h"
@@ -46,10 +48,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace transport_manager {
namespace transport_adapter {
-using DataReceiveCallback =
- std::function<void(protocol_handler::RawMessagePtr)>;
-using DataWriteCallback = std::function<TransportAdapter::Error(
- protocol_handler::RawMessagePtr message)>;
+using Message = ::protocol_handler::RawMessagePtr;
+using DataReceiveCallback = std::function<void(Message)>;
+using DataSendDoneCallback = DataReceiveCallback;
+using DataSendFailedCallback = DataReceiveCallback;
+using DataWriteCallback = DataReceiveCallback;
using OnIOErrorCallback = std::function<void()>;
using tcp = boost::asio::ip::tcp; // from <boost/asio/ip/tcp.hpp>
@@ -59,8 +62,6 @@ namespace websocket =
namespace ssl = boost::asio::ssl; // from <boost/asio/ssl.hpp>
#endif // ENABLE_SECURITY
-CREATE_LOGGERPTR_GLOBAL(ws_logger_, "WebSocketSession")
-
class TransportAdapterController;
template <typename ExecutorType = tcp::socket&>
@@ -69,12 +70,16 @@ class WebSocketSession
public:
WebSocketSession(boost::asio::ip::tcp::socket socket,
DataReceiveCallback data_receive,
+ DataSendDoneCallback data_send_done,
+ DataSendFailedCallback data_send_failed,
OnIOErrorCallback on_error);
#ifdef ENABLE_SECURITY
WebSocketSession(boost::asio::ip::tcp::socket socket,
ssl::context& ctx,
DataReceiveCallback data_receive,
+ DataSendDoneCallback data_send_done,
+ DataSendFailedCallback data_send_failed,
OnIOErrorCallback on_error);
#endif // ENABLE_SECURITY
@@ -84,8 +89,7 @@ class WebSocketSession
virtual void AsyncRead(boost::system::error_code ec);
- virtual TransportAdapter::Error WriteDown(
- ::protocol_handler::RawMessagePtr message);
+ virtual void WriteDown(Message message);
virtual void Read(boost::system::error_code ec,
std::size_t bytes_transferred);
@@ -98,6 +102,8 @@ class WebSocketSession
boost::asio::strand<boost::asio::io_context::executor_type> strand_;
boost::beast::flat_buffer buffer_;
DataReceiveCallback data_receive_;
+ DataSendDoneCallback data_send_done_;
+ DataSendFailedCallback data_send_failed_;
OnIOErrorCallback on_io_error_;
};
diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc b/src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc
index 19f4078443..ba48624adb 100644
--- a/src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc
+++ b/src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc
@@ -41,7 +41,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
BluetoothConnectionFactory::BluetoothConnectionFactory(
TransportAdapterController* controller)
@@ -53,15 +53,14 @@ TransportAdapter::Error BluetoothConnectionFactory::Init() {
TransportAdapter::Error BluetoothConnectionFactory::CreateConnection(
const DeviceUID& device_uid, const ApplicationHandle& app_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::shared_ptr<BluetoothSocketConnection> connection =
std::make_shared<BluetoothSocketConnection>(
device_uid, app_handle, controller_);
controller_->ConnectionCreated(connection, device_uid, app_handle);
TransportAdapter::Error error = connection->Start();
if (TransportAdapter::OK != error) {
- LOG4CXX_ERROR(logger_,
- "Bluetooth connection::Start() failed with error: " << error);
+ SDL_LOG_ERROR("Bluetooth connection::Start() failed with error: " << error);
}
return error;
}
diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_device.cc b/src/components/transport_manager/src/bluetooth/bluetooth_device.cc
index 734d8fe1e9..5e19e32ea3 100644
--- a/src/components/transport_manager/src/bluetooth/bluetooth_device.cc
+++ b/src/components/transport_manager/src/bluetooth/bluetooth_device.cc
@@ -51,39 +51,37 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
bool BluetoothDevice::GetRfcommChannel(const ApplicationHandle app_handle,
uint8_t* channel_out) {
- LOG4CXX_TRACE(logger_,
- "enter. app_handle: " << app_handle
+ SDL_LOG_TRACE("enter. app_handle: " << app_handle
<< ", channel_out: " << std::hex
<< reinterpret_cast<void*>(channel_out));
if (app_handle < 0 || app_handle > std::numeric_limits<uint8_t>::max()) {
- LOG4CXX_TRACE(logger_,
- "exit with FALSE. Condition: app_handle < 0 || app_handle > "
- "numeric_limits::max()");
+ SDL_LOG_TRACE(
+ "exit with FALSE. Condition: app_handle < 0 || app_handle > "
+ "numeric_limits::max()");
return false;
}
const uint8_t channel = static_cast<uint8_t>(app_handle);
RfcommChannelVector::const_iterator it =
std::find(rfcomm_channels_.begin(), rfcomm_channels_.end(), channel);
if (it == rfcomm_channels_.end()) {
- LOG4CXX_TRACE(
- logger_,
+ SDL_LOG_TRACE(
"exit with FALSE. Condition: channel not found in RfcommChannelVector");
return false;
}
*channel_out = channel;
- LOG4CXX_TRACE(logger_, "exit with TRUE");
+ SDL_LOG_TRACE("exit with TRUE");
return true;
}
std::string BluetoothDevice::GetUniqueDeviceId(const bdaddr_t& device_address) {
- LOG4CXX_TRACE(logger_, "enter. device_adress: " << &device_address);
+ SDL_LOG_TRACE("enter. device_adress: " << &device_address);
char device_address_string[32];
ba2str(&device_address, device_address_string);
- LOG4CXX_TRACE(logger_, "exit with BT-" << device_address_string);
+ SDL_LOG_TRACE("exit with BT-" << device_address_string);
return std::string("BT-") + device_address_string;
}
@@ -95,7 +93,7 @@ BluetoothDevice::BluetoothDevice(const bdaddr_t& device_address,
, rfcomm_channels_(rfcomm_channels) {}
bool BluetoothDevice::IsSameAs(const Device* other) const {
- LOG4CXX_TRACE(logger_, "enter. device: " << other);
+ SDL_LOG_TRACE("enter. device: " << other);
bool result = false;
const BluetoothDevice* other_bluetooth_device =
@@ -109,9 +107,9 @@ bool BluetoothDevice::IsSameAs(const Device* other) const {
}
}
if (result) {
- LOG4CXX_TRACE(logger_, "exit with TRUE");
+ SDL_LOG_TRACE("exit with TRUE");
} else {
- LOG4CXX_TRACE(logger_, "exit with FALSE");
+ SDL_LOG_TRACE("exit with FALSE");
}
return result;
}
diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc b/src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc
index 4759b2003a..f152f1f78d 100644
--- a/src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc
+++ b/src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc
@@ -57,7 +57,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
namespace {
char* SplitToAddr(char* dev_list_entry) {
@@ -71,14 +71,14 @@ char* SplitToAddr(char* dev_list_entry) {
}
int FindPairedDevs(std::vector<bdaddr_t>* result) {
- LOG4CXX_TRACE(logger_, "enter. result adress: " << result);
+ SDL_LOG_TRACE("enter. result address: " << result);
DCHECK(result != NULL);
const char* cmd = "bt-device -l";
FILE* pipe = popen(cmd, "r");
if (!pipe) {
- LOG4CXX_TRACE(logger_, "exit -1. Condition: !pipe");
+ SDL_LOG_TRACE("exit -1. Condition: !pipe");
return -1;
}
char* buffer = new char[1028];
@@ -96,7 +96,7 @@ int FindPairedDevs(std::vector<bdaddr_t>* result) {
buffer = new char[1028];
}
pclose(pipe);
- LOG4CXX_TRACE(logger_, "exit with 0");
+ SDL_LOG_TRACE("exit with 0");
delete[] buffer;
return 0;
}
@@ -158,17 +158,17 @@ BluetoothDeviceScanner::BluetoothDeviceScanner(
}
BluetoothDeviceScanner::~BluetoothDeviceScanner() {
- thread_->join();
- delete thread_->delegate();
+ thread_->Stop(threads::Thread::kThreadSoftStop);
+ delete thread_->GetDelegate();
threads::DeleteThread(thread_);
}
bool BluetoothDeviceScanner::IsInitialised() const {
- return thread_ && thread_->is_running();
+ return thread_ && thread_->IsRunning();
}
void BluetoothDeviceScanner::UpdateTotalDeviceList() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DeviceVector devices;
devices.insert(devices.end(),
paired_devices_with_sdl_.begin(),
@@ -180,11 +180,11 @@ void BluetoothDeviceScanner::UpdateTotalDeviceList() {
}
void BluetoothDeviceScanner::DoInquiry() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const int device_id = hci_get_route(0);
if (device_id < 0) {
- LOG4CXX_INFO(logger_, "HCI device is not available");
+ SDL_LOG_INFO("HCI device is not available");
shutdown_requested_ = true;
controller_->SearchDeviceFailed(SearchDeviceError());
return;
@@ -197,15 +197,14 @@ void BluetoothDeviceScanner::DoInquiry() {
}
if (paired_devices_.empty()) {
- LOG4CXX_INFO(logger_, "Searching for paired devices.");
+ SDL_LOG_INFO("Searching for paired devices.");
if (-1 == FindPairedDevs(&paired_devices_)) {
- LOG4CXX_ERROR(logger_, "Failed to retrieve list of paired devices.");
+ SDL_LOG_ERROR("Failed to retrieve list of paired devices.");
controller_->SearchDeviceFailed(SearchDeviceError());
}
}
- LOG4CXX_INFO(logger_,
- "Check rfcomm channel on " << paired_devices_.size()
+ SDL_LOG_INFO("Check rfcomm channel on " << paired_devices_.size()
<< " paired devices.");
paired_devices_with_sdl_.clear();
@@ -213,7 +212,7 @@ void BluetoothDeviceScanner::DoInquiry() {
paired_devices_, device_handle, &paired_devices_with_sdl_);
UpdateTotalDeviceList();
- LOG4CXX_INFO(logger_, "Starting hci_inquiry on device " << device_id);
+ SDL_LOG_INFO("Starting hci_inquiry on device " << device_id);
const uint8_t inquiry_time = 8u; // Time unit is 1.28 seconds
const size_t max_devices = 256u;
inquiry_info* inquiry_info_list = new inquiry_info[max_devices];
@@ -226,8 +225,7 @@ void BluetoothDeviceScanner::DoInquiry() {
IREQ_CACHE_FLUSH);
if (number_of_devices >= 0) {
- LOG4CXX_INFO(logger_,
- "hci_inquiry: found " << number_of_devices << " devices");
+ SDL_LOG_INFO("hci_inquiry: found " << number_of_devices << " devices");
std::vector<bdaddr_t> found_devices(number_of_devices);
for (int i = 0; i < number_of_devices; ++i) {
found_devices[i] = inquiry_info_list[i].bdaddr;
@@ -243,7 +241,7 @@ void BluetoothDeviceScanner::DoInquiry() {
delete[] inquiry_info_list;
if (number_of_devices < 0) {
- LOG4CXX_DEBUG(logger_, "number_of_devices < 0");
+ SDL_LOG_DEBUG("number_of_devices < 0");
controller_->SearchDeviceFailed(SearchDeviceError());
}
}
@@ -252,10 +250,9 @@ void BluetoothDeviceScanner::CheckSDLServiceOnDevices(
const std::vector<bdaddr_t>& bd_addresses,
int device_handle,
DeviceVector* discovered_devices) {
- LOG4CXX_TRACE(logger_,
- "enter. bd_addresses: "
- << &bd_addresses << ", device_handle: " << device_handle
- << ", discovered_devices: " << discovered_devices);
+ SDL_LOG_TRACE("enter. bd_addresses: "
+ << &bd_addresses << ", device_handle: " << device_handle
+ << ", discovered_devices: " << discovered_devices);
std::vector<RfcommChannelVector> sdl_rfcomm_channels =
DiscoverSmartDeviceLinkRFCOMMChannels(bd_addresses);
@@ -274,7 +271,7 @@ void BluetoothDeviceScanner::CheckSDLServiceOnDevices(
0);
if (hci_read_remote_name_ret != 0) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "hci_read_remote_name failed");
+ SDL_LOG_ERROR_WITH_ERRNO("hci_read_remote_name failed");
int name_len = sizeof(deviceName) / sizeof(deviceName[0]);
strncpy(deviceName,
BluetoothDevice::GetUniqueDeviceId(bd_address).c_str(),
@@ -285,19 +282,19 @@ void BluetoothDeviceScanner::CheckSDLServiceOnDevices(
auto bluetooth_device = std::make_shared<BluetoothDevice>(
bd_address, deviceName, sdl_rfcomm_channels[i]);
if (bluetooth_device) {
- LOG4CXX_INFO(logger_, "Bluetooth device created successfully");
+ SDL_LOG_INFO("Bluetooth device created successfully");
discovered_devices->push_back(bluetooth_device);
} else {
- LOG4CXX_WARN(logger_, "Can't create bluetooth device " << deviceName);
+ SDL_LOG_WARN("Can't create bluetooth device " << deviceName);
}
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
std::vector<BluetoothDeviceScanner::RfcommChannelVector>
BluetoothDeviceScanner::DiscoverSmartDeviceLinkRFCOMMChannels(
const std::vector<bdaddr_t>& device_addresses) {
- LOG4CXX_TRACE(logger_, "enter device_addresses: " << &device_addresses);
+ SDL_LOG_TRACE("enter device_addresses: " << &device_addresses);
const size_t size = device_addresses.size();
std::vector<RfcommChannelVector> result(size);
@@ -322,16 +319,14 @@ BluetoothDeviceScanner::DiscoverSmartDeviceLinkRFCOMMChannels(
}
sleep(attempt_timeout);
}
- LOG4CXX_TRACE(
- logger_,
+ SDL_LOG_TRACE(
"exit with vector<RfcommChannelVector>: size = " << result.size());
return result;
}
bool BluetoothDeviceScanner::DiscoverSmartDeviceLinkRFCOMMChannels(
const bdaddr_t& device_address, RfcommChannelVector* channels) {
- LOG4CXX_TRACE(logger_,
- "enter. device_address: " << &device_address
+ SDL_LOG_TRACE("enter. device_address: " << &device_address
<< ", channels: " << channels);
static bdaddr_t any_address = {{0, 0, 0, 0, 0, 0}};
@@ -340,9 +335,9 @@ bool BluetoothDeviceScanner::DiscoverSmartDeviceLinkRFCOMMChannels(
if (sdp_session == 0) {
bool result = !(errno == 31 || errno == 16 || errno == 117 || errno == 114);
if (result) {
- LOG4CXX_TRACE(logger_, "exit with TRUE. Condition: sdp_session == 0");
+ SDL_LOG_TRACE("exit with TRUE. Condition: sdp_session == 0");
} else {
- LOG4CXX_TRACE(logger_, "exit with FALSE. Condition: sdp_session == 0");
+ SDL_LOG_TRACE("exit with FALSE. Condition: sdp_session == 0");
}
return result;
}
@@ -400,7 +395,7 @@ bool BluetoothDeviceScanner::DiscoverSmartDeviceLinkRFCOMMChannels(
sdp_close(sdp_session);
if (!channels->empty()) {
- LOG4CXX_INFO(logger_, "channels not empty");
+ SDL_LOG_INFO("channels not empty");
std::stringstream rfcomm_channels_string;
for (RfcommChannelVector::const_iterator it = channels->begin();
@@ -412,22 +407,19 @@ bool BluetoothDeviceScanner::DiscoverSmartDeviceLinkRFCOMMChannels(
rfcomm_channels_string << static_cast<uint32_t>(*it);
}
- LOG4CXX_INFO(
- logger_,
- "SmartDeviceLink service was discovered on device "
- << BluetoothDevice::GetUniqueDeviceId(device_address)
- << " at channel(s): " << rfcomm_channels_string.str().c_str());
+ SDL_LOG_INFO("SmartDeviceLink service was discovered on device "
+ << BluetoothDevice::GetUniqueDeviceId(device_address)
+ << " at channel(s): " << rfcomm_channels_string.str().c_str());
} else {
- LOG4CXX_INFO(logger_,
- "SmartDeviceLink service was not discovered on device "
- << BluetoothDevice::GetUniqueDeviceId(device_address));
+ SDL_LOG_INFO("SmartDeviceLink service was not discovered on device "
+ << BluetoothDevice::GetUniqueDeviceId(device_address));
}
- LOG4CXX_TRACE(logger_, "exit with TRUE");
+ SDL_LOG_TRACE("exit with TRUE");
return true;
}
void BluetoothDeviceScanner::Thread() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ready_ = true;
if (auto_repeat_search_) {
while (!shutdown_requested_) {
@@ -453,10 +445,10 @@ void BluetoothDeviceScanner::Thread() {
}
void BluetoothDeviceScanner::TimedWaitForDeviceScanRequest() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (auto_repeat_pause_sec_ == 0) {
- LOG4CXX_TRACE(logger_, "exit. Condition: auto_repeat_pause_sec_ == 0");
+ SDL_LOG_TRACE("exit. Condition: auto_repeat_pause_sec_ == 0");
return;
}
@@ -467,7 +459,7 @@ void BluetoothDeviceScanner::TimedWaitForDeviceScanRequest() {
device_scan_requested_cv_.WaitFor(auto_lock,
auto_repeat_pause_sec_ * 1000);
if (wait_status == sync_primitives::ConditionalVariable::kTimeout) {
- LOG4CXX_INFO(logger_, "Bluetooth scanner timeout, performing scan");
+ SDL_LOG_INFO("Bluetooth scanner timeout, performing scan");
device_scan_requested_ = true;
}
}
@@ -475,17 +467,17 @@ void BluetoothDeviceScanner::TimedWaitForDeviceScanRequest() {
}
TransportAdapter::Error BluetoothDeviceScanner::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
- if (!thread_->start()) {
- LOG4CXX_ERROR(logger_, "Bluetooth device scanner thread start failed");
+ SDL_LOG_AUTO_TRACE();
+ if (!thread_->Start()) {
+ SDL_LOG_ERROR("Bluetooth device scanner thread start failed");
return TransportAdapter::FAIL;
}
- LOG4CXX_INFO(logger_, "Bluetooth device scanner thread started");
+ SDL_LOG_INFO("Bluetooth device scanner thread started");
return TransportAdapter::OK;
}
void BluetoothDeviceScanner::Terminate() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
shutdown_requested_ = true;
if (thread_) {
{
@@ -493,17 +485,16 @@ void BluetoothDeviceScanner::Terminate() {
device_scan_requested_ = false;
device_scan_requested_cv_.NotifyOne();
}
- LOG4CXX_INFO(logger_,
- "Waiting for bluetooth device scanner thread termination");
- thread_->stop();
- LOG4CXX_INFO(logger_, "Bluetooth device scanner thread stopped");
+ SDL_LOG_INFO("Waiting for bluetooth device scanner thread termination");
+ thread_->Stop(threads::Thread::kThreadStopDelegate);
+ SDL_LOG_INFO("Bluetooth device scanner thread stopped");
}
}
TransportAdapter::Error BluetoothDeviceScanner::Scan() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if ((!IsInitialised()) || shutdown_requested_) {
- LOG4CXX_WARN(logger_, "BAD_STATE");
+ SDL_LOG_WARN("BAD_STATE");
return TransportAdapter::BAD_STATE;
}
if (auto_repeat_pause_sec_ == 0) {
@@ -513,12 +504,12 @@ TransportAdapter::Error BluetoothDeviceScanner::Scan() {
sync_primitives::AutoLock auto_lock(device_scan_requested_lock_);
if (!device_scan_requested_) {
- LOG4CXX_TRACE(logger_, "Requesting device Scan");
+ SDL_LOG_TRACE("Requesting device Scan");
device_scan_requested_ = true;
device_scan_requested_cv_.NotifyOne();
} else {
ret = TransportAdapter::BAD_STATE;
- LOG4CXX_WARN(logger_, "BAD_STATE");
+ SDL_LOG_WARN("BAD_STATE");
}
return ret;
}
@@ -528,7 +519,7 @@ BluetoothDeviceScanner::BluetoothDeviceScannerDelegate::
: scanner_(scanner) {}
void BluetoothDeviceScanner::BluetoothDeviceScannerDelegate::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(scanner_);
scanner_->Thread();
}
diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc b/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc
index 78597ac2ad..87012c0690 100644
--- a/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc
+++ b/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc
@@ -48,7 +48,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
BluetoothSocketConnection::BluetoothSocketConnection(
const DeviceUID& device_uid,
@@ -61,8 +61,8 @@ BluetoothSocketConnection::~BluetoothSocketConnection() {
}
bool BluetoothSocketConnection::Establish(ConnectError** error) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "error: " << error);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("error: " << error);
DeviceSptr device = controller()->FindDevice(device_handle());
BluetoothDevice* bluetooth_device =
@@ -71,10 +71,9 @@ bool BluetoothSocketConnection::Establish(ConnectError** error) {
uint8_t rfcomm_channel;
if (!bluetooth_device->GetRfcommChannel(application_handle(),
&rfcomm_channel)) {
- LOG4CXX_DEBUG(logger_,
- "Application " << application_handle() << " not found");
+ SDL_LOG_DEBUG("Application " << application_handle() << " not found");
*error = new ConnectError();
- LOG4CXX_TRACE(logger_, "exit with FALSE");
+ SDL_LOG_TRACE("exit with FALSE");
return false;
}
@@ -89,25 +88,24 @@ bool BluetoothSocketConnection::Establish(ConnectError** error) {
int attempts = 4;
int connect_status = 0;
- LOG4CXX_DEBUG(logger_, "start rfcomm Connect attempts");
+ SDL_LOG_DEBUG("start rfcomm Connect attempts");
do {
rfcomm_socket = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
if (-1 == rfcomm_socket) {
- LOG4CXX_ERROR_WITH_ERRNO(
- logger_,
- "Failed to create RFCOMM socket for device " << device_handle());
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to create RFCOMM socket for device "
+ << device_handle());
*error = new ConnectError();
- LOG4CXX_TRACE(logger_, "exit with FALSE");
+ SDL_LOG_TRACE("exit with FALSE");
return false;
}
connect_status = ::connect(rfcomm_socket,
(struct sockaddr*)&remoteSocketAddress,
sizeof(remoteSocketAddress));
if (0 == connect_status) {
- LOG4CXX_DEBUG(logger_, "rfcomm Connect ok");
+ SDL_LOG_DEBUG("rfcomm Connect ok");
break;
} else { // If connect_status is not 0, an errno is returned
- LOG4CXX_WARN_WITH_ERRNO(logger_, "rfcomm Connect failed");
+ SDL_LOG_WARN_WITH_ERRNO("rfcomm Connect failed");
close(rfcomm_socket); // Always close the socket upon error
if (errno != ECONNREFUSED && errno != ECONNRESET) {
break;
@@ -115,20 +113,19 @@ bool BluetoothSocketConnection::Establish(ConnectError** error) {
}
sleep(2);
} while (--attempts > 0);
- LOG4CXX_INFO(logger_, "rfcomm Connect attempts finished");
+ SDL_LOG_INFO("rfcomm Connect attempts finished");
if (0 != connect_status) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Failed to Connect to remote device "
- << BluetoothDevice::GetUniqueDeviceId(remoteSocketAddress.rc_bdaddr)
- << " for session " << this);
+ << BluetoothDevice::GetUniqueDeviceId(remoteSocketAddress.rc_bdaddr)
+ << " for session " << this);
*error = new ConnectError();
- LOG4CXX_TRACE(logger_, "exit with FALSE");
+ SDL_LOG_TRACE("exit with FALSE");
return false;
}
set_socket(rfcomm_socket);
- LOG4CXX_TRACE(logger_, "exit with TRUE");
+ SDL_LOG_TRACE("exit with TRUE");
return true;
}
diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc b/src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc
index 066751c474..abeb50e798 100644
--- a/src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc
+++ b/src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc
@@ -52,9 +52,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
-
-BluetoothTransportAdapter::~BluetoothTransportAdapter() {}
+SDL_CREATE_LOG_VARIABLE("TransportManager")
BluetoothTransportAdapter::BluetoothTransportAdapter(
resumption::LastStateWrapperPtr last_state_wrapper,
@@ -71,7 +69,7 @@ DeviceType BluetoothTransportAdapter::GetDeviceType() const {
}
void BluetoothTransportAdapter::Store() const {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
Json::Value bluetooth_adapter_dictionary;
Json::Value devices_dictionary;
DeviceList device_ids = GetDeviceList();
@@ -118,11 +116,11 @@ void BluetoothTransportAdapter::Store() const {
dictionary["TransportManager"]["BluetoothAdapter"] =
bluetooth_adapter_dictionary;
accessor.GetMutableData().set_dictionary(dictionary);
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
bool BluetoothTransportAdapter::Restore() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
bool errors_occured = false;
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
Json::Value dictionary = accessor.GetData().dictionary();
@@ -161,9 +159,9 @@ bool BluetoothTransportAdapter::Restore() {
}
bool result = !errors_occured;
if (result) {
- LOG4CXX_TRACE(logger_, "exit with TRUE");
+ SDL_LOG_TRACE("exit with TRUE");
} else {
- LOG4CXX_TRACE(logger_, "exit with FALSE");
+ SDL_LOG_TRACE("exit with FALSE");
}
return result;
}
diff --git a/src/components/transport_manager/src/cloud/cloud_device.cc b/src/components/transport_manager/src/cloud/cloud_device.cc
index 9225589d57..06a8e66495 100644
--- a/src/components/transport_manager/src/cloud/cloud_device.cc
+++ b/src/components/transport_manager/src/cloud/cloud_device.cc
@@ -37,7 +37,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
CloudDevice::CloudDevice(std::string& host,
std::string& port,
@@ -53,7 +53,7 @@ CloudDevice::CloudDevice(CloudAppEndpoint& endpoint, std::string& name)
: Device(name, std::string(name)), endpoint_(endpoint) {}
bool CloudDevice::IsSameAs(const Device* other) const {
- LOG4CXX_TRACE(logger_, "enter. device: " << other);
+ SDL_LOG_TRACE("enter. device: " << other);
const CloudDevice* other_cloud_device =
dynamic_cast<const CloudDevice*>(other);
diff --git a/src/components/transport_manager/src/cloud/cloud_websocket_connection_factory.cc b/src/components/transport_manager/src/cloud/cloud_websocket_connection_factory.cc
index d072685eef..27e14b4d33 100644
--- a/src/components/transport_manager/src/cloud/cloud_websocket_connection_factory.cc
+++ b/src/components/transport_manager/src/cloud/cloud_websocket_connection_factory.cc
@@ -43,7 +43,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
CloudWebsocketConnectionFactory::CloudWebsocketConnectionFactory(
TransportAdapterController* controller)
@@ -55,7 +55,7 @@ TransportAdapter::Error CloudWebsocketConnectionFactory::Init() {
TransportAdapter::Error CloudWebsocketConnectionFactory::CreateConnection(
const DeviceUID& device_uid, const ApplicationHandle& app_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto connection = controller_->FindPendingConnection(device_uid, app_handle);
std::shared_ptr<WebsocketClientConnection> ws_connection =
@@ -66,8 +66,7 @@ TransportAdapter::Error CloudWebsocketConnectionFactory::CreateConnection(
TransportAdapter::Error error = ws_connection->Start();
if (TransportAdapter::OK != error) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Cloud Websocket connection::Start() failed with error: " << error);
}
return error;
diff --git a/src/components/transport_manager/src/cloud/cloud_websocket_transport_adapter.cc b/src/components/transport_manager/src/cloud/cloud_websocket_transport_adapter.cc
index 2d1de703b1..402a103910 100644
--- a/src/components/transport_manager/src/cloud/cloud_websocket_transport_adapter.cc
+++ b/src/components/transport_manager/src/cloud/cloud_websocket_transport_adapter.cc
@@ -41,7 +41,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
CloudWebsocketTransportAdapter::CloudWebsocketTransportAdapter(
resumption::LastStateWrapperPtr last_state_wrapper,
@@ -99,18 +99,18 @@ void CloudWebsocketTransportAdapter::CreateDevice(const std::string& uid) {
std::string str = uid;
if (!boost::regex_search(str, results, group_pattern)) {
- LOG4CXX_DEBUG(logger_, "Invalid Pattern: " << uid);
+ SDL_LOG_DEBUG("Invalid Pattern: " << uid);
return;
}
- LOG4CXX_DEBUG(logger_, "#Results: " << results.size());
+ SDL_LOG_DEBUG("#Results: " << results.size());
std::string results_str;
for (size_t i = 0; i < results.size(); i++) {
results_str += " R[" + std::to_string(i) + "]:";
results_str +=
(results[i].length() != 0) ? results[i] : std::string("<EMPTY>");
}
- LOG4CXX_DEBUG(logger_, "Results: " << results_str);
+ SDL_LOG_DEBUG("Results: " << results_str);
std::string device_id = uid;
@@ -120,11 +120,10 @@ void CloudWebsocketTransportAdapter::CreateDevice(const std::string& uid) {
.query = results[9],
.fragment = results[10]};
- LOG4CXX_DEBUG(logger_,
- "Creating Cloud Device For Host: "
- << endpoint.host << " at Port: " << endpoint.port
- << " with Target: "
- << (endpoint.path + endpoint.query + endpoint.fragment));
+ SDL_LOG_DEBUG("Creating Cloud Device For Host: "
+ << endpoint.host << " at Port: " << endpoint.port
+ << " with Target: "
+ << (endpoint.path + endpoint.query + endpoint.fragment));
auto cloud_device = std::make_shared<CloudDevice>(endpoint, device_id);
diff --git a/src/components/transport_manager/src/cloud/websocket_client_connection.cc b/src/components/transport_manager/src/cloud/websocket_client_connection.cc
index 794cf57208..b190e73cb6 100644
--- a/src/components/transport_manager/src/cloud/websocket_client_connection.cc
+++ b/src/components/transport_manager/src/cloud/websocket_client_connection.cc
@@ -40,7 +40,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
WebsocketClientConnection::WebsocketClientConnection(
const DeviceUID& device_uid,
@@ -80,7 +80,7 @@ void WebsocketClientConnection::AddCertificateAuthority(
#endif // ENABLE_SECURITY
TransportAdapter::Error WebsocketClientConnection::Start() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DeviceSptr device = controller_->FindDevice(device_uid_);
CloudDevice* cloud_device = static_cast<CloudDevice*>(device.get());
CloudWebsocketTransportAdapter* cloud_ta =
@@ -90,23 +90,19 @@ TransportAdapter::Error WebsocketClientConnection::Start() {
auto const port = cloud_device->GetPort();
boost::system::error_code ec;
- LOG4CXX_DEBUG(logger_, "Cloud app endpoint: " << cloud_properties.endpoint);
- LOG4CXX_DEBUG(logger_,
- "Cloud app certificate: " << cloud_properties.certificate);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG("Cloud app endpoint: " << cloud_properties.endpoint);
+ SDL_LOG_DEBUG("Cloud app certificate: " << cloud_properties.certificate);
+ SDL_LOG_DEBUG(
"Cloud app authentication token: " << cloud_properties.auth_token);
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"Cloud app transport type: " << cloud_properties.cloud_transport_type);
- LOG4CXX_DEBUG(logger_,
- "Cloud app hybrid app preference: "
- << cloud_properties.hybrid_app_preference);
+ SDL_LOG_DEBUG("Cloud app hybrid app preference: "
+ << cloud_properties.hybrid_app_preference);
auto const results = resolver_.resolve(host, port, ec);
if (ec) {
std::string str_err = "ErrorMessage: " + ec.message();
- LOG4CXX_ERROR(logger_, "Could not resolve host/port: " << str_err);
+ SDL_LOG_ERROR("Could not resolve host/port: " << str_err);
return TransportAdapter::FAIL;
}
@@ -123,9 +119,8 @@ TransportAdapter::Error WebsocketClientConnection::Start() {
if (ec) {
std::string str_err = "ErrorMessage: " + ec.message();
- LOG4CXX_ERROR(logger_,
- "Could not connect to websocket: " << host << ":" << port);
- LOG4CXX_ERROR(logger_, str_err);
+ SDL_LOG_ERROR("Could not connect to websocket: " << host << ":" << port);
+ SDL_LOG_ERROR(str_err);
return TransportAdapter::FAIL;
}
@@ -135,10 +130,9 @@ TransportAdapter::Error WebsocketClientConnection::Start() {
if (ec) {
std::string str_err = "ErrorMessage: " + ec.message();
- LOG4CXX_ERROR(logger_,
- "Failed to add certificate authority: "
- << cloud_properties.certificate);
- LOG4CXX_ERROR(logger_, str_err);
+ SDL_LOG_ERROR("Failed to add certificate authority: "
+ << cloud_properties.certificate);
+ SDL_LOG_ERROR(str_err);
Shutdown();
return TransportAdapter::FAIL;
}
@@ -148,10 +142,9 @@ TransportAdapter::Error WebsocketClientConnection::Start() {
if (ec) {
std::string str_err = "ErrorMessage: " + ec.message();
- LOG4CXX_ERROR(logger_,
- "Could not complete SSL Handshake failed with host/port: "
- << host << ":" << port);
- LOG4CXX_ERROR(logger_, str_err);
+ SDL_LOG_ERROR("Could not complete SSL Handshake failed with host/port: "
+ << host << ":" << port);
+ SDL_LOG_ERROR(str_err);
Shutdown();
return TransportAdapter::FAIL;
}
@@ -169,10 +162,9 @@ TransportAdapter::Error WebsocketClientConnection::Start() {
#endif // ENABLE_SECURITY
if (ec) {
std::string str_err = "ErrorMessage: " + ec.message();
- LOG4CXX_ERROR(
- logger_,
- "Could not complete handshake with host/port: " << host << ":" << port);
- LOG4CXX_ERROR(logger_, str_err);
+ SDL_LOG_ERROR("Could not complete handshake with host/port: " << host << ":"
+ << port);
+ SDL_LOG_ERROR(str_err);
return TransportAdapter::FAIL;
}
@@ -185,7 +177,7 @@ TransportAdapter::Error WebsocketClientConnection::Start() {
wss_.binary(true);
}
#endif // ENABLE_SECURITY
- write_thread_->start(threads::ThreadOptions());
+ write_thread_->Start(threads::ThreadOptions());
controller_->ConnectDone(device_uid_, app_handle_);
// Start async read
@@ -208,9 +200,8 @@ TransportAdapter::Error WebsocketClientConnection::Start() {
boost::asio::post(io_pool_, [&]() { ioc_.run(); });
- LOG4CXX_DEBUG(
- logger_,
- "Successfully started websocket connection @: " << host << ":" << port);
+ SDL_LOG_DEBUG("Successfully started websocket connection @: " << host << ":"
+ << port);
return TransportAdapter::OK;
}
@@ -221,7 +212,7 @@ void WebsocketClientConnection::Recv(boost::system::error_code ec) {
if (ec) {
std::string str_err = "ErrorMessage: " + ec.message();
- LOG4CXX_ERROR(logger_, str_err);
+ SDL_LOG_ERROR(str_err);
Shutdown();
return;
}
@@ -248,13 +239,12 @@ void WebsocketClientConnection::OnRead(boost::system::error_code ec,
boost::ignore_unused(bytes_transferred);
if (ec) {
std::string str_err = "ErrorMessage: " + ec.message();
- LOG4CXX_ERROR(logger_, str_err);
+ SDL_LOG_ERROR(str_err);
ws_.lowest_layer().close();
ioc_.stop();
Shutdown();
return;
}
- std::string data_str = boost::beast::buffers_to_string(buffer_.data());
ssize_t size = (ssize_t)buffer_.size();
const uint8_t* data = boost::asio::buffer_cast<const uint8_t*>(
@@ -271,24 +261,25 @@ void WebsocketClientConnection::OnRead(boost::system::error_code ec,
TransportAdapter::Error WebsocketClientConnection::SendData(
::protocol_handler::RawMessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(frames_to_send_mutex_);
message_queue_.push(message);
return TransportAdapter::OK;
}
TransportAdapter::Error WebsocketClientConnection::Disconnect() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
Shutdown();
return TransportAdapter::OK;
}
void WebsocketClientConnection::Shutdown() {
+ SDL_LOG_AUTO_TRACE();
shutdown_ = true;
if (thread_delegate_) {
thread_delegate_->SetShutdown();
- write_thread_->join();
+ write_thread_->Stop(threads::Thread::kThreadSoftStop);
delete thread_delegate_;
thread_delegate_ = NULL;
threads::DeleteThread(write_thread_);
@@ -337,7 +328,7 @@ void WebsocketClientConnection::LoopThreadDelegate::DrainQueue() {
}
#endif // ENABLE_SECURITY
if (ec) {
- LOG4CXX_ERROR(logger_, "Error writing to websocket");
+ SDL_LOG_ERROR("Error writing to websocket");
handler_.controller_->DataSendFailed(handler_.device_uid_,
handler_.app_handle_,
message_ptr,
diff --git a/src/components/transport_manager/src/iap2_emulation/iap2_transport_adapter.cc b/src/components/transport_manager/src/iap2_emulation/iap2_transport_adapter.cc
index 6a43f66c64..9fe79cade1 100644
--- a/src/components/transport_manager/src/iap2_emulation/iap2_transport_adapter.cc
+++ b/src/components/transport_manager/src/iap2_emulation/iap2_transport_adapter.cc
@@ -50,7 +50,7 @@ static const auto out_signals_channel = "iap_signals_out";
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "IAP2Emulation");
+SDL_CREATE_LOG_VARIABLE("IAP2Emulation");
IAP2BluetoothEmulationTransportAdapter::IAP2BluetoothEmulationTransportAdapter(
const uint16_t port,
@@ -60,7 +60,7 @@ IAP2BluetoothEmulationTransportAdapter::IAP2BluetoothEmulationTransportAdapter(
void IAP2BluetoothEmulationTransportAdapter::DeviceSwitched(
const DeviceUID& device_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
UNUSED(device_handle);
DCHECK(!"Switching for iAP2 Bluetooth is not supported.");
}
@@ -81,43 +81,43 @@ IAP2USBEmulationTransportAdapter::IAP2USBEmulationTransportAdapter(
: TcpTransportAdapter(port, last_state_wrapper, settings), out_(0) {
auto delegate = new IAPSignalHandlerDelegate(*this);
signal_handler_ = threads::CreateThread("iAP signal handler", delegate);
- signal_handler_->start();
+ signal_handler_->Start();
const auto result = mkfifo(out_signals_channel, mode);
UNUSED(result);
- LOG4CXX_DEBUG(logger_, "Out signals channel creation result: " << result);
+ SDL_LOG_DEBUG("Out signals channel creation result: " << result);
}
IAP2USBEmulationTransportAdapter::~IAP2USBEmulationTransportAdapter() {
- signal_handler_->join();
- auto delegate = signal_handler_->delegate();
- signal_handler_->set_delegate(NULL);
+ signal_handler_->Stop(threads::Thread::kThreadSoftStop);
+ auto delegate = signal_handler_->GetDelegate();
+ signal_handler_->SetDelegate(NULL);
delete delegate;
threads::DeleteThread(signal_handler_);
- LOG4CXX_DEBUG(logger_, "Out close result: " << close(out_));
- LOG4CXX_DEBUG(logger_, "Out unlink result: " << unlink(out_signals_channel));
+ SDL_LOG_DEBUG("Out close result: " << close(out_));
+ SDL_LOG_DEBUG("Out unlink result: " << unlink(out_signals_channel));
}
void IAP2USBEmulationTransportAdapter::DeviceSwitched(
const DeviceUID& device_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
UNUSED(device_handle);
const auto switch_signal_ack = std::string("SDL_TRANSPORT_SWITCH_ACK\n");
auto out_ = open(out_signals_channel, O_WRONLY);
- LOG4CXX_DEBUG(logger_, "Out channel descriptor: " << out_);
+ SDL_LOG_DEBUG("Out channel descriptor: " << out_);
if (out_ < 0) {
- LOG4CXX_ERROR(logger_, "Failed to open out signals channel");
+ SDL_LOG_ERROR("Failed to open out signals channel");
return;
}
const auto bytes =
write(out_, switch_signal_ack.c_str(), switch_signal_ack.size());
UNUSED(bytes);
- LOG4CXX_DEBUG(logger_, "Written bytes to out: " << bytes);
+ SDL_LOG_DEBUG("Written bytes to out: " << bytes);
- LOG4CXX_DEBUG(logger_, "Switching signal ACK is sent");
- LOG4CXX_DEBUG(logger_, "iAP2 USB device is switched with iAP2 Bluetooth");
+ SDL_LOG_DEBUG("Switching signal ACK is sent");
+ SDL_LOG_DEBUG("iAP2 USB device is switched with iAP2 Bluetooth");
close(out_);
}
@@ -135,19 +135,19 @@ IAP2USBEmulationTransportAdapter::IAPSignalHandlerDelegate::
: adapter_(adapter), run_flag_(true), in_(0) {
const auto result = mkfifo(in_signals_channel, mode);
UNUSED(result);
- LOG4CXX_DEBUG(logger_, "In signals channel creation result: " << result);
+ SDL_LOG_DEBUG("In signals channel creation result: " << result);
}
void IAP2USBEmulationTransportAdapter::IAPSignalHandlerDelegate::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Signal handling is started");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Signal handling is started");
const auto switch_signal = "SDL_TRANSPORT_SWITCH";
- LOG4CXX_DEBUG(logger_, "Waiting for signal: " << switch_signal);
+ SDL_LOG_DEBUG("Waiting for signal: " << switch_signal);
in_ = open(in_signals_channel, O_RDONLY);
- LOG4CXX_DEBUG(logger_, "In channel descriptor: " << in_);
+ SDL_LOG_DEBUG("In channel descriptor: " << in_);
if (in_ < 0) {
- LOG4CXX_ERROR(logger_, "Failed to open in signals channel");
+ SDL_LOG_ERROR("Failed to open in signals channel");
return;
}
@@ -159,26 +159,26 @@ void IAP2USBEmulationTransportAdapter::IAPSignalHandlerDelegate::threadMain() {
continue;
}
if (-1 == bytes) {
- LOG4CXX_DEBUG(logger_, "Error during input pipe read");
+ SDL_LOG_DEBUG("Error during input pipe read");
break;
}
- LOG4CXX_DEBUG(logger_, "Read in bytes: " << bytes);
+ SDL_LOG_DEBUG("Read in bytes: " << bytes);
buffer[bytes] = '\0';
std::string str(buffer);
if (std::string::npos != str.find(switch_signal)) {
- LOG4CXX_DEBUG(logger_, "Switch signal received.");
+ SDL_LOG_DEBUG("Switch signal received.");
adapter_.DoTransportSwitch();
}
}
- LOG4CXX_DEBUG(logger_, "In close result: " << close(in_));
- LOG4CXX_DEBUG(logger_, "In unlink result: " << unlink(in_signals_channel));
+ SDL_LOG_DEBUG("In close result: " << close(in_));
+ SDL_LOG_DEBUG("In unlink result: " << unlink(in_signals_channel));
}
void IAP2USBEmulationTransportAdapter::IAPSignalHandlerDelegate::
exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Stopping signal handling.");
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Stopping signal handling.");
run_flag_ = false;
ThreadDelegate::exitThreadMain();
}
diff --git a/src/components/transport_manager/src/tcp/network_interface_listener_impl.cc b/src/components/transport_manager/src/tcp/network_interface_listener_impl.cc
index 85c479134d..3c2df28aca 100644
--- a/src/components/transport_manager/src/tcp/network_interface_listener_impl.cc
+++ b/src/components/transport_manager/src/tcp/network_interface_listener_impl.cc
@@ -4,37 +4,37 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
NetworkInterfaceListenerImpl::NetworkInterfaceListenerImpl(
TcpClientListener* tcp_client_listener,
const std::string designated_interface)
: platform_specific_impl_(new PlatformSpecificNetworkInterfaceListener(
tcp_client_listener, designated_interface)) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
NetworkInterfaceListenerImpl::~NetworkInterfaceListenerImpl() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
bool NetworkInterfaceListenerImpl::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return platform_specific_impl_->Init();
}
void NetworkInterfaceListenerImpl::Deinit() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
platform_specific_impl_->Deinit();
}
bool NetworkInterfaceListenerImpl::Start() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return platform_specific_impl_->Start();
}
bool NetworkInterfaceListenerImpl::Stop() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return platform_specific_impl_->Stop();
}
diff --git a/src/components/transport_manager/src/tcp/platform_specific/linux/platform_specific_network_interface_listener.cc b/src/components/transport_manager/src/tcp/platform_specific/linux/platform_specific_network_interface_listener.cc
index 2e79e84f2e..96ea5df917 100644
--- a/src/components/transport_manager/src/tcp/platform_specific/linux/platform_specific_network_interface_listener.cc
+++ b/src/components/transport_manager/src/tcp/platform_specific/linux/platform_specific_network_interface_listener.cc
@@ -21,9 +21,8 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
-static std::string GetInterfaceName(unsigned int if_index);
static bool SetNonblocking(int s);
bool InterfaceStatus::IsAvailable() const {
@@ -39,7 +38,7 @@ bool InterfaceStatus::HasIPAddress() const {
return has_ipv4_ || has_ipv6_;
}
-std::string InterfaceStatus::GetIPv4Address() const {
+const std::string InterfaceStatus::GetIPv4Address() const {
char buf[INET_ADDRSTRLEN] = "";
if (has_ipv4_ && IsAvailable()) {
inet_ntop(AF_INET, &ipv4_address_, buf, sizeof(buf));
@@ -47,7 +46,7 @@ std::string InterfaceStatus::GetIPv4Address() const {
return std::string(buf);
}
-std::string InterfaceStatus::GetIPv6Address() const {
+const std::string InterfaceStatus::GetIPv6Address() const {
char buf[INET6_ADDRSTRLEN] = "";
if (has_ipv6_ && IsAvailable()) {
inet_ntop(AF_INET6, &ipv6_address_, buf, sizeof(buf));
@@ -55,7 +54,7 @@ std::string InterfaceStatus::GetIPv6Address() const {
return std::string(buf);
}
-void InterfaceStatus::SetIPv4Address(struct in_addr* addr) {
+void InterfaceStatus::SetIPv4Address(const struct in_addr* addr) {
if (addr == NULL) {
has_ipv4_ = false;
} else {
@@ -64,7 +63,7 @@ void InterfaceStatus::SetIPv4Address(struct in_addr* addr) {
}
}
-void InterfaceStatus::SetIPv6Address(struct in6_addr* addr) {
+void InterfaceStatus::SetIPv6Address(const struct in6_addr* addr) {
if (addr == NULL) {
has_ipv6_ = false;
} else {
@@ -94,31 +93,31 @@ PlatformSpecificNetworkInterfaceListener::
PlatformSpecificNetworkInterfaceListener::
~PlatformSpecificNetworkInterfaceListener() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
Stop();
Deinit();
- delete thread_->delegate();
+ delete thread_->GetDelegate();
threads::DeleteThread(thread_);
}
bool PlatformSpecificNetworkInterfaceListener::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Init socket: " << socket_);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Init socket: " << socket_);
if (socket_ >= 0) {
- LOG4CXX_WARN(logger_, "Network interface listener is already initialized");
+ SDL_LOG_WARN("Network interface listener is already initialized");
return false;
}
socket_ = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
if (socket_ == -1) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to create netlink socket");
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to create netlink socket");
return false;
}
if (!SetNonblocking(socket_)) {
- LOG4CXX_WARN(logger_, "Failed to configure netlink socket to non-blocking");
+ SDL_LOG_WARN("Failed to configure netlink socket to non-blocking");
}
struct sockaddr_nl addr;
@@ -129,29 +128,29 @@ bool PlatformSpecificNetworkInterfaceListener::Init() {
addr.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR | RTMGRP_IPV6_IFADDR;
if (bind(socket_, reinterpret_cast<sockaddr*>(&addr), sizeof(addr)) != 0) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to bind netlink socket");
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to bind netlink socket");
close(socket_);
socket_ = -1;
return false;
}
if (pipe(pipe_fds_) != 0) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to create internal pipe");
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to create internal pipe");
close(socket_);
socket_ = -1;
return false;
}
if (!SetNonblocking(pipe_fds_[0])) {
- LOG4CXX_WARN(logger_, "Failed to configure pipe to non-blocking");
+ SDL_LOG_WARN("Failed to configure pipe to non-blocking");
}
return true;
}
void PlatformSpecificNetworkInterfaceListener::Deinit() {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Deinit socket: " << socket_);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Deinit socket: " << socket_);
if (socket_ >= 0) {
close(socket_);
socket_ = -1;
@@ -167,43 +166,43 @@ void PlatformSpecificNetworkInterfaceListener::Deinit() {
}
bool PlatformSpecificNetworkInterfaceListener::Start() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (socket_ < 0) {
- LOG4CXX_WARN(logger_, "Interface listener is not initialized");
+ SDL_LOG_WARN("Interface listener is not initialized");
return false;
}
- if (thread_->is_running()) {
- LOG4CXX_WARN(logger_, "Interface listener is already started");
+ if (thread_->IsRunning()) {
+ SDL_LOG_WARN("Interface listener is already started");
return false;
}
- if (!thread_->start()) {
- LOG4CXX_ERROR(logger_, "Failed to start interface listener");
+ if (!thread_->Start()) {
+ SDL_LOG_ERROR("Failed to start interface listener");
return false;
}
- LOG4CXX_INFO(logger_, "Network interface listener started");
+ SDL_LOG_INFO("Network interface listener started");
return true;
}
bool PlatformSpecificNetworkInterfaceListener::Stop() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- if (!thread_->is_running()) {
- LOG4CXX_DEBUG(logger_, "interface listener is not running");
+ if (!thread_->IsRunning()) {
+ SDL_LOG_DEBUG("interface listener is not running");
return false;
}
- thread_->join();
+ thread_->Stop(threads::Thread::kThreadStopDelegate);
- LOG4CXX_INFO(logger_, "Network interface listener stopped");
+ SDL_LOG_INFO("Network interface listener stopped");
return true;
}
void PlatformSpecificNetworkInterfaceListener::Loop() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Initialize status_table_ by acquiring a list of interfaces and their
// current statuses. Also we will notify an event to the listener if IP
@@ -228,8 +227,7 @@ void PlatformSpecificNetworkInterfaceListener::Loop() {
if (errno == EINTR) {
continue;
} else {
- LOG4CXX_WARN(logger_,
- "select failed for netlink. Aborting interface listener.");
+ SDL_LOG_WARN("select failed for netlink. Aborting interface listener.");
break;
}
}
@@ -240,17 +238,15 @@ void PlatformSpecificNetworkInterfaceListener::Loop() {
ret = read(pipe_fds_[0], buf, sizeof(buf));
if (ret < 0) {
if (errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Failed to read from pipe. Aborting interface listener.");
break;
}
} else if (ret == 0) {
- LOG4CXX_WARN(logger_,
- "Pipe disconnected. Aborting interface listener.");
+ SDL_LOG_WARN("Pipe disconnected. Aborting interface listener.");
break;
} else {
- LOG4CXX_DEBUG(logger_, "received terminating event through pipe");
+ SDL_LOG_DEBUG("received terminating event through pipe");
break;
}
}
@@ -266,14 +262,13 @@ void PlatformSpecificNetworkInterfaceListener::Loop() {
ret = recv(socket_, buf, sizeof(buf), 0);
if (ret < 0) {
if (errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK) {
- LOG4CXX_WARN(logger_,
- "Failed to read from netlink socket. Aborting interface "
- "listener.");
+ SDL_LOG_WARN(
+ "Failed to read from netlink socket. Aborting interface "
+ "listener.");
break;
}
} else if (ret == 0) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Netlink socket disconnected. Aborting interface listener.");
break;
} else {
@@ -284,7 +279,7 @@ void PlatformSpecificNetworkInterfaceListener::Loop() {
// time so we use for-loop to go through.
for (; NLMSG_OK(header, len); header = NLMSG_NEXT(header, len)) {
if (header->nlmsg_type == NLMSG_ERROR) {
- LOG4CXX_WARN(logger_, "received error event from netlink");
+ SDL_LOG_WARN("received error event from netlink");
break;
}
@@ -326,20 +321,20 @@ void PlatformSpecificNetworkInterfaceListener::Loop() {
}
bool PlatformSpecificNetworkInterfaceListener::StopLoop() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
- LOG4CXX_INFO(logger_, "Stopping network interface listener");
+ SDL_LOG_INFO("Stopping network interface listener");
if (pipe_fds_[1] < 0) {
- LOG4CXX_WARN(logger_, "StopLoop called in invalid state");
+ SDL_LOG_WARN("StopLoop called in invalid state");
return false;
}
char dummy[1] = {0};
int ret = write(pipe_fds_[1], dummy, sizeof(dummy));
if (ret <= 0) {
- LOG4CXX_WARN_WITH_ERRNO(
- logger_, "Failed to send stop message to interface listener");
+ SDL_LOG_WARN_WITH_ERRNO(
+ "Failed to send stop message to interface listener");
return false;
}
@@ -347,7 +342,7 @@ bool PlatformSpecificNetworkInterfaceListener::StopLoop() {
}
bool PlatformSpecificNetworkInterfaceListener::InitializeStatus() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
#ifdef BUILD_TESTS
if (testing_) {
@@ -358,9 +353,9 @@ bool PlatformSpecificNetworkInterfaceListener::InitializeStatus() {
struct ifaddrs *if_list, *interface;
if (getifaddrs(&if_list) != 0) {
- LOG4CXX_WARN(logger_,
- "getifaddr failed, interface status won't be available until "
- "a change occurs");
+ SDL_LOG_WARN(
+ "getifaddr failed, interface status won't be available until "
+ "a change occurs");
return false;
}
@@ -376,8 +371,13 @@ bool PlatformSpecificNetworkInterfaceListener::InitializeStatus() {
continue;
}
- std::string ifname(interface->ifa_name);
- InterfaceStatus& status = status_table_[ifname];
+ unsigned int index = if_nametoindex(interface->ifa_name);
+ if (index == 0) {
+ // network interface isn't found
+ continue;
+ }
+
+ InterfaceStatus& status = status_table_[index];
switch (interface->ifa_addr->sa_family) {
case AF_INET: {
@@ -395,79 +395,71 @@ bool PlatformSpecificNetworkInterfaceListener::InitializeStatus() {
default:
continue;
}
+ status.SetName(std::string(interface->ifa_name));
status.SetFlags(interface->ifa_flags);
}
freeifaddrs(if_list);
- LOG4CXX_DEBUG(logger_, "Successfully acquired network interface status");
+ SDL_LOG_DEBUG("Successfully acquired network interface status");
DumpTable();
return true;
}
bool PlatformSpecificNetworkInterfaceListener::UpdateStatus(
uint16_t type, std::vector<EventParam>& params) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
for (std::vector<EventParam>::iterator it = params.begin();
it != params.end();
++it) {
- std::string ifname = GetInterfaceName(it->if_index);
- if (ifname.empty()) {
- continue;
- }
-
- InterfaceStatus& status = status_table_[ifname];
-
+ InterfaceStatus& status = status_table_[it->if_index];
switch (type) {
case RTM_NEWLINK: {
- LOG4CXX_DEBUG(
- logger_,
- "netlink event: interface " << ifname << " created or updated");
+ const std::string& ifname = GetInterfaceName(it->if_index);
+ SDL_LOG_DEBUG("netlink event: interface " << ifname
+ << " created or updated");
+ status.SetName(ifname);
status.SetFlags(it->flags);
break;
}
case RTM_DELLINK:
- LOG4CXX_DEBUG(logger_,
- "netlink event: interface " << ifname << " removed");
- status_table_.erase(ifname);
+ SDL_LOG_DEBUG("netlink event: interface " << status.GetName()
+ << " removed");
+ status_table_.erase(it->if_index);
break;
case RTM_NEWADDR: {
sockaddr* addr = reinterpret_cast<sockaddr*>(&it->address);
if (addr->sa_family == AF_INET) {
sockaddr_in* addr_in = reinterpret_cast<sockaddr_in*>(addr);
status.SetIPv4Address(&addr_in->sin_addr);
- LOG4CXX_DEBUG(logger_,
- "netlink event: IPv4 address of interface "
- << ifname << " updated to "
- << status.GetIPv4Address());
+ SDL_LOG_DEBUG("netlink event: IPv4 address of interface "
+ << status.GetName() << " updated to "
+ << status.GetIPv4Address());
} else if (addr->sa_family == AF_INET6) {
sockaddr_in6* addr_in6 = reinterpret_cast<sockaddr_in6*>(addr);
status.SetIPv6Address(&addr_in6->sin6_addr);
- LOG4CXX_DEBUG(logger_,
- "netlink event: IPv6 address of interface "
- << ifname << " updated to "
- << status.GetIPv6Address());
+ SDL_LOG_DEBUG("netlink event: IPv6 address of interface "
+ << status.GetName() << " updated to "
+ << status.GetIPv6Address());
}
break;
}
case RTM_DELADDR: {
sockaddr* addr = reinterpret_cast<sockaddr*>(&it->address);
if (addr->sa_family == AF_INET) {
- LOG4CXX_DEBUG(logger_,
- "netlink event: IPv4 address of interface "
- << ifname << " removed");
+ SDL_LOG_DEBUG("netlink event: IPv4 address of interface "
+ << status.GetName() << " removed");
status.SetIPv4Address(NULL);
} else if (addr->sa_family == AF_INET6) {
- LOG4CXX_DEBUG(logger_,
- "netlink event: IPv6 address of interface "
- << ifname << " removed");
+ SDL_LOG_DEBUG("netlink event: IPv6 address of interface "
+ << status.GetName() << " removed");
status.SetIPv6Address(NULL);
}
break;
}
default:
- LOG4CXX_WARN(logger_, "Unsupported netlink event (" << type << ")");
+ SDL_LOG_WARN("Unsupported netlink event (" << type << ")");
break;
}
}
@@ -475,7 +467,7 @@ bool PlatformSpecificNetworkInterfaceListener::UpdateStatus(
}
void PlatformSpecificNetworkInterfaceListener::NotifyIPAddresses() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::string ipv4_addr;
std::string ipv6_addr;
@@ -484,20 +476,21 @@ void PlatformSpecificNetworkInterfaceListener::NotifyIPAddresses() {
// note that if interface_name is empty (i.e. no interface is selected),
// the IP addresses will be empty
if (!interface_name.empty()) {
- InterfaceStatusTable::iterator it = status_table_.find(interface_name);
+ InterfaceStatusTable::const_iterator it =
+ std::find_if(status_table_.begin(),
+ status_table_.end(),
+ NamePredicate(interface_name));
if (status_table_.end() != it) {
- InterfaceStatus& status = it->second;
+ const InterfaceStatus& status = it->second;
ipv4_addr = status.GetIPv4Address();
ipv6_addr = status.GetIPv6Address();
}
}
if (notified_ipv4_addr_ != ipv4_addr || notified_ipv6_addr_ != ipv6_addr) {
- LOG4CXX_INFO(logger_,
- "IP address updated: \"" << notified_ipv4_addr_ << "\" -> \""
- << ipv4_addr << "\", \""
- << notified_ipv6_addr_ << "\" -> \""
- << ipv6_addr << "\"");
+ SDL_LOG_INFO("IP address updated: \""
+ << notified_ipv4_addr_ << "\" -> \"" << ipv4_addr << "\", \""
+ << notified_ipv6_addr_ << "\" -> \"" << ipv6_addr << "\"");
notified_ipv4_addr_ = ipv4_addr;
notified_ipv6_addr_ = ipv6_addr;
@@ -508,20 +501,22 @@ void PlatformSpecificNetworkInterfaceListener::NotifyIPAddresses() {
}
const std::string PlatformSpecificNetworkInterfaceListener::SelectInterface() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!designated_interface_.empty()) {
return designated_interface_;
}
- InterfaceStatusTable::iterator it;
+ InterfaceStatusTable::const_iterator it;
if (!selected_interface_.empty()) {
// if current network interface is still available and has IP address, then
// we use it
- it = status_table_.find(selected_interface_);
+ it = std::find_if(status_table_.begin(),
+ status_table_.end(),
+ NamePredicate(selected_interface_));
if (it != status_table_.end()) {
- InterfaceStatus& status = it->second;
+ const InterfaceStatus& status = it->second;
if (status.IsAvailable() && status.HasIPAddress()) {
return selected_interface_;
}
@@ -530,19 +525,18 @@ const std::string PlatformSpecificNetworkInterfaceListener::SelectInterface() {
// pick a network interface that has IP address
for (it = status_table_.begin(); it != status_table_.end(); ++it) {
- InterfaceStatus& status = it->second;
+ const InterfaceStatus& status = it->second;
// ignore loopback interfaces
if (status.IsLoopback()) {
continue;
}
- // if the interface has to be UP and RUNNING, and must have an IP address
+ // the interface has to be UP and RUNNING, and must have an IP address
if (!(status.IsAvailable() && status.HasIPAddress())) {
continue;
}
- selected_interface_ = it->first;
- LOG4CXX_DEBUG(logger_,
- "selecting network interface: " << selected_interface_);
+ selected_interface_ = status.GetName();
+ SDL_LOG_DEBUG("selecting network interface: " << selected_interface_);
return selected_interface_;
}
@@ -553,7 +547,7 @@ const std::string PlatformSpecificNetworkInterfaceListener::SelectInterface() {
std::vector<PlatformSpecificNetworkInterfaceListener::EventParam>
PlatformSpecificNetworkInterfaceListener::ParseIFAddrMessage(
struct ifaddrmsg* message, unsigned int size) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::vector<EventParam> params;
@@ -570,8 +564,7 @@ PlatformSpecificNetworkInterfaceListener::ParseIFAddrMessage(
if (message->ifa_family == AF_INET) {
// make sure the size of data is >= 4 bytes
if (RTA_PAYLOAD(attr) < sizeof(struct in_addr)) {
- LOG4CXX_DEBUG(logger_,
- "Invalid netlink event: insufficient IPv4 address data");
+ SDL_LOG_DEBUG("Invalid netlink event: insufficient IPv4 address data");
continue;
}
@@ -587,8 +580,7 @@ PlatformSpecificNetworkInterfaceListener::ParseIFAddrMessage(
} else if (message->ifa_family == AF_INET6) {
// make sure the size of data is >= 16 bytes
if (RTA_PAYLOAD(attr) < sizeof(struct in6_addr)) {
- LOG4CXX_DEBUG(logger_,
- "Invalid netlink event: insufficient IPv6 address data");
+ SDL_LOG_DEBUG("Invalid netlink event: insufficient IPv6 address data");
continue;
}
@@ -602,8 +594,7 @@ PlatformSpecificNetworkInterfaceListener::ParseIFAddrMessage(
sockaddr->sin6_addr = *ipv6_addr;
} else {
- LOG4CXX_WARN(logger_,
- "Unsupported family (" << message->ifa_family << ")");
+ SDL_LOG_WARN("Unsupported family (" << message->ifa_family << ")");
continue;
}
@@ -614,21 +605,40 @@ PlatformSpecificNetworkInterfaceListener::ParseIFAddrMessage(
}
void PlatformSpecificNetworkInterfaceListener::DumpTable() const {
- LOG4CXX_DEBUG(logger_,
- "Number of network interfaces: " << status_table_.size());
+ SDL_LOG_DEBUG("Number of network interfaces: " << status_table_.size());
for (auto it = status_table_.begin(); it != status_table_.end(); ++it) {
- const std::string ifname = it->first;
const InterfaceStatus& status = it->second;
UNUSED(status);
- LOG4CXX_DEBUG(
- logger_,
- " " << ifname << " : flags=" << status.GetFlags()
- << " : available: " << (status.IsAvailable() ? "yes" : "no")
- << " IPv4: " << status.GetIPv4Address()
- << " IPv6: " << status.GetIPv6Address()
- << (status.IsLoopback() ? " (loopback)" : ""));
+ SDL_LOG_DEBUG(" " << status.GetName() << " : flags=" << status.GetFlags()
+ << " : available: "
+ << (status.IsAvailable() ? "yes" : "no")
+ << " IPv4: " << status.GetIPv4Address()
+ << " IPv6: " << status.GetIPv6Address()
+ << (status.IsLoopback() ? " (loopback)" : ""));
+ }
+}
+
+const std::string PlatformSpecificNetworkInterfaceListener::GetInterfaceName(
+ unsigned int if_index) const {
+#ifdef BUILD_TESTS
+ if (testing_) {
+ std::map<unsigned int, std::string>::const_iterator it =
+ dummy_name_map_.find(if_index);
+ if (it == dummy_name_map_.end()) {
+ return std::string();
+ }
+ return it->second;
+ }
+#endif // BUILD_TESTS
+
+ char buf[IFNAMSIZ + 1] = "";
+ char* ret = if_indextoname(if_index, buf);
+ if (ret != NULL) {
+ return std::string(buf);
+ } else {
+ return std::string();
}
}
@@ -646,23 +656,16 @@ void PlatformSpecificNetworkInterfaceListener::ListenerThreadDelegate::
parent_->StopLoop();
}
-static std::string GetInterfaceName(unsigned int if_index) {
- char buf[IFNAMSIZ + 1] = "";
- if_indextoname(if_index, buf);
- return std::string(buf);
-}
-
static bool SetNonblocking(int s) {
int prev_flag = fcntl(s, F_GETFL, 0);
if (prev_flag == -1) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to acquire socket flag");
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to acquire socket flag");
return false;
}
int ret = fcntl(s, F_SETFL, prev_flag | O_NONBLOCK);
if (ret == -1) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_,
- "Failed to configure socket to non-blocking");
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to configure socket to non-blocking");
return false;
}
diff --git a/src/components/transport_manager/src/tcp/platform_specific/qnx/platform_specific_network_interface_listener.cc b/src/components/transport_manager/src/tcp/platform_specific/qnx/platform_specific_network_interface_listener.cc
index 15b3814999..27046dab0b 100644
--- a/src/components/transport_manager/src/tcp/platform_specific/qnx/platform_specific_network_interface_listener.cc
+++ b/src/components/transport_manager/src/tcp/platform_specific/qnx/platform_specific_network_interface_listener.cc
@@ -3,7 +3,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
PlatformSpecificNetworkInterfaceListener::
PlatformSpecificNetworkInterfaceListener(
@@ -12,25 +12,25 @@ PlatformSpecificNetworkInterfaceListener::
PlatformSpecificNetworkInterfaceListener::
~PlatformSpecificNetworkInterfaceListener() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
bool PlatformSpecificNetworkInterfaceListener::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return true;
}
void PlatformSpecificNetworkInterfaceListener::Deinit() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
bool PlatformSpecificNetworkInterfaceListener::Start() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return true;
}
bool PlatformSpecificNetworkInterfaceListener::Stop() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return true;
}
diff --git a/src/components/transport_manager/src/tcp/tcp_client_listener.cc b/src/components/transport_manager/src/tcp/tcp_client_listener.cc
index c2cbac4e13..6aaec5d659 100644
--- a/src/components/transport_manager/src/tcp/tcp_client_listener.cc
+++ b/src/components/transport_manager/src/tcp/tcp_client_listener.cc
@@ -66,7 +66,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
static bool SetNonblocking(int s);
@@ -86,6 +86,7 @@ TcpClientListener::TcpClientListener(TransportAdapterController* controller,
, thread_(0)
, socket_(-1)
, thread_stop_requested_(false)
+ , remove_devices_on_terminate_(false)
, designated_interface_(designated_interface) {
pipe_fds_[0] = pipe_fds_[1] = -1;
thread_ = threads::CreateThread("TcpClientListener",
@@ -95,25 +96,23 @@ TcpClientListener::TcpClientListener(TransportAdapterController* controller,
}
TransportAdapter::Error TcpClientListener::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
- thread_stop_requested_ = false;
+ SDL_LOG_AUTO_TRACE();
+ thread_stop_requested_.store(false);
if (!IsListeningOnSpecificInterface()) {
// Network interface is not specified. We will listen on all interfaces
// using INADDR_ANY. If socket creation fails, we will treat it an error.
socket_ = CreateIPv4ServerSocket(port_);
if (-1 == socket_) {
- LOG4CXX_ERROR(logger_, "Failed to create TCP socket");
+ SDL_LOG_ERROR("Failed to create TCP socket");
return TransportAdapter::FAIL;
}
} else {
- // Network interface is specified and we wiill listen only on the interface.
+ // Network interface is specified and we will listen only on the interface.
// In this case, the server socket will be created once
// NetworkInterfaceListener notifies the interface's IP address.
- LOG4CXX_INFO(logger_,
- "TCP server socket will listen on "
- << designated_interface_
- << " once it has an IPv4 address.");
+ SDL_LOG_INFO("TCP server socket will listen on "
+ << designated_interface_ << " once it has an IPv4 address.");
}
if (!interface_listener_->Init()) {
@@ -129,7 +128,7 @@ TransportAdapter::Error TcpClientListener::Init() {
}
void TcpClientListener::Terminate() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!initialized_) {
return;
@@ -153,44 +152,48 @@ bool TcpClientListener::IsInitialised() const {
}
TcpClientListener::~TcpClientListener() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
StopListening();
- delete thread_->delegate();
+ delete thread_->GetDelegate();
threads::DeleteThread(thread_);
Terminate();
delete interface_listener_;
}
void SetKeepaliveOptions(const int fd) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "fd: " << fd);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("fd: " << fd);
+ // cppcheck-suppress unreadVariable
int yes = 1;
+ // cppcheck-suppress unreadVariable
int keepidle = 3; // 3 seconds to disconnection detecting
+ // cppcheck-suppress unreadVariable
int keepcnt = 5;
+ // cppcheck-suppress unreadVariable
int keepintvl = 1;
#ifdef __linux__
int user_timeout = 7000; // milliseconds
if (0 != setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &yes, sizeof(yes))) {
- LOG4CXX_WARN_WITH_ERRNO(logger_, "setsockopt SO_KEEPALIVE failed");
+ SDL_LOG_WARN_WITH_ERRNO("setsockopt SO_KEEPALIVE failed");
}
if (0 !=
setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &keepidle, sizeof(keepidle))) {
- LOG4CXX_WARN_WITH_ERRNO(logger_, "setsockopt TCP_KEEPIDLE failed");
+ SDL_LOG_WARN_WITH_ERRNO("setsockopt TCP_KEEPIDLE failed");
}
if (0 !=
setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &keepcnt, sizeof(keepcnt))) {
- LOG4CXX_WARN_WITH_ERRNO(logger_, "setsockopt TCP_KEEPCNT failed");
+ SDL_LOG_WARN_WITH_ERRNO("setsockopt TCP_KEEPCNT failed");
}
if (0 != setsockopt(
fd, IPPROTO_TCP, TCP_KEEPINTVL, &keepintvl, sizeof(keepintvl))) {
- LOG4CXX_WARN_WITH_ERRNO(logger_, "setsockopt TCP_KEEPINTVL failed");
+ SDL_LOG_WARN_WITH_ERRNO("setsockopt TCP_KEEPINTVL failed");
}
if (0 != setsockopt(fd,
IPPROTO_TCP,
TCP_USER_TIMEOUT,
&user_timeout,
sizeof(user_timeout))) {
- LOG4CXX_WARN_WITH_ERRNO(logger_, "setsockopt TCP_USER_TIMEOUT failed");
+ SDL_LOG_WARN_WITH_ERRNO("setsockopt TCP_USER_TIMEOUT failed");
}
#elif defined(__QNX__) // __linux__
// TODO(KKolodiy): Out of order!
@@ -223,9 +226,10 @@ void SetKeepaliveOptions(const int fd) {
}
void TcpClientListener::Loop() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
fd_set rfds;
char dummy[16];
+ std::vector<DeviceUID> device_uid_list;
while (!thread_stop_requested_) {
FD_ZERO(&rfds);
@@ -238,7 +242,7 @@ void TcpClientListener::Loop() {
if (errno == EINTR) {
continue;
} else {
- LOG4CXX_WARN(logger_, "select failed for TCP server socket");
+ SDL_LOG_WARN("select failed for TCP server socket");
break;
}
}
@@ -247,18 +251,15 @@ void TcpClientListener::Loop() {
ret = read(pipe_fds_[0], dummy, sizeof(dummy));
if (ret < 0) {
if (errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Failed to read from pipe, aborting TCP server socket loop.");
break;
}
} else if (ret == 0) {
- LOG4CXX_WARN(logger_,
- "Pipe disconnected, aborting TCP server socket loop.");
+ SDL_LOG_WARN("Pipe disconnected, aborting TCP server socket loop.");
break;
} else {
- LOG4CXX_DEBUG(logger_,
- "received stop command of TCP server socket loop");
+ SDL_LOG_DEBUG("received stop command of TCP server socket loop");
break;
}
}
@@ -269,18 +270,18 @@ void TcpClientListener::Loop() {
const int connection_fd = accept(
socket_, (struct sockaddr*)&client_address, &client_address_size);
if (thread_stop_requested_) {
- LOG4CXX_DEBUG(logger_, "thread_stop_requested_");
+ SDL_LOG_DEBUG("thread_stop_requested_");
close(connection_fd);
break;
}
if (connection_fd < 0) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "accept() failed");
+ SDL_LOG_ERROR_WITH_ERRNO("accept() failed");
continue;
}
if (AF_INET != client_address.sin_family) {
- LOG4CXX_DEBUG(logger_, "Address of connected client is invalid");
+ SDL_LOG_DEBUG("Address of connected client is invalid");
close(connection_fd);
continue;
}
@@ -290,8 +291,8 @@ void TcpClientListener::Loop() {
strncpy(device_name, inet_ntoa(client_address.sin_addr), size);
device_name[size - 1] = '\0';
- LOG4CXX_INFO(logger_, "Connected client " << device_name);
- LOG4CXX_INFO(logger_, "Port is: " << port_);
+ SDL_LOG_INFO("Connected client " << device_name);
+ SDL_LOG_INFO("Port is: " << port_);
if (enable_keepalive_) {
SetKeepaliveOptions(connection_fd);
@@ -321,37 +322,44 @@ void TcpClientListener::Loop() {
connection->set_socket(connection_fd);
const TransportAdapter::Error error = connection->Start();
if (TransportAdapter::OK != error) {
- LOG4CXX_ERROR(logger_,
- "TCP connection::Start() failed with error: " << error);
+ SDL_LOG_ERROR("TCP connection::Start() failed with error: " << error);
+ } else {
+ device_uid_list.push_back(device->unique_device_id());
}
}
}
- LOG4CXX_INFO(logger_, "TCP server socket loop is terminated.");
+ if (remove_devices_on_terminate_) {
+ for (std::vector<DeviceUID>::iterator it = device_uid_list.begin();
+ it != device_uid_list.end();
+ ++it) {
+ controller_->DeviceDisconnected(*it, DisconnectDeviceError());
+ }
+ }
+ SDL_LOG_INFO("TCP server socket loop is terminated.");
}
void TcpClientListener::StopLoop() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (pipe_fds_[1] < 0) {
- LOG4CXX_WARN(logger_, "StopLoop called in invalid state");
+ SDL_LOG_WARN("StopLoop called in invalid state");
return;
}
- thread_stop_requested_ = true;
+ thread_stop_requested_.store(true);
char dummy[1] = {0};
int ret = write(pipe_fds_[1], dummy, sizeof(dummy));
if (ret <= 0) {
- LOG4CXX_WARN_WITH_ERRNO(
- logger_, "Failed to send stop message to TCP server socket loop");
+ SDL_LOG_WARN_WITH_ERRNO(
+ "Failed to send stop message to TCP server socket loop");
}
}
TransportAdapter::Error TcpClientListener::StartListening() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (started_) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"TransportAdapter::BAD_STATE. Listener has already been started");
return TransportAdapter::BAD_STATE;
}
@@ -363,32 +371,32 @@ TransportAdapter::Error TcpClientListener::StartListening() {
if (!IsListeningOnSpecificInterface()) {
TransportAdapter::Error ret = StartListeningThread();
if (TransportAdapter::OK != ret) {
- LOG4CXX_ERROR(logger_, "Tcp client listener thread start failed");
+ SDL_LOG_ERROR("Tcp client listener thread start failed");
interface_listener_->Stop();
return ret;
}
}
started_ = true;
- LOG4CXX_INFO(logger_, "Tcp client listener has started successfully");
+ SDL_LOG_INFO("Tcp client listener has started successfully");
return TransportAdapter::OK;
}
TransportAdapter::Error TcpClientListener::ResumeListening() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
interface_listener_->Init();
StartListeningThread();
started_ = true;
- LOG4CXX_INFO(logger_, "Tcp client listener was resumed successfully");
+ SDL_LOG_INFO("Tcp client listener was resumed successfully");
return TransportAdapter::OK;
}
TransportAdapter::Error TcpClientListener::StopListening() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!started_) {
- LOG4CXX_DEBUG(logger_, "TcpClientListener is not running now");
+ SDL_LOG_DEBUG("TcpClientListener is not running now");
return TransportAdapter::BAD_STATE;
}
@@ -397,30 +405,30 @@ TransportAdapter::Error TcpClientListener::StopListening() {
StopListeningThread();
started_ = false;
- LOG4CXX_INFO(logger_, "Tcp client listener was stopped successfully");
+ SDL_LOG_INFO("Tcp client listener was stopped successfully");
return TransportAdapter::OK;
}
TransportAdapter::Error TcpClientListener::SuspendListening() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!started_) {
- LOG4CXX_DEBUG(logger_, "TcpClientListener is not running now");
+ SDL_LOG_DEBUG("TcpClientListener is not running now");
return TransportAdapter::BAD_STATE;
}
if (shutdown(socket_, SHUT_RDWR) != 0) {
- LOG4CXX_WARN(logger_, "Socket was unable to be shutdowned");
+ SDL_LOG_WARN("Socket was unable to be shutdowned");
}
if (close(socket_) != 0) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to close socket");
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to close socket");
}
interface_listener_->Deinit();
StopListeningThread();
started_ = false;
- LOG4CXX_INFO(logger_, "Tcp client listener was suspended");
+ SDL_LOG_INFO("Tcp client listener was suspended");
return TransportAdapter::OK;
}
@@ -437,39 +445,38 @@ TcpClientListener::ListeningThreadDelegate::ListeningThreadDelegate(
: parent_(parent) {}
TransportAdapter::Error TcpClientListener::StartListeningThread() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// StartListening() can be called from multiple threads
sync_primitives::AutoLock auto_lock(start_stop_lock_);
if (pipe_fds_[0] < 0 || pipe_fds_[1] < 0) {
// recreate the pipe every time, so that the thread loop will not get
- // leftover
- // data inside pipe after it is started
+ // leftover data inside pipe after it is started
if (pipe(pipe_fds_) != 0) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to create internal pipe");
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to create internal pipe");
return TransportAdapter::FAIL;
}
if (!SetNonblocking(pipe_fds_[0])) {
- LOG4CXX_WARN(logger_, "Failed to configure pipe to non-blocking");
+ SDL_LOG_WARN("Failed to configure pipe to non-blocking");
}
}
- thread_stop_requested_ = false;
+ thread_stop_requested_.store(false);
- if (!thread_->start()) {
+ if (!thread_->Start()) {
return TransportAdapter::FAIL;
}
return TransportAdapter::OK;
}
TransportAdapter::Error TcpClientListener::StopListeningThread() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// StopListening() can be called from multiple threads
sync_primitives::AutoLock auto_lock(start_stop_lock_);
- thread_->join();
+ thread_->Stop(threads::Thread::kThreadStopDelegate);
close(pipe_fds_[1]);
pipe_fds_[1] = -1;
@@ -481,7 +488,7 @@ TransportAdapter::Error TcpClientListener::StopListeningThread() {
void TcpClientListener::OnIPAddressUpdated(const std::string ipv4_addr,
const std::string ipv6_addr) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Since we only create a TCP socket with IPv4 option (AF_INET), currently we
// do not use IPv6 address.
@@ -489,15 +496,14 @@ void TcpClientListener::OnIPAddressUpdated(const std::string ipv4_addr,
if (IsListeningOnSpecificInterface()) {
if (!current_ip_address_.empty()) {
// the server socket is running, terminate it
- LOG4CXX_DEBUG(
- logger_,
- "Stopping current TCP server socket on " << designated_interface_);
+ SDL_LOG_DEBUG("Stopping current TCP server socket on "
+ << designated_interface_);
StopOnNetworkInterface();
}
if (!ipv4_addr.empty()) {
// start (or restart) server socket with the new IP address
- LOG4CXX_DEBUG(
- logger_, "Starting TCP server socket on " << designated_interface_);
+ SDL_LOG_DEBUG("Starting TCP server socket on "
+ << designated_interface_);
StartOnNetworkInterface();
}
}
@@ -518,7 +524,7 @@ void TcpClientListener::OnIPAddressUpdated(const std::string ipv4_addr,
}
bool TcpClientListener::StartOnNetworkInterface() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// this method is only for the case that network interface is specified
if (IsListeningOnSpecificInterface()) {
@@ -528,28 +534,29 @@ bool TcpClientListener::StartOnNetworkInterface() {
if (socket_ < 0) {
socket_ = CreateIPv4ServerSocket(port_, designated_interface_);
if (-1 == socket_) {
- LOG4CXX_WARN(logger_, "Failed to create TCP socket");
+ SDL_LOG_WARN("Failed to create TCP socket");
return false;
}
}
}
+ remove_devices_on_terminate_.store(true);
+
if (TransportAdapter::OK != StartListeningThread()) {
- LOG4CXX_WARN(logger_, "Failed to start TCP client listener");
+ SDL_LOG_WARN("Failed to start TCP client listener");
return false;
}
- LOG4CXX_INFO(logger_,
- "TCP server socket started on " << designated_interface_);
+ SDL_LOG_INFO("TCP server socket started on " << designated_interface_);
}
return true;
}
bool TcpClientListener::StopOnNetworkInterface() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (IsListeningOnSpecificInterface()) {
if (TransportAdapter::OK != StopListeningThread()) {
- LOG4CXX_WARN(logger_, "Failed to stop TCP client listener");
+ SDL_LOG_WARN("Failed to stop TCP client listener");
return false;
}
@@ -559,9 +566,10 @@ bool TcpClientListener::StopOnNetworkInterface() {
socket_ = -1;
}
- LOG4CXX_INFO(
- logger_,
- "TCP server socket on " << designated_interface_ << " stopped");
+ remove_devices_on_terminate_.store(false);
+
+ SDL_LOG_INFO("TCP server socket on " << designated_interface_
+ << " stopped");
}
return true;
}
@@ -572,7 +580,7 @@ bool TcpClientListener::IsListeningOnSpecificInterface() const {
int TcpClientListener::CreateIPv4ServerSocket(
uint16_t port, const std::string interface_name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
struct in_addr ipv4_address;
memset(&ipv4_address, 0, sizeof(ipv4_address));
@@ -584,7 +592,7 @@ int TcpClientListener::CreateIPv4ServerSocket(
int sock = socket(AF_INET, SOCK_STREAM, 0);
if (-1 == sock) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to create socket");
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to create socket");
return -1;
}
@@ -596,20 +604,20 @@ int TcpClientListener::CreateIPv4ServerSocket(
int optval = 1;
if (0 !=
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval))) {
- LOG4CXX_WARN_WITH_ERRNO(logger_, "setsockopt SO_REUSEADDR failed");
+ SDL_LOG_WARN_WITH_ERRNO("setsockopt SO_REUSEADDR failed");
}
if (bind(sock,
reinterpret_cast<sockaddr*>(&server_address),
sizeof(server_address)) != 0) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "bind() failed");
+ SDL_LOG_ERROR_WITH_ERRNO("bind() failed");
close(sock);
return -1;
}
const int kBacklog = 128;
if (0 != listen(sock, kBacklog)) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "listen() failed");
+ SDL_LOG_ERROR_WITH_ERRNO("listen() failed");
close(sock);
return -1;
}
@@ -618,20 +626,20 @@ int TcpClientListener::CreateIPv4ServerSocket(
}
void TcpClientListener::DestroyServerSocket(int sock) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (sock >= 0) {
if (shutdown(sock, SHUT_RDWR) != 0) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to shutdown socket");
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to shutdown socket");
}
if (close(sock) != 0) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to close socket");
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to close socket");
}
}
}
bool TcpClientListener::GetIPv4Address(const std::string interface_name,
struct in_addr* ip_address) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
#ifdef BUILD_TESTS
if (testing_) {
@@ -649,7 +657,7 @@ bool TcpClientListener::GetIPv4Address(const std::string interface_name,
struct ifaddrs* if_list;
if (getifaddrs(&if_list) != 0) {
- LOG4CXX_WARN(logger_, "getifaddrs failed");
+ SDL_LOG_WARN("getifaddrs failed");
return false;
}
@@ -689,14 +697,13 @@ bool TcpClientListener::GetIPv4Address(const std::string interface_name,
static bool SetNonblocking(int s) {
int prev_flag = fcntl(s, F_GETFL, 0);
if (prev_flag == -1) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to acquire socket flag");
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to acquire socket flag");
return false;
}
int ret = fcntl(s, F_SETFL, prev_flag | O_NONBLOCK);
if (ret == -1) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_,
- "Failed to configure socket to non-blocking");
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to configure socket to non-blocking");
return false;
}
diff --git a/src/components/transport_manager/src/tcp/tcp_connection_factory.cc b/src/components/transport_manager/src/tcp/tcp_connection_factory.cc
index 50d1c74fa7..5b02c3907e 100644
--- a/src/components/transport_manager/src/tcp/tcp_connection_factory.cc
+++ b/src/components/transport_manager/src/tcp/tcp_connection_factory.cc
@@ -39,7 +39,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
TcpConnectionFactory::TcpConnectionFactory(
TransportAdapterController* controller)
@@ -51,19 +51,17 @@ TransportAdapter::Error TcpConnectionFactory::Init() {
TransportAdapter::Error TcpConnectionFactory::CreateConnection(
const DeviceUID& device_uid, const ApplicationHandle& app_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(
- logger_,
- "DeviceUID: " << &device_uid << ", ApplicationHandle: " << &app_handle);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("DeviceUID: " << &device_uid
+ << ", ApplicationHandle: " << &app_handle);
std::shared_ptr<TcpServerOriginatedSocketConnection> connection =
std::make_shared<TcpServerOriginatedSocketConnection>(
device_uid, app_handle, controller_);
controller_->ConnectionCreated(connection, device_uid, app_handle);
const TransportAdapter::Error error = connection->Start();
if (TransportAdapter::OK != error) {
- LOG4CXX_ERROR(logger_,
- "TCP ServerOriginated connection::Start() failed with error: "
- << error);
+ SDL_LOG_ERROR("TCP ServerOriginated connection::Start() failed with error: "
+ << error);
}
return error;
}
diff --git a/src/components/transport_manager/src/tcp/tcp_device.cc b/src/components/transport_manager/src/tcp/tcp_device.cc
index 16abdfc22d..6d0b87ea6c 100644
--- a/src/components/transport_manager/src/tcp/tcp_device.cc
+++ b/src/components/transport_manager/src/tcp/tcp_device.cc
@@ -36,14 +36,14 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
TcpDevice::TcpDevice(const in_addr_t& in_addr, const std::string& name)
: Device(name, name)
, applications_mutex_()
, in_addr_(in_addr)
, last_handle_(0) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
#if defined(ENABLE_IAP2EMULATION)
@@ -54,33 +54,30 @@ TcpDevice::TcpDevice(const in_addr_t& in_addr,
, applications_mutex_()
, in_addr_(in_addr)
, last_handle_(0) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_,
- "Device created with transport switch emulation support.");
- LOG4CXX_DEBUG(
- logger_,
- "Device parameters: " << device_uid << " / " << transport_switch_id);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Device created with transport switch emulation support.");
+ SDL_LOG_DEBUG("Device parameters: " << device_uid << " / "
+ << transport_switch_id);
}
#endif // ENABLE_IAP2EMULATION
bool TcpDevice::IsSameAs(const Device* other) const {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Device: " << other);
- const TcpDevice* other_tcp_device = static_cast<const TcpDevice*>(other);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Device: " << other);
+ const TcpDevice* other_tcp_device = dynamic_cast<const TcpDevice*>(other);
- if (other_tcp_device->in_addr_ == in_addr_) {
- LOG4CXX_TRACE(
- logger_,
+ if (other_tcp_device && other_tcp_device->in_addr_ == in_addr_) {
+ SDL_LOG_TRACE(
"exit with TRUE. Condition: other_tcp_device->in_addr_ == in_addr_");
return true;
} else {
- LOG4CXX_TRACE(logger_, "exit with FALSE");
+ SDL_LOG_TRACE("exit with FALSE");
return false;
}
}
ApplicationList TcpDevice::GetApplicationList() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock locker(applications_mutex_);
ApplicationList app_list;
for (std::map<ApplicationHandle, Application>::const_iterator it =
@@ -93,8 +90,8 @@ ApplicationList TcpDevice::GetApplicationList() const {
}
ApplicationHandle TcpDevice::AddIncomingApplication(int socket_fd) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Socket_fd: " << socket_fd);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Socket_fd: " << socket_fd);
Application app;
app.incoming = true;
app.socket = socket_fd;
@@ -102,13 +99,13 @@ ApplicationHandle TcpDevice::AddIncomingApplication(int socket_fd) {
sync_primitives::AutoLock locker(applications_mutex_);
const ApplicationHandle app_handle = ++last_handle_;
applications_[app_handle] = app;
- LOG4CXX_DEBUG(logger_, "App_handle " << app_handle);
+ SDL_LOG_DEBUG("App_handle " << app_handle);
return app_handle;
}
ApplicationHandle TcpDevice::AddDiscoveredApplication(int port) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Port " << port);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Port " << port);
Application app;
app.incoming = false;
app.socket = 0; // this line removes compiler warning
@@ -116,52 +113,52 @@ ApplicationHandle TcpDevice::AddDiscoveredApplication(int port) {
sync_primitives::AutoLock locker(applications_mutex_);
const ApplicationHandle app_handle = ++last_handle_;
applications_[app_handle] = app;
- LOG4CXX_DEBUG(logger_, "App_handle " << app_handle);
+ SDL_LOG_DEBUG("App_handle " << app_handle);
return app_handle;
}
void TcpDevice::RemoveApplication(const ApplicationHandle app_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "ApplicationHandle: " << app_handle);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("ApplicationHandle: " << app_handle);
sync_primitives::AutoLock locker(applications_mutex_);
applications_.erase(app_handle);
}
TcpDevice::~TcpDevice() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
int TcpDevice::GetApplicationSocket(const ApplicationHandle app_handle) const {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "ApplicationHandle: " << app_handle);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("ApplicationHandle: " << app_handle);
std::map<ApplicationHandle, Application>::const_iterator it =
applications_.find(app_handle);
if (applications_.end() == it) {
- LOG4CXX_WARN(logger_, "Application was not found");
+ SDL_LOG_WARN("Application was not found");
return -1;
}
if (!it->second.incoming) {
- LOG4CXX_WARN(logger_, "Application is not incoming");
+ SDL_LOG_WARN("Application is not incoming");
return -1;
}
- LOG4CXX_DEBUG(logger_, "socket " << it->second.socket);
+ SDL_LOG_DEBUG("socket " << it->second.socket);
return it->second.socket;
}
int TcpDevice::GetApplicationPort(const ApplicationHandle app_handle) const {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "ApplicationHandle: " << app_handle);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("ApplicationHandle: " << app_handle);
std::map<ApplicationHandle, Application>::const_iterator it =
applications_.find(app_handle);
if (applications_.end() == it) {
- LOG4CXX_WARN(logger_, "Application was not found");
+ SDL_LOG_WARN("Application was not found");
return -1;
}
if (it->second.incoming) {
- LOG4CXX_DEBUG(logger_, "Application is incoming");
+ SDL_LOG_DEBUG("Application is incoming");
return -1;
}
- LOG4CXX_DEBUG(logger_, "port " << it->second.port);
+ SDL_LOG_DEBUG("port " << it->second.port);
return it->second.port;
}
diff --git a/src/components/transport_manager/src/tcp/tcp_server_originated_socket_connection.cc b/src/components/transport_manager/src/tcp/tcp_server_originated_socket_connection.cc
index 690b2d25b3..0571867c10 100644
--- a/src/components/transport_manager/src/tcp/tcp_server_originated_socket_connection.cc
+++ b/src/components/transport_manager/src/tcp/tcp_server_originated_socket_connection.cc
@@ -39,7 +39,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
TcpServerOriginatedSocketConnection::TcpServerOriginatedSocketConnection(
const DeviceUID& device_uid,
@@ -52,12 +52,12 @@ TcpServerOriginatedSocketConnection::~TcpServerOriginatedSocketConnection() {
}
bool TcpServerOriginatedSocketConnection::Establish(ConnectError** error) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(error);
- LOG4CXX_DEBUG(logger_, "error " << error);
+ SDL_LOG_DEBUG("error " << error);
DeviceSptr device = controller()->FindDevice(device_handle());
if (device.use_count() == 0) {
- LOG4CXX_ERROR(logger_, "Device " << device_handle() << " not found");
+ SDL_LOG_ERROR("Device " << device_handle() << " not found");
*error = new ConnectError();
return false;
}
@@ -65,16 +65,14 @@ bool TcpServerOriginatedSocketConnection::Establish(ConnectError** error) {
const int port = tcp_device->GetApplicationPort(application_handle());
if (-1 == port) {
- LOG4CXX_ERROR(
- logger_,
- "Application port for " << application_handle() << " not found");
+ SDL_LOG_ERROR("Application port for " << application_handle()
+ << " not found");
*error = new ConnectError();
return false;
}
if (IsConnectionTerminated()) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Connection is already terminated. Socket will not be created");
*error = new ConnectError();
return false;
@@ -82,7 +80,7 @@ bool TcpServerOriginatedSocketConnection::Establish(ConnectError** error) {
const int socket = ::socket(AF_INET, SOCK_STREAM, 0);
if (socket < 0) {
- LOG4CXX_ERROR(logger_, "Failed to create socket");
+ SDL_LOG_ERROR("Failed to create socket");
*error = new ConnectError();
return false;
}
@@ -92,12 +90,10 @@ bool TcpServerOriginatedSocketConnection::Establish(ConnectError** error) {
addr.sin_addr.s_addr = tcp_device->in_addr();
addr.sin_port = htons(port);
- LOG4CXX_DEBUG(logger_,
- "Connecting " << inet_ntoa(addr.sin_addr) << ":" << port);
+ SDL_LOG_DEBUG("Connecting " << inet_ntoa(addr.sin_addr) << ":" << port);
set_socket(socket);
if (::connect(get_socket(), (struct sockaddr*)&addr, sizeof(addr)) < 0) {
- LOG4CXX_ERROR(logger_,
- "Failed to connect for application " << application_handle()
+ SDL_LOG_ERROR("Failed to connect for application " << application_handle()
<< ", error " << errno);
*error = new ConnectError();
ShutdownAndCloseSocket();
diff --git a/src/components/transport_manager/src/tcp/tcp_socket_connection.cc b/src/components/transport_manager/src/tcp/tcp_socket_connection.cc
index a2ef38f3cb..85e02318c3 100644
--- a/src/components/transport_manager/src/tcp/tcp_socket_connection.cc
+++ b/src/components/transport_manager/src/tcp/tcp_socket_connection.cc
@@ -39,7 +39,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
TcpSocketConnection::TcpSocketConnection(const DeviceUID& device_uid,
const ApplicationHandle& app_handle,
diff --git a/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc b/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc
index 54eb3a7b6d..8d174d89a1 100644
--- a/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc
+++ b/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc
@@ -49,7 +49,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
TcpTransportAdapter::TcpTransportAdapter(
const uint16_t port,
@@ -70,7 +70,7 @@ TcpTransportAdapter::~TcpTransportAdapter() {}
void TcpTransportAdapter::TransportConfigUpdated(
const TransportConfig& new_config) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
transport_config_ = new_config;
@@ -80,7 +80,7 @@ void TcpTransportAdapter::TransportConfigUpdated(
}
TransportConfig TcpTransportAdapter::GetTransportConfiguration() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return transport_config_;
}
@@ -89,7 +89,7 @@ DeviceType TcpTransportAdapter::GetDeviceType() const {
}
void TcpTransportAdapter::Store() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
Json::Value tcp_adapter_dictionary;
Json::Value devices_dictionary;
DeviceList device_ids = GetDeviceList();
@@ -138,7 +138,7 @@ void TcpTransportAdapter::Store() const {
}
bool TcpTransportAdapter::Restore() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool errors_occurred = false;
resumption::LastStateAccessor accessor = last_state_wrapper_->get_accessor();
Json::Value dictionary = accessor.GetData().dictionary();
@@ -166,7 +166,7 @@ bool TcpTransportAdapter::Restore() {
}
}
bool result = !errors_occurred;
- LOG4CXX_DEBUG(logger_, "result " << std::boolalpha << result);
+ SDL_LOG_DEBUG("result " << std::boolalpha << result);
return result;
}
diff --git a/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc b/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc
index 7d96c685f1..eb92599ae5 100644
--- a/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc
+++ b/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc
@@ -46,7 +46,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
ThreadedSocketConnection::ThreadedSocketConnection(
const DeviceUID& device_id,
@@ -69,7 +69,7 @@ ThreadedSocketConnection::ThreadedSocketConnection(
}
ThreadedSocketConnection::~ThreadedSocketConnection() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(nullptr == thread_);
if (-1 != read_fd_) {
@@ -83,54 +83,54 @@ ThreadedSocketConnection::~ThreadedSocketConnection() {
void ThreadedSocketConnection::StopAndJoinThread() {
Disconnect();
if (thread_) {
- thread_->join();
- delete thread_->delegate();
+ thread_->Stop(threads::Thread::kThreadSoftStop);
+ delete thread_->GetDelegate();
threads::DeleteThread(thread_);
thread_ = nullptr;
}
}
void ThreadedSocketConnection::Abort() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
unexpected_disconnect_ = true;
terminate_flag_ = true;
}
TransportAdapter::Error ThreadedSocketConnection::Start() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
int fds[2];
const int pipe_ret = pipe(fds);
if (0 == pipe_ret) {
- LOG4CXX_DEBUG(logger_, "pipe created");
+ SDL_LOG_DEBUG("pipe created");
read_fd_ = fds[0];
write_fd_ = fds[1];
} else {
- LOG4CXX_ERROR(logger_, "pipe creation failed");
+ SDL_LOG_ERROR("pipe creation failed");
return TransportAdapter::FAIL;
}
const int fcntl_ret =
fcntl(read_fd_, F_SETFL, fcntl(read_fd_, F_GETFL) | O_NONBLOCK);
if (0 != fcntl_ret) {
- LOG4CXX_ERROR(logger_, "fcntl failed");
+ SDL_LOG_ERROR("fcntl failed");
return TransportAdapter::FAIL;
}
- if (!thread_->start()) {
- LOG4CXX_ERROR(logger_, "thread creation failed");
+ if (!thread_->Start()) {
+ SDL_LOG_ERROR("thread creation failed");
return TransportAdapter::FAIL;
}
- LOG4CXX_INFO(logger_, "thread created");
+ SDL_LOG_INFO("thread created");
return TransportAdapter::OK;
}
void ThreadedSocketConnection::Finalize() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (unexpected_disconnect_) {
- LOG4CXX_DEBUG(logger_, "unexpected_disconnect");
+ SDL_LOG_DEBUG("unexpected_disconnect");
controller_->ConnectionAborted(
device_handle(), application_handle(), CommunicationError());
} else {
- LOG4CXX_DEBUG(logger_, "not unexpected_disconnect");
+ SDL_LOG_DEBUG("not unexpected_disconnect");
controller_->ConnectionFinished(device_handle(), application_handle());
}
@@ -138,17 +138,17 @@ void ThreadedSocketConnection::Finalize() {
}
TransportAdapter::Error ThreadedSocketConnection::Notify() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (-1 == write_fd_) {
- LOG4CXX_ERROR_WITH_ERRNO(
- logger_, "Failed to wake up connection thread for connection " << this);
- LOG4CXX_TRACE(logger_, "exit with TransportAdapter::BAD_STATE");
+ SDL_LOG_ERROR_WITH_ERRNO(
+ "Failed to wake up connection thread for connection " << this);
+ SDL_LOG_TRACE("exit with TransportAdapter::BAD_STATE");
return TransportAdapter::BAD_STATE;
}
uint8_t c = 0;
if (1 != write(write_fd_, &c, 1)) {
- LOG4CXX_ERROR_WITH_ERRNO(
- logger_, "Failed to wake up connection thread for connection " << this);
+ SDL_LOG_ERROR_WITH_ERRNO(
+ "Failed to wake up connection thread for connection " << this);
return TransportAdapter::FAIL;
}
return TransportAdapter::OK;
@@ -156,44 +156,44 @@ TransportAdapter::Error ThreadedSocketConnection::Notify() const {
TransportAdapter::Error ThreadedSocketConnection::SendData(
::protocol_handler::RawMessagePtr message) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(frames_to_send_mutex_);
frames_to_send_.push(message);
return Notify();
}
TransportAdapter::Error ThreadedSocketConnection::Disconnect() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
terminate_flag_ = true;
ShutdownAndCloseSocket();
return Notify();
}
void ThreadedSocketConnection::Terminate() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
StopAndJoinThread();
}
void ThreadedSocketConnection::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ConnectError* connect_error = nullptr;
if (!Establish(&connect_error)) {
- LOG4CXX_ERROR(logger_, "Connection Establish failed");
+ SDL_LOG_ERROR("Connection Establish failed");
delete connect_error;
Abort();
} else {
- LOG4CXX_DEBUG(logger_, "Connection established");
+ SDL_LOG_DEBUG("Connection established");
controller_->ConnectDone(device_handle(), application_handle());
}
while (!terminate_flag_) {
Transmit();
}
- LOG4CXX_DEBUG(logger_, "Connection is to finalize");
+ SDL_LOG_DEBUG("Connection is to finalize");
Finalize();
sync_primitives::AutoLock auto_lock(frames_to_send_mutex_);
while (!frames_to_send_.empty()) {
- LOG4CXX_INFO(logger_, "removing message");
+ SDL_LOG_INFO("removing message");
::protocol_handler::RawMessagePtr message = frames_to_send_.front();
frames_to_send_.pop();
controller_->DataSendFailed(
@@ -208,23 +208,23 @@ bool ThreadedSocketConnection::IsFramesToSendQueueEmpty() const {
}
void ThreadedSocketConnection::ShutdownAndCloseSocket() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const int socket = socket_;
socket_ = -1;
if (socket != -1) {
if (shutdown(socket, SHUT_RDWR) != 0) {
- LOG4CXX_WARN(logger_, "Socket was unable to be shutdowned");
+ SDL_LOG_WARN("Socket was unable to be shutdowned");
}
if (close(socket) != 0) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to close socket");
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to close socket");
}
} else {
- LOG4CXX_WARN(logger_, "Socket has been already closed or not created yet");
+ SDL_LOG_WARN("Socket has been already closed or not created yet");
}
}
void ThreadedSocketConnection::Transmit() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const nfds_t kPollFdsSize = 2;
pollfd poll_fds[kPollFdsSize];
@@ -237,26 +237,24 @@ void ThreadedSocketConnection::Transmit() {
poll_fds[1].fd = read_fd_;
poll_fds[1].events = POLLIN | POLLPRI;
- LOG4CXX_DEBUG(logger_, "poll " << this);
+ SDL_LOG_DEBUG("poll " << this);
if (-1 == poll(poll_fds, kPollFdsSize, -1)) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "poll failed for connection " << this);
+ SDL_LOG_ERROR_WITH_ERRNO("poll failed for connection " << this);
Abort();
return;
}
- LOG4CXX_DEBUG(logger_,
- "poll is ok " << this << " revents0: " << std::hex
+ SDL_LOG_DEBUG("poll is ok " << this << " revents0: " << std::hex
<< poll_fds[0].revents << " revents1:" << std::hex
<< poll_fds[1].revents);
// error check
if (0 != (poll_fds[1].revents & (POLLERR | POLLHUP | POLLNVAL))) {
- LOG4CXX_ERROR(logger_,
- "Notification pipe for connection " << this << " terminated");
+ SDL_LOG_ERROR("Notification pipe for connection " << this << " terminated");
Abort();
return;
}
if (poll_fds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) {
- LOG4CXX_WARN(logger_, "Connection " << this << " terminated");
+ SDL_LOG_WARN("Connection " << this << " terminated");
Abort();
return;
}
@@ -268,8 +266,8 @@ void ThreadedSocketConnection::Transmit() {
bytes_read = read(read_fd_, buffer, sizeof(buffer));
} while (bytes_read > 0);
if ((bytes_read < 0) && (EAGAIN != errno)) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Failed to clear notification pipe");
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "poll failed for connection " << this);
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to clear notification pipe");
+ SDL_LOG_ERROR_WITH_ERRNO("poll failed for connection " << this);
Abort();
return;
}
@@ -278,12 +276,12 @@ void ThreadedSocketConnection::Transmit() {
// Send data if possible
if (!is_queue_empty && (poll_fds[0].revents & POLLOUT)) {
- LOG4CXX_DEBUG(logger_, "frames_to_send_ not empty() ");
+ SDL_LOG_DEBUG("frames_to_send_ not empty() ");
// send data
const bool send_ok = Send();
if (!send_ok) {
- LOG4CXX_ERROR(logger_, "Send() failed ");
+ SDL_LOG_ERROR("Send() failed ");
Abort();
return;
}
@@ -293,7 +291,7 @@ void ThreadedSocketConnection::Transmit() {
if (poll_fds[0].revents & (POLLIN | POLLPRI)) {
const bool receive_ok = Receive();
if (!receive_ok) {
- LOG4CXX_ERROR(logger_, "Receive() failed ");
+ SDL_LOG_ERROR("Receive() failed ");
Abort();
return;
}
@@ -301,7 +299,7 @@ void ThreadedSocketConnection::Transmit() {
}
bool ThreadedSocketConnection::Receive() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
uint8_t buffer[4096];
ssize_t bytes_read = -1;
@@ -309,21 +307,19 @@ bool ThreadedSocketConnection::Receive() {
bytes_read = recv(socket_, buffer, sizeof(buffer), MSG_DONTWAIT);
if (bytes_read > 0) {
- LOG4CXX_DEBUG(
- logger_,
- "Received " << bytes_read << " bytes for connection " << this);
+ SDL_LOG_DEBUG("Received " << bytes_read << " bytes for connection "
+ << this);
::protocol_handler::RawMessagePtr frame(
new protocol_handler::RawMessage(0, 0, buffer, bytes_read, false));
controller_->DataReceiveDone(
device_handle(), application_handle(), frame);
} else if (bytes_read < 0) {
if (EAGAIN != errno && EWOULDBLOCK != errno) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_,
- "recv() failed for connection " << this);
+ SDL_LOG_ERROR_WITH_ERRNO("recv() failed for connection " << this);
return false;
}
} else {
- LOG4CXX_WARN(logger_, "Connection " << this << " closed by remote peer");
+ SDL_LOG_WARN("Connection " << this << " closed by remote peer");
return false;
}
} while (bytes_read > 0);
@@ -332,7 +328,7 @@ bool ThreadedSocketConnection::Receive() {
}
bool ThreadedSocketConnection::Send() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
FrameQueue frames_to_send_local;
{
@@ -342,13 +338,13 @@ bool ThreadedSocketConnection::Send() {
size_t offset = 0;
while (!frames_to_send_local.empty()) {
- LOG4CXX_INFO(logger_, "frames_to_send is not empty");
+ SDL_LOG_INFO("frames_to_send is not empty");
::protocol_handler::RawMessagePtr frame = frames_to_send_local.front();
const ssize_t bytes_sent =
::send(socket_, frame->data() + offset, frame->data_size() - offset, 0);
if (bytes_sent >= 0) {
- LOG4CXX_DEBUG(logger_, "bytes_sent >= 0");
+ SDL_LOG_DEBUG("bytes_sent >= 0");
offset += bytes_sent;
if (offset == frame->data_size()) {
frames_to_send_local.pop();
@@ -356,8 +352,8 @@ bool ThreadedSocketConnection::Send() {
controller_->DataSendDone(device_handle(), application_handle(), frame);
}
} else {
- LOG4CXX_DEBUG(logger_, "bytes_sent < 0");
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Send failed for connection " << this);
+ SDL_LOG_DEBUG("bytes_sent < 0");
+ SDL_LOG_ERROR_WITH_ERRNO("Send failed for connection " << this);
frames_to_send_local.pop();
offset = 0;
controller_->DataSendFailed(
@@ -373,13 +369,13 @@ ThreadedSocketConnection::SocketConnectionDelegate::SocketConnectionDelegate(
: connection_(connection) {}
void ThreadedSocketConnection::SocketConnectionDelegate::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(connection_);
connection_->threadMain();
}
void ThreadedSocketConnection::SocketConnectionDelegate::exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
}
} // namespace transport_adapter
diff --git a/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc b/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc
index fcae508747..447aa6c8ff 100644
--- a/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc
+++ b/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc
@@ -51,7 +51,7 @@ const char* tc_enabled = "enabled";
const char* tc_tcp_port = "tcp_port";
const char* tc_tcp_ip_address = "tcp_ip_address";
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
namespace {
DeviceTypes devicesType = {
std::make_pair(DeviceType::AOA, std::string("USB_AOA")),
@@ -99,42 +99,37 @@ TransportAdapterImpl::~TransportAdapterImpl() {
Terminate();
if (device_scanner_) {
- LOG4CXX_DEBUG(logger_, "Deleting device_scanner_ " << device_scanner_);
+ SDL_LOG_DEBUG("Deleting device_scanner_ " << device_scanner_);
delete device_scanner_;
- LOG4CXX_DEBUG(logger_, "device_scanner_ deleted.");
+ SDL_LOG_DEBUG("device_scanner_ deleted.");
}
if (server_connection_factory_) {
- LOG4CXX_DEBUG(
- logger_,
- "Deleting server_connection_factory " << server_connection_factory_);
+ SDL_LOG_DEBUG("Deleting server_connection_factory "
+ << server_connection_factory_);
delete server_connection_factory_;
- LOG4CXX_DEBUG(logger_, "server_connection_factory deleted.");
+ SDL_LOG_DEBUG("server_connection_factory deleted.");
}
if (client_connection_listener_) {
- LOG4CXX_DEBUG(
- logger_,
- "Deleting client_connection_listener_ " << client_connection_listener_);
+ SDL_LOG_DEBUG("Deleting client_connection_listener_ "
+ << client_connection_listener_);
delete client_connection_listener_;
- LOG4CXX_DEBUG(logger_, "client_connection_listener_ deleted.");
+ SDL_LOG_DEBUG("client_connection_listener_ deleted.");
}
}
void TransportAdapterImpl::Terminate() {
if (device_scanner_) {
device_scanner_->Terminate();
- LOG4CXX_DEBUG(logger_,
- "device_scanner_ " << device_scanner_ << " terminated.");
+ SDL_LOG_DEBUG("device_scanner_ " << device_scanner_ << " terminated.");
}
if (server_connection_factory_) {
server_connection_factory_->Terminate();
- LOG4CXX_DEBUG(logger_,
- "server_connection_factory " << server_connection_factory_
+ SDL_LOG_DEBUG("server_connection_factory " << server_connection_factory_
<< " terminated.");
}
if (client_connection_listener_) {
client_connection_listener_->Terminate();
- LOG4CXX_DEBUG(logger_,
- "client_connection_listener_ " << client_connection_listener_
+ SDL_LOG_DEBUG("client_connection_listener_ " << client_connection_listener_
<< " terminated.");
}
@@ -150,7 +145,7 @@ void TransportAdapterImpl::Terminate() {
}
connections.clear();
- LOG4CXX_DEBUG(logger_, "Connections deleted");
+ SDL_LOG_DEBUG("Connections deleted");
DeviceMap devices;
devices_mutex_.Acquire();
@@ -158,11 +153,11 @@ void TransportAdapterImpl::Terminate() {
devices_mutex_.Release();
devices.clear();
- LOG4CXX_DEBUG(logger_, "Devices deleted");
+ SDL_LOG_DEBUG("Devices deleted");
}
TransportAdapter::Error TransportAdapterImpl::Init() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
Error error = OK;
@@ -180,42 +175,41 @@ TransportAdapter::Error TransportAdapterImpl::Init() {
if (get_settings().use_last_state() && initialised_) {
if (!Restore()) {
- LOG4CXX_WARN(logger_, "could not restore transport adapter state");
+ SDL_LOG_WARN("could not restore transport adapter state");
}
}
- LOG4CXX_TRACE(logger_, "exit with error: " << error);
+ SDL_LOG_TRACE("exit with error: " << error);
return error;
}
TransportAdapter::Error TransportAdapterImpl::SearchDevices() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
if (device_scanner_ == NULL) {
- LOG4CXX_TRACE(logger_, "exit with NOT_SUPPORTED");
+ SDL_LOG_TRACE("exit with NOT_SUPPORTED");
return NOT_SUPPORTED;
} else if (!device_scanner_->IsInitialised()) {
- LOG4CXX_TRACE(logger_, "exit with BAD_STATE");
+ SDL_LOG_TRACE("exit with BAD_STATE");
return BAD_STATE;
}
TransportAdapter::Error er = device_scanner_->Scan();
- LOG4CXX_TRACE(logger_, "exit with error: " << er);
+ SDL_LOG_TRACE("exit with error: " << er);
return er;
}
TransportAdapter::Error TransportAdapterImpl::Connect(
const DeviceUID& device_id, const ApplicationHandle& app_handle) {
- LOG4CXX_TRACE(
- logger_,
- "enter. DeviceUID " << device_id << " ApplicationHandle " << app_handle);
+ SDL_LOG_TRACE("enter. DeviceUID " << device_id << " ApplicationHandle "
+ << app_handle);
if (server_connection_factory_ == 0) {
- LOG4CXX_TRACE(logger_, "exit with NOT_SUPPORTED");
+ SDL_LOG_TRACE("exit with NOT_SUPPORTED");
return NOT_SUPPORTED;
}
if (!server_connection_factory_->IsInitialised()) {
- LOG4CXX_TRACE(logger_, "exit with BAD_STATE");
+ SDL_LOG_TRACE("exit with BAD_STATE");
return BAD_STATE;
}
if (!initialised_) {
- LOG4CXX_TRACE(logger_, "exit with BAD_STATE");
+ SDL_LOG_TRACE("exit with BAD_STATE");
return BAD_STATE;
}
@@ -235,32 +229,29 @@ TransportAdapter::Error TransportAdapterImpl::Connect(
connections_lock_.Release();
if (already_exists && !pending_app) {
- LOG4CXX_TRACE(logger_, "exit with ALREADY_EXISTS");
+ SDL_LOG_TRACE("exit with ALREADY_EXISTS");
return ALREADY_EXISTS;
}
const TransportAdapter::Error err =
server_connection_factory_->CreateConnection(device_id, app_handle);
if (TransportAdapter::OK != err) {
- connections_lock_.AcquireForWriting();
if (!pending_app) {
- connections_.erase(std::make_pair(device_id, app_handle));
+ RemoveConnection(device_id, app_handle);
}
- connections_lock_.Release();
}
- LOG4CXX_TRACE(logger_, "exit with error: " << err);
+ SDL_LOG_TRACE("exit with error: " << err);
return err;
}
TransportAdapter::Error TransportAdapterImpl::ConnectDevice(
const DeviceUID& device_handle) {
- LOG4CXX_TRACE(logger_, "enter with device_handle: " << &device_handle);
+ SDL_LOG_TRACE("enter with device_handle: " << &device_handle);
DeviceSptr device = FindDevice(device_handle);
if (device) {
TransportAdapter::Error err = ConnectDevice(device);
if (FAIL == err && GetDeviceType() == DeviceType::CLOUD_WEBSOCKET) {
- LOG4CXX_TRACE(logger_,
- "Error occurred while connecting cloud app: " << err);
+ SDL_LOG_TRACE("Error occurred while connecting cloud app: " << err);
// Update retry count
if (device->retry_count() >=
get_settings().cloud_app_max_retry_attempts()) {
@@ -285,10 +276,10 @@ TransportAdapter::Error TransportAdapterImpl::ConnectDevice(
} else if (OK == err) {
ConnectionStatusUpdated(device, ConnectionStatus::CONNECTED);
}
- LOG4CXX_TRACE(logger_, "exit with error: " << err);
+ SDL_LOG_TRACE("exit with error: " << err);
return err;
} else {
- LOG4CXX_TRACE(logger_, "exit with BAD_PARAM");
+ SDL_LOG_TRACE("exit with BAD_PARAM");
return BAD_PARAM;
}
}
@@ -297,8 +288,7 @@ void TransportAdapterImpl::RetryConnection() {
ClearCompletedTimers();
const DeviceUID device_id = GetNextRetryDevice();
if (device_id.empty()) {
- LOG4CXX_ERROR(logger_,
- "Unable to find timer, ignoring RetryConnection request");
+ SDL_LOG_ERROR("Unable to find timer, ignoring RetryConnection request");
return;
}
ConnectDevice(device_id);
@@ -349,36 +339,35 @@ void TransportAdapterImpl::ConnectionStatusUpdated(DeviceSptr device,
TransportAdapter::Error TransportAdapterImpl::Disconnect(
const DeviceUID& device_id, const ApplicationHandle& app_handle) {
- LOG4CXX_TRACE(
- logger_,
- "enter. device_id: " << &device_id << ", device_id: " << &device_id);
+ SDL_LOG_TRACE("enter. device_id: " << &device_id
+ << ", device_id: " << &device_id);
if (!initialised_) {
- LOG4CXX_TRACE(logger_, "exit with BAD_STATE");
+ SDL_LOG_TRACE("exit with BAD_STATE");
return BAD_STATE;
}
ConnectionSPtr connection = FindEstablishedConnection(device_id, app_handle);
if (connection) {
TransportAdapter::Error err = connection->Disconnect();
- LOG4CXX_TRACE(logger_, "exit with error: " << err);
+ SDL_LOG_TRACE("exit with error: " << err);
return err;
} else {
- LOG4CXX_TRACE(logger_, "exit with BAD_PARAM");
+ SDL_LOG_TRACE("exit with BAD_PARAM");
return BAD_PARAM;
}
}
TransportAdapter::Error TransportAdapterImpl::DisconnectDevice(
const DeviceUID& device_id) {
- LOG4CXX_TRACE(logger_, "enter. device_id: " << &device_id);
+ SDL_LOG_TRACE("enter. device_id: " << &device_id);
if (!initialised_) {
- LOG4CXX_TRACE(logger_, "exit with BAD_STATE");
+ SDL_LOG_TRACE("exit with BAD_STATE");
return BAD_STATE;
}
Error error = OK;
DeviceSptr device = FindDevice(device_id);
if (!device) {
- LOG4CXX_WARN(logger_, "Device with id: " << device_id << " Not found");
+ SDL_LOG_WARN("Device with id: " << device_id << " Not found");
return BAD_PARAM;
}
ConnectionStatusUpdated(device, ConnectionStatus::CLOSING);
@@ -402,7 +391,7 @@ TransportAdapter::Error TransportAdapterImpl::DisconnectDevice(
ConnectionInfo info = *j;
if (OK != info.connection->Disconnect()) {
error = FAIL;
- LOG4CXX_ERROR(logger_, "Error on disconnect " << error);
+ SDL_LOG_ERROR("Error on disconnect " << error);
}
}
@@ -413,34 +402,33 @@ TransportAdapter::Error TransportAdapterImpl::SendData(
const DeviceUID& device_id,
const ApplicationHandle& app_handle,
const ::protocol_handler::RawMessagePtr data) {
- LOG4CXX_TRACE(logger_,
- "enter. device_id: " << &device_id << ", app_handle: "
+ SDL_LOG_TRACE("enter. device_id: " << &device_id << ", app_handle: "
<< &app_handle << ", data: " << data);
if (!initialised_) {
- LOG4CXX_TRACE(logger_, "exit with BAD_STATE");
+ SDL_LOG_TRACE("exit with BAD_STATE");
return BAD_STATE;
}
ConnectionSPtr connection = FindEstablishedConnection(device_id, app_handle);
if (connection) {
TransportAdapter::Error err = connection->SendData(data);
- LOG4CXX_TRACE(logger_, "exit with error: " << err);
+ SDL_LOG_TRACE("exit with error: " << err);
return err;
} else {
- LOG4CXX_TRACE(logger_, "exit with BAD_PARAM");
+ SDL_LOG_TRACE("exit with BAD_PARAM");
return BAD_PARAM;
}
}
TransportAdapter::Error TransportAdapterImpl::ChangeClientListening(
TransportAction required_change) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (client_connection_listener_ == 0) {
- LOG4CXX_TRACE(logger_, "exit with NOT_SUPPORTED");
+ SDL_LOG_TRACE("exit with NOT_SUPPORTED");
return NOT_SUPPORTED;
}
if (!client_connection_listener_->IsInitialised()) {
- LOG4CXX_TRACE(logger_, "exit with BAD_STATE");
+ SDL_LOG_TRACE("exit with BAD_STATE");
return BAD_STATE;
}
@@ -479,30 +467,28 @@ TransportAdapter::Error TransportAdapterImpl::ChangeClientListening(
default:
NOTREACHED();
}
- LOG4CXX_TRACE(logger_, "Exit with error: " << err);
+ SDL_LOG_TRACE("Exit with error: " << err);
return err;
}
DeviceList TransportAdapterImpl::GetDeviceList() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DeviceList devices;
sync_primitives::AutoLock locker(devices_mutex_);
for (DeviceMap::const_iterator it = devices_.begin(); it != devices_.end();
++it) {
devices.push_back(it->first);
}
- LOG4CXX_TRACE(logger_,
- "exit with DeviceList. It's' size = " << devices.size());
+ SDL_LOG_TRACE("exit with DeviceList. It's' size = " << devices.size());
return devices;
}
DeviceSptr TransportAdapterImpl::GetWebEngineDevice() const {
#ifndef WEBSOCKET_SERVER_TRANSPORT_SUPPORT
- LOG4CXX_TRACE(logger_,
- "Web engine support is disabled. Device does not exist");
+ SDL_LOG_TRACE("Web engine support is disabled. Device does not exist");
return DeviceSptr();
#else
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock locker(devices_mutex_);
auto web_engine_device =
@@ -517,13 +503,14 @@ DeviceSptr TransportAdapterImpl::GetWebEngineDevice() const {
return web_engine_device->second;
}
- LOG4CXX_ERROR(logger_, "WebEngine device not found!");
+ SDL_LOG_ERROR("WebEngine device not found!");
return std::make_shared<transport_adapter::WebSocketDevice>("", "");
#endif
}
DeviceSptr TransportAdapterImpl::AddDevice(DeviceSptr device) {
- LOG4CXX_TRACE(logger_, "enter. device: " << device);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_TRACE("enter. device: " << device);
DeviceSptr existing_device;
bool same_device_found = false;
devices_mutex_.Acquire();
@@ -532,7 +519,7 @@ DeviceSptr TransportAdapterImpl::AddDevice(DeviceSptr device) {
existing_device = i->second;
if (device->IsSameAs(existing_device.get())) {
same_device_found = true;
- LOG4CXX_DEBUG(logger_, "device " << device << "already exists");
+ SDL_LOG_DEBUG("Device " << device << " already exists");
break;
}
}
@@ -541,7 +528,7 @@ DeviceSptr TransportAdapterImpl::AddDevice(DeviceSptr device) {
}
devices_mutex_.Release();
if (same_device_found) {
- LOG4CXX_TRACE(logger_, "exit with TRUE. Condition: same_device_found");
+ SDL_LOG_TRACE("Exit with TRUE. Condition: same_device_found");
return existing_device;
} else {
device->set_connection_status(ConnectionStatus::PENDING);
@@ -553,13 +540,13 @@ DeviceSptr TransportAdapterImpl::AddDevice(DeviceSptr device) {
if (ToBeAutoConnected(device)) {
ConnectDevice(device);
}
- LOG4CXX_TRACE(logger_, "exit with DeviceSptr " << device);
+ SDL_LOG_TRACE("exit with DeviceSptr " << device);
return device;
}
}
void TransportAdapterImpl::SearchDeviceDone(const DeviceVector& devices) {
- LOG4CXX_TRACE(logger_, "enter. devices: " << &devices);
+ SDL_LOG_TRACE("enter. devices: " << &devices);
DeviceMap new_devices;
for (DeviceVector::const_iterator it = devices.begin(); it != devices.end();
++it) {
@@ -567,21 +554,20 @@ void TransportAdapterImpl::SearchDeviceDone(const DeviceVector& devices) {
bool device_found = false;
devices_mutex_.Acquire();
- for (DeviceMap::iterator it = devices_.begin(); it != devices_.end();
- ++it) {
- DeviceSptr existing_device = it->second;
+ for (DeviceMap::iterator iter = devices_.begin(); iter != devices_.end();
+ ++iter) {
+ DeviceSptr existing_device = iter->second;
if (device->IsSameAs(existing_device.get())) {
existing_device->set_keep_on_disconnect(true);
device_found = true;
- LOG4CXX_DEBUG(logger_, "device found. DeviceSptr" << it->second);
+ SDL_LOG_DEBUG("device found. DeviceSptr" << iter->second);
break;
}
}
devices_mutex_.Release();
if (!device_found) {
- LOG4CXX_INFO(logger_,
- "Adding new device " << device->unique_device_id() << " (\""
+ SDL_LOG_INFO("Adding new device " << device->unique_device_id() << " (\""
<< device->name() << "\")");
}
@@ -630,7 +616,7 @@ void TransportAdapterImpl::SearchDeviceDone(const DeviceVector& devices) {
ConnectDevice(device);
}
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterImpl::ApplicationListUpdated(
@@ -640,38 +626,38 @@ void TransportAdapterImpl::ApplicationListUpdated(
}
void TransportAdapterImpl::FindNewApplicationsRequest() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
for (TransportAdapterListenerList::iterator i = listeners_.begin();
i != listeners_.end();
++i) {
TransportAdapterListener* listener = *i;
listener->OnFindNewApplicationsRequest(this);
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterImpl::SearchDeviceFailed(const SearchDeviceError& error) {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
for (TransportAdapterListenerList::iterator it = listeners_.begin();
it != listeners_.end();
++it) {
(*it)->OnSearchDeviceFailed(this, error);
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
bool TransportAdapterImpl::IsSearchDevicesSupported() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return device_scanner_ != 0;
}
bool TransportAdapterImpl::IsServerOriginatedConnectSupported() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return server_connection_factory_ != 0;
}
bool TransportAdapterImpl::IsClientOriginatedConnectSupported() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return client_connection_listener_ != 0;
}
@@ -679,8 +665,8 @@ void TransportAdapterImpl::ConnectionCreated(
ConnectionSPtr connection,
const DeviceUID& device_id,
const ApplicationHandle& app_handle) {
- LOG4CXX_TRACE(logger_,
- "enter connection:" << connection
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_TRACE("enter connection:" << connection
<< ", device_id: " << &device_id
<< ", app_handle: " << &app_handle);
connections_lock_.AcquireForReading();
@@ -694,10 +680,10 @@ void TransportAdapterImpl::ConnectionCreated(
void TransportAdapterImpl::DeviceDisconnected(
const DeviceUID& device_handle, const DisconnectDeviceError& error) {
+ SDL_LOG_AUTO_TRACE();
const DeviceUID device_uid = device_handle;
- LOG4CXX_TRACE(
- logger_,
- "enter. device_handle: " << &device_uid << ", error: " << &error);
+ SDL_LOG_TRACE("enter. device_handle: " << &device_uid
+ << ", error: " << &error);
ApplicationList app_list = GetApplicationList(device_uid);
for (ApplicationList::const_iterator i = app_list.begin();
i != app_list.end();
@@ -719,21 +705,20 @@ void TransportAdapterImpl::DeviceDisconnected(
listener->OnDisconnectDeviceDone(this, device_uid);
}
- connections_lock_.AcquireForWriting();
for (ApplicationList::const_iterator i = app_list.begin();
i != app_list.end();
++i) {
ApplicationHandle app_handle = *i;
- connections_.erase(std::make_pair(device_uid, app_handle));
+ RemoveConnection(device_uid, app_handle);
}
- connections_lock_.Release();
RemoveDevice(device_uid);
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
bool TransportAdapterImpl::IsSingleApplication(
const DeviceUID& device_uid, const ApplicationHandle& app_uid) {
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoReadLock locker(connections_lock_);
for (ConnectionMap::const_iterator it = connections_.begin();
it != connections_.end();
@@ -741,9 +726,9 @@ bool TransportAdapterImpl::IsSingleApplication(
const DeviceUID& current_device_id = it->first.first;
const ApplicationHandle& current_app_handle = it->first.second;
if (current_device_id == device_uid && current_app_handle != app_uid) {
- LOG4CXX_DEBUG(logger_,
- "break. Condition: current_device_id == device_id && "
- "current_app_handle != app_handle");
+ SDL_LOG_DEBUG(
+ "break. Condition: current_device_id == device_id && "
+ "current_app_handle != app_handle");
return false;
}
@@ -753,14 +738,14 @@ bool TransportAdapterImpl::IsSingleApplication(
void TransportAdapterImpl::DisconnectDone(const DeviceUID& device_handle,
const ApplicationHandle& app_handle) {
+ SDL_LOG_AUTO_TRACE();
const DeviceUID device_uid = device_handle;
const ApplicationHandle app_uid = app_handle;
- LOG4CXX_TRACE(
- logger_,
- "enter. device_id: " << &device_uid << ", app_handle: " << &app_uid);
+ SDL_LOG_TRACE("enter. device_id: " << &device_uid
+ << ", app_handle: " << &app_uid);
DeviceSptr device = FindDevice(device_handle);
if (!device) {
- LOG4CXX_WARN(logger_, "Device: uid " << &device_uid << " not found");
+ SDL_LOG_WARN("Device: uid " << &device_uid << " not found");
return;
}
@@ -776,24 +761,22 @@ void TransportAdapterImpl::DisconnectDone(const DeviceUID& device_handle,
listener->OnDisconnectDeviceDone(this, device_uid);
}
}
- connections_lock_.AcquireForWriting();
- connections_.erase(std::make_pair(device_uid, app_uid));
- connections_lock_.Release();
+ RemoveConnection(device_uid, app_uid);
if (device_disconnected) {
+ SDL_LOG_DEBUG("Removing device...");
RemoveDevice(device_uid);
}
Store();
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterImpl::DataReceiveDone(
const DeviceUID& device_id,
const ApplicationHandle& app_handle,
::protocol_handler::RawMessagePtr message) {
- LOG4CXX_TRACE(logger_,
- "enter. device_id: " << &device_id
+ SDL_LOG_TRACE("enter. device_id: " << &device_id
<< ", app_handle: " << &app_handle
<< ", message: " << message);
@@ -808,33 +791,33 @@ void TransportAdapterImpl::DataReceiveDone(
++it) {
(*it)->OnDataReceiveDone(this, device_id, app_handle, message);
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterImpl::DataReceiveFailed(
const DeviceUID& device_id,
const ApplicationHandle& app_handle,
const DataReceiveError& error) {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
for (TransportAdapterListenerList::iterator it = listeners_.begin();
it != listeners_.end();
++it) {
(*it)->OnDataReceiveFailed(this, device_id, app_handle, error);
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterImpl::DataSendDone(
const DeviceUID& device_id,
const ApplicationHandle& app_handle,
::protocol_handler::RawMessagePtr message) {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
for (TransportAdapterListenerList::iterator it = listeners_.begin();
it != listeners_.end();
++it) {
(*it)->OnDataSendDone(this, device_id, app_handle, message);
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterImpl::DataSendFailed(
@@ -842,18 +825,18 @@ void TransportAdapterImpl::DataSendFailed(
const ApplicationHandle& app_handle,
::protocol_handler::RawMessagePtr message,
const DataSendError& error) {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
for (TransportAdapterListenerList::iterator it = listeners_.begin();
it != listeners_.end();
++it) {
(*it)->OnDataSendFailed(this, device_id, app_handle, message, error);
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterImpl::TransportConfigUpdated(
const TransportConfig& new_config) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
for (TransportAdapterListenerList::iterator it = listeners_.begin();
it != listeners_.end();
++it) {
@@ -862,7 +845,7 @@ void TransportAdapterImpl::TransportConfigUpdated(
}
void TransportAdapterImpl::DoTransportSwitch() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::for_each(
listeners_.begin(),
listeners_.end(),
@@ -872,17 +855,15 @@ void TransportAdapterImpl::DoTransportSwitch() const {
}
void TransportAdapterImpl::DeviceSwitched(const DeviceUID& device_handle) {
- LOG4CXX_DEBUG(logger_,
- "Switching is not implemented for that adapter type "
- << GetConnectionType().c_str());
+ SDL_LOG_DEBUG("Switching is not implemented for that adapter type "
+ << GetConnectionType().c_str());
UNUSED(device_handle);
}
ConnectionSPtr TransportAdapterImpl::FindPendingConnection(
const DeviceUID& device_id, const ApplicationHandle& app_handle) const {
- LOG4CXX_TRACE(
- logger_,
- "enter. device_id: " << &device_id << ", app_handle: " << &app_handle);
+ SDL_LOG_TRACE("enter. device_id: " << &device_id
+ << ", app_handle: " << &app_handle);
ConnectionSPtr connection;
connections_lock_.AcquireForReading();
ConnectionMap::const_iterator it =
@@ -894,28 +875,28 @@ ConnectionSPtr TransportAdapterImpl::FindPendingConnection(
}
}
connections_lock_.Release();
- LOG4CXX_TRACE(logger_, "exit with Connection: " << connection);
+ SDL_LOG_TRACE("exit with Connection: " << connection);
return connection;
}
DeviceSptr TransportAdapterImpl::FindDevice(const DeviceUID& device_id) const {
- LOG4CXX_TRACE(logger_, "enter. device_id: " << &device_id);
+ SDL_LOG_TRACE("enter. device_id: " << &device_id);
DeviceSptr ret;
sync_primitives::AutoLock locker(devices_mutex_);
- LOG4CXX_DEBUG(logger_, "devices_.size() = " << devices_.size());
+ SDL_LOG_DEBUG("devices_.size() = " << devices_.size());
DeviceMap::const_iterator it = devices_.find(device_id);
if (it != devices_.end()) {
ret = it->second;
} else {
- LOG4CXX_WARN(logger_, "Device " << device_id << " not found.");
+ SDL_LOG_WARN("Device " << device_id << " not found.");
}
- LOG4CXX_TRACE(logger_, "exit with DeviceSptr: " << ret);
+ SDL_LOG_TRACE("exit with DeviceSptr: " << ret);
return ret;
}
void TransportAdapterImpl::ConnectPending(const DeviceUID& device_id,
const ApplicationHandle& app_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
connections_lock_.AcquireForWriting();
ConnectionMap::iterator it_conn =
connections_.find(std::make_pair(device_id, app_handle));
@@ -927,8 +908,8 @@ void TransportAdapterImpl::ConnectPending(const DeviceUID& device_id,
DeviceSptr device = FindDevice(device_id);
if (device.use_count() == 0) {
- LOG4CXX_ERROR(
- logger_, "Unable to find device, cannot set connection pending status");
+ SDL_LOG_ERROR(
+ "Unable to find device, cannot set connection pending status");
return;
} else {
device->set_connection_status(ConnectionStatus::PENDING);
@@ -943,9 +924,8 @@ void TransportAdapterImpl::ConnectPending(const DeviceUID& device_id,
void TransportAdapterImpl::ConnectDone(const DeviceUID& device_id,
const ApplicationHandle& app_handle) {
- LOG4CXX_TRACE(
- logger_,
- "enter. device_id: " << &device_id << ", app_handle: " << &app_handle);
+ SDL_LOG_TRACE("enter. device_id: " << &device_id
+ << ", app_handle: " << &app_handle);
connections_lock_.AcquireForReading();
ConnectionMap::iterator it_conn =
connections_.find(std::make_pair(device_id, app_handle));
@@ -962,7 +942,7 @@ void TransportAdapterImpl::ConnectDone(const DeviceUID& device_id,
}
Store();
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterImpl::ConnectFailed(const DeviceUID& device_handle,
@@ -970,46 +950,52 @@ void TransportAdapterImpl::ConnectFailed(const DeviceUID& device_handle,
const ConnectError& error) {
const DeviceUID device_uid = device_handle;
const ApplicationHandle app_uid = app_handle;
- LOG4CXX_TRACE(logger_,
- "enter. device_id: " << &device_uid << ", app_handle: "
+ SDL_LOG_TRACE("enter. device_id: " << &device_uid << ", app_handle: "
<< &app_uid << ", error: " << &error);
- connections_lock_.AcquireForWriting();
- connections_.erase(std::make_pair(device_uid, app_uid));
- connections_lock_.Release();
+ RemoveConnection(device_uid, app_uid);
for (TransportAdapterListenerList::iterator it = listeners_.begin();
it != listeners_.end();
++it) {
(*it)->OnConnectFailed(this, device_uid, app_uid, error);
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterImpl::RemoveFinalizedConnection(
const DeviceUID& device_handle, const ApplicationHandle& app_handle) {
const DeviceUID device_uid = device_handle;
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
{
- sync_primitives::AutoWriteLock lock(connections_lock_);
+ connections_lock_.AcquireForWriting();
auto it_conn = connections_.find(std::make_pair(device_uid, app_handle));
if (connections_.end() == it_conn) {
- LOG4CXX_WARN(logger_,
- "Device_id: " << &device_uid << ", app_handle: "
+ SDL_LOG_WARN("Device_id: " << &device_uid << ", app_handle: "
<< &app_handle << " connection not found");
+ connections_lock_.Release();
return;
}
const ConnectionInfo& info = it_conn->second;
if (ConnectionInfo::FINALISING != info.state) {
- LOG4CXX_WARN(logger_,
- "Device_id: " << &device_uid << ", app_handle: "
+ SDL_LOG_WARN("Device_id: " << &device_uid << ", app_handle: "
<< &app_handle << " connection not finalized");
+ connections_lock_.Release();
return;
}
+ // By copying the info.connection shared pointer into this local variable,
+ // we can delay the connection's destructor until after
+ // connections_lock_.Release.
+ SDL_LOG_DEBUG(
+ "RemoveFinalizedConnection copying connection with Device_id: "
+ << &device_uid << ", app_handle: " << &app_handle);
+ ConnectionSPtr connection = info.connection;
connections_.erase(it_conn);
+ connections_lock_.Release();
+ SDL_LOG_DEBUG("RemoveFinalizedConnection Connections Lock Released");
}
DeviceSptr device = FindDevice(device_handle);
if (!device) {
- LOG4CXX_WARN(logger_, "Device: uid " << &device_uid << " not found");
+ SDL_LOG_WARN("Device: uid " << &device_uid << " not found");
return;
}
@@ -1019,34 +1005,55 @@ void TransportAdapterImpl::RemoveFinalizedConnection(
}
}
+void TransportAdapterImpl::RemoveConnection(
+ const DeviceUID& device_id, const ApplicationHandle& app_handle) {
+ SDL_LOG_AUTO_TRACE();
+ ConnectionSPtr connection;
+ connections_lock_.AcquireForWriting();
+ ConnectionMap::const_iterator it =
+ connections_.find(std::make_pair(device_id, app_handle));
+ if (it != connections_.end()) {
+ // By copying the connection from the map to this shared pointer,
+ // we can erase the object from the map without triggering the destructor
+ SDL_LOG_DEBUG("Copying connection with Device_id: "
+ << &device_id << ", app_handle: " << &app_handle);
+ connection = it->second.connection;
+ connections_.erase(it);
+ }
+ connections_lock_.Release();
+ SDL_LOG_DEBUG("Connections Lock Released");
+
+ // And now, "connection" goes out of scope, triggering the destructor outside
+ // of the "connections_lock_"
+}
+
void TransportAdapterImpl::AddListener(TransportAdapterListener* listener) {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
listeners_.push_back(listener);
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
ApplicationList TransportAdapterImpl::GetApplicationList(
const DeviceUID& device_id) const {
- LOG4CXX_TRACE(logger_, "enter. device_id: " << &device_id);
+ SDL_LOG_TRACE("enter. device_id: " << &device_id);
DeviceSptr device = FindDevice(device_id);
if (device.use_count() != 0) {
ApplicationList lst = device->GetApplicationList();
- LOG4CXX_TRACE(logger_,
- "exit with ApplicationList. It's size = "
- << lst.size() << " Condition: device.use_count() != 0");
+ SDL_LOG_TRACE("exit with ApplicationList. It's size = "
+ << lst.size() << " Condition: device.use_count() != 0");
return lst;
}
- LOG4CXX_TRACE(logger_,
- "exit with empty ApplicationList. Condition: NOT "
- "device.use_count() != 0");
+ SDL_LOG_TRACE(
+ "exit with empty ApplicationList. Condition: NOT "
+ "device.use_count() != 0");
return ApplicationList();
}
void TransportAdapterImpl::ConnectionFinished(
const DeviceUID& device_id, const ApplicationHandle& app_handle) {
- LOG4CXX_TRACE(
- logger_,
- "enter. device_id: " << &device_id << ", app_handle: " << &app_handle);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_TRACE("enter. device_id: " << &device_id
+ << ", app_handle: " << &app_handle);
connections_lock_.AcquireForReading();
ConnectionMap::iterator it =
connections_.find(std::make_pair(device_id, app_handle));
@@ -1061,6 +1068,7 @@ void TransportAdapterImpl::ConnectionAborted(
const DeviceUID& device_id,
const ApplicationHandle& app_handle,
const CommunicationError& error) {
+ SDL_LOG_AUTO_TRACE();
ConnectionFinished(device_id, app_handle);
for (TransportAdapterListenerList::iterator it = listeners_.begin();
it != listeners_.end();
@@ -1070,32 +1078,32 @@ void TransportAdapterImpl::ConnectionAborted(
}
bool TransportAdapterImpl::IsInitialised() const {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
if (!initialised_) {
- LOG4CXX_TRACE(logger_, "exit with FALSE. Condition: !initialised_");
+ SDL_LOG_TRACE("exit with FALSE. Condition: !initialised_");
return false;
}
if (device_scanner_ && !device_scanner_->IsInitialised()) {
- LOG4CXX_TRACE(logger_,
- "exit with FALSE. Condition: device_scanner_ && "
- "!device_scanner_->IsInitialised()");
+ SDL_LOG_TRACE(
+ "exit with FALSE. Condition: device_scanner_ && "
+ "!device_scanner_->IsInitialised()");
return false;
}
if (server_connection_factory_ &&
!server_connection_factory_->IsInitialised()) {
- LOG4CXX_TRACE(logger_,
- "exit with FALSE. Condition: server_connection_factory_ && "
- "!server_connection_factory_->IsInitialised()");
+ SDL_LOG_TRACE(
+ "exit with FALSE. Condition: server_connection_factory_ && "
+ "!server_connection_factory_->IsInitialised()");
return false;
}
if (client_connection_listener_ &&
!client_connection_listener_->IsInitialised()) {
- LOG4CXX_TRACE(logger_,
- "exit with FALSE. Condition: client_connection_listener_ && "
- "!client_connection_listener_->IsInitialised()");
+ SDL_LOG_TRACE(
+ "exit with FALSE. Condition: client_connection_listener_ && "
+ "!client_connection_listener_->IsInitialised()");
return false;
}
- LOG4CXX_TRACE(logger_, "exit with TRUE");
+ SDL_LOG_TRACE("exit with TRUE");
return true;
}
@@ -1109,7 +1117,7 @@ std::string TransportAdapterImpl::DeviceName(const DeviceUID& device_id) const {
}
void TransportAdapterImpl::StopDevice(const DeviceUID& device_id) const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DeviceSptr device = FindDevice(device_id);
if (device) {
device->Stop();
@@ -1121,7 +1129,7 @@ std::string TransportAdapterImpl::GetConnectionType() const {
}
SwitchableDevices TransportAdapterImpl::GetSwitchableDevices() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
SwitchableDevices devices;
sync_primitives::AutoLock locker(devices_mutex_);
for (DeviceMap::const_iterator it = devices_.begin(); it != devices_.end();
@@ -1130,15 +1138,13 @@ SwitchableDevices TransportAdapterImpl::GetSwitchableDevices() const {
const auto device = it->second;
const auto transport_switch_id = device->transport_switch_id();
if (transport_switch_id.empty()) {
- LOG4CXX_DEBUG(logger_,
- "Device is not suitable for switching: " << device_uid);
+ SDL_LOG_DEBUG("Device is not suitable for switching: " << device_uid);
continue;
}
- LOG4CXX_DEBUG(logger_, "Device is suitable for switching: " << device_uid);
+ SDL_LOG_DEBUG("Device is suitable for switching: " << device_uid);
devices.insert(std::make_pair(device_uid, transport_switch_id));
}
- LOG4CXX_INFO(logger_,
- "Found number of switchable devices: " << devices.size());
+ SDL_LOG_INFO("Found number of switchable devices: " << devices.size());
return devices;
}
@@ -1165,14 +1171,14 @@ bool TransportAdapterImpl::ToBeAutoConnected(DeviceSptr device) const {
}
bool TransportAdapterImpl::ToBeAutoDisconnected(DeviceSptr device) const {
+ SDL_LOG_AUTO_TRACE();
return true;
}
ConnectionSPtr TransportAdapterImpl::FindEstablishedConnection(
const DeviceUID& device_id, const ApplicationHandle& app_handle) const {
- LOG4CXX_TRACE(
- logger_,
- "enter. device_id: " << &device_id << ", app_handle: " << &app_handle);
+ SDL_LOG_TRACE("enter. device_id: " << &device_id
+ << ", app_handle: " << &app_handle);
ConnectionSPtr connection;
connections_lock_.AcquireForReading();
ConnectionMap::const_iterator it =
@@ -1184,59 +1190,55 @@ ConnectionSPtr TransportAdapterImpl::FindEstablishedConnection(
}
}
connections_lock_.Release();
- LOG4CXX_TRACE(logger_, "exit with Connection: " << connection);
+ SDL_LOG_TRACE("exit with Connection: " << connection);
return connection;
}
TransportAdapter::Error TransportAdapterImpl::ConnectDevice(DeviceSptr device) {
- LOG4CXX_TRACE(logger_, "enter. device: " << device);
+ SDL_LOG_TRACE("enter. device: " << device);
DeviceUID device_id = device->unique_device_id();
ApplicationList app_list = device->GetApplicationList();
- LOG4CXX_INFO(logger_,
- "Device " << device->name() << " has " << app_list.size()
+ SDL_LOG_INFO("Device " << device->name() << " has " << app_list.size()
<< " applications.");
bool errors_occurred = false;
for (ApplicationList::iterator it = app_list.begin(); it != app_list.end();
++it) {
const ApplicationHandle app_handle = *it;
- LOG4CXX_DEBUG(logger_,
- "Attempt to connect device " << device_id << ", channel "
+ SDL_LOG_DEBUG("Attempt to connect device " << device_id << ", channel "
<< app_handle);
const Error error = Connect(device_id, app_handle);
switch (error) {
case OK:
- LOG4CXX_DEBUG(logger_, "error = OK");
+ SDL_LOG_DEBUG("error = OK");
break;
case ALREADY_EXISTS:
- LOG4CXX_DEBUG(logger_, "error = ALREADY_EXISTS");
+ SDL_LOG_DEBUG("error = ALREADY_EXISTS");
break;
default:
- LOG4CXX_ERROR(logger_,
- "Connect to device " << device_id << ", channel "
+ SDL_LOG_ERROR("Connect to device " << device_id << ", channel "
<< app_handle
<< " failed with error " << error);
errors_occurred = true;
- LOG4CXX_DEBUG(logger_, "switch (error), default case");
+ SDL_LOG_DEBUG("switch (error), default case");
break;
}
}
if (errors_occurred) {
- LOG4CXX_TRACE(logger_, "exit with error:FAIL");
+ SDL_LOG_TRACE("exit with error:FAIL");
return FAIL;
} else {
- LOG4CXX_TRACE(logger_, "exit with error:OK");
+ SDL_LOG_TRACE("exit with error:OK");
return OK;
}
}
void TransportAdapterImpl::RunAppOnDevice(const DeviceUID& device_uid,
const std::string& bundle_id) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DeviceSptr device = FindDevice(device_uid);
if (!device) {
- LOG4CXX_WARN(logger_,
- "Device with id: " << device_uid << " Not found"
+ SDL_LOG_WARN("Device with id: " << device_uid << " Not found"
<< "withing list of connected deviced");
return;
}
@@ -1245,8 +1247,8 @@ void TransportAdapterImpl::RunAppOnDevice(const DeviceUID& device_uid,
}
void TransportAdapterImpl::RemoveDevice(const DeviceUID& device_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Remove Device_handle: " << &device_handle);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Remove Device_handle: " << &device_handle);
sync_primitives::AutoLock locker(devices_mutex_);
DeviceMap::iterator i = devices_.find(device_handle);
if (i != devices_.end()) {
diff --git a/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc b/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc
index bf2d3dbdf4..1d07e01c7a 100644
--- a/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc
+++ b/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc
@@ -39,7 +39,7 @@
#include "transport_manager/transport_manager_impl.h"
namespace transport_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
TransportAdapterListenerImpl::TransportAdapterListenerImpl(
TransportManager* manager, TransportAdapter* adapter)
@@ -47,7 +47,7 @@ TransportAdapterListenerImpl::TransportAdapterListenerImpl(
void TransportAdapterListenerImpl::OnSearchDeviceDone(
const TransportAdapter* adapter) {
- LOG4CXX_TRACE(logger_, "enter. adapter* " << adapter);
+ SDL_LOG_TRACE("enter. adapter* " << adapter);
const TransportAdapterEvent event(EventTypeEnum::ON_SEARCH_DONE,
transport_adapter_,
"",
@@ -57,15 +57,14 @@ void TransportAdapterListenerImpl::OnSearchDeviceDone(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterListenerImpl::OnSearchDeviceFailed(
const TransportAdapter* adapter, const SearchDeviceError& error) {
- LOG4CXX_TRACE(logger_,
- "enter. adapter: " << adapter << ", error: " << &error);
+ SDL_LOG_TRACE("enter. adapter: " << adapter << ", error: " << &error);
SearchDeviceError* err = new SearchDeviceError(error);
const TransportAdapterEvent event(EventTypeEnum::ON_SEARCH_FAIL,
transport_adapter_,
@@ -76,14 +75,14 @@ void TransportAdapterListenerImpl::OnSearchDeviceFailed(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterListenerImpl::OnDeviceListUpdated(
const TransportAdapter* adapter) {
- LOG4CXX_TRACE(logger_, "enter. adapter* " << adapter);
+ SDL_LOG_TRACE("enter. adapter* " << adapter);
const TransportAdapterEvent event(EventTypeEnum::ON_DEVICE_LIST_UPDATED,
transport_adapter_,
"",
@@ -93,14 +92,14 @@ void TransportAdapterListenerImpl::OnDeviceListUpdated(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterListenerImpl::OnFindNewApplicationsRequest(
const TransportAdapter* adapter) {
- LOG4CXX_TRACE(logger_, "enter. adapter* " << adapter);
+ SDL_LOG_TRACE("enter. adapter* " << adapter);
const TransportAdapterEvent event(
EventTypeEnum::ON_FIND_NEW_APPLICATIONS_REQUEST,
transport_adapter_,
@@ -111,14 +110,14 @@ void TransportAdapterListenerImpl::OnFindNewApplicationsRequest(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterListenerImpl::OnConnectionStatusUpdated(
const TransportAdapter* adapter) {
- LOG4CXX_TRACE(logger_, "enter. adapter* " << adapter);
+ SDL_LOG_TRACE("enter. adapter* " << adapter);
const TransportAdapterEvent event(EventTypeEnum::ON_CONNECTION_STATUS_UPDATED,
transport_adapter_,
"",
@@ -128,17 +127,16 @@ void TransportAdapterListenerImpl::OnConnectionStatusUpdated(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterListenerImpl::OnConnectPending(
const TransportAdapter* adapter,
const DeviceUID& device,
const ApplicationHandle& application_id) {
- LOG4CXX_TRACE(logger_,
- "enter adapter*: " << adapter << ", device: " << &device
+ SDL_LOG_TRACE("enter adapter*: " << adapter << ", device: " << &device
<< ", application_id: " << &application_id);
const TransportAdapterEvent event(EventTypeEnum::ON_CONNECT_PENDING,
transport_adapter_,
@@ -149,17 +147,16 @@ void TransportAdapterListenerImpl::OnConnectPending(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterListenerImpl::OnConnectDone(
const TransportAdapter* adapter,
const DeviceUID& device,
const ApplicationHandle& application_id) {
- LOG4CXX_TRACE(logger_,
- "enter adapter*: " << adapter << ", device: " << &device
+ SDL_LOG_TRACE("enter adapter*: " << adapter << ", device: " << &device
<< ", application_id: " << &application_id);
const TransportAdapterEvent event(EventTypeEnum::ON_CONNECT_DONE,
transport_adapter_,
@@ -170,9 +167,9 @@ void TransportAdapterListenerImpl::OnConnectDone(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterListenerImpl::OnConnectFailed(
@@ -180,8 +177,7 @@ void TransportAdapterListenerImpl::OnConnectFailed(
const DeviceUID& device,
const ApplicationHandle& app_id,
const ConnectError& error) {
- LOG4CXX_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
+ SDL_LOG_TRACE("enter. adapter: " << adapter << ", device: " << &device
<< ", application_id: " << &app_id
<< ", error: " << &error);
ConnectError* err = new ConnectError(error);
@@ -194,17 +190,17 @@ void TransportAdapterListenerImpl::OnConnectFailed(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterListenerImpl::OnDisconnectDone(
const TransportAdapter* adapter,
const DeviceUID& device,
const ApplicationHandle& app_id) {
- LOG4CXX_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_TRACE("enter. adapter: " << adapter << ", device: " << &device
<< ", application_id: " << &app_id);
const TransportAdapterEvent event(EventTypeEnum::ON_DISCONNECT_DONE,
transport_adapter_,
@@ -215,9 +211,9 @@ void TransportAdapterListenerImpl::OnDisconnectDone(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterListenerImpl::OnDisconnectFailed(
@@ -225,8 +221,7 @@ void TransportAdapterListenerImpl::OnDisconnectFailed(
const DeviceUID& device,
const ApplicationHandle& app_id,
const DisconnectError& error) {
- LOG4CXX_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
+ SDL_LOG_TRACE("enter. adapter: " << adapter << ", device: " << &device
<< ", application_id: " << &app_id
<< ", error: " << &error);
DisconnectError* err = new DisconnectError(error);
@@ -239,13 +234,15 @@ void TransportAdapterListenerImpl::OnDisconnectFailed(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterListenerImpl::OnDisconnectDeviceDone(
- const TransportAdapter* adapter, const DeviceUID& device) {}
+ const TransportAdapter* adapter, const DeviceUID& device) {
+ SDL_LOG_AUTO_TRACE();
+}
void TransportAdapterListenerImpl::OnDisconnectDeviceFailed(
const TransportAdapter* adapter,
@@ -257,8 +254,7 @@ void TransportAdapterListenerImpl::OnDataReceiveDone(
const DeviceUID& device,
const ApplicationHandle& app_id,
const ::protocol_handler::RawMessagePtr data_container) {
- LOG4CXX_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
+ SDL_LOG_TRACE("enter. adapter: " << adapter << ", device: " << &device
<< ", application_id: " << &app_id
<< ", data_container: " << data_container);
const TransportAdapterEvent event(EventTypeEnum::ON_RECEIVED_DONE,
@@ -270,9 +266,9 @@ void TransportAdapterListenerImpl::OnDataReceiveDone(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterListenerImpl::OnDataReceiveFailed(
@@ -280,8 +276,7 @@ void TransportAdapterListenerImpl::OnDataReceiveFailed(
const DeviceUID& device,
const ApplicationHandle& app_id,
const DataReceiveError& error) {
- LOG4CXX_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
+ SDL_LOG_TRACE("enter. adapter: " << adapter << ", device: " << &device
<< ", application_id: " << &app_id
<< ", error: " << &error);
DataReceiveError* err = new DataReceiveError(error);
@@ -294,9 +289,9 @@ void TransportAdapterListenerImpl::OnDataReceiveFailed(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterListenerImpl::OnDataSendDone(
@@ -304,8 +299,7 @@ void TransportAdapterListenerImpl::OnDataSendDone(
const DeviceUID& device,
const ApplicationHandle& app_id,
const ::protocol_handler::RawMessagePtr data_container) {
- LOG4CXX_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
+ SDL_LOG_TRACE("enter. adapter: " << adapter << ", device: " << &device
<< ", application_id: " << &app_id
<< ", data_container: " << data_container);
const TransportAdapterEvent event(EventTypeEnum::ON_SEND_DONE,
@@ -317,9 +311,9 @@ void TransportAdapterListenerImpl::OnDataSendDone(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterListenerImpl::OnDataSendFailed(
@@ -328,8 +322,7 @@ void TransportAdapterListenerImpl::OnDataSendFailed(
const ApplicationHandle& app_id,
const ::protocol_handler::RawMessagePtr data_container,
const DataSendError& error) {
- LOG4CXX_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
+ SDL_LOG_TRACE("enter. adapter: " << adapter << ", device: " << &device
<< ", application_id: " << &app_id
<< ", data_container: " << data_container
<< ", error: " << &error);
@@ -343,9 +336,9 @@ void TransportAdapterListenerImpl::OnDataSendFailed(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterListenerImpl::OnConnectRequested(
@@ -358,8 +351,7 @@ void TransportAdapterListenerImpl::OnUnexpectedDisconnect(
const DeviceUID& device,
const ApplicationHandle& application,
const CommunicationError& error) {
- LOG4CXX_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
+ SDL_LOG_TRACE("enter. adapter: " << adapter << ", device: " << &device
<< ", application: " << &application
<< ", error: " << &error);
CommunicationError* err = new CommunicationError(error);
@@ -372,17 +364,16 @@ void TransportAdapterListenerImpl::OnUnexpectedDisconnect(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterListenerImpl::OnCommunicationError(
const TransportAdapter* adapter,
const DeviceUID& device,
const ApplicationHandle& app_id) {
- LOG4CXX_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
+ SDL_LOG_TRACE("enter. adapter: " << adapter << ", device: " << &device
<< ", application_id: " << &app_id);
const TransportAdapterEvent event(EventTypeEnum::ON_COMMUNICATION_ERROR,
transport_adapter_,
@@ -393,14 +384,14 @@ void TransportAdapterListenerImpl::OnCommunicationError(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportAdapterListenerImpl::OnTransportSwitchRequested(
const transport_adapter::TransportAdapter* adapter) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const TransportAdapterEvent event(
EventTypeEnum::ON_TRANSPORT_SWITCH_REQUESTED,
transport_adapter_,
@@ -411,13 +402,13 @@ void TransportAdapterListenerImpl::OnTransportSwitchRequested(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
}
void TransportAdapterListenerImpl::OnTransportConfigUpdated(
const transport_adapter::TransportAdapter* adapter) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const TransportAdapterEvent event(EventTypeEnum::ON_TRANSPORT_CONFIG_UPDATED,
transport_adapter_,
@@ -429,7 +420,7 @@ void TransportAdapterListenerImpl::OnTransportConfigUpdated(
if (transport_manager_ != NULL &&
transport_manager::E_SUCCESS !=
transport_manager_->ReceiveEventFromDevice(event)) {
- LOG4CXX_WARN(logger_, "Failed to receive event from device");
+ SDL_LOG_WARN("Failed to receive event from device");
}
}
diff --git a/src/components/transport_manager/src/transport_manager_default.cc b/src/components/transport_manager/src/transport_manager_default.cc
index 74c5b9ceee..45d0b04528 100644
--- a/src/components/transport_manager/src/transport_manager_default.cc
+++ b/src/components/transport_manager/src/transport_manager_default.cc
@@ -57,7 +57,7 @@
#endif // ENABLE_IAP2EMULATION
namespace transport_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
TransportAdapterFactory::TransportAdapterFactory() {
#ifdef BLUETOOTH_SUPPORT
@@ -104,11 +104,11 @@ TransportManagerDefault::TransportManagerDefault(
int TransportManagerDefault::Init(
resumption::LastStateWrapperPtr last_state_wrapper) {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
if (E_SUCCESS != TransportManagerImpl::Init(last_state_wrapper)) {
- LOG4CXX_TRACE(logger_,
- "exit with E_TM_IS_NOT_INITIALIZED. Condition: E_SUCCESS != "
- "TransportManagerImpl::Init()");
+ SDL_LOG_TRACE(
+ "exit with E_TM_IS_NOT_INITIALIZED. Condition: E_SUCCESS != "
+ "TransportManagerImpl::Init()");
return E_TM_IS_NOT_INITIALIZED;
}
@@ -186,7 +186,7 @@ int TransportManagerDefault::Init(
AddTransportAdapter(iap2_usb_emu_adapter);
#endif // ENABLE_IAP2EMULATION
- LOG4CXX_TRACE(logger_, "exit with E_SUCCESS");
+ SDL_LOG_TRACE("exit with E_SUCCESS");
return E_SUCCESS;
}
diff --git a/src/components/transport_manager/src/transport_manager_impl.cc b/src/components/transport_manager/src/transport_manager_impl.cc
index ddff4f3780..ee6398db44 100644
--- a/src/components/transport_manager/src/transport_manager_impl.cc
+++ b/src/components/transport_manager/src/transport_manager_impl.cc
@@ -76,19 +76,18 @@ struct ConnectionFinder {
namespace transport_manager {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
TransportManagerImpl::Connection TransportManagerImpl::convert(
const TransportManagerImpl::ConnectionInternal& p) {
- LOG4CXX_TRACE(logger_, "enter. ConnectionInternal: " << &p);
+ SDL_LOG_TRACE("enter. ConnectionInternal: " << &p);
TransportManagerImpl::Connection c;
c.application = p.application;
c.device = p.device;
c.id = p.id;
- LOG4CXX_TRACE(
- logger_,
+ SDL_LOG_TRACE(
"exit with TransportManagerImpl::Connection. It's ConnectionUID = "
- << c.id);
+ << c.id);
return c;
}
@@ -113,11 +112,11 @@ TransportManagerImpl::TransportManagerImpl(
"",
webengine_constants::kWebEngineDeviceName,
webengine_constants::kWebEngineConnectionType) {
- LOG4CXX_TRACE(logger_, "TransportManager has created");
+ SDL_LOG_TRACE("TransportManager has created");
}
TransportManagerImpl::~TransportManagerImpl() {
- LOG4CXX_DEBUG(logger_, "TransportManager object destroying");
+ SDL_LOG_DEBUG("TransportManager object destroying");
message_queue_.Shutdown();
event_queue_.Shutdown();
@@ -135,11 +134,11 @@ TransportManagerImpl::~TransportManagerImpl() {
delete it->second;
}
- LOG4CXX_INFO(logger_, "TransportManager object destroyed");
+ SDL_LOG_INFO("TransportManager object destroyed");
}
void TransportManagerImpl::ReconnectionTimeout() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
RaiseEvent(&TransportManagerListener::OnDeviceSwitchingFinish,
device_to_reconnect_);
}
@@ -148,7 +147,7 @@ void TransportManagerImpl::AddCloudDevice(
const transport_manager::transport_adapter::CloudAppProperties&
cloud_properties) {
#if !defined(CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT)
- LOG4CXX_TRACE(logger_, "Cloud app support is disabled. Exiting function");
+ SDL_LOG_TRACE("Cloud app support is disabled. Exiting function");
#else
transport_adapter::DeviceType type = transport_adapter::DeviceType::UNKNOWN;
if (cloud_properties.cloud_transport_type == "WS") {
@@ -179,7 +178,7 @@ void TransportManagerImpl::AddCloudDevice(
void TransportManagerImpl::RemoveCloudDevice(const DeviceHandle device_handle) {
#if !defined(CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT)
- LOG4CXX_TRACE(logger_, "Cloud app support is disabled. Exiting function");
+ SDL_LOG_TRACE("Cloud app support is disabled. Exiting function");
return;
#else
DisconnectDevice(device_handle);
@@ -187,30 +186,29 @@ void TransportManagerImpl::RemoveCloudDevice(const DeviceHandle device_handle) {
}
int TransportManagerImpl::ConnectDevice(const DeviceHandle device_handle) {
- LOG4CXX_TRACE(logger_, "enter. DeviceHandle: " << &device_handle);
+ SDL_LOG_TRACE("enter. DeviceHandle: " << &device_handle);
if (!this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TransportManager is not initialized.");
- LOG4CXX_TRACE(
- logger_,
+ SDL_LOG_ERROR("TransportManager is not initialized.");
+ SDL_LOG_TRACE(
"exit with E_TM_IS_NOT_INITIALIZED. Condition: !this->is_initialized_");
return E_TM_IS_NOT_INITIALIZED;
}
DeviceUID device_id = converter_.HandleToUid(device_handle);
- LOG4CXX_DEBUG(logger_, "Convert handle to id:" << device_id);
+ SDL_LOG_DEBUG("Convert handle to id:" << device_id);
sync_primitives::AutoReadLock lock(device_to_adapter_map_lock_);
DeviceToAdapterMap::iterator it = device_to_adapter_map_.find(device_id);
if (it == device_to_adapter_map_.end()) {
- LOG4CXX_ERROR(logger_, "No device adapter found by id " << device_id);
- LOG4CXX_TRACE(logger_, "exit with E_INVALID_HANDLE. Condition: NULL == ta");
+ SDL_LOG_ERROR("No device adapter found by id " << device_id);
+ SDL_LOG_TRACE("exit with E_INVALID_HANDLE. Condition: NULL == ta");
return E_INVALID_HANDLE;
}
transport_adapter::TransportAdapter* ta = it->second;
TransportAdapter::Error ta_error = ta->ConnectDevice(device_id);
int err = (TransportAdapter::OK == ta_error) ? E_SUCCESS : E_INTERNAL_ERROR;
- LOG4CXX_TRACE(logger_, "exit with error: " << err);
+ SDL_LOG_TRACE("exit with error: " << err);
return err;
}
@@ -222,8 +220,8 @@ ConnectionStatus TransportManagerImpl::GetConnectionStatus(
DeviceToAdapterMap::const_iterator it =
device_to_adapter_map_.find(device_id);
if (it == device_to_adapter_map_.end()) {
- LOG4CXX_ERROR(logger_, "No device adapter found by id " << device_handle);
- LOG4CXX_TRACE(logger_, "exit with E_INVALID_HANDLE. Condition: NULL == ta");
+ SDL_LOG_ERROR("No device adapter found by id " << device_handle);
+ SDL_LOG_TRACE("exit with E_INVALID_HANDLE. Condition: NULL == ta");
return ConnectionStatus::INVALID;
}
transport_adapter::TransportAdapter* ta = it->second;
@@ -231,36 +229,34 @@ ConnectionStatus TransportManagerImpl::GetConnectionStatus(
}
int TransportManagerImpl::DisconnectDevice(const DeviceHandle device_handle) {
- LOG4CXX_TRACE(logger_, "enter. DeviceHandle: " << &device_handle);
+ SDL_LOG_TRACE("enter. DeviceHandle: " << &device_handle);
if (!this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TransportManager is not initialized.");
- LOG4CXX_TRACE(
- logger_,
+ SDL_LOG_ERROR("TransportManager is not initialized.");
+ SDL_LOG_TRACE(
"exit with E_TM_IS_NOT_INITIALIZED. Condition: !this->is_initialized_");
return E_TM_IS_NOT_INITIALIZED;
}
DeviceUID device_id = converter_.HandleToUid(device_handle);
- LOG4CXX_DEBUG(logger_, "Convert handle to id:" << device_id);
+ SDL_LOG_DEBUG("Convert handle to id:" << device_id);
sync_primitives::AutoReadLock lock(device_to_adapter_map_lock_);
DeviceToAdapterMap::iterator it = device_to_adapter_map_.find(device_id);
if (it == device_to_adapter_map_.end()) {
- LOG4CXX_WARN(logger_, "No device adapter found by id " << device_id);
- LOG4CXX_TRACE(logger_, "exit with E_INVALID_HANDLE. Condition: NULL == ta");
+ SDL_LOG_WARN("No device adapter found by id " << device_id);
+ SDL_LOG_TRACE("exit with E_INVALID_HANDLE. Condition: NULL == ta");
return E_INVALID_HANDLE;
}
transport_adapter::TransportAdapter* ta = it->second;
ta->DisconnectDevice(device_id);
- LOG4CXX_TRACE(logger_, "exit with E_SUCCESS");
+ SDL_LOG_TRACE("exit with E_SUCCESS");
return E_SUCCESS;
}
int TransportManagerImpl::Disconnect(const ConnectionUID cid) {
- LOG4CXX_TRACE(logger_, "enter. ConnectionUID: " << &cid);
+ SDL_LOG_TRACE("enter. ConnectionUID: " << &cid);
if (!this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TransportManager is not initialized.");
- LOG4CXX_TRACE(
- logger_,
+ SDL_LOG_ERROR("TransportManager is not initialized.");
+ SDL_LOG_TRACE(
"exit with E_TM_IS_NOT_INITIALIZED. Condition: !this->is_initialized_");
return E_TM_IS_NOT_INITIALIZED;
}
@@ -268,11 +264,9 @@ int TransportManagerImpl::Disconnect(const ConnectionUID cid) {
sync_primitives::AutoReadLock lock(connections_lock_);
ConnectionInternal* connection = GetConnection(cid);
if (NULL == connection) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"TransportManagerImpl::Disconnect: Connection does not exist.");
- LOG4CXX_TRACE(logger_,
- "exit with E_INVALID_HANDLE. Condition: NULL == connection");
+ SDL_LOG_TRACE("exit with E_INVALID_HANDLE. Condition: NULL == connection");
return E_INVALID_HANDLE;
}
@@ -296,51 +290,49 @@ int TransportManagerImpl::Disconnect(const ConnectionUID cid) {
const uint32_t disconnect_timeout =
get_settings().transport_manager_disconnect_timeout();
if (disconnect_timeout > 0) {
- connection->timer->start(disconnect_timeout);
+ connection->timer->Start(disconnect_timeout);
}
} else {
connection->transport_adapter->Disconnect(connection->device,
connection->application);
}
*/
- LOG4CXX_TRACE(logger_, "exit with E_SUCCESS");
+ SDL_LOG_TRACE("exit with E_SUCCESS");
return E_SUCCESS;
}
int TransportManagerImpl::DisconnectForce(const ConnectionUID cid) {
- LOG4CXX_TRACE(logger_, "enter ConnectionUID: " << &cid);
+ SDL_LOG_TRACE("enter ConnectionUID: " << &cid);
if (false == this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TransportManager is not initialized.");
- LOG4CXX_TRACE(logger_,
- "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
- "this->is_initialized_");
+ SDL_LOG_ERROR("TransportManager is not initialized.");
+ SDL_LOG_TRACE(
+ "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
+ "this->is_initialized_");
return E_TM_IS_NOT_INITIALIZED;
}
sync_primitives::AutoReadLock lock(connections_lock_);
const ConnectionInternal* connection = GetConnection(cid);
if (NULL == connection) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"TransportManagerImpl::DisconnectForce: Connection does not exist.");
- LOG4CXX_TRACE(logger_,
- "exit with E_INVALID_HANDLE. Condition: NULL == connection");
+ SDL_LOG_TRACE("exit with E_INVALID_HANDLE. Condition: NULL == connection");
return E_INVALID_HANDLE;
}
connection->transport_adapter->Disconnect(connection->device,
connection->application);
- LOG4CXX_TRACE(logger_, "exit with E_SUCCESS");
+ SDL_LOG_TRACE("exit with E_SUCCESS");
return E_SUCCESS;
}
int TransportManagerImpl::AddEventListener(TransportManagerListener* listener) {
- LOG4CXX_TRACE(logger_, "enter. TransportManagerListener: " << listener);
+ SDL_LOG_TRACE("enter. TransportManagerListener: " << listener);
transport_manager_listener_.push_back(listener);
- LOG4CXX_TRACE(logger_, "exit with E_SUCCESS");
+ SDL_LOG_TRACE("exit with E_SUCCESS");
return E_SUCCESS;
}
void TransportManagerImpl::DisconnectAllDevices() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoReadLock lock(device_list_lock_);
for (DeviceInfoList::iterator i = device_list_.begin();
i != device_list_.end();
@@ -351,7 +343,7 @@ void TransportManagerImpl::DisconnectAllDevices() {
}
void TransportManagerImpl::TerminateAllAdapters() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
for (std::vector<TransportAdapter*>::iterator i = transport_adapters_.begin();
i != transport_adapters_.end();
++i) {
@@ -360,7 +352,7 @@ void TransportManagerImpl::TerminateAllAdapters() {
}
int TransportManagerImpl::InitAllAdapters() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
for (std::vector<TransportAdapter*>::iterator i = transport_adapters_.begin();
i != transport_adapters_.end();
++i) {
@@ -372,9 +364,9 @@ int TransportManagerImpl::InitAllAdapters() {
}
int TransportManagerImpl::Stop() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!is_initialized_) {
- LOG4CXX_WARN(logger_, "TransportManager is not initialized_");
+ SDL_LOG_WARN("TransportManager is not initialized_");
return E_TM_IS_NOT_INITIALIZED;
}
@@ -390,15 +382,14 @@ int TransportManagerImpl::Stop() {
int TransportManagerImpl::SendMessageToDevice(
const ::protocol_handler::RawMessagePtr message) {
- LOG4CXX_TRACE(logger_, "enter. RawMessageSptr: " << message);
- LOG4CXX_INFO(
- logger_,
- "Send message to device called with arguments " << message.get());
+ SDL_LOG_TRACE("enter. RawMessageSptr: " << message);
+ SDL_LOG_INFO("Send message to device called with arguments "
+ << message.get());
if (false == this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TM is not initialized.");
- LOG4CXX_TRACE(logger_,
- "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
- "this->is_initialized_");
+ SDL_LOG_ERROR("TM is not initialized.");
+ SDL_LOG_TRACE(
+ "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
+ "this->is_initialized_");
return E_TM_IS_NOT_INITIALIZED;
}
@@ -407,21 +398,19 @@ int TransportManagerImpl::SendMessageToDevice(
const ConnectionInternal* connection =
GetConnection(message->connection_key());
if (NULL == connection) {
- LOG4CXX_ERROR(logger_,
- "Connection with id " << message->connection_key()
+ SDL_LOG_ERROR("Connection with id " << message->connection_key()
<< " does not exist.");
- LOG4CXX_TRACE(
- logger_, "exit with E_INVALID_HANDLE. Condition: NULL == connection");
+ SDL_LOG_TRACE(
+ "exit with E_INVALID_HANDLE. Condition: NULL == connection");
return E_INVALID_HANDLE;
}
if (connection->shutdown_) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"TransportManagerImpl::Disconnect: Connection is to shut down.");
- LOG4CXX_TRACE(logger_,
- "exit with E_CONNECTION_IS_TO_SHUTDOWN. Condition: "
- "connection->shutDown");
+ SDL_LOG_TRACE(
+ "exit with E_CONNECTION_IS_TO_SHUTDOWN. Condition: "
+ "connection->shutDown");
return E_CONNECTION_IS_TO_SHUTDOWN;
}
}
@@ -431,30 +420,29 @@ int TransportManagerImpl::SendMessageToDevice(
}
#endif // TELEMETRY_MONITOR
this->PostMessage(message);
- LOG4CXX_TRACE(logger_, "exit with E_SUCCESS");
+ SDL_LOG_TRACE("exit with E_SUCCESS");
return E_SUCCESS;
}
void TransportManagerImpl::RunAppOnDevice(const DeviceHandle device_handle,
const std::string& bundle_id) {
if (!this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TransportManager is not initialized.");
+ SDL_LOG_ERROR("TransportManager is not initialized.");
return;
}
DeviceUID device_id = converter_.HandleToUid(device_handle);
- LOG4CXX_DEBUG(logger_, "Convert handle to id:" << device_id);
+ SDL_LOG_DEBUG("Convert handle to id:" << device_id);
sync_primitives::AutoReadLock lock(device_to_adapter_map_lock_);
DeviceToAdapterMap::iterator it = device_to_adapter_map_.find(device_id);
if (it == device_to_adapter_map_.end()) {
- LOG4CXX_ERROR(logger_, "No device adapter found by id " << device_id);
+ SDL_LOG_ERROR("No device adapter found by id " << device_id);
return;
}
transport_adapter::TransportAdapter* ta = it->second;
if (!ta) {
- LOG4CXX_ERROR(logger_,
- "Transport adapter for device: " << device_id << " is NULL");
+ SDL_LOG_ERROR("Transport adapter for device: " << device_id << " is NULL");
return;
}
@@ -465,46 +453,46 @@ void TransportManagerImpl::RunAppOnDevice(const DeviceHandle device_handle,
int TransportManagerImpl::ReceiveEventFromDevice(
const TransportAdapterEvent& event) {
- LOG4CXX_TRACE(logger_, "enter. TransportAdapterEvent: " << &event);
+ SDL_LOG_TRACE("enter. TransportAdapterEvent: " << &event);
if (!is_initialized_) {
- LOG4CXX_ERROR(logger_, "TM is not initialized.");
- LOG4CXX_TRACE(logger_,
- "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
- "this->is_initialized_");
+ SDL_LOG_ERROR("TM is not initialized.");
+ SDL_LOG_TRACE(
+ "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
+ "this->is_initialized_");
return E_TM_IS_NOT_INITIALIZED;
}
this->PostEvent(event);
- LOG4CXX_TRACE(logger_, "exit with E_SUCCESS");
+ SDL_LOG_TRACE("exit with E_SUCCESS");
return E_SUCCESS;
}
int TransportManagerImpl::RemoveDevice(const DeviceHandle device_handle) {
- LOG4CXX_TRACE(logger_, "enter. DeviceHandle: " << &device_handle);
+ SDL_LOG_TRACE("enter. DeviceHandle: " << &device_handle);
DeviceUID device_id = converter_.HandleToUid(device_handle);
if (false == this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TM is not initialized.");
- LOG4CXX_TRACE(logger_,
- "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
- "this->is_initialized_");
+ SDL_LOG_ERROR("TM is not initialized.");
+ SDL_LOG_TRACE(
+ "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
+ "this->is_initialized_");
return E_TM_IS_NOT_INITIALIZED;
}
sync_primitives::AutoWriteLock lock(device_to_adapter_map_lock_);
device_to_adapter_map_.erase(device_id);
- LOG4CXX_TRACE(logger_, "exit with E_SUCCESS");
+ SDL_LOG_TRACE("exit with E_SUCCESS");
return E_SUCCESS;
}
int TransportManagerImpl::AddTransportAdapter(
transport_adapter::TransportAdapter* transport_adapter) {
- LOG4CXX_TRACE(logger_, "enter. TransportAdapter: " << transport_adapter);
+ SDL_LOG_TRACE("enter. TransportAdapter: " << transport_adapter);
if (transport_adapter_listeners_.find(transport_adapter) !=
transport_adapter_listeners_.end()) {
- LOG4CXX_ERROR(logger_, "Adapter already exists.");
- LOG4CXX_TRACE(logger_,
- "exit with E_ADAPTER_EXISTS. Condition: "
- "transport_adapter_listeners_.find(transport_adapter) != "
- "transport_adapter_listeners_.end()");
+ SDL_LOG_ERROR("Adapter already exists.");
+ SDL_LOG_TRACE(
+ "exit with E_ADAPTER_EXISTS. Condition: "
+ "transport_adapter_listeners_.find(transport_adapter) != "
+ "transport_adapter_listeners_.end()");
return E_ADAPTER_EXISTS;
}
@@ -520,21 +508,20 @@ int TransportManagerImpl::AddTransportAdapter(
delete listener;
delete transport_adapter;
}
- LOG4CXX_TRACE(logger_, "exit with E_SUCCESS");
+ SDL_LOG_TRACE("exit with E_SUCCESS");
return E_SUCCESS;
}
int TransportManagerImpl::SearchDevices() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
if (!this->is_initialized_) {
- LOG4CXX_ERROR(logger_, "TM is not initialized");
- LOG4CXX_TRACE(
- logger_,
+ SDL_LOG_ERROR("TM is not initialized");
+ SDL_LOG_TRACE(
"exit with E_TM_IS_NOT_INITIALIZED. Condition: !this->is_initialized_");
return E_TM_IS_NOT_INITIALIZED;
}
- LOG4CXX_INFO(logger_, "Search device called");
+ SDL_LOG_INFO("Search device called");
bool success_occurred = false;
@@ -542,33 +529,29 @@ int TransportManagerImpl::SearchDevices() {
transport_adapters_.begin();
it != transport_adapters_.end();
++it) {
- LOG4CXX_DEBUG(logger_, "Iterating over transport adapters");
+ SDL_LOG_DEBUG("Iterating over transport adapters");
TransportAdapter::Error scanResult = (*it)->SearchDevices();
if (transport_adapter::TransportAdapter::OK == scanResult) {
success_occurred = true;
} else {
- LOG4CXX_ERROR(logger_,
- "Transport Adapter search failed "
- << *it << "[" << (*it)->GetDeviceType() << "]");
+ SDL_LOG_ERROR("Transport Adapter search failed "
+ << *it << "[" << (*it)->GetDeviceType() << "]");
switch (scanResult) {
case transport_adapter::TransportAdapter::NOT_SUPPORTED: {
- LOG4CXX_ERROR(logger_,
- "Search feature is not supported "
- << *it << "[" << (*it)->GetDeviceType() << "]");
- LOG4CXX_DEBUG(logger_,
- "scanResult = TransportAdapter::NOT_SUPPORTED");
+ SDL_LOG_ERROR("Search feature is not supported "
+ << *it << "[" << (*it)->GetDeviceType() << "]");
+ SDL_LOG_DEBUG("scanResult = TransportAdapter::NOT_SUPPORTED");
break;
}
case transport_adapter::TransportAdapter::BAD_STATE: {
- LOG4CXX_ERROR(logger_,
- "Transport Adapter has bad state "
- << *it << "[" << (*it)->GetDeviceType() << "]");
- LOG4CXX_DEBUG(logger_, "scanResult = TransportAdapter::BAD_STATE");
+ SDL_LOG_ERROR("Transport Adapter has bad state "
+ << *it << "[" << (*it)->GetDeviceType() << "]");
+ SDL_LOG_DEBUG("scanResult = TransportAdapter::BAD_STATE");
break;
}
default: {
- LOG4CXX_ERROR(logger_, "Invalid scan result");
- LOG4CXX_DEBUG(logger_, "scanResult = default switch case");
+ SDL_LOG_ERROR("Invalid scan result");
+ SDL_LOG_DEBUG("scanResult = default switch case");
return E_ADAPTERS_FAIL;
}
}
@@ -578,13 +561,13 @@ int TransportManagerImpl::SearchDevices() {
(success_occurred || transport_adapters_.empty()) ? E_SUCCESS
: E_ADAPTERS_FAIL;
if (transport_adapter_search == E_SUCCESS) {
- LOG4CXX_TRACE(logger_,
- "exit with E_SUCCESS. Condition: success_occured || "
- "transport_adapters_.empty()");
+ SDL_LOG_TRACE(
+ "exit with E_SUCCESS. Condition: success_occured || "
+ "transport_adapters_.empty()");
} else {
- LOG4CXX_TRACE(logger_,
- "exit with E_ADAPTERS_FAIL. Condition: success_occured || "
- "transport_adapters_.empty()");
+ SDL_LOG_TRACE(
+ "exit with E_ADAPTERS_FAIL. Condition: success_occured || "
+ "transport_adapters_.empty()");
}
return transport_adapter_search;
}
@@ -593,23 +576,23 @@ int TransportManagerImpl::Init(
resumption::LastStateWrapperPtr last_state_wrapper) {
// Last state wrapper required to initialize Transport adapters
UNUSED(last_state_wrapper);
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
is_initialized_ = true;
- LOG4CXX_TRACE(logger_, "exit with E_SUCCESS");
+ SDL_LOG_TRACE("exit with E_SUCCESS");
return E_SUCCESS;
}
int TransportManagerImpl::Init(resumption::LastState& last_state) {
// Last state required to initialize Transport adapters
UNUSED(last_state);
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
is_initialized_ = true;
- LOG4CXX_TRACE(logger_, "exit with E_SUCCESS");
+ SDL_LOG_TRACE("exit with E_SUCCESS");
return E_SUCCESS;
}
void TransportManagerImpl::Deinit() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DisconnectAllDevices();
TerminateAllAdapters();
device_to_adapter_map_.clear();
@@ -622,27 +605,26 @@ int TransportManagerImpl::Reinit() {
}
void TransportManagerImpl::StopEventsProcessing() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
events_processing_is_active_ = false;
}
void TransportManagerImpl::StartEventsProcessing() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
events_processing_is_active_ = true;
events_processing_cond_var_.Broadcast();
}
int TransportManagerImpl::PerformActionOnClients(
const TransportAction required_action) const {
- LOG4CXX_TRACE(logger_,
- "The following action requested: "
- << static_cast<int>(required_action)
- << " to be performed on connected clients");
+ SDL_LOG_TRACE("The following action requested: "
+ << static_cast<int>(required_action)
+ << " to be performed on connected clients");
if (!is_initialized_) {
- LOG4CXX_ERROR(logger_, "TM is not initialized");
- LOG4CXX_TRACE(logger_,
- "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
- "is_initialized_");
+ SDL_LOG_ERROR("TM is not initialized");
+ SDL_LOG_TRACE(
+ "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
+ "is_initialized_");
return E_TM_IS_NOT_INITIALIZED;
}
@@ -652,22 +634,21 @@ int TransportManagerImpl::PerformActionOnClients(
ret = adapter_ptr->ChangeClientListening(required_action);
if (TransportAdapter::Error::NOT_SUPPORTED == ret) {
- LOG4CXX_DEBUG(logger_,
- "Requested action on client is not supported for adapter "
- << adapter_ptr << "[" << adapter_ptr->GetDeviceType()
- << "]");
+ SDL_LOG_DEBUG("Requested action on client is not supported for adapter "
+ << adapter_ptr << "[" << adapter_ptr->GetDeviceType()
+ << "]");
}
}
- LOG4CXX_TRACE(logger_, "exit with E_SUCCESS");
+ SDL_LOG_TRACE("exit with E_SUCCESS");
return E_SUCCESS;
}
void TransportManagerImpl::CreateWebEngineDevice() {
#ifndef WEBSOCKET_SERVER_TRANSPORT_SUPPORT
- LOG4CXX_TRACE(logger_, "Web engine support is disabled. Exiting function");
+ SDL_LOG_TRACE("Web engine support is disabled. Exiting function");
#else
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
auto web_socket_ta_iterator = std::find_if(
transport_adapters_.begin(),
transport_adapters_.end(),
@@ -677,9 +658,9 @@ void TransportManagerImpl::CreateWebEngineDevice() {
});
if (transport_adapters_.end() == web_socket_ta_iterator) {
- LOG4CXX_WARN(logger_,
- "WebSocketServerTransportAdapter not found."
- "Impossible to create WebEngineDevice");
+ SDL_LOG_WARN(
+ "WebSocketServerTransportAdapter not found."
+ "Impossible to create WebEngineDevice");
return;
}
@@ -688,10 +669,10 @@ void TransportManagerImpl::CreateWebEngineDevice() {
*web_socket_ta_iterator);
if (!web_socket_ta) {
- LOG4CXX_ERROR(logger_,
- "Unable to cast from Transport Adapter to "
- "WebSocketServerTransportAdapter."
- "Impossible to create WebEngineDevice");
+ SDL_LOG_ERROR(
+ "Unable to cast from Transport Adapter to "
+ "WebSocketServerTransportAdapter."
+ "Impossible to create WebEngineDevice");
return;
}
@@ -717,12 +698,12 @@ void TransportManagerImpl::CreateWebEngineDevice() {
}
const DeviceInfo& TransportManagerImpl::GetWebEngineDeviceInfo() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return web_engine_device_info_;
}
bool TransportManagerImpl::UpdateDeviceList(TransportAdapter* ta) {
- LOG4CXX_TRACE(logger_, "enter. TransportAdapter: " << ta);
+ SDL_LOG_TRACE("enter. TransportAdapter: " << ta);
std::set<DeviceInfo> old_devices;
std::set<DeviceInfo> new_devices;
{
@@ -774,20 +755,20 @@ bool TransportManagerImpl::UpdateDeviceList(TransportAdapter* ta) {
RaiseEvent(&TransportManagerListener::OnDeviceRemoved, *it);
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
return added_devices.size() + removed_devices.size() > 0;
}
void TransportManagerImpl::PostMessage(
const ::protocol_handler::RawMessagePtr message) {
- LOG4CXX_TRACE(logger_, "enter. RawMessageSptr: " << message);
+ SDL_LOG_TRACE("enter. RawMessageSptr: " << message);
message_queue_.PostMessage(message);
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportManagerImpl::PostEvent(const TransportAdapterEvent& event) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "TransportAdapterEvent: " << &event);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("TransportAdapterEvent: " << &event);
event_queue_.PostMessage(event);
}
@@ -796,18 +777,18 @@ const TransportManagerSettings& TransportManagerImpl::get_settings() const {
}
void TransportManagerImpl::AddConnection(const ConnectionInternal& c) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "ConnectionInternal: " << &c);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("ConnectionInternal: " << &c);
sync_primitives::AutoWriteLock lock(connections_lock_);
connections_.push_back(c);
}
void TransportManagerImpl::RemoveConnection(
const uint32_t id, transport_adapter::TransportAdapter* transport_adapter) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Id: " << id);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Id: " << id);
sync_primitives::AutoWriteLock lock(connections_lock_);
- LOG4CXX_DEBUG(logger_, "Removing connection with id: " << id);
+ SDL_LOG_DEBUG("Removing connection with id: " << id);
const std::vector<ConnectionInternal>::iterator it = std::find_if(
connections_.begin(), connections_.end(), ConnectionFinder(id));
if (connections_.end() != it) {
@@ -820,11 +801,10 @@ void TransportManagerImpl::RemoveConnection(
void TransportManagerImpl::DeactivateDeviceConnections(
const DeviceUID& device_uid) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoWriteLock lock(connections_lock_);
- LOG4CXX_DEBUG(logger_,
- "Deactivating connections for device with UID: " << device_uid);
+ SDL_LOG_DEBUG("Deactivating connections for device with UID: " << device_uid);
size_t counter = 0;
for (std::vector<ConnectionInternal>::iterator it = connections_.begin();
@@ -835,21 +815,20 @@ void TransportManagerImpl::DeactivateDeviceConnections(
++counter;
}
}
- LOG4CXX_DEBUG(logger_,
- "Deactivated "
- << counter
- << " connections for device with UID: " << device_uid);
+ SDL_LOG_DEBUG("Deactivated "
+ << counter
+ << " connections for device with UID: " << device_uid);
}
TransportManagerImpl::ConnectionInternal* TransportManagerImpl::GetConnection(
const ConnectionUID id) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "ConnectionUID: " << id);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("ConnectionUID: " << id);
for (std::vector<ConnectionInternal>::iterator it = connections_.begin();
it != connections_.end();
++it) {
if (it->id == id) {
- LOG4CXX_DEBUG(logger_, "ConnectionInternal. It's address: " << &*it);
+ SDL_LOG_DEBUG("ConnectionInternal. It's address: " << &*it);
return &*it;
}
}
@@ -858,14 +837,14 @@ TransportManagerImpl::ConnectionInternal* TransportManagerImpl::GetConnection(
TransportManagerImpl::ConnectionInternal* TransportManagerImpl::GetConnection(
const DeviceUID& device, const ApplicationHandle& application) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(
- logger_, "DeviceUID: " << device << "ApplicationHandle: " << application);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("DeviceUID: " << device
+ << "ApplicationHandle: " << application);
for (std::vector<ConnectionInternal>::iterator it = connections_.begin();
it != connections_.end();
++it) {
if (it->device == device && it->application == application) {
- LOG4CXX_DEBUG(logger_, "ConnectionInternal. It's address: " << &*it);
+ SDL_LOG_DEBUG("ConnectionInternal. It's address: " << &*it);
return &*it;
}
}
@@ -875,15 +854,14 @@ TransportManagerImpl::ConnectionInternal* TransportManagerImpl::GetConnection(
TransportManagerImpl::ConnectionInternal*
TransportManagerImpl::GetActiveConnection(
const DeviceUID& device, const ApplicationHandle& application) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(
- logger_,
- "DeviceUID: " << device << " ApplicationHandle: " << application);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("DeviceUID: " << device
+ << " ApplicationHandle: " << application);
for (std::vector<ConnectionInternal>::iterator it = connections_.begin();
it != connections_.end();
++it) {
if (it->device == device && it->application == application && it->active_) {
- LOG4CXX_DEBUG(logger_, "ConnectionInternal. It's address: " << &*it);
+ SDL_LOG_DEBUG("ConnectionInternal. It's address: " << &*it);
return &*it;
}
}
@@ -913,9 +891,9 @@ struct SwitchableFinder {
void TransportManagerImpl::TryDeviceSwitch(
transport_adapter::TransportAdapter* adapter) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (adapter->GetDeviceType() != transport_adapter::DeviceType::IOS_USB) {
- LOG4CXX_ERROR(logger_, "Switching requested not from iAP-USB transport.");
+ SDL_LOG_ERROR("Switching requested not from iAP-USB transport.");
return;
}
@@ -924,9 +902,9 @@ void TransportManagerImpl::TryDeviceSwitch(
IOSBTAdapterFinder());
if (transport_adapters_.end() == ios_bt_adapter) {
- LOG4CXX_WARN(logger_,
- "There is no iAP2 Bluetooth adapter found. Switching is not "
- "possible.");
+ SDL_LOG_WARN(
+ "There is no iAP2 Bluetooth adapter found. Switching is not "
+ "possible.");
return;
}
@@ -946,25 +924,22 @@ void TransportManagerImpl::TryDeviceSwitch(
}
if (bt_switchable_devices.end() == bt) {
- LOG4CXX_WARN(logger_,
- "No suitable for switching iAP2 Bluetooth device found.");
+ SDL_LOG_WARN("No suitable for switching iAP2 Bluetooth device found.");
return;
}
- LOG4CXX_DEBUG(logger_,
- "Found UUID suitable for transport switching: " << bt->second);
- LOG4CXX_DEBUG(
- logger_, "Device to switch from: " << bt->first << " to: " << usb->first);
+ SDL_LOG_DEBUG("Found UUID suitable for transport switching: " << bt->second);
+ SDL_LOG_DEBUG("Device to switch from: " << bt->first
+ << " to: " << usb->first);
sync_primitives::AutoWriteLock lock(device_to_adapter_map_lock_);
const auto bt_device_uid = bt->first;
const auto device_to_switch = device_to_adapter_map_.find(bt_device_uid);
if (device_to_adapter_map_.end() == device_to_switch) {
- LOG4CXX_ERROR(logger_,
- "There is no known device found with UID "
- << bt_device_uid
- << " . Transport switching is not possible.");
+ SDL_LOG_ERROR("There is no known device found with UID "
+ << bt_device_uid
+ << " . Transport switching is not possible.");
DCHECK_OR_RETURN_VOID(false);
return;
}
@@ -973,9 +948,8 @@ void TransportManagerImpl::TryDeviceSwitch(
const auto bt_uid = device_to_switch->first;
const auto bt_adapter = device_to_switch->second;
- LOG4CXX_DEBUG(logger_,
- "Known device with UID "
- << bt_uid << " is appropriate for transport switching.");
+ SDL_LOG_DEBUG("Known device with UID "
+ << bt_uid << " is appropriate for transport switching.");
RaiseEvent(
&TransportManagerListener::OnDeviceSwitchingStart, bt_uid, usb_uid);
@@ -991,21 +965,19 @@ void TransportManagerImpl::TryDeviceSwitch(
get_settings().app_transport_change_timer_addition();
device_switch_timer_.Start(timeout, timer::kSingleShot);
- LOG4CXX_DEBUG(logger_,
- "Device switch for device id " << bt_uid << " is done.");
+ SDL_LOG_DEBUG("Device switch for device id " << bt_uid << " is done.");
return;
}
bool TransportManagerImpl::UpdateDeviceMapping(
transport_adapter::TransportAdapter* ta) {
const DeviceList adapter_device_list = ta->GetDeviceList();
- LOG4CXX_DEBUG(logger_, "DEVICE_LIST_UPDATED " << adapter_device_list.size());
+ SDL_LOG_DEBUG("DEVICE_LIST_UPDATED " << adapter_device_list.size());
sync_primitives::AutoWriteLock lock(device_to_adapter_map_lock_);
- LOG4CXX_DEBUG(logger_,
- "Before cleanup and update. Device map size is "
- << device_to_adapter_map_.size());
+ SDL_LOG_DEBUG("Before cleanup and update. Device map size is "
+ << device_to_adapter_map_.size());
for (auto item = device_to_adapter_map_.begin();
device_to_adapter_map_.end() != item;) {
@@ -1027,9 +999,8 @@ bool TransportManagerImpl::UpdateDeviceMapping(
item = device_to_adapter_map_.begin();
}
- LOG4CXX_DEBUG(
- logger_,
- "After cleanup. Device map size is " << device_to_adapter_map_.size());
+ SDL_LOG_DEBUG("After cleanup. Device map size is "
+ << device_to_adapter_map_.size());
for (DeviceList::const_iterator it = adapter_device_list.begin();
it != adapter_device_list.end();
@@ -1038,8 +1009,7 @@ bool TransportManagerImpl::UpdateDeviceMapping(
const auto result =
device_to_adapter_map_.insert(std::make_pair(device_uid, ta));
if (!result.second) {
- LOG4CXX_WARN(logger_,
- "Device UID " << device_uid
+ SDL_LOG_WARN("Device UID " << device_uid
<< " is known already. Processing skipped."
"Connection type is: "
<< ta->GetConnectionType());
@@ -1054,22 +1024,21 @@ bool TransportManagerImpl::UpdateDeviceMapping(
RaiseEvent(&TransportManagerListener::OnDeviceFound, info);
}
- LOG4CXX_DEBUG(
- logger_,
- "After update. Device map size is " << device_to_adapter_map_.size());
+ SDL_LOG_DEBUG("After update. Device map size is "
+ << device_to_adapter_map_.size());
return true;
}
void TransportManagerImpl::OnDeviceListUpdated(TransportAdapter* ta) {
- LOG4CXX_TRACE(logger_, "enter. TransportAdapter: " << ta);
+ SDL_LOG_TRACE("enter. TransportAdapter: " << ta);
if (!UpdateDeviceMapping(ta)) {
- LOG4CXX_ERROR(logger_, "Device list update failed.");
+ SDL_LOG_ERROR("Device list update failed.");
return;
}
if (!UpdateDeviceList(ta)) {
- LOG4CXX_DEBUG(logger_, "Device list was not changed");
+ SDL_LOG_DEBUG("Device list was not changed");
return;
}
@@ -1082,14 +1051,14 @@ void TransportManagerImpl::OnDeviceListUpdated(TransportAdapter* ta) {
}
device_list_lock_.Release();
RaiseEvent(&TransportManagerListener::OnDeviceListUpdated, device_infos);
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void TransportManagerImpl::Handle(TransportAdapterEvent event) {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
if (!events_processing_is_active_) {
- LOG4CXX_DEBUG(logger_, "Waiting for events handling unlock");
+ SDL_LOG_DEBUG("Waiting for events handling unlock");
sync_primitives::AutoLock auto_lock(events_processing_lock_);
events_processing_cond_var_.Wait(auto_lock);
}
@@ -1097,34 +1066,34 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
switch (event.event_type) {
case EventTypeEnum::ON_SEARCH_DONE: {
RaiseEvent(&TransportManagerListener::OnScanDevicesFinished);
- LOG4CXX_DEBUG(logger_, "event_type = ON_SEARCH_DONE");
+ SDL_LOG_DEBUG("event_type = ON_SEARCH_DONE");
break;
}
case EventTypeEnum::ON_SEARCH_FAIL: {
// error happened in real search process (external error)
RaiseEvent(&TransportManagerListener::OnScanDevicesFailed,
*static_cast<SearchDeviceError*>(event.event_error.get()));
- LOG4CXX_DEBUG(logger_, "event_type = ON_SEARCH_FAIL");
+ SDL_LOG_DEBUG("event_type = ON_SEARCH_FAIL");
break;
}
case EventTypeEnum::ON_DEVICE_LIST_UPDATED: {
OnDeviceListUpdated(event.transport_adapter);
- LOG4CXX_DEBUG(logger_, "event_type = ON_DEVICE_LIST_UPDATED");
+ SDL_LOG_DEBUG("event_type = ON_DEVICE_LIST_UPDATED");
break;
}
case EventTypeEnum::ON_TRANSPORT_SWITCH_REQUESTED: {
TryDeviceSwitch(event.transport_adapter);
- LOG4CXX_DEBUG(logger_, "event_type = ON_TRANSPORT_SWITCH_REQUESTED");
+ SDL_LOG_DEBUG("event_type = ON_TRANSPORT_SWITCH_REQUESTED");
break;
}
case EventTypeEnum::ON_FIND_NEW_APPLICATIONS_REQUEST: {
RaiseEvent(&TransportManagerListener::OnFindNewApplicationsRequest);
- LOG4CXX_DEBUG(logger_, "event_type = ON_FIND_NEW_APPLICATIONS_REQUEST");
+ SDL_LOG_DEBUG("event_type = ON_FIND_NEW_APPLICATIONS_REQUEST");
break;
}
case EventTypeEnum::ON_CONNECTION_STATUS_UPDATED: {
RaiseEvent(&TransportManagerListener::OnConnectionStatusUpdated);
- LOG4CXX_DEBUG(logger_, "event_type = ON_CONNECTION_STATUS_UPDATED");
+ SDL_LOG_DEBUG("event_type = ON_CONNECTION_STATUS_UPDATED");
break;
}
case EventTypeEnum::ON_CONNECT_PENDING: {
@@ -1143,7 +1112,7 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
} else if (it->device_handle_ != device_handle) {
continue;
} else {
- LOG4CXX_DEBUG(logger_, "Connection Object Already Exists");
+ SDL_LOG_DEBUG("Connection Object Already Exists");
connection_id = it->Connection::id;
break;
}
@@ -1166,7 +1135,7 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
event.transport_adapter->DeviceName(event.device_uid),
event.transport_adapter->GetConnectionType()),
connection_id);
- LOG4CXX_DEBUG(logger_, "event_type = ON_CONNECT_PENDING");
+ SDL_LOG_DEBUG("event_type = ON_CONNECT_PENDING");
break;
}
case EventTypeEnum::ON_CONNECT_DONE: {
@@ -1186,7 +1155,7 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
} else if (it->device_handle_ != device_handle) {
continue;
} else {
- LOG4CXX_DEBUG(logger_, "Connection Object Already Exists");
+ SDL_LOG_DEBUG("Connection Object Already Exists");
connection_id = it->Connection::id;
break;
}
@@ -1209,7 +1178,7 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
event.transport_adapter->DeviceName(event.device_uid),
event.transport_adapter->GetConnectionType()),
connection_id);
- LOG4CXX_DEBUG(logger_, "event_type = ON_CONNECT_DONE");
+ SDL_LOG_DEBUG("event_type = ON_CONNECT_DONE");
break;
}
case EventTypeEnum::ON_CONNECT_FAIL: {
@@ -1222,7 +1191,7 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
event.transport_adapter->DeviceName(event.device_uid),
event.transport_adapter->GetConnectionType()),
ConnectError());
- LOG4CXX_DEBUG(logger_, "event_type = ON_CONNECT_FAIL");
+ SDL_LOG_DEBUG("event_type = ON_CONNECT_FAIL");
break;
}
case EventTypeEnum::ON_DISCONNECT_DONE: {
@@ -1230,9 +1199,8 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
ConnectionInternal* connection =
GetConnection(event.device_uid, event.application_id);
if (NULL == connection) {
- LOG4CXX_ERROR(logger_, "Connection not found");
- LOG4CXX_DEBUG(logger_,
- "event_type = ON_DISCONNECT_DONE && NULL == connection");
+ SDL_LOG_ERROR("Connection not found");
+ SDL_LOG_DEBUG("event_type = ON_DISCONNECT_DONE && NULL == connection");
connections_lock_.Release();
break;
}
@@ -1241,7 +1209,7 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
RaiseEvent(&TransportManagerListener::OnConnectionClosed, id);
RemoveConnection(id, connection->transport_adapter);
- LOG4CXX_DEBUG(logger_, "event_type = ON_DISCONNECT_DONE");
+ SDL_LOG_DEBUG("event_type = ON_DISCONNECT_DONE");
break;
}
case EventTypeEnum::ON_DISCONNECT_FAIL: {
@@ -1250,7 +1218,7 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
RaiseEvent(&TransportManagerListener::OnDisconnectFailed,
device_handle,
DisconnectDeviceError());
- LOG4CXX_DEBUG(logger_, "event_type = ON_DISCONNECT_FAIL");
+ SDL_LOG_DEBUG("event_type = ON_DISCONNECT_FAIL");
break;
}
case EventTypeEnum::ON_SEND_DONE: {
@@ -1263,11 +1231,9 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
ConnectionInternal* connection =
GetConnection(event.device_uid, event.application_id);
if (connection == NULL) {
- LOG4CXX_ERROR(logger_,
- "Connection ('" << event.device_uid << ", "
+ SDL_LOG_ERROR("Connection ('" << event.device_uid << ", "
<< event.application_id << ") not found");
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"event_type = ON_SEND_DONE. Condition: NULL == connection");
break;
}
@@ -1277,7 +1243,7 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
connection->transport_adapter->Disconnect(connection->device,
connection->application);
}
- LOG4CXX_DEBUG(logger_, "event_type = ON_SEND_DONE");
+ SDL_LOG_DEBUG("event_type = ON_SEND_DONE");
break;
}
case EventTypeEnum::ON_SEND_FAIL: {
@@ -1291,12 +1257,10 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
ConnectionInternal* connection =
GetConnection(event.device_uid, event.application_id);
if (connection == NULL) {
- LOG4CXX_ERROR(logger_,
- "Connection ('" << event.device_uid << ", "
+ SDL_LOG_ERROR("Connection ('" << event.device_uid << ", "
<< event.application_id
<< ") not found");
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"event_type = ON_SEND_FAIL. Condition: NULL == connection");
break;
}
@@ -1304,15 +1268,11 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
// TODO(YK): start timer here to wait before notify caller
// and remove unsent messages
- LOG4CXX_ERROR(logger_, "Transport adapter failed to send data");
- // TODO(YK): potential error case -> thread unsafe
- // update of message content
- if (event.event_data.use_count() != 0) {
- event.event_data->set_waiting(true);
- } else {
- LOG4CXX_DEBUG(logger_, "Data is invalid");
- }
- LOG4CXX_DEBUG(logger_, "eevent_type = ON_SEND_FAIL");
+ SDL_LOG_ERROR("Transport adapter failed to send data");
+ RaiseEvent(&TransportManagerListener::OnTMMessageSendFailed,
+ DataSendError(),
+ event.event_data);
+ SDL_LOG_DEBUG("event_type = ON_SEND_FAIL");
break;
}
case EventTypeEnum::ON_RECEIVED_DONE: {
@@ -1321,12 +1281,10 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
ConnectionInternal* connection =
GetActiveConnection(event.device_uid, event.application_id);
if (connection == NULL) {
- LOG4CXX_ERROR(logger_,
- "Connection ('" << event.device_uid << ", "
+ SDL_LOG_ERROR("Connection ('" << event.device_uid << ", "
<< event.application_id
<< ") not found");
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"event_type = ON_RECEIVED_DONE. Condition: NULL == connection");
break;
}
@@ -1339,17 +1297,16 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
#endif // TELEMETRY_MONITOR
RaiseEvent(&TransportManagerListener::OnTMMessageReceived,
event.event_data);
- LOG4CXX_DEBUG(logger_, "event_type = ON_RECEIVED_DONE");
+ SDL_LOG_DEBUG("event_type = ON_RECEIVED_DONE");
break;
}
case EventTypeEnum::ON_RECEIVED_FAIL: {
- LOG4CXX_DEBUG(logger_, "Event ON_RECEIVED_FAIL");
+ SDL_LOG_DEBUG("Event ON_RECEIVED_FAIL");
connections_lock_.AcquireForReading();
ConnectionInternal* connection =
GetActiveConnection(event.device_uid, event.application_id);
if (connection == NULL) {
- LOG4CXX_ERROR(logger_,
- "Connection ('" << event.device_uid << ", "
+ SDL_LOG_ERROR("Connection ('" << event.device_uid << ", "
<< event.application_id << ") not found");
connections_lock_.Release();
break;
@@ -1358,11 +1315,11 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
RaiseEvent(&TransportManagerListener::OnTMMessageReceiveFailed,
*static_cast<DataReceiveError*>(event.event_error.get()));
- LOG4CXX_DEBUG(logger_, "event_type = ON_RECEIVED_FAIL");
+ SDL_LOG_DEBUG("event_type = ON_RECEIVED_FAIL");
break;
}
case EventTypeEnum::ON_COMMUNICATION_ERROR: {
- LOG4CXX_DEBUG(logger_, "event_type = ON_COMMUNICATION_ERROR");
+ SDL_LOG_DEBUG("event_type = ON_COMMUNICATION_ERROR");
break;
}
case EventTypeEnum::ON_UNEXPECTED_DISCONNECT: {
@@ -1378,22 +1335,21 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
RemoveConnection(id, connection->transport_adapter);
} else {
connections_lock_.Release();
- LOG4CXX_ERROR(logger_,
- "Connection ('" << event.device_uid << ", "
+ SDL_LOG_ERROR("Connection ('" << event.device_uid << ", "
<< event.application_id << ") not found");
}
- LOG4CXX_DEBUG(logger_, "eevent_type = ON_UNEXPECTED_DISCONNECT");
+ SDL_LOG_DEBUG("eevent_type = ON_UNEXPECTED_DISCONNECT");
break;
}
case EventTypeEnum::ON_TRANSPORT_CONFIG_UPDATED: {
- LOG4CXX_DEBUG(logger_, "event_type = ON_TRANSPORT_CONFIG_UPDATED");
+ SDL_LOG_DEBUG("event_type = ON_TRANSPORT_CONFIG_UPDATED");
transport_adapter::TransportConfig config =
event.transport_adapter->GetTransportConfiguration();
RaiseEvent(&TransportManagerListener::OnTransportConfigUpdated, config);
break;
}
} // switch
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
#ifdef TELEMETRY_MONITOR
@@ -1403,10 +1359,10 @@ void TransportManagerImpl::SetTelemetryObserver(TMTelemetryObserver* observer) {
#endif // TELEMETRY_MONITOR
void TransportManagerImpl::Handle(::protocol_handler::RawMessagePtr msg) {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
if (!events_processing_is_active_) {
- LOG4CXX_DEBUG(logger_, "Waiting for events handling unlock");
+ SDL_LOG_DEBUG("Waiting for events handling unlock");
sync_primitives::AutoLock auto_lock(events_processing_lock_);
events_processing_cond_var_.Wait(auto_lock);
}
@@ -1414,8 +1370,7 @@ void TransportManagerImpl::Handle(::protocol_handler::RawMessagePtr msg) {
sync_primitives::AutoReadLock lock(connections_lock_);
ConnectionInternal* connection = GetConnection(msg->connection_key());
if (connection == NULL) {
- LOG4CXX_WARN(logger_,
- "Connection " << msg->connection_key() << " not found");
+ SDL_LOG_WARN("Connection " << msg->connection_key() << " not found");
RaiseEvent(&TransportManagerListener::OnTMMessageSendFailed,
DataSendTimeoutError(),
msg);
@@ -1423,30 +1378,29 @@ void TransportManagerImpl::Handle(::protocol_handler::RawMessagePtr msg) {
}
TransportAdapter* transport_adapter = connection->transport_adapter;
- LOG4CXX_DEBUG(logger_,
- "Got adapter " << transport_adapter << "["
- << transport_adapter->GetDeviceType() << "]"
- << " by session id " << msg->connection_key());
- if (NULL == transport_adapter) {
+ if (nullptr == transport_adapter) {
std::string error_text = "Transport adapter is not found";
- LOG4CXX_ERROR(logger_, error_text);
+ SDL_LOG_ERROR(error_text);
RaiseEvent(&TransportManagerListener::OnTMMessageSendFailed,
DataSendError(error_text),
msg);
} else {
+ SDL_LOG_DEBUG("Got adapter " << transport_adapter << "["
+ << transport_adapter->GetDeviceType() << "]"
+ << " by session id " << msg->connection_key());
if (TransportAdapter::OK ==
transport_adapter->SendData(
connection->device, connection->application, msg)) {
- LOG4CXX_TRACE(logger_, "Data sent to adapter");
+ SDL_LOG_TRACE("Data sent to adapter");
} else {
- LOG4CXX_ERROR(logger_, "Data sent error");
+ SDL_LOG_ERROR("Data sent error");
RaiseEvent(&TransportManagerListener::OnTMMessageSendFailed,
DataSendError("Send failed"),
msg);
}
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
TransportManagerImpl::ConnectionInternal::ConnectionInternal(
@@ -1474,13 +1428,13 @@ TransportManagerImpl::ConnectionInternal::ConnectionInternal(
}
void TransportManagerImpl::ConnectionInternal::DisconnectFailedRoutine() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
transport_manager->RaiseEvent(&TransportManagerListener::OnDisconnectFailed,
device_handle_,
DisconnectDeviceError());
shutdown_ = false;
timer->Stop();
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
DeviceHandle TransportManagerImpl::Handle2GUIDConverter::UidToHandle(
@@ -1495,8 +1449,7 @@ DeviceHandle TransportManagerImpl::Handle2GUIDConverter::UidToHandle(
HandleFinder(handle));
if (it != conversion_table_.end()) {
- LOG4CXX_DEBUG(logger_,
- "Handle for UID is found: " << std::get<0>(*it) << "/"
+ SDL_LOG_DEBUG("Handle for UID is found: " << std::get<0>(*it) << "/"
<< std::get<1>(*it) << "/"
<< std::get<2>(*it));
return std::get<2>(*it);
@@ -1508,8 +1461,7 @@ DeviceHandle TransportManagerImpl::Handle2GUIDConverter::UidToHandle(
auto t = std::make_tuple(dev_uid, connection_type, handle);
conversion_table_.push_back(
std::make_tuple(dev_uid, connection_type, handle));
- LOG4CXX_DEBUG(logger_,
- "Handle for UID is added: " << std::get<0>(t) << "/"
+ SDL_LOG_DEBUG("Handle for UID is added: " << std::get<0>(t) << "/"
<< std::get<1>(t) << "/"
<< std::get<2>(t));
return handle;
@@ -1523,14 +1475,13 @@ DeviceUID TransportManagerImpl::Handle2GUIDConverter::HandleToUid(
conversion_table_.begin(), conversion_table_.end(), HandleFinder(handle));
if (it != conversion_table_.end()) {
- LOG4CXX_DEBUG(logger_,
- "Handle is found: " << std::get<0>(*it) << "/"
+ SDL_LOG_DEBUG("Handle is found: " << std::get<0>(*it) << "/"
<< std::get<1>(*it) << "/"
<< std::get<2>(*it));
return std::get<0>(*it);
}
- LOG4CXX_DEBUG(logger_, "Handle is not found: " << handle);
+ SDL_LOG_DEBUG("Handle is not found: " << handle);
return DeviceUID("uknown_uid");
}
diff --git a/src/components/transport_manager/src/usb/libusb/platform_usb_device.cc b/src/components/transport_manager/src/usb/libusb/platform_usb_device.cc
index 7d7fb49e6e..7e55f1caf9 100644
--- a/src/components/transport_manager/src/usb/libusb/platform_usb_device.cc
+++ b/src/components/transport_manager/src/usb/libusb/platform_usb_device.cc
@@ -39,7 +39,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
PlatformUsbDevice::PlatformUsbDevice(
uint8_t bus_number,
@@ -56,18 +56,17 @@ PlatformUsbDevice::PlatformUsbDevice(
, libusb_device_(device_libusb) {}
std::string PlatformUsbDevice::GetDescString(uint8_t index) const {
- LOG4CXX_TRACE(logger_, "enter. index: " << int(index));
+ SDL_LOG_TRACE("enter. index: " << int(index));
unsigned char buf[128];
const int libusb_ret = libusb_get_string_descriptor_ascii(
libusb_device_handle_, index, buf, sizeof(buf));
if (libusb_ret < 0) {
- LOG4CXX_ERROR(logger_,
- "Failed to get USB string descriptor: "
- << libusb_error_name(libusb_ret));
- LOG4CXX_TRACE(logger_, "exit with empty string");
+ SDL_LOG_ERROR("Failed to get USB string descriptor: "
+ << libusb_error_name(libusb_ret));
+ SDL_LOG_TRACE("exit with empty string");
return "";
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
return std::string(reinterpret_cast<char*>(buf));
}
diff --git a/src/components/transport_manager/src/usb/libusb/usb_connection.cc b/src/components/transport_manager/src/usb/libusb/usb_connection.cc
index 4b7b22394d..278a1b1f05 100644
--- a/src/components/transport_manager/src/usb/libusb/usb_connection.cc
+++ b/src/components/transport_manager/src/usb/libusb/usb_connection.cc
@@ -50,7 +50,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
UsbConnection::UsbConnection(const DeviceUID& device_uid,
const ApplicationHandle& app_handle,
@@ -79,11 +79,11 @@ UsbConnection::UsbConnection(const DeviceUID& device_uid,
, waiting_out_transfer_cancel_(false) {}
UsbConnection::~UsbConnection() {
- LOG4CXX_TRACE(logger_, "enter with this" << this);
+ SDL_LOG_TRACE("enter with this" << this);
Finalise();
libusb_free_transfer(in_transfer_);
delete[] in_buffer_;
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
// Callback for handling income and outcome data from lib_usb
@@ -96,7 +96,7 @@ void OutTransferCallback(libusb_transfer* transfer) {
}
bool UsbConnection::PostInTransfer() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
libusb_fill_bulk_transfer(in_transfer_,
device_handle_,
in_endpoint_,
@@ -107,15 +107,13 @@ bool UsbConnection::PostInTransfer() {
0);
const int libusb_ret = libusb_submit_transfer(in_transfer_);
if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"libusb_submit_transfer failed: " << libusb_error_name(libusb_ret));
- LOG4CXX_TRACE(
- logger_,
+ SDL_LOG_TRACE(
"exit with FALSE. Condition: LIBUSB_SUCCESS != libusb_submit_transfer");
return false;
}
- LOG4CXX_TRACE(logger_, "exit with TRUE");
+ SDL_LOG_TRACE("exit with TRUE");
return true;
}
@@ -130,19 +128,17 @@ std::string hex_data(const unsigned char* const buffer,
}
void UsbConnection::OnInTransfer(libusb_transfer* transfer) {
- LOG4CXX_TRACE(logger_, "enter with Libusb_transfer*: " << transfer);
+ SDL_LOG_TRACE("enter with Libusb_transfer*: " << transfer);
if (transfer->status == LIBUSB_TRANSFER_COMPLETED) {
- LOG4CXX_DEBUG(logger_,
- "USB incoming transfer, size:"
- << transfer->actual_length << ", data:"
- << hex_data(transfer->buffer, transfer->actual_length));
+ SDL_LOG_DEBUG("USB incoming transfer, size:"
+ << transfer->actual_length << ", data:"
+ << hex_data(transfer->buffer, transfer->actual_length));
::protocol_handler::RawMessagePtr data(new protocol_handler::RawMessage(
0, 0, in_buffer_, transfer->actual_length, false));
controller_->DataReceiveDone(device_uid_, app_handle_, data);
} else {
- LOG4CXX_ERROR(logger_,
- "USB incoming transfer failed: "
- << libusb_error_name(transfer->status));
+ SDL_LOG_ERROR("USB incoming transfer failed: "
+ << libusb_error_name(transfer->status));
controller_->DataReceiveFailed(
device_uid_, app_handle_, DataReceiveError());
}
@@ -150,17 +146,16 @@ void UsbConnection::OnInTransfer(libusb_transfer* transfer) {
waiting_in_transfer_cancel_ = false;
} else {
if (!PostInTransfer()) {
- LOG4CXX_ERROR(logger_,
- "USB incoming transfer failed with "
- << "LIBUSB_TRANSFER_NO_DEVICE. Abort connection.");
+ SDL_LOG_ERROR("USB incoming transfer failed with "
+ << "LIBUSB_TRANSFER_NO_DEVICE. Abort connection.");
AbortConnection();
}
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
TransportAdapter::Error UsbConnection::PopOutMessage() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
bytes_sent_ = 0;
auto error_code = TransportAdapter::OK;
if (out_messages_.empty()) {
@@ -170,18 +165,18 @@ TransportAdapter::Error UsbConnection::PopOutMessage() {
out_messages_.pop_front();
error_code = PostOutTransfer();
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
return error_code;
}
TransportAdapter::Error UsbConnection::PostOutTransfer() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
out_transfer_ = libusb_alloc_transfer(0);
if (nullptr == out_transfer_) {
- LOG4CXX_ERROR(logger_, "libusb_alloc_transfer failed");
- LOG4CXX_TRACE(logger_,
- "exit with TransportAdapter::BAD_STATE. Condition: nullptr "
- "== out_transfer_");
+ SDL_LOG_ERROR("libusb_alloc_transfer failed");
+ SDL_LOG_TRACE(
+ "exit with TransportAdapter::BAD_STATE. Condition: nullptr "
+ "== out_transfer_");
return TransportAdapter::BAD_STATE;
}
libusb_fill_bulk_transfer(out_transfer_,
@@ -194,36 +189,32 @@ TransportAdapter::Error UsbConnection::PostOutTransfer() {
0);
const int libusb_ret = libusb_submit_transfer(out_transfer_);
if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"libusb_submit_transfer failed: " << libusb_error_name(libusb_ret));
- LOG4CXX_TRACE(logger_,
- "exit with TransportAdapter::FAIL. Condition: "
- << "LIBUSB_SUCCESS != libusb_fill_bulk_transfer");
+ SDL_LOG_TRACE("exit with TransportAdapter::FAIL. Condition: "
+ << "LIBUSB_SUCCESS != libusb_fill_bulk_transfer");
return TransportAdapter::FAIL;
}
- LOG4CXX_TRACE(logger_, "exit with TransportAdapter::OK");
+ SDL_LOG_TRACE("exit with TransportAdapter::OK");
return TransportAdapter::OK;
}
void UsbConnection::OnOutTransfer(libusb_transfer* transfer) {
- LOG4CXX_TRACE(logger_, "enter with Libusb_transfer*: " << transfer);
+ SDL_LOG_TRACE("enter with Libusb_transfer*: " << transfer);
auto error_code = TransportAdapter::OK;
{
sync_primitives::AutoLock locker(out_messages_mutex_);
if (LIBUSB_TRANSFER_COMPLETED == transfer->status) {
bytes_sent_ += transfer->actual_length;
if (current_out_message_->data_size() == bytes_sent_) {
- LOG4CXX_DEBUG(
- logger_,
+ SDL_LOG_DEBUG(
"USB out transfer, data sent: " << current_out_message_.get());
controller_->DataSendDone(
device_uid_, app_handle_, current_out_message_);
error_code = PopOutMessage();
}
} else {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"USB out transfer failed: " << libusb_error_name(transfer->status));
controller_->DataSendFailed(
device_uid_, app_handle_, current_out_message_, DataSendError());
@@ -240,16 +231,15 @@ void UsbConnection::OnOutTransfer(libusb_transfer* transfer) {
AbortConnection();
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
TransportAdapter::Error UsbConnection::SendData(
::protocol_handler::RawMessagePtr message) {
- LOG4CXX_TRACE(logger_, "enter with RawMessagePtr: " << message.get());
+ SDL_LOG_TRACE("enter with RawMessagePtr: " << message.get());
if (disconnecting_) {
- LOG4CXX_TRACE(logger_,
- "exit with TransportAdapter::BAD_STATE. Condition: "
- << "disconnecting_");
+ SDL_LOG_TRACE("exit with TransportAdapter::BAD_STATE. Condition: "
+ << "disconnecting_");
return TransportAdapter::BAD_STATE;
}
@@ -266,7 +256,7 @@ TransportAdapter::Error UsbConnection::SendData(
auto error_code = process_message();
if (TransportAdapter::OK == error_code) {
- LOG4CXX_TRACE(logger_, "exit with TransportAdapter::OK.");
+ SDL_LOG_TRACE("exit with TransportAdapter::OK.");
return TransportAdapter::OK;
}
@@ -277,15 +267,14 @@ TransportAdapter::Error UsbConnection::SendData(
AbortConnection();
}
- LOG4CXX_TRACE(logger_,
- "exit with TransportAdapter::FAIL. PostOutTransfer сondition: "
- << error_code);
+ SDL_LOG_TRACE("exit with TransportAdapter::FAIL. PostOutTransfer сondition: "
+ << error_code);
return TransportAdapter::FAIL;
}
void UsbConnection::Finalise() {
- LOG4CXX_TRACE(logger_, "enter");
- LOG4CXX_DEBUG(logger_, "Finalise USB connection " << device_uid_);
+ SDL_LOG_TRACE("enter");
+ SDL_LOG_DEBUG("Finalise USB connection " << device_uid_);
{
sync_primitives::AutoLock locker(out_messages_mutex_);
disconnecting_ = true;
@@ -312,15 +301,15 @@ void UsbConnection::Finalise() {
while (waiting_in_transfer_cancel_ || waiting_out_transfer_cancel_) {
pthread_yield();
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void UsbConnection::AbortConnection() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
Finalise();
controller_->ConnectionAborted(
device_uid_, app_handle_, CommunicationError());
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
TransportAdapter::Error UsbConnection::Disconnect() {
@@ -330,10 +319,10 @@ TransportAdapter::Error UsbConnection::Disconnect() {
}
bool UsbConnection::Init() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
if (!FindEndpoints()) {
- LOG4CXX_ERROR(logger_, "EndPoints was not found");
- LOG4CXX_TRACE(logger_, "exit with FALSE. Condition: !FindEndpoints()");
+ SDL_LOG_ERROR("EndPoints was not found");
+ SDL_LOG_TRACE("exit with FALSE. Condition: !FindEndpoints()");
return false;
}
@@ -346,35 +335,33 @@ bool UsbConnection::Init() {
in_buffer_ = new unsigned char[in_buffer_size_];
in_transfer_ = libusb_alloc_transfer(0);
if (NULL == in_transfer_) {
- LOG4CXX_ERROR(logger_, "libusb_alloc_transfer failed");
- LOG4CXX_TRACE(logger_, "exit with FALSE. Condition: NULL == in_transfer_");
+ SDL_LOG_ERROR("libusb_alloc_transfer failed");
+ SDL_LOG_TRACE("exit with FALSE. Condition: NULL == in_transfer_");
return false;
}
controller_->ConnectDone(device_uid_, app_handle_);
if (!PostInTransfer()) {
- LOG4CXX_ERROR(logger_, "PostInTransfer failed. Call ConnectionAborted");
+ SDL_LOG_ERROR("PostInTransfer failed. Call ConnectionAborted");
controller_->ConnectionAborted(
device_uid_, app_handle_, CommunicationError());
- LOG4CXX_TRACE(logger_, "exit with FALSE. Condition: !PostInTransfer()");
+ SDL_LOG_TRACE("exit with FALSE. Condition: !PostInTransfer()");
return false;
}
- LOG4CXX_TRACE(logger_, "exit with TRUE");
+ SDL_LOG_TRACE("exit with TRUE");
return true;
}
bool UsbConnection::FindEndpoints() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
struct libusb_config_descriptor* config;
const int libusb_ret =
libusb_get_active_config_descriptor(libusb_device_, &config);
if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_ERROR(logger_,
- "libusb_get_active_config_descriptor failed: "
- << libusb_error_name(libusb_ret));
- LOG4CXX_TRACE(logger_,
- "exit with FALSE. Condition: LIBUSB_SUCCESS != libusb_ret");
+ SDL_LOG_ERROR("libusb_get_active_config_descriptor failed: "
+ << libusb_error_name(libusb_ret));
+ SDL_LOG_TRACE("exit with FALSE. Condition: LIBUSB_SUCCESS != libusb_ret");
return false;
}
@@ -406,7 +393,7 @@ bool UsbConnection::FindEndpoints() {
libusb_free_config_descriptor(config);
const bool result = !(find_in_endpoint || find_out_endpoint);
- LOG4CXX_TRACE(logger_, "exit with " << (result ? "TRUE" : "FALSE"));
+ SDL_LOG_TRACE("exit with " << (result ? "TRUE" : "FALSE"));
return result;
}
} // namespace transport_adapter
diff --git a/src/components/transport_manager/src/usb/libusb/usb_handler.cc b/src/components/transport_manager/src/usb/libusb/usb_handler.cc
index d1fc0af7f7..3b459eb0af 100644
--- a/src/components/transport_manager/src/usb/libusb/usb_handler.cc
+++ b/src/components/transport_manager/src/usb/libusb/usb_handler.cc
@@ -46,7 +46,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
class UsbHandler::ControlTransferSequenceState {
public:
@@ -89,8 +89,27 @@ UsbHandler::UsbHandler()
}
UsbHandler::~UsbHandler() {
- shutdown_requested_ = true;
- LOG4CXX_INFO(logger_, "UsbHandler thread finished");
+ SDL_LOG_AUTO_TRACE();
+
+ // Notify Thread to stop on next iteration...
+ RequestStopThread();
+
+ // ... and unregister hotplug callbacks in order to wake
+ // libusb_handle_events()
+ DeregisterHotplugCallbacks();
+
+ // Now it is safe to join the Thread and free up resources
+ JoinAndDeleteThread();
+ InvokeLibusbExit();
+}
+
+void UsbHandler::RequestStopThread() {
+ SDL_LOG_AUTO_TRACE();
+ shutdown_requested_.store(true);
+}
+
+void UsbHandler::DeregisterHotplugCallbacks() {
+ SDL_LOG_AUTO_TRACE();
if (libusb_context_) {
// The libusb_hotplug_deregister_callback() wakes up blocking call of
@@ -99,10 +118,20 @@ UsbHandler::~UsbHandler() {
arrived_callback_handle_);
libusb_hotplug_deregister_callback(libusb_context_, left_callback_handle_);
}
+}
+
+void UsbHandler::JoinAndDeleteThread() {
+ SDL_LOG_AUTO_TRACE();
- thread_->join();
- delete thread_->delegate();
+ // Let thread finish on its own
+ thread_->Stop(threads::Thread::kThreadSoftStop);
+ delete thread_->GetDelegate();
threads::DeleteThread(thread_);
+ SDL_LOG_INFO("UsbHandler thread finished");
+}
+
+void UsbHandler::InvokeLibusbExit() {
+ SDL_LOG_AUTO_TRACE();
if (libusb_context_) {
libusb_exit(libusb_context_);
@@ -111,34 +140,31 @@ UsbHandler::~UsbHandler() {
}
void UsbHandler::DeviceArrived(libusb_device* device_libusb) {
- LOG4CXX_TRACE(logger_, "enter. libusb_device* " << device_libusb);
+ SDL_LOG_TRACE("enter. libusb_device* " << device_libusb);
const uint8_t bus_number = libusb_get_bus_number(device_libusb);
const uint8_t device_address = libusb_get_device_address(device_libusb);
libusb_device_descriptor descriptor;
int libusb_ret = libusb_get_device_descriptor(device_libusb, &descriptor);
if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_ERROR(logger_,
- "libusb_get_device_descriptor failed: " << libusb_ret);
- LOG4CXX_TRACE(logger_, "exit. Condition: LIBUSB_SUCCESS != libusb_ret");
+ SDL_LOG_ERROR("libusb_get_device_descriptor failed: " << libusb_ret);
+ SDL_LOG_TRACE("exit. Condition: LIBUSB_SUCCESS != libusb_ret");
return;
}
libusb_device_handle* device_handle_libusb;
libusb_ret = libusb_open(device_libusb, &device_handle_libusb);
if (libusb_ret != LIBUSB_SUCCESS) {
- LOG4CXX_ERROR(logger_,
- "libusb_open failed: " << libusb_error_name(libusb_ret));
- LOG4CXX_TRACE(logger_, "exit. Condition: libusb_ret != LIBUSB_SUCCESS");
+ SDL_LOG_ERROR("libusb_open failed: " << libusb_error_name(libusb_ret));
+ SDL_LOG_TRACE("exit. Condition: libusb_ret != LIBUSB_SUCCESS");
return;
}
int configuration;
libusb_ret = libusb_get_configuration(device_handle_libusb, &configuration);
if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_INFO(
- logger_,
+ SDL_LOG_INFO(
"libusb_get_configuration failed: " << libusb_error_name(libusb_ret));
- LOG4CXX_TRACE(logger_, "exit. Condition: LIBUSB_SUCCESS != libusb_ret");
+ SDL_LOG_TRACE("exit. Condition: LIBUSB_SUCCESS != libusb_ret");
return;
}
@@ -146,21 +172,19 @@ void UsbHandler::DeviceArrived(libusb_device* device_libusb) {
libusb_ret =
libusb_set_configuration(device_handle_libusb, kUsbConfiguration);
if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_INFO(
- logger_,
+ SDL_LOG_INFO(
"libusb_set_configuration failed: " << libusb_error_name(libusb_ret));
- LOG4CXX_TRACE(logger_, "exit. Condition: LIBUSB_SUCCESS != libusb_ret");
+ SDL_LOG_TRACE("exit. Condition: LIBUSB_SUCCESS != libusb_ret");
return;
}
}
libusb_ret = libusb_claim_interface(device_handle_libusb, 0);
if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_INFO(
- logger_,
+ SDL_LOG_INFO(
"libusb_claim_interface failed: " << libusb_error_name(libusb_ret));
CloseDeviceHandle(device_handle_libusb);
- LOG4CXX_TRACE(logger_, "exit. Condition: LIBUSB_SUCCESS != libusb_ret");
+ SDL_LOG_TRACE("exit. Condition: LIBUSB_SUCCESS != libusb_ret");
return;
}
@@ -177,11 +201,11 @@ void UsbHandler::DeviceArrived(libusb_device* device_libusb) {
++it) {
(*it)->OnDeviceArrived(device);
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void UsbHandler::DeviceLeft(libusb_device* device_libusb) {
- LOG4CXX_TRACE(logger_, "enter. libusb_device* " << device_libusb);
+ SDL_LOG_TRACE("enter. libusb_device* " << device_libusb);
PlatformUsbDevice* device = NULL;
for (Devices::iterator it = devices_.begin(); it != devices_.end(); ++it) {
if ((*it)->GetLibusbDevice() == device_libusb) {
@@ -190,7 +214,7 @@ void UsbHandler::DeviceLeft(libusb_device* device_libusb) {
}
}
if (NULL == device) {
- LOG4CXX_TRACE(logger_, "enter. Condition: NULL == device");
+ SDL_LOG_TRACE("enter. Condition: NULL == device");
return;
}
@@ -213,19 +237,18 @@ void UsbHandler::DeviceLeft(libusb_device* device_libusb) {
CloseDeviceHandle(device->GetLibusbHandle());
}
delete device;
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void UsbHandler::StartControlTransferSequence(
UsbControlTransferSequence* sequence, PlatformUsbDevice* device) {
- LOG4CXX_TRACE(logger_,
- "enter. UsbControlTransferSequence* "
- << sequence << "PlatformUsbDevice* " << device);
+ SDL_LOG_TRACE("enter. UsbControlTransferSequence* "
+ << sequence << "PlatformUsbDevice* " << device);
TransferSequences::iterator it = transfer_sequences_.insert(
transfer_sequences_.end(),
new ControlTransferSequenceState(this, sequence, device));
SubmitControlTransfer(*it);
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void UsbHandler::CloseDeviceHandle(libusb_device_handle* device_handle) {
@@ -236,15 +259,13 @@ int ArrivedCallback(libusb_context* context,
libusb_device* device,
libusb_hotplug_event event,
void* data) {
- LOG4CXX_TRACE(logger_,
- "enter. libusb device arrived (bus number "
- << static_cast<int>(libusb_get_bus_number(device))
- << ", device address "
- << static_cast<int>(libusb_get_device_address(device))
- << ")");
+ SDL_LOG_TRACE("enter. libusb device arrived (bus number "
+ << static_cast<int>(libusb_get_bus_number(device))
+ << ", device address "
+ << static_cast<int>(libusb_get_device_address(device)) << ")");
UsbHandler* usb_handler = static_cast<UsbHandler*>(data);
usb_handler->DeviceArrived(device);
- LOG4CXX_TRACE(logger_, "exit with 0");
+ SDL_LOG_TRACE("exit with 0");
return 0;
}
@@ -252,35 +273,33 @@ int LeftCallback(libusb_context* context,
libusb_device* device,
libusb_hotplug_event event,
void* data) {
- LOG4CXX_TRACE(logger_,
- "enter libusb device left (bus number "
- << static_cast<int>(libusb_get_bus_number(device))
- << ", device address "
- << static_cast<int>(libusb_get_device_address(device))
- << ")");
+ SDL_LOG_TRACE("enter libusb device left (bus number "
+ << static_cast<int>(libusb_get_bus_number(device))
+ << ", device address "
+ << static_cast<int>(libusb_get_device_address(device)) << ")");
UsbHandler* usb_handler = static_cast<UsbHandler*>(data);
usb_handler->DeviceLeft(device);
- LOG4CXX_TRACE(logger_, "exit with 0");
+ SDL_LOG_TRACE("exit with 0");
return 0;
}
TransportAdapter::Error UsbHandler::Init() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
int libusb_ret = libusb_init(&libusb_context_);
if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_ERROR(logger_, "libusb_init failed: " << libusb_ret);
- LOG4CXX_TRACE(logger_,
- "exit with TransportAdapter::FAIL. Condition: LIBUSB_SUCCESS "
- "!= libusb_ret");
+ SDL_LOG_ERROR("libusb_init failed: " << libusb_ret);
+ SDL_LOG_TRACE(
+ "exit with TransportAdapter::FAIL. Condition: LIBUSB_SUCCESS "
+ "!= libusb_ret");
return TransportAdapter::FAIL;
}
if (!libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)) {
- LOG4CXX_ERROR(logger_, "LIBUSB_CAP_HAS_HOTPLUG not supported");
- LOG4CXX_TRACE(logger_,
- "exit with TransportAdapter::FAIL. Condition: "
- "!libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)");
+ SDL_LOG_ERROR("LIBUSB_CAP_HAS_HOTPLUG not supported");
+ SDL_LOG_TRACE(
+ "exit with TransportAdapter::FAIL. Condition: "
+ "!libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)");
return TransportAdapter::FAIL;
}
@@ -296,11 +315,10 @@ TransportAdapter::Error UsbHandler::Init() {
&arrived_callback_handle_);
if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_ERROR(logger_,
- "libusb_hotplug_register_callback failed: " << libusb_ret);
- LOG4CXX_TRACE(logger_,
- "exit with TransportAdapter::FAIL. Condition: LIBUSB_SUCCESS "
- "!= libusb_ret");
+ SDL_LOG_ERROR("libusb_hotplug_register_callback failed: " << libusb_ret);
+ SDL_LOG_TRACE(
+ "exit with TransportAdapter::FAIL. Condition: LIBUSB_SUCCESS "
+ "!= libusb_ret");
return TransportAdapter::FAIL;
}
@@ -316,25 +334,23 @@ TransportAdapter::Error UsbHandler::Init() {
&left_callback_handle_);
if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_ERROR(logger_,
- "libusb_hotplug_register_callback failed: " << libusb_ret);
- LOG4CXX_TRACE(logger_,
- "exit with TransportAdapter::FAIL. Condition: LIBUSB_SUCCESS "
- "!= libusb_ret");
+ SDL_LOG_ERROR("libusb_hotplug_register_callback failed: " << libusb_ret);
+ SDL_LOG_TRACE(
+ "exit with TransportAdapter::FAIL. Condition: LIBUSB_SUCCESS "
+ "!= libusb_ret");
return TransportAdapter::FAIL;
}
- if (!thread_->start()) {
- LOG4CXX_ERROR(logger_,
- "USB device scanner thread start failed, error code");
- LOG4CXX_TRACE(logger_, "exit with TransportAdapter::FAIL.");
+ if (!thread_->Start()) {
+ SDL_LOG_ERROR("USB device scanner thread start failed, error code");
+ SDL_LOG_TRACE("exit with TransportAdapter::FAIL.");
return TransportAdapter::FAIL;
}
return TransportAdapter::OK;
}
void UsbHandler::Thread() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
int completed = 0;
while (!shutdown_requested_) {
libusb_handle_events_completed(libusb_context_, &completed);
@@ -357,33 +373,32 @@ void UsbHandler::Thread() {
libusb_close(*it);
}
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void UsbTransferSequenceCallback(libusb_transfer* transfer) {
- LOG4CXX_TRACE(logger_, "enter. libusb_transfer* " << transfer);
+ SDL_LOG_TRACE("enter. libusb_transfer* " << transfer);
UsbHandler::ControlTransferSequenceState* sequence_state =
static_cast<UsbHandler::ControlTransferSequenceState*>(
transfer->user_data);
sequence_state->usb_handler()->ControlTransferCallback(transfer);
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void UsbHandler::SubmitControlTransfer(
ControlTransferSequenceState* sequence_state) {
- LOG4CXX_TRACE(logger_,
- "enter. ControlTransferSequenceState* " << sequence_state);
+ SDL_LOG_TRACE("enter. ControlTransferSequenceState* " << sequence_state);
UsbControlTransfer* transfer = sequence_state->CurrentTransfer();
if (NULL == transfer) {
- LOG4CXX_TRACE(logger_, "exit. Condition: NULL == transfer");
+ SDL_LOG_TRACE("exit. Condition: NULL == transfer");
return;
}
libusb_transfer* libusb_transfer = libusb_alloc_transfer(0);
if (0 == libusb_transfer) {
- LOG4CXX_ERROR(logger_, "libusb_alloc_transfer failed");
+ SDL_LOG_ERROR("libusb_alloc_transfer failed");
sequence_state->Finish();
- LOG4CXX_TRACE(logger_, "exit. Condition: 0 == libusb_transfer");
+ SDL_LOG_TRACE("exit. Condition: 0 == libusb_transfer");
return;
}
@@ -406,10 +421,10 @@ void UsbHandler::SubmitControlTransfer(
unsigned char* buffer =
static_cast<unsigned char*>(malloc(length + LIBUSB_CONTROL_SETUP_SIZE));
if (NULL == buffer) {
- LOG4CXX_ERROR(logger_, "buffer allocation failed");
+ SDL_LOG_ERROR("buffer allocation failed");
libusb_free_transfer(libusb_transfer);
sequence_state->Finish();
- LOG4CXX_TRACE(logger_, "exit. Condition: NULL == buffer");
+ SDL_LOG_TRACE("exit. Condition: NULL == buffer");
return;
}
@@ -430,21 +445,20 @@ void UsbHandler::SubmitControlTransfer(
const int libusb_ret = libusb_submit_transfer(libusb_transfer);
if (LIBUSB_SUCCESS != libusb_ret) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"libusb_submit_transfer failed: " << libusb_error_name(libusb_ret));
libusb_free_transfer(libusb_transfer);
sequence_state->Finish();
}
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
void UsbHandler::ControlTransferCallback(libusb_transfer* transfer) {
- LOG4CXX_TRACE(logger_, "enter. libusb_transfer* " << transfer);
+ SDL_LOG_TRACE("enter. libusb_transfer* " << transfer);
ControlTransferSequenceState* sequence_state =
static_cast<ControlTransferSequenceState*>(transfer->user_data);
if (transfer->status == LIBUSB_TRANSFER_COMPLETED) {
- LOG4CXX_INFO(logger_, "USB control transfer completed");
+ SDL_LOG_INFO("USB control transfer completed");
UsbControlTransfer* current_transfer = sequence_state->CurrentTransfer();
bool submit_next = true;
if (current_transfer &&
@@ -461,11 +475,11 @@ void UsbHandler::ControlTransferCallback(libusb_transfer* transfer) {
sequence_state->Finish();
}
} else {
- LOG4CXX_ERROR(logger_, "USB control transfer failed: " << transfer->status);
+ SDL_LOG_ERROR("USB control transfer failed: " << transfer->status);
sequence_state->Finish();
}
libusb_free_transfer(transfer);
- LOG4CXX_TRACE(logger_, "exit");
+ SDL_LOG_TRACE("exit");
}
UsbHandler::ControlTransferSequenceState::ControlTransferSequenceState(
@@ -483,23 +497,22 @@ UsbHandler::ControlTransferSequenceState::~ControlTransferSequenceState() {
}
UsbControlTransfer* UsbHandler::ControlTransferSequenceState::Next() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
if (finished_) {
- LOG4CXX_TRACE(logger_, "exit with NULL. Condition: finished_");
+ SDL_LOG_TRACE("exit with NULL. Condition: finished_");
return NULL;
}
if (++current_transfer_ == sequence_->transfers().end()) {
Finish();
- LOG4CXX_TRACE(logger_,
- "exit with NULL. Condition: ++current_transfer_ == "
- "sequence_->transfers().end()");
+ SDL_LOG_TRACE(
+ "exit with NULL. Condition: ++current_transfer_ == "
+ "sequence_->transfers().end()");
return NULL;
} else {
- LOG4CXX_TRACE(logger_,
- "exit with UsbControlTransfer* "
- << *current_transfer_
- << ".Condition: ++current_transfer_ !== "
- "sequence_->transfers().end()");
+ SDL_LOG_TRACE("exit with UsbControlTransfer* "
+ << *current_transfer_
+ << ".Condition: ++current_transfer_ !== "
+ "sequence_->transfers().end()");
return *current_transfer_;
}
}
@@ -517,13 +530,13 @@ UsbHandler::UsbHandlerDelegate::UsbHandlerDelegate(UsbHandler* handler)
: handler_(handler) {}
void UsbHandler::UsbHandlerDelegate::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(handler_);
handler_->Thread();
}
void UsbHandler::UsbHandlerDelegate::exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Empty method required in order to avoid force delegate thread
// finishing by exitThreadMain() of the base class
}
diff --git a/src/components/transport_manager/src/usb/qnx/platform_usb_device.cc b/src/components/transport_manager/src/usb/qnx/platform_usb_device.cc
index bb6e341659..61d3f08b28 100644
--- a/src/components/transport_manager/src/usb/qnx/platform_usb_device.cc
+++ b/src/components/transport_manager/src/usb/qnx/platform_usb_device.cc
@@ -41,7 +41,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
PlatformUsbDevice::PlatformUsbDevice(
usbd_device_instance_t* instance,
@@ -58,7 +58,7 @@ PlatformUsbDevice::PlatformUsbDevice(
std::string PlatformUsbDevice::GetDescString(uint8_t index) const {
char* str = usbd_string(usbd_device_, index, 0);
if (NULL == str) {
- LOG4CXX_INFO(logger_, "Failed to get USB string descriptor");
+ SDL_LOG_INFO("Failed to get USB string descriptor");
return "";
}
return std::string(str);
diff --git a/src/components/transport_manager/src/usb/qnx/usb_connection.cc b/src/components/transport_manager/src/usb/qnx/usb_connection.cc
index 2945639ce9..eeaa758621 100644
--- a/src/components/transport_manager/src/usb/qnx/usb_connection.cc
+++ b/src/components/transport_manager/src/usb/qnx/usb_connection.cc
@@ -45,7 +45,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
UsbConnection::UsbConnection(const DeviceUID& device_uid,
const ApplicationHandle& app_handle,
@@ -81,13 +81,13 @@ UsbConnection::~UsbConnection() {
if (in_pipe_) {
const int close_pipe_rc = usbd_close_pipe(in_pipe_);
if (EOK != close_pipe_rc) {
- LOG4CXX_ERROR(logger_, "Failed to close pipe: " << close_pipe_rc);
+ SDL_LOG_ERROR("Failed to close pipe: " << close_pipe_rc);
}
}
if (out_pipe_) {
const int close_pipe_rc = usbd_close_pipe(out_pipe_);
if (EOK != close_pipe_rc) {
- LOG4CXX_ERROR(logger_, "Failed to close pipe: " << close_pipe_rc);
+ SDL_LOG_ERROR("Failed to close pipe: " << close_pipe_rc);
}
}
}
@@ -107,7 +107,7 @@ bool UsbConnection::PostInTransfer() {
usbd_io(in_urb_, in_pipe_, InTransferCallback, this, USBD_TIME_INFINITY);
if (EOK != io_rc) {
pending_in_transfer_ = false;
- LOG4CXX_ERROR(logger_, "Failed to post in transfer: " << io_rc);
+ SDL_LOG_ERROR("Failed to post in transfer: " << io_rc);
return false;
}
return true;
@@ -119,11 +119,10 @@ void UsbConnection::OnInTransfer(usbd_urb* urb) {
bool error = false;
const int urb_status_rc = usbd_urb_status(urb, &status, &len);
if (EOK != urb_status_rc && EIO != urb_status_rc) { // EIO is OK
- LOG4CXX_ERROR(logger_, "Get in urb status failed: " << urb_status_rc);
+ SDL_LOG_ERROR("Get in urb status failed: " << urb_status_rc);
error = true;
}
- LOG4CXX_INFO(logger_,
- "USB in transfer, status " << std::hex << status << ", length "
+ SDL_LOG_INFO("USB in transfer, status " << std::hex << status << ", length "
<< std::dec << len);
if (!error) {
@@ -139,7 +138,7 @@ void UsbConnection::OnInTransfer(usbd_urb* urb) {
}
if (error) {
- LOG4CXX_ERROR(logger_, "USB in transfer failed");
+ SDL_LOG_ERROR("USB in transfer failed");
controller_->DataReceiveFailed(
device_uid_, app_handle_, DataReceiveError());
} else {
@@ -173,14 +172,14 @@ bool UsbConnection::PostOutTransfer() {
out_buffer_ = usbd_alloc(len);
memmove(out_buffer_, current_out_message_->data() + bytes_sent_, len);
usbd_setup_bulk(out_urb_, URB_DIR_OUT, out_buffer_, len);
- LOG4CXX_INFO(logger_, "out transfer :" << len);
+ SDL_LOG_INFO("out transfer :" << len);
pending_out_transfer_ = true;
const int io_rc = usbd_io(
out_urb_, out_pipe_, OutTransferCallback, this, USBD_TIME_INFINITY);
if (EOK != io_rc) {
pending_out_transfer_ = false;
usbd_free(out_buffer_);
- LOG4CXX_ERROR(logger_, "Failed to post out transfer: " << io_rc);
+ SDL_LOG_ERROR("Failed to post out transfer: " << io_rc);
return false;
}
return true;
@@ -193,11 +192,10 @@ void UsbConnection::OnOutTransfer(usbd_urb* urb) {
bool error = false;
const int urb_status_rc = usbd_urb_status(urb, &status, &len);
if (EOK != urb_status_rc && EIO != urb_status_rc) { // EIO is OK
- LOG4CXX_ERROR(logger_, "Get out urb status failed: " << urb_status_rc);
+ SDL_LOG_ERROR("Get out urb status failed: " << urb_status_rc);
error = true;
}
- LOG4CXX_INFO(logger_,
- "USB out transfer, status " << std::hex << status << ", length "
+ SDL_LOG_INFO("USB out transfer, status " << std::hex << status << ", length "
<< std::dec << len);
if (!error) {
@@ -215,15 +213,14 @@ void UsbConnection::OnOutTransfer(usbd_urb* urb) {
sync_primitives::AutoLock locker(out_messages_mutex_);
if (error) {
- LOG4CXX_ERROR(logger_, "USB out transfer failed");
+ SDL_LOG_ERROR("USB out transfer failed");
controller_->DataSendFailed(
device_uid_, app_handle_, current_out_message_, DataSendError());
PopOutMessage();
} else {
bytes_sent_ += len;
if (bytes_sent_ == current_out_message_->data_size()) {
- LOG4CXX_INFO(
- logger_,
+ SDL_LOG_INFO(
"USB out transfer, data sent: " << current_out_message_.get());
controller_->DataSendDone(device_uid_, app_handle_, current_out_message_);
PopOutMessage();
@@ -256,7 +253,7 @@ TransportAdapter::Error UsbConnection::SendData(
}
void UsbConnection::Finalise() {
- LOG4CXX_INFO(logger_, "Finalising");
+ SDL_LOG_INFO("Finalising");
sync_primitives::AutoLock locker(out_messages_mutex_);
disconnecting_ = true;
usbd_abort_pipe(in_pipe_);
@@ -272,7 +269,7 @@ void UsbConnection::Finalise() {
}
TransportAdapter::Error UsbConnection::Disconnect() {
- LOG4CXX_INFO(logger_, "Disconnecting");
+ SDL_LOG_INFO("Disconnecting");
Finalise();
controller_->DisconnectDone(device_uid_, app_handle_);
return TransportAdapter::OK;
@@ -285,13 +282,13 @@ bool UsbConnection::Init() {
in_urb_ = usbd_alloc_urb(NULL);
out_urb_ = usbd_alloc_urb(NULL);
if (NULL == in_urb_ || NULL == out_urb_) {
- LOG4CXX_ERROR(logger_, "usbd_alloc_urb failed");
+ SDL_LOG_ERROR("usbd_alloc_urb failed");
return false;
}
in_buffer_ = static_cast<unsigned char*>(usbd_alloc(kInBufferSize));
if (NULL == in_buffer_) {
- LOG4CXX_ERROR(logger_, "usbd_alloc failed");
+ SDL_LOG_ERROR("usbd_alloc failed");
return false;
}
@@ -314,7 +311,7 @@ bool UsbConnection::OpenEndpoints() {
usbd_device_descriptor_t* device_desc =
usbd_device_descriptor(usbd_device_, &device_desc_node);
if (0 == device_desc) {
- LOG4CXX_ERROR(logger_, "Device descriptor not found");
+ SDL_LOG_ERROR("Device descriptor not found");
return false;
}
usbd_desc_node* cfg_desc_node = NULL;
@@ -331,8 +328,7 @@ bool UsbConnection::OpenEndpoints() {
if (config_desc == NULL) {
break;
}
- LOG4CXX_INFO(logger_,
- "USB configuration " << static_cast<int>(
+ SDL_LOG_INFO("USB configuration " << static_cast<int>(
config_desc->configuration.bConfigurationValue));
int iface = 0;
usbd_desc_node* iface_desc_node;
@@ -350,11 +346,10 @@ bool UsbConnection::OpenEndpoints() {
#endif
const uint8_t interface_subclass =
iface_desc->interface.bInterfaceSubClass;
- LOG4CXX_INFO(logger_,
- "USB interface number "
- << static_cast<int>(interface_number) << ", subclass "
- << std::hex << static_cast<int>(interface_subclass)
- << std::dec);
+ SDL_LOG_INFO("USB interface number "
+ << static_cast<int>(interface_number) << ", subclass "
+ << std::hex << static_cast<int>(interface_subclass)
+ << std::dec);
if (interface_subclass != 0xff) {
continue;
}
@@ -370,10 +365,9 @@ bool UsbConnection::OpenEndpoints() {
if ((attributes & 0x03) == USB_ATTRIB_BULK) {
const uint8_t endpoint_address =
endpoint_desc->endpoint.bEndpointAddress;
- LOG4CXX_INFO(logger_,
- "Endpoint with address "
- << std::hex << static_cast<int>(endpoint_address)
- << std::dec << " found");
+ SDL_LOG_INFO("Endpoint with address "
+ << std::hex << static_cast<int>(endpoint_address)
+ << std::dec << " found");
if (endpoint_address & USB_ENDPOINT_IN) {
if (NULL == in_endpoint_desc) {
in_endpoint_desc = endpoint_desc;
@@ -396,13 +390,13 @@ bool UsbConnection::OpenEndpoints() {
int open_pipe_rc = usbd_open_pipe(usbd_device_, in_endpoint_desc, &in_pipe_);
if (EOK != open_pipe_rc) {
- LOG4CXX_ERROR(logger_, "Cannot open input pipe, error " << open_pipe_rc);
+ SDL_LOG_ERROR("Cannot open input pipe, error " << open_pipe_rc);
return false;
}
open_pipe_rc = usbd_open_pipe(usbd_device_, out_endpoint_desc, &out_pipe_);
if (EOK != open_pipe_rc) {
- LOG4CXX_ERROR(logger_, "Cannot open output pipe, error " << open_pipe_rc);
+ SDL_LOG_ERROR("Cannot open output pipe, error " << open_pipe_rc);
return false;
}
diff --git a/src/components/transport_manager/src/usb/qnx/usb_handler.cc b/src/components/transport_manager/src/usb/qnx/usb_handler.cc
index 9ac4a40d92..2381daa15a 100644
--- a/src/components/transport_manager/src/usb/qnx/usb_handler.cc
+++ b/src/components/transport_manager/src/usb/qnx/usb_handler.cc
@@ -46,7 +46,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
namespace {
UsbHandler* usb_handler;
@@ -65,24 +65,17 @@ UsbHandler::~UsbHandler() {
if (usbd_general_connection_) {
const int disconnect_rc = usbd_disconnect(usbd_general_connection_);
if (EOK != disconnect_rc) {
- LOG4CXX_ERROR(logger_,
- "usbd_disconnect failed, error code " << disconnect_rc);
+ SDL_LOG_ERROR("usbd_disconnect failed, error code " << disconnect_rc);
}
}
if (usbd_aoa_connection_) {
const int disconnect_rc = usbd_disconnect(usbd_aoa_connection_);
if (EOK != disconnect_rc) {
- LOG4CXX_ERROR(logger_,
- "usbd_disconnect failed, error code " << disconnect_rc);
+ SDL_LOG_ERROR("usbd_disconnect failed, error code " << disconnect_rc);
}
}
}
-bool operator==(const usbd_device_instance_t& a,
- const usbd_device_instance_t& b) {
- return a.path == b.path && a.devno == b.devno;
-}
-
void UsbHandler::DeviceArrived(usbd_connection* connection,
usbd_device_instance_t* instance) {
for (Devices::const_iterator it = devices_.begin(); it != devices_.end();
@@ -93,7 +86,7 @@ void UsbHandler::DeviceArrived(usbd_connection* connection,
usbd_device* device_usbd = 0;
const int attach_rc = usbd_attach(connection, instance, 0, &device_usbd);
if (EOK != attach_rc) {
- LOG4CXX_ERROR(logger_, "usbd_attach failed: " << attach_rc);
+ SDL_LOG_ERROR("usbd_attach failed: " << attach_rc);
return;
}
@@ -101,7 +94,7 @@ void UsbHandler::DeviceArrived(usbd_connection* connection,
usbd_device_descriptor_t* descriptor =
usbd_device_descriptor(device_usbd, &node);
if (NULL == descriptor) {
- LOG4CXX_ERROR(logger_, "usbd_device_descriptor failed");
+ SDL_LOG_ERROR("usbd_device_descriptor failed");
return;
}
@@ -139,7 +132,7 @@ void UsbHandler::DeviceLeft(usbd_device_instance_t* instance) {
if ((*it)->GetDeviceInstance() == *instance) {
const int detach_rc = usbd_detach((*it)->GetUsbdDevice());
if (EOK != detach_rc)
- LOG4CXX_ERROR(logger_, "usbd_detach failed: " << detach_rc);
+ SDL_LOG_ERROR("usbd_detach failed: " << detach_rc);
devices_.erase(it);
break;
}
@@ -153,14 +146,14 @@ void UsbHandler::StartControlTransferSequence(
usbd_descriptors_t* descriptor = usbd_parse_descriptors(
device->GetUsbdDevice(), NULL, USB_DESC_DEVICE, 0, NULL);
if (NULL == descriptor) {
- LOG4CXX_ERROR(logger_, "usbd_parse_descriptors failed");
+ SDL_LOG_ERROR("usbd_parse_descriptors failed");
}
usbd_pipe* usb_pipe = 0;
const int open_pipe_rc =
usbd_open_pipe(device->GetUsbdDevice(), descriptor, &usb_pipe);
if (EOK != open_pipe_rc) {
- LOG4CXX_ERROR(logger_, "usbd_open_pipe failed, error " << open_pipe_rc);
+ SDL_LOG_ERROR("usbd_open_pipe failed, error " << open_pipe_rc);
return;
}
@@ -172,14 +165,14 @@ void UsbHandler::StartControlTransferSequence(
usbd_urb* urb = usbd_alloc_urb(NULL);
if (NULL == urb) {
- LOG4CXX_ERROR(logger_, "usbd_alloc_urb failed");
+ SDL_LOG_ERROR("usbd_alloc_urb failed");
break;
}
unsigned char* buf =
static_cast<unsigned char*>(usbd_alloc(transfer->Length()));
if (NULL == buf) {
- LOG4CXX_ERROR(logger_, "usbd_alloc failed");
+ SDL_LOG_ERROR("usbd_alloc failed");
break;
}
@@ -216,7 +209,7 @@ void UsbHandler::StartControlTransferSequence(
static_cast<UsbControlInTransfer*>(transfer)->OnCompleted(buf);
}
} else {
- LOG4CXX_ERROR(logger_, "usbd_io failed, error " << io_rc);
+ SDL_LOG_ERROR("usbd_io failed, error " << io_rc);
submit_next = false;
}
usbd_free(buf);
@@ -233,12 +226,11 @@ void ArrivedCallback(usbd_connection* connection,
usbd_device_instance_t* instance) {
if (kAoaVid == instance->ident.vendor)
return;
- LOG4CXX_INFO(logger_,
- "USB device arrived (path "
- << static_cast<int>(instance->path) << ", devno "
- << static_cast<int>(instance->devno) << ", config "
- << static_cast<int>(instance->config) << ", iface "
- << static_cast<int>(instance->iface) << ")");
+ SDL_LOG_INFO("USB device arrived (path "
+ << static_cast<int>(instance->path) << ", devno "
+ << static_cast<int>(instance->devno) << ", config "
+ << static_cast<int>(instance->config) << ", iface "
+ << static_cast<int>(instance->iface) << ")");
usb_handler->DeviceArrived(connection, instance);
}
@@ -246,12 +238,11 @@ void ArrivedAoaCallback(usbd_connection* connection,
usbd_device_instance_t* instance) {
if (kAoaVid != instance->ident.vendor)
return;
- LOG4CXX_INFO(logger_,
- "USB AOA device arrived (path "
- << static_cast<int>(instance->path) << ", devno "
- << static_cast<int>(instance->devno) << ", config "
- << static_cast<int>(instance->config) << ", iface "
- << static_cast<int>(instance->iface) << ")");
+ SDL_LOG_INFO("USB AOA device arrived (path "
+ << static_cast<int>(instance->path) << ", devno "
+ << static_cast<int>(instance->devno) << ", config "
+ << static_cast<int>(instance->config) << ", iface "
+ << static_cast<int>(instance->iface) << ")");
usb_handler->DeviceArrived(connection, instance);
}
@@ -259,12 +250,11 @@ void LeftCallback(usbd_connection* connection,
usbd_device_instance_t* instance) {
if (kAoaVid == instance->ident.vendor)
return;
- LOG4CXX_INFO(logger_,
- "USB device left (path "
- << static_cast<int>(instance->path) << ", devno "
- << static_cast<int>(instance->devno) << ", config "
- << static_cast<int>(instance->config) << ", iface "
- << static_cast<int>(instance->iface) << ")");
+ SDL_LOG_INFO("USB device left (path "
+ << static_cast<int>(instance->path) << ", devno "
+ << static_cast<int>(instance->devno) << ", config "
+ << static_cast<int>(instance->config) << ", iface "
+ << static_cast<int>(instance->iface) << ")");
usb_handler->DeviceLeft(instance);
}
@@ -272,12 +262,11 @@ void LeftAoaCallback(usbd_connection* connection,
usbd_device_instance_t* instance) {
if (kAoaVid != instance->ident.vendor)
return;
- LOG4CXX_INFO(logger_,
- "USB AOA device left (path "
- << static_cast<int>(instance->path) << ", devno "
- << static_cast<int>(instance->devno) << ", config "
- << static_cast<int>(instance->config) << ", iface "
- << static_cast<int>(instance->iface) << ")");
+ SDL_LOG_INFO("USB AOA device left (path "
+ << static_cast<int>(instance->path) << ", devno "
+ << static_cast<int>(instance->devno) << ", config "
+ << static_cast<int>(instance->config) << ", iface "
+ << static_cast<int>(instance->iface) << ")");
usb_handler->DeviceLeft(instance);
}
@@ -295,7 +284,7 @@ TransportAdapter::Error UsbHandler::Init() {
const int connect_rc = usbd_connect(&cparms, &usbd_general_connection_);
if (EOK != connect_rc) {
- LOG4CXX_ERROR(logger_, "usbd_connect failed, error code " << connect_rc);
+ SDL_LOG_ERROR("usbd_connect failed, error code " << connect_rc);
return TransportAdapter::FAIL;
}
}
@@ -313,7 +302,7 @@ TransportAdapter::Error UsbHandler::Init() {
const int connect_rc = usbd_connect(&cparms, &usbd_aoa_connection_);
if (EOK != connect_rc) {
- LOG4CXX_ERROR(logger_, "usbd_connect failed, error code " << connect_rc);
+ SDL_LOG_ERROR("usbd_connect failed, error code " << connect_rc);
return TransportAdapter::FAIL;
}
}
diff --git a/src/components/transport_manager/src/usb/usb_aoa_adapter.cc b/src/components/transport_manager/src/usb/usb_aoa_adapter.cc
index 9ce571eb6c..a80ce341fa 100644
--- a/src/components/transport_manager/src/usb/usb_aoa_adapter.cc
+++ b/src/components/transport_manager/src/usb/usb_aoa_adapter.cc
@@ -42,7 +42,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
UsbAoaAdapter::UsbAoaAdapter(resumption::LastStateWrapperPtr last_state_wrapper,
const TransportManagerSettings& settings)
: TransportAdapterImpl(new UsbDeviceScanner(this, settings),
@@ -68,23 +68,21 @@ bool UsbAoaAdapter::IsInitialised() const {
}
TransportAdapter::Error UsbAoaAdapter::Init() {
- LOG4CXX_TRACE(logger_, "enter");
+ SDL_LOG_TRACE("enter");
TransportAdapter::Error error = usb_handler_->Init();
if (error != TransportAdapter::OK) {
- LOG4CXX_TRACE(logger_,
- "exit with error "
- << error << ". Condition: error != TransportAdapter::OK");
+ SDL_LOG_TRACE("exit with error "
+ << error << ". Condition: error != TransportAdapter::OK");
return error;
}
error = TransportAdapterImpl::Init();
if (error != TransportAdapter::OK) {
- LOG4CXX_TRACE(logger_,
- "exit with error "
- << error << ". Condition: error != TransportAdapter::OK");
+ SDL_LOG_TRACE("exit with error "
+ << error << ". Condition: error != TransportAdapter::OK");
return error;
}
is_initialised_ = true;
- LOG4CXX_TRACE(logger_, "exit with TransportAdapter::OK");
+ SDL_LOG_TRACE("exit with TransportAdapter::OK");
return TransportAdapter::OK;
}
diff --git a/src/components/transport_manager/src/usb/usb_connection_factory.cc b/src/components/transport_manager/src/usb/usb_connection_factory.cc
index 401dde2534..bf1635bd64 100644
--- a/src/components/transport_manager/src/usb/usb_connection_factory.cc
+++ b/src/components/transport_manager/src/usb/usb_connection_factory.cc
@@ -44,7 +44,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
UsbConnectionFactory::UsbConnectionFactory(
TransportAdapterController* controller)
@@ -60,15 +60,14 @@ void UsbConnectionFactory::SetUsbHandler(const UsbHandlerSptr usb_handler) {
TransportAdapter::Error UsbConnectionFactory::CreateConnection(
const DeviceUID& device_uid, const ApplicationHandle& app_handle) {
- LOG4CXX_TRACE(logger_,
- "enter DeviceUID: " << &device_uid
+ SDL_LOG_TRACE("enter DeviceUID: " << &device_uid
<< ", ApplicationHandle: " << &app_handle);
DeviceSptr device = controller_->FindDevice(device_uid);
if (device.use_count() == 0) {
- LOG4CXX_ERROR(logger_, "device " << device_uid << " not found");
- LOG4CXX_TRACE(logger_,
- "exit with TransportAdapter::BAD_PARAM. Condition: "
- "device.use_count() == 0");
+ SDL_LOG_ERROR("device " << device_uid << " not found");
+ SDL_LOG_TRACE(
+ "exit with TransportAdapter::BAD_PARAM. Condition: "
+ "device.use_count() == 0");
return TransportAdapter::BAD_PARAM;
}
@@ -81,15 +80,15 @@ TransportAdapter::Error UsbConnectionFactory::CreateConnection(
usb_device->usb_device());
controller_->ConnectionCreated(connection, device_uid, app_handle);
if (connection->Init()) {
- LOG4CXX_INFO(logger_, "USB connection initialised");
- LOG4CXX_TRACE(logger_,
- "exit with TransportAdapter::OK. Condition: USB connection "
- "initialised");
+ SDL_LOG_INFO("USB connection initialised");
+ SDL_LOG_TRACE(
+ "exit with TransportAdapter::OK. Condition: USB connection "
+ "initialised");
return TransportAdapter::OK;
} else {
- LOG4CXX_TRACE(logger_,
- "exit with TransportAdapter::FAIL. Condition: USB connection "
- "NOT initialised");
+ SDL_LOG_TRACE(
+ "exit with TransportAdapter::FAIL. Condition: USB connection "
+ "NOT initialised");
return TransportAdapter::FAIL;
}
}
diff --git a/src/components/transport_manager/src/usb/usb_device_scanner.cc b/src/components/transport_manager/src/usb/usb_device_scanner.cc
index 51d521c1bf..e2e2fecd6e 100644
--- a/src/components/transport_manager/src/usb/usb_device_scanner.cc
+++ b/src/components/transport_manager/src/usb/usb_device_scanner.cc
@@ -42,12 +42,12 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
class AoaInitSequence : public UsbControlTransferSequence {
public:
AoaInitSequence();
- AoaInitSequence(const TransportManagerSettings& settings);
+ explicit AoaInitSequence(const TransportManagerSettings& settings);
virtual ~AoaInitSequence() {}
private:
@@ -57,7 +57,7 @@ class AoaInitSequence : public UsbControlTransferSequence {
};
void UsbDeviceScanner::OnDeviceArrived(PlatformUsbDevice* device) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (IsAppleDevice(device)) {
SupportedDeviceFound(device);
} else {
@@ -70,8 +70,8 @@ void UsbDeviceScanner::OnDeviceArrived(PlatformUsbDevice* device) {
}
void UsbDeviceScanner::OnDeviceLeft(PlatformUsbDevice* device) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "PlatformUsbDevice " << device);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("PlatformUsbDevice " << device);
bool list_changed = false;
devices_mutex_.Acquire();
for (Devices::iterator it = devices_.begin(); it != devices_.end(); ++it) {
@@ -112,7 +112,7 @@ class AoaInitSequence::AoaGetProtocolRequest : public UsbControlInTransfer {
}
virtual bool OnCompleted(unsigned char* data) const {
const int protocol_version = data[1] << 8 | data[0];
- LOG4CXX_DEBUG(logger_, "AOA protocol version " << protocol_version);
+ SDL_LOG_DEBUG("AOA protocol version " << protocol_version);
if (protocol_version == 0) {
// AOA protocol not supported
return false;
@@ -192,26 +192,24 @@ AoaInitSequence::AoaInitSequence(const TransportManagerSettings& settings)
}
void UsbDeviceScanner::TurnIntoAccessoryMode(PlatformUsbDevice* device) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "PlatformUsbDevice: " << device);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("PlatformUsbDevice: " << device);
GetUsbHandler()->StartControlTransferSequence(new AoaInitSequence(settings_),
device);
}
void UsbDeviceScanner::SupportedDeviceFound(PlatformUsbDevice* device) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_TRACE(logger_, "PlatformUsbDevice: " << device);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_TRACE("PlatformUsbDevice: " << device);
devices_mutex_.Acquire();
devices_.push_back(device);
devices_mutex_.Release();
- LOG4CXX_DEBUG(logger_,
- "USB device (bus number "
- << static_cast<int>(device->bus_number()) << ", address "
- << static_cast<int>(device->address())
- << ") identified as: " << device->GetManufacturer() << ", "
- << device->GetProductName()
- << ", serial: " << device->GetSerialNumber());
+ SDL_LOG_DEBUG("USB device (bus number "
+ << static_cast<int>(device->bus_number()) << ", address "
+ << static_cast<int>(device->address()) << ") identified as: "
+ << device->GetManufacturer() << ", " << device->GetProductName()
+ << ", serial: " << device->GetSerialNumber());
UpdateList();
}
@@ -224,7 +222,7 @@ TransportAdapter::Error UsbDeviceScanner::Scan() {
}
void UsbDeviceScanner::UpdateList() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DeviceVector device_vector;
devices_mutex_.Acquire();
for (Devices::const_iterator it = devices_.begin(); it != devices_.end();
@@ -240,7 +238,7 @@ void UsbDeviceScanner::UpdateList() {
}
devices_mutex_.Release();
- LOG4CXX_DEBUG(logger_, "USB search done " << device_vector.size());
+ SDL_LOG_DEBUG("USB search done " << device_vector.size());
controller_->SearchDeviceDone(device_vector);
}
diff --git a/src/components/transport_manager/src/websocket_server/websocket_connection.cc b/src/components/transport_manager/src/websocket_server/websocket_connection.cc
index 7bcc4baef2..d10d456ca4 100644
--- a/src/components/transport_manager/src/websocket_server/websocket_connection.cc
+++ b/src/components/transport_manager/src/websocket_server/websocket_connection.cc
@@ -35,7 +35,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(wsc_logger_, "WebSocketConnection")
+SDL_CREATE_LOG_VARIABLE("WebSocketConnection")
using namespace boost::beast::websocket;
@@ -49,19 +49,17 @@ WebSocketConnection<WebSocketSession<> >::WebSocketConnection(
, app_handle_(app_handle)
, session_(new WebSocketSession<>(
std::move(socket),
- std::bind(
- &WebSocketConnection::DataReceive, this, std::placeholders::_1),
- std::bind(&WebSocketConnection::OnError, this)))
+ [this](Message frame) { DataReceive(frame); },
+ [this](Message frame) { DataSendDone(frame); },
+ [this](Message frame) { DataSendFailed(frame); },
+ [this]() { OnError(); }))
, controller_(controller)
, shutdown_(false)
, thread_delegate_(new LoopThreadDelegate(
&message_queue_,
- std::bind(&WebSocketSession<>::WriteDown,
- session_.get(),
- std::placeholders::_1),
- std::bind(&WebSocketConnection::OnError, this)))
+ [this](Message frame) { session_->WriteDown(frame); }))
, thread_(threads::CreateThread("WS Async Send", thread_delegate_)) {
- thread_->start(threads::ThreadOptions());
+ thread_->Start(threads::ThreadOptions());
}
#ifdef ENABLE_SECURITY
@@ -77,19 +75,17 @@ WebSocketConnection<WebSocketSecureSession<> >::WebSocketConnection(
, session_(new WebSocketSecureSession<>(
std::move(socket),
ctx,
- std::bind(
- &WebSocketConnection::DataReceive, this, std::placeholders::_1),
- std::bind(&WebSocketConnection::OnError, this)))
+ [this](Message frame) { DataReceive(frame); },
+ [this](Message frame) { DataSendDone(frame); },
+ [this](Message frame) { DataSendFailed(frame); },
+ [this]() { OnError(); }))
, controller_(controller)
, shutdown_(false)
, thread_delegate_(new LoopThreadDelegate(
&message_queue_,
- std::bind(&WebSocketSecureSession<>::WriteDown,
- session_.get(),
- std::placeholders::_1),
- std::bind(&WebSocketConnection::OnError, this)))
+ [this](Message frame) { session_->WriteDown(frame); }))
, thread_(threads::CreateThread("WS Async Send", thread_delegate_)) {
- thread_->start(threads::ThreadOptions());
+ thread_->Start(threads::ThreadOptions());
}
template class WebSocketConnection<WebSocketSecureSession<> >;
#endif // ENABLE_SECURITY
@@ -103,7 +99,17 @@ WebSocketConnection<Session>::~WebSocketConnection() {
template <typename Session>
void WebSocketConnection<Session>::OnError() {
- LOG4CXX_AUTO_TRACE(wsc_logger_);
+ SDL_LOG_AUTO_TRACE();
+
+ if (IsShuttingDown()) {
+ SDL_LOG_DEBUG("Session is shutting down...");
+ return;
+ }
+
+ Message message_ptr;
+ while (message_queue_.pop(message_ptr)) {
+ DataSendFailed(message_ptr);
+ }
controller_->ConnectionAborted(
device_uid_, app_handle_, CommunicationError());
@@ -113,7 +119,7 @@ void WebSocketConnection<Session>::OnError() {
template <typename Session>
TransportAdapter::Error WebSocketConnection<Session>::Disconnect() {
- LOG4CXX_AUTO_TRACE(wsc_logger_);
+ SDL_LOG_AUTO_TRACE();
if (!IsShuttingDown()) {
Shutdown();
controller_->DisconnectDone(device_uid_, app_handle_);
@@ -124,7 +130,7 @@ TransportAdapter::Error WebSocketConnection<Session>::Disconnect() {
template <typename Session>
TransportAdapter::Error WebSocketConnection<Session>::SendData(
- ::protocol_handler::RawMessagePtr message) {
+ Message message) {
if (IsShuttingDown()) {
return TransportAdapter::BAD_STATE;
}
@@ -135,25 +141,34 @@ TransportAdapter::Error WebSocketConnection<Session>::SendData(
}
template <typename Session>
-void WebSocketConnection<Session>::DataReceive(
- protocol_handler::RawMessagePtr frame) {
+void WebSocketConnection<Session>::DataReceive(Message frame) {
controller_->DataReceiveDone(device_uid_, app_handle_, frame);
}
template <typename Session>
+void WebSocketConnection<Session>::DataSendDone(Message frame) {
+ controller_->DataSendDone(device_uid_, app_handle_, frame);
+}
+
+template <typename Session>
+void WebSocketConnection<Session>::DataSendFailed(Message frame) {
+ controller_->DataSendFailed(device_uid_, app_handle_, frame, DataSendError());
+}
+
+template <typename Session>
void WebSocketConnection<Session>::Run() {
- LOG4CXX_AUTO_TRACE(wsc_logger_);
+ SDL_LOG_AUTO_TRACE();
session_->AsyncAccept();
}
template <typename Session>
void WebSocketConnection<Session>::Shutdown() {
- LOG4CXX_AUTO_TRACE(wsc_logger_);
+ SDL_LOG_AUTO_TRACE();
shutdown_ = true;
if (thread_delegate_) {
session_->Shutdown();
thread_delegate_->SetShutdown();
- thread_->join();
+ thread_->Stop(threads::Thread::kThreadSoftStop);
delete thread_delegate_;
thread_delegate_ = nullptr;
threads::DeleteThread(thread_);
@@ -169,11 +184,8 @@ bool WebSocketConnection<Session>::IsShuttingDown() {
template <typename Session>
WebSocketConnection<Session>::LoopThreadDelegate::LoopThreadDelegate(
MessageQueue<Message, AsyncQueue>* message_queue,
- DataWriteCallback data_write,
- OnIOErrorCallback on_io_error)
- : message_queue_(*message_queue)
- , data_write_(data_write)
- , on_io_error_(on_io_error) {}
+ DataWriteCallback data_write)
+ : message_queue_(*message_queue), data_write_(data_write) {}
template <typename Session>
void WebSocketConnection<Session>::LoopThreadDelegate::threadMain() {
@@ -186,22 +198,14 @@ void WebSocketConnection<Session>::LoopThreadDelegate::threadMain() {
template <typename Session>
void WebSocketConnection<Session>::LoopThreadDelegate::exitThreadMain() {
- if (!message_queue_.IsShuttingDown()) {
- message_queue_.Shutdown();
- }
+ SetShutdown();
}
template <typename Session>
void WebSocketConnection<Session>::LoopThreadDelegate::DrainQueue() {
Message message_ptr;
while (!message_queue_.IsShuttingDown() && message_queue_.pop(message_ptr)) {
- auto res = data_write_(message_ptr);
- if (TransportAdapter::FAIL == res) {
- LOG4CXX_WARN(wsc_logger_,
- "Writing to websocket stream failed. Will now close "
- "websocket connection.");
- on_io_error_();
- }
+ data_write_(message_ptr);
}
}
diff --git a/src/components/transport_manager/src/websocket_server/websocket_device.cc b/src/components/transport_manager/src/websocket_server/websocket_device.cc
index 502daf349b..401c242caf 100644
--- a/src/components/transport_manager/src/websocket_server/websocket_device.cc
+++ b/src/components/transport_manager/src/websocket_server/websocket_device.cc
@@ -37,7 +37,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
+SDL_CREATE_LOG_VARIABLE("TransportManager")
WebSocketDevice::WebSocketDevice(const std::string& name,
const DeviceUID& unique_device_id)
@@ -46,7 +46,7 @@ WebSocketDevice::WebSocketDevice(const std::string& name,
, protocol_(boost::asio::ip::tcp::v4()) {}
bool WebSocketDevice::IsSameAs(const Device* other) const {
- LOG4CXX_TRACE(logger_, "enter. device: " << other);
+ SDL_LOG_TRACE("enter. device: " << other);
const WebSocketDevice* other_websocket_device =
dynamic_cast<const WebSocketDevice*>(other);
diff --git a/src/components/transport_manager/src/websocket_server/websocket_listener.cc b/src/components/transport_manager/src/websocket_server/websocket_listener.cc
index 87fff3acbc..fed29fbfb4 100644
--- a/src/components/transport_manager/src/websocket_server/websocket_listener.cc
+++ b/src/components/transport_manager/src/websocket_server/websocket_listener.cc
@@ -5,7 +5,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "WebSocketListener")
+SDL_CREATE_LOG_VARIABLE("WebSocketListener")
WebSocketListener::WebSocketListener(TransportAdapterController* controller,
const TransportManagerSettings& settings,
@@ -29,7 +29,7 @@ WebSocketListener::~WebSocketListener() {
}
TransportAdapter::Error WebSocketListener::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto old_shutdown_value = shutdown_.exchange(false);
if (old_shutdown_value) {
ioc_.restart();
@@ -39,12 +39,12 @@ TransportAdapter::Error WebSocketListener::Init() {
}
void WebSocketListener::Terminate() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
Shutdown();
}
TransportAdapter::Error WebSocketListener::StartListening() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (acceptor_.is_open()) {
return TransportAdapter::OK;
}
@@ -65,8 +65,7 @@ TransportAdapter::Error WebSocketListener::StartListening() {
acceptor_.open(endpoint.protocol(), ec);
if (ec) {
auto str_err = "ErrorOpen: " + ec.message();
- LOG4CXX_ERROR(logger_,
- str_err << " host/port: " << endpoint.address().to_string()
+ SDL_LOG_ERROR(str_err << " host/port: " << endpoint.address().to_string()
<< "/" << endpoint.port());
return TransportAdapter::FAIL;
}
@@ -74,8 +73,7 @@ TransportAdapter::Error WebSocketListener::StartListening() {
acceptor_.set_option(boost::asio::socket_base::reuse_address(true), ec);
if (ec) {
std::string str_err = "ErrorSetOption: " + ec.message();
- LOG4CXX_ERROR(logger_,
- str_err << " host/port: " << endpoint.address().to_string()
+ SDL_LOG_ERROR(str_err << " host/port: " << endpoint.address().to_string()
<< "/" << endpoint.port());
return TransportAdapter::FAIL;
}
@@ -84,8 +82,7 @@ TransportAdapter::Error WebSocketListener::StartListening() {
acceptor_.bind(endpoint, ec);
if (ec) {
std::string str_err = "ErrorBind: " + ec.message();
- LOG4CXX_ERROR(logger_,
- str_err << " host/port: " << endpoint.address().to_string()
+ SDL_LOG_ERROR(str_err << " host/port: " << endpoint.address().to_string()
<< "/" << endpoint.port());
return TransportAdapter::FAIL;
}
@@ -94,8 +91,7 @@ TransportAdapter::Error WebSocketListener::StartListening() {
acceptor_.listen(boost::asio::socket_base::max_listen_connections, ec);
if (ec) {
std::string str_err = "ErrorListen: " + ec.message();
- LOG4CXX_ERROR(logger_,
- str_err << " host/port: " << endpoint.address().to_string()
+ SDL_LOG_ERROR(str_err << " host/port: " << endpoint.address().to_string()
<< "/" << endpoint.port());
return TransportAdapter::FAIL;
}
@@ -109,20 +105,20 @@ TransportAdapter::Error WebSocketListener::StartListening() {
#ifdef ENABLE_SECURITY
TransportAdapter::Error WebSocketListener::AddCertificateAuthority() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const auto cert_path = settings_.ws_server_cert_path();
- LOG4CXX_DEBUG(logger_, "Path to certificate : " << cert_path);
+ SDL_LOG_DEBUG("Path to certificate : " << cert_path);
const auto key_path = settings_.ws_server_key_path();
- LOG4CXX_DEBUG(logger_, "Path to key : " << key_path);
+ SDL_LOG_DEBUG("Path to key : " << key_path);
const auto ca_cert_path = settings_.ws_server_ca_cert_path();
- LOG4CXX_DEBUG(logger_, "Path to ca cert : " << ca_cert_path);
+ SDL_LOG_DEBUG("Path to ca cert : " << ca_cert_path);
start_secure_ = settings_.wss_server_supported();
if (start_secure_ && (!file_system::FileExists(cert_path) ||
!file_system::FileExists(key_path) ||
!file_system::FileExists(ca_cert_path))) {
- LOG4CXX_ERROR(logger_, "Certificate or key file not found");
+ SDL_LOG_ERROR("Certificate or key file not found");
return TransportAdapter::FAIL;
}
@@ -131,12 +127,11 @@ TransportAdapter::Error WebSocketListener::AddCertificateAuthority() {
const std::string config_name) {
bool start_unsecure = config.empty();
if (!start_unsecure) {
- LOG4CXX_ERROR(logger_,
- "Configuration for secure WS is incomplete. "
- << config_name
- << " config is "
- "present, meanwhile others may be missing. Please "
- "check INI file");
+ SDL_LOG_ERROR("Configuration for secure WS is incomplete. "
+ << config_name
+ << " config is "
+ "present, meanwhile others may be missing. Please "
+ "check INI file");
}
return start_unsecure;
};
@@ -146,7 +141,7 @@ TransportAdapter::Error WebSocketListener::AddCertificateAuthority() {
return TransportAdapter::FAIL;
}
} else {
- LOG4CXX_INFO(logger_, "WebSocket server will start secure connection");
+ SDL_LOG_INFO("WebSocket server will start secure connection");
ctx_.add_verify_path(cert_path);
ctx_.set_options(boost::asio::ssl::context::default_workarounds);
using context = boost::asio::ssl::context_base;
@@ -155,16 +150,14 @@ TransportAdapter::Error WebSocketListener::AddCertificateAuthority() {
ctx_.use_certificate_chain_file(cert_path, sec_ec);
ctx_.load_verify_file(ca_cert_path);
if (sec_ec) {
- LOG4CXX_ERROR(
- logger_,
+ SDL_LOG_ERROR(
"Loading WS server certificate failed: " << sec_ec.message());
return TransportAdapter::FAIL;
}
sec_ec.clear();
ctx_.use_private_key_file(key_path, context::pem, sec_ec);
if (sec_ec) {
- LOG4CXX_ERROR(logger_,
- "Loading WS server key failed: " << sec_ec.message());
+ SDL_LOG_ERROR("Loading WS server key failed: " << sec_ec.message());
return TransportAdapter::FAIL;
}
}
@@ -174,19 +167,19 @@ TransportAdapter::Error WebSocketListener::AddCertificateAuthority() {
#endif // ENABLE_SECURITY
bool WebSocketListener::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const bool is_connection_open = WaitForConnection();
if (is_connection_open) {
boost::asio::post(*io_pool_.get(), [&]() { ioc_.run(); });
} else {
- LOG4CXX_ERROR(logger_, "Connection is shutdown or acceptor isn't open");
+ SDL_LOG_ERROR("Connection is shutdown or acceptor isn't open");
}
return is_connection_open;
}
bool WebSocketListener::WaitForConnection() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!shutdown_ && acceptor_.is_open()) {
acceptor_.async_accept(
socket_,
@@ -202,7 +195,7 @@ void WebSocketListener::ProcessConnection(
std::shared_ptr<WebSocketConnection<WebSocketSession<> > > connection,
const DeviceSptr device,
const ApplicationHandle app_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
controller_->ConnectionCreated(
connection, device->unique_device_id(), app_handle);
@@ -223,7 +216,7 @@ void WebSocketListener::ProcessConnection(
std::shared_ptr<WebSocketConnection<WebSocketSecureSession<> > > connection,
const DeviceSptr device,
const ApplicationHandle app_handle) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
controller_->ConnectionCreated(
connection, device->unique_device_id(), app_handle);
@@ -240,10 +233,10 @@ void WebSocketListener::ProcessConnection(
#endif // ENABLE_SECURITY
void WebSocketListener::StartSession(boost::system::error_code ec) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (ec) {
std::string str_err = "ErrorAccept: " + ec.message();
- LOG4CXX_ERROR(logger_, str_err);
+ SDL_LOG_ERROR(str_err);
return;
}
@@ -257,7 +250,7 @@ void WebSocketListener::StartSession(boost::system::error_code ec) {
std::static_pointer_cast<WebSocketDevice>(
controller_->GetWebEngineDevice());
- LOG4CXX_INFO(logger_, "Connected client: " << app_handle);
+ SDL_LOG_INFO("Connected client: " << app_handle);
#ifdef ENABLE_SECURITY
if (start_secure_) {
@@ -279,7 +272,7 @@ void WebSocketListener::StartSession(boost::system::error_code ec) {
}
void WebSocketListener::Shutdown() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (false == shutdown_.exchange(true)) {
ioc_.stop();
socket_.close();
@@ -287,7 +280,7 @@ void WebSocketListener::Shutdown() {
acceptor_.close(ec);
if (ec) {
- LOG4CXX_ERROR(logger_, "Acceptor closed with error: " << ec);
+ SDL_LOG_ERROR("Acceptor closed with error: " << ec);
}
io_pool_->stop();
diff --git a/src/components/transport_manager/src/websocket_server/websocket_secure_session.cc b/src/components/transport_manager/src/websocket_server/websocket_secure_session.cc
index 9be94119b6..a533bdcffc 100644
--- a/src/components/transport_manager/src/websocket_server/websocket_secure_session.cc
+++ b/src/components/transport_manager/src/websocket_server/websocket_secure_session.cc
@@ -35,6 +35,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace transport_manager {
namespace transport_adapter {
+SDL_CREATE_LOG_VARIABLE("WebSocketSecureSession")
+
using namespace boost::beast::websocket;
template <typename ExecutorType>
@@ -42,13 +44,19 @@ WebSocketSecureSession<ExecutorType>::WebSocketSecureSession(
tcp::socket socket,
ssl::context& ctx,
DataReceiveCallback data_receive,
+ DataSendDoneCallback data_send_done,
+ DataSendFailedCallback data_send_failed,
OnIOErrorCallback on_error)
- : WebSocketSession<ExecutorType>(
- std::move(socket), ctx, data_receive, on_error) {}
+ : WebSocketSession<ExecutorType>(std::move(socket),
+ ctx,
+ data_receive,
+ data_send_done,
+ data_send_failed,
+ on_error) {}
template <typename ExecutorType>
void WebSocketSecureSession<ExecutorType>::AsyncAccept() {
- LOG4CXX_AUTO_TRACE(ws_logger_);
+ SDL_LOG_AUTO_TRACE();
// Perform the SSL handshake
WebSocketSecureSession<ExecutorType>::ws_.next_layer().async_handshake(
ssl::stream_base::server,
@@ -62,10 +70,10 @@ void WebSocketSecureSession<ExecutorType>::AsyncAccept() {
template <typename ExecutorType>
void WebSocketSecureSession<ExecutorType>::AsyncHandshake(
boost::system::error_code ec) {
- LOG4CXX_AUTO_TRACE(ws_logger_);
+ SDL_LOG_AUTO_TRACE();
if (ec) {
auto str_err = "ErrorMessage: " + ec.message();
- LOG4CXX_ERROR(ws_logger_, str_err);
+ SDL_LOG_ERROR(str_err);
WebSocketSession<ExecutorType>::on_io_error_();
return;
}
diff --git a/src/components/transport_manager/src/websocket_server/websocket_server_transport_adapter.cc b/src/components/transport_manager/src/websocket_server/websocket_server_transport_adapter.cc
index ac8789eee8..68f23a6326 100644
--- a/src/components/transport_manager/src/websocket_server/websocket_server_transport_adapter.cc
+++ b/src/components/transport_manager/src/websocket_server/websocket_server_transport_adapter.cc
@@ -48,7 +48,7 @@
namespace transport_manager {
namespace transport_adapter {
-CREATE_LOGGERPTR_GLOBAL(logger_, "WebSocketTransportAdapter")
+SDL_CREATE_LOG_VARIABLE("WebSocketTransportAdapter")
WebSocketServerTransportAdapter::WebSocketServerTransportAdapter(
resumption::LastStateWrapperPtr last_state_wrapper,
@@ -63,7 +63,7 @@ WebSocketServerTransportAdapter::~WebSocketServerTransportAdapter() {}
void WebSocketServerTransportAdapter::TransportConfigUpdated(
const TransportConfig& new_config) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
transport_config_ = new_config;
@@ -74,7 +74,7 @@ void WebSocketServerTransportAdapter::TransportConfigUpdated(
TransportConfig WebSocketServerTransportAdapter::GetTransportConfiguration()
const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return transport_config_;
}
@@ -83,14 +83,14 @@ DeviceType WebSocketServerTransportAdapter::GetDeviceType() const {
}
DeviceSptr WebSocketServerTransportAdapter::AddDevice(DeviceSptr device) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
webengine_device_ = device;
Store();
return TransportAdapterImpl::AddDevice(webengine_device_);
}
TransportAdapter::Error WebSocketServerTransportAdapter::Init() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (webengine_device_) {
AddDevice(webengine_device_);
}
@@ -98,12 +98,12 @@ TransportAdapter::Error WebSocketServerTransportAdapter::Init() {
}
void WebSocketServerTransportAdapter::Store() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (webengine_device_) {
Json::Value& dictionary = last_state().get_dictionary();
if (dictionary["TransportManager"].isMember("WebsocketServerAdapter")) {
- LOG4CXX_DEBUG(
- logger_, "WebsocketServerAdapter already exists. Storing is skipped");
+ SDL_LOG_DEBUG(
+ "WebsocketServerAdapter already exists. Storing is skipped");
return;
}
@@ -118,7 +118,7 @@ void WebSocketServerTransportAdapter::Store() const {
}
bool WebSocketServerTransportAdapter::Restore() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const Json::Value& dictionary = last_state().get_dictionary();
const Json::Value ws_adapter_dictionary =
dictionary["TransportManager"]["WebsocketServerAdapter"];
@@ -133,7 +133,7 @@ bool WebSocketServerTransportAdapter::Restore() {
}
std::string WebSocketServerTransportAdapter::GetStoredDeviceID() const {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return webengine_device_id_;
}
diff --git a/src/components/transport_manager/src/websocket_server/websocket_session.cc b/src/components/transport_manager/src/websocket_server/websocket_session.cc
index ab62530963..8a05b9d9aa 100644
--- a/src/components/transport_manager/src/websocket_server/websocket_session.cc
+++ b/src/components/transport_manager/src/websocket_server/websocket_session.cc
@@ -35,17 +35,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace transport_manager {
namespace transport_adapter {
+SDL_CREATE_LOG_VARIABLE("WebSocketSession")
+
using namespace boost::beast::websocket;
template <>
WebSocketSession<tcp::socket&>::WebSocketSession(
boost::asio::ip::tcp::socket socket,
DataReceiveCallback data_receive,
+ DataSendDoneCallback data_send_done,
+ DataSendFailedCallback data_send_failed,
OnIOErrorCallback on_error)
: socket_(std::move(socket))
, ws_(socket_)
, strand_(ws_.get_executor())
, data_receive_(data_receive)
+ , data_send_done_(data_send_done)
+ , data_send_failed_(data_send_failed)
, on_io_error_(on_error) {
ws_.binary(true);
}
@@ -56,11 +62,15 @@ WebSocketSession<ssl::stream<tcp::socket&> >::WebSocketSession(
boost::asio::ip::tcp::socket socket,
ssl::context& ctx,
DataReceiveCallback data_receive,
+ DataSendDoneCallback data_send_done,
+ DataSendFailedCallback data_send_failed,
OnIOErrorCallback on_error)
: socket_(std::move(socket))
, ws_(socket_, ctx)
, strand_(ws_.get_executor())
, data_receive_(data_receive)
+ , data_send_done_(data_send_done)
+ , data_send_failed_(data_send_failed)
, on_io_error_(on_error) {
ws_.binary(true);
}
@@ -72,7 +82,7 @@ WebSocketSession<ExecutorType>::~WebSocketSession() {}
template <typename ExecutorType>
void WebSocketSession<ExecutorType>::AsyncAccept() {
- LOG4CXX_AUTO_TRACE(ws_logger_);
+ SDL_LOG_AUTO_TRACE();
ws_.async_accept(
boost::asio::bind_executor(strand_,
std::bind(&WebSocketSession::AsyncRead,
@@ -82,10 +92,10 @@ void WebSocketSession<ExecutorType>::AsyncAccept() {
template <typename ExecutorType>
void WebSocketSession<ExecutorType>::AsyncRead(boost::system::error_code ec) {
- LOG4CXX_AUTO_TRACE(ws_logger_);
+ SDL_LOG_AUTO_TRACE();
if (ec) {
auto str_err = "ErrorMessage: " + ec.message();
- LOG4CXX_ERROR(ws_logger_, str_err);
+ SDL_LOG_ERROR(str_err);
return;
}
@@ -98,26 +108,26 @@ void WebSocketSession<ExecutorType>::AsyncRead(boost::system::error_code ec) {
}
template <typename ExecutorType>
-TransportAdapter::Error WebSocketSession<ExecutorType>::WriteDown(
- ::protocol_handler::RawMessagePtr message) {
+void WebSocketSession<ExecutorType>::WriteDown(Message message) {
boost::system::error_code ec;
ws_.write(boost::asio::buffer(message->data(), message->data_size()), ec);
if (ec) {
- LOG4CXX_ERROR(ws_logger_, "A system error has occurred: " << ec.message());
- return TransportAdapter::FAIL;
+ SDL_LOG_ERROR("A system error has occurred: " << ec.message());
+ data_send_failed_(message);
+ on_io_error_();
+ return;
}
-
- return TransportAdapter::OK;
+ data_send_done_(message);
}
template <typename ExecutorType>
void WebSocketSession<ExecutorType>::Read(boost::system::error_code ec,
std::size_t bytes_transferred) {
- LOG4CXX_AUTO_TRACE(ws_logger_);
+ SDL_LOG_AUTO_TRACE();
boost::ignore_unused(bytes_transferred);
if (ec) {
- LOG4CXX_ERROR(ws_logger_, ec.message());
+ SDL_LOG_ERROR(ec.message());
buffer_.consume(buffer_.size());
on_io_error_();
return;
@@ -127,12 +137,11 @@ void WebSocketSession<ExecutorType>::Read(boost::system::error_code ec,
const auto data = boost::asio::buffer_cast<const uint8_t*>(
boost::beast::buffers_front(buffer_.data()));
- LOG4CXX_DEBUG(ws_logger_,
- "Msg: " << boost::beast::buffers_to_string(buffer_.data())
+ SDL_LOG_DEBUG("Msg: " << boost::beast::buffers_to_string(buffer_.data())
<< " Size: " << size;);
- ::protocol_handler::RawMessagePtr frame(
- new protocol_handler::RawMessage(0, 0, data, size, false));
+ auto frame =
+ std::make_shared<protocol_handler::RawMessage>(0, 0, data, size, false);
data_receive_(frame);
@@ -142,7 +151,7 @@ void WebSocketSession<ExecutorType>::Read(boost::system::error_code ec,
template <typename ExecutorType>
bool WebSocketSession<ExecutorType>::Shutdown() {
- LOG4CXX_AUTO_TRACE(ws_logger_);
+ SDL_LOG_AUTO_TRACE();
boost::system::error_code ec;
if (socket_.is_open()) {
socket_.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ec);
@@ -150,7 +159,7 @@ bool WebSocketSession<ExecutorType>::Shutdown() {
}
buffer_.consume(buffer_.size());
if (ec) {
- LOG4CXX_ERROR(ws_logger_, ec.message());
+ SDL_LOG_ERROR(ec.message());
return false;
}
return true;
diff --git a/src/components/transport_manager/test/include/transport_manager/raw_message_matcher.h b/src/components/transport_manager/test/include/transport_manager/raw_message_matcher.h
index 2ee699096f..5aedfd58aa 100644
--- a/src/components/transport_manager/test/include/transport_manager/raw_message_matcher.h
+++ b/src/components/transport_manager/test/include/transport_manager/raw_message_matcher.h
@@ -55,7 +55,8 @@ class RawMessageMatcher : public MatcherInterface<RawMessagePtr> {
public:
explicit RawMessageMatcher(RawMessagePtr ptr);
- virtual bool MatchAndExplain(const RawMessagePtr ptr,
+ DEPRECATED
+ virtual bool MatchAndExplain(const RawMessagePtr msg,
MatchResultListener* listener) const;
virtual void DescribeTo(std::ostream* os) const;
virtual void DescribeNegationTo(std::ostream* os) const;
diff --git a/src/components/transport_manager/test/network_interface_listener_test.cc b/src/components/transport_manager/test/network_interface_listener_test.cc
index c6e007b62a..b2d9cbb51e 100644
--- a/src/components/transport_manager/test/network_interface_listener_test.cc
+++ b/src/components/transport_manager/test/network_interface_listener_test.cc
@@ -30,24 +30,10 @@ class NetworkInterfaceListenerTest : public ::testing::Test {
virtual ~NetworkInterfaceListenerTest() {}
protected:
- struct InterfaceEntry {
- const char* name;
- const char* ipv4_address;
- const char* ipv6_address;
- unsigned int flags;
- };
-
void Deinit() {
delete interface_listener_impl_;
}
- void SleepFor(long msec) const {
- if (msec > 0) {
- struct timespec ts = {0, msec * 1000 * 1000};
- nanosleep(&ts, NULL);
- }
- }
-
NetworkInterfaceListenerImpl* interface_listener_impl_;
MockTcpClientListener mock_tcp_client_listener_;
};
diff --git a/src/components/transport_manager/test/platform_specific/linux/linux_network_interface_listener_test.cc b/src/components/transport_manager/test/platform_specific/linux/linux_network_interface_listener_test.cc
index 97c8fac9c9..befba30fbd 100644
--- a/src/components/transport_manager/test/platform_specific/linux/linux_network_interface_listener_test.cc
+++ b/src/components/transport_manager/test/platform_specific/linux/linux_network_interface_listener_test.cc
@@ -32,6 +32,7 @@ class NetworkInterfaceListenerTest : public ::testing::Test {
protected:
struct InterfaceEntry {
const char* name;
+ const unsigned int index;
const char* ipv4_address;
const char* ipv6_address;
unsigned int flags;
@@ -48,8 +49,9 @@ class NetworkInterfaceListenerTest : public ::testing::Test {
delete interface_listener_impl_;
}
- void SetDummyInterfaceTable(struct InterfaceEntry* entries) {
+ void SetDummyInterfaceTable(const struct InterfaceEntry* entries) {
InterfaceStatusTable dummy_table;
+ std::map<unsigned int, std::string> dummy_name_map;
while (entries->name != NULL) {
InterfaceStatus status;
@@ -63,13 +65,16 @@ class NetworkInterfaceListenerTest : public ::testing::Test {
ASSERT_EQ(1, inet_pton(AF_INET6, entries->ipv6_address, &addr6));
status.SetIPv6Address(&addr6);
}
+ status.SetName(entries->name);
status.SetFlags(entries->flags);
- dummy_table.insert(std::make_pair(entries->name, status));
+ dummy_table.insert(std::make_pair(entries->index, status));
+ dummy_name_map[entries->index] = std::string(entries->name);
entries++;
}
interface_listener_impl_->OverwriteStatusTable(dummy_table);
+ interface_listener_impl_->SetDummyNameMap(dummy_name_map);
}
void SleepFor(long msec) const {
@@ -108,8 +113,8 @@ TEST_F(NetworkInterfaceListenerTest, Start_success) {
EXPECT_TRUE(interface_listener_impl_->Init());
struct InterfaceEntry entries[] = {
- {"dummy_int0", "1.2.3.4", NULL, IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ {"dummy_int0", 1, "1.2.3.4", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
SetDummyInterfaceTable(entries);
// after stated, it is expected that the listener notifies current IP address
@@ -124,7 +129,7 @@ TEST_F(NetworkInterfaceListenerTest, Start_success) {
// the "isThreadRunning_" flag of the thread will be update slightly later
SleepFor(kThreadStartWaitMsec);
- EXPECT_TRUE(interface_listener_impl_->GetThread()->is_running());
+ EXPECT_TRUE(interface_listener_impl_->GetThread()->IsRunning());
EXPECT_TRUE(waiter.WaitFor(1, kStartNotificationTimeoutMsec));
@@ -161,7 +166,7 @@ TEST_F(NetworkInterfaceListenerTest, Stop_success) {
EXPECT_TRUE(interface_listener_impl_->Stop());
SleepFor(kThreadStartWaitMsec);
- EXPECT_FALSE(interface_listener_impl_->GetThread()->is_running());
+ EXPECT_FALSE(interface_listener_impl_->GetThread()->IsRunning());
Deinit();
}
@@ -198,11 +203,11 @@ TEST_F(NetworkInterfaceListenerTest, DesignatedInterface_IPAddressChanged) {
EXPECT_TRUE(interface_listener_impl_->Init());
struct InterfaceEntry entries1[] = {
- {"dummy_int0", "1.2.3.4", NULL, IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ {"dummy_int0", 1, "1.2.3.4", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
struct InterfaceEntry entries2[] = {
- {"dummy_int0", "5.6.7.8", NULL, IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ {"dummy_int0", 1, "5.6.7.8", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
SetDummyInterfaceTable(entries1);
@@ -230,13 +235,13 @@ TEST_F(NetworkInterfaceListenerTest, DesignatedInterface_IPAddressNotChanged) {
EXPECT_TRUE(interface_listener_impl_->Init());
struct InterfaceEntry entries1[] = {
- {"dummy_int0", "1.2.3.4", NULL, IFF_UP | IFF_RUNNING},
- {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ {"dummy_int0", 1, "1.2.3.4", NULL, IFF_UP | IFF_RUNNING},
+ {"dummy_int1", 2, "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
struct InterfaceEntry entries2[] = {
- {"dummy_int0", "1.2.3.4", NULL, IFF_UP | IFF_RUNNING},
- {"dummy_int1", "172.16.23.30", NULL, IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ {"dummy_int0", 1, "1.2.3.4", NULL, IFF_UP | IFF_RUNNING},
+ {"dummy_int1", 2, "172.16.23.30", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
SetDummyInterfaceTable(entries1);
@@ -261,13 +266,13 @@ TEST_F(NetworkInterfaceListenerTest, DesignatedInterface_GoesUnavailable) {
EXPECT_TRUE(interface_listener_impl_->Init());
struct InterfaceEntry entries1[] = {
- {"dummy_int0", "1.2.3.4", "fdc2:12af:327a::1", IFF_UP | IFF_RUNNING},
- {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ {"dummy_int0", 1, "1.2.3.4", "fdc2:12af:327a::1", IFF_UP | IFF_RUNNING},
+ {"dummy_int1", 2, "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
struct InterfaceEntry entries2[] = {
- {"dummy_int0", "1.2.3.4", "fdc2:12af:327a::1", IFF_UP},
- {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ {"dummy_int0", 1, "1.2.3.4", "fdc2:12af:327a::1", IFF_UP},
+ {"dummy_int1", 2, "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
SetDummyInterfaceTable(entries1);
@@ -292,12 +297,12 @@ TEST_F(NetworkInterfaceListenerTest, DesignatedInterface_Removed) {
EXPECT_TRUE(interface_listener_impl_->Init());
struct InterfaceEntry entries1[] = {
- {"dummy_int0", "1.2.3.4", "fdc2:12af:327a::1", IFF_UP | IFF_RUNNING},
- {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ {"dummy_int0", 1, "1.2.3.4", "fdc2:12af:327a::1", IFF_UP | IFF_RUNNING},
+ {"dummy_int1", 2, "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
struct InterfaceEntry entries2[] = {
- {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ {"dummy_int1", 2, "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
SetDummyInterfaceTable(entries1);
@@ -322,12 +327,12 @@ TEST_F(NetworkInterfaceListenerTest, DesignatedInterface_Added) {
EXPECT_TRUE(interface_listener_impl_->Init());
struct InterfaceEntry entries1[] = {
- {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ {"dummy_int1", 1, "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
struct InterfaceEntry entries2[] = {
- {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
- {"dummy_int0", "1.2.3.4", NULL, IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ {"dummy_int1", 1, "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {"dummy_int0", 2, "1.2.3.4", NULL, IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
SetDummyInterfaceTable(entries1);
@@ -350,9 +355,13 @@ TEST_F(NetworkInterfaceListenerTest, AutoSelectInterface_SelectInterface) {
EXPECT_TRUE(interface_listener_impl_->Init());
struct InterfaceEntry entries[] = {
- {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
- {"net_dummy2", "192.168.2.3", "fdc2:12af:327a::22", IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ {"dummy_int1", 1, "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {"net_dummy2",
+ 2,
+ "192.168.2.3",
+ "fdc2:12af:327a::22",
+ IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
SetDummyInterfaceTable(entries);
@@ -384,9 +393,13 @@ TEST_F(NetworkInterfaceListenerTest,
EXPECT_TRUE(interface_listener_impl_->Init());
struct InterfaceEntry entries[] = {
- {"dummy_int1", "10.10.10.12", NULL, IFF_UP},
- {"net_dummy2", "192.168.2.3", "fdc2:12af:327a::22", IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ {"dummy_int1", 1, "10.10.10.12", NULL, IFF_UP},
+ {"net_dummy2",
+ 2,
+ "192.168.2.3",
+ "fdc2:12af:327a::22",
+ IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
SetDummyInterfaceTable(entries);
@@ -410,9 +423,9 @@ TEST_F(NetworkInterfaceListenerTest, AutoSelectInterface_SkipEmptyInterface) {
EXPECT_TRUE(interface_listener_impl_->Init());
struct InterfaceEntry entries[] = {
- {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
- {"net_dummy2", NULL, NULL, IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ {"dummy_int1", 1, "10.10.10.12", NULL, IFF_UP | IFF_RUNNING},
+ {"net_dummy2", 2, NULL, NULL, IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
SetDummyInterfaceTable(entries);
@@ -435,10 +448,17 @@ TEST_F(NetworkInterfaceListenerTest,
Init("");
EXPECT_TRUE(interface_listener_impl_->Init());
- struct InterfaceEntry entries[] = {
- {"dummy_int1", "10.10.10.12", NULL, IFF_UP | IFF_RUNNING | IFF_LOOPBACK},
- {"net_dummy2", "192.168.2.3", "fdc2:12af:327a::22", IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ struct InterfaceEntry entries[] = {{"dummy_int1",
+ 1,
+ "10.10.10.12",
+ NULL,
+ IFF_UP | IFF_RUNNING | IFF_LOOPBACK},
+ {"net_dummy2",
+ 2,
+ "192.168.2.3",
+ "fdc2:12af:327a::22",
+ IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
// dummy_int1 should not be selected
struct InterfaceEntry* expected = &entries[1];
@@ -461,9 +481,12 @@ TEST_F(NetworkInterfaceListenerTest, AutoSelectInterface_DisableInterface) {
Init("");
EXPECT_TRUE(interface_listener_impl_->Init());
- struct InterfaceEntry entries[] = {
- {"net_dummy0", "192.168.2.3", "fdc2:12af:327a::22", IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ struct InterfaceEntry entries[] = {{"net_dummy0",
+ 1,
+ "192.168.2.3",
+ "fdc2:12af:327a::22",
+ IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
EXPECT_CALL(mock_tcp_client_listener_, OnIPAddressUpdated(_, _)).Times(1);
SetDummyInterfaceTable(entries);
@@ -487,9 +510,12 @@ TEST_F(NetworkInterfaceListenerTest, AutoSelectInterface_EnableInterface) {
Init("");
EXPECT_TRUE(interface_listener_impl_->Init());
- struct InterfaceEntry entries[] = {
- {"net_dummy0", "192.168.2.3", "fdc2:12af:327a::22", IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ struct InterfaceEntry entries[] = {{"net_dummy0",
+ 1,
+ "192.168.2.3",
+ "fdc2:12af:327a::22",
+ IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
EXPECT_CALL(mock_tcp_client_listener_, OnIPAddressUpdated(_, _)).Times(1);
SetDummyInterfaceTable(entries);
@@ -525,13 +551,17 @@ TEST_F(NetworkInterfaceListenerTest, AutoSelectInterface_SwitchInterface) {
Init("");
EXPECT_TRUE(interface_listener_impl_->Init());
- struct InterfaceEntry entries[] = {
- {"dummy_int1",
- "10.10.10.12",
- "fd53:ba79:241d:30c1::78",
- IFF_UP | IFF_RUNNING},
- {"net_dummy2", "192.168.2.3", "fdc2:12af:327a::22", IFF_UP | IFF_RUNNING},
- {NULL, NULL, NULL, 0}};
+ struct InterfaceEntry entries[] = {{"dummy_int1",
+ 1,
+ "10.10.10.12",
+ "fd53:ba79:241d:30c1::78",
+ IFF_UP | IFF_RUNNING},
+ {"net_dummy2",
+ 2,
+ "192.168.2.3",
+ "fdc2:12af:327a::22",
+ IFF_UP | IFF_RUNNING},
+ {NULL, 0, NULL, NULL, 0}};
EXPECT_CALL(mock_tcp_client_listener_, OnIPAddressUpdated(_, _)).Times(1);
SetDummyInterfaceTable(entries);
diff --git a/src/components/transport_manager/test/raw_message_matcher.cc b/src/components/transport_manager/test/raw_message_matcher.cc
index 61d73a9253..48e0908f9a 100644
--- a/src/components/transport_manager/test/raw_message_matcher.cc
+++ b/src/components/transport_manager/test/raw_message_matcher.cc
@@ -38,6 +38,7 @@ namespace transport_manager_test {
RawMessageMatcher::RawMessageMatcher(RawMessagePtr ptr) : ptr_(ptr) {}
+// cppcheck-suppress unusedFunction
bool RawMessageMatcher::MatchAndExplain(const RawMessagePtr msg,
MatchResultListener* listener) const {
if (msg->data_size() != ptr_->data_size()) {
diff --git a/src/components/transport_manager/test/tcp_client_listener_test.cc b/src/components/transport_manager/test/tcp_client_listener_test.cc
index dbd7799b62..d71db3e770 100644
--- a/src/components/transport_manager/test/tcp_client_listener_test.cc
+++ b/src/components/transport_manager/test/tcp_client_listener_test.cc
@@ -166,9 +166,9 @@ TEST_P(TcpClientListenerTest, StartListening) {
SleepFor(kThreadStartWaitMsec);
if (InterfaceNameSpecified()) {
- EXPECT_FALSE(tcp_client_listener_->thread()->is_running());
+ EXPECT_FALSE(tcp_client_listener_->thread()->IsRunning());
} else {
- EXPECT_TRUE(tcp_client_listener_->thread()->is_running());
+ EXPECT_TRUE(tcp_client_listener_->thread()->IsRunning());
}
// Stop() and Deinit() will be called during destructor
@@ -200,7 +200,7 @@ TEST_P(TcpClientListenerTest, StopListening) {
EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
EXPECT_EQ(TransportAdapter::OK, tcp_client_listener_->StopListening());
- EXPECT_FALSE(tcp_client_listener_->thread()->is_running());
+ EXPECT_FALSE(tcp_client_listener_->thread()->IsRunning());
EXPECT_CALL(*interface_listener_mock_, Deinit()).Times(1);
}
@@ -310,7 +310,7 @@ TEST_P(TcpClientListenerTest, OnIPAddressUpdated_ValidIPv4Address) {
SleepFor(kThreadStartWaitMsec);
- EXPECT_TRUE(tcp_client_listener_->thread()->is_running());
+ EXPECT_TRUE(tcp_client_listener_->thread()->IsRunning());
}
EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
@@ -357,7 +357,7 @@ TEST_P(TcpClientListenerTest, OnIPAddressUpdated_IPv4Address_changed) {
SleepFor(kThreadStartWaitMsec);
- EXPECT_TRUE(tcp_client_listener_->thread()->is_running());
+ EXPECT_TRUE(tcp_client_listener_->thread()->IsRunning());
}
EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
@@ -403,7 +403,7 @@ TEST_P(TcpClientListenerTest, OnIPAddressUpdated_IPv4Address_same) {
SleepFor(kThreadStartWaitMsec);
- EXPECT_TRUE(tcp_client_listener_->thread()->is_running());
+ EXPECT_TRUE(tcp_client_listener_->thread()->IsRunning());
}
EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
@@ -450,7 +450,7 @@ TEST_P(TcpClientListenerTest, OnIPAddressUpdated_IPv4Address_disabled) {
SleepFor(kThreadStartWaitMsec);
- EXPECT_FALSE(tcp_client_listener_->thread()->is_running());
+ EXPECT_FALSE(tcp_client_listener_->thread()->IsRunning());
}
EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
@@ -509,7 +509,7 @@ TEST_P(TcpClientListenerTest, OnIPAddressUpdated_IPv4Address_reenabled) {
SleepFor(kThreadStartWaitMsec);
- EXPECT_TRUE(tcp_client_listener_->thread()->is_running());
+ EXPECT_TRUE(tcp_client_listener_->thread()->IsRunning());
}
EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
@@ -539,7 +539,7 @@ TEST_P(TcpClientListenerTest, OnIPAddressUpdated_EmptyIPv4Address) {
SleepFor(kThreadStartWaitMsec);
- EXPECT_FALSE(tcp_client_listener_->thread()->is_running());
+ EXPECT_FALSE(tcp_client_listener_->thread()->IsRunning());
}
EXPECT_CALL(*interface_listener_mock_, Stop()).WillOnce(Return(true));
diff --git a/src/components/transport_manager/test/transport_manager_impl_test.cc b/src/components/transport_manager/test/transport_manager_impl_test.cc
index db4813be9a..227367e750 100644
--- a/src/components/transport_manager/test/transport_manager_impl_test.cc
+++ b/src/components/transport_manager/test/transport_manager_impl_test.cc
@@ -633,15 +633,17 @@ TEST_F(TransportManagerImplTest, SendMessageToDevice_SendDone) {
EXPECT_TRUE(waiter.WaitFor(1, kAsyncExpectationsTimeout));
}
-TEST_F(TransportManagerImplTest, SendMessageFailed_GetHandleSendFailed) {
+TEST_F(
+ TransportManagerImplTest,
+ SendMessageToDevice_AdapterSendDataOkAndOnSendFailEvent_OnTMMessageSendFailed) {
// Arrange
HandleConnection();
TestAsyncWaiter waiter;
EXPECT_CALL(*mock_adapter_,
SendData(mac_address_, application_id_, test_message_))
- .WillOnce(DoAll(NotifyTestAsyncWaiter(&waiter),
- Return(TransportAdapter::FAIL)));
+ .WillOnce(
+ DoAll(NotifyTestAsyncWaiter(&waiter), Return(TransportAdapter::OK)));
#ifdef TELEMETRY_MONITOR
EXPECT_CALL(mock_metric_observer_, StartRawMsg(test_message_.get()));
diff --git a/src/components/transport_manager/test/websocket_client_connection_test.cc b/src/components/transport_manager/test/websocket_client_connection_test.cc
index b9aa6f7c7e..2eab434d1a 100644
--- a/src/components/transport_manager/test/websocket_client_connection_test.cc
+++ b/src/components/transport_manager/test/websocket_client_connection_test.cc
@@ -121,7 +121,7 @@ class WebsocketConnectionTest : public ::testing::Test {
std::shared_ptr<websocket::WSSSession> wss_session;
WebsocketClient ws_client;
std::string kHost = "127.0.0.1";
- uint16_t kPort = 8080;
+ uint16_t kPort = 48080;
std::string kPath = "/folder/file.html/";
std::string kQuery = "?eventId=2345&eventName='Test'&expectedResult=true";
std::string kFragment = "#section_1";
diff --git a/src/components/transport_manager/test/websocket_sample_client/websocket_sample_client.cc b/src/components/transport_manager/test/websocket_sample_client/websocket_sample_client.cc
index 88525ad29d..6c2ff12bfd 100644
--- a/src/components/transport_manager/test/websocket_sample_client/websocket_sample_client.cc
+++ b/src/components/transport_manager/test/websocket_sample_client/websocket_sample_client.cc
@@ -105,7 +105,6 @@ bool WSSampleClient<WS>::Connect(tcp::resolver::results_type& results) {
boost::system::error_code ec;
boost::asio::connect(ws_->next_layer(), results.begin(), results.end(), ec);
if (ec) {
- std::string str_err = "ErrorMessage: " + ec.message();
return false;
}
return true;
@@ -116,7 +115,6 @@ bool WSSampleClient<WSS>::Connect(tcp::resolver::results_type& results) {
boost::system::error_code ec;
boost::asio::connect(ws_->lowest_layer(), results.begin(), results.end(), ec);
if (ec) {
- std::string str_err = "ErrorMessage: " + ec.message();
return false;
}
return true;
@@ -128,7 +126,6 @@ bool WSSampleClient<WS>::Handshake(const std::string& host,
boost::system::error_code ec;
ws_->handshake(host, target, ec);
if (ec) {
- std::string str_err = "ErrorMessage: " + ec.message();
return false;
}
return true;
@@ -156,7 +153,6 @@ bool WSSampleClient<WSS>::Handshake(const std::string& host,
ws_->handshake(host, target, ec);
if (ec) {
- std::string str_err = "ErrorMessage: " + ec.message();
return false;
}
diff --git a/src/components/utils/CMakeLists.txt b/src/components/utils/CMakeLists.txt
index 451a8a629e..b65b19253a 100644
--- a/src/components/utils/CMakeLists.txt
+++ b/src/components/utils/CMakeLists.txt
@@ -78,11 +78,8 @@ if(ENABLE_LOG)
)
else()
list(APPEND EXCLUDE_PATHS
- push_log.cc
- log_message_loop_thread.cc
- logger_status.cc
auto_trace.cc
- logger.cc
+ logger/log4cxxlogger.cc
)
endif()
diff --git a/src/components/utils/include/utils/file_system.h b/src/components/utils/include/utils/file_system.h
index f575da129f..f06ca15281 100644
--- a/src/components/utils/include/utils/file_system.h
+++ b/src/components/utils/include/utils/file_system.h
@@ -297,6 +297,14 @@ bool CopyFile(const std::string& src, const std::string& dst);
*/
bool MoveFile(const std::string& src, const std::string& dst);
+/**
+ * @brief Get filename from full path
+ *
+ * @param full_path Source file path
+ * @return parsed filename
+ */
+std::string GetFileName(const std::string& full_path);
+
} // namespace file_system
#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_FILE_SYSTEM_H_
diff --git a/src/components/utils/src/logger_status.cc b/src/components/utils/include/utils/logger/log4cxxlogger.h
index ea9dfa3f22..170e6e871c 100644
--- a/src/components/utils/src/logger_status.cc
+++ b/src/components/utils/include/utils/logger/log4cxxlogger.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Ford Motor Company
+ * Copyright (c) 2020, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,10 +30,24 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "utils/logger_status.h"
+#pragma once
+
+#include <log4cxx/logger.h>
+#include "utils/ilogger.h"
namespace logger {
-volatile LoggerStatus logger_status = LoggerThreadNotCreated;
+class Log4CXXLogger : public ThirdPartyLoggerInterface {
+ public:
+ Log4CXXLogger(const std::string& filename);
+ void Init() override;
+ void DeInit() override;
+ bool IsEnabledFor(const std::string& component,
+ LogLevel log_level) const override;
+ void PushLog(const LogMessage& log_message) override;
+
+ private:
+ std::string filename_;
+};
} // namespace logger
diff --git a/src/components/utils/include/utils/log_message_loop_thread.h b/src/components/utils/include/utils/logger/logger_impl.h
index b0cac75c71..faff8f167d 100644
--- a/src/components/utils/include/utils/log_message_loop_thread.h
+++ b/src/components/utils/include/utils/logger/logger_impl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Ford Motor Company
+ * Copyright (c) 2020, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,43 +30,56 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_LOG_MESSAGE_LOOP_THREAD_H_
-#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_LOG_MESSAGE_LOOP_THREAD_H_
+#ifndef SRC_COMPONENTS_UTILS_INCLUDE_UTILS_LOGGER_LOGGER_IMPL_H_
+#define SRC_COMPONENTS_UTILS_INCLUDE_UTILS_LOGGER_LOGGER_IMPL_H_
-#include <log4cxx/logger.h>
-#include <queue>
-#include <string>
+#include "utils/ilogger.h"
+
+#include <functional>
-#include "utils/macro.h"
#include "utils/threads/message_loop_thread.h"
namespace logger {
-typedef struct {
- log4cxx::LoggerPtr logger;
- log4cxx::LevelPtr level;
- std::string entry;
- log4cxx_time_t timeStamp;
- log4cxx::spi::LocationInfo location;
- log4cxx::LogString threadName;
-} LogMessage;
-
typedef std::queue<LogMessage> LogMessageQueue;
typedef threads::MessageLoopThread<LogMessageQueue>
LogMessageLoopThreadTemplate;
+template <typename T>
+using LoopThreadPtr = std::unique_ptr<T, std::function<void(T*)> >;
+
class LogMessageLoopThread : public LogMessageLoopThreadTemplate,
public LogMessageLoopThreadTemplate::Handler {
public:
- LogMessageLoopThread();
+ LogMessageLoopThread(std::function<void(LogMessage)> handler);
+
+ void Push(const LogMessage& message);
+
+ void Handle(const LogMessage message);
+
~LogMessageLoopThread();
- void Handle(const LogMessage message) OVERRIDE;
private:
- DISALLOW_COPY_AND_ASSIGN(LogMessageLoopThread);
+ std::function<void(LogMessage)> force_log_;
+};
+
+class LoggerImpl : public Logger, public LoggerInitializer {
+ public:
+ LoggerImpl(bool use_message_loop_thread = true);
+ void Init(std::unique_ptr<ThirdPartyLoggerInterface>&& impl) override;
+ void DeInit() override;
+ void Flush() override;
+
+ bool IsEnabledFor(const std::string& component,
+ LogLevel log_level) const override;
+ void PushLog(const LogMessage& log_message) override;
+
+ std::unique_ptr<ThirdPartyLoggerInterface> impl_;
+ LoopThreadPtr<LogMessageLoopThread> loop_thread_;
+ bool use_message_loop_thread_;
};
} // namespace logger
-#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_LOG_MESSAGE_LOOP_THREAD_H_
+#endif // SRC_COMPONENTS_UTILS_INCLUDE_UTILS_LOGGER_LOGGER_IMPL_H_
diff --git a/src/components/utils/src/auto_trace.cc b/src/components/utils/src/auto_trace.cc
index 0379630319..3d9c82a955 100644
--- a/src/components/utils/src/auto_trace.cc
+++ b/src/components/utils/src/auto_trace.cc
@@ -30,36 +30,35 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <apr_time.h>
-#include <log4cxx/spi/loggingevent.h>
-
#include "utils/auto_trace.h"
-#include "utils/push_log.h"
+#include "utils/logger.h"
namespace logger {
-AutoTrace::AutoTrace(log4cxx::LoggerPtr logger,
- const log4cxx::spi::LocationInfo& location)
- : logger_(logger), location_(location) {
- if (logger::logs_enabled() && logger_->isTraceEnabled()) {
- push_log(logger_,
- ::log4cxx::Level::getTrace(),
- "Enter",
- apr_time_now(),
- location_,
- ::log4cxx::spi::LoggingEvent::getCurrentThreadName());
+AutoTrace::AutoTrace(const std::string& component, const LocationInfo& location)
+ : component_(component), location_(location) {
+ if (logger::Logger::instance().IsEnabledFor(component_,
+ logger::LogLevel::TRACE_LEVEL)) {
+ logger::LogMessage message{component_,
+ LogLevel::TRACE_LEVEL,
+ "Enter",
+ std::chrono::high_resolution_clock::now(),
+ location_,
+ std::this_thread::get_id()};
+ logger::Logger::instance().PushLog(message);
}
}
AutoTrace::~AutoTrace() {
- if (logger::logs_enabled() && logger_->isTraceEnabled()) {
- push_log(logger_,
- ::log4cxx::Level::getTrace(),
- "Exit",
- apr_time_now(),
- location_, // the location corresponds rather to creation of
- // autotrace object than to deletion
- ::log4cxx::spi::LoggingEvent::getCurrentThreadName());
+ if (logger::Logger::instance().IsEnabledFor(component_,
+ logger::LogLevel::TRACE_LEVEL)) {
+ logger::LogMessage message{component_,
+ LogLevel::TRACE_LEVEL,
+ "Exit",
+ std::chrono::high_resolution_clock::now(),
+ location_,
+ std::this_thread::get_id()};
+ logger::Logger::instance().PushLog(message);
}
}
diff --git a/src/components/utils/src/conditional_variable_boost.cc b/src/components/utils/src/conditional_variable_boost.cc
index c70b727d66..81fad8ebe7 100644
--- a/src/components/utils/src/conditional_variable_boost.cc
+++ b/src/components/utils/src/conditional_variable_boost.cc
@@ -46,7 +46,7 @@ const long kNanosecondsPerMillisecond = 1000000;
namespace sync_primitives {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Utils")
+SDL_CREATE_LOG_VARIABLE("Utils")
ConditionalVariable::ConditionalVariable() {}
@@ -75,13 +75,13 @@ bool ConditionalVariable::Wait(BaseLock& lock) {
cond_var_.wait<boost::recursive_mutex>(test_rec_lock->mutex_);
} else {
// unknown, give up the lock
- LOG4CXX_ERROR(logger_, "Unknown lock type!");
+ SDL_LOG_ERROR("Unknown lock type!");
NOTREACHED();
}
lock.AssertFreeAndMarkTaken();
} catch (const boost::exception& error) {
std::string error_string = boost::diagnostic_information(error);
- LOG4CXX_FATAL(logger_, error_string);
+ SDL_LOG_FATAL(error_string);
NOTREACHED();
}
return true;
@@ -115,7 +115,7 @@ ConditionalVariable::WaitStatus ConditionalVariable::WaitFor(
test_rec_lock->mutex_, boost::posix_time::milliseconds(milliseconds));
} else {
// this is an unknown lock, we have an issue
- LOG4CXX_ERROR(logger_, "Unknown lock type!");
+ SDL_LOG_ERROR("Unknown lock type!");
NOTREACHED();
}
@@ -125,7 +125,7 @@ ConditionalVariable::WaitStatus ConditionalVariable::WaitFor(
lock.AssertFreeAndMarkTaken();
} catch (const boost::exception& error) {
std::string error_string = boost::diagnostic_information(error);
- LOG4CXX_FATAL(logger_, error_string);
+ SDL_LOG_FATAL(error_string);
NOTREACHED();
}
diff --git a/src/components/utils/src/date_time.cc b/src/components/utils/src/date_time.cc
index cea35a977e..389f973837 100644
--- a/src/components/utils/src/date_time.cc
+++ b/src/components/utils/src/date_time.cc
@@ -46,9 +46,7 @@ namespace date_time {
TimeDuration getCurrentTime() {
return bpt::microsec_clock::local_time() - bpt::from_time_t(0);
}
-TimeDuration TimeDurationZero() {
- return TimeDuration(0, 0, 0, 0);
-}
+
int64_t getSecs(const TimeDuration& t) {
return t.total_seconds();
}
@@ -61,13 +59,22 @@ int64_t getuSecs(const TimeDuration& t) {
return t.total_microseconds();
}
+#ifdef BUILD_TESTS
+// cppcheck-suppress unusedFunction //Used in unit tests
+TimeDuration TimeDurationZero() {
+ return TimeDuration(0, 0, 0, 0);
+}
+
+// cppcheck-suppress unusedFunction //Used in unit tests
int64_t get_just_mSecs(const TimeDuration& t) {
return t.total_milliseconds() % MILLISECONDS_IN_SECOND;
}
+// cppcheck-suppress unusedFunction //Used in unit tests
int64_t get_just_uSecs(const TimeDuration& t) {
return t.total_microseconds() % MICROSECONDS_IN_SECOND;
}
+#endif // BUILD_TESTS
int64_t calculateTimeSpan(const TimeDuration& sinceTime) {
return calculateTimeDiff(getCurrentTime(), sinceTime);
diff --git a/src/components/utils/src/file_system.cc b/src/components/utils/src/file_system.cc
index 015dc25a22..f0c838a7f9 100644
--- a/src/components/utils/src/file_system.cc
+++ b/src/components/utils/src/file_system.cc
@@ -47,52 +47,48 @@
#include <cstdio>
#include <fstream>
-CREATE_LOGGERPTR_GLOBAL(logger_, "Utils::FileSystem")
+SDL_CREATE_LOG_VARIABLE("Utils::FileSystem")
// Easier reference
namespace fs = boost::filesystem;
using boost::system::error_code;
uint64_t file_system::GetAvailableDiskSpace(const std::string& path) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
error_code ec;
- fs::space_info si = {0, 0, 0};
- si = fs::space(path, ec);
+ fs::space_info si = fs::space(path, ec);
if (ec) {
// If something went wrong, assume no free space
- LOG4CXX_ERROR_WITH_ERRNO(logger_,
- "Unable to get available disk space: '"
- << path << "', reason: " << ec.message());
+ SDL_LOG_ERROR_WITH_ERRNO("Unable to get available disk space: '"
+ << path << "', reason: " << ec.message());
}
return si.free;
}
uint64_t file_system::FileSize(const std::string& path) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
error_code ec;
// Boost returns sizes as unsigned
const uint64_t fsize = static_cast<uint64_t>(fs::file_size(path, ec));
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(
- logger_,
- "Unable to get file size: '" << path << "', reason: " << ec.message());
+ SDL_LOG_ERROR_WITH_ERRNO("Unable to get file size: '"
+ << path << "', reason: " << ec.message());
return 0;
}
return fsize;
}
size_t file_system::DirectorySize(const std::string& path) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
size_t dir_size = 0;
error_code ec;
// Recursively iterate through directory to accumulate file sizes
fs::recursive_directory_iterator iter(path, ec);
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_,
- "Unable to get directory size: '"
- << path << "', reason: " << ec.message());
+ SDL_LOG_ERROR_WITH_ERRNO("Unable to get directory size: '"
+ << path << "', reason: " << ec.message());
return 0;
}
@@ -101,31 +97,28 @@ size_t file_system::DirectorySize(const std::string& path) {
while (end != iter) {
const bool is_directory = fs::is_directory(iter->path(), ec);
if (ec) {
- LOG4CXX_WARN_WITH_ERRNO(
- logger_,
- "Failed check if '" << iter->path()
+ SDL_LOG_WARN_WITH_ERRNO("Failed check if '"
+ << iter->path()
<< "' is directory, reason: " << ec.message());
}
if (!is_directory && !ec) {
const size_t fsize = fs::file_size(iter->path(), ec);
if (ec) {
- LOG4CXX_WARN_WITH_ERRNO(logger_,
- "Failed to get file_size: '"
- << path << "', reason: " << ec.message());
+ SDL_LOG_WARN_WITH_ERRNO("Failed to get file_size: '"
+ << path << "', reason: " << ec.message());
} else {
// No error means we can add the file
dir_size += fsize;
- LOG4CXX_DEBUG(logger_, "Adding: " << fsize << ", total: " << dir_size);
+ SDL_LOG_DEBUG("Adding: " << fsize << ", total: " << dir_size);
}
}
// Increment the iterator to point to next entry in recursive iteration
iter.increment(ec);
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_,
- "Failed to increment iterator for path '"
- << path << "', reason: " << ec.message());
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to increment iterator for path '"
+ << path << "', reason: " << ec.message());
return dir_size;
}
}
@@ -135,11 +128,11 @@ size_t file_system::DirectorySize(const std::string& path) {
// NOTE that boost makes 0777 permissions by default
bool file_system::CreateDirectory(const std::string& name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
error_code ec;
const bool success = fs::create_directory(name, ec);
if (!success || ec) {
- LOG4CXX_WARN_WITH_ERRNO(logger_, "Unable to create directory: " << name);
+ SDL_LOG_WARN_WITH_ERRNO("Unable to create directory: " << name);
} else {
// Set 0700 permissions to maintain previous API
fs::permissions(name, fs::perms::owner_all, ec);
@@ -148,15 +141,14 @@ bool file_system::CreateDirectory(const std::string& name) {
}
bool file_system::CreateDirectoryRecursively(const std::string& path) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
error_code ec;
// Create directory and all parents
fs::create_directories(path, ec);
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_,
- "Unable to create directory recursively: '"
- << path << "', reason: " << ec.message());
+ SDL_LOG_ERROR_WITH_ERRNO("Unable to create directory recursively: '"
+ << path << "', reason: " << ec.message());
return false;
}
@@ -165,13 +157,12 @@ bool file_system::CreateDirectoryRecursively(const std::string& path) {
}
bool file_system::IsDirectory(const std::string& name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
error_code ec;
const bool is_directory = fs::is_directory(name, ec);
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_,
- "Unable to check if it is directory: "
- << name << " reason: " << ec.message());
+ SDL_LOG_ERROR_WITH_ERRNO("Unable to check if it is directory: "
+ << name << " reason: " << ec.message());
}
return is_directory;
}
@@ -179,22 +170,20 @@ bool file_system::IsDirectory(const std::string& name) {
// NOTE this may be a duplicate of IsDirectory since it already checks
// existence
bool file_system::DirectoryExists(const std::string& name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const bool exists = FileExists(name) && IsDirectory(name);
- LOG4CXX_DEBUG(
- logger_,
- "Directory '" << name << "' " << (exists ? "exists" : "NOT exists"));
+ SDL_LOG_DEBUG("Directory '" << name << "' "
+ << (exists ? "exists" : "NOT exists"));
return exists;
}
bool file_system::FileExists(const std::string& name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
error_code ec;
const bool exists = fs::exists(name, ec);
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_,
- "Unable to check that file exists: "
- << name << " reason: " << ec.message());
+ SDL_LOG_ERROR_WITH_ERRNO("Unable to check that file exists: "
+ << name << " reason: " << ec.message());
}
return exists;
}
@@ -202,7 +191,7 @@ bool file_system::FileExists(const std::string& name) {
bool file_system::Write(const std::string& file_name,
const std::vector<uint8_t>& data,
std::ios_base::openmode mode) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::ofstream file(file_name.c_str(), std::ios_base::binary | mode);
if (file.is_open()) {
for (uint32_t i = 0; i < data.size(); ++i) {
@@ -216,7 +205,7 @@ bool file_system::Write(const std::string& file_name,
std::ofstream* file_system::Open(const std::string& file_name,
std::ios_base::openmode mode) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::ofstream* file = new std::ofstream();
file->open(file_name.c_str(), std::ios_base::binary | mode);
if (file->is_open()) {
@@ -230,7 +219,7 @@ std::ofstream* file_system::Open(const std::string& file_name,
bool file_system::Write(std::ofstream* const file_stream,
const uint8_t* data,
uint32_t data_size) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
bool result = false;
if (file_stream) {
for (size_t i = 0; i < data_size; ++i) {
@@ -242,73 +231,67 @@ bool file_system::Write(std::ofstream* const file_stream,
}
void file_system::Close(std::ofstream* file_stream) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (file_stream) {
file_stream->close();
}
}
std::string file_system::CurrentWorkingDirectory() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
error_code ec;
const fs::path currpath = fs::current_path(ec);
if (ec) {
- LOG4CXX_WARN_WITH_ERRNO(logger_,
- "Unable to get current working directory: '"
- << currpath << "' reason: " << ec.message());
+ SDL_LOG_WARN_WITH_ERRNO("Unable to get current working directory: '"
+ << currpath << "' reason: " << ec.message());
}
return currpath.string();
}
std::string file_system::GetAbsolutePath(const std::string& path) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
error_code ec;
const fs::path absolute = fs::canonical(path, ec);
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_,
- "Unable to get absolute path: '"
- << path << "', reason: " << ec.message());
+ SDL_LOG_ERROR_WITH_ERRNO("Unable to get absolute path: '"
+ << path << "', reason: " << ec.message());
return std::string(); // invalid path
}
return absolute.string();
}
bool file_system::IsFileNameValid(const std::string& file_name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return file_name.end() == std::find(file_name.begin(), file_name.end(), '/');
}
// Does not remove if file is write-protected
bool file_system::DeleteFile(const std::string& name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (FileExists(name) && IsAccessible(name, W_OK)) {
error_code ec;
const bool success = fs::remove(name.c_str(), ec);
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_,
- "Unable to delete file: '"
- << name << "', reason: " << ec.message()
- << "success: " << success);
+ SDL_LOG_ERROR_WITH_ERRNO("Unable to delete file: '"
+ << name << "', reason: " << ec.message()
+ << "success: " << success);
}
return success && !ec;
}
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Unable to delete file either doesn't exist or is not accessible");
return false;
}
void file_system::remove_directory_content(const std::string& directory_name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
error_code ec;
fs::directory_iterator dir_iter(directory_name, ec);
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(
- logger_,
- "Unable to remove directory contents: " << directory_name
- << " reason: " << ec.message());
+ SDL_LOG_ERROR_WITH_ERRNO("Unable to remove directory contents: "
+ << directory_name << " reason: " << ec.message());
}
// According to Boost's documentation, removing shouldn't invalidate the
@@ -319,15 +302,14 @@ void file_system::remove_directory_content(const std::string& directory_name) {
while (dir_iter != end) {
fs::remove_all(dir_iter->path(), ec);
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(
- logger_,
- "Unable to remove file: " << dir_iter->path().string() << " reason "
- << ec.message());
+ SDL_LOG_ERROR_WITH_ERRNO("Unable to remove file: "
+ << dir_iter->path().string() << " reason "
+ << ec.message());
}
dir_iter.increment(ec);
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(
- logger_, "Unable to increment dir_iter: reason " << ec.message());
+ SDL_LOG_ERROR_WITH_ERRNO("Unable to increment dir_iter: reason "
+ << ec.message());
break;
}
}
@@ -335,11 +317,10 @@ void file_system::remove_directory_content(const std::string& directory_name) {
bool file_system::RemoveDirectory(const std::string& directory_name,
const bool is_recursively) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
// Make sure the directory exists
if (!DirectoryExists(directory_name) && IsAccessible(directory_name, W_OK)) {
- LOG4CXX_WARN(
- logger_,
+ SDL_LOG_WARN(
"Unable to remove directory either doesn't exist or is not accessible");
return false;
}
@@ -349,8 +330,7 @@ bool file_system::RemoveDirectory(const std::string& directory_name,
if (is_recursively) {
success = (fs::remove_all(directory_name, ec) != 0);
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_,
- "Unable to remove all: '" << directory_name
+ SDL_LOG_ERROR_WITH_ERRNO("Unable to remove all: '" << directory_name
<< "', reason "
<< ec.message());
}
@@ -358,8 +338,7 @@ bool file_system::RemoveDirectory(const std::string& directory_name,
// Otherwise try to remove
success = fs::remove(directory_name, ec);
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_,
- "Unable to remove: '" << directory_name
+ SDL_LOG_ERROR_WITH_ERRNO("Unable to remove: '" << directory_name
<< "', reason "
<< ec.message());
}
@@ -368,31 +347,29 @@ bool file_system::RemoveDirectory(const std::string& directory_name,
}
bool file_system::IsAccessible(const std::string& name, const int32_t how) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return !access(name.c_str(), how);
}
bool file_system::IsWritingAllowed(const std::string& name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return IsAccessible(name, W_OK);
}
bool file_system::IsReadingAllowed(const std::string& name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
return IsAccessible(name, R_OK);
}
std::vector<std::string> file_system::ListFiles(
const std::string& directory_name) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
error_code ec;
fs::directory_iterator iter(directory_name, ec), end;
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(
- logger_,
- "Unable to get directory_iterator: " << directory_name << " reason "
- << ec.message());
+ SDL_LOG_ERROR_WITH_ERRNO("Unable to get directory_iterator: "
+ << directory_name << " reason " << ec.message());
return std::vector<std::string>();
}
@@ -401,10 +378,9 @@ std::vector<std::string> file_system::ListFiles(
list_files.push_back(iter->path().filename().string());
iter.increment(ec);
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_,
- "Failed to increment iterator for path '"
- << directory_name
- << "', reason: " << ec.message());
+ SDL_LOG_ERROR_WITH_ERRNO("Failed to increment iterator for path '"
+ << directory_name
+ << "', reason: " << ec.message());
return list_files;
}
}
@@ -422,10 +398,10 @@ bool file_system::WriteBinaryFile(const std::string& name,
bool file_system::ReadBinaryFile(const std::string& name,
std::vector<uint8_t>& result) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, "Filename: " << name);
+ SDL_LOG_AUTO_TRACE();
+ SDL_LOG_DEBUG("Filename: " << name);
if (!FileExists(name) || !IsAccessible(name, R_OK)) {
- LOG4CXX_ERROR(logger_, "Not able to read binary file: " << name);
+ SDL_LOG_ERROR("Not able to read binary file: " << name);
return false;
}
@@ -446,7 +422,7 @@ bool file_system::ReadBinaryFile(const std::string& name,
uint32_t offset,
uint32_t length) {
if (!FileExists(name) || !IsAccessible(name, R_OK)) {
- LOG4CXX_ERROR(logger_, "Not able to read binary file: " << name);
+ SDL_LOG_ERROR("Not able to read binary file: " << name);
return false;
}
@@ -466,14 +442,14 @@ bool file_system::ReadBinaryFile(const std::string& name,
}
bool file_system::ReadFile(const std::string& name, std::string& result) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!FileExists(name) || !IsAccessible(name, R_OK)) {
- LOG4CXX_ERROR(logger_, "Not able to read file: " << name);
+ SDL_LOG_ERROR("Not able to read file: " << name);
return false;
}
std::ifstream file(name.c_str());
if (!file) {
- LOG4CXX_ERROR(logger_, "Not able to open binary file: " << name);
+ SDL_LOG_ERROR("Not able to open binary file: " << name);
return false;
}
std::ostringstream ss;
@@ -483,13 +459,12 @@ bool file_system::ReadFile(const std::string& name, std::string& result) {
}
const std::string file_system::ConvertPathForURL(const std::string& path) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
const std::string reserved_symbols = "!#$&'()*+,:;=?@[] ";
- size_t pos = std::string::npos;
std::string converted_path;
for (const auto symbol : path) {
- pos = reserved_symbols.find_first_of(symbol);
+ size_t pos = reserved_symbols.find_first_of(symbol);
if (pos != std::string::npos) {
const size_t size = 100;
char percent_value[size];
@@ -503,11 +478,11 @@ const std::string file_system::ConvertPathForURL(const std::string& path) {
}
bool file_system::CreateFile(const std::string& path) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
std::ofstream file(path);
if (!(file.is_open())) {
- LOG4CXX_WARN(logger_, "failed to create file: " << path);
+ SDL_LOG_WARN("failed to create file: " << path);
return false;
}
file.close();
@@ -515,14 +490,13 @@ bool file_system::CreateFile(const std::string& path) {
}
time_t file_system::GetFileModificationTime(const std::string& path) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
error_code ec;
std::time_t time = fs::last_write_time(path, ec);
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_,
- "Unable to get file modification time: "
- << path << " reason " << ec.message());
+ SDL_LOG_ERROR_WITH_ERRNO("Unable to get file modification time: "
+ << path << " reason " << ec.message());
return 0;
}
@@ -530,19 +504,17 @@ time_t file_system::GetFileModificationTime(const std::string& path) {
}
bool file_system::CopyFile(const std::string& src, const std::string& dst) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (!FileExists(src) || FileExists(dst) || !CreateFile(dst)) {
- LOG4CXX_WARN(
- logger_,
- "Failed to copy file from: '" << src << "', to: '" << dst << "'");
+ SDL_LOG_WARN("Failed to copy file from: '" << src << "', to: '" << dst
+ << "'");
return false;
}
error_code ec;
fs::copy_file(src, dst, ec);
if (ec) {
- LOG4CXX_ERROR_WITH_ERRNO(
- logger_,
- "Unable to copy file: '" << src << "', reason: " << ec.message());
+ SDL_LOG_ERROR_WITH_ERRNO("Unable to copy file: '"
+ << src << "', reason: " << ec.message());
// something failed
return false;
}
@@ -550,7 +522,7 @@ bool file_system::CopyFile(const std::string& src, const std::string& dst) {
}
bool file_system::MoveFile(const std::string& src, const std::string& dst) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
if (std::rename(src.c_str(), dst.c_str()) == 0) {
return true;
@@ -560,15 +532,19 @@ bool file_system::MoveFile(const std::string& src, const std::string& dst) {
// Instead, copy the file over and delete the old one
bool success = CopyFile(src, dst);
if (!success) {
- LOG4CXX_ERROR(
- logger_,
- "Failed to copy file from: '" << src << "', to: '" << dst << "'");
+ SDL_LOG_ERROR("Failed to copy file from: '" << src << "', to: '" << dst
+ << "'");
return false;
}
success = DeleteFile(src);
if (!success) {
- LOG4CXX_ERROR(logger_, "Failed to delete file '" << src << "'");
+ SDL_LOG_ERROR("Failed to delete file '" << src << "'");
return false;
}
return true;
}
+
+std::string file_system::GetFileName(const std::string& full_path) {
+ fs::path p(full_path);
+ return p.filename().string();
+}
diff --git a/src/components/utils/src/jsoncpp_reader_wrapper.cc b/src/components/utils/src/jsoncpp_reader_wrapper.cc
index 69da386eed..f347a3253d 100644
--- a/src/components/utils/src/jsoncpp_reader_wrapper.cc
+++ b/src/components/utils/src/jsoncpp_reader_wrapper.cc
@@ -35,14 +35,14 @@
namespace utils {
-CREATE_LOGGERPTR_GLOBAL(logger_, "JsoncppReaderWrapper")
+SDL_CREATE_LOG_VARIABLE("JsoncppReaderWrapper")
JsonReader::JsonReader() {
reader_ = std::unique_ptr<Json::CharReader>(reader_builder_.newCharReader());
}
bool JsonReader::parse(const std::string& json, Json::Value* root) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
JSONCPP_STRING err;
bool is_parsing_ok = false;
const size_t json_len = json.length();
@@ -50,12 +50,12 @@ bool JsonReader::parse(const std::string& json, Json::Value* root) {
is_parsing_ok =
reader_->parse(json.c_str(), json.c_str() + json_len, root, &err);
} catch (Json::RuntimeError& e) {
- LOG4CXX_DEBUG(logger_, "Exception caught during parse json: " << e.what());
+ SDL_LOG_DEBUG("Exception caught during parse json: " << e.what());
return false;
}
if (!is_parsing_ok) {
- LOG4CXX_ERROR(logger_, "Json parsing fails: " << err);
+ SDL_LOG_ERROR("Json parsing fails: " << err);
}
return is_parsing_ok;
}
diff --git a/src/components/utils/src/lock_boost.cc b/src/components/utils/src/lock_boost.cc
index 2299bcf77d..735b31d882 100644
--- a/src/components/utils/src/lock_boost.cc
+++ b/src/components/utils/src/lock_boost.cc
@@ -39,13 +39,13 @@
namespace sync_primitives {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Utils")
+SDL_CREATE_LOG_VARIABLE("Utils")
Lock::Lock() : lock_taken_(0) {}
Lock::~Lock() {
if (lock_taken_ > 0) {
- LOG4CXX_FATAL(logger_, "Destroying non-released regular mutex " << &mutex_);
+ SDL_LOG_FATAL("Destroying non-released regular mutex " << &mutex_);
}
}
@@ -69,7 +69,7 @@ bool Lock::Try() {
void Lock::AssertFreeAndMarkTaken() {
if (lock_taken_ != 0) {
- LOG4CXX_FATAL(logger_, "Locking already taken not recursive mutex");
+ SDL_LOG_FATAL("Locking already taken not recursive mutex");
NOTREACHED();
}
lock_taken_++;
@@ -77,7 +77,7 @@ void Lock::AssertFreeAndMarkTaken() {
void Lock::AssertTakenAndMarkFree() {
if (lock_taken_ == 0) {
- LOG4CXX_FATAL(logger_, "Unlocking a mutex that is not taken");
+ SDL_LOG_FATAL("Unlocking a mutex that is not taken");
NOTREACHED();
}
lock_taken_--;
@@ -89,8 +89,7 @@ RecursiveLock::RecursiveLock() : lock_taken_(0) {}
RecursiveLock::~RecursiveLock() {
if (lock_taken_ > 0) {
- LOG4CXX_FATAL(logger_,
- "Destroying non-released recursive mutex " << &mutex_);
+ SDL_LOG_FATAL("Destroying non-released recursive mutex " << &mutex_);
}
}
@@ -118,7 +117,7 @@ void RecursiveLock::AssertFreeAndMarkTaken() {
void RecursiveLock::AssertTakenAndMarkFree() {
if (lock_taken_ == 0) {
- LOG4CXX_FATAL(logger_, "Unlocking a recursive mutex that is not taken");
+ SDL_LOG_FATAL("Unlocking a recursive mutex that is not taken");
NOTREACHED();
}
lock_taken_--;
diff --git a/src/components/utils/src/log_message_loop_thread.cc b/src/components/utils/src/log_message_loop_thread.cc
deleted file mode 100644
index 182eb64534..0000000000
--- a/src/components/utils/src/log_message_loop_thread.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "utils/log_message_loop_thread.h"
-#include "utils/logger_status.h"
-
-namespace logger {
-
-void LogMessageLoopThread::Handle(const LogMessage message) {
- message.logger->forcedLog(message.level,
- message.entry,
- message.timeStamp,
- message.location,
- message.threadName);
-}
-
-LogMessageLoopThread::LogMessageLoopThread()
- : LogMessageLoopThreadTemplate("Logger", this) {}
-
-LogMessageLoopThread::~LogMessageLoopThread() {
- // we'll have to drop messages
- // while deleting logger thread
- logger_status = DeletingLoggerThread;
- LogMessageLoopThreadTemplate::Shutdown();
-}
-
-} // namespace logger
diff --git a/src/components/utils/src/logger/log4cxxlogger.cc b/src/components/utils/src/logger/log4cxxlogger.cc
new file mode 100644
index 0000000000..7d43892073
--- /dev/null
+++ b/src/components/utils/src/logger/log4cxxlogger.cc
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "utils/logger/log4cxxlogger.h"
+#include <apr_pools.h>
+#include <apr_thread_proc.h>
+#include <atomic>
+#include <sstream>
+#include "assert.h"
+#include "log4cxx/propertyconfigurator.h"
+
+namespace logger {
+
+Log4CXXLogger::Log4CXXLogger(const std::string& filename)
+ : filename_(filename) {}
+
+void Log4CXXLogger::Init() {
+ log4cxx::PropertyConfigurator::configure(filename_);
+}
+
+void Log4CXXLogger::DeInit() {
+ log4cxx::LoggerPtr rootLogger = log4cxx::Logger::getRootLogger();
+
+ if (LOG4CXX_UNLIKELY(rootLogger->isDebugEnabled())) {
+ ::log4cxx::helpers::MessageBuffer oss_;
+ rootLogger->forcedLog(::log4cxx::Level::getDebug(),
+ oss_.str(oss_ << "Logger loop thread deinitialized"),
+ LOG4CXX_LOCATION);
+ }
+
+ if (LOG4CXX_UNLIKELY(rootLogger->isDebugEnabled())) {
+ ::log4cxx::helpers::MessageBuffer oss_;
+ rootLogger->forcedLog(::log4cxx::Level::getDebug(),
+ oss_.str(oss_ << "Logger calling removeAllAppenders"),
+ LOG4CXX_LOCATION);
+ }
+
+ log4cxx::spi::LoggerRepositoryPtr repository =
+ rootLogger->getLoggerRepository();
+ log4cxx::LoggerList loggers = repository->getCurrentLoggers();
+ for (auto logger : loggers) {
+ logger->removeAllAppenders();
+ }
+
+ rootLogger->removeAllAppenders();
+}
+
+log4cxx::LevelPtr getLogLevel(LogLevel log_level) {
+ switch (log_level) {
+ case LogLevel::TRACE_LEVEL:
+ return log4cxx::Level::getTrace();
+ case LogLevel::DEBUG_LEVEL:
+ return log4cxx::Level::getDebug();
+ case LogLevel::INFO_LEVEL:
+ return log4cxx::Level::getInfo();
+ case LogLevel::WARNING_LEVEL:
+ return log4cxx::Level::getWarn();
+ case LogLevel::ERROR_LEVEL:
+ return log4cxx::Level::getError();
+ case LogLevel::FATAL_LEVEL:
+ return log4cxx::Level::getFatal();
+ default:
+ assert(false);
+ }
+}
+
+bool Log4CXXLogger::IsEnabledFor(const std::string& component,
+ LogLevel log_level) const {
+ log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(component);
+ return logger->isEnabledFor(getLogLevel(log_level));
+}
+
+void Log4CXXLogger::PushLog(const LogMessage& log_message) {
+ log4cxx::LoggerPtr logger =
+ log4cxx::Logger::getLogger(log_message.component_);
+
+ std::ostringstream ss;
+ ss << log_message.thread_id_;
+
+ auto time = std::chrono::duration_cast<std::chrono::microseconds>(
+ log_message.timestamp_.time_since_epoch())
+ .count();
+ auto location =
+ log4cxx::spi::LocationInfo(log_message.location_.file_name.c_str(),
+ log_message.location_.function_name.c_str(),
+ log_message.location_.line_number);
+ logger->forcedLog(getLogLevel(log_message.log_level_),
+ log_message.log_event_,
+ time,
+ location,
+ ss.str());
+}
+
+} // namespace logger
diff --git a/src/components/utils/src/logger/logger_impl.cc b/src/components/utils/src/logger/logger_impl.cc
new file mode 100644
index 0000000000..1439f7327a
--- /dev/null
+++ b/src/components/utils/src/logger/logger_impl.cc
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2020, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "utils/logger/logger_impl.h"
+#include <assert.h>
+#include <iostream>
+
+namespace logger {
+
+LoggerImpl::LoggerImpl(bool use_message_loop_thread)
+ : impl_(nullptr), use_message_loop_thread_(use_message_loop_thread) {}
+
+void LoggerImpl::Init(std::unique_ptr<ThirdPartyLoggerInterface>&& impl) {
+ assert(impl_ == nullptr);
+ impl_ = std::move(impl);
+
+ impl_->Init();
+
+ if (use_message_loop_thread_) {
+ auto deinit_logger = [](LogMessageLoopThread* logMsgThread) {
+ delete logMsgThread;
+ };
+
+ if (!loop_thread_) {
+ loop_thread_ = LoopThreadPtr<LogMessageLoopThread>(
+ new LogMessageLoopThread(
+ [this](LogMessage message) { impl_->PushLog(message); }),
+ deinit_logger);
+ }
+ }
+}
+
+void LoggerImpl::DeInit() {
+ if (use_message_loop_thread_) {
+ Flush();
+ loop_thread_.reset();
+ }
+
+ if (impl_) {
+ impl_->DeInit();
+ }
+}
+
+void LoggerImpl::Flush() {
+ if (use_message_loop_thread_) {
+ if (loop_thread_) {
+ loop_thread_->WaitDumpQueue();
+ }
+ }
+}
+
+bool LoggerImpl::IsEnabledFor(const std::string& component,
+ LogLevel log_level) const {
+ return impl_ ? impl_->IsEnabledFor(component, log_level) : false;
+}
+
+void LoggerImpl::PushLog(const LogMessage& log_message) {
+ if (impl_) {
+ if (use_message_loop_thread_) {
+ if (loop_thread_) {
+ loop_thread_->Push(log_message);
+ }
+ } else {
+ impl_->PushLog(log_message);
+ }
+ }
+}
+
+Logger& Logger::instance(Logger* pre_init) {
+ static Logger* instance_;
+ if (pre_init) {
+ assert(instance_ == nullptr);
+ instance_ = pre_init;
+ }
+ return *instance_;
+}
+
+LogMessageLoopThread::LogMessageLoopThread(
+ std::function<void(LogMessage)> handler)
+ : LogMessageLoopThreadTemplate("Logger", this), force_log_(handler) {}
+
+void LogMessageLoopThread::Push(const LogMessage& message) {
+ PostMessage(message);
+}
+
+void LogMessageLoopThread::Handle(const LogMessage message) {
+ force_log_(message);
+}
+
+LogMessageLoopThread::~LogMessageLoopThread() {
+ // we'll have to drop messages
+ // while deleting logger thread
+ LogMessageLoopThreadTemplate::Shutdown();
+}
+
+} // namespace logger
diff --git a/src/components/utils/src/push_log.cc b/src/components/utils/src/push_log.cc
deleted file mode 100644
index f9d1cd738a..0000000000
--- a/src/components/utils/src/push_log.cc
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 2014, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "utils/push_log.h"
-#include "utils/log_message_loop_thread.h"
-#include "utils/logger_status.h"
-
-namespace logger {
-
-struct __attribute__((visibility("default"))) LogsEnabled {
- static std::atomic_bool logs_enabled_;
-};
-
-std::atomic_bool LogsEnabled::logs_enabled_(false);
-
-template <typename T>
-using logger_ptr = std::unique_ptr<T, std::function<void(T*)> >;
-
-static logger_ptr<LogMessageLoopThread> log_message_loop_thread;
-
-auto deinit_logger = [](LogMessageLoopThread* logMsgThread) {
- delete logMsgThread;
- logger::logger_status = logger::LoggerThreadNotCreated;
-};
-
-bool push_log(log4cxx::LoggerPtr logger,
- log4cxx::LevelPtr level,
- const std::string& entry,
- log4cxx_time_t timeStamp,
- const log4cxx::spi::LocationInfo& location,
- const log4cxx::LogString& threadName) {
- if (LoggerThreadCreated == logger_status) {
- LogMessage message = {
- logger, level, entry, timeStamp, location, threadName};
- if (log_message_loop_thread) {
- log_message_loop_thread->PostMessage(message);
- return true;
- }
- }
-
- if (LoggerThreadNotCreated == logger_status) {
- logger_status = CreatingLoggerThread;
- // we'll have to drop messages
- // while creating logger thread
- create_log_message_loop_thread();
- LogMessage message = {
- logger, level, entry, timeStamp, location, threadName};
- log_message_loop_thread->PostMessage(message);
- logger_status = LoggerThreadCreated;
- return true;
- }
-
- // also we drop messages
- // while deleting logger thread
-
- return false;
-}
-
-bool logs_enabled() {
- return LogsEnabled::logs_enabled_;
-}
-
-void set_logs_enabled(bool state) {
- LogsEnabled::logs_enabled_ = state;
-}
-
-void create_log_message_loop_thread() {
- if (!log_message_loop_thread) {
- log_message_loop_thread = logger_ptr<LogMessageLoopThread>(
- new LogMessageLoopThread, deinit_logger);
- }
-}
-
-void delete_log_message_loop_thread(log4cxx::LoggerPtr& logger) {
- if (logger::logger_status == logger::LoggerThreadCreated) {
- logger::flush_logger();
- }
-
- log_message_loop_thread.reset();
-
- if (LOG4CXX_UNLIKELY(logger->isDebugEnabled())) {
- ::log4cxx::helpers::MessageBuffer oss_;
- logger->forcedLog(::log4cxx::Level::getDebug(),
- oss_.str(oss_ << "Logger loop thread deinitialized"),
- LOG4CXX_LOCATION);
- }
-
- if (logger->getRootLogger() == logger) {
- return;
- }
-
- if (LOG4CXX_UNLIKELY(logger->isDebugEnabled())) {
- ::log4cxx::helpers::MessageBuffer oss_;
- logger->forcedLog(::log4cxx::Level::getDebug(),
- oss_.str(oss_ << "Logger calling removeAllAppenders"),
- LOG4CXX_LOCATION);
- }
-
- logger->removeAllAppenders();
-}
-
-void flush_logger() {
- logger::LoggerStatus old_status = logger::logger_status;
- // Stop pushing new messages to the log queue
- logger::logger_status = logger::DeletingLoggerThread;
- log_message_loop_thread->WaitDumpQueue();
- logger::logger_status = old_status;
-}
-
-} // namespace logger
diff --git a/src/components/utils/src/qdb_wrapper/sql_database.cc b/src/components/utils/src/qdb_wrapper/sql_database.cc
index e2a51753b2..a2063de19e 100644
--- a/src/components/utils/src/qdb_wrapper/sql_database.cc
+++ b/src/components/utils/src/qdb_wrapper/sql_database.cc
@@ -37,7 +37,7 @@
namespace utils {
namespace dbms {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Utils")
+SDL_CREATE_LOG_VARIABLE("Utils")
SQLDatabase::SQLDatabase(const std::string& db_name)
: conn_(NULL), db_name_(db_name), error_(Error::OK) {}
@@ -101,10 +101,10 @@ qdb_hdl_t* SQLDatabase::conn() const {
bool SQLDatabase::Backup() {
if (qdb_backup(conn_, QDB_ATTACH_DEFAULT) == -1) {
error_ = Error::ERROR;
- LOG4CXX_ERROR(logger_, "Backup returned error: " << std::strerror(errno));
+ SDL_LOG_ERROR("Backup returned error: " << std::strerror(errno));
return false;
}
- LOG4CXX_INFO(logger_, "Backup was successful.");
+ SDL_LOG_INFO("Backup was successful.");
return true;
}
diff --git a/src/components/utils/src/qdb_wrapper/sql_query.cc b/src/components/utils/src/qdb_wrapper/sql_query.cc
index d101e80718..ee774d89a2 100644
--- a/src/components/utils/src/qdb_wrapper/sql_query.cc
+++ b/src/components/utils/src/qdb_wrapper/sql_query.cc
@@ -41,7 +41,7 @@
namespace utils {
namespace dbms {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Utils")
+SDL_CREATE_LOG_VARIABLE("Utils")
class SetBindInteger {
public:
@@ -111,7 +111,7 @@ bool SQLQuery::Prepare(const std::string& query) {
query_ = query;
statement_ = qdb_stmt_init(db_->conn(), query.c_str(), query.length() + 1);
if (statement_ == -1) {
- LOG4CXX_DEBUG(logger_, "Prepare error: " << strerror(errno));
+ SDL_LOG_DEBUG("Prepare error: " << strerror(errno));
error_ = Error::ERROR;
return false;
}
diff --git a/src/components/utils/src/resource_usage.cc b/src/components/utils/src/resource_usage.cc
index 15a8c71e70..cf08be45ce 100644
--- a/src/components/utils/src/resource_usage.cc
+++ b/src/components/utils/src/resource_usage.cc
@@ -20,19 +20,19 @@
namespace utils {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Utils")
+SDL_CREATE_LOG_VARIABLE("Utils")
const char* Resources::proc = "/proc/";
ResourseUsage* Resources::getCurrentResourseUsage() {
PidStats pid_stats;
if (false == GetProcInfo(pid_stats)) {
- LOG4CXX_ERROR(logger_, "Failed to get cpu proc info");
+ SDL_LOG_ERROR("Failed to get cpu proc info");
return NULL;
}
MemInfo mem_info;
if (false == GetMemInfo(mem_info)) {
- LOG4CXX_ERROR(logger_, "Failed to get memory info");
+ SDL_LOG_ERROR("Failed to get memory info");
return NULL;
}
ResourseUsage* usage = new ResourseUsage();
@@ -149,16 +149,15 @@ bool Resources::GetProcInfo(Resources::PidStats& output) {
&(output.guest_time),
&(output.cguest_time));
if (num_succes != 43) { // 43 is number of iteams in Resources::PidStats
- LOG4CXX_ERROR(logger_, "Couldn't parse all iteams in /proc/PID/stat file");
+ SDL_LOG_ERROR("Couldn't parse all iteams in /proc/PID/stat file");
return false;
}
return true;
#elif defined(__QNXNTO__)
int fd = open(GetProcPath().c_str(), O_RDONLY);
if (0 >= fd) {
- LOG4CXX_ERROR(logger_,
- "Failed open process proc file : "
- << GetProcPath() << "; error no : " << strerror(errno));
+ SDL_LOG_ERROR("Failed open process proc file : "
+ << GetProcPath() << "; error no : " << strerror(errno));
close(fd);
return false;
@@ -174,7 +173,7 @@ bool Resources::GetMemInfo(Resources::MemInfo& output) {
#if defined(OS_LINUX)
Resources::PidStats pid_stat;
if (false == GetProcInfo(pid_stat)) {
- LOG4CXX_ERROR(logger_, "Failed to get proc info");
+ SDL_LOG_ERROR("Failed to get proc info");
result = false;
} else {
output = pid_stat.vsize;
@@ -186,19 +185,19 @@ bool Resources::GetMemInfo(Resources::MemInfo& output) {
struct stat st;
struct _dir* proc_dir = 0;
if (0 == (proc_dir = opendir(proc))) {
- LOG4CXX_ERROR(logger_, "Unable to access to " << proc);
+ SDL_LOG_ERROR("Unable to access to " << proc);
result = false;
return result;
}
if (0 == readdir(proc_dir)) {
- LOG4CXX_ERROR(logger_, "Unable to read : " << proc_dir);
+ SDL_LOG_ERROR("Unable to read : " << proc_dir);
closedir(proc_dir);
result = false;
return result;
}
closedir(proc_dir);
if (-1 == stat(as_path.c_str(), &st) || 0 == st.st_size) {
- LOG4CXX_ERROR(logger_, "Unable to stat : " << as_path.c_str());
+ SDL_LOG_ERROR("Unable to stat : " << as_path.c_str());
result = false;
return result;
}
diff --git a/src/components/utils/src/rwlock_posix.cc b/src/components/utils/src/rwlock_posix.cc
index 81bf5feee1..5509449fd1 100644
--- a/src/components/utils/src/rwlock_posix.cc
+++ b/src/components/utils/src/rwlock_posix.cc
@@ -35,23 +35,23 @@
namespace sync_primitives {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Utils")
+SDL_CREATE_LOG_VARIABLE("Utils")
RWLock::RWLock() {
if (pthread_rwlock_init(&rwlock_, 0) != 0) {
- LOG4CXX_ERROR(logger_, "Failed to initialize rwlock");
+ SDL_LOG_ERROR("Failed to initialize rwlock");
}
}
RWLock::~RWLock() {
if (pthread_rwlock_destroy(&rwlock_) != 0) {
- LOG4CXX_ERROR(logger_, "Failed to destroy rwlock");
+ SDL_LOG_ERROR("Failed to destroy rwlock");
}
}
bool RWLock::AcquireForReading() {
if (pthread_rwlock_rdlock(&rwlock_) != 0) {
- LOG4CXX_ERROR(logger_, "Failed to acquire rwlock for reading");
+ SDL_LOG_ERROR("Failed to acquire rwlock for reading");
return false;
}
return true;
@@ -59,7 +59,7 @@ bool RWLock::AcquireForReading() {
bool RWLock::TryAcquireForReading() {
if (pthread_rwlock_tryrdlock(&rwlock_) != 0) {
- LOG4CXX_ERROR(logger_, "Failed to acquire rwlock for reading");
+ SDL_LOG_ERROR("Failed to acquire rwlock for reading");
return false;
}
return true;
@@ -67,7 +67,7 @@ bool RWLock::TryAcquireForReading() {
bool RWLock::AcquireForWriting() {
if (pthread_rwlock_wrlock(&rwlock_) != 0) {
- LOG4CXX_ERROR(logger_, "Failed to acquire rwlock for writing");
+ SDL_LOG_ERROR("Failed to acquire rwlock for writing");
return false;
}
return true;
@@ -75,7 +75,7 @@ bool RWLock::AcquireForWriting() {
bool RWLock::TryAcquireForWriting() {
if (pthread_rwlock_trywrlock(&rwlock_) != 0) {
- LOG4CXX_ERROR(logger_, "Failed to acquire rwlock for writing");
+ SDL_LOG_ERROR("Failed to acquire rwlock for writing");
return false;
}
return true;
@@ -83,7 +83,7 @@ bool RWLock::TryAcquireForWriting() {
bool RWLock::Release() {
if (pthread_rwlock_unlock(&rwlock_) != 0) {
- LOG4CXX_ERROR(logger_, "Failed to release rwlock");
+ SDL_LOG_ERROR("Failed to release rwlock");
return false;
}
return true;
diff --git a/src/components/utils/src/system.cc b/src/components/utils/src/system.cc
index 2acc7acf92..d8bd034d4a 100644
--- a/src/components/utils/src/system.cc
+++ b/src/components/utils/src/system.cc
@@ -49,7 +49,7 @@
namespace utils {
-CREATE_LOGGERPTR_LOCAL(logger_, "Utils")
+SDL_CREATE_LOG_VARIABLE("Utils")
struct GetCString {
char* operator()(const std::string& string) {
@@ -96,8 +96,7 @@ bool System::Execute(bool wait) {
delete[] argv;
if (ret == -1) {
- LOG4CXX_ERROR(logger_,
- "Can't execute command: " << command_ << " Errno is: "
+ SDL_LOG_ERROR("Can't execute command: " << command_ << " Errno is: "
<< std::strerror(errno));
return false;
}
@@ -117,13 +116,13 @@ bool System::Execute(bool wait) {
switch (pid_command) {
case -1: { // Error
- LOG4CXX_FATAL(logger_, "fork() failed!");
+ SDL_LOG_FATAL("fork() failed!");
return false;
}
case 0: { // Child process
int32_t fd_dev0 = open("/dev/null", O_RDWR, S_IWRITE);
if (0 > fd_dev0) {
- LOG4CXX_FATAL(logger_, "Open dev0 failed!");
+ SDL_LOG_FATAL("Open dev0 failed!");
return false;
}
// close input/output file descriptors.
@@ -143,7 +142,7 @@ bool System::Execute(bool wait) {
// Execute the program.
if (execvp(command_.c_str(), argv) == -1) {
- LOG4CXX_ERROR(logger_, "Can't execute command: " << command_);
+ SDL_LOG_ERROR("Can't execute command: " << command_);
_exit(EXIT_FAILURE);
}
delete[] argv;
@@ -151,14 +150,14 @@ bool System::Execute(bool wait) {
return true;
}
default: { /* Parent process */
- LOG4CXX_INFO(logger_, "Process created with pid " << pid_command);
+ SDL_LOG_INFO("Process created with pid " << pid_command);
if (wait) {
int status;
pid_t wait_pid;
do {
wait_pid = waitpid(pid_command, &status, WUNTRACED | WCONTINUED);
if (wait_pid == -1) {
- LOG4CXX_ERROR_WITH_ERRNO(logger_, "Can't wait");
+ SDL_LOG_ERROR_WITH_ERRNO("Can't wait");
_exit(EXIT_FAILURE);
return false;
}
diff --git a/src/components/utils/src/threads/async_runner.cc b/src/components/utils/src/threads/async_runner.cc
index 740db016be..3109339340 100644
--- a/src/components/utils/src/threads/async_runner.cc
+++ b/src/components/utils/src/threads/async_runner.cc
@@ -38,28 +38,28 @@
namespace threads {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Utils")
+SDL_CREATE_LOG_VARIABLE("Utils")
AsyncRunner::AsyncRunner(const std::string& thread_name)
: executor_(new AsyncRunnerDelegate) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
thread_ = threads::CreateThread(thread_name.c_str(), executor_);
- thread_->start();
+ thread_->Start();
}
void AsyncRunner::AsyncRun(ThreadDelegate* delegate) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
executor_->runDelegate(delegate);
}
void AsyncRunner::Stop() {
- LOG4CXX_AUTO_TRACE(logger_);
- thread_->join();
+ SDL_LOG_AUTO_TRACE();
+ thread_->Stop(threads::Thread::kThreadStopDelegate);
}
AsyncRunner::~AsyncRunner() {
- LOG4CXX_AUTO_TRACE(logger_);
- thread_->join();
+ SDL_LOG_AUTO_TRACE();
+ thread_->Stop(threads::Thread::kThreadSoftStop);
delete executor_;
threads::DeleteThread(thread_);
}
@@ -81,7 +81,7 @@ void AsyncRunner::AsyncRunnerDelegate::processDelegate() {
}
void AsyncRunner::AsyncRunnerDelegate::waitForDelegate() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(delegates_queue_lock_);
if (!stop_flag_ && delegates_queue_.empty()) {
delegate_notifier_.Wait(lock);
@@ -89,7 +89,7 @@ void AsyncRunner::AsyncRunnerDelegate::waitForDelegate() {
}
void AsyncRunner::AsyncRunnerDelegate::threadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
while (!stop_flag_) {
processDelegate();
waitForDelegate();
@@ -97,14 +97,14 @@ void AsyncRunner::AsyncRunnerDelegate::threadMain() {
}
void AsyncRunner::AsyncRunnerDelegate::exitThreadMain() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(delegates_queue_lock_);
stop_flag_ = true;
delegate_notifier_.NotifyOne();
}
void AsyncRunner::AsyncRunnerDelegate::runDelegate(ThreadDelegate* delegate) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(delegates_queue_lock_);
delegates_queue_.push(delegate);
delegate_notifier_.NotifyOne();
diff --git a/src/components/utils/src/threads/pulse_thread_delegate.cc b/src/components/utils/src/threads/pulse_thread_delegate.cc
index a76b17368a..79174ae693 100644
--- a/src/components/utils/src/threads/pulse_thread_delegate.cc
+++ b/src/components/utils/src/threads/pulse_thread_delegate.cc
@@ -37,32 +37,31 @@
namespace threads {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Utils")
+SDL_CREATE_LOG_VARIABLE("Utils")
PulseThreadDelegate::PulseThreadDelegate() : run_(false) {
- LOG4CXX_TRACE(logger_, "Creating QNX channel");
+ SDL_LOG_TRACE("Creating QNX channel");
chid_ = ChannelCreate(0);
if (chid_ == -1) {
- LOG4CXX_ERROR(logger_, "Failed to create QNX channel");
+ SDL_LOG_ERROR("Failed to create QNX channel");
return;
}
- LOG4CXX_DEBUG(logger_, "Created QNX channel " << chid_);
+ SDL_LOG_DEBUG("Created QNX channel " << chid_);
- LOG4CXX_TRACE(logger_, "Connecting to QNX channel " << chid_);
+ SDL_LOG_TRACE("Connecting to QNX channel " << chid_);
coid_ = ConnectAttach(ND_LOCAL_NODE, 0, chid_, _NTO_SIDE_CHANNEL, 0);
if (coid_ == -1) {
- LOG4CXX_ERROR(logger_, "Failed to connect to QNX channel " << chid_);
+ SDL_LOG_ERROR("Failed to connect to QNX channel " << chid_);
return;
}
- LOG4CXX_DEBUG(logger_, "Connected to QNX channel " << chid_);
+ SDL_LOG_DEBUG("Connected to QNX channel " << chid_);
run_ = true;
}
void PulseThreadDelegate::threadMain() {
if (!Init()) {
- LOG4CXX_ERROR(logger_,
- "Failed to initialize thread for QNX channel " << chid_);
+ SDL_LOG_ERROR("Failed to initialize thread for QNX channel " << chid_);
return;
}
while (run_) {
@@ -70,9 +69,9 @@ void PulseThreadDelegate::threadMain() {
SIGEV_PULSE_INIT(&event, coid_, SIGEV_PULSE_PRIO_INHERIT, PULSE_CODE, 0);
if (ArmEvent(&event)) {
struct _pulse pulse;
- LOG4CXX_INFO(logger_, "Waiting for pulse on QNX channel " << chid_);
+ SDL_LOG_INFO("Waiting for pulse on QNX channel " << chid_);
if (MsgReceivePulse(chid_, &pulse, sizeof(pulse), 0) != -1) {
- LOG4CXX_INFO(logger_, "Received pulse on QNX channel " << chid_);
+ SDL_LOG_INFO("Received pulse on QNX channel " << chid_);
switch (pulse.code) {
case PULSE_CODE:
OnPulse();
@@ -80,12 +79,10 @@ void PulseThreadDelegate::threadMain() {
}
} else {
if (run_) {
- LOG4CXX_WARN(logger_,
- "Error occurred while waiting for pulse on QNX channel "
- << chid_);
+ SDL_LOG_WARN("Error occurred while waiting for pulse on QNX channel "
+ << chid_);
} else {
- LOG4CXX_INFO(logger_,
- "QNX channel " << chid_ << " is apparently destroyed");
+ SDL_LOG_INFO("QNX channel " << chid_ << " is apparently destroyed");
}
}
}
@@ -96,18 +93,18 @@ void PulseThreadDelegate::threadMain() {
void PulseThreadDelegate::exitThreadMain() {
run_ = false;
- LOG4CXX_TRACE(logger_, "Disconnecting from QNX channel " << chid_);
+ SDL_LOG_TRACE("Disconnecting from QNX channel " << chid_);
if (ConnectDetach(coid_) != -1) {
- LOG4CXX_DEBUG(logger_, "Disconnected from QNX channel " << chid_);
+ SDL_LOG_DEBUG("Disconnected from QNX channel " << chid_);
} else {
- LOG4CXX_WARN(logger_, "Failed to disconnect from QNX channel " << chid_);
+ SDL_LOG_WARN("Failed to disconnect from QNX channel " << chid_);
}
- LOG4CXX_TRACE(logger_, "Destroying QNX channel " << chid_);
+ SDL_LOG_TRACE("Destroying QNX channel " << chid_);
if (ChannelDestroy(chid_) != -1) { // unblocks MsgReceivePulse()
- LOG4CXX_DEBUG(logger_, "QNX channel " << chid_ << " destroyed");
+ SDL_LOG_DEBUG("QNX channel " << chid_ << " destroyed");
} else {
- LOG4CXX_WARN(logger_, "Failed to destroy QNX channel " << chid_);
+ SDL_LOG_WARN("Failed to destroy QNX channel " << chid_);
}
}
diff --git a/src/components/utils/src/threads/thread_delegate.cc b/src/components/utils/src/threads/thread_delegate.cc
index e071959522..a23f1b051e 100644
--- a/src/components/utils/src/threads/thread_delegate.cc
+++ b/src/components/utils/src/threads/thread_delegate.cc
@@ -41,7 +41,7 @@ namespace threads {
ThreadDelegate::~ThreadDelegate() {
if (thread_) {
- thread_->set_delegate(NULL);
+ thread_->SetDelegate(NULL);
}
}
@@ -50,7 +50,7 @@ void ThreadDelegate::exitThreadMain() {
if (thread_->IsCurrentThread()) {
pthread_exit(NULL);
} else {
- pthread_cancel(thread_->thread_handle());
+ pthread_cancel(thread_->ThreadHandle());
}
thread_ = NULL;
}
diff --git a/src/components/utils/src/threads/thread_manager.cc b/src/components/utils/src/threads/thread_manager.cc
index 8825510d74..466bd98dc5 100644
--- a/src/components/utils/src/threads/thread_manager.cc
+++ b/src/components/utils/src/threads/thread_manager.cc
@@ -49,6 +49,6 @@
namespace threads {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Utils")
+SDL_CREATE_LOG_VARIABLE("Utils")
} // namespace threads
diff --git a/src/components/utils/src/threads/thread_posix.cc b/src/components/utils/src/threads/thread_posix.cc
index 35c1cd7084..23e3da4a8d 100644
--- a/src/components/utils/src/threads/thread_posix.cc
+++ b/src/components/utils/src/threads/thread_posix.cc
@@ -53,71 +53,82 @@ const size_t THREAD_NAME_SIZE = 15;
namespace threads {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Utils")
+SDL_CREATE_LOG_VARIABLE("Utils")
size_t Thread::kMinStackSize =
PTHREAD_STACK_MIN; /* Ubuntu : 16384 ; QNX : 256; */
void Thread::cleanup(void* arg) {
- LOG4CXX_AUTO_TRACE(logger_);
- Thread* thread = reinterpret_cast<Thread*>(arg);
+ SDL_LOG_AUTO_TRACE();
+ Thread* thread = static_cast<Thread*>(arg);
sync_primitives::AutoLock auto_lock(thread->state_lock_);
- thread->isThreadRunning_ = false;
+ thread->thread_state_ = kThreadStateCompleted;
+ thread->thread_command_ = kThreadCommandNone;
thread->state_cond_.Broadcast();
}
void* Thread::threadFunc(void* arg) {
- // 0 - state_lock unlocked
- // stopped = 0
- // running = 0
- // finalized = 0
- // 4 - state_lock unlocked
- // stopped = 1
- // running = 1
- // finalized = 0
- // 5 - state_lock unlocked
- // stopped = 1
- // running = 1
- // finalized = 1
- pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
-
- threads::Thread* thread = reinterpret_cast<Thread*>(arg);
+ auto thread_procedure_execution = [](Thread* thread) {
+ thread->thread_state_ = kThreadStateRunning;
+ pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
+ pthread_testcancel();
+ thread->state_lock_.Release();
+ thread->delegate_->threadMain();
+ thread->state_lock_.Acquire();
+ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
+ };
+
+ threads::Thread* thread = static_cast<Thread*>(arg);
DCHECK(thread);
+ thread->state_lock_.Acquire();
+
+ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
pthread_cleanup_push(&cleanup, thread);
- thread->state_lock_.Acquire();
thread->state_cond_.Broadcast();
- while (!thread->finalized_) {
- LOG4CXX_DEBUG(logger_, "Thread #" << pthread_self() << " iteration");
- thread->run_cond_.Wait(thread->state_lock_);
- LOG4CXX_DEBUG(logger_,
- "Thread #" << pthread_self() << " execute. "
- << "stopped_ = " << thread->stopped_
- << "; finalized_ = " << thread->finalized_);
- if (!thread->stopped_ && !thread->finalized_) {
- thread->isThreadRunning_ = true;
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
- pthread_testcancel();
-
- thread->state_lock_.Release();
- thread->delegate_->threadMain();
- thread->state_lock_.Acquire();
-
- pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
- thread->isThreadRunning_ = false;
+ // We have special variable for controlling iterations/exiting thread
+ // in order to separate decision logic (continue iterations or exit?)
+ // from controlling while cycle
+ bool continueIterations = true;
+
+ while (continueIterations) {
+ thread->thread_state_ = kThreadStateIdle;
+ SDL_LOG_DEBUG("Thread #" << pthread_self() << " iteration");
+ thread->state_cond_.Wait(thread->state_lock_);
+ SDL_LOG_DEBUG("Thread #"
+ << pthread_self() << " execute. "
+ << "thread_command_ = " << thread->thread_command_);
+
+ switch (thread->thread_command_) {
+ case kThreadCommandRun:
+ thread_procedure_execution(thread);
+ break;
+
+ case kThreadCommandFinalize:
+ continueIterations = false;
+ break;
+
+ default:
+ SDL_LOG_ERROR("Incorrect thread command: " << thread->thread_command_);
+ break;
}
+
+ thread->thread_command_ = kThreadCommandNone; // consumed
thread->state_cond_.Broadcast();
- LOG4CXX_DEBUG(logger_,
- "Thread #" << pthread_self() << " finished iteration");
+ SDL_LOG_DEBUG("Thread #" << pthread_self() << " finished iteration");
}
thread->state_lock_.Release();
- pthread_cleanup_pop(1);
- LOG4CXX_DEBUG(logger_,
- "Thread #" << pthread_self() << " exited successfully");
+ const auto execute_cleanup = 1;
+ // The pthread_cleanup_pop() function shall remove the routine at the top of
+ // the calling thread's cancellation cleanup stack and optionally invoke it
+ // (if execute is non-zero).
+ pthread_cleanup_pop(execute_cleanup);
+
+ SDL_LOG_DEBUG("Thread #" << pthread_self() << " exited successfully");
return NULL;
}
@@ -127,8 +138,7 @@ void Thread::SetNameForId(const PlatformThreadHandle& thread_id,
name.erase(THREAD_NAME_SIZE);
const int rc = pthread_setname_np(thread_id, name.c_str());
if (rc != EOK) {
- LOG4CXX_WARN(logger_,
- "Couldn't set pthread name \"" << name << "\", error code "
+ SDL_LOG_WARN("Couldn't set pthread name \"" << name << "\", error code "
<< rc << " (" << strerror(rc)
<< ")");
}
@@ -139,13 +149,11 @@ Thread::Thread(const char* name, ThreadDelegate* delegate)
, delegate_(delegate)
, handle_(0)
, thread_options_()
- , isThreadRunning_(0)
- , stopped_(false)
- , finalized_(false)
- , thread_created_(false) {}
+ , thread_command_(kThreadCommandNone)
+ , thread_state_(kThreadStateNone) {}
-bool Thread::start() {
- return start(thread_options_);
+bool Thread::Start() {
+ return Start(thread_options_);
}
PlatformThreadHandle Thread::CurrentId() {
@@ -153,154 +161,295 @@ PlatformThreadHandle Thread::CurrentId() {
}
bool Thread::IsCurrentThread() const {
- return pthread_equal(CurrentId(), thread_handle());
+ return pthread_equal(CurrentId(), ThreadHandle());
}
-bool Thread::start(const ThreadOptions& options) {
- LOG4CXX_AUTO_TRACE(logger_);
+bool Thread::Start(const ThreadOptions& options) {
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(state_lock_);
- // 1 - state_lock locked
- // stopped = 0
- // running = 0
if (!delegate_) {
- LOG4CXX_ERROR(logger_,
- "Cannot start thread " << name_ << ": delegate is NULL");
- // 0 - state_lock unlocked
+ SDL_LOG_ERROR("Cannot start thread " << name_ << ": delegate is NULL");
+ return false;
+ }
+
+ if (kThreadStateCompleted == thread_state_) {
+ SDL_LOG_ERROR("Cannot start thread " << name_ << ": thread completed");
return false;
}
- if (isThreadRunning_) {
- LOG4CXX_TRACE(
- logger_,
- "EXIT thread " << name_ << " #" << handle_ << " is already running");
+ if (kThreadStateRunning == thread_state_) {
+ SDL_LOG_TRACE("EXIT thread " << name_ << " #" << handle_
+ << " is already running");
return true;
}
- thread_options_ = options;
+ if (!handle_) {
+ thread_options_ = options;
+ pthread_attr_t attributes = SetThreadCreationAttributes(&thread_options_);
+
+ int pthread_result =
+ pthread_create(&handle_, &attributes, threadFunc, this);
+ pthread_attr_destroy(&attributes);
+
+ if (EOK != pthread_result) {
+ SDL_LOG_ERROR("Couldn't create thread "
+ << name_ << ". Error code = " << pthread_result << " (\""
+ << strerror(pthread_result) << "\")");
+ handle_ = 0;
+ thread_state_ = kThreadStateError;
+ return false;
+ }
+
+ SDL_LOG_DEBUG("Created thread: " << name_);
+ SetNameForId(handle_, name_);
+ // state_lock 0
+ // possible concurrencies: stop and threadFunc
+ state_cond_.Wait(auto_lock);
+ }
+
+ if (kThreadCommandFinalize == thread_command_) {
+ SDL_LOG_DEBUG("Thread " << name_ << " #" << handle_
+ << " waiting finalize.");
+ return false;
+ }
+
+ thread_command_ = kThreadCommandRun;
+ state_cond_.NotifyOne();
+
+ SDL_LOG_DEBUG("Thread " << name_ << " #" << handle_ << " started."
+ << " pthread_result = " << EOK);
+ return true;
+}
+
+void Thread::SchedYield() {
+ sched_yield();
+}
+
+bool Thread::Stop(const ThreadStopOption stop_option) {
+ SDL_LOG_AUTO_TRACE();
+ DCHECK_OR_RETURN(
+ (kThreadStopDelegate <= stop_option) && (kThreadForceStop >= stop_option),
+ false);
+ sync_primitives::AutoLock auto_lock(state_lock_);
+ thread_command_ = kThreadCommandNone; // cancel all active commands
+
+ if (!handle_ && kThreadStateError != thread_state_) {
+ SDL_LOG_WARN(
+ "Thread " << name_ << ": can't stopped,thread is not run handle_: "
+ << handle_ << " thread_state_ is: " << thread_state_);
+ return false;
+ }
+
+ if (kThreadStateError == thread_state_ ||
+ kThreadStateCompleted == thread_state_) {
+ SDL_LOG_WARN("Thread " << name_ << ": can't stopped thread_state_ is: "
+ << thread_state_);
+ return false;
+ }
+
+ SDL_LOG_DEBUG("Stopping thread #" << handle_ << " \"" << name_ << "\"");
+
+ bool result = false;
+ switch (stop_option) {
+ case kThreadStopDelegate:
+ result = StopDelegate(auto_lock);
+ break;
+ case kThreadSoftStop:
+ result = StopSoft(auto_lock);
+ break;
+ case kThreadForceStop:
+ StopForce(auto_lock);
+ result = true;
+ break;
+ default:
+ SDL_LOG_ERROR("Incorrect thread stop option: " << stop_option);
+ break;
+ }
+
+ SDL_LOG_DEBUG("Is thread stopped #" << handle_ << " \"" << name_
+ << " \": " << result);
+ return result;
+}
+
+void Thread::Join(const ThreadJoinOption join_option) {
+ SDL_LOG_AUTO_TRACE();
+ DCHECK_OR_RETURN_VOID(!IsCurrentThread());
+ DCHECK_OR_RETURN_VOID((kThreadJoinDelegate <= join_option) &&
+ (kThreadJoinThread >= join_option));
+ if (!handle_ || kThreadStateError == thread_state_) {
+ SDL_LOG_WARN("Thread " << name_ << ": is not joinable handle_: " << handle_
+ << " thread_state_ is: " << thread_state_);
+ return;
+ }
+
+ {
+ sync_primitives::AutoLock auto_lock(state_lock_);
+ JoinDelegate(auto_lock);
+ }
+
+ if (kThreadJoinDelegate == join_option) {
+ return;
+ }
+
+ SDL_LOG_DEBUG("Waiting for #" << handle_ << " to finished thread #"
+ << pthread_self());
+
+ pthread_join(handle_, NULL);
+}
+
+Thread::~Thread() {
+ Stop(kThreadForceStop);
+ Join(kThreadJoinThread);
+}
+Thread* CreateThread(const char* name, ThreadDelegate* delegate) {
+ Thread* thread = new Thread(name, delegate);
+ delegate->set_thread(thread);
+ return thread;
+}
+
+void DeleteThread(Thread* thread) {
+ delete thread;
+}
+
+pthread_attr_t Thread::SetThreadCreationAttributes(
+ ThreadOptions* thread_options) {
pthread_attr_t attributes;
int pthread_result = pthread_attr_init(&attributes);
if (pthread_result != EOK) {
- LOG4CXX_WARN(logger_,
- "Couldn't init pthread attributes. Error code = "
- << pthread_result << " (\"" << strerror(pthread_result)
- << "\")");
+ SDL_LOG_WARN("Couldn't init pthread attributes. Error code = "
+ << pthread_result << " (\"" << strerror(pthread_result)
+ << "\")");
+ }
+
+ if (!thread_options) {
+ return attributes;
}
- if (!thread_options_.is_joinable()) {
+ if (!thread_options->is_joinable()) {
+ SDL_LOG_WARN(
+ "Set state detach attribute, undefined behavior possible with "
+ "this attribute");
pthread_result =
pthread_attr_setdetachstate(&attributes, PTHREAD_CREATE_DETACHED);
if (pthread_result != EOK) {
- LOG4CXX_WARN(logger_,
- "Couldn't set detach state attribute. Error code = "
- << pthread_result << " (\"" << strerror(pthread_result)
- << "\")");
- thread_options_.is_joinable(false);
+ SDL_LOG_WARN("Couldn't set detach state attribute. Error code = "
+ << pthread_result << " (\"" << strerror(pthread_result)
+ << "\")");
+ thread_options->is_joinable(false);
}
}
- const size_t stack_size = thread_options_.stack_size();
+ const size_t stack_size = thread_options->stack_size();
if (stack_size >= Thread::kMinStackSize) {
pthread_result = pthread_attr_setstacksize(&attributes, stack_size);
if (pthread_result != EOK) {
- LOG4CXX_WARN(logger_,
- "Couldn't set stacksize = "
- << stack_size << ". Error code = " << pthread_result
- << " (\"" << strerror(pthread_result) << "\")");
+ SDL_LOG_WARN("Couldn't set stacksize = "
+ << stack_size << ". Error code = " << pthread_result
+ << " (\"" << strerror(pthread_result) << "\")");
}
} else {
ThreadOptions thread_options_temp(Thread::kMinStackSize,
- thread_options_.is_joinable());
- thread_options_ = thread_options_temp;
+ thread_options->is_joinable());
+ *thread_options = thread_options_temp;
}
- if (!thread_created_) {
- // state_lock 1
- pthread_result = pthread_create(&handle_, &attributes, threadFunc, this);
- if (pthread_result == EOK) {
- LOG4CXX_DEBUG(logger_, "Created thread: " << name_);
- SetNameForId(handle_, name_);
- // state_lock 0
- // possible concurrencies: stop and threadFunc
- state_cond_.Wait(auto_lock);
- thread_created_ = true;
- } else {
- LOG4CXX_ERROR(logger_,
- "Couldn't create thread "
- << name_ << ". Error code = " << pthread_result
- << " (\"" << strerror(pthread_result) << "\")");
- }
- }
- stopped_ = false;
- run_cond_.NotifyOne();
- LOG4CXX_DEBUG(logger_,
- "Thread " << name_ << " #" << handle_ << " started."
- << " pthread_result = " << pthread_result);
- pthread_attr_destroy(&attributes);
- return pthread_result == EOK;
+ return attributes;
}
-void Thread::yield() {
- sched_yield();
+bool Thread::StopDelegate(sync_primitives::AutoLock& auto_lock) {
+ SDL_LOG_AUTO_TRACE();
+
+ if (kThreadStateRunning != thread_state_) {
+ SDL_LOG_WARN("Thread " << name_ << ": task can't stopped thread_state_ is: "
+ << thread_state_);
+ return false;
+ }
+
+ if (!delegate_) {
+ SDL_LOG_WARN("Thread " << name_ << ": task can't stopped delegate is NULL");
+ return false;
+ }
+
+ delegate_->exitThreadMain();
+
+ JoinDelegate(auto_lock);
+
+ return true;
}
-void Thread::stop() {
- LOG4CXX_AUTO_TRACE(logger_);
- sync_primitives::AutoLock auto_lock(state_lock_);
+bool Thread::StopSoft(sync_primitives::AutoLock& auto_lock) {
+ SDL_LOG_AUTO_TRACE();
+
+ if (kThreadStateRunning == thread_state_) {
+ bool result = StopDelegate(auto_lock);
+ if (!result) {
+ return false;
+ }
+ }
- stopped_ = true;
+ if (kThreadStateIdle != thread_state_) {
+ SDL_LOG_WARN("Thread " << name_ << ": can't stopped thread_state_ is: "
+ << thread_state_);
+ return false;
+ }
- LOG4CXX_DEBUG(logger_,
- "Stopping thread #" << handle_ << " \"" << name_ << "\"");
+ thread_command_ = kThreadCommandFinalize;
+ state_cond_.NotifyOne();
- if (delegate_ && isThreadRunning_) {
- delegate_->exitThreadMain();
+ if (!pthread_equal(pthread_self(), handle_)) {
+ SDL_LOG_DEBUG("Waiting for #" << handle_ << " last iteration in thread #"
+ << pthread_self());
+ state_cond_.Wait(auto_lock);
}
- LOG4CXX_DEBUG(logger_,
- "Stopped thread #" << handle_ << " \"" << name_ << " \"");
+ return true;
}
-void Thread::join() {
- LOG4CXX_AUTO_TRACE(logger_);
- DCHECK_OR_RETURN_VOID(!IsCurrentThread());
-
- stop();
+void Thread::StopForce(sync_primitives::AutoLock& auto_lock) {
+ SDL_LOG_AUTO_TRACE();
- sync_primitives::AutoLock auto_lock(state_lock_);
- run_cond_.NotifyOne();
- if (isThreadRunning_) {
- if (!pthread_equal(pthread_self(), handle_)) {
- LOG4CXX_DEBUG(logger_,
- "Waiting for #" << handle_
- << " finished iteration in thread #"
- << pthread_self());
- state_cond_.Wait(auto_lock);
+ if (kThreadStateRunning == thread_state_ ||
+ kThreadStateIdle == thread_state_) {
+ bool result = StopSoft(auto_lock);
+ if (result) {
+ return;
}
}
-}
+ // Notify not to thread but to actor
+ // that may starting this thread in race condition.
+ thread_state_ = kThreadStateCompleted;
+ state_cond_.NotifyOne();
-Thread::~Thread() {
- finalized_ = true;
- stopped_ = true;
- join();
- // in some platforms pthread_join behaviour is undefined when thread is
- // not created(pthread_create) and call pthread_join.
- if (handle_) {
- pthread_join(handle_, NULL);
+ SDL_LOG_WARN("The thread was not soft stopped, the start of a forced stop");
+
+ if (!pthread_equal(pthread_self(), handle_)) {
+ SDL_LOG_DEBUG("Thread #" << handle_ << " cancel");
+ pthread_cancel(handle_);
+ } else {
+ SDL_LOG_DEBUG("Thread #" << handle_ << " exit");
+ pthread_exit(NULL);
+ NOTREACHED();
}
}
-Thread* CreateThread(const char* name, ThreadDelegate* delegate) {
- Thread* thread = new Thread(name, delegate);
- delegate->set_thread(thread);
- return thread;
-}
+void Thread::JoinDelegate(sync_primitives::AutoLock& auto_lock) {
+ SDL_LOG_AUTO_TRACE();
+ if (kThreadStateRunning != thread_state_) {
+ SDL_LOG_WARN("Thread " << name_
+ << ": delegate is not joinable thread_state_ is: "
+ << thread_state_);
+ return;
+ }
-void DeleteThread(Thread* thread) {
- delete thread;
+ if (!pthread_equal(pthread_self(), handle_)) {
+ SDL_LOG_DEBUG("Waiting for #" << handle_
+ << " finished iteration in thread #"
+ << pthread_self());
+ state_cond_.Wait(auto_lock);
+ }
}
} // namespace threads
diff --git a/src/components/utils/src/threads/thread_validator.cc b/src/components/utils/src/threads/thread_validator.cc
index 3b753e79b5..c59054ae11 100644
--- a/src/components/utils/src/threads/thread_validator.cc
+++ b/src/components/utils/src/threads/thread_validator.cc
@@ -36,7 +36,7 @@
namespace threads {
-CREATE_LOGGERPTR_GLOBAL(logger_, "Utils")
+SDL_CREATE_LOG_VARIABLE("Utils")
SingleThreadSimpleValidator::SingleThreadSimpleValidator()
: creation_thread_id_(Thread::CurrentId()) {}
@@ -46,13 +46,12 @@ SingleThreadSimpleValidator::~SingleThreadSimpleValidator() {}
void SingleThreadSimpleValidator::AssertRunningOnCreationThread() const {
PlatformThreadHandle current_id = Thread::CurrentId();
if (creation_thread_id_ != current_id) {
- LOG4CXX_ERROR(
- logger_,
- "Single-threaded object created at thread "
- << creation_thread_id_ << " is accessed from thread " << current_id
+ SDL_LOG_ERROR("Single-threaded object created at thread "
+ << creation_thread_id_ << " is accessed from thread "
+ << current_id
#ifdef BACKTRACE_SUPPORT
- << "\n"
- << utils::Backtrace()
+ << "\n"
+ << utils::Backtrace()
#endif
);
}
@@ -74,12 +73,11 @@ void SingleThreadValidator::PassToThread(PlatformThreadHandle thread_id) const {
void SingleThreadValidator::AssertRunningOnValidThread() const {
PlatformThreadHandle current_id = Thread::CurrentId();
if (owning_thread_id_ != current_id) {
- LOG4CXX_ERROR(logger_,
- "Single-threaded object owned by thread "
- << owning_thread_id_ << " is accessed from thread "
- << current_id << "\n"
+ SDL_LOG_ERROR("Single-threaded object owned by thread "
+ << owning_thread_id_ << " is accessed from thread "
+ << current_id << "\n"
#ifdef BACKTRACE_SUPPORT
- << utils::Backtrace()
+ << utils::Backtrace()
#endif
);
}
diff --git a/src/components/utils/src/timer.cc b/src/components/utils/src/timer.cc
index 8e854654de..ceade03afb 100644
--- a/src/components/utils/src/timer.cc
+++ b/src/components/utils/src/timer.cc
@@ -41,7 +41,7 @@
#include "utils/threads/thread_delegate.h"
#include "utils/timer_task.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "Utils")
+SDL_CREATE_LOG_VARIABLE("Utils")
timer::Timer::Timer(const std::string& name, TimerTask* task)
: name_(name)
@@ -51,15 +51,15 @@ timer::Timer::Timer(const std::string& name, TimerTask* task)
, thread_(threads::CreateThread(name_.c_str(), delegate_.get()))
, single_shot_(true)
, completed_flag_(false) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
DCHECK(!name_.empty());
DCHECK(task_);
DCHECK(thread_);
- LOG4CXX_DEBUG(logger_, "Timer " << name_ << " has been created");
+ SDL_LOG_DEBUG("Timer " << name_ << " has been created");
}
timer::Timer::~Timer() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(state_lock_);
StopThread();
StopDelegate();
@@ -69,12 +69,12 @@ timer::Timer::~Timer() {
DeleteThread(thread_);
DCHECK(task_);
delete task_;
- LOG4CXX_DEBUG(logger_, "Timer " << name_ << " has been destroyed");
+ SDL_LOG_DEBUG("Timer " << name_ << " has been destroyed");
}
void timer::Timer::Start(const Milliseconds timeout,
const TimerType timer_type) {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(state_lock_);
StopThread();
completed_flag_ = false;
@@ -91,16 +91,16 @@ void timer::Timer::Start(const Milliseconds timeout,
};
StartDelegate(timeout);
StartThread();
- LOG4CXX_DEBUG(logger_, "Timer " << name_ << " has been started");
+ SDL_LOG_DEBUG("Timer " << name_ << " has been started");
}
void timer::Timer::Stop() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock auto_lock(state_lock_);
StopThread();
StopDelegate();
single_shot_ = true;
- LOG4CXX_DEBUG(logger_, "Timer " << name_ << " has been stopped");
+ SDL_LOG_DEBUG("Timer " << name_ << " has been stopped");
}
bool timer::Timer::is_running() const {
@@ -134,7 +134,7 @@ void timer::Timer::StartThread() {
DCHECK_OR_RETURN_VOID(thread_);
if (!thread_->IsCurrentThread()) {
- thread_->start();
+ thread_->Start();
}
}
@@ -148,7 +148,7 @@ void timer::Timer::StopThread() {
delegate_->set_finalized_flag(true);
{
sync_primitives::AutoUnlock auto_unlock(state_lock_);
- thread_->join();
+ thread_->Stop(threads::Thread::kThreadStopDelegate);
}
delegate_->set_finalized_flag(false);
}
@@ -206,22 +206,20 @@ bool timer::Timer::TimerDelegate::finalized_flag() const {
void timer::Timer::TimerDelegate::threadMain() {
sync_primitives::AutoLock auto_lock(state_lock_ref_);
while (!stop_flag_ && !finalized_flag_) {
- LOG4CXX_DEBUG(logger_, "Milliseconds left to wait: " << timeout_);
+ SDL_LOG_DEBUG("Milliseconds left to wait: " << timeout_);
if (sync_primitives::ConditionalVariable::kTimeout ==
state_condition_.WaitFor(auto_lock, timeout_)) {
- LOG4CXX_DEBUG(logger_,
- "Timer has finished counting. Timeout (ms): " << timeout_);
+ SDL_LOG_DEBUG("Timer has finished counting. Timeout (ms): " << timeout_);
if (timer_) {
sync_primitives::AutoUnlock auto_unlock(auto_lock);
timer_->OnTimeout();
}
} else {
- LOG4CXX_DEBUG(logger_, "Timer has been force reset");
+ SDL_LOG_DEBUG("Timer has been force reset");
}
}
}
void timer::Timer::TimerDelegate::exitThreadMain() {
- sync_primitives::AutoLock auto_lock(state_lock_ref_);
state_condition_.NotifyOne();
}
diff --git a/src/components/utils/test/CMakeLists.txt b/src/components/utils/test/CMakeLists.txt
index b5127ccabc..2db7d72d84 100644
--- a/src/components/utils/test/CMakeLists.txt
+++ b/src/components/utils/test/CMakeLists.txt
@@ -78,7 +78,6 @@ endif()
# exclude some tests
list(APPEND EXCLUDE_PATHS
generated_code_with_sqlite_test.cc
- posix_thread_test.cc
resource_usage_test.cc
)
diff --git a/src/components/utils/test/auto_trace_test.cc b/src/components/utils/test/auto_trace_test.cc
deleted file mode 100644
index 41dc90cae4..0000000000
--- a/src/components/utils/test/auto_trace_test.cc
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 2015, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <ctime>
-#include <fstream>
-
-#include "gtest/gtest.h"
-#include "utils/auto_trace.h"
-#include "utils/date_time.h"
-#include "utils/file_system.h"
-#include "utils/helpers.h"
-#include "utils/log_message_loop_thread.h"
-#include "utils/logger.h"
-#include "utils/logger_status.h"
-#include "utils/threads/message_loop_thread.h"
-#include "utils/threads/thread.h"
-
-namespace test {
-namespace components {
-namespace utils_test {
-
-using namespace ::logger;
-
-CREATE_LOGGERPTR_GLOBAL(logger_, "AutoTraceTestLog")
-
-namespace {
-const std::string kFileName =
- file_system::CurrentWorkingDirectory() + "/AutoTraceTestLogFile.log";
-} // namespace
-
-void Preconditions() {
- // Delete file with previous logs
- if (file_system::FileExists(kFileName)) {
- // If logger is active now deleting log file cause undefined befaviour.
- DEINIT_LOGGER();
- ASSERT_TRUE(file_system::DeleteFile(kFileName))
- << "Can't delete AutoTraceTestLogFile.log";
- }
-}
-
-void InitLogger() {
- // Set enabled logs
- INIT_LOGGER("log4cxx.properties", true);
- // DEINIT_LOGGER will be called in test_main.cc
-}
-
-void CreateDeleteAutoTrace(const std::string& testlog) {
- LOG4CXX_AUTO_TRACE(logger_);
- LOG4CXX_DEBUG(logger_, testlog);
-}
-
-/**
- * @brief IsLogLineContains cheks if log line contains debug message with
- * specified debug message
- * @param log_line line to search in
- * @param debug_level expected debug level
- * @param debug_log_message expected debug message
- * @return true if debug_message exist in log_line with debug_level
- */
-bool IsLogLineContains(const std::string& log_line,
- const std::string& debug_level,
- const std::string& debug_message) {
- return log_line.find(debug_level) != std::string::npos &&
- log_line.find(debug_message) != std::string::npos;
-}
-
-/**
- * @brief CheckAutoTraceDebugInFile chacks if logfile contains autotrace and
- * debug for test AutoTrace_WriteToFile_ReadCorrectString
- * @param debug_message message that should be logged with DEBUG level
- * @return true if trace enter, trace exit, debug message exist in log file
- */
-bool CheckAutoTraceDebugInFile(const std::string& debug_message) {
- using namespace helpers;
- const std::string debug_log_level = "DEBUG";
- const std::string trace_log_level = "TRACE";
- const std::string enter_message = ": Enter";
- const std::string exit_message = ": Exit";
- std::ifstream file_log(kFileName);
- if (!file_log.is_open()) {
- return false;
- }
-
- bool debug_found = false;
- bool trace_enter = false;
- bool trace_exit = false;
- for (std::string line;
- Compare<bool, EQ, ONE>(false, debug_found, trace_enter, trace_exit) &&
- getline(file_log, line);) {
- debug_found = debug_found
- ? debug_found
- : IsLogLineContains(line, debug_log_level, debug_message);
- trace_enter = trace_enter
- ? trace_enter
- : IsLogLineContains(line, trace_log_level, enter_message);
- trace_exit = trace_exit
- ? trace_exit
- : IsLogLineContains(line, trace_log_level, exit_message);
- }
- file_log.close();
- return Compare<bool, EQ, ALL>(true, debug_found, trace_enter, trace_exit);
-}
-// TODO(DTrunov) : Enable after APPLINK-25006 will be resolved
-TEST(AutoTraceTest, DISABLED_AutoTrace_WriteToFile_ReadCorrectString) {
- const std::string testlog = "Test trace is working!";
- Preconditions();
- InitLogger();
- CreateDeleteAutoTrace(testlog);
-
- FLUSH_LOGGER();
- ASSERT_TRUE(CheckAutoTraceDebugInFile(testlog));
-}
-
-} // namespace utils_test
-} // namespace components
-} // namespace test
diff --git a/src/components/utils/test/posix_thread_test.cc b/src/components/utils/test/posix_thread_test.cc
index 4bf0c8c092..2ba4e764f6 100644
--- a/src/components/utils/test/posix_thread_test.cc
+++ b/src/components/utils/test/posix_thread_test.cc
@@ -34,296 +34,354 @@
#include "utils/lock.h"
#include "utils/threads/thread.h"
-namespace test {
-namespace components {
-namespace utils_test {
+namespace threads {
using namespace sync_primitives;
-using namespace threads;
-
-// TODO(AByzhynar): Change this to use Gtest class to create all variables for
-// every TEST_F
-// TODO(AByzhynar): Add multithreading tests
namespace {
-const uint32_t MAX_SIZE = 20;
-const size_t MyStackSize = 32768;
-const char* threadName("test thread");
-const std::string test_thread_name("THREAD");
-sync_primitives::ConditionalVariable cond_var_;
-sync_primitives::Lock test_mutex_;
+const uint32_t kMaxSize = 20;
+const size_t kStackSize = 32768;
+const char* kThreadName = "test thread";
+const std::string kRenamedThreadName("THREAD");
}; // namespace
// ThreadDelegate successor
-class TestThreadDelegate : public threads::ThreadDelegate {
+class TestThreadDelegate : public ThreadDelegate {
public:
- TestThreadDelegate() : check_value_(false) {}
- void threadMain() {
+ TestThreadDelegate(const bool idle = false)
+ : idle_(idle), check_value_(false) {}
+ void threadMain() override {
AutoLock test_lock(test_mutex_);
check_value_ = true;
cond_var_.NotifyOne();
+ if (idle_) {
+ cond_var_.WaitFor(test_lock, 5000);
+ cond_var_.NotifyOne();
+ }
+ }
+
+ void exitThreadMain() override {
+ NotifyOne();
}
- bool check_value() const {
+ bool IsChangedValue() const {
return check_value_;
}
+ bool WaitFor(AutoLock& auto_lock, const uint32_t& milliseconds) {
+ return cond_var_.WaitFor(auto_lock, milliseconds);
+ }
+
+ void NotifyOne() {
+ cond_var_.NotifyOne();
+ }
+
+ Lock& GetLock() {
+ return test_mutex_;
+ }
+
private:
+ bool idle_;
bool check_value_;
+ sync_primitives::Lock test_mutex_;
+ sync_primitives::ConditionalVariable cond_var_;
};
-TEST(PosixThreadTest, CreateThread_ExpectThreadCreated) {
- // Arrange
- threads::Thread* thread = NULL;
- TestThreadDelegate* threadDelegate = new TestThreadDelegate();
- // Create thread
- ASSERT_NO_THROW(thread = CreateThread(threadName, threadDelegate));
- EXPECT_TRUE(thread != NULL);
- EXPECT_EQ(thread, threadDelegate->thread());
- EXPECT_EQ(thread->delegate(), threadDelegate);
- DeleteThread(thread);
- delete threadDelegate;
+class PosixThreadTest : public ::testing::Test {
+ public:
+ PosixThreadTest() : thread_delegate_(new TestThreadDelegate()) {
+ thread_ = CreateThread(kThreadName, thread_delegate_);
+ }
+
+ ~PosixThreadTest() {
+ thread_->Stop(Thread::kThreadForceStop);
+ delete thread_delegate_;
+ DeleteThread(thread_);
+ };
+
+ void ReplaceThreadDelegate(TestThreadDelegate* thread_delegate) {
+ EXPECT_TRUE(nullptr != thread_);
+ delete thread_->GetDelegate();
+ EXPECT_EQ(nullptr, thread_->GetDelegate());
+
+ thread_->SetDelegate(thread_delegate);
+ EXPECT_EQ(thread_delegate, thread_->GetDelegate());
+ }
+
+ protected:
+ TestThreadDelegate* thread_delegate_;
+ Thread* thread_;
+};
+
+TEST_F(PosixThreadTest, CreateThread_ExpectThreadCreated) {
+ EXPECT_TRUE(NULL != thread_);
+ EXPECT_EQ(thread_, thread_delegate_->thread());
+ EXPECT_EQ(thread_delegate_, thread_->GetDelegate());
+
+ delete thread_delegate_;
+ thread_delegate_ = nullptr;
// Check Delegate Dtor worked successfully
- EXPECT_EQ(NULL, thread->delegate());
+ EXPECT_EQ(NULL, thread_->GetDelegate());
}
-TEST(PosixThreadTest, CheckCreatedThreadName_ExpectCorrectName) {
- // Arrange
- threads::Thread* thread = NULL;
- threads::ThreadDelegate* threadDelegate = new TestThreadDelegate();
- // Create thread
- ASSERT_NO_THROW(thread = CreateThread(threadName, threadDelegate));
+TEST_F(PosixThreadTest, CheckCreatedThreadName_ExpectCorrectName) {
+ EXPECT_TRUE(NULL != thread_);
+ EXPECT_EQ(thread_, thread_delegate_->thread());
+ EXPECT_EQ(thread_delegate_, thread_->GetDelegate());
// Check thread was created with correct name
- EXPECT_EQ(threadName, thread->name());
- DeleteThread(thread);
- delete threadDelegate;
- EXPECT_EQ(NULL, thread->delegate());
+ EXPECT_EQ(kThreadName, thread_->GetThreadName());
}
-TEST(PosixThreadTest,
- CheckCreatedThreadNameChangeToLongName_ExpectThreadNameReduced) {
- // Arrange
- threads::Thread* thread = NULL;
- TestThreadDelegate* threadDelegate = new TestThreadDelegate();
- AutoLock test_lock(test_mutex_);
- // Create thread
- ASSERT_NO_THROW(thread = CreateThread(threadName, threadDelegate));
- thread->start(threads::ThreadOptions(threads::Thread::kMinStackSize));
- // Rename started thread. Name will be cut to 15 symbols + '\0'
- // This is the limit in current POSIX thread implementation
- thread->SetNameForId(thread->thread_handle(),
- std::string("new thread with changed name"));
- // Name must be large enough to keep 16 symbols. Read previous comment
- char name[MAX_SIZE];
- int result = pthread_getname_np(thread->thread_handle(), name, sizeof(name));
- if (!result)
- EXPECT_EQ(std::string("new thread with"), std::string(name));
- cond_var_.WaitFor(test_lock, 10000);
- EXPECT_TRUE(threadDelegate->check_value());
- DeleteThread(thread);
- delete threadDelegate;
- EXPECT_EQ(NULL, thread->delegate());
+TEST_F(PosixThreadTest,
+ CheckCreatedThreadNameChangeToLongName_ExpectThreadNameReduced) {
+ {
+ auto& lock = thread_delegate_->GetLock();
+ AutoLock test_lock(lock);
+ thread_->Start(ThreadOptions(Thread::kMinStackSize));
+ // Rename started thread. Name will be cut to 15 symbols + '\0'
+ // This is the limit in current POSIX thread implementation
+ thread_->SetNameForId(thread_->ThreadHandle(),
+ std::string("new thread with changed name"));
+ // Name must be large enough to keep 16 symbols. Read previous comment
+ char name[kMaxSize];
+ int result =
+ pthread_getname_np(thread_->ThreadHandle(), name, sizeof(name));
+ if (!result) {
+ EXPECT_EQ(std::string("new thread with"), std::string(name));
+ }
+
+ thread_delegate_->WaitFor(test_lock, 10000);
+ }
+
+ EXPECT_TRUE(thread_delegate_->IsChangedValue());
}
-TEST(
+TEST_F(
PosixThreadTest,
- StartCreatedThreadWithOptionsJoinableAndMyStackSize_ExpectMyStackSizeStackAndJoinableThreadStarted) {
- // Arrange
- threads::Thread* thread = NULL;
- TestThreadDelegate* threadDelegate = new TestThreadDelegate();
- AutoLock test_lock(test_mutex_);
- // Create thread
- ASSERT_NO_THROW(thread = CreateThread(threadName, threadDelegate));
- // Start thread with following options (Stack size = 32768 & thread is
- // joinable)
- thread->start(threads::ThreadOptions(MyStackSize));
- // Check thread is joinable
- EXPECT_TRUE(thread->is_joinable());
- // Check thread stack size is 32768
- EXPECT_EQ(MyStackSize, thread->stack_size());
- cond_var_.WaitFor(test_lock, 10000);
- EXPECT_TRUE(threadDelegate->check_value());
- DeleteThread(thread);
- delete threadDelegate;
- EXPECT_EQ(NULL, thread->delegate());
+ StartCreatedThreadWithOptionsJoinableAndUserStackSize_ExpectUserStackSizeStackAndJoinableThreadStarted) {
+ {
+ auto& lock = thread_delegate_->GetLock();
+ AutoLock test_lock(lock);
+ // Start thread with following options (Stack size = 32768 & thread is
+ // joinable)
+ thread_->Start(ThreadOptions(kStackSize));
+ // Check thread is joinable
+ EXPECT_TRUE(thread_->IsJoinable());
+ // Check thread stack size is 32768
+ EXPECT_EQ(kStackSize, thread_->StackSize());
+ thread_delegate_->WaitFor(test_lock, 10000);
+ }
+
+ EXPECT_TRUE(thread_delegate_->IsChangedValue());
}
-TEST(
+TEST_F(
PosixThreadTest,
StartCreatedThreadWithDefaultOptions_ExpectZeroStackAndJoinableThreadStarted) {
- // Arrange
- threads::Thread* thread = NULL;
- TestThreadDelegate* threadDelegate = new TestThreadDelegate();
- AutoLock test_lock(test_mutex_);
- // Create thread
- ASSERT_NO_THROW(thread = CreateThread(threadName, threadDelegate));
- // Start thread with default options (Stack size = 0 & thread is joinable)
- thread->start(threads::ThreadOptions());
- // Check thread is joinable
- EXPECT_TRUE(thread->is_joinable());
- // Check thread stack size is minimum value. Stack can not be 0
- EXPECT_EQ(Thread::kMinStackSize, thread->stack_size());
- cond_var_.WaitFor(test_lock, 10000);
- EXPECT_TRUE(threadDelegate->check_value());
- DeleteThread(thread);
- delete threadDelegate;
- EXPECT_EQ(NULL, thread->delegate());
+ {
+ auto& lock = thread_delegate_->GetLock();
+ AutoLock test_lock(lock);
+ // Start thread with default options (Stack size = 0 & thread is joinable)
+ thread_->Start(ThreadOptions());
+ // Check thread is joinable
+ EXPECT_TRUE(thread_->IsJoinable());
+ // Check thread stack size is minimum value. Stack can not be 0
+ EXPECT_EQ(Thread::kMinStackSize, thread_->StackSize());
+ thread_delegate_->WaitFor(test_lock, 10000);
+ }
+
+ EXPECT_TRUE(thread_delegate_->IsChangedValue());
}
-TEST(
+TEST_F(
PosixThreadTest,
StartThreadWithZeroStackAndDetached_ExpectMinimumStackAndDetachedThreadStarted) {
- // Arrange
- threads::Thread* thread = NULL;
- TestThreadDelegate* threadDelegate = new TestThreadDelegate();
- AutoLock test_lock(test_mutex_);
- // Create thread
- ASSERT_NO_THROW(thread = CreateThread(threadName, threadDelegate));
- // Start thread with default options (Stack size = 0 & thread is detached)
- thread->start(threads::ThreadOptions(0, false));
- // Check thread is detached
- EXPECT_FALSE(thread->is_joinable());
- // Check thread stack size is 0
- EXPECT_EQ(Thread::kMinStackSize, thread->stack_size());
- cond_var_.WaitFor(test_lock, 10000);
- EXPECT_TRUE(threadDelegate->check_value());
- DeleteThread(thread);
- delete threadDelegate;
- EXPECT_EQ(NULL, thread->delegate());
+ {
+ auto& lock = thread_delegate_->GetLock();
+ AutoLock test_lock(lock);
+ // Start thread with default options (Stack size = 0 & thread is detached)
+ thread_->Start(ThreadOptions(0, false));
+ // Check thread is detached
+ EXPECT_FALSE(thread_->IsJoinable());
+ // Check thread stack size is 0
+ EXPECT_EQ(Thread::kMinStackSize, thread_->StackSize());
+ thread_delegate_->WaitFor(test_lock, 10000);
+ }
+
+ EXPECT_TRUE(thread_delegate_->IsChangedValue());
}
-TEST(
- PosixThreadTest,
- DISABLED_CheckCreatedThreadNameChangeToEmpty_ExpectThreadNameChangedToEmpty) {
- // Arrange
- threads::Thread* thread = NULL;
- TestThreadDelegate* threadDelegate = new TestThreadDelegate();
- AutoLock test_lock(test_mutex_);
- // Create thread
- ASSERT_NO_THROW(thread = CreateThread(threadName, threadDelegate));
- thread->start(threads::ThreadOptions(threads::Thread::kMinStackSize));
- // Rename started thread. Name will be cut to 15 symbols + '\0'
- // This is the limit in current POSIX thread implementation
- thread->SetNameForId(thread->thread_handle(), std::string(""));
- // Name must be large enough to keep 16 symbols. Read previous comment
- char name[MAX_SIZE];
- int result = pthread_getname_np(thread->thread_handle(), name, sizeof(name));
- if (!result) {
- EXPECT_EQ(std::string(""), std::string(name));
+TEST_F(PosixThreadTest,
+ CheckCreatedThreadNameChangeToEmpty_ExpectThreadNameChangedToEmpty) {
+ {
+ auto& lock = thread_delegate_->GetLock();
+ AutoLock test_lock(lock);
+ thread_->Start(ThreadOptions(Thread::kMinStackSize));
+ // Rename started thread. Name will be cut to 15 symbols + '\0'
+ // This is the limit in current POSIX thread implementation
+ thread_->SetNameForId(thread_->ThreadHandle(), std::string(""));
+ // Name must be large enough to keep 16 symbols. Read previous comment
+ char name[kMaxSize];
+ int result =
+ pthread_getname_np(thread_->ThreadHandle(), name, sizeof(name));
+ if (!result) {
+ EXPECT_TRUE(std::string(name).empty());
+ }
+ thread_delegate_->WaitFor(test_lock, 10000);
}
- cond_var_.WaitFor(test_lock, 10000);
- EXPECT_TRUE(threadDelegate->check_value());
- DeleteThread(thread);
- delete threadDelegate;
- EXPECT_EQ(NULL, thread->delegate());
+
+ EXPECT_TRUE(thread_delegate_->IsChangedValue());
}
-TEST(PosixThreadTest,
- CheckCreatedThreadNameChangeToShortName_ExpectThreadNameChangedToShort) {
- // Arrange
- threads::Thread* thread = NULL;
- TestThreadDelegate* threadDelegate = new TestThreadDelegate();
- AutoLock test_lock(test_mutex_);
- // Create thread
- ASSERT_NO_THROW(thread = CreateThread(threadName, threadDelegate));
- // Start created thread
- thread->start(threads::ThreadOptions(threads::Thread::kMinStackSize));
- // Rename started thread. Name will be cut to 15 symbols + '\0'
- // This is the limit in current POSIX thread implementation
- thread->SetNameForId(thread->thread_handle(), test_thread_name);
- // Name must be large enough to keep 16 symbols. Read previous comment
- char name[MAX_SIZE];
- int result = pthread_getname_np(thread->thread_handle(), name, sizeof(name));
- if (!result) {
- EXPECT_EQ(test_thread_name, std::string(name));
+TEST_F(PosixThreadTest,
+ CheckCreatedThreadNameChangeToShortName_ExpectThreadNameChangedToShort) {
+ {
+ auto& lock = thread_delegate_->GetLock();
+ AutoLock test_lock(lock);
+ // Start created thread
+ thread_->Start(ThreadOptions(Thread::kMinStackSize));
+ // Rename started thread. Name will be cut to 15 symbols + '\0'
+ // This is the limit in current POSIX thread implementation
+ thread_->SetNameForId(thread_->ThreadHandle(), kRenamedThreadName);
+ // Name must be large enough to keep 16 symbols. Read previous comment
+ char name[kMaxSize];
+ int result =
+ pthread_getname_np(thread_->ThreadHandle(), name, sizeof(name));
+ if (!result) {
+ EXPECT_EQ(kRenamedThreadName, std::string(name));
+ }
+ thread_delegate_->WaitFor(test_lock, 10000);
}
- cond_var_.WaitFor(test_lock, 10000);
- EXPECT_TRUE(threadDelegate->check_value());
- DeleteThread(thread);
- delete threadDelegate;
- EXPECT_EQ(NULL, thread->delegate());
+
+ EXPECT_TRUE(thread_delegate_->IsChangedValue());
}
-TEST(PosixThreadTest, StartThread_ExpectThreadStarted) {
- // Arrange
- threads::Thread* thread = NULL;
- TestThreadDelegate* threadDelegate = new TestThreadDelegate();
- AutoLock test_lock(test_mutex_);
- // Create thread
- ASSERT_NO_THROW(thread = CreateThread(threadName, threadDelegate));
- // Start created thread
- EXPECT_TRUE(
- thread->start(threads::ThreadOptions(threads::Thread::kMinStackSize)));
- cond_var_.WaitFor(test_lock, 10000);
- EXPECT_TRUE(threadDelegate->check_value());
- DeleteThread(thread);
- delete threadDelegate;
- EXPECT_EQ(NULL, thread->delegate());
+TEST_F(PosixThreadTest, StartThread_ExpectThreadStarted) {
+ {
+ auto& lock = thread_delegate_->GetLock();
+ AutoLock test_lock(lock);
+ // Start created thread
+ EXPECT_TRUE(thread_->Start(ThreadOptions(Thread::kMinStackSize)));
+ thread_delegate_->WaitFor(test_lock, 10000);
+ }
+
+ EXPECT_TRUE(thread_delegate_->IsChangedValue());
}
-TEST(PosixThreadTest, StartOneThreadTwice_ExpectTheSameThreadStartedTwice) {
- // Arrange
- PlatformThreadHandle thread1_id;
- PlatformThreadHandle thread2_id;
- threads::Thread* thread = NULL;
- TestThreadDelegate* threadDelegate = new TestThreadDelegate();
- AutoLock test_lock(test_mutex_);
- // Create thread
- ASSERT_NO_THROW(thread = CreateThread(threadName, threadDelegate));
- // Start created thread
- EXPECT_TRUE(
- thread->start(threads::ThreadOptions(threads::Thread::kMinStackSize)));
- thread1_id = thread->CurrentId();
- thread->stop();
- // Try to start thread again
- EXPECT_TRUE(
- thread->start(threads::ThreadOptions(threads::Thread::kMinStackSize)));
- thread2_id = thread->CurrentId();
- EXPECT_EQ(thread1_id, thread2_id);
- cond_var_.WaitFor(test_lock, 10000);
- EXPECT_TRUE(threadDelegate->check_value());
- DeleteThread(thread);
- delete threadDelegate;
- EXPECT_EQ(NULL, thread->delegate());
+TEST_F(PosixThreadTest, StartOneThreadTwice_ExpectTheSameThreadStartedTwice) {
+ {
+ auto& lock = thread_delegate_->GetLock();
+ AutoLock test_lock(lock);
+ // Start created thread
+ EXPECT_TRUE(thread_->Start(ThreadOptions(Thread::kMinStackSize)));
+ auto thread1_id = thread_->CurrentId();
+ thread_delegate_->WaitFor(test_lock, 10000);
+ thread_->Join(Thread::kThreadJoinDelegate);
+ // Try to start thread again
+ EXPECT_TRUE(thread_->Start(ThreadOptions(Thread::kMinStackSize)));
+ auto thread2_id = thread_->CurrentId();
+ EXPECT_EQ(thread1_id, thread2_id);
+ thread_delegate_->WaitFor(test_lock, 10000);
+ }
+
+ EXPECT_TRUE(thread_delegate_->IsChangedValue());
}
-TEST(PosixThreadTest,
- StartOneThreadAgainAfterRename_ExpectRenamedThreadStarted) {
- // Arrange
- PlatformThreadHandle thread1_id;
- PlatformThreadHandle thread2_id;
- threads::Thread* thread = NULL;
- TestThreadDelegate* threadDelegate = new TestThreadDelegate();
- AutoLock test_lock(test_mutex_);
- // Create thread
- ASSERT_NO_THROW(thread = CreateThread(threadName, threadDelegate));
- // Start created thread
- EXPECT_TRUE(
- thread->start(threads::ThreadOptions(threads::Thread::kMinStackSize)));
- thread1_id = thread->CurrentId();
- // Rename started thread. Name will be cut to 15 symbols + '\0'
- // This is the limit in current POSIX thread implementation
- thread->SetNameForId(thread->thread_handle(), test_thread_name);
- // Name must be large enough to keep 16 symbols. Read previous comment
- char name[MAX_SIZE];
- int result = pthread_getname_np(thread->thread_handle(), name, sizeof(name));
- if (!result)
- EXPECT_EQ(test_thread_name, std::string(name));
- // Stop thread
- thread->stop();
- EXPECT_TRUE(
- thread->start(threads::ThreadOptions(threads::Thread::kMinStackSize)));
- thread2_id = thread->CurrentId();
- // Expect the same thread started with the the same name
- EXPECT_EQ(test_thread_name, std::string(name));
- EXPECT_EQ(thread1_id, thread2_id);
- cond_var_.WaitFor(test_lock, 10000);
- EXPECT_TRUE(threadDelegate->check_value());
- DeleteThread(thread);
- delete threadDelegate;
- EXPECT_EQ(NULL, thread->delegate());
+TEST_F(PosixThreadTest,
+ StartOneThreadAgainAfterRename_ExpectRenamedThreadStarted) {
+ {
+ auto& lock = thread_delegate_->GetLock();
+ AutoLock test_lock(lock);
+ // Start created thread
+ EXPECT_TRUE(thread_->Start(ThreadOptions(Thread::kMinStackSize)));
+ auto thread1_id = thread_->CurrentId();
+ // Rename started thread. Name will be cut to 15 symbols + '\0'
+ // This is the limit in current POSIX thread implementation
+ thread_->SetNameForId(thread_->ThreadHandle(), kThreadName);
+ // Name must be large enough to keep 16 symbols. Read previous comment
+ char name[kMaxSize];
+ int result =
+ pthread_getname_np(thread_->ThreadHandle(), name, sizeof(name));
+ if (!result) {
+ EXPECT_EQ(kThreadName, std::string(name));
+ }
+ thread_delegate_->WaitFor(test_lock, 10000);
+ thread_->Join(Thread::kThreadJoinDelegate);
+ EXPECT_TRUE(thread_->Start(ThreadOptions(Thread::kMinStackSize)));
+ auto thread2_id = thread_->CurrentId();
+ // Expect the same thread started with the the same name
+ EXPECT_EQ(kThreadName, std::string(name));
+ EXPECT_EQ(thread1_id, thread2_id);
+ thread_delegate_->WaitFor(test_lock, 10000);
+ }
+
+ EXPECT_TRUE(thread_delegate_->IsChangedValue());
+}
+
+TEST_F(PosixThreadTest, StartThreadWithNullPtrDelegate_ExpectThreadStateNone) {
+ thread_->SetDelegate(nullptr);
+ EXPECT_TRUE(nullptr != thread_);
+ EXPECT_EQ(nullptr, thread_->GetDelegate());
+
+ EXPECT_FALSE(thread_->Start());
+ EXPECT_FALSE(thread_->IsRunning());
+ EXPECT_EQ(Thread::kThreadStateNone, thread_->thread_state_);
+}
+
+TEST_F(PosixThreadTest,
+ StartThreadExecutingThreadMain_ExpectThreadStateRunning) {
+ const bool cycled_thread_main = true;
+ thread_delegate_ = new TestThreadDelegate(cycled_thread_main);
+ ReplaceThreadDelegate(thread_delegate_);
+
+ {
+ auto& lock = thread_delegate_->GetLock();
+ AutoLock auto_lock(lock);
+ EXPECT_TRUE(thread_->Start());
+ thread_delegate_->WaitFor(auto_lock, 5000);
+ }
+
+ EXPECT_TRUE(thread_->IsRunning());
+ EXPECT_EQ(Thread::kThreadStateRunning, thread_->thread_state_);
+}
+
+TEST_F(PosixThreadTest,
+ StartThreadExecutingThreadMainCallStopDelegate_ExpectThreadStateIdle) {
+ const bool cycled_thread_main = true;
+ thread_delegate_ = new TestThreadDelegate(cycled_thread_main);
+ ReplaceThreadDelegate(thread_delegate_);
+
+ {
+ auto& lock = thread_delegate_->GetLock();
+ AutoLock auto_lock(lock);
+ EXPECT_TRUE(thread_->Start());
+ thread_delegate_->WaitFor(auto_lock, 5000);
+ }
+
+ thread_->Stop(Thread::kThreadStopDelegate);
+
+ EXPECT_FALSE(thread_->IsRunning());
+ EXPECT_EQ(Thread::kThreadStateIdle, thread_->thread_state_);
+}
+
+TEST_F(PosixThreadTest,
+ StartThreadExecutingThreadMainCallForceStop_ExpectThreadStateCompleted) {
+ const bool cycled_thread_main = true;
+ thread_delegate_ = new TestThreadDelegate(cycled_thread_main);
+ ReplaceThreadDelegate(thread_delegate_);
+
+ {
+ auto& lock = thread_delegate_->GetLock();
+ AutoLock auto_lock(lock);
+ EXPECT_TRUE(thread_->Start());
+ thread_delegate_->WaitFor(auto_lock, 5000);
+ }
+
+ thread_->Stop(Thread::kThreadForceStop);
+ thread_->Join(Thread::kThreadJoinThread);
+
+ EXPECT_FALSE(thread_->IsRunning());
+ EXPECT_EQ(Thread::kThreadStateCompleted, thread_->thread_state_);
}
-} // namespace utils_test
-} // namespace components
-} // namespace test
+} // namespace threads
diff --git a/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py b/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
index de0067bba8..73ab03f205 100755
--- a/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
+++ b/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
@@ -738,19 +738,18 @@ class CodeGenerator(object):
item.name += "_history_v" + str(len(history_list)-count)
result_array.append(self._gen_schema_item_decl(item))
count += 1
- result_array.append(self._gen_history_vector_decl(history_list, x.name))
+ result_array.append(self._gen_history_vector_decl(x.name))
result = u"\n\n".join(result_array)
return result
- def _gen_history_vector_decl(self, history_list, name):
+ def _gen_history_vector_decl(self, name):
"""Generate History Vector Declaration.
Generates the declaration and initialization
of a vector of schema items
Arguments:
- history_list -> list of history items
name -> name of parent parameter name
Returns:
@@ -759,9 +758,40 @@ class CodeGenerator(object):
result_array = []
result_array.append(self._impl_code_shared_ptr_vector_template.substitute(var_name = name))
result = u"\n".join(result_array)
+ if result is not "":
+ result += u"\n\n"
return result
+ def _gen_function_history_decl(self, member):
+ """Generate History Vector Declaration for function.
+ Generates the declaration and initialization
+ of a function
+
+ Arguments:
+ member -> function member
+
+ Returns:
+ String with history array code.
+ """
+ result_array = []
+ count = 0
+ if member.history is not None:
+ history_list = member.history
+ result_array.append(self._gen_history_vector_decl(member.name))
+ for item in history_list:
+ item.name += "_history_v" + str(len(history_list)-count)
+ result_array.append(self._impl_code_item_decl_template.substitute(
+ comment="",
+ var_name=self._gen_schema_item_var_name(item),
+ item_decl=self._impl_function_schema))
+ result_array.append(self._gen_function_history_vector_item_fill(item, member.name))
+ count += 1
+
+ result = u"\n\n".join(result_array)
+ if result is not "":
+ result += u"\n\n"
+ return result
def _gen_schema_item_decl(self, member):
"""Generate schema item declaration.
@@ -777,7 +807,7 @@ class CodeGenerator(object):
"""
- return self._impl_code_item_decl_temlate.substitute(
+ return self._impl_code_item_decl_template.substitute(
comment=self._gen_comment(member, False),
var_name=self._gen_schema_item_var_name(member),
item_decl=self._gen_schema_item_decl_code(
@@ -960,6 +990,40 @@ class CodeGenerator(object):
raise GenerateError("Unexpected call to the unimplemented function.")
+ def _gen_function_member(self, member):
+ """Generate function member fill code.
+
+ Generates source code that fills new schema with items.
+
+ Keyword arguments:
+ members -- list of struct members/function parameters to process.
+
+ Returns:
+ String with function member definition fill code.
+
+ """
+ self._check_member_history(member)
+
+ if (member.since is not None):
+ if member.history is not None:
+ return self._impl_function_member_fill_template_with_version_and_history_vector.substitute(
+ schema=self._impl_function_schema,
+ since=member.since if member.since is not None else "",
+ until=member.until if member.until is not None else "",
+ deprecated=member.deprecated if member.deprecated is not None else u"false",
+ removed=member.removed if member.removed is not None else u"false",
+ vector_name=member.name)
+ else:
+ return self._impl_function_member_fill_template_with_version.substitute(
+ schema=self._impl_function_schema,
+ since=member.since if member.since is not None else "",
+ until=member.until if member.until is not None else "",
+ deprecated=member.deprecated if member.deprecated is not None else u"false",
+ removed=member.removed if member.removed is not None else u"false")
+ else:
+ return self._impl_function_member_fill_template.substitute(
+ schema=self._impl_function_schema)
+
def _check_member_history(self, member):
"""
Checks set of rules that history items are valid
@@ -1056,6 +1120,34 @@ class CodeGenerator(object):
else:
print("Warning! History item does not have any version history. Omitting " + member.name)
+ def _gen_function_history_vector_item_fill(self, member, vector_name):
+ """Generate schema item fill code for function.
+
+ Generates source code that fills history vector with item.
+
+ Keyword arguments:
+ member -- struct member/function parameter to process.
+
+ Returns:
+ String with schema item fill code.
+
+ """
+
+ if (member.since is not None or
+ member.until is not None or
+ member.deprecated is not None or
+ member.removed is not None):
+ return self._impl_code_append_history_vector_template.substitute(
+ vector_name=vector_name,
+ name=member.name,
+ mandatory=u"true",
+ since=member.since if member.since is not None else "",
+ until=member.until if member.until is not None else "",
+ deprecated=member.deprecated if member.deprecated is not None else u"false",
+ removed=member.removed if member.removed is not None else u"false")
+ else:
+ print("Warning! History item does not have any version history. Omitting " + member.name)
+
@staticmethod
def _gen_schema_item_var_name(member):
"""Generate schema item variable name.
@@ -1158,7 +1250,11 @@ class CodeGenerator(object):
schema_item_fill=self._gen_schema_items_fill(
function.params.values(), function.since, function.until, function.deprecated, function.removed),
schema_params_fill=self._gen_schema_params_fill(
- function.message_type.name)),
+ function.message_type.name),
+ function_history_fill=self._gen_function_history_decl(
+ function),
+ function_member=self._gen_function_member(
+ function)),
1))
def _gen_enums(self, enums, structs):
@@ -1831,7 +1927,7 @@ class CodeGenerator(object):
_impl_gen_schema_enum_history_map_template = string.Template(
u'''${name}_element_signatures''')
- _impl_code_item_decl_temlate = string.Template(
+ _impl_code_item_decl_template = string.Template(
u'''${comment}'''
u'''std::shared_ptr<ISchemaItem> ${var_name} = ${item_decl};''')
@@ -1874,6 +1970,17 @@ class CodeGenerator(object):
_impl_code_item_fill_template_with_version_and_history_vector = string.Template(
u'''schema_members["${name}"] = SMember(${var_name}, ${is_mandatory}, "${since}", "${until}", ${deprecated}, ${removed}, ${vector_name}_history_vector);''')
+
+ _impl_function_schema = u'''CObjectSchemaItem::create(schema_members)'''
+
+ _impl_function_member_fill_template = string.Template(
+ u'''SMember(${schema}, true)''')
+
+ _impl_function_member_fill_template_with_version = string.Template(
+ u'''SMember(${schema}, true, "${since}", "${until}", ${deprecated}, ${removed})''')
+
+ _impl_function_member_fill_template_with_version_and_history_vector = string.Template(
+ u'''SMember(${schema}, true, "${since}", "${until}", ${deprecated}, ${removed}, ${vector_name}_history_vector)''')
_function_impl_template = string.Template(
u'''CSmartSchema $namespace::$class_name::'''
@@ -1894,12 +2001,12 @@ class CodeGenerator(object):
u'''params_members;\n'''
u'''${schema_params_fill}'''
u'''\n'''
+ u'''${function_history_fill}'''
u'''Members '''
u'''root_members_map;\n'''
u'''root_members_map[ns_smart_device_link::ns_json_handler::'''
u'''strings::S_MSG_PARAMS] = '''
- u'''SMember(CObjectSchemaItem::'''
- u'''create(schema_members), true);\n'''
+ u'''${function_member};\n'''
u'''root_members_map[ns_smart_device_link::ns_json_handler::'''
u'''strings::S_PARAMS] = '''
u'''SMember(CObjectSchemaItem::'''
diff --git a/tools/policy_table_validator/main.cpp b/tools/policy_table_validator/main.cpp
index 80c5e2eddc..7e099c7ae1 100644
--- a/tools/policy_table_validator/main.cpp
+++ b/tools/policy_table_validator/main.cpp
@@ -5,6 +5,13 @@
#include "utils/jsoncpp_reader_wrapper.h"
#include "utils/file_system.h"
+#ifdef ENABLE_LOG
+#include "utils/logger/logger_impl.h"
+#include "utils/logger/log4cxxlogger.h"
+#endif // ENABLE_LOG
+
+#include "utils/logger.h"
+
namespace policy_table = rpc::policy_table_interface_base;
enum ResultCode {
@@ -43,6 +50,17 @@ int main(int argc, char** argv) {
help();
exit(MISSED_FILE_NAME);
}
+
+#ifdef ENABLE_LOG
+ // --------------------------------------------------------------------------
+ // Logger initialization
+ // Redefine for each paticular logger implementation
+ auto logger = std::unique_ptr<logger::Log4CXXLogger>(new logger::Log4CXXLogger("log4cxx.properties"));
+ auto logger_impl = std::unique_ptr<logger::LoggerImpl>(new logger::LoggerImpl());
+ logger::Logger::instance(logger_impl.get());
+ logger_impl->Init(std::move(logger));
+#endif // ENABLE_LOG
+
std::string pt_type_str = argv[1];
std::string file_name = argv[2];
std::string json_string;
@@ -51,11 +69,13 @@ int main(int argc, char** argv) {
if (rpc::policy_table_interface_base::PolicyTableType::INVALID_PT_TYPE ==
pt_type) {
std::cout << "Invalid policy table type: " << pt_type_str << std::endl;
+ SDL_DEINIT_LOGGER()
exit(PT_TYPE_ERROR);
}
bool read_result = file_system::ReadFile(file_name, json_string);
if (false == read_result) {
std::cout << "Read file error: " << file_name << std::endl;
+ SDL_DEINIT_LOGGER()
exit(READ_ERROR);
}
@@ -64,6 +84,7 @@ int main(int argc, char** argv) {
bool parse_result = reader.parse(json_string, &value);
if (false == parse_result) {
+ SDL_DEINIT_LOGGER()
exit(PARSE_ERROR);
}
std::cout << "DEFAULT_POLICY" << std::endl;
@@ -72,6 +93,7 @@ int main(int argc, char** argv) {
bool is_valid = table.is_valid();
if (true == is_valid) {
std::cout << "Table is valid" << std::endl;
+ SDL_DEINIT_LOGGER()
exit(SUCCES);
}
@@ -81,5 +103,6 @@ int main(int argc, char** argv) {
std::cout << "Errors: " << std::endl
<< rpc::PrettyFormat(report) << std::endl;
+ SDL_DEINIT_LOGGER()
return SUCCES;
}
diff --git a/tools/rpc_spec b/tools/rpc_spec
-Subproject 53e3dfb3cd7ff75a3425312ae4aeb758a1e0fc5
+Subproject 762489ca140f246923e8bb8f54e96364e9d0101